Compare commits

...
142 Commits
Author SHA1 Message Date
Max Lv 64e6f14da1 bump version 2015-05-23 20:26:28 +08:00
Max Lv 3dd718dc01 update shadowsocks-libev 2015-05-18 10:03:29 +08:00
Max Lv 942d181e36 bump version 2015-05-10 20:47:11 +08:00
Max Lv fa083a8eca fix #295 2015-05-08 08:57:40 +08:00
Max Lv ef2ff23cd0 fix the style on lolipop 2015-05-02 22:51:26 +08:00
Max Lv c1e208737c Merge pull request #287 from vmlinz/master
Update sbt and sbt-android-plugin
2015-05-01 14:00:35 +08:00
Zaicheng Qi 75bb00593a Add jcenter resolver and update sbt to 0.13.8 2015-05-01 11:38:30 +08:00
Zaicheng Qi 15f25b95a0 Update sbt-android plugin to latest 2015-05-01 10:55:29 +08:00
Max Lv cc9fa4c4a6 refine the drawer indicator 2015-04-30 17:29:40 +08:00
Max Lv 9041404f42 add partial material design 2015-04-30 16:44:27 +08:00
Max Lv 5aae822cdd add qr code 2015-04-29 13:06:27 +08:00
Max Lv 33ed5c65c5 fix #279 2015-04-22 16:52:02 +08:00
Max Lv 1424e056ac disable IPv6 resolver in all route mode. #275 2015-04-09 17:32:00 +08:00
Max Lv ed79e0090e Update README.md 2015-04-08 17:34:10 +08:00
Max Lv 304113ce97 Update README.md 2015-04-08 14:52:21 +08:00
Max Lv 290bf8cb31 Delete .travis.yml 2015-04-08 14:31:45 +08:00
Max Lv fcb0e2ace3 Update README.md 2015-04-08 14:31:30 +08:00
Max Lv f240d5d202 bump version 2015-03-19 16:43:38 +08:00
Max Lv ea85bbd83d refine DNS on Kitkat 2015-03-19 16:34:22 +08:00
Max Lv d3018fc090 update travis 2015-03-10 16:42:02 +08:00
Max Lv f1f585b4d9 update travis 2015-03-10 16:34:40 +08:00
Max Lv 3653f73e0b update travis 2015-03-10 16:15:31 +08:00
Max Lv d648910aac fix travis 2015-03-10 09:59:30 +08:00
Max Lv 1e2f8c3bd3 Merge pull request #258 from lozen130/patch-1
Fix a coding style issue
2015-03-07 14:35:06 +08:00
Lozen Liu b94c16c725 Fix a coding style issue
Method name should conform to the standard
2015-03-07 14:32:29 +08:00
Max Lv a03a6af5ba update #250 2015-02-25 12:20:29 +08:00
Max Lv b9414c6b0a Merge pull request #249 from Mygod/master
Providing up navigation
2015-02-25 07:44:52 +08:00
Mygod 0d54d9cd9b bugfix 2015-02-24 22:52:57 +08:00
Mygod 8611a66cdc fix indent 2015-02-24 22:38:37 +08:00
Mygod 740dcc3ca9 providing up navigation 2015-02-24 22:34:14 +08:00
Max Lv 730efbafc0 refine URL parser 2015-02-09 18:45:40 +08:00
Max Lv 8b05476823 Merge pull request #241 from cloudtrends/master
add export ANDROID_NDK_HOME variable
2015-02-07 08:37:16 +08:00
ChunFeng 50b890423a add export ANDROID_NDK_HOME variable
add export ANDROID_NDK_HOME variable
2015-02-07 07:57:19 +08:00
Max Lv fb63268895 fix a corner case 2015-01-29 10:20:59 +08:00
Max Lv 41934f8909 try to workaround travis-ci's limit 2015-01-28 13:21:12 +08:00
Max Lv bedc7a0443 add caching to travis 2015-01-28 13:14:00 +08:00
Max Lv 537f790386 fix travis-ci 2015-01-28 13:03:29 +08:00
Max Lv 62afcf51d7 update travis-ci 2015-01-28 12:56:55 +08:00
Max Lv 6c1ae68931 update shadowsocks-libev 2015-01-27 21:00:25 +08:00
Max Lv 2703e91bbe bump version 2015-01-27 17:52:06 +08:00
Max Lv 8fba319db2 fix #228 2015-01-25 13:18:42 +08:00
Max Lv 3e04734b9b update shadowsocks-libev 2015-01-21 20:55:35 +08:00
Max Lv fe33997494 update shadowsocks-libev 2015-01-19 12:08:34 +08:00
Max Lv 86cd49d3e1 update shadowsocks-libev 2015-01-16 13:16:07 +08:00
Max Lv ff13792192 update strings 2015-01-16 13:11:51 +08:00
Max Lv f36a8c784d update shadowsocks-libev 2015-01-13 14:44:58 +08:00
Max Lv 57f8c0f307 disable notification auto-hiding on Kitkat and below #216 2015-01-11 21:26:59 +08:00
Max Lv 601c227644 update shadowsocks-libev 2015-01-08 12:14:54 +08:00
Max Lv 220143aee1 fix #211 2015-01-08 10:44:54 +08:00
Max Lv 81a19c4a81 bump version 2015-01-02 14:16:21 +08:00
Max Lv 27cc53baf8 revert to tcp_only mode 2014-12-28 21:47:43 +08:00
Max Lv 935fddcb15 update submodule 2014-12-28 10:05:12 +08:00
Max Lv 49458080a1 bump version 2014-12-28 09:50:11 +08:00
Max Lv 8101fc935e update shadowsocks 2014-12-27 19:55:33 +08:00
Max Lv 491ebe500f remove https dns query 2014-12-27 08:49:08 +08:00
Max Lv 98ce68774a update black list 2014-12-26 22:08:20 +08:00
Max Lv b0e20552dd refine list 2014-12-26 20:02:26 +08:00
Max Lv 0d478cfbc4 refine reject list 2014-12-26 17:54:35 +08:00
Max Lv d1d135ccdd refine dns black list 2014-12-26 17:30:20 +08:00
Max Lv a28303ee76 update reject list 2014-12-26 16:13:07 +08:00
Max Lv 2b09ebcd2c bump version 2014-12-24 17:38:17 +08:00
Max Lv 59ede2586a update google service 2014-12-24 17:26:48 +08:00
Max Lv abd1d0220c bump version for a build error 2014-12-20 16:42:38 +08:00
Max Lv 5427e00012 fallback to gcc 2014-12-20 10:40:13 +08:00
Max Lv 7f226d3f0c replace crouton with snackbar 2014-12-19 17:32:00 +08:00
Max Lv ee3f3c2338 fix for clang 2014-12-19 13:54:38 +08:00
Max Lv 6ac90abbf7 update OpenSSL's header 2014-12-18 15:29:21 +08:00
Max Lv 2f553b156a fix #188 2014-12-18 14:33:32 +08:00
Max Lv dec098fbc5 refine the lock screen receiver 2014-12-18 09:17:57 +08:00
Max Lv 000d03ad4c update shadowsocks-libev 2014-12-17 08:49:43 +08:00
Max Lv 667619f701 tune timeout for long tcp connection 2014-12-17 08:42:43 +08:00
Max Lv afd91b7155 fix #186 2014-12-15 17:19:40 +08:00
Max Lv e10272c8e5 disable uptest in pdnsd 2014-12-14 14:46:16 +08:00
Max Lv 0f5651fef7 refine pdnsd settings 2014-12-14 09:55:11 +08:00
Max Lv f258de36d7 update ulimit -n 2014-12-13 19:51:21 +08:00
Max Lv e71db2160e update shadowsocks 2014-12-13 18:54:59 +08:00
Max Lv f1cbfb7ea7 update shadowsocks 2014-12-13 16:11:43 +08:00
Max Lv 8c2a2f032a add salsa20 and chacha20 2014-12-13 15:59:08 +08:00
Max Lv 24d45cc2a2 Merge branch 'master' of github.com:shadowsocks/shadowsocks-android 2014-12-13 15:57:23 +08:00
Max Lv 5220f302c5 add libsodium 2014-12-13 15:55:55 +08:00
Max Lv f0ef6c8e35 fix #166 2014-12-12 13:19:55 +08:00
Max Lv 10de6ea6d9 remote the DNS WAR 2014-12-10 19:39:54 +08:00
Max Lv c1f55c80f9 refine UI 2014-12-10 17:54:47 +08:00
Max Lv 3503e7233f fix #176 2014-12-10 13:07:09 +08:00
Max Lv 3db8e9d775 refine #171 2014-12-09 21:04:54 +08:00
Max Lv e708e117be fix #171 2014-12-09 20:59:04 +08:00
Max Lv 836088534b bump version 2014-12-09 17:37:58 +08:00
Max Lv 6ae97e630e fix #170 2014-12-09 17:20:29 +08:00
Max Lv bae0b9e746 fix a bug 2014-12-08 14:53:30 +08:00
Max Lv 15262343f4 restore DNS nicely 2014-12-08 10:35:59 +08:00
Max Lv be31a0ce82 bump version 2014-12-06 19:16:08 +08:00
Max Lv 0b0b6137b8 disable NAT mode on lollipop by default 2014-12-06 19:15:41 +08:00
Max Lv 156b0c27f5 refine DNS settings 2014-12-06 11:54:42 +08:00
Max Lv ca99596270 Merge branch 'master' of github.com:shadowsocks/shadowsocks-android
Conflicts:
	src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
2014-12-06 11:30:07 +08:00
Max Lv e22ffa8601 improve DNS utils 2014-12-06 11:29:11 +08:00
Max Lv 24233f104a Fix #167 2014-12-04 19:21:22 +08:00
Max Lv 01306d527d Refine DNS settings 2014-12-02 15:36:27 +08:00
Max Lv 5547b42283 fix some DNS issues 2014-12-02 14:58:17 +08:00
Max Lv 3dba966355 fix two potential FCs 2014-12-01 14:04:21 +08:00
Max Lv c9a7dc8deb bump version 2014-12-01 10:56:03 +08:00
Max Lv 4df7634fae fix a FC 2014-11-30 21:26:57 +08:00
Max Lv 97dd8fa15e fix #132 2014-11-30 10:18:27 +08:00
Max Lv 4b37d88f74 refine VPN mode on L 2014-11-29 10:26:58 +08:00
Max Lv 8ee5d77c6f decrease timeout 2014-11-29 10:09:27 +08:00
Max Lv 8cbfad80f4 refine NAT mode on Lollipop 2014-11-29 10:03:28 +08:00
Max Lv 9857e42776 enable NAT mode on 5.0 again 2014-11-28 22:12:02 +08:00
Max Lv 2f84c74d06 bump version 2014-11-27 09:03:41 +08:00
Max Lv bf207eb9b8 fix an issue on 64bit 2014-11-26 13:13:11 +08:00
Max Lv 7e8dad5c76 Revert "fake proc name failed on LRX21R"
This reverts commit 185e7608ae.
2014-11-26 09:12:01 +08:00
Max Lv 185e7608ae fake proc name failed on LRX21R 2014-11-25 21:43:12 +08:00
Max Lv d844fc2457 refine fake proc name 2014-11-25 19:11:18 +08:00
Max Lv a1bdfa5bd9 fix #161 2014-11-25 16:52:04 +08:00
Max Lv 6c7f62c237 pass the tun fd directly to tun2socks 2014-11-25 08:59:30 +08:00
Max Lv 383e9404ec Run tun2socks in seprate process for now 2014-11-24 21:22:42 +08:00
Max Lv 16d2cd9a29 Merge branch 'master' of github.com:shadowsocks/shadowsocks-android 2014-11-24 18:08:31 +08:00
Max Lv 9ee2345fd6 add unix socket 2014-11-24 18:08:15 +08:00
Max Lv 567543d00e Call tun2socks in main process 2014-11-24 10:39:45 +08:00
Max Lv 7c2b717141 update gitignore 2014-11-21 21:08:06 +08:00
Max Lv 08d5d56e46 fix #158 and #155 2014-11-21 16:20:15 +08:00
Max Lv e22b145023 fix #158 2014-11-21 14:51:16 +08:00
Max Lv a10889bb5b fix a bug 2014-11-21 12:15:59 +08:00
Max Lv 800e85dc0d fix #146 2014-11-20 15:37:37 +08:00
Max Lv e778a313ba bump version 2014-11-20 09:22:12 +08:00
Max Lv a3519fbdc8 enable aarch64 and x86_64 build 2014-11-19 10:12:49 +08:00
Max Lv 486288a513 Merge pull request #152 from CzBiX/patch-1
Update pref_all.xml
2014-11-18 17:15:53 +08:00
Liu VRan 0111bd5471 Update pref_all.xml
set input type for port
2014-11-18 17:08:22 +08:00
Max Lv 66fe67ae21 fix build error 2014-11-18 10:24:15 +08:00
Max Lv 04a8b49abc update submodule 2014-11-18 09:16:10 +08:00
Max Lv 3561c7f317 update sdk plugin 2014-11-18 09:14:29 +08:00
Max Lv 694534be58 add missing file 2014-11-17 21:24:51 +08:00
Max Lv efb614030f disable NAT mode again 2014-11-17 20:56:17 +08:00
Max Lv 8f41ea291f bump version 2014-11-17 20:23:10 +08:00
Max Lv 27ba7d64f4 fix a very old bug in redsocks 2014-11-17 19:51:08 +08:00
Max Lv 8fb5d7f8c6 fix a bug in autostart 2014-11-17 14:48:57 +08:00
Max Lv 014692cb84 udpate default settings 2014-11-17 09:44:11 +08:00
Max Lv 948db260b6 bump version 2014-11-17 09:39:34 +08:00
Max Lv b7c3c7d269 enable NAT mode again 2014-11-17 09:15:01 +08:00
Max Lv 897b222aa8 refine some strings 2014-11-17 08:46:12 +08:00
Max Lv 9a724cd063 fix #148 2014-11-16 21:35:54 +08:00
Max Lv b15a4604f2 fix chn list 2014-11-15 12:28:17 +08:00
Max Lv 2e3a2c9544 bypass private IP on Lollipop 2014-11-13 20:33:02 +08:00
Max Lv d6ed052338 clean up 2014-11-13 18:15:39 +08:00
2885 changed files with 12261 additions and 47891 deletions
+1 -4
View File
@@ -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
View File
@@ -1,3 +1,3 @@
[submodule "jni/shadowsocks"]
path = jni/shadowsocks
url = https://github.com/madeye/shadowsocks-libev.git
[submodule "src/main/jni/shadowsocks-libev"]
path = src/main/jni/shadowsocks-libev
url = https://github.com/shadowsocks/shadowsocks-libev
-23
View File
@@ -1,23 +0,0 @@
language: scala
scala:
- 2.10.4
before_install:
- sudo apt-get update
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.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_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-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
+12 -10
View File
@@ -6,14 +6,14 @@ Help to translate shadowsocks: http://crowdin.net/project/shadowsocks/invite
[![Google Play](http://developer.android.com/images/brand/en_generic_rgb_wo_45.png)](https://play.google.com/store/apps/details?id=com.github.shadowsocks)
### TRAVIS CI STATUS
### CI STATUS
[![Build Status](https://secure.travis-ci.org/shadowsocks/shadowsocks-android.png)](http://travis-ci.org/shadowsocks/shadowsocks-android)
[![Build Status](https://drone.io/github.com/shadowsocks/shadowsocks-android/status.png)](https://drone.io/github.com/shadowsocks/shadowsocks-android/latest)
### PREREQUISITES
* JDK 1.6+
* SBT 0.12.3
* JDK 1.7+
* SBT 0.13.0+
* Android SDK r21+
* Android NDK r9+
@@ -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
```
@@ -40,7 +40,9 @@ 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`
* Add `export ANDROID_NDK_HOME=/usr/local/Cellar/android-ndk/$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 +52,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
```
-28
View File
@@ -1,28 +0,0 @@
#!/bin/bash
function try () {
"$@" || exit -1
}
# Build
try $ANDROID_NDK_HOME/ndk-build clean
try $ANDROID_NDK_HOME/ndk-build
# copy executables
rm -rf src/main/assets/armeabi-v7a
rm -rf src/main/assets/x86
mkdir -p src/main/assets/armeabi-v7a
mkdir -p src/main/assets/x86
for app in pdnsd redsocks iptables
do
try mv libs/armeabi-v7a/$app src/main/assets/armeabi-v7a/
try mv libs/x86/$app src/main/assets/x86/
done
# copy libraries
rm -rf src/main/jni/armeabi-v7a
rm -rf src/main/jni/x86
mkdir -p src/main/jni/armeabi-v7a
mkdir -p src/main/jni/x86
try mv libs/armeabi-v7a/*.so src/main/jni/armeabi-v7a/
try mv libs/x86/*.so src/main/jni/x86/
+18 -8
View File
@@ -10,25 +10,34 @@ name := "shadowsocks"
compileOrder in Compile := CompileOrder.JavaThenScala
ndkJavah in Android := List()
ndkBuild in Android := List()
typedResources in Android := false
resolvers += Resolver.jcenterRepo
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",
"dnsjava" % "dnsjava" % "2.1.7",
"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(
"com.joanzapata.android" % "android-iconify" % "1.0.9",
"net.glxn.qrgen" % "android" % "2.0",
"net.simonvt.menudrawer" % "menudrawer" % "3.0.6",
"com.google.android.gms" % "play-services" % "5.0.89",
"com.android.support" % "support-v4" % "19.1.0"
"com.google.android.gms" % "play-services-base" % "6.5.87",
"com.google.android.gms" % "play-services-ads" % "6.5.87",
"com.android.support" % "support-v4" % "21.0.3"
)
libraryDependencies ++= Seq(
"de.keyboardsurfer.android.widget" % "crouton" % "1.8.4" exclude("com.google.android", "support-v4"),
"com.github.mrengineer13" % "snackbar" % "0.5.0",
"com.nostra13.universalimageloader" % "universal-image-loader" % "1.8.4",
"com.j256.ormlite" % "ormlite-core" % "4.47",
"com.j256.ormlite" % "ormlite-android" % "4.47"
@@ -41,6 +50,7 @@ proguardOptions in Android ++= Seq("-keep class android.support.v4.app.** { *; }
"-keep class org.jraf.android.backport.** { *; }",
"-keep class com.github.shadowsocks.** { *; }",
"-keep class * extends com.j256.ormlite.** { *; }",
"-keep class com.joanzapata.** { *; }",
"-keepattributes *Annotation*",
"-dontwarn org.xbill.**",
"-dontwarn com.actionbarsherlock.**")
Executable
+24
View File
@@ -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
File diff suppressed because it is too large Load Diff
-4488
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-347
View File
@@ -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)
-84
View File
@@ -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 5cc77c066b
+1 -1
View File
@@ -1 +1 @@
sbt.version=0.13.5
sbt.version=0.13.8
+4 -2
View File
@@ -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.22")
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")
resolvers += Resolver.sbtPluginRepo("snapshots")
addSbtPlugin("com.hanhuy.sbt" % "sbt-idea" % "1.7.0-SNAPSHOT")
+6 -5
View File
@@ -1,14 +1,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.shadowsocks"
android:versionCode="78"
android:versionName="2.3.3">
android:versionCode="106"
android:versionName="2.6.8">
<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"
@@ -67,7 +65,8 @@
<activity
android:name=".AppManager"
android:theme="@style/Theme.AppManager"
android:label="@string/app_name">
android:label="@string/app_name"
android:parentActivityName=".Shadowsocks">
<intent-filter>
<action android:name="com.github.shadowsocks.AppManager"/>
<category android:name="android.intent.category.DEFAULT"/>
@@ -76,11 +75,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.
+405
View File
@@ -0,0 +1,405 @@
# 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-libev/libsodium/src/libsodium/include \
-I$(LOCAL_PATH)/shadowsocks-libev/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-libev/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-libev/libipset/include \
-I$(LOCAL_PATH)/shadowsocks-libev/libcork/include
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/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-libev/libcork/include \
-DCORK_API=CORK_LOCAL
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/libcork/,$(CORK_SOURCE))
include $(BUILD_STATIC_LIBRARY)
########################################################
## libudns
########################################################
include $(CLEAR_VARS)
UDNS_SOURCES := udns_dn.c udns_dntosp.c udns_parse.c udns_resolver.c udns_init.c \
udns_misc.c udns_XtoX.c \
udns_rr_a.c udns_rr_ptr.c udns_rr_mx.c udns_rr_txt.c udns_bl.c \
udns_rr_srv.c udns_rr_naptr.c udns_codes.c udns_jran.c
LOCAL_MODULE := libudns
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/shadowsocks-libev/libudns \
-DHAVE_DECL_INET_NTOP
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/libudns/,$(UDNS_SOURCES))
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-libev local library
########################################################
include $(CLEAR_VARS)
SHADOWSOCKS_SOURCES := local.c cache.c udprelay.c encrypt.c utils.c netutils.c json.c jconf.c acl.c
LOCAL_MODULE := ss-local
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/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-libev/libudns \
-I$(LOCAL_PATH)/shadowsocks-libev/libcork/include \
-I$(LOCAL_PATH)/shadowsocks-libev/libsodium/src/libsodium/include \
-I$(LOCAL_PATH)/shadowsocks-libev/libsodium/src/libsodium/include/sodium \
-I$(LOCAL_PATH)/shadowsocks-libev/libipset/include
LOCAL_STATIC_LIBRARIES := libev libcrypto libipset libcork libudns libsodium
LOCAL_LDLIBS := -llog
include $(BUILD_EXECUTABLE)
########################################################
## shadowsocks-libev tunnel
########################################################
include $(CLEAR_VARS)
SHADOWSOCKS_SOURCES := tunnel.c cache.c udprelay.c encrypt.c utils.c netutils.c json.c jconf.c
LOCAL_MODULE := ss-tunnel
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/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-libev/libudns \
-I$(LOCAL_PATH)/shadowsocks-libev/libcork/include \
-I$(LOCAL_PATH)/shadowsocks-libev/libsodium/src/libsodium/include \
-I$(LOCAL_PATH)/shadowsocks-libev/libsodium/src/libsodium/include/sodium \
-I$(LOCAL_PATH)/openssl/include
LOCAL_STATIC_LIBRARIES := libev libcrypto libsodium libcork libudns
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)

Some files were not shown because too many files have changed in this diff Show More