optimize code
add logs add timestamp
This commit is contained in:
@@ -68,7 +68,8 @@ def main():
|
||||
obfs = config["obfs"]
|
||||
a_config = config.copy()
|
||||
ipv6_ok = False
|
||||
logging.info("server start with password [%s] obfs [%s] method [%s]" % (password, obfs, a_config['method']))
|
||||
logging.info("server start with password [%s] method [%s] obfs [%s] obfs_param [%s]" %
|
||||
(password, a_config['method'], obfs, a_config['obfs_param']))
|
||||
if 'server_ipv6' in a_config:
|
||||
try:
|
||||
if len(a_config['server_ipv6']) > 2 and a_config['server_ipv6'][0] == "[" and a_config['server_ipv6'][-1] == "]":
|
||||
@@ -77,7 +78,7 @@ def main():
|
||||
a_config['password'] = password
|
||||
a_config['obfs'] = obfs
|
||||
a_config['server'] = a_config['server_ipv6']
|
||||
logging.info("starting server at %s:%d" %
|
||||
logging.info("starting server at [%s]:%d" %
|
||||
(a_config['server'], int(port)))
|
||||
tcp_servers.append(tcprelay.TCPRelay(a_config, dns_resolver, False))
|
||||
udp_servers.append(udprelay.UDPRelay(a_config, dns_resolver, False))
|
||||
|
||||
Reference in New Issue
Block a user