bypass system dns addr

This commit is contained in:
Max Lv
2014-03-07 13:47:44 +08:00
parent 056bd56d90
commit 1c4c54e962
5 changed files with 14 additions and 4 deletions
@@ -118,7 +118,7 @@ class ShadowsocksNatService extends Service with BaseService {
Path.BASE + "ss-local.pid")
.format(config.proxy, config.remotePort, 8153, config.sitekey, config.encMethod)
} else {
val conf = ConfigUtils.PDNSD.format("127.0.0.1", getString(R.string.exclude));
val conf = ConfigUtils.PDNSD.format("127.0.0.1", getString(R.string.exclude), System.getDNS1);
ConfigUtils.printToFile(new File(Path.BASE + "pdnsd.conf"))(p => {
p.println(conf)
})
@@ -91,7 +91,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
Path.BASE + "ss-tunnel.pid")
.format(config.proxy, config.remotePort, 8153, config.sitekey, config.encMethod)
} else {
val conf = ConfigUtils.PDNSD.format("0.0.0.0", getString(R.string.exclude))
val conf = ConfigUtils.PDNSD.format("0.0.0.0", getString(R.string.exclude), System.getDNS1)
ConfigUtils.printToFile(new File(Path.BASE + "pdnsd.conf"))(p => {
p.println(conf)
})
@@ -86,7 +86,7 @@ object ConfigUtils {
|
|server {
| label = "china-servers";
| ip = 114.114.114.114, 114.114.115.115;
| ip = %s, 114.114.114.114, 114.114.115.115;
| timeout = 5;
|}
|