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
c842f7fd
Commit
c842f7fd
authored
Oct 03, 2016
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bump version
parent
c2f02994
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
10 deletions
+14
-10
src/main/AndroidManifest.xml
src/main/AndroidManifest.xml
+2
-2
src/main/jni/pdnsd
src/main/jni/pdnsd
+1
-1
src/main/scala/com/github/shadowsocks/BaseService.scala
src/main/scala/com/github/shadowsocks/BaseService.scala
+1
-0
src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
.../scala/com/github/shadowsocks/ShadowsocksNatService.scala
+3
-3
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
.../scala/com/github/shadowsocks/ShadowsocksVpnService.scala
+5
-4
src/main/scala/com/github/shadowsocks/utils/Constants.scala
src/main/scala/com/github/shadowsocks/utils/Constants.scala
+2
-0
No files found.
src/main/AndroidManifest.xml
View file @
c842f7fd
<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=
"16
2
"
android:versionCode=
"16
3
"
android:versionName=
"3.2.
2
"
>
android:versionName=
"3.2.
3
"
>
<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"
/>
...
...
pdnsd
@
960c1c64
Subproject commit
eb5c47e5bd6b81ac048686b9826b8e0cda7aa9d4
Subproject commit
960c1c6469fee0eadc4de86e8e326d6dc787202a
src/main/scala/com/github/shadowsocks/BaseService.scala
View file @
c842f7fd
...
@@ -70,6 +70,7 @@ trait BaseService extends Service {
...
@@ -70,6 +70,7 @@ trait BaseService extends Service {
var
callbacksCount
:
Int
=
_
var
callbacksCount
:
Int
=
_
lazy
val
handler
=
new
Handler
(
getMainLooper
)
lazy
val
handler
=
new
Handler
(
getMainLooper
)
lazy
val
restartHanlder
=
new
Handler
(
getMainLooper
)
lazy
val
restartHanlder
=
new
Handler
(
getMainLooper
)
lazy
val
protectPath
=
getApplicationInfo
.
dataDir
+
"/protect_path"
private
val
closeReceiver
:
BroadcastReceiver
=
(
context
:
Context
,
intent
:
Intent
)
=>
{
private
val
closeReceiver
:
BroadcastReceiver
=
(
context
:
Context
,
intent
:
Intent
)
=>
{
Toast
.
makeText
(
context
,
R
.
string
.
stopping
,
Toast
.
LENGTH_SHORT
).
show
()
Toast
.
makeText
(
context
,
R
.
string
.
stopping
,
Toast
.
LENGTH_SHORT
).
show
()
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
View file @
c842f7fd
...
@@ -187,17 +187,17 @@ class ShadowsocksNatService extends BaseService {
...
@@ -187,17 +187,17 @@ class ShadowsocksNatService extends BaseService {
val
conf
=
profile
.
route
match
{
val
conf
=
profile
.
route
match
{
case
Route
.
BYPASS_CHN
|
Route
.
BYPASS_LAN_CHN
|
Route
.
GFWLIST
=>
{
case
Route
.
BYPASS_CHN
|
Route
.
BYPASS_LAN_CHN
|
Route
.
GFWLIST
=>
{
ConfigUtils
.
PDNSD_DIRECT
.
formatLocal
(
Locale
.
ENGLISH
,
getApplicationInfo
.
dataDir
,
ConfigUtils
.
PDNSD_DIRECT
.
formatLocal
(
Locale
.
ENGLISH
,
""
,
getApplicationInfo
.
dataDir
,
"127.0.0.1"
,
profile
.
localPort
+
53
,
"1.2.4.8, 114.114.114.114"
,
"127.0.0.1"
,
profile
.
localPort
+
53
,
"1.2.4.8, 114.114.114.114"
,
getBlackList
,
reject
,
profile
.
localPort
+
63
,
reject
)
getBlackList
,
reject
,
profile
.
localPort
+
63
,
reject
)
}
}
case
Route
.
CHINALIST
=>
{
case
Route
.
CHINALIST
=>
{
ConfigUtils
.
PDNSD_DIRECT
.
formatLocal
(
Locale
.
ENGLISH
,
getApplicationInfo
.
dataDir
,
ConfigUtils
.
PDNSD_DIRECT
.
formatLocal
(
Locale
.
ENGLISH
,
""
,
getApplicationInfo
.
dataDir
,
"127.0.0.1"
,
profile
.
localPort
+
53
,
"8.8.8.8, 208.67.222.222"
,
"127.0.0.1"
,
profile
.
localPort
+
53
,
"8.8.8.8, 208.67.222.222"
,
""
,
reject
,
profile
.
localPort
+
63
,
reject
)
""
,
reject
,
profile
.
localPort
+
63
,
reject
)
}
}
case
_
=>
{
case
_
=>
{
ConfigUtils
.
PDNSD_LOCAL
.
formatLocal
(
Locale
.
ENGLISH
,
getApplicationInfo
.
dataDir
,
ConfigUtils
.
PDNSD_LOCAL
.
formatLocal
(
Locale
.
ENGLISH
,
""
,
getApplicationInfo
.
dataDir
,
"127.0.0.1"
,
profile
.
localPort
+
53
,
profile
.
localPort
+
63
,
reject
)
"127.0.0.1"
,
profile
.
localPort
+
53
,
profile
.
localPort
+
63
,
reject
)
}
}
}
}
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
View file @
c842f7fd
...
@@ -193,7 +193,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
...
@@ -193,7 +193,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
val
cmd
=
ArrayBuffer
(
getApplicationInfo
.
dataDir
+
"/kcptun"
val
cmd
=
ArrayBuffer
(
getApplicationInfo
.
dataDir
+
"/kcptun"
,
"-r"
,
profile
.
host
+
":"
+
profile
.
kcpPort
,
"-r"
,
profile
.
host
+
":"
+
profile
.
kcpPort
,
"-l"
,
"127.0.0.1:"
+
(
profile
.
localPort
+
90
)
,
"-l"
,
"127.0.0.1:"
+
(
profile
.
localPort
+
90
)
,
"--path"
,
getApplicationInfo
.
dataDir
+
"/protect_path"
)
,
"--path"
,
protectPath
)
try
cmd
++=
Utils
.
translateCommandline
(
profile
.
kcpcli
)
catch
{
try
cmd
++=
Utils
.
translateCommandline
(
profile
.
kcpcli
)
catch
{
case
exc
:
Exception
=>
throw
KcpcliParseException
(
exc
)
case
exc
:
Exception
=>
throw
KcpcliParseException
(
exc
)
}
}
...
@@ -302,19 +302,20 @@ class ShadowsocksVpnService extends VpnService with BaseService {
...
@@ -302,19 +302,20 @@ class ShadowsocksVpnService extends VpnService with BaseService {
def
startDnsDaemon
()
{
def
startDnsDaemon
()
{
val
reject
=
if
(
profile
.
ipv6
)
"224.0.0.0/3"
else
"224.0.0.0/3, ::/0"
val
reject
=
if
(
profile
.
ipv6
)
"224.0.0.0/3"
else
"224.0.0.0/3, ::/0"
val
protect
=
"protect = \""
+
protectPath
+
"\";"
val
conf
=
profile
.
route
match
{
val
conf
=
profile
.
route
match
{
case
Route
.
BYPASS_CHN
|
Route
.
BYPASS_LAN_CHN
|
Route
.
GFWLIST
=>
{
case
Route
.
BYPASS_CHN
|
Route
.
BYPASS_LAN_CHN
|
Route
.
GFWLIST
=>
{
ConfigUtils
.
PDNSD_DIRECT
.
formatLocal
(
Locale
.
ENGLISH
,
getApplicationInfo
.
dataDir
,
ConfigUtils
.
PDNSD_DIRECT
.
formatLocal
(
Locale
.
ENGLISH
,
protect
,
getApplicationInfo
.
dataDir
,
"0.0.0.0"
,
profile
.
localPort
+
53
,
"114.114.114.114, 119.29.29.29, 1.2.4.8"
,
"0.0.0.0"
,
profile
.
localPort
+
53
,
"114.114.114.114, 119.29.29.29, 1.2.4.8"
,
getBlackList
,
reject
,
profile
.
localPort
+
63
,
reject
)
getBlackList
,
reject
,
profile
.
localPort
+
63
,
reject
)
}
}
case
Route
.
CHINALIST
=>
{
case
Route
.
CHINALIST
=>
{
ConfigUtils
.
PDNSD_DIRECT
.
formatLocal
(
Locale
.
ENGLISH
,
getApplicationInfo
.
dataDir
,
ConfigUtils
.
PDNSD_DIRECT
.
formatLocal
(
Locale
.
ENGLISH
,
protect
,
getApplicationInfo
.
dataDir
,
"0.0.0.0"
,
profile
.
localPort
+
53
,
"8.8.8.8, 8.8.4.4, 208.67.222.222"
,
"0.0.0.0"
,
profile
.
localPort
+
53
,
"8.8.8.8, 8.8.4.4, 208.67.222.222"
,
""
,
reject
,
profile
.
localPort
+
63
,
reject
)
""
,
reject
,
profile
.
localPort
+
63
,
reject
)
}
}
case
_
=>
{
case
_
=>
{
ConfigUtils
.
PDNSD_LOCAL
.
formatLocal
(
Locale
.
ENGLISH
,
getApplicationInfo
.
dataDir
,
ConfigUtils
.
PDNSD_LOCAL
.
formatLocal
(
Locale
.
ENGLISH
,
protect
,
getApplicationInfo
.
dataDir
,
"0.0.0.0"
,
profile
.
localPort
+
53
,
profile
.
localPort
+
63
,
reject
)
"0.0.0.0"
,
profile
.
localPort
+
53
,
profile
.
localPort
+
63
,
reject
)
}
}
}
}
...
...
src/main/scala/com/github/shadowsocks/utils/Constants.scala
View file @
c842f7fd
...
@@ -69,6 +69,7 @@ object ConfigUtils {
...
@@ -69,6 +69,7 @@ object ConfigUtils {
"""
"""
|global {
|global {
| perm_cache = 2048;
| perm_cache = 2048;
| %s
| cache_dir = "%s";
| cache_dir = "%s";
| server_ip = %s;
| server_ip = %s;
| server_port = %d;
| server_port = %d;
...
@@ -101,6 +102,7 @@ object ConfigUtils {
...
@@ -101,6 +102,7 @@ object ConfigUtils {
"""
"""
|global {
|global {
| perm_cache = 2048;
| perm_cache = 2048;
| %s
| cache_dir = "%s";
| cache_dir = "%s";
| server_ip = %s;
| server_ip = %s;
| server_port = %d;
| server_port = %d;
...
...
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