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
66fe67ae
Commit
66fe67ae
authored
Nov 18, 2014
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build error
parent
04a8b49a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
13 deletions
+10
-13
.travis.yml
.travis.yml
+0
-1
README.md
README.md
+2
-7
build.sbt
build.sbt
+2
-0
src/main/jni/Android.mk
src/main/jni/Android.mk
+2
-2
src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
.../scala/com/github/shadowsocks/ShadowsocksNatService.scala
+4
-3
No files found.
.travis.yml
View file @
66fe67ae
...
...
@@ -17,7 +17,6 @@ install:
-
echo "y" | android update sdk --filter tools,platform-tools,build-tools-21.0.1,android-21,extra-google-m2repository --no-ui --no-https -a
-
echo "y" | android update sdk --filter extra-android-m2repository --no-ui --no-https -a
script
:
-
./build-ndk.sh
-
cp local.properties.travis local.properties
-
sbt android:package-release
-
exit
0
README.md
View file @
66fe67ae
...
...
@@ -29,9 +29,6 @@ Help to translate shadowsocks: http://crowdin.net/project/shadowsocks/invite
```
bash
git submodule update
--init
# Build native binaries
./build-ndk.sh
# Build the App
sbt clean android:package-release
```
...
...
@@ -40,7 +37,8 @@ Help to translate shadowsocks: http://crowdin.net/project/shadowsocks/invite
*
Install Android SDK and NDK by run
`brew install android-ndk android-sdk`
*
Add
`export ANDROID_HOME=/usr/local/Cellar/android-sdk/$version`
to your .bashrc , then reopen the shell to load it.
*
Run
`echo "y" | android update sdk --filter tools,platform-tools,build-tools-19.0.3,android-19,extra-google-m2repository,extra-android-m2repository --no-ui --no-https -a`
*
echo "y" | android update sdk --filter tools,platform-tools,build-tools-21.0.1,android-21,extra-google-m2repository --no-ui --no-https -a
*
echo "y" | android update sdk --filter extra-android-m2repository --no-ui --no-https -a
*
Create your key following the instructions at http://developer.android.com/guide/publishing/app-signing.html#cert
*
Put your key in ~/.keystore
*
Create
`local.properties`
from
`local.properties.example`
with your own key information .
...
...
@@ -49,9 +47,6 @@ Help to translate shadowsocks: http://crowdin.net/project/shadowsocks/invite
```
bash
git submodule update
--init
# Build native binaries
./build-ndk.sh
# Build the apk
sbt clean android:package-release
```
...
...
build.sbt
View file @
66fe67ae
...
...
@@ -10,6 +10,8 @@ name := "shadowsocks"
compileOrder
in
Compile
:=
CompileOrder
.
JavaThenScala
ndkJavah
in
Android
:=
List
()
resolvers
+=
"JRAF"
at
"http://JRAF.org/static/maven/2"
resolvers
+=
"madeye private releases"
at
"http://madeye-maven-repository.googlecode.com/git/"
...
...
src/main/jni/Android.mk
View file @
66fe67ae
...
...
@@ -37,7 +37,7 @@ LIBEVENT_SOURCES := \
LOCAL_MODULE
:=
event
LOCAL_SRC_FILES
:=
$(
addprefix
libevent/,
$(LIBEVENT_SOURCES)
)
LOCAL_CFLAGS
:=
-O2
-
g
-
I
$(LOCAL_PATH)
/libevent
\
LOCAL_CFLAGS
:=
-O2
-I
$(LOCAL_PATH)
/libevent
\
-I
$(LOCAL_PATH)
/libevent/include
\
-I
$(LOCAL_PATH)
/openssl/include
...
...
@@ -122,7 +122,7 @@ LOCAL_STATIC_LIBRARIES := libevent
LOCAL_MODULE
:=
redsocks-jni
LOCAL_SRC_FILES
:=
$(
addprefix
redsocks/,
$(REDSOCKS_SOURCES)
)
main-jni.cpp
LOCAL_CFLAGS
:=
-O2
-std
=
gnu99
-
g
-I
$(LOCAL_PATH)
/redsocks
\
LOCAL_CFLAGS
:=
-O2
-std
=
gnu99
-
DREDSOCKS_JNI
-I
$(LOCAL_PATH)
/redsocks
\
-I
$(LOCAL_PATH)
/libevent/include
\
-I
$(LOCAL_PATH)
/libevent
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
View file @
66fe67ae
...
...
@@ -175,13 +175,14 @@ class ShadowsocksNatService extends Service with BaseService {
def
startRedsocksDaemon
()
{
val
conf
=
ConfigUtils
.
REDSOCKS
.
format
(
config
.
localPort
)
val
args
=
"redsocks -p %sredsocks.pid -c %sredsocks.conf"
val
cmd
=
"redsocks -p %sredsocks.pid -c %sredsocks.conf"
.
format
(
Path
.
BASE
,
Path
.
BASE
)
ConfigUtils
.
printToFile
(
new
File
(
Path
.
BASE
+
"redsocks.conf"
))(
p
=>
{
p
.
println
(
conf
)
})
val
cmd
=
Path
.
BASE
+
args
Console
.
runCommand
(
cmd
)
if
(
BuildConfig
.
DEBUG
)
Log
.
d
(
TAG
,
cmd
)
Core
.
redsocks
(
cmd
.
split
(
" "
))
}
/** Called when the activity is first created. */
...
...
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