almost done
This commit is contained in:
parent
cd22d474fe
commit
5e9a9c9beb
3 changed files with 13 additions and 7 deletions
|
@ -40,10 +40,10 @@ def main():
|
||||||
p = os.path.dirname(os.path.abspath(sys.executable))
|
p = os.path.dirname(os.path.abspath(sys.executable))
|
||||||
os.chdir(p)
|
os.chdir(p)
|
||||||
|
|
||||||
utils.print_shadowsocks()
|
|
||||||
|
|
||||||
config = utils.get_config(True)
|
config = utils.get_config(True)
|
||||||
|
|
||||||
|
utils.print_shadowsocks()
|
||||||
|
|
||||||
encrypt.init_table(config['password'], config['method'])
|
encrypt.init_table(config['password'], config['method'])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -34,9 +34,9 @@ import udprelay
|
||||||
def main():
|
def main():
|
||||||
utils.check_python()
|
utils.check_python()
|
||||||
|
|
||||||
utils.print_shadowsocks()
|
config = utils.get_config(False)
|
||||||
|
|
||||||
config = utils.get_config(True)
|
utils.print_shadowsocks()
|
||||||
|
|
||||||
if config['port_password']:
|
if config['port_password']:
|
||||||
if config['server_port'] or config['password']:
|
if config['server_port'] or config['password']:
|
||||||
|
|
|
@ -125,7 +125,7 @@ def get_config(is_local):
|
||||||
elif key == '--workers':
|
elif key == '--workers':
|
||||||
config['workers'] = value
|
config['workers'] = value
|
||||||
except getopt.GetoptError as e:
|
except getopt.GetoptError as e:
|
||||||
logging.error(e)
|
print >>sys.stderr, e
|
||||||
if is_local:
|
if is_local:
|
||||||
print_local_help()
|
print_local_help()
|
||||||
else:
|
else:
|
||||||
|
@ -151,7 +151,7 @@ def get_config(is_local):
|
||||||
def print_local_help():
|
def print_local_help():
|
||||||
print '''usage: sslocal [-h] -s SERVER_ADDR -p SERVER_PORT [-b LOCAL_ADDR]
|
print '''usage: sslocal [-h] -s SERVER_ADDR -p SERVER_PORT [-b LOCAL_ADDR]
|
||||||
-l LOCAL_PORT -k PASSWORD -m METHOD [-t TIMEOUT] [-c CONFIG]
|
-l LOCAL_PORT -k PASSWORD -m METHOD [-t TIMEOUT] [-c CONFIG]
|
||||||
[--fast-open]
|
[--fast-open] [-v]
|
||||||
|
|
||||||
optional arguments:
|
optional arguments:
|
||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
|
@ -164,12 +164,15 @@ optional arguments:
|
||||||
-t TIMEOUT timeout in seconds
|
-t TIMEOUT timeout in seconds
|
||||||
-c CONFIG path to config file
|
-c CONFIG path to config file
|
||||||
--fast-open use TCP_FASTOPEN, requires Linux 3.7+
|
--fast-open use TCP_FASTOPEN, requires Linux 3.7+
|
||||||
|
-v verbose mode
|
||||||
|
|
||||||
|
Online help: <https://github.com/clowwindy/shadowsocks>
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
def print_server_help():
|
def print_server_help():
|
||||||
print '''usage: ssserver [-h] -s SERVER_ADDR -p SERVER_PORT -k PASSWORD
|
print '''usage: ssserver [-h] -s SERVER_ADDR -p SERVER_PORT -k PASSWORD
|
||||||
-m METHOD [-t TIMEOUT] [-c CONFIG] [--fast-open]
|
-m METHOD [-t TIMEOUT] [-c CONFIG] [--fast-open] [-v]
|
||||||
|
|
||||||
optional arguments:
|
optional arguments:
|
||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
|
@ -181,4 +184,7 @@ optional arguments:
|
||||||
-c CONFIG path to config file
|
-c CONFIG path to config file
|
||||||
--fast-open use TCP_FASTOPEN, requires Linux 3.7+
|
--fast-open use TCP_FASTOPEN, requires Linux 3.7+
|
||||||
--workers WORKERS number of workers, available on Unix/Linux
|
--workers WORKERS number of workers, available on Unix/Linux
|
||||||
|
-v verbose mode
|
||||||
|
|
||||||
|
Online help: <https://github.com/clowwindy/shadowsocks>
|
||||||
'''
|
'''
|
Loading…
Add table
Reference in a new issue