diff --git a/server_pool.py b/server_pool.py index b96bfeb..fcf6caf 100644 --- a/server_pool.py +++ b/server_pool.py @@ -117,7 +117,7 @@ class ServerPool(object): else: a_config = self.config.copy() a_config.update(user_config) - if len(a_config['server_ipv6']) > 2 and a_config['server_ipv6'][0] == "[" and a_config['server_ipv6'][-1] == "]": + if len(a_config['server_ipv6']) > 2 and a_config['server_ipv6'][0] == b"[" and a_config['server_ipv6'][-1] == b"]": a_config['server_ipv6'] = a_config['server_ipv6'][1:-1] a_config['server'] = common.to_str(a_config['server_ipv6']) a_config['server_port'] = port diff --git a/shadowsocks/server.py b/shadowsocks/server.py index 9af80d7..dced0a3 100755 --- a/shadowsocks/server.py +++ b/shadowsocks/server.py @@ -108,8 +108,8 @@ def main(): (protocol, password, method, obfs, 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] == "]": + if len(a_config['server_ipv6']) > 2 and a_config['server_ipv6'][0] == b"[" and a_config['server_ipv6'][ + -1] == b"]": a_config['server_ipv6'] = a_config['server_ipv6'][1:-1] a_config['server_port'] = int(port) a_config['password'] = password