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
34af6aee
Commit
34af6aee
authored
Jul 28, 2015
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refine the IPC to tun2socks
parent
d9af2f93
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
project/plugins.sbt
project/plugins.sbt
+1
-1
src/main/AndroidManifest.xml
src/main/AndroidManifest.xml
+2
-2
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
.../scala/com/github/shadowsocks/ShadowsocksVpnService.scala
+10
-9
No files found.
project/plugins.sbt
View file @
34af6aee
resolvers
+=
Resolver
.
url
(
"scalasbt releases"
,
new
URL
(
"http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots"
))(
Resolver
.
ivyStylePatterns
)
addSbtPlugin
(
"com.hanhuy.sbt"
%
"android-sdk-plugin"
%
"1.4.
6
"
)
addSbtPlugin
(
"com.hanhuy.sbt"
%
"android-sdk-plugin"
%
"1.4.
7
"
)
resolvers
+=
"Sonatype snapshots"
at
"https://oss.sonatype.org/content/repositories/snapshots/"
...
...
src/main/AndroidManifest.xml
View file @
34af6aee
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.github.shadowsocks"
android:versionCode=
"11
0
"
android:versionName=
"2.7.
2
"
>
android:versionCode=
"11
1
"
android:versionName=
"2.7.
3
"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
View file @
34af6aee
...
...
@@ -266,17 +266,18 @@ class ShadowsocksVpnService extends VpnService with BaseService {
}
val
fd
=
startVpn
()
if
(
fd
==
-
1
)
{
false
}
else
{
Thread
.
sleep
(
1000
)
if
(
System
.
sendfd
(
fd
)
==
-
1
)
{
false
}
else
{
true
if
(
fd
!=
-
1
)
{
var
tries
=
1
while
(
tries
<
5
)
{
Thread
.
sleep
(
1000
*
tries
)
if
(
System
.
sendfd
(
fd
)
!=
-
1
)
{
return
true
}
tries
+=
1
}
}
false
}
def
startShadowsocksDaemon
()
{
...
...
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