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
8feb587e
Commit
8feb587e
authored
Oct 07, 2016
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #923
parent
89f073cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
.../scala/com/github/shadowsocks/ShadowsocksNatService.scala
+7
-1
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
.../scala/com/github/shadowsocks/ShadowsocksVpnService.scala
+7
-1
No files found.
src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
View file @
8feb587e
...
@@ -112,8 +112,14 @@ class ShadowsocksNatService extends BaseService {
...
@@ -112,8 +112,14 @@ class ShadowsocksNatService extends BaseService {
def
startKcptunDaemon
()
{
def
startKcptunDaemon
()
{
if
(
profile
.
kcpcli
==
null
)
profile
.
kcpcli
=
""
if
(
profile
.
kcpcli
==
null
)
profile
.
kcpcli
=
""
val
host
=
if
(
profile
.
host
.
contains
(
":"
))
{
"["
+
profile
.
host
+
"]"
}
else
{
profile
.
host
}
val
cmd
=
ArrayBuffer
[
String
](
getApplicationInfo
.
dataDir
+
"/kcptun"
val
cmd
=
ArrayBuffer
[
String
](
getApplicationInfo
.
dataDir
+
"/kcptun"
,
"-r"
,
profile
.
host
+
":"
+
profile
.
kcpPort
,
"-r"
,
host
+
":"
+
profile
.
kcpPort
,
"-l"
,
"127.0.0.1:"
+
(
profile
.
localPort
+
90
))
,
"-l"
,
"127.0.0.1:"
+
(
profile
.
localPort
+
90
))
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
)
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
View file @
8feb587e
...
@@ -190,8 +190,14 @@ class ShadowsocksVpnService extends VpnService with BaseService {
...
@@ -190,8 +190,14 @@ class ShadowsocksVpnService extends VpnService with BaseService {
def
startKcptunDaemon
()
{
def
startKcptunDaemon
()
{
if
(
profile
.
kcpcli
==
null
)
profile
.
kcpcli
=
""
if
(
profile
.
kcpcli
==
null
)
profile
.
kcpcli
=
""
val
host
=
if
(
profile
.
host
.
contains
(
":"
))
{
"["
+
profile
.
host
+
"]"
}
else
{
profile
.
host
}
val
cmd
=
ArrayBuffer
(
getApplicationInfo
.
dataDir
+
"/kcptun"
val
cmd
=
ArrayBuffer
(
getApplicationInfo
.
dataDir
+
"/kcptun"
,
"-r"
,
profile
.
host
+
":"
+
profile
.
kcpPort
,
"-r"
,
host
+
":"
+
profile
.
kcpPort
,
"-l"
,
"127.0.0.1:"
+
(
profile
.
localPort
+
90
)
,
"-l"
,
"127.0.0.1:"
+
(
profile
.
localPort
+
90
)
,
"--path"
,
protectPath
)
,
"--path"
,
protectPath
)
try
cmd
++=
Utils
.
translateCommandline
(
profile
.
kcpcli
)
catch
{
try
cmd
++=
Utils
.
translateCommandline
(
profile
.
kcpcli
)
catch
{
...
...
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