diff --git a/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala b/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala index 57708ba5..fba0300f 100644 --- a/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala +++ b/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala @@ -192,15 +192,15 @@ class ShadowsocksNatService extends BaseService { val conf = profile.route match { case Route.BYPASS_CHN | Route.BYPASS_LAN_CHN => { ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir, - "127.0.0.1", profile.localPort + 53, getBlackList, profile.localPort + 63, "") + "127.0.0.1", profile.localPort + 53, getBlackList, "", profile.localPort + 63, "") } case Route.GFWLIST => { ConfigUtils.PDNSD_UDP.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir, - "127.0.0.1", profile.localPort + 53, "1.2.4.8, 208.67.222.222", profile.localPort + 63, "") + "127.0.0.1", profile.localPort + 53, "1.2.4.8, 208.67.222.222", "", profile.localPort + 63, "") } case Route.CHINALIST => { ConfigUtils.PDNSD_UDP.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir, - "127.0.0.1", profile.localPort + 53, "8.8.8.8, 208.67.222.222", profile.localPort + 63, "") + "127.0.0.1", profile.localPort + 53, "8.8.8.8, 208.67.222.222", "", profile.localPort + 63, "") } case _ => { ConfigUtils.PDNSD_LOCAL.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir, diff --git a/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala b/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala index 985e38f4..37bdc40c 100644 --- a/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala +++ b/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala @@ -311,15 +311,15 @@ class ShadowsocksVpnService extends VpnService with BaseService { val conf = profile.route match { case Route.BYPASS_CHN | Route.BYPASS_LAN_CHN => { ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir, - "0.0.0.0", profile.localPort + 53, getBlackList, profile.localPort + 63, ipv6) + "0.0.0.0", profile.localPort + 53, getBlackList, ipv6, profile.localPort + 63, ipv6) } case Route.GFWLIST => { ConfigUtils.PDNSD_UDP.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir, - "0.0.0.0", profile.localPort + 53, "1.2.4.8, 208.67.222.222", profile.localPort + 63, "") + "0.0.0.0", profile.localPort + 53, "1.2.4.8, 208.67.222.222", ipv6, profile.localPort + 63, ipv6) } case Route.CHINALIST => { ConfigUtils.PDNSD_UDP.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir, - "0.0.0.0", profile.localPort + 53, "8.8.8.8, 208.67.222.222", profile.localPort + 63, ipv6) + "0.0.0.0", profile.localPort + 53, "8.8.8.8, 208.67.222.222", ipv6, profile.localPort + 63, ipv6) } case _ => { ConfigUtils.PDNSD_LOCAL.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir, diff --git a/src/main/scala/com/github/shadowsocks/utils/Constants.scala b/src/main/scala/com/github/shadowsocks/utils/Constants.scala index f142340d..27768e7a 100644 --- a/src/main/scala/com/github/shadowsocks/utils/Constants.scala +++ b/src/main/scala/com/github/shadowsocks/utils/Constants.scala @@ -122,6 +122,9 @@ object ConfigUtils { | policy = included; | uptest = none; | preset = on; + | %s + | reject_policy = negate; + | reject_recursively = on; |} | |server { @@ -163,6 +166,9 @@ object ConfigUtils { | timeout = 5; | uptest = none; | preset = on; + | %s + | reject_policy = negate; + | reject_recursively = on; |} | |server {