Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dec098fbc5 | ||
|
|
000d03ad4c | ||
|
|
667619f701 | ||
|
|
afd91b7155 | ||
|
|
e10272c8e5 | ||
|
|
0f5651fef7 | ||
|
|
f258de36d7 | ||
|
|
e71db2160e | ||
|
|
f1cbfb7ea7 | ||
|
|
8c2a2f032a | ||
|
|
24d45cc2a2 | ||
|
|
5220f302c5 | ||
|
|
f0ef6c8e35 | ||
|
|
10de6ea6d9 | ||
|
|
c1f55c80f9 | ||
|
|
3503e7233f | ||
|
|
3db8e9d775 | ||
|
|
e708e117be | ||
|
|
836088534b | ||
|
|
6ae97e630e | ||
|
|
bae0b9e746 | ||
|
|
15262343f4 | ||
|
|
be31a0ce82 | ||
|
|
0b0b6137b8 | ||
|
|
156b0c27f5 | ||
|
|
ca99596270 | ||
|
|
e22ffa8601 | ||
|
|
24233f104a | ||
|
|
01306d527d | ||
|
|
5547b42283 | ||
|
|
3dba966355 | ||
|
|
c9a7dc8deb | ||
|
|
4df7634fae | ||
|
|
97dd8fa15e | ||
|
|
4b37d88f74 | ||
|
|
8ee5d77c6f | ||
|
|
8cbfad80f4 | ||
|
|
9857e42776 | ||
|
|
2f84c74d06 | ||
|
|
bf207eb9b8 | ||
|
|
7e8dad5c76 | ||
|
|
185e7608ae | ||
|
|
d844fc2457 | ||
|
|
a1bdfa5bd9 | ||
|
|
6c7f62c237 | ||
|
|
383e9404ec | ||
|
|
16d2cd9a29 | ||
|
|
9ee2345fd6 | ||
|
|
567543d00e | ||
|
|
7c2b717141 | ||
|
|
08d5d56e46 | ||
|
|
e22b145023 | ||
|
|
a10889bb5b | ||
|
|
800e85dc0d | ||
|
|
e778a313ba | ||
|
|
a3519fbdc8 | ||
|
|
486288a513 | ||
|
|
0111bd5471 | ||
|
|
66fe67ae21 | ||
|
|
04a8b49abc | ||
|
|
3561c7f317 | ||
|
|
694534be58 | ||
|
|
efb614030f | ||
|
|
8f41ea291f | ||
|
|
27ba7d64f4 | ||
|
|
8fb5d7f8c6 | ||
|
|
014692cb84 | ||
|
|
948db260b6 | ||
|
|
b7c3c7d269 | ||
|
|
897b222aa8 | ||
|
|
9a724cd063 | ||
|
|
b15a4604f2 | ||
|
|
2e3a2c9544 | ||
|
|
d6ed052338 | ||
|
|
4b99f8e3d6 | ||
|
|
475cfe3269 | ||
|
|
102387077f | ||
|
|
72824eb8f4 | ||
|
|
1f40be1ad3 | ||
|
|
c12ec62d8b | ||
|
|
e38ed2d069 | ||
|
|
2e05e3cda8 | ||
|
|
92ffb357a6 | ||
|
|
4beff01a3f | ||
|
|
7627952234 | ||
|
|
425d4a42e8 | ||
|
|
194d978143 | ||
|
|
f6841848a3 | ||
|
|
52cb15069c | ||
|
|
70ed2189b1 | ||
|
|
aeee9c2fac | ||
|
|
70dc8e9995 | ||
|
|
558a39ec14 | ||
|
|
5f95cccce4 | ||
|
|
55f25d3272 | ||
|
|
93273cbc44 | ||
|
|
c0514ee169 | ||
|
|
06d736b22d | ||
|
|
e34d5675eb | ||
|
|
94c7ffb788 | ||
|
|
0647ef4c6d | ||
|
|
97c6ff95cd | ||
|
|
971ef22186 | ||
|
|
c35a92a927 | ||
|
|
c05a63a75b | ||
|
|
6074a99eb6 | ||
|
|
e52719d1be |
+1
-4
@@ -1,7 +1,6 @@
|
||||
classes
|
||||
bin
|
||||
gen
|
||||
obj
|
||||
target
|
||||
local.properties
|
||||
.classpath
|
||||
@@ -24,12 +23,10 @@ local.sbt
|
||||
out/
|
||||
|
||||
#NDK
|
||||
src/main/obj
|
||||
src/main/libs
|
||||
src/main/assets/armeabi
|
||||
src/main/assets/armeabi-v7a
|
||||
src/main/assets/x86
|
||||
src/main/assets/api-16/
|
||||
src/main/jni
|
||||
jni/Application.mk
|
||||
obj
|
||||
libs
|
||||
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
[submodule "jni/shadowsocks"]
|
||||
path = jni/shadowsocks
|
||||
url = https://github.com/madeye/shadowsocks-libev.git
|
||||
[submodule "src/main/jni/shadowsocks"]
|
||||
path = src/main/jni/shadowsocks
|
||||
url = https://github.com/madeye/shadowsocks-libev
|
||||
|
||||
+7
-11
@@ -3,25 +3,21 @@ scala:
|
||||
- 2.10.4
|
||||
before_install:
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install libc6-dev-i386
|
||||
- sudo apt-get install lib32ncurses5-dev
|
||||
- sudo apt-get install libx11-dev
|
||||
- sudo apt-get install g++-multilib
|
||||
- sudo apt-get install lib32z1-dev
|
||||
- sudo apt-get install ccache
|
||||
install:
|
||||
- sudo apt-get install -y libc6-dev-i386 lib32ncurses5-dev libx11-dev g++-multilib lib32z1-dev ccache
|
||||
- export NDK_CCACHE=ccache
|
||||
- export ARCH=`uname -m`
|
||||
- wget http://dl.google.com/android/android-sdk_r23-linux.tgz
|
||||
- tar xf android-sdk_r23-linux.tgz
|
||||
- wget http://dl.google.com/android/android-sdk_r23.0.2-linux.tgz
|
||||
- tar xf android-sdk_r23.0.2-linux.tgz
|
||||
- wget http://dl.google.com/android/ndk/android-ndk-r9d-linux-${ARCH}.tar.bz2
|
||||
- tar xf android-ndk-r9d-linux-${ARCH}.tar.bz2
|
||||
- export ANDROID_NDK=`pwd`/android-ndk-r9d
|
||||
- export ANDROID_NDK_HOME=`pwd`/android-ndk-r9d
|
||||
- export ANDROID_HOME=`pwd`/android-sdk-linux
|
||||
- export PATH=${PATH}:${ANDROID_NDK_HOME}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
|
||||
- echo "y" | android update sdk --filter tools,platform-tools,build-tools-20.0.0,android-19,extra-google-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
|
||||
script:
|
||||
- ./build-ndk.sh
|
||||
- cp local.properties.travis local.properties
|
||||
- ./build.sh
|
||||
- sbt android:package-release
|
||||
- exit 0
|
||||
|
||||
@@ -28,10 +28,10 @@ Help to translate shadowsocks: http://crowdin.net/project/shadowsocks/invite
|
||||
|
||||
```bash
|
||||
git submodule update --init
|
||||
|
||||
# Build native binaries
|
||||
./build-ndk.sh
|
||||
|
||||
# Build native binaries
|
||||
./build.sh
|
||||
|
||||
# Build the App
|
||||
sbt clean android:package-release
|
||||
```
|
||||
@@ -39,8 +39,9 @@ Help to translate shadowsocks: http://crowdin.net/project/shadowsocks/invite
|
||||
#### BUILD on Mac OS X (with HomeBrew)
|
||||
|
||||
* 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 loat 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`
|
||||
* Add `export ANDROID_HOME=/usr/local/Cellar/android-sdk/$version` to your .bashrc , then reopen the shell to load it.
|
||||
* 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 .
|
||||
@@ -50,8 +51,8 @@ Help to translate shadowsocks: http://crowdin.net/project/shadowsocks/invite
|
||||
git submodule update --init
|
||||
|
||||
# Build native binaries
|
||||
./build-ndk.sh
|
||||
|
||||
./build.sh
|
||||
|
||||
# Build the apk
|
||||
sbt clean android:package-release
|
||||
```
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Target 9
|
||||
cp jni/Application.mk.9 jni/Application.mk
|
||||
ndk-build clean
|
||||
ndk-build
|
||||
rm -rf src/main/assets/armeabi
|
||||
rm -rf src/main/assets/armeabi-v7a
|
||||
rm -rf src/main/assets/x86
|
||||
mkdir -p src/main/assets/armeabi
|
||||
mkdir -p src/main/assets/armeabi-v7a
|
||||
mkdir -p src/main/assets/x86
|
||||
for app in pdnsd redsocks
|
||||
do
|
||||
mv libs/armeabi/$app src/main/assets/armeabi/
|
||||
mv libs/armeabi-v7a/$app src/main/assets/armeabi-v7a/
|
||||
mv libs/x86/$app src/main/assets/x86/
|
||||
done
|
||||
rm -rf src/main/jni
|
||||
mv libs src/main/jni
|
||||
|
||||
# Target 16
|
||||
cp jni/Application.mk.16 jni/Application.mk
|
||||
ndk-build clean
|
||||
ndk-build
|
||||
rm -rf src/main/assets/api-16/armeabi
|
||||
rm -rf src/main/assets/api-16/armeabi-v7a
|
||||
rm -rf src/main/assets/api-16/x86
|
||||
mkdir -p src/main/assets/api-16/armeabi
|
||||
mkdir -p src/main/assets/api-16/armeabi-v7a
|
||||
mkdir -p src/main/assets/api-16/x86
|
||||
for app in pdnsd redsocks
|
||||
do
|
||||
mv libs/armeabi/$app src/main/assets/api-16/armeabi/
|
||||
mv libs/armeabi-v7a/$app src/main/assets/api-16/armeabi-v7a/
|
||||
mv libs/x86/$app src/main/assets/api-16/x86/
|
||||
done
|
||||
|
||||
@@ -4,31 +4,35 @@ import android.Dependencies.{apklib,aar}
|
||||
|
||||
android.Plugin.androidBuild
|
||||
|
||||
platformTarget in Android := "android-19"
|
||||
platformTarget in Android := "android-21"
|
||||
|
||||
name := "shadowsocks"
|
||||
|
||||
compileOrder in Compile := CompileOrder.JavaThenScala
|
||||
|
||||
ndkJavah in Android := List()
|
||||
|
||||
ndkBuild in Android := List()
|
||||
|
||||
resolvers += "JRAF" at "http://JRAF.org/static/maven/2"
|
||||
|
||||
resolvers += "madeye private releases" at "http://madeye-maven-repository.googlecode.com/git/"
|
||||
|
||||
libraryDependencies ++= Seq(
|
||||
"dnsjava" % "dnsjava" % "2.1.5",
|
||||
"org.scalaj" %% "scalaj-http" % "0.3.10",
|
||||
"com.github.kevinsawicki" % "http-request" % "5.6",
|
||||
"commons-net" % "commons-net" % "3.3",
|
||||
"com.google.zxing" % "android-integration" % "2.2"
|
||||
"com.google.zxing" % "android-integration" % "3.1.0"
|
||||
)
|
||||
|
||||
libraryDependencies ++= Seq(
|
||||
"net.simonvt.menudrawer" % "menudrawer" % "3.0.6",
|
||||
"com.google.android.gms" % "play-services" % "5.2.08",
|
||||
"com.android.support" % "support-v4" % "19.1.0"
|
||||
"com.google.android.gms" % "play-services" % "6.1.71",
|
||||
"com.android.support" % "support-v4" % "21.0.3"
|
||||
)
|
||||
|
||||
libraryDependencies ++= Seq(
|
||||
"de.keyboardsurfer.android.widget" % "crouton" % "1.8.1" exclude("com.google.android", "support-v4"),
|
||||
"de.keyboardsurfer.android.widget" % "crouton" % "1.8.4" exclude("com.google.android", "support-v4"),
|
||||
"com.nostra13.universalimageloader" % "universal-image-loader" % "1.8.4",
|
||||
"com.j256.ormlite" % "ormlite-core" % "4.47",
|
||||
"com.j256.ormlite" % "ormlite-android" % "4.47"
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
function try () {
|
||||
"$@" || exit -1
|
||||
}
|
||||
|
||||
try pushd src/main
|
||||
|
||||
# Build
|
||||
try $ANDROID_NDK_HOME/ndk-build clean
|
||||
try $ANDROID_NDK_HOME/ndk-build
|
||||
|
||||
# copy executables
|
||||
rm -rf assets/armeabi-v7a
|
||||
rm -rf assets/x86
|
||||
mkdir -p assets/armeabi-v7a
|
||||
mkdir -p assets/x86
|
||||
for app in pdnsd redsocks ss-local ss-tunnel tun2socks
|
||||
do
|
||||
try mv libs/armeabi-v7a/$app assets/armeabi-v7a/
|
||||
try mv libs/x86/$app assets/x86/
|
||||
done
|
||||
|
||||
try popd
|
||||
-347
@@ -1,347 +0,0 @@
|
||||
# Copyright (C) 2009 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
ROOT_PATH := $(LOCAL_PATH)
|
||||
|
||||
########################################################
|
||||
## libevent
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LIBEVENT_SOURCES := \
|
||||
buffer.c \
|
||||
bufferevent.c bufferevent_filter.c \
|
||||
bufferevent_openssl.c bufferevent_pair.c bufferevent_ratelim.c \
|
||||
bufferevent_sock.c epoll.c \
|
||||
epoll_sub.c evdns.c event.c \
|
||||
event_tagging.c evmap.c \
|
||||
evrpc.c evthread.c \
|
||||
evthread_pthread.c evutil.c \
|
||||
evutil_rand.c http.c \
|
||||
listener.c log.c poll.c \
|
||||
select.c signal.c strlcpy.c
|
||||
|
||||
LOCAL_MODULE := event
|
||||
LOCAL_SRC_FILES := $(addprefix libevent/, $(LIBEVENT_SOURCES))
|
||||
LOCAL_CFLAGS := -O2 -g -I$(LOCAL_PATH)/libevent \
|
||||
-I$(LOCAL_PATH)/libevent/include \
|
||||
-I$(LOCAL_PATH)/openssl/include
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## libipset
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
bdd_src = bdd/assignments.c bdd/basics.c bdd/bdd-iterator.c bdd/expanded.c \
|
||||
bdd/reachable.c bdd/read.c bdd/write.c
|
||||
map_src = map/allocation.c map/inspection.c map/ipv4_map.c map/ipv6_map.c \
|
||||
map/storage.c
|
||||
set_src = set/allocation.c set/inspection.c set/ipv4_set.c set/ipv6_set.c \
|
||||
set/iterator.c set/storage.c
|
||||
|
||||
IPSET_SOURCE := general.c $(bdd_src) $(map_src) $(set_src)
|
||||
|
||||
LOCAL_MODULE := libipset
|
||||
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/shadowsocks/libipset/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks/libcork/include
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks/libipset/,$(IPSET_SOURCE))
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## libcork
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
cli_src := cli/commands.c
|
||||
core_src := core/allocator.c core/error.c core/gc.c \
|
||||
core/hash.c core/ip-address.c core/mempool.c \
|
||||
core/timestamp.c core/u128.c
|
||||
ds_src := ds/array.c ds/bitset.c ds/buffer.c ds/dllist.c \
|
||||
ds/file-stream.c ds/hash-table.c ds/managed-buffer.c \
|
||||
ds/ring-buffer.c ds/slice.c
|
||||
posix_src := posix/directory-walker.c posix/env.c posix/exec.c \
|
||||
posix/files.c posix/process.c posix/subprocess.c
|
||||
pthreads_src := pthreads/thread.c
|
||||
|
||||
CORK_SOURCE := $(cli_src) $(core_src) $(ds_src) $(posix_src) $(pthreads_src)
|
||||
|
||||
LOCAL_MODULE := libcork
|
||||
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/shadowsocks/libcork/include \
|
||||
-DCORK_API=CORK_LOCAL
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks/libcork/,$(CORK_SOURCE))
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## libev
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libev
|
||||
LOCAL_CFLAGS += -O2 -DNDEBUG -DHAVE_CONFIG_H
|
||||
LOCAL_SRC_FILES := \
|
||||
libev/ev.c \
|
||||
libev/event.c
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## redsocks
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
REDSOCKS_SOURCES := base.c dnstc.c http-connect.c \
|
||||
log.c md5.c socks5.c \
|
||||
base64.c http-auth.c http-relay.c main.c \
|
||||
parser.c redsocks.c socks4.c utils.c
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libevent
|
||||
|
||||
LOCAL_MODULE := redsocks
|
||||
LOCAL_SRC_FILES := $(addprefix redsocks/, $(REDSOCKS_SOURCES))
|
||||
LOCAL_CFLAGS := -O2 -std=gnu99 -g -I$(LOCAL_PATH)/redsocks \
|
||||
-I$(LOCAL_PATH)/libevent/include \
|
||||
-I$(LOCAL_PATH)/libevent
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
########################################################
|
||||
## pdnsd
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
PDNSD_SOURCES := $(wildcard $(LOCAL_PATH)/pdnsd/src/*.c)
|
||||
|
||||
LOCAL_MODULE := pdnsd
|
||||
LOCAL_SRC_FILES := $(PDNSD_SOURCES:$(LOCAL_PATH)/%=%)
|
||||
LOCAL_CFLAGS := -Wall -O2 -I$(LOCAL_PATH)/pdnsd
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
########################################################
|
||||
## pdnsd library
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
PDNSD_SOURCES := $(wildcard $(LOCAL_PATH)/pdnsd/src/*.c) main-jni.cpp
|
||||
|
||||
LOCAL_MODULE := pdnsd-jni
|
||||
LOCAL_SRC_FILES := $(PDNSD_SOURCES:$(LOCAL_PATH)/%=%)
|
||||
LOCAL_CFLAGS := -Wall -O2 -DPDNSD_JNI -I$(LOCAL_PATH)/pdnsd
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## shadowsocks local library
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
SHADOWSOCKS_SOURCES := local.c cache.c udprelay.c encrypt.c utils.c json.c jconf.c acl.c
|
||||
|
||||
LOCAL_MODULE := ss-local-jni
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks/src/, $(SHADOWSOCKS_SOURCES)) main-jni.cpp
|
||||
LOCAL_CFLAGS := -Wall -O2 -fno-strict-aliasing -DUDPRELAY_LOCAL -DSSLOCAL_JNI \
|
||||
-DUSE_CRYPTO_OPENSSL -DANDROID -DHAVE_CONFIG_H \
|
||||
-I$(LOCAL_PATH)/libev/ \
|
||||
-I$(LOCAL_PATH)/openssl/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks/libcork/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks/libipset/include
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libev libcrypto libipset libcork
|
||||
|
||||
LOCAL_LDLIBS := -llog
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## shadowsocks tunnel
|
||||
########################################################
|
||||
|
||||
# include $(CLEAR_VARS)
|
||||
#
|
||||
# SHADOWSOCKS_SOURCES := tunnel.c cache.c udprelay.c encrypt.c utils.c json.c jconf.c
|
||||
#
|
||||
# LOCAL_MODULE := ss-tunnel
|
||||
# LOCAL_SRC_FILES := $(addprefix shadowsocks/src/, $(SHADOWSOCKS_SOURCES))
|
||||
# LOCAL_CFLAGS := -Wall -O2 -fno-strict-aliasing -DUDPRELAY_LOCAL -DUDPRELAY_TUNNEL \
|
||||
# -DUSE_CRYPTO_OPENSSL -DANDROID -DHAVE_CONFIG_H \
|
||||
# -I$(LOCAL_PATH)/libev/ \
|
||||
# -I$(LOCAL_PATH)/openssl/include
|
||||
#
|
||||
# LOCAL_STATIC_LIBRARIES := libev libcrypto
|
||||
#
|
||||
# LOCAL_LDLIBS := -llog
|
||||
#
|
||||
# include $(BUILD_EXECUTABLE)
|
||||
|
||||
########################################################
|
||||
## shadowsocks tunnel library
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
SHADOWSOCKS_SOURCES := tunnel.c cache.c udprelay.c encrypt.c utils.c json.c jconf.c
|
||||
|
||||
LOCAL_MODULE := ss-tunnel-jni
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks/src/, $(SHADOWSOCKS_SOURCES)) main-jni.cpp
|
||||
LOCAL_CFLAGS := -Wall -O2 -fno-strict-aliasing -DUDPRELAY_LOCAL -DUDPRELAY_TUNNEL \
|
||||
-DUSE_CRYPTO_OPENSSL -DANDROID -DHAVE_CONFIG_H -DSSTUNNEL_JNI \
|
||||
-I$(LOCAL_PATH)/libev/ \
|
||||
-I$(LOCAL_PATH)/openssl/include
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libev libcrypto
|
||||
|
||||
LOCAL_LDLIBS := -llog
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## system
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE:= system
|
||||
|
||||
LOCAL_SRC_FILES:= \
|
||||
system.cpp
|
||||
|
||||
LOCAL_LDLIBS := -ldl -llog
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := cpufeatures
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## tun2socks-library
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_CFLAGS := -std=gnu99
|
||||
LOCAL_CFLAGS += -DBADVPN_THREADWORK_USE_PTHREAD -DBADVPN_LINUX -DBADVPN_BREACTOR_BADVPN -D_GNU_SOURCE
|
||||
LOCAL_CFLAGS += -DBADVPN_USE_SELFPIPE -DBADVPN_USE_EPOLL
|
||||
LOCAL_CFLAGS += -DBADVPN_LITTLE_ENDIAN -DBADVPN_THREAD_SAFE
|
||||
LOCAL_CFLAGS += -DNDEBUG -DANDROID
|
||||
LOCAL_CFLAGS += -DTUN2SOCKS_JNI
|
||||
|
||||
LOCAL_C_INCLUDES:= \
|
||||
$(LOCAL_PATH)/badvpn/lwip/src/include/ipv4 \
|
||||
$(LOCAL_PATH)/badvpn/lwip/src/include/ipv6 \
|
||||
$(LOCAL_PATH)/badvpn/lwip/src/include \
|
||||
$(LOCAL_PATH)/badvpn/lwip/custom \
|
||||
$(LOCAL_PATH)/badvpn/
|
||||
|
||||
TUN2SOCKS_SOURCES := \
|
||||
base/BLog_syslog.c \
|
||||
system/BReactor_badvpn.c \
|
||||
system/BSignal.c \
|
||||
system/BConnection_unix.c \
|
||||
system/BTime.c \
|
||||
system/BUnixSignal.c \
|
||||
system/BNetwork.c \
|
||||
flow/StreamRecvInterface.c \
|
||||
flow/PacketRecvInterface.c \
|
||||
flow/PacketPassInterface.c \
|
||||
flow/StreamPassInterface.c \
|
||||
flow/SinglePacketBuffer.c \
|
||||
flow/BufferWriter.c \
|
||||
flow/PacketBuffer.c \
|
||||
flow/PacketStreamSender.c \
|
||||
flow/PacketPassConnector.c \
|
||||
flow/PacketProtoFlow.c \
|
||||
flow/PacketPassFairQueue.c \
|
||||
flow/PacketProtoEncoder.c \
|
||||
flow/PacketProtoDecoder.c \
|
||||
socksclient/BSocksClient.c \
|
||||
tuntap/BTap.c \
|
||||
lwip/src/core/timers.c \
|
||||
lwip/src/core/udp.c \
|
||||
lwip/src/core/memp.c \
|
||||
lwip/src/core/init.c \
|
||||
lwip/src/core/pbuf.c \
|
||||
lwip/src/core/tcp.c \
|
||||
lwip/src/core/tcp_out.c \
|
||||
lwip/src/core/netif.c \
|
||||
lwip/src/core/def.c \
|
||||
lwip/src/core/mem.c \
|
||||
lwip/src/core/tcp_in.c \
|
||||
lwip/src/core/stats.c \
|
||||
lwip/src/core/inet_chksum.c \
|
||||
lwip/src/core/ipv4/icmp.c \
|
||||
lwip/src/core/ipv4/igmp.c \
|
||||
lwip/src/core/ipv4/ip4_addr.c \
|
||||
lwip/src/core/ipv4/ip_frag.c \
|
||||
lwip/src/core/ipv4/ip4.c \
|
||||
lwip/src/core/ipv4/autoip.c \
|
||||
lwip/src/core/ipv6/ethip6.c \
|
||||
lwip/src/core/ipv6/inet6.c \
|
||||
lwip/src/core/ipv6/ip6_addr.c \
|
||||
lwip/src/core/ipv6/mld6.c \
|
||||
lwip/src/core/ipv6/dhcp6.c \
|
||||
lwip/src/core/ipv6/icmp6.c \
|
||||
lwip/src/core/ipv6/ip6.c \
|
||||
lwip/src/core/ipv6/ip6_frag.c \
|
||||
lwip/src/core/ipv6/nd6.c \
|
||||
lwip/custom/sys.c \
|
||||
tun2socks/tun2socks.c \
|
||||
base/DebugObject.c \
|
||||
base/BLog.c \
|
||||
base/BPending.c \
|
||||
system/BDatagram_unix.c \
|
||||
flowextra/PacketPassInactivityMonitor.c \
|
||||
tun2socks/SocksUdpGwClient.c \
|
||||
udpgw_client/UdpGwClient.c
|
||||
|
||||
LOCAL_MODULE := tun2socks-jni
|
||||
|
||||
LOCAL_LDLIBS := -ldl -llog
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix badvpn/, $(TUN2SOCKS_SOURCES)) main-jni.cpp
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
# OpenSSL
|
||||
openssl_subdirs := $(addprefix $(LOCAL_PATH)/openssl/,$(addsuffix /Android.mk, \
|
||||
crypto \
|
||||
ssl \
|
||||
))
|
||||
include $(openssl_subdirs)
|
||||
|
||||
# Iptables
|
||||
# LOCAL_PATH := $(ROOT_PATH)
|
||||
# iptables_subdirs := $(addprefix $(LOCAL_PATH)/iptables/,$(addsuffix /Android.mk, \
|
||||
# iptables \
|
||||
# extensions \
|
||||
# libiptc \
|
||||
# ))
|
||||
# include $(iptables_subdirs)
|
||||
|
||||
# Import cpufeatures
|
||||
$(call import-module,android/cpufeatures)
|
||||
@@ -1,4 +0,0 @@
|
||||
APP_ABI := armeabi armeabi-v7a x86
|
||||
APP_PLATFORM := android-16
|
||||
APP_STL := stlport_static
|
||||
NDK_TOOLCHAIN_VERSION := 4.8
|
||||
@@ -1,4 +0,0 @@
|
||||
APP_ABI := armeabi armeabi-v7a x86
|
||||
APP_PLATFORM := android-9
|
||||
APP_STL := stlport_static
|
||||
NDK_TOOLCHAIN_VERSION := 4.8
|
||||
@@ -1,84 +0,0 @@
|
||||
#include <jni.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
typedef unsigned short char16_t;
|
||||
|
||||
class String8 {
|
||||
public:
|
||||
String8() {
|
||||
mString = 0;
|
||||
}
|
||||
|
||||
~String8() {
|
||||
if (mString) {
|
||||
free(mString);
|
||||
}
|
||||
}
|
||||
|
||||
void set(const char16_t* o, size_t numChars) {
|
||||
if (mString) {
|
||||
free(mString);
|
||||
}
|
||||
mString = (char*) malloc(numChars + 1);
|
||||
if (!mString) {
|
||||
return;
|
||||
}
|
||||
for (size_t i = 0; i < numChars; i++) {
|
||||
mString[i] = (char) o[i];
|
||||
}
|
||||
mString[numChars] = '\0';
|
||||
}
|
||||
|
||||
const char* string() {
|
||||
return mString;
|
||||
}
|
||||
private:
|
||||
char* mString;
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
|
||||
int main(int argc, char* args[]);
|
||||
|
||||
#if defined(PDNSD_JNI)
|
||||
jint Java_com_github_shadowsocks_Core_pdnsd(JNIEnv *env, jobject thiz, jobjectArray argv) {
|
||||
#elif defined(SSLOCAL_JNI)
|
||||
jint Java_com_github_shadowsocks_Core_sslocal(JNIEnv *env, jobject thiz, jobjectArray argv) {
|
||||
#elif defined(SSTUNNEL_JNI)
|
||||
jint Java_com_github_shadowsocks_Core_sstunnel(JNIEnv *env, jobject thiz, jobjectArray argv) {
|
||||
#elif defined(TUN2SOCKS_JNI)
|
||||
jint Java_com_github_shadowsocks_Core_tun2socks(JNIEnv *env, jobject thiz, jobjectArray argv) {
|
||||
#else
|
||||
#error "invalid header"
|
||||
#endif
|
||||
|
||||
int argc = argv ? env->GetArrayLength(argv) : 0;
|
||||
char **args = NULL;
|
||||
String8 tmp_8;
|
||||
|
||||
if (argc > 0) {
|
||||
args = (char **)malloc((argc+1)*sizeof(char *));
|
||||
for (int i = 0; i < argc; ++i) {
|
||||
jstring arg = reinterpret_cast<jstring>(env->GetObjectArrayElement(argv, i));
|
||||
const jchar *str = env->GetStringCritical(arg, 0);
|
||||
tmp_8.set(str, env->GetStringLength(arg));
|
||||
env->ReleaseStringCritical(arg, str);
|
||||
args[i] = strdup(tmp_8.string());
|
||||
}
|
||||
args[argc] = NULL;
|
||||
|
||||
pid_t pid;
|
||||
pid = fork();
|
||||
if (pid == 0) {
|
||||
int ret = main(argc, args);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (args != NULL) free(args);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
Submodule jni/shadowsocks deleted from d37f8d3025
+4
-2
@@ -1,5 +1,7 @@
|
||||
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.2.20")
|
||||
addSbtPlugin("com.hanhuy.sbt" % "android-sdk-plugin" % "1.3.10")
|
||||
|
||||
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")
|
||||
resolvers += Resolver.sbtPluginRepo("snapshots")
|
||||
|
||||
addSbtPlugin("com.hanhuy.sbt" % "sbt-idea" % "1.7.0-SNAPSHOT")
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.github.shadowsocks"
|
||||
android:versionCode="70"
|
||||
android:versionName="2.2.2">
|
||||
android:versionCode="95"
|
||||
android:versionName="2.5.5">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.touchscreen"
|
||||
android:required="false"/>
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="14"
|
||||
android:targetSdkVersion="19"/>
|
||||
android:minSdkVersion="16"
|
||||
android:targetSdkVersion="21"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
@@ -76,11 +74,13 @@
|
||||
|
||||
<service
|
||||
android:name=".ShadowsocksNatService"
|
||||
android:process=":nat"
|
||||
android:exported="false">
|
||||
</service>
|
||||
|
||||
<service
|
||||
android:name=".ShadowsocksVpnService"
|
||||
android:process=":vpn"
|
||||
android:label="@string/app_name"
|
||||
android:permission="android.permission.BIND_VPN_SERVICE"
|
||||
android:exported="false">
|
||||
|
||||
@@ -14,6 +14,7 @@ public class Config implements Parcelable {
|
||||
public String profileName = "Untitled";
|
||||
public String proxy = "127.0.0.1";
|
||||
public String sitekey = "null";
|
||||
public String route = "all";
|
||||
|
||||
public String encMethod = "rc4";
|
||||
public String proxiedAppString = "";
|
||||
@@ -33,7 +34,7 @@ public class Config implements Parcelable {
|
||||
|
||||
public Config(boolean isGlobalProxy, boolean isGFWList, boolean isBypassApps,
|
||||
boolean isTrafficStat, boolean isUdpDns, String profileName, String proxy, String sitekey,
|
||||
String encMethod, String proxiedAppString, int remotePort, int localPort) {
|
||||
String encMethod, String proxiedAppString, String route, int remotePort, int localPort) {
|
||||
this.isGlobalProxy = isGlobalProxy;
|
||||
this.isGFWList = isGFWList;
|
||||
this.isBypassApps = isBypassApps;
|
||||
@@ -44,6 +45,7 @@ public class Config implements Parcelable {
|
||||
this.sitekey = sitekey;
|
||||
this.encMethod = encMethod;
|
||||
this.proxiedAppString = proxiedAppString;
|
||||
this.route = route;
|
||||
this.remotePort = remotePort;
|
||||
this.localPort = localPort;
|
||||
}
|
||||
@@ -63,6 +65,7 @@ public class Config implements Parcelable {
|
||||
sitekey = in.readString();
|
||||
encMethod = in.readString();
|
||||
proxiedAppString = in.readString();
|
||||
route = in.readString();
|
||||
remotePort = in.readInt();
|
||||
localPort = in.readInt();
|
||||
}
|
||||
@@ -82,6 +85,7 @@ public class Config implements Parcelable {
|
||||
out.writeString(sitekey);
|
||||
out.writeString(encMethod);
|
||||
out.writeString(proxiedAppString);
|
||||
out.writeString(route);
|
||||
out.writeInt(remotePort);
|
||||
out.writeInt(localPort);
|
||||
}
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
/* Shadowsocks - A shadowsocks client for Android
|
||||
* Copyright (C) 2012 <max.c.lv@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* ___====-_ _-====___
|
||||
* _--^^^#####// \\#####^^^--_
|
||||
* _-^##########// ( ) \\##########^-_
|
||||
* -############// |\^^/| \\############-
|
||||
* _/############// (@::@) \\############\_
|
||||
* /#############(( \\// ))#############\
|
||||
* -###############\\ (oo) //###############-
|
||||
* -#################\\ / VV \ //#################-
|
||||
* -###################\\/ \//###################-
|
||||
* _#/|##########/\######( /\ )######/\##########|\#_
|
||||
* |/ |#/\#/\#/\/ \#/\##\ | | /##/\#/ \/\#/\#/\#| \|
|
||||
* ` |/ V V ` V \#\| | | |/#/ V ' V V \| '
|
||||
* ` ` ` ` / | | | | \ ' ' ' '
|
||||
* ( | | | | )
|
||||
* __\ | | | | /__
|
||||
* (vvv(VVV)(VVV)vvv)
|
||||
*
|
||||
* HERE BE DRAGONS
|
||||
*
|
||||
*/
|
||||
|
||||
package com.github.shadowsocks;
|
||||
|
||||
public class Core {
|
||||
static {
|
||||
java.lang.System.loadLibrary("ss-local-jni");
|
||||
java.lang.System.loadLibrary("ss-tunnel-jni");
|
||||
java.lang.System.loadLibrary("tun2socks-jni");
|
||||
java.lang.System.loadLibrary("pdnsd-jni");
|
||||
}
|
||||
|
||||
public static native void sslocal(String[] cmd);
|
||||
public static native void sstunnel(String[] cmd);
|
||||
public static native void tun2socks(String[] cmd);
|
||||
public static native void pdnsd(String[] cmd);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2013 Jorrit "Chainfire" Jongma
|
||||
* Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2013 Jorrit "Chainfire" Jongma
|
||||
* Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,6 +18,7 @@ package eu.chainfire.libsuperuser;
|
||||
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
|
||||
import com.github.shadowsocks.BuildConfig;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package eu.chainfire.libsuperuser;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Base receiver to extend to catch notifications when overlays should be
|
||||
* hidden.
|
||||
* </p>
|
||||
* <p>
|
||||
* Tapjacking protection in SuperSU prevents some dialogs from receiving user
|
||||
* input when overlays are present. For security reasons this notification is
|
||||
* only sent to apps that have previously been granted root access, so even if
|
||||
* your app does not <em>require</em> root, you still need to <em>request</em>
|
||||
* it, and the user must grant it.
|
||||
* </p>
|
||||
* <p>
|
||||
* Note that the word overlay as used here should be interpreted as "any view or
|
||||
* window possibly obscuring SuperSU dialogs".
|
||||
* </p>
|
||||
*/
|
||||
public abstract class HideOverlaysReceiver extends BroadcastReceiver {
|
||||
public static final String ACTION_HIDE_OVERLAYS = "eu.chainfire.supersu.action.HIDE_OVERLAYS";
|
||||
public static final String CATEGORY_HIDE_OVERLAYS = Intent.CATEGORY_INFO;
|
||||
public static final String EXTRA_HIDE_OVERLAYS = "eu.chainfire.supersu.extra.HIDE";
|
||||
|
||||
@Override
|
||||
public final void onReceive(Context context, Intent intent) {
|
||||
if (intent.hasExtra(EXTRA_HIDE_OVERLAYS)) {
|
||||
onHideOverlays(intent.getBooleanExtra(EXTRA_HIDE_OVERLAYS, false));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when overlays <em>should</em> be hidden or <em>may</em> be shown
|
||||
* again.
|
||||
*
|
||||
* @param hide Should overlays be hidden?
|
||||
*/
|
||||
public abstract void onHideOverlays(boolean hide);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2013 Jorrit "Chainfire" Jongma
|
||||
* Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2013 Jorrit "Chainfire" Jongma
|
||||
* Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2013 Jorrit "Chainfire" Jongma
|
||||
* Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
||||
Executable
+383
@@ -0,0 +1,383 @@
|
||||
# Copyright (C) 2009 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
ROOT_PATH := $(LOCAL_PATH)
|
||||
|
||||
########################################################
|
||||
## libsodium
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
crypto_aead_src := crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c
|
||||
|
||||
crypto_auth_src := crypto_auth/crypto_auth.c crypto_auth/hmacsha256/auth_hmacsha256_api.c crypto_auth/hmacsha256/cp/hmac_hmacsha256.c crypto_auth/hmacsha256/cp/verify_hmacsha256.c crypto_auth/hmacsha512/auth_hmacsha512_api.c crypto_auth/hmacsha512/cp/hmac_hmacsha512.c crypto_auth/hmacsha512/cp/verify_hmacsha512.c crypto_auth/hmacsha512256/auth_hmacsha512256_api.c crypto_auth/hmacsha512256/cp/hmac_hmacsha512256.c crypto_auth/hmacsha512256/cp/verify_hmacsha512256.c
|
||||
|
||||
crypto_box_src := crypto_box/crypto_box.c crypto_box/crypto_box_easy.c crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c crypto_box/curve25519xsalsa20poly1305/ref/after_curve25519xsalsa20poly1305.c crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.c crypto_box/curve25519xsalsa20poly1305/ref/box_curve25519xsalsa20poly1305.c crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c
|
||||
|
||||
crypto_core_src := crypto_core/hsalsa20/core_hsalsa20_api.c crypto_core/hsalsa20/ref2/core_hsalsa20.c crypto_core/salsa20/core_salsa20_api.c crypto_core/salsa20/ref/core_salsa20.c crypto_core/salsa2012/core_salsa2012_api.c crypto_core/salsa2012/ref/core_salsa2012.c crypto_core/salsa208/core_salsa208_api.c crypto_core/salsa208/ref/core_salsa208.c
|
||||
|
||||
crypto_generichash_src := crypto_generichash/blake2/generichash_blake2_api.c crypto_generichash/blake2/ref/blake2b-ref.c crypto_generichash/blake2/ref/generichash_blake2b.c crypto_generichash/crypto_generichash.c
|
||||
|
||||
crypto_hash_src := crypto_hash/crypto_hash.c crypto_hash/sha256/cp/hash_sha256.c crypto_hash/sha256/hash_sha256_api.c crypto_hash/sha512/cp/hash_sha512.c crypto_hash/sha512/hash_sha512_api.c
|
||||
|
||||
crypto_onetimeauth_src := crypto_onetimeauth/crypto_onetimeauth.c crypto_onetimeauth/poly1305/donna/auth_poly1305_donna.c crypto_onetimeauth/poly1305/donna/verify_poly1305_donna.c crypto_onetimeauth/poly1305/onetimeauth_poly1305.c crypto_onetimeauth/poly1305/onetimeauth_poly1305_api.c crypto_onetimeauth/poly1305/onetimeauth_poly1305_try.c
|
||||
|
||||
crypto_pwhash_src := crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c
|
||||
|
||||
crypto_scalarmult_src := crypto_scalarmult/crypto_scalarmult.c crypto_scalarmult/curve25519/donna_c64/base_curve25519_donna_c64.c crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c crypto_scalarmult/curve25519/ref10/base_curve25519_ref10.c crypto_scalarmult/curve25519/ref10/fe_0_curve25519_ref10.c crypto_scalarmult/curve25519/ref10/fe_1_curve25519_ref10.c crypto_scalarmult/curve25519/ref10/fe_add_curve25519_ref10.c crypto_scalarmult/curve25519/ref10/fe_copy_curve25519_ref10.c crypto_scalarmult/curve25519/ref10/fe_cswap_curve25519_ref10.c crypto_scalarmult/curve25519/ref10/fe_frombytes_curve25519_ref10.c crypto_scalarmult/curve25519/ref10/fe_invert_curve25519_ref10.c crypto_scalarmult/curve25519/ref10/fe_mul121666_curve25519_ref10.c crypto_scalarmult/curve25519/ref10/fe_mul_curve25519_ref10.c crypto_scalarmult/curve25519/ref10/fe_sq_curve25519_ref10.c crypto_scalarmult/curve25519/ref10/fe_sub_curve25519_ref10.c crypto_scalarmult/curve25519/ref10/fe_tobytes_curve25519_ref10.c crypto_scalarmult/curve25519/ref10/scalarmult_curve25519_ref10.c crypto_scalarmult/curve25519/scalarmult_curve25519_api.c
|
||||
|
||||
crypto_secretbox_src := crypto_secretbox/crypto_secretbox.c crypto_secretbox/crypto_secretbox_easy.c crypto_secretbox/xsalsa20poly1305/ref/box_xsalsa20poly1305.c crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c
|
||||
|
||||
crypto_shorthash_src := crypto_shorthash/crypto_shorthash.c crypto_shorthash/siphash24/ref/shorthash_siphash24.c crypto_shorthash/siphash24/shorthash_siphash24_api.c
|
||||
|
||||
crypto_sign_src := crypto_sign/crypto_sign.c crypto_sign/ed25519/ref10/fe_0.c crypto_sign/ed25519/ref10/fe_1.c crypto_sign/ed25519/ref10/fe_add.c crypto_sign/ed25519/ref10/fe_cmov.c crypto_sign/ed25519/ref10/fe_copy.c crypto_sign/ed25519/ref10/fe_frombytes.c crypto_sign/ed25519/ref10/fe_invert.c crypto_sign/ed25519/ref10/fe_isnegative.c crypto_sign/ed25519/ref10/fe_isnonzero.c crypto_sign/ed25519/ref10/fe_mul.c crypto_sign/ed25519/ref10/fe_neg.c crypto_sign/ed25519/ref10/fe_pow22523.c crypto_sign/ed25519/ref10/fe_sq.c crypto_sign/ed25519/ref10/fe_sq2.c crypto_sign/ed25519/ref10/fe_sub.c crypto_sign/ed25519/ref10/fe_tobytes.c crypto_sign/ed25519/ref10/ge_add.c crypto_sign/ed25519/ref10/ge_double_scalarmult.c crypto_sign/ed25519/ref10/ge_frombytes.c crypto_sign/ed25519/ref10/ge_madd.c crypto_sign/ed25519/ref10/ge_msub.c crypto_sign/ed25519/ref10/ge_p1p1_to_p2.c crypto_sign/ed25519/ref10/ge_p1p1_to_p3.c crypto_sign/ed25519/ref10/ge_p2_0.c crypto_sign/ed25519/ref10/ge_p2_dbl.c crypto_sign/ed25519/ref10/ge_p3_0.c crypto_sign/ed25519/ref10/ge_p3_dbl.c crypto_sign/ed25519/ref10/ge_p3_to_cached.c crypto_sign/ed25519/ref10/ge_p3_to_p2.c crypto_sign/ed25519/ref10/ge_p3_tobytes.c crypto_sign/ed25519/ref10/ge_precomp_0.c crypto_sign/ed25519/ref10/ge_scalarmult_base.c crypto_sign/ed25519/ref10/ge_sub.c crypto_sign/ed25519/ref10/ge_tobytes.c crypto_sign/ed25519/ref10/keypair.c crypto_sign/ed25519/ref10/open.c crypto_sign/ed25519/ref10/sc_muladd.c crypto_sign/ed25519/ref10/sc_reduce.c crypto_sign/ed25519/ref10/sign.c crypto_sign/ed25519/sign_ed25519_api.c crypto_sign/edwards25519sha512batch/ref/fe25519_edwards25519sha512batch.c crypto_sign/edwards25519sha512batch/ref/ge25519_edwards25519sha512batch.c crypto_sign/edwards25519sha512batch/ref/sc25519_edwards25519sha512batch.c crypto_sign/edwards25519sha512batch/ref/sign_edwards25519sha512batch.c crypto_sign/edwards25519sha512batch/sign_edwards25519sha512batch_api.c
|
||||
|
||||
crypto_stream_src := crypto_stream/aes128ctr/portable/afternm_aes128ctr.c crypto_stream/aes128ctr/portable/beforenm_aes128ctr.c crypto_stream/aes128ctr/portable/common_aes128ctr.c crypto_stream/aes128ctr/portable/consts_aes128ctr.c crypto_stream/aes128ctr/portable/int128_aes128ctr.c crypto_stream/aes128ctr/portable/stream_aes128ctr.c crypto_stream/aes128ctr/portable/xor_afternm_aes128ctr.c crypto_stream/aes128ctr/stream_aes128ctr_api.c crypto_stream/chacha20/ref/stream_chacha20_ref.c crypto_stream/chacha20/stream_chacha20_api.c crypto_stream/crypto_stream.c crypto_stream/salsa20/ref/stream_salsa20_ref.c crypto_stream/salsa20/ref/xor_salsa20_ref.c crypto_stream/salsa20/stream_salsa20_api.c crypto_stream/salsa2012/ref/stream_salsa2012.c crypto_stream/salsa2012/ref/xor_salsa2012.c crypto_stream/salsa2012/stream_salsa2012_api.c crypto_stream/salsa208/ref/stream_salsa208.c crypto_stream/salsa208/ref/xor_salsa208.c crypto_stream/salsa208/stream_salsa208_api.c crypto_stream/xsalsa20/ref/stream_xsalsa20.c crypto_stream/xsalsa20/ref/xor_xsalsa20.c crypto_stream/xsalsa20/stream_xsalsa20_api.c
|
||||
|
||||
crypto_verify_src := crypto_verify/16/ref/verify_16.c crypto_verify/16/verify_16_api.c crypto_verify/32/ref/verify_32.c crypto_verify/32/verify_32_api.c crypto_verify/64/ref/verify_64.c crypto_verify/64/verify_64_api.c
|
||||
|
||||
randombytes_src := randombytes/randombytes.c randombytes/salsa20/randombytes_salsa20_random.c randombytes/sysrandom/randombytes_sysrandom.c
|
||||
|
||||
sodium_src := sodium/core.c sodium/runtime.c sodium/utils.c sodium/version.c
|
||||
|
||||
SODIUM_SOURCE := $(crypto_aead_src) $(crypto_auth_src) $(crypto_box_src) \
|
||||
$(crypto_core_src) $(crypto_generichash_src) $(crypto_hash_src) \
|
||||
$(crypto_onetimeauth_src) $(crypto_pwhash_src) $(crypto_scalarmult_src) \
|
||||
$(crypto_secretbox_src) $(crypto_shorthash_src) $(crypto_sign_src) \
|
||||
$(crypto_stream_src) $(crypto_verify_src) $(randombytes_src) $(sodium_src)
|
||||
|
||||
LOCAL_MODULE := sodium
|
||||
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/shadowsocks/libsodium/src/libsodium/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks/libsodium/src/libsodium/include/sodium \
|
||||
-DPACKAGE_NAME=\"libsodium\" -DPACKAGE_TARNAME=\"libsodium\" \
|
||||
-DPACKAGE_VERSION=\"1.0.1\" -DPACKAGE_STRING=\"libsodium\ 1.0.1\" \
|
||||
-DPACKAGE_BUGREPORT=\"https://github.com/jedisct1/libsodium/issues\" \
|
||||
-DPACKAGE_URL=\"https://github.com/jedisct1/libsodium\" \
|
||||
-DPACKAGE=\"libsodium\" -DVERSION=\"1.0.1\" -DSTDC_HEADERS=1 \
|
||||
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 \
|
||||
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 \
|
||||
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 \
|
||||
-D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 \
|
||||
-D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 \
|
||||
-DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_MMINTRIN_H=1 \
|
||||
-DHAVE_EMMINTRIN_H=1 -DHAVE_PMMINTRIN_H=1 -DHAVE_TMMINTRIN_H=1 \
|
||||
-DHAVE_SYS_MMAN_H=1 -DNATIVE_LITTLE_ENDIAN=1 \
|
||||
-DHAVE_WEAK_SYMBOLS=1 -DHAVE_ARC4RANDOM=1 -DHAVE_ARC4RANDOM_BUF=1 \
|
||||
-DHAVE_MLOCK=1 -DHAVE_MPROTECT=1 -DHAVE_POSIX_MEMALIGN=1
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks/libsodium/src/libsodium/,$(SODIUM_SOURCE))
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## libevent
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LIBEVENT_SOURCES := \
|
||||
buffer.c \
|
||||
bufferevent.c bufferevent_filter.c \
|
||||
bufferevent_openssl.c bufferevent_pair.c bufferevent_ratelim.c \
|
||||
bufferevent_sock.c epoll.c \
|
||||
epoll_sub.c evdns.c event.c \
|
||||
event_tagging.c evmap.c \
|
||||
evrpc.c evthread.c \
|
||||
evthread_pthread.c evutil.c \
|
||||
evutil_rand.c http.c \
|
||||
listener.c log.c poll.c \
|
||||
select.c signal.c strlcpy.c
|
||||
|
||||
LOCAL_MODULE := event
|
||||
LOCAL_SRC_FILES := $(addprefix libevent/, $(LIBEVENT_SOURCES))
|
||||
LOCAL_CFLAGS := -O2 -I$(LOCAL_PATH)/libevent \
|
||||
-I$(LOCAL_PATH)/libevent/include \
|
||||
-I$(LOCAL_PATH)/openssl/include
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## libipset
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
bdd_src = bdd/assignments.c bdd/basics.c bdd/bdd-iterator.c bdd/expanded.c \
|
||||
bdd/reachable.c bdd/read.c bdd/write.c
|
||||
map_src = map/allocation.c map/inspection.c map/ipv4_map.c map/ipv6_map.c \
|
||||
map/storage.c
|
||||
set_src = set/allocation.c set/inspection.c set/ipv4_set.c set/ipv6_set.c \
|
||||
set/iterator.c set/storage.c
|
||||
|
||||
IPSET_SOURCE := general.c $(bdd_src) $(map_src) $(set_src)
|
||||
|
||||
LOCAL_MODULE := libipset
|
||||
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/shadowsocks/libipset/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks/libcork/include
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks/libipset/,$(IPSET_SOURCE))
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## libcork
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
cli_src := cli/commands.c
|
||||
core_src := core/allocator.c core/error.c core/gc.c \
|
||||
core/hash.c core/ip-address.c core/mempool.c \
|
||||
core/timestamp.c core/u128.c
|
||||
ds_src := ds/array.c ds/bitset.c ds/buffer.c ds/dllist.c \
|
||||
ds/file-stream.c ds/hash-table.c ds/managed-buffer.c \
|
||||
ds/ring-buffer.c ds/slice.c
|
||||
posix_src := posix/directory-walker.c posix/env.c posix/exec.c \
|
||||
posix/files.c posix/process.c posix/subprocess.c
|
||||
pthreads_src := pthreads/thread.c
|
||||
|
||||
CORK_SOURCE := $(cli_src) $(core_src) $(ds_src) $(posix_src) $(pthreads_src)
|
||||
|
||||
LOCAL_MODULE := libcork
|
||||
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/shadowsocks/libcork/include \
|
||||
-DCORK_API=CORK_LOCAL
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks/libcork/,$(CORK_SOURCE))
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## libev
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libev
|
||||
LOCAL_CFLAGS += -O2 -DNDEBUG -DHAVE_CONFIG_H
|
||||
LOCAL_SRC_FILES := \
|
||||
libev/ev.c \
|
||||
libev/event.c
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## redsocks
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
REDSOCKS_SOURCES := base.c dnstc.c http-connect.c \
|
||||
log.c md5.c socks5.c \
|
||||
base64.c http-auth.c http-relay.c main.c \
|
||||
parser.c redsocks.c socks4.c utils.c
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libevent
|
||||
|
||||
LOCAL_MODULE := redsocks
|
||||
LOCAL_SRC_FILES := $(addprefix redsocks/, $(REDSOCKS_SOURCES))
|
||||
LOCAL_CFLAGS := -O2 -std=gnu99 -I$(LOCAL_PATH)/redsocks \
|
||||
-I$(LOCAL_PATH)/libevent/include \
|
||||
-I$(LOCAL_PATH)/libevent
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
########################################################
|
||||
## pdnsd library
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
PDNSD_SOURCES := $(wildcard $(LOCAL_PATH)/pdnsd/src/*.c)
|
||||
|
||||
LOCAL_MODULE := pdnsd
|
||||
LOCAL_SRC_FILES := $(PDNSD_SOURCES:$(LOCAL_PATH)/%=%)
|
||||
LOCAL_CFLAGS := -Wall -O2 -I$(LOCAL_PATH)/pdnsd
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
########################################################
|
||||
## shadowsocks local library
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
SHADOWSOCKS_SOURCES := local.c cache.c udprelay.c encrypt.c utils.c json.c jconf.c acl.c
|
||||
|
||||
LOCAL_MODULE := ss-local
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks/src/, $(SHADOWSOCKS_SOURCES))
|
||||
LOCAL_CFLAGS := -Wall -O2 -fno-strict-aliasing -DUDPRELAY_LOCAL \
|
||||
-DUSE_CRYPTO_OPENSSL -DANDROID -DHAVE_CONFIG_H \
|
||||
-I$(LOCAL_PATH)/libev/ \
|
||||
-I$(LOCAL_PATH)/openssl/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks/libcork/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks/libsodium/src/libsodium/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks/libsodium/src/libsodium/include/sodium \
|
||||
-I$(LOCAL_PATH)/shadowsocks/libipset/include
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libev libcrypto libipset libcork libsodium
|
||||
|
||||
LOCAL_LDLIBS := -llog
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
########################################################
|
||||
## shadowsocks tunnel
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
SHADOWSOCKS_SOURCES := tunnel.c cache.c udprelay.c encrypt.c utils.c json.c jconf.c
|
||||
|
||||
LOCAL_MODULE := ss-tunnel
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks/src/, $(SHADOWSOCKS_SOURCES))
|
||||
LOCAL_CFLAGS := -Wall -O2 -fno-strict-aliasing -DUDPRELAY_LOCAL -DUDPRELAY_TUNNEL \
|
||||
-DUSE_CRYPTO_OPENSSL -DANDROID -DHAVE_CONFIG_H -DSSTUNNEL_JNI \
|
||||
-I$(LOCAL_PATH)/libev/ \
|
||||
-I$(LOCAL_PATH)/shadowsocks/libsodium/src/libsodium/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks/libsodium/src/libsodium/include/sodium \
|
||||
-I$(LOCAL_PATH)/openssl/include
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libev libcrypto libsodium
|
||||
|
||||
LOCAL_LDLIBS := -llog
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
########################################################
|
||||
## system
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE:= system
|
||||
|
||||
LOCAL_SRC_FILES:= \
|
||||
system.cpp
|
||||
|
||||
LOCAL_LDLIBS := -ldl -llog
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := cpufeatures
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
########################################################
|
||||
## tun2socks
|
||||
########################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_CFLAGS := -std=gnu99
|
||||
LOCAL_CFLAGS += -DBADVPN_THREADWORK_USE_PTHREAD -DBADVPN_LINUX -DBADVPN_BREACTOR_BADVPN -D_GNU_SOURCE
|
||||
LOCAL_CFLAGS += -DBADVPN_USE_SELFPIPE -DBADVPN_USE_EPOLL
|
||||
LOCAL_CFLAGS += -DBADVPN_LITTLE_ENDIAN -DBADVPN_THREAD_SAFE
|
||||
LOCAL_CFLAGS += -DNDEBUG -DANDROID
|
||||
# LOCAL_CFLAGS += -DTUN2SOCKS_JNI
|
||||
|
||||
LOCAL_C_INCLUDES:= \
|
||||
$(LOCAL_PATH)/badvpn/lwip/src/include/ipv4 \
|
||||
$(LOCAL_PATH)/badvpn/lwip/src/include/ipv6 \
|
||||
$(LOCAL_PATH)/badvpn/lwip/src/include \
|
||||
$(LOCAL_PATH)/badvpn/lwip/custom \
|
||||
$(LOCAL_PATH)/badvpn/
|
||||
|
||||
TUN2SOCKS_SOURCES := \
|
||||
base/BLog_syslog.c \
|
||||
system/BReactor_badvpn.c \
|
||||
system/BSignal.c \
|
||||
system/BConnection_unix.c \
|
||||
system/BTime.c \
|
||||
system/BUnixSignal.c \
|
||||
system/BNetwork.c \
|
||||
flow/StreamRecvInterface.c \
|
||||
flow/PacketRecvInterface.c \
|
||||
flow/PacketPassInterface.c \
|
||||
flow/StreamPassInterface.c \
|
||||
flow/SinglePacketBuffer.c \
|
||||
flow/BufferWriter.c \
|
||||
flow/PacketBuffer.c \
|
||||
flow/PacketStreamSender.c \
|
||||
flow/PacketPassConnector.c \
|
||||
flow/PacketProtoFlow.c \
|
||||
flow/PacketPassFairQueue.c \
|
||||
flow/PacketProtoEncoder.c \
|
||||
flow/PacketProtoDecoder.c \
|
||||
socksclient/BSocksClient.c \
|
||||
tuntap/BTap.c \
|
||||
lwip/src/core/timers.c \
|
||||
lwip/src/core/udp.c \
|
||||
lwip/src/core/memp.c \
|
||||
lwip/src/core/init.c \
|
||||
lwip/src/core/pbuf.c \
|
||||
lwip/src/core/tcp.c \
|
||||
lwip/src/core/tcp_out.c \
|
||||
lwip/src/core/netif.c \
|
||||
lwip/src/core/def.c \
|
||||
lwip/src/core/mem.c \
|
||||
lwip/src/core/tcp_in.c \
|
||||
lwip/src/core/stats.c \
|
||||
lwip/src/core/inet_chksum.c \
|
||||
lwip/src/core/ipv4/icmp.c \
|
||||
lwip/src/core/ipv4/igmp.c \
|
||||
lwip/src/core/ipv4/ip4_addr.c \
|
||||
lwip/src/core/ipv4/ip_frag.c \
|
||||
lwip/src/core/ipv4/ip4.c \
|
||||
lwip/src/core/ipv4/autoip.c \
|
||||
lwip/src/core/ipv6/ethip6.c \
|
||||
lwip/src/core/ipv6/inet6.c \
|
||||
lwip/src/core/ipv6/ip6_addr.c \
|
||||
lwip/src/core/ipv6/mld6.c \
|
||||
lwip/src/core/ipv6/dhcp6.c \
|
||||
lwip/src/core/ipv6/icmp6.c \
|
||||
lwip/src/core/ipv6/ip6.c \
|
||||
lwip/src/core/ipv6/ip6_frag.c \
|
||||
lwip/src/core/ipv6/nd6.c \
|
||||
lwip/custom/sys.c \
|
||||
tun2socks/tun2socks.c \
|
||||
base/DebugObject.c \
|
||||
base/BLog.c \
|
||||
base/BPending.c \
|
||||
system/BDatagram_unix.c \
|
||||
flowextra/PacketPassInactivityMonitor.c \
|
||||
tun2socks/SocksUdpGwClient.c \
|
||||
udpgw_client/UdpGwClient.c
|
||||
|
||||
LOCAL_MODULE := tun2socks
|
||||
|
||||
LOCAL_LDLIBS := -ldl -llog
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix badvpn/, $(TUN2SOCKS_SOURCES))
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
# OpenSSL
|
||||
openssl_subdirs := $(addprefix $(LOCAL_PATH)/openssl/,$(addsuffix /Android.mk, \
|
||||
crypto \
|
||||
ssl \
|
||||
))
|
||||
include $(openssl_subdirs)
|
||||
|
||||
# Iptables
|
||||
# LOCAL_PATH := $(ROOT_PATH)
|
||||
# iptables_subdirs := $(addprefix $(LOCAL_PATH)/iptables/,$(addsuffix /Android.mk, \
|
||||
# iptables \
|
||||
# extensions \
|
||||
# libiptc \
|
||||
# ))
|
||||
# include $(iptables_subdirs)
|
||||
|
||||
# Import cpufeatures
|
||||
$(call import-module,android/cpufeatures)
|
||||
@@ -0,0 +1,4 @@
|
||||
APP_ABI := armeabi-v7a x86
|
||||
APP_PLATFORM := android-16
|
||||
APP_STL := stlport_static
|
||||
NDK_TOOLCHAIN_VERSION := 4.9
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user