Fully disable IPv6 resolving in IPv4 mode, #890
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user