Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
792870b289 | ||
|
|
3b6eff6d9d |
@@ -1,7 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools" package="com.github.shadowsocks"
|
||||
android:versionCode="160"
|
||||
android:versionName="3.2.0">
|
||||
android:versionCode="161"
|
||||
android:versionName="3.2.1">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
|
||||
@@ -8213,6 +8213,7 @@
|
||||
.*\.eu
|
||||
.*\.ru
|
||||
.*\.au
|
||||
.*\.google\.cn
|
||||
.*\.google\.com
|
||||
.*\.google\.ad
|
||||
.*\.google\.ae
|
||||
|
||||
@@ -8227,6 +8227,7 @@
|
||||
.*\.eu
|
||||
.*\.ru
|
||||
.*\.au
|
||||
.*\.google\.cn
|
||||
.*\.google\.com
|
||||
.*\.google\.ad
|
||||
.*\.google\.ae
|
||||
|
||||
@@ -3795,6 +3795,7 @@
|
||||
.*\.eu
|
||||
.*\.ru
|
||||
.*\.au
|
||||
.*\.google\.cn
|
||||
.*\.google\.com
|
||||
.*\.google\.ad
|
||||
.*\.google\.ae
|
||||
|
||||
@@ -116,6 +116,5 @@
|
||||
<item>196.0.0.0/6</item>
|
||||
<item>200.0.0.0/5</item>
|
||||
<item>208.0.0.0/4</item>
|
||||
<item>224.0.0.0/3</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -296,19 +296,21 @@ class ShadowsocksVpnService extends VpnService with BaseService {
|
||||
}
|
||||
|
||||
def startDnsDaemon() {
|
||||
val ipv6 = if (profile.ipv6) "" else "reject = ::/0;"
|
||||
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,
|
||||
"0.0.0.0", profile.localPort + 53, "1.2.4.8, 114.114.114.114", ipv6, profile.localPort + 63, ipv6)
|
||||
"0.0.0.0", 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,
|
||||
"0.0.0.0", profile.localPort + 53, "8.8.8.8, 208.67.222.222", ipv6, profile.localPort + 63, ipv6)
|
||||
"0.0.0.0", 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,
|
||||
"0.0.0.0", profile.localPort + 53, profile.localPort + 63, ipv6)
|
||||
"0.0.0.0", profile.localPort + 53, profile.localPort + 63, reject)
|
||||
}
|
||||
}
|
||||
Utils.printToFile(new File(getApplicationInfo.dataDir + "/pdnsd-vpn.conf"))(p => {
|
||||
|
||||
@@ -83,7 +83,7 @@ object ConfigUtils {
|
||||
| label = "local";
|
||||
| ip = 127.0.0.1;
|
||||
| port = %d;
|
||||
| %s
|
||||
| reject = %s;
|
||||
| reject_policy = negate;
|
||||
| reject_recursively = on;
|
||||
|}
|
||||
@@ -117,8 +117,8 @@ object ConfigUtils {
|
||||
| ip = %s;
|
||||
| timeout = 3;
|
||||
| query_method = udp_only;
|
||||
| %s
|
||||
| reject_policy = negate;
|
||||
| reject = %s;
|
||||
| reject_policy = fail;
|
||||
| reject_recursively = on;
|
||||
|}
|
||||
|
|
||||
@@ -127,7 +127,7 @@ object ConfigUtils {
|
||||
| ip = 127.0.0.1;
|
||||
| query_method = tcp_only;
|
||||
| port = %d;
|
||||
| %s
|
||||
| reject = %s;
|
||||
| reject_policy = negate;
|
||||
| reject_recursively = on;
|
||||
|}
|
||||
|
||||
Reference in New Issue
Block a user