refine the UI
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.github.shadowsocks"
|
||||
android:versionCode="120"
|
||||
android:versionName="2.8.3">
|
||||
android:versionCode="121"
|
||||
android:versionName="2.8.4">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
|
||||
+1
-1
Submodule src/main/jni/iptables updated: 177a84bc6b...67560ab12c
Submodule src/main/jni/shadowsocks-libev updated: 890e880dc6...772de6fdeb
@@ -52,9 +52,11 @@
|
||||
<string name="settings">设置选项</string>
|
||||
<string name="remove_profile">删除此配置文件「%s」?</string>
|
||||
<string name="recovery">重置</string>
|
||||
<string name="recovery_summary">重置所有后台服务</string>
|
||||
<string name="about">关于</string>
|
||||
<string name="about_title">影梭(shadowsocks)%s</string>
|
||||
<string name="flush_dnscache">刷新 DNS 缓存</string>
|
||||
<string name="flush_dnscache_summary">需要 ROOT 权限</string>
|
||||
<string name="flushing">刷新中……</string>
|
||||
<string name="qrcode">二维码</string>
|
||||
<string name="add_profile">添加配置文件</string>
|
||||
|
||||
@@ -78,10 +78,12 @@
|
||||
<string name="profiles">Profiles</string>
|
||||
<string name="settings">Settings</string>
|
||||
<string name="recovery">Reset</string>
|
||||
<string name="recovery_summary">Reset all the background services</string>
|
||||
<string name="about">About</string>
|
||||
<string name="about_title">Shadowsocks %s</string>
|
||||
<string name="qrcode">QR Code</string>
|
||||
<string name="flush_dnscache">Flush DNS Cache</string>
|
||||
<string name="flush_dnscache">Flush DNS cache</string>
|
||||
<string name="flush_dnscache_summary">Require ROOT permission</string>
|
||||
<string name="flushing">Flushing</string>
|
||||
<string name="add_profile">Add Profile</string>
|
||||
<string name="action_export">Export to Clipboard</string>
|
||||
|
||||
@@ -2,26 +2,12 @@
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res/com.github.shadowsocks">
|
||||
|
||||
<PreferenceCategory android:title="@string/global_cat">
|
||||
|
||||
<Preference android:summary="@string/profile_summary" android:title="@string/profile">
|
||||
<intent android:action="com.github.shadowsocks.ProfileManagerActivity"/>
|
||||
</Preference>
|
||||
<com.github.shadowsocks.preferences.NatSwitchPreference android:key="isNAT"
|
||||
android:title="@string/nat"
|
||||
android:summary="@string/nat_summary"/>
|
||||
<SwitchPreference
|
||||
android:key="isAutoConnect"
|
||||
android:summary="@string/auto_connect_summary"
|
||||
android:title="@string/auto_connect"/>
|
||||
<Preference android:key="recovery" android:title="@string/recovery"/>
|
||||
<Preference android:key="flush_dnscache" android:title="@string/flush_dnscache"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/proxy_cat">
|
||||
|
||||
<Preference android:summary="@string/profile_summary" android:title="@string/profiles">
|
||||
<intent android:action="com.github.shadowsocks.ProfileManagerActivity"/>
|
||||
</Preference>
|
||||
<com.github.shadowsocks.preferences.SummaryEditTextPreference
|
||||
android:defaultValue="Default"
|
||||
android:key="profileName"
|
||||
@@ -56,6 +42,11 @@
|
||||
app:entryValues="@array/enc_method_value"
|
||||
app:summary="%s"
|
||||
android:title="@string/enc_method"/>
|
||||
<SwitchPreference
|
||||
android:key="isAuth"
|
||||
android:defaultValue="false"
|
||||
android:summary="@string/onetime_auth_summary"
|
||||
android:title="@string/onetime_auth"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
@@ -92,12 +83,23 @@
|
||||
android:defaultValue="false"
|
||||
android:summary="@string/udp_dns_summary"
|
||||
android:title="@string/udp_dns"/>
|
||||
<SwitchPreference
|
||||
android:key="isAuth"
|
||||
android:defaultValue="false"
|
||||
android:summary="@string/onetime_auth_summary"
|
||||
android:title="@string/onetime_auth"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/global_cat">
|
||||
<com.github.shadowsocks.preferences.NatSwitchPreference android:key="isNAT"
|
||||
android:title="@string/nat"
|
||||
android:summary="@string/nat_summary"/>
|
||||
<SwitchPreference
|
||||
android:key="isAutoConnect"
|
||||
android:summary="@string/auto_connect_summary"
|
||||
android:title="@string/auto_connect"/>
|
||||
<Preference android:key="recovery" android:title="@string/recovery"
|
||||
android:summary="@string/recovery_summary"/>
|
||||
<Preference android:key="flush_dnscache" android:title="@string/flush_dnscache"
|
||||
android:summary="@string/flush_dnscache_summary"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user