Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
a7d72938
Commit
a7d72938
authored
Nov 09, 2015
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refine the UI
parent
1b1f4233
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
29 deletions
+43
-29
src/main/AndroidManifest.xml
src/main/AndroidManifest.xml
+2
-2
src/main/jni/iptables
src/main/jni/iptables
+1
-1
src/main/jni/shadowsocks-libev
src/main/jni/shadowsocks-libev
+1
-1
src/main/res/values-zh/strings.xml
src/main/res/values-zh/strings.xml
+2
-0
src/main/res/values/strings.xml
src/main/res/values/strings.xml
+3
-1
src/main/res/xml/pref_all.xml
src/main/res/xml/pref_all.xml
+23
-21
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
+11
-3
No files found.
src/main/AndroidManifest.xml
View file @
a7d72938
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.github.shadowsocks"
android:versionCode=
"12
0
"
android:versionName=
"2.8.
3
"
>
android:versionCode=
"12
1
"
android:versionName=
"2.8.
4
"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
...
...
iptables
@
67560ab1
Subproject commit
177a84bc6b77c53e1ccc22b97170928d54c1ce92
Subproject commit
67560ab12c1ff3413f971f9f1ba59ff28cb052ce
shadowsocks-libev
@
772de6fd
Subproject commit
890e880dc61ad4f2e9a340a78c797c4aabee6429
Subproject commit
772de6fdeb15fd7d2b7853b4d3e0372713f16b81
src/main/res/values-zh/strings.xml
View file @
a7d72938
...
...
@@ -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>
...
...
src/main/res/values/strings.xml
View file @
a7d72938
...
...
@@ -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>
...
...
src/main/res/xml/pref_all.xml
View file @
a7d72938
...
...
@@ -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"
/>
</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=
"isAuth"
android:defaultValue=
"false"
android:summary=
"@string/onetime_auth_summary"
android:title=
"@string/onetime_auth"
/>
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>
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
View file @
a7d72938
...
...
@@ -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
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment