From b0d0be1f9da4333cc5052b65dc361ca87b612d13 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Fri, 30 Mar 2018 01:35:32 -0700 Subject: [PATCH] Avoid hostname matching in overture --- core/src/main/jni/shadowsocks-libev | 2 +- .../overture/src/github.com/shadowsocks/overture | 2 +- mobile/src/main/assets/overture/china_ip_list.txt | 14 ++++++++++++++ .../com/github/shadowsocks/bg/LocalDnsService.kt | 7 +++---- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/core/src/main/jni/shadowsocks-libev b/core/src/main/jni/shadowsocks-libev index 1a219895..66ed595c 160000 --- a/core/src/main/jni/shadowsocks-libev +++ b/core/src/main/jni/shadowsocks-libev @@ -1 +1 @@ -Subproject commit 1a21989566e778139c489d5f8972979bda9b16c1 +Subproject commit 66ed595c52f47e0911b035f1c875e6dd0c30765a diff --git a/core/src/overture/src/github.com/shadowsocks/overture b/core/src/overture/src/github.com/shadowsocks/overture index 58ab31a9..afe34f99 160000 --- a/core/src/overture/src/github.com/shadowsocks/overture +++ b/core/src/overture/src/github.com/shadowsocks/overture @@ -1 +1 @@ -Subproject commit 58ab31a9fdfcc7f62f00c0b093ff6a37efcc3ff2 +Subproject commit afe34f99d4914ab35f6e423c042ed072f5697e05 diff --git a/mobile/src/main/assets/overture/china_ip_list.txt b/mobile/src/main/assets/overture/china_ip_list.txt index 1d612821..71d51b5c 100644 --- a/mobile/src/main/assets/overture/china_ip_list.txt +++ b/mobile/src/main/assets/overture/china_ip_list.txt @@ -1,3 +1,17 @@ +0.0.0.0/8 +10.0.0.0/8 +100.64.0.0/10 +127.0.0.0/8 +169.254.0.0/16 +172.16.0.0/12 +192.0.0.0/29 +192.0.2.0/24 +192.88.99.0/24 +192.168.0.0/16 +198.18.0.0/15 +198.51.100.0/24 +203.0.113.0/24 +224.0.0.0/3 1.0.1.0/24 1.0.2.0/23 1.0.8.0/21 diff --git a/mobile/src/main/java/com/github/shadowsocks/bg/LocalDnsService.kt b/mobile/src/main/java/com/github/shadowsocks/bg/LocalDnsService.kt index ed5925b2..9e42ea99 100644 --- a/mobile/src/main/java/com/github/shadowsocks/bg/LocalDnsService.kt +++ b/mobile/src/main/java/com/github/shadowsocks/bg/LocalDnsService.kt @@ -75,9 +75,9 @@ object LocalDnsService { .mapIndexed { i, dns -> makeDns("UserDef-" + i, dns.trim() + ":53", 9) }) val localDns = JSONArray(arrayOf( - makeDns("Primary-1", "119.29.29.29:53", 3, false), - makeDns("Primary-2", "114.114.114.114:53", 3, false), - makeDns("Primary-3", "208.67.222.222:443", 3, false) + makeDns("Primary-1", "208.67.222.222:443", 3, false), + makeDns("Primary-2", "119.29.29.29:53", 3, false), + makeDns("Primary-3", "114.114.114.114:53", 3, false) )) when (profile.route) { @@ -85,7 +85,6 @@ object LocalDnsService { .put("PrimaryDNS", localDns) .put("AlternativeDNS", remoteDns) .put("IPNetworkFile", "china_ip_list.txt") - .put("DomainFile", data.aclFile!!.absolutePath) Acl.CHINALIST -> config .put("PrimaryDNS", localDns) .put("AlternativeDNS", remoteDns)