parse dns_servre in config (#739)

thx
This commit is contained in:
hdl 2017-02-28 06:15:47 -08:00 committed by mengskysama
parent ad39d957d7
commit 8ac72b0b25

View file

@ -184,6 +184,8 @@ def check_config(config, is_local):
if os.name != 'posix':
logging.error('user can be used only on Unix')
sys.exit(1)
if config.get('dns_server', None) is not None:
logging.info('Specified DNS server: %s' % config['dns_server'])
encrypt.try_cipher(config['password'], config['method'])
@ -297,6 +299,7 @@ def get_config(is_local):
config['one_time_auth'] = config.get('one_time_auth', False)
config['prefer_ipv6'] = config.get('prefer_ipv6', False)
config['server_port'] = config.get('server_port', 8388)
config['dns_server'] = config.get('dns_server', None)
logging.getLogger('').handlers = []
logging.addLevelName(VERBOSE_LEVEL, 'VERBOSE')