diff --git a/server_pool.py b/server_pool.py index d159817..b96bfeb 100644 --- a/server_pool.py +++ b/server_pool.py @@ -119,12 +119,12 @@ class ServerPool(object): a_config.update(user_config) if len(a_config['server_ipv6']) > 2 and a_config['server_ipv6'][0] == "[" and a_config['server_ipv6'][-1] == "]": a_config['server_ipv6'] = a_config['server_ipv6'][1:-1] - a_config['server'] = a_config['server_ipv6'] + a_config['server'] = common.to_str(a_config['server_ipv6']) a_config['server_port'] = port a_config['max_connect'] = 128 a_config['method'] = common.to_str(a_config['method']) try: - logging.info("starting server at [%s]:%d" % (common.to_str(a_config['server']), port)) + logging.info("starting server at [%s]:%d" % (a_config['server'], port)) tcp_server = tcprelay.TCPRelay(a_config, self.dns_resolver, False, stat_counter=self.stat_counter) tcp_server.add_to_loop(self.loop) @@ -134,7 +134,7 @@ class ServerPool(object): udp_server.add_to_loop(self.loop) self.udp_ipv6_servers_pool.update({port: udp_server}) - if common.to_str(a_config['server_ipv6']) == "::": + if a_config['server_ipv6'] == "::": ipv6_ok = True except Exception as e: logging.warn("IPV6 %s " % (e,)) @@ -150,7 +150,7 @@ class ServerPool(object): a_config['max_connect'] = 128 a_config['method'] = common.to_str(a_config['method']) try: - logging.info("starting server at %s:%d" % (common.to_str(a_config['server']), port)) + logging.info("starting server at %s:%d" % (a_config['server'], port)) tcp_server = tcprelay.TCPRelay(a_config, self.dns_resolver, False) tcp_server.add_to_loop(self.loop) diff --git a/setup_cymysql.sh b/setup_cymysql.sh index cc1ba35..4113885 100755 --- a/setup_cymysql.sh +++ b/setup_cymysql.sh @@ -1,6 +1,6 @@ #!/bin/bash rm -rf CyMySQL rm -rf cymysql -git clone https://github.com/PyMySQL/CyMySQL.git +git clone https://github.com/nakagami/CyMySQL.git mv CyMySQL/cymysql ./ rm -rf CyMySQL diff --git a/shadowsocks/server.py b/shadowsocks/server.py index 0815389..9af80d7 100755 --- a/shadowsocks/server.py +++ b/shadowsocks/server.py @@ -120,7 +120,7 @@ def main(): a_config['obfs_param'] = obfs_param a_config['out_bind'] = bind a_config['out_bindv6'] = bindv6 - a_config['server'] = a_config['server_ipv6'] + a_config['server'] = common.to_str(a_config['server_ipv6']) logging.info("starting server at [%s]:%d" % (a_config['server'], int(port))) tcp_servers.append(tcprelay.TCPRelay(a_config, dns_resolver, False, stat_counter=stat_counter_dict))