diff --git a/config.json b/config.json index d9a4c4b..7ca77c3 100644 --- a/config.json +++ b/config.json @@ -9,6 +9,7 @@ "method": "aes-256-cfb", "obfs": "http_simple_compatible", "obfs_param": "", + "ipv6": false, "fast_open": false, "workers": 1 } diff --git a/shadowsocks/local.py b/shadowsocks/local.py index c6df20c..819e442 100755 --- a/shadowsocks/local.py +++ b/shadowsocks/local.py @@ -43,6 +43,9 @@ def main(): config = shell.get_config(True) + if not config.get('ipv6', False): + asyncdns.IPV6_CONNECTION_SUPPORT = False + daemon.daemon_exec(config) try: diff --git a/shadowsocks/server.py b/shadowsocks/server.py index 68d187f..40615d3 100755 --- a/shadowsocks/server.py +++ b/shadowsocks/server.py @@ -54,6 +54,9 @@ def main(): else: config['port_password'][str(server_port)] = config['password'] + if not config.get('ipv6', False): + asyncdns.IPV6_CONNECTION_SUPPORT = False + if config.get('manager_address', 0): logging.info('entering manager mode') manager.run(config)