Skip to content

Commit 62b22ad

Browse files
madeyeglzjin
authored andcommitted
Refine DNS resolution
1 parent 13ae822 commit 62b22ad

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

src/main/jni/pdnsd

src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class ShadowsocksNatService extends BaseService {
166166
val conf = profile.route match {
167167
case Route.BYPASS_CHN | Route.BYPASS_LAN_CHN | Route.GFWLIST => {
168168
ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,
169-
"127.0.0.1", profile.localPort + 53, "1.2.4.8, 114.114.114.114, 208.67.222.222", "", profile.localPort + 63, "")
169+
"127.0.0.1", profile.localPort + 53, "1.2.4.8, 114.114.114.114", "", profile.localPort + 63, "")
170170
}
171171
case Route.CHINALIST => {
172172
ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,

src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ class ShadowsocksVpnService extends VpnService with BaseService {
259259

260260
val cmd = ArrayBuffer[String](getApplicationInfo.dataDir + "/ss-tunnel"
261261
, "-V"
262-
, "-u"
263262
, "-t", "10"
264263
, "-b", "127.0.0.1"
265264
, "-L", profile.dns
@@ -277,7 +276,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
277276
val conf = profile.route match {
278277
case Route.BYPASS_CHN | Route.BYPASS_LAN_CHN | Route.GFWLIST => {
279278
ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,
280-
"0.0.0.0", profile.localPort + 53, "1.2.4.8, 114.114.114.114, 208.67.222.222", ipv6, profile.localPort + 63, ipv6)
279+
"0.0.0.0", profile.localPort + 53, "1.2.4.8, 114.114.114.114", ipv6, profile.localPort + 63, ipv6)
281280
}
282281
case Route.CHINALIST => {
283282
ConfigUtils.PDNSD_DIRECT.formatLocal(Locale.ENGLISH, getApplicationInfo.dataDir,

src/main/scala/com/github/shadowsocks/utils/Constants.scala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ object ConfigUtils {
7272
| server_ip = %s;
7373
| server_port = %d;
7474
| query_method = tcp_only;
75-
| run_ipv4 = on;
7675
| min_ttl = 15m;
7776
| max_ttl = 1w;
7877
| timeout = 10;
@@ -86,7 +85,6 @@ object ConfigUtils {
8685
| %s
8786
| reject_policy = negate;
8887
| reject_recursively = on;
89-
| timeout = 5;
9088
|}
9189
|
9290
|rr {
@@ -105,28 +103,32 @@ object ConfigUtils {
105103
| cache_dir = "%s";
106104
| server_ip = %s;
107105
| server_port = %d;
108-
| query_method = tcp_only;
109-
| run_ipv4 = on;
106+
| query_method = udp_only;
110107
| min_ttl = 15m;
111108
| max_ttl = 1w;
112109
| timeout = 10;
113110
| daemon = off;
111+
| par_queries = 4;
114112
|}
115113
|
116114
|server {
117115
| label = "remote-servers";
118116
| ip = %s;
119117
| timeout = 3;
120-
| uptest = none;
121-
| preset = on;
118+
| query_method = udp_only;
122119
| %s
120+
| reject_policy = negate;
121+
| reject_recursively = on;
123122
|}
124123
|
125124
|server {
126125
| label = "local-server";
127126
| ip = 127.0.0.1;
127+
| query_method = tcp_only;
128128
| port = %d;
129129
| %s
130+
| reject_policy = negate;
131+
| reject_recursively = on;
130132
|}
131133
|
132134
|rr {

0 commit comments

Comments
 (0)