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
4df7634f
Commit
4df7634f
authored
Nov 30, 2014
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a FC
parent
97dd8fa1
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
6 deletions
+11
-6
src/main/res/values-zh/strings.xml
src/main/res/values-zh/strings.xml
+1
-1
src/main/res/values/strings.xml
src/main/res/values/strings.xml
+1
-1
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
+6
-1
src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
.../scala/com/github/shadowsocks/ShadowsocksNatService.scala
+1
-1
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
.../scala/com/github/shadowsocks/ShadowsocksVpnService.scala
+1
-1
src/main/scala/com/github/shadowsocks/utils/Utils.scala
src/main/scala/com/github/shadowsocks/utils/Utils.scala
+1
-1
No files found.
src/main/res/values-zh/strings.xml
View file @
4df7634f
...
...
@@ -46,7 +46,7 @@
<string
name=
"forward_stop"
>
后台服务已停止。
</string>
<string
name=
"service_failed"
>
无法连接远程服务器
</string>
<string
name=
"stop"
>
停止服务
</string>
<string
name=
"stopping"
>
正在关闭
影梭
</string>
<string
name=
"stopping"
>
正在关闭
...
</string>
<string
name=
"vpn_error"
>
后台服务启动失败:\"%s\"。
</string>
<string
name=
"ok_iknow"
>
确定
</string>
<string
name=
"port_alert"
>
端口号应大于1024
</string>
...
...
src/main/res/values/strings.xml
View file @
4df7634f
...
...
@@ -57,7 +57,7 @@
<string
name=
"forward_stop"
>
Shadowsocks stopped.
</string>
<string
name=
"service_failed"
>
Failed to connect the remote server
</string>
<string
name=
"stop"
>
Stop the service
</string>
<string
name=
"stopping"
>
Shutting down
Shadowsocks
</string>
<string
name=
"stopping"
>
Shutting down
...
</string>
<string
name=
"vpn_error"
>
Error: \"%s\".
</string>
<!-- alert category -->
...
...
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
View file @
4df7634f
...
...
@@ -340,7 +340,7 @@ class Shadowsocks
Process
.
killProcess
(
pid_nat
)
Process
.
killProcess
(
pid_vpn
)
}
catch
{
case
e
:
Throwable
=>
Log
.
e
(
Shadowsocks
.
TAG
,
"unable to kill "
+
task
,
e
)
case
e
:
Throwable
=>
Log
.
e
(
Shadowsocks
.
TAG
,
"unable to kill "
+
task
)
}
cmd
.
append
(
"rm -f %s%s-nat.pid"
.
format
(
Path
.
BASE
,
task
))
cmd
.
append
(
"rm -f %s%s-nat.conf"
.
format
(
Path
.
BASE
,
task
))
...
...
@@ -1006,6 +1006,11 @@ class Shadowsocks
.
show
()
}
setPreferenceEnabled
(
enabled
=
true
)
case
State
.
STOPPING
=>
if
(
progressDialog
==
null
)
{
progressDialog
=
ProgressDialog
.
show
(
Shadowsocks
.
this
,
""
,
getString
(
R
.
string
.
stopping
),
true
,
true
)
}
}
}
}
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
View file @
4df7634f
...
...
@@ -354,7 +354,7 @@ class ShadowsocksNatService extends Service with BaseService {
cmd
.
append
(
"kill -9 %d"
.
format
(
pid
))
Process
.
killProcess
(
pid
)
}
catch
{
case
e
:
Throwable
=>
Log
.
e
(
TAG
,
"unable to kill "
+
task
,
e
)
case
e
:
Throwable
=>
Log
.
e
(
TAG
,
"unable to kill "
+
task
)
}
cmd
.
append
(
"rm -f %s%s-nat.pid"
.
format
(
Path
.
BASE
,
task
))
cmd
.
append
(
"rm -f %s%s-nat.conf"
.
format
(
Path
.
BASE
,
task
))
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
View file @
4df7634f
...
...
@@ -368,7 +368,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
val
pid
=
scala
.
io
.
Source
.
fromFile
(
Path
.
BASE
+
task
+
"-vpn.pid"
).
mkString
.
trim
.
toInt
Process
.
killProcess
(
pid
)
}
catch
{
case
e
:
Throwable
=>
Log
.
e
(
TAG
,
"unable to kill "
+
task
,
e
)
case
e
:
Throwable
=>
Log
.
e
(
TAG
,
"unable to kill "
+
task
)
}
}
}
...
...
src/main/scala/com/github/shadowsocks/utils/Utils.scala
View file @
4df7634f
...
...
@@ -69,7 +69,7 @@ object Utils {
val
DEFAULT_ROOT
:
String
=
"/system/bin/su"
val
ALTERNATIVE_ROOT
:
String
=
"/system/xbin/su"
val
DEFAULT_IPTABLES
:
String
=
"/system/bin/iptables"
val
ALTERNATIVE_IPTABLES
:
String
=
"
/data/data/com.github.shadowsocks/
iptables"
val
ALTERNATIVE_IPTABLES
:
String
=
"iptables"
val
TIME_OUT
:
Int
=
-
99
var
initialized
:
Boolean
=
false
var
hasRedirectSupport
:
Int
=
-
1
...
...
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