From c0d1d666a49f235cdd3d00b342358145216cac30 Mon Sep 17 00:00:00 2001 From: BreakWa11 Date: Thu, 29 Oct 2015 11:00:01 +0800 Subject: [PATCH] add ipv6 config --- config.json | 1 + shadowsocks/local.py | 3 +++ shadowsocks/server.py | 3 +++ 3 files changed, 7 insertions(+) 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)