Commit 33822341 authored by Guillaume Bury's avatar Guillaume Bury

Updated TODO + renamed babel -> router

parent 31222fbe
Bugs : Bugs :
When no peer is avalaible without the --no-boot option, it crash When no peer is avalaible without the --no-boot option, it crash => see below
To be done : To be done :
Replace comments at the beginning of functions with docstrings Replace comments at the beginning of functions with docstrings & give all fn docstrings
Do a clean-up in the import Do a clean-up in the import
Remove the parameters to choose the number of clients Remove the parameters to choose the number of clients
To be discuss: To be discuss:
Remove the --no-boot option since we know when no node is avalaible Remove the --no-boot option since we know when no node is avalaible
\=> the no-boot option is only useful when the server knows no peer,
irl it should never happen, no-boot is a debug option
The organisation of the code The organisation of the code
vifibnet.py Just contain the main loop and the init vifibnet.py Just contain the main loop and the init
openpvn.py To launch openvpn processes plib.py To launch server/client/routing processes
utils.py Small functions to do some usefull job, also contains the config utils.py Small functions to do some usefull job
db.py Function to access the DB (merge with utils ?) db.py Function to manage peers
tunnelmanager.py To choose wich connection delete/keep/... tunnelmanager.py To choose wich connection delete/keep/...
upnpigd.py To open a port and find the external IP upnpigd.py To open a port and find the external IP
How we choose which protocol we use : How we choose which protocol we use :
IMO, we should use UDP. I've read many times than TCP other TCP can be catastrophic in terme of performance IMO, we should use UDP. I've read many times than TCP other TCP can be catastrophic in terme of performance
Every time a packet is lost, it is resend 2 times, one for each TCP tunnel Every time a packet is lost, it is resend 2 times, one for each TCP tunnel
And many GW allow UDP port forwarding (for bittorent, Xbox, ...) but not TCP port forwarding And many GW allow UDP port forwarding (for bittorent, Xbox, ...) but not TCP port forwarding
......
...@@ -48,7 +48,7 @@ def client(serverIp, pipe_fd, *args, **kw): ...@@ -48,7 +48,7 @@ def client(serverIp, pipe_fd, *args, **kw):
'--route-up', 'ovpn-client ' + str(pipe_fd), '--route-up', 'ovpn-client ' + str(pipe_fd),
*args, **kw) *args, **kw)
def babel(network, internal_ip, interface_list, **kw): def router(network, internal_ip, interface_list, **kw):
utils.log('Starting babel', 3) utils.log('Starting babel', 3)
args = ['babeld', args = ['babeld',
'-C', 'redistribute local ip %s' % (internal_ip), '-C', 'redistribute local ip %s' % (internal_ip),
......
...@@ -63,7 +63,7 @@ def main(): ...@@ -63,7 +63,7 @@ def main():
# Launch babel on all interfaces. WARNING : you have to be root to start babeld # Launch babel on all interfaces. WARNING : you have to be root to start babeld
interface_list = ['vifibnet'] + list(tunnel_manager.free_interface_set) interface_list = ['vifibnet'] + list(tunnel_manager.free_interface_set)
babel = plib.babel(network, internal_ip, interface_list, router = plib.router(network, internal_ip, interface_list,
stdout=os.open(os.path.join(config.log, 'vifibnet.babeld.log'), stdout=os.open(os.path.join(config.log, 'vifibnet.babeld.log'),
os.O_WRONLY | os.O_CREAT | os.O_TRUNC), stderr=subprocess.STDOUT) os.O_WRONLY | os.O_CREAT | os.O_TRUNC), stderr=subprocess.STDOUT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment