diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index e03bc12c..c5ac5989 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionCode="121" + android:versionName="2.8.4"> diff --git a/src/main/jni/iptables b/src/main/jni/iptables index 177a84bc..67560ab1 160000 --- a/src/main/jni/iptables +++ b/src/main/jni/iptables @@ -1 +1 @@ -Subproject commit 177a84bc6b77c53e1ccc22b97170928d54c1ce92 +Subproject commit 67560ab12c1ff3413f971f9f1ba59ff28cb052ce diff --git a/src/main/jni/shadowsocks-libev b/src/main/jni/shadowsocks-libev index 890e880d..772de6fd 160000 --- a/src/main/jni/shadowsocks-libev +++ b/src/main/jni/shadowsocks-libev @@ -1 +1 @@ -Subproject commit 890e880dc61ad4f2e9a340a78c797c4aabee6429 +Subproject commit 772de6fdeb15fd7d2b7853b4d3e0372713f16b81 diff --git a/src/main/res/values-zh/strings.xml b/src/main/res/values-zh/strings.xml index 54343ba6..795ba45f 100755 --- a/src/main/res/values-zh/strings.xml +++ b/src/main/res/values-zh/strings.xml @@ -52,9 +52,11 @@ 设置选项 删除此配置文件「%s」? 重置 + 重置所有后台服务 关于 影梭(shadowsocks)%s 刷新 DNS 缓存 + 需要 ROOT 权限 刷新中…… 二维码 添加配置文件 diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 73ccaec1..1441ee7f 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -78,10 +78,12 @@ Profiles Settings Reset + Reset all the background services About Shadowsocks %s QR Code - Flush DNS Cache + Flush DNS cache + Require ROOT permission Flushing Add Profile Export to Clipboard diff --git a/src/main/res/xml/pref_all.xml b/src/main/res/xml/pref_all.xml index 29e54dd2..aac00ed7 100644 --- a/src/main/res/xml/pref_all.xml +++ b/src/main/res/xml/pref_all.xml @@ -2,26 +2,12 @@ - - - - - - - - - - - - + + + + @@ -92,12 +83,23 @@ android:defaultValue="false" android:summary="@string/udp_dns_summary" android:title="@string/udp_dns"/> - + + + + + + + + + diff --git a/src/main/scala/com/github/shadowsocks/Shadowsocks.scala b/src/main/scala/com/github/shadowsocks/Shadowsocks.scala index 6c290b9d..7c8b81f5 100644 --- a/src/main/scala/com/github/shadowsocks/Shadowsocks.scala +++ b/src/main/scala/com/github/shadowsocks/Shadowsocks.scala @@ -271,7 +271,13 @@ class Shadowsocks cmd.append("chmod 666 %s%s-nat.pid".formatLocal(Locale.ENGLISH, Path.BASE, task)) cmd.append("chmod 666 %s%s-vpn.pid".formatLocal(Locale.ENGLISH, Path.BASE, task)) } - Console.runRootCommand(cmd.toArray) + + if (!ShadowsocksApplication.isVpnEnabled) { + Console.runRootCommand(cmd.toArray) + } else { + Console.runCommand(cmd.toArray) + } + cmd.clear() for (task <- Array("ss-local", "ss-tunnel", "pdnsd", "redsocks", "tun2socks")) { @@ -291,8 +297,10 @@ class Shadowsocks cmd.append("rm -f %s%s-vpn.conf".formatLocal(Locale.ENGLISH, Path.BASE, task)) } Console.runCommand(cmd.toArray) - Console.runRootCommand(cmd.toArray) - Console.runRootCommand(Utils.getIptables + " -t nat -F OUTPUT") + if (!ShadowsocksApplication.isVpnEnabled) { + Console.runRootCommand(cmd.toArray) + Console.runRootCommand(Utils.getIptables + " -t nat -F OUTPUT") + } } def isTextEmpty(s: String, msg: String): Boolean = {