Commit 8c450884 authored by Max Lv's avatar Max Lv

Refine DNS resolution

parent 79acf140
Subproject commit 698275907b0c038b4eb40acbc067c8bf143e548f Subproject commit eb5c47e5bd6b81ac048686b9826b8e0cda7aa9d4
...@@ -181,7 +181,7 @@ class ShadowsocksNatService extends BaseService { ...@@ -181,7 +181,7 @@ class ShadowsocksNatService extends BaseService {
val conf = profile.route match { val conf = profile.route match {
case Route.BYPASS_CHN | Route.BYPASS_LAN_CHN | Route.GFWLIST => { case Route.BYPASS_CHN | Route.BYPASS_LAN_CHN | Route.GFWLIST => {
ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir, ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,
"127.0.0.1", profile.localPort + 53, "1.2.4.8, 114.114.114.114, 208.67.222.222", "", profile.localPort + 63, "") "127.0.0.1", profile.localPort + 53, "1.2.4.8, 114.114.114.114", "", profile.localPort + 63, "")
} }
case Route.CHINALIST => { case Route.CHINALIST => {
ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir, ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,
......
...@@ -282,7 +282,6 @@ class ShadowsocksVpnService extends VpnService with BaseService { ...@@ -282,7 +282,6 @@ class ShadowsocksVpnService extends VpnService with BaseService {
}) })
val cmd = ArrayBuffer[String](getApplicationInfo.dataDir + "/ss-tunnel" val cmd = ArrayBuffer[String](getApplicationInfo.dataDir + "/ss-tunnel"
, "-V" , "-V"
, "-u"
, "-t", "10" , "-t", "10"
, "-b", "127.0.0.1" , "-b", "127.0.0.1"
, "-L", "8.8.8.8:53" , "-L", "8.8.8.8:53"
...@@ -301,7 +300,7 @@ class ShadowsocksVpnService extends VpnService with BaseService { ...@@ -301,7 +300,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
val conf = profile.route match { val conf = profile.route match {
case Route.BYPASS_CHN | Route.BYPASS_LAN_CHN | Route.GFWLIST => { case Route.BYPASS_CHN | Route.BYPASS_LAN_CHN | Route.GFWLIST => {
ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir, ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,
"0.0.0.0", profile.localPort + 53, "1.2.4.8, 114.114.114.114, 208.67.222.222", ipv6, profile.localPort + 63, ipv6) "0.0.0.0", profile.localPort + 53, "1.2.4.8, 114.114.114.114", ipv6, profile.localPort + 63, ipv6)
} }
case Route.CHINALIST => { case Route.CHINALIST => {
ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir, ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,
......
...@@ -73,7 +73,6 @@ object ConfigUtils { ...@@ -73,7 +73,6 @@ object ConfigUtils {
| server_ip = %s; | server_ip = %s;
| server_port = %d; | server_port = %d;
| query_method = tcp_only; | query_method = tcp_only;
| run_ipv4 = on;
| min_ttl = 15m; | min_ttl = 15m;
| max_ttl = 1w; | max_ttl = 1w;
| timeout = 10; | timeout = 10;
...@@ -87,7 +86,6 @@ object ConfigUtils { ...@@ -87,7 +86,6 @@ object ConfigUtils {
| %s | %s
| reject_policy = negate; | reject_policy = negate;
| reject_recursively = on; | reject_recursively = on;
| timeout = 5;
|} |}
| |
|rr { |rr {
...@@ -106,28 +104,32 @@ object ConfigUtils { ...@@ -106,28 +104,32 @@ object ConfigUtils {
| cache_dir = "%s"; | cache_dir = "%s";
| server_ip = %s; | server_ip = %s;
| server_port = %d; | server_port = %d;
| query_method = tcp_only; | query_method = udp_only;
| run_ipv4 = on;
| min_ttl = 15m; | min_ttl = 15m;
| max_ttl = 1w; | max_ttl = 1w;
| timeout = 10; | timeout = 10;
| daemon = off; | daemon = off;
| par_queries = 4;
|} |}
| |
|server { |server {
| label = "remote-servers"; | label = "remote-servers";
| ip = %s; | ip = %s;
| timeout = 3; | timeout = 3;
| uptest = none; | query_method = udp_only;
| preset = on;
| %s | %s
| reject_policy = negate;
| reject_recursively = on;
|} |}
| |
|server { |server {
| label = "local-server"; | label = "local-server";
| ip = 127.0.0.1; | ip = 127.0.0.1;
| query_method = tcp_only;
| port = %d; | port = %d;
| %s | %s
| reject_policy = negate;
| reject_recursively = on;
|} |}
| |
|rr { |rr {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment