clowwindy 11 years ago
parent
commit
d3f294217c
  1. 4
      shadowsocks/utils.py
  2. 2
      tests/aes.json
  3. 2
      tests/fastopen.json
  4. 2
      tests/salsa20.json
  5. 2
      tests/table.json
  6. 2
      tests/workers.json

4
shadowsocks/utils.py

@ -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):

2
tests/aes.json

@ -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",

2
tests/fastopen.json

@ -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",

2
tests/salsa20.json

@ -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",

2
tests/table.json

@ -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",

2
tests/workers.json

@ -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",

Loading…
Cancel
Save