This commit is contained in:
clowwindy 2014-06-05 19:47:03 +08:00
parent a3748a292d
commit d3f294217c
6 changed files with 9 additions and 5 deletions

View file

@ -73,6 +73,10 @@ def check_config(config):
if config.get('timeout', 300) > 600: if config.get('timeout', 300) > 600:
logging.warn('warning: your timeout %d seems too long' % logging.warn('warning: your timeout %d seems too long' %
int(config.get('timeout'))) int(config.get('timeout')))
if config.get('password') in ['mypassword', 'barfoo!']:
logging.error('DON\'T USE DEFAULT PASSWORD! Please change it in your '
'config.json!')
exit(1)
def get_config(is_local): def get_config(is_local):

View file

@ -2,7 +2,7 @@
"server":"127.0.0.1", "server":"127.0.0.1",
"server_port":8388, "server_port":8388,
"local_port":1081, "local_port":1081,
"password":"barfoo!", "password":"aes_password",
"timeout":60, "timeout":60,
"method":"aes-256-cfb", "method":"aes-256-cfb",
"local_address":"127.0.0.1", "local_address":"127.0.0.1",

View file

@ -2,7 +2,7 @@
"server":"127.0.0.1", "server":"127.0.0.1",
"server_port":8388, "server_port":8388,
"local_port":1081, "local_port":1081,
"password":"barfoo!", "password":"fastopen_password",
"timeout":60, "timeout":60,
"method":"aes-256-cfb", "method":"aes-256-cfb",
"local_address":"127.0.0.1", "local_address":"127.0.0.1",

View file

@ -2,7 +2,7 @@
"server":"127.0.0.1", "server":"127.0.0.1",
"server_port":8388, "server_port":8388,
"local_port":1081, "local_port":1081,
"password":"barfoo!", "password":"salsa20_password",
"timeout":60, "timeout":60,
"method":"salsa20-ctr", "method":"salsa20-ctr",
"local_address":"127.0.0.1", "local_address":"127.0.0.1",

View file

@ -2,7 +2,7 @@
"server":"127.0.0.1", "server":"127.0.0.1",
"server_port":8388, "server_port":8388,
"local_port":1081, "local_port":1081,
"password":"barfoo!", "password":"table_password",
"timeout":60, "timeout":60,
"method":"table", "method":"table",
"local_address":"127.0.0.1", "local_address":"127.0.0.1",

View file

@ -2,7 +2,7 @@
"server":"127.0.0.1", "server":"127.0.0.1",
"server_port":8388, "server_port":8388,
"local_port":1081, "local_port":1081,
"password":"barfoo!", "password":"workers_password",
"timeout":60, "timeout":60,
"method":"aes-256-cfb", "method":"aes-256-cfb",
"local_address":"127.0.0.1", "local_address":"127.0.0.1",