This commit is contained in:
Max Lv
2016-09-28 14:36:36 +08:00
parent 528fea136d
commit 3b6eff6d9d
5 changed files with 19 additions and 14 deletions
@@ -178,18 +178,22 @@ class ShadowsocksNatService extends BaseService {
def startDnsDaemon() {
val reject = if (profile.ipv6) "224.0.0.0/3" else "224.0.0.0/3, ::/0"
val conf = profile.route match {
case Route.BYPASS_CHN | Route.BYPASS_LAN_CHN | Route.GFWLIST => {
ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,
"127.0.0.1", profile.localPort + 53, "1.2.4.8, 114.114.114.114", "", profile.localPort + 63, "")
"127.0.0.1", profile.localPort + 53, "1.2.4.8, 114.114.114.114",
reject, profile.localPort + 63, reject)
}
case Route.CHINALIST => {
ConfigUtils.PDNSD_DIRECT.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",
reject, profile.localPort + 63, reject)
}
case _ => {
ConfigUtils.PDNSD_LOCAL.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,
"127.0.0.1", profile.localPort + 53, profile.localPort + 63, "")
"127.0.0.1", profile.localPort + 53, profile.localPort + 63, reject)
}
}