close #97
This commit is contained in:
@ -36,14 +36,20 @@ def find_config():
|
||||
|
||||
|
||||
def check_config(config):
|
||||
if config.get('local_address', '') in ['0.0.0.0']:
|
||||
logging.warn('warning: local set to listen 0.0.0.0, which is not safe')
|
||||
if config.get('server', '') in ['127.0.0.1', 'localhost']:
|
||||
logging.warn('Server is set to "%s", maybe it\'s not correct' %
|
||||
config['server'])
|
||||
logging.warn('Notice server will listen at %s:%s' %
|
||||
logging.warn('warning: server set to listen %s:%s, are you sure?' %
|
||||
(config['server'], config['server_port']))
|
||||
if (config.get('method', '') or '').lower() == 'rc4':
|
||||
logging.warn('RC4 is not safe; please use a safer cipher, '
|
||||
logging.warn('warning: RC4 is not safe; please use a safer cipher, '
|
||||
'like AES-256-CFB')
|
||||
if (config.get('timeout', 600) or 600) < 100:
|
||||
logging.warn('warning: your timeout %d seems too short' %
|
||||
config.get('timeout'))
|
||||
if (config.get('timeout', 600) or 600) > 600:
|
||||
logging.warn('warning: your timeout %d seems too long' %
|
||||
config.get('timeout'))
|
||||
|
||||
|
||||
def print_local_help():
|
||||
|
Reference in New Issue
Block a user