Commit 8c4def4a authored by Ulysse Beaugnon's avatar Ulysse Beaugnon

A little clean-up in the imports

parent f6e96b71
...@@ -2,16 +2,9 @@ To be done : ...@@ -2,16 +2,9 @@ To be done :
Use an algorithm to choose which connections to keep and/or establish Use an algorithm to choose which connections to keep and/or establish
instead of pure randomness instead of pure randomness
number of routes / tunnel number of routes / tunnel
favorise most used roads
( Write docstrings for all class/methods/functions ) ( Write docstrings for all class/methods/functions )
We should replace dead connection much more often than we refresh tunnels otherwise, it brings instability Use latency in babeld
If we do this, we must protect some tunnels
To be discussed: Warn babeld about the tunnels wich are about to be deleted. Maybe we could just increase the cost.
Project name ?
Resinet/res(6)net/rs(6)net
ResiliAnt ( ants : find shortest paths, don't die easily
~ are resilients )
rescan6
#!/usr/bin/env python #!/usr/bin/env python
import argparse, math, random, select, smtplib, sqlite3, string, socket import argparse, random, select, smtplib, sqlite3, string, socket
import subprocess, time, threading, traceback, errno, logging, os, xmlrpclib import subprocess, time, threading, traceback, errno, logging, os, xmlrpclib
from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
from email.mime.text import MIMEText from email.mime.text import MIMEText
......
#!/usr/bin/env python #!/usr/bin/env python
import argparse, errno, os, select, subprocess, sqlite3, time, logging import os, sys, select, time
import argparse, subprocess, sqlite3, logging, traceback
from argparse import ArgumentParser from argparse import ArgumentParser
from re6st import plib, utils, db, upnpigd, tunnel from re6st import plib, utils, db, upnpigd, tunnel
...@@ -62,8 +63,6 @@ def getConfig(): ...@@ -62,8 +63,6 @@ def getConfig():
# Tunnel options # Tunnel options
_('--pp', nargs=2, action='append', _('--pp', nargs=2, action='append',
help='Port and protocol to be used by other peers to connect') help='Port and protocol to be used by other peers to connect')
_('--tunnel-refresh', default=300, type=int,
help='time (seconds) to wait before changing the connections')
_('--dh', required=True, _('--dh', required=True,
help='Path to dh file') help='Path to dh file')
_('--ca', required=True, _('--ca', required=True,
...@@ -77,6 +76,9 @@ def getConfig(): ...@@ -77,6 +76,9 @@ def getConfig():
_('--refresh-count', default=1, type=int, _('--refresh-count', default=1, type=int,
help='''The number of connections to drop when refreshing the help='''The number of connections to drop when refreshing the
connections''') connections''')
_('--tunnel-refresh', default=300, type=int,
help='time (seconds) to wait before changing the connections')
# Openvpn options # Openvpn options
_('openvpn_args', nargs=argparse.REMAINDER, _('openvpn_args', nargs=argparse.REMAINDER,
help="Common OpenVPN options (e.g. certificates)") help="Common OpenVPN options (e.g. certificates)")
......
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