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
edda3179
Commit
edda3179
authored
Sep 18, 2016
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add China List, close #886
parent
1d799906
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
13 deletions
+22
-13
src/main/AndroidManifest.xml
src/main/AndroidManifest.xml
+2
-2
src/main/res/values-zh-rCN/strings.xml
src/main/res/values-zh-rCN/strings.xml
+2
-1
src/main/res/values-zh/strings.xml
src/main/res/values-zh/strings.xml
+1
-0
src/main/res/values/arrays.xml
src/main/res/values/arrays.xml
+1
-0
src/main/res/values/strings.xml
src/main/res/values/strings.xml
+1
-0
src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
.../scala/com/github/shadowsocks/ShadowsocksNatService.scala
+7
-5
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
.../scala/com/github/shadowsocks/ShadowsocksVpnService.scala
+7
-5
src/main/scala/com/github/shadowsocks/utils/Constants.scala
src/main/scala/com/github/shadowsocks/utils/Constants.scala
+1
-0
No files found.
src/main/AndroidManifest.xml
View file @
edda3179
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
package=
"com.github.shadowsocks"
xmlns:tools=
"http://schemas.android.com/tools"
package=
"com.github.shadowsocks"
android:versionCode=
"15
6
"
android:versionCode=
"15
7
"
android:versionName=
"3.1.
4
"
>
android:versionName=
"3.1.
5
"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
<uses-permission
android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
...
...
src/main/res/values-zh-rCN/strings.xml
View file @
edda3179
...
@@ -110,7 +110,8 @@
...
@@ -110,7 +110,8 @@
<item>
绕过局域网地址
</item>
<item>
绕过局域网地址
</item>
<item>
绕过中国大陆地址
</item>
<item>
绕过中国大陆地址
</item>
<item>
绕过局域网及中国大陆地址
</item>
<item>
绕过局域网及中国大陆地址
</item>
<item>
仅代理国内无法访问的地址
</item>
<item>
仅代理中国大陆无法访问的地址
</item>
<item>
仅代理中国大陆地址
</item>
</string-array>
</string-array>
<string
name=
"action_apply_all"
>
应用设置到所有配置文件
</string>
<string
name=
"action_apply_all"
>
应用设置到所有配置文件
</string>
...
...
src/main/res/values-zh/strings.xml
View file @
edda3179
...
@@ -113,6 +113,7 @@
...
@@ -113,6 +113,7 @@
<item>
略過中國大陸位址
</item>
<item>
略過中國大陸位址
</item>
<item>
略過區域網路及中國大陸位址
</item>
<item>
略過區域網路及中國大陸位址
</item>
<item>
僅代理大陸屏蔽位址
</item>
<item>
僅代理大陸屏蔽位址
</item>
<item>
僅代理大陸位址
</item>
</string-array>
</string-array>
<string
name=
"action_apply_all"
>
應用設置到所有配置文件
</string>
<string
name=
"action_apply_all"
>
應用設置到所有配置文件
</string>
...
...
src/main/res/values/arrays.xml
View file @
edda3179
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
<item>
bypass-china
</item>
<item>
bypass-china
</item>
<item>
bypass-lan-china
</item>
<item>
bypass-lan-china
</item>
<item>
gfwlist
</item>
<item>
gfwlist
</item>
<item>
china-list
</item>
</string-array>
</string-array>
<string-array
name=
"private_route"
>
<string-array
name=
"private_route"
>
...
...
src/main/res/values/strings.xml
View file @
edda3179
...
@@ -58,6 +58,7 @@
...
@@ -58,6 +58,7 @@
<item>
Bypass China
</item>
<item>
Bypass China
</item>
<item>
Bypass LAN
&
China
</item>
<item>
Bypass LAN
&
China
</item>
<item>
GFW List
</item>
<item>
GFW List
</item>
<item>
China List
</item>
</string-array>
</string-array>
<string
name=
"proxied_apps"
>
Per-App Proxy
</string>
<string
name=
"proxied_apps"
>
Per-App Proxy
</string>
<string
name=
"proxied_apps_summary"
>
Set proxy for selected apps, requires NAT mode under Android 4.x
</string>
<string
name=
"proxied_apps_summary"
>
Set proxy for selected apps, requires NAT mode under Android 4.x
</string>
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
View file @
edda3179
...
@@ -72,14 +72,16 @@ class ShadowsocksNatService extends BaseService {
...
@@ -72,14 +72,16 @@ class ShadowsocksNatService extends BaseService {
def
startShadowsocksDaemon
()
{
def
startShadowsocksDaemon
()
{
if
(
profile
.
route
!=
Route
.
ALL
&&
profile
.
route
!=
Route
.
GFWLIST
)
{
if
(
profile
.
route
!=
Route
.
ALL
&&
profile
.
route
!=
Route
.
GFWLIST
)
{
val
acl
:
Array
[
Array
[
String
]
]
=
profile
.
route
match
{
val
acl
:
Array
[
String
]
=
profile
.
route
match
{
case
Route
.
BYPASS_LAN
=>
Array
(
getResources
.
getStringArray
(
R
.
array
.
private_route
)
)
case
Route
.
BYPASS_LAN
=>
getResources
.
getStringArray
(
R
.
array
.
private_route
)
case
Route
.
BYPASS_CHN
=>
Array
(
getResources
.
getStringArray
(
R
.
array
.
chn_route
)
)
case
Route
.
BYPASS_CHN
=>
getResources
.
getStringArray
(
R
.
array
.
chn_route
)
case
Route
.
BYPASS_LAN_CHN
=>
case
Route
.
BYPASS_LAN_CHN
=>
Array
(
getResources
.
getStringArray
(
R
.
array
.
private_route
),
getResources
.
getStringArray
(
R
.
array
.
chn_route
))
getResources
.
getStringArray
(
R
.
array
.
private_route
)
++
getResources
.
getStringArray
(
R
.
array
.
chn_route
)
case
Route
.
CHINALIST
=>
Array
(
"[bypass_all]"
,
"[white_list]"
)
++
getResources
.
getStringArray
(
R
.
array
.
chn_route
)
}
}
Utils
.
printToFile
(
new
File
(
getApplicationInfo
.
dataDir
+
"/acl.list"
))(
p
=>
{
Utils
.
printToFile
(
new
File
(
getApplicationInfo
.
dataDir
+
"/acl.list"
))(
p
=>
{
acl
.
f
latten
.
f
oreach
(
p
.
println
)
acl
.
foreach
(
p
.
println
)
})
})
}
}
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
View file @
edda3179
...
@@ -227,14 +227,16 @@ class ShadowsocksVpnService extends VpnService with BaseService {
...
@@ -227,14 +227,16 @@ class ShadowsocksVpnService extends VpnService with BaseService {
def
startShadowsocksDaemon
()
{
def
startShadowsocksDaemon
()
{
if
(
profile
.
route
!=
Route
.
ALL
&&
profile
.
route
!=
Route
.
GFWLIST
)
{
if
(
profile
.
route
!=
Route
.
ALL
&&
profile
.
route
!=
Route
.
GFWLIST
)
{
val
acl
:
Array
[
Array
[
String
]
]
=
profile
.
route
match
{
val
acl
:
Array
[
String
]
=
profile
.
route
match
{
case
Route
.
BYPASS_LAN
=>
Array
(
getResources
.
getStringArray
(
R
.
array
.
private_route
)
)
case
Route
.
BYPASS_LAN
=>
getResources
.
getStringArray
(
R
.
array
.
private_route
)
case
Route
.
BYPASS_CHN
=>
Array
(
getResources
.
getStringArray
(
R
.
array
.
chn_route
)
)
case
Route
.
BYPASS_CHN
=>
getResources
.
getStringArray
(
R
.
array
.
chn_route
)
case
Route
.
BYPASS_LAN_CHN
=>
case
Route
.
BYPASS_LAN_CHN
=>
Array
(
getResources
.
getStringArray
(
R
.
array
.
private_route
),
getResources
.
getStringArray
(
R
.
array
.
chn_route
))
getResources
.
getStringArray
(
R
.
array
.
private_route
)
++
getResources
.
getStringArray
(
R
.
array
.
chn_route
)
case
Route
.
CHINALIST
=>
Array
(
"[bypass_all]"
,
"[white_list]"
)
++
getResources
.
getStringArray
(
R
.
array
.
chn_route
)
}
}
Utils
.
printToFile
(
new
File
(
getApplicationInfo
.
dataDir
+
"/acl.list"
))(
p
=>
{
Utils
.
printToFile
(
new
File
(
getApplicationInfo
.
dataDir
+
"/acl.list"
))(
p
=>
{
acl
.
f
latten
.
f
oreach
(
p
.
println
)
acl
.
foreach
(
p
.
println
)
})
})
}
}
...
...
src/main/scala/com/github/shadowsocks/utils/Constants.scala
View file @
edda3179
...
@@ -196,4 +196,5 @@ object Route {
...
@@ -196,4 +196,5 @@ object Route {
val
BYPASS_CHN
=
"bypass-china"
val
BYPASS_CHN
=
"bypass-china"
val
BYPASS_LAN_CHN
=
"bypass-lan-china"
val
BYPASS_LAN_CHN
=
"bypass-lan-china"
val
GFWLIST
=
"gfwlist"
val
GFWLIST
=
"gfwlist"
val
CHINALIST
=
"china-list"
}
}
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