Compare commits

...
222 Commits
Author SHA1 Message Date
Max Lv 5bce2ca8b6 bump version 2015-10-23 09:51:25 +08:00
Max Lv 58c613b365 use runner service to start the background service on Lolipop or above 2015-10-16 15:52:12 +08:00
Max Lv 446a71db93 make activity invisible again 2015-10-16 15:20:07 +08:00
Max Lv a3b2357d72 bump version 2015-10-16 14:45:58 +08:00
Max Lv 8d456e3d64 update plugin 2015-10-16 09:14:03 +08:00
Max Lv 4ff77701be update the default timeout 2015-10-13 15:40:16 +08:00
Max Lv 78e7175f7d update chnroute 2015-10-12 17:09:06 +08:00
Max Lv 0d03a09682 update plugin 2015-10-07 16:34:56 +08:00
Max Lv 62745de01b bump version 2015-10-05 20:49:44 +08:00
Max Lv bb81fe1339 fix close receiver 2015-10-05 20:47:48 +08:00
Max Lv 66d70f1545 update shadowsocks-libev 2015-10-05 16:56:52 +08:00
Max Lv ff0ddd5979 force VpnService as a foreground service 2015-10-05 16:53:22 +08:00
Max Lv bf3933bf2e Merge pull request #379 from Mygod/master
SAM (Scala 2.11.7)
2015-10-04 17:45:02 +08:00
Mygod d111bc8282 Using SAM 2015-10-04 15:13:16 +08:00
Mygod a57c06e304 Use SAM 2015-10-04 13:53:25 +08:00
Mygod 3605e18db2 Update dependencies 2015-10-04 13:43:08 +08:00
Max Lv 1ad8297278 fix #375 2015-10-03 21:06:16 +08:00
Max Lv 458f49d345 Merge pull request #376 from Mygod/master
Migrate to Android 6.0 (1)
2015-10-03 20:53:57 +08:00
Mygod 6b9b7b6749 Migrate to Android 6.0 (1) 2015-10-03 18:37:48 +08:00
Max Lv d542bafb7d bump version 2015-09-28 21:07:39 +08:00
Max Lv bbb62be458 fix a race condition 2015-09-28 21:05:41 +08:00
Max Lv b272d7ab71 fix #368 2015-09-28 13:07:47 +08:00
Max Lv 09d53033cb update shadowsocks-libev 2015-09-28 10:41:44 +08:00
Max Lv 496c809186 update sdk 2015-09-25 12:32:56 +08:00
Max Lv b58ffb7a95 refine strings 2015-09-25 12:06:10 +08:00
Max Lv 3512542043 fix #366 2015-09-25 09:43:09 +08:00
Max Lv 0c940c8860 update shadowsocks-libev 2015-09-24 18:51:45 +08:00
Max Lv 00253ea3f6 update shadowsocks-libev 2015-09-24 13:08:08 +08:00
Max Lv d836aafe40 refine strings 2015-09-23 16:13:39 +08:00
Max Lv 60360e6a19 update shadowsocks-libev 2015-09-23 13:30:56 +08:00
Max Lv 5939f2776c fix a buffer corruption 2015-09-22 20:36:56 +08:00
Max Lv 0cecc62035 update shadowsocks-libev 2015-09-22 18:34:44 +08:00
Max Lv 7a6fbaca15 bump version 2015-09-21 19:09:16 +08:00
Max Lv 2a3ffd768c update shadowsocks-libev 2015-09-21 14:03:02 +08:00
Max Lv 33b775ea5e update plugin 2015-09-18 16:58:03 +08:00
Max Lv 0be4d39606 update shadowsocks-libev 2015-09-18 12:05:20 +08:00
Max Lv ee7e4c9711 update shadowsocks-libev 2015-09-13 14:30:32 +08:00
Max Lv c1c8ff309c update shadowsocks-libev 2015-09-09 09:12:33 +08:00
Max Lv 8724bf325f update shadowsocks-libev 2015-09-05 19:17:28 +08:00
Max Lv 20395ede5f update shadowsocks-libev 2015-09-04 07:13:59 +08:00
Max Lv 336fa3b775 fix a UI bug 2015-08-31 13:05:45 +08:00
Max Lv 11bfef423a update shadowsocks-libev 2015-08-30 12:09:37 +08:00
Max Lv 6e0534b00f bump version 2015-08-20 15:29:04 +08:00
Max Lv bf960f1a64 fix #350 2015-08-20 15:28:36 +08:00
Max Lv b1e01d2158 fix a typo 2015-08-20 13:08:20 +08:00
Max Lv f344eb783c update chnroute 2015-08-20 13:06:52 +08:00
Max Lv 5f6effba09 Merge pull request #346 from clowwindy/nodelay
add tcp_nagle_disable in tun2socks
2015-08-18 17:34:47 +08:00
clowwindy 97cfd1f869 add tcp_nagle_disable in tun2socks 2015-08-18 17:27:49 +08:00
Max Lv 97bd714beb drop abstract domain socket 2015-08-07 22:30:09 +08:00
Max Lv 9a841e901c refine the exception handling 2015-08-05 12:22:49 +08:00
Max Lv de7e516204 fix MTU 2015-08-05 10:22:45 +08:00
Max Lv c31a5c1951 use abstract namespace 2015-08-04 09:23:36 +08:00
Max Lv 6c47c361f7 update reject list 2015-08-03 14:00:59 +08:00
Max Lv ddd37a3219 update dns 2015-08-03 13:03:30 +08:00
Max Lv 01125d53b3 update shadowsocks-libev 2015-08-03 11:02:40 +08:00
Max Lv 9613d65303 fix a issue of progress dialog 2015-08-02 08:22:20 +08:00
Max Lv a510b11187 update shadowsocks-libev 2015-07-31 16:40:33 +08:00
Max Lv 051e600e59 bump version 2015-07-31 16:30:54 +08:00
Max Lv fea9a6f919 refine the binary update 2015-07-31 16:05:03 +08:00
Max Lv c2c7cabbaf refine dns resolve 2015-07-30 13:35:04 +08:00
Max Lv 092d880c7d refine binary install 2015-07-29 13:49:08 +08:00
Max Lv c208c4bf50 refine profile initilizing 2015-07-28 15:49:05 +08:00
Max Lv 34af6aeef5 refine the IPC to tun2socks 2015-07-28 14:48:21 +08:00
Max Lv d9af2f93e0 fix plugin 2015-07-27 11:09:52 +08:00
Max Lv aae068b7b2 fix a UI issue 2015-07-26 10:22:15 +08:00
Max Lv 7626c1117e bump version 2015-07-26 09:36:04 +08:00
Max Lv 1188b59b05 update shadowsocks-libev 2015-07-26 09:10:46 +08:00
Max Lv cbd46d0c95 enable acl on devices before 5.0 2015-07-26 09:10:17 +08:00
Max Lv 8d02a1a6a4 Merge pull request #334 from shadowsocks/android-ipc
Improve the compatibility by using IPC
2015-07-25 06:59:37 +08:00
Max Lv 9f67636464 update shadowsocks-libev 2015-07-25 06:57:37 +08:00
Max Lv abb97e16c4 play tricks to close fd manually 2015-07-24 23:07:58 +08:00
Max Lv 541f8de2cf close socket properly 2015-07-24 22:35:39 +08:00
Max Lv 7c31f5e5b4 refine IPC handling 2015-07-24 21:38:49 +08:00
Max Lv 809f4c13e0 add management thread 2015-07-24 18:56:01 +08:00
Max Lv 04725803e4 add android ipc feature 2015-07-24 14:15:43 +08:00
Max Lv faad961804 Merge pull request #330 from shadowsocks/unix-socket
Pass the file descriptor through unix domain socket
2015-07-22 18:42:41 +08:00
Max Lv 2f7424d07b fix an issue 2015-07-22 18:34:18 +08:00
Max Lv fd4015fac2 add unix socket 2015-07-22 18:06:28 +08:00
Max Lv f2c39bd16e update shadowsocks-libev 2015-07-22 14:52:30 +08:00
Max Lv e849a9e2cb Merge branch 'master' of github.com:shadowsocks/shadowsocks-android 2015-07-14 09:15:07 +08:00
Max Lv 524d3b6fdc update shadowsocks-libev 2015-07-14 09:14:50 +08:00
Max Lv 6f5db34a6f Update about.html 2015-07-14 09:12:53 +08:00
Max Lv 3c161be1e4 Update README.md 2015-07-14 09:12:18 +08:00
Max Lv 1c30fdb8f2 update shadowsocks-libev 2015-07-13 09:59:46 +08:00
Max Lv ce24ddb9ed update shadowsocks-libev 2015-07-11 08:45:24 +08:00
Max Lv 17eaf25b4f disable fake proc name 2015-07-09 12:00:06 +08:00
Max Lv f4b171a3d9 Update README.md 2015-06-18 14:37:50 +08:00
Max Lv ae9622a1b3 update shadowsocks-libev 2015-06-15 09:46:10 +08:00
Max Lv 44e1b9daa3 fix #317 2015-06-11 09:11:17 +08:00
Max Lv 7a2c42626b update licenses 2015-06-11 08:51:48 +08:00
Max Lv adb979a111 Merge pull request #312 from haobug/depends
update dependency versions
2015-06-06 15:51:31 +04:00
qinghao 1e23307f95 update dependency versions 2015-06-06 15:38:04 +08:00
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
2895 changed files with 13448 additions and 48225 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
+24 -12
View File
@@ -6,16 +6,16 @@ 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
* Android SDK r21+
* Android NDK r9+
* JDK 1.7+
* SBT 0.13.0+
* Android SDK r24+
* Android NDK r10d+
### BUILD
@@ -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,12 +52,22 @@ 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
```
## OPEN SOURCE LICENSES
* shadowsocks-libev: [GPLv3](https://github.com/shadowsocks/shadowsocks-libev/blob/master/LICENSE)
* tun2socks: [BSD](https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/badvpn/COPYING)
* redsocks: [APL 2.0](https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/redsocks/README)
* OpenSSL: [OpenSSL](https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/openssl/NOTICE)
* pdnsd: [GPLv3](https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/pdnsd/COPYING)
* libev: [GPLv2](https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/libev/LICENSE)
* libevent: [BSD](https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/libevent/LICENSE)
### LICENSE
Copyright (C) 2014 Max Lv <max.c.lv@gmail.com>
-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/
+29 -19
View File
@@ -1,37 +1,45 @@
import android.Keys._
import android.Dependencies.{apklib,aar}
android.Plugin.androidBuild
platformTarget in Android := "android-21"
platformTarget in Android := "android-23"
name := "shadowsocks"
scalaVersion := "2.11.7"
compileOrder in Compile := CompileOrder.JavaThenScala
javacOptions ++= Seq("-source", "1.6", "-target", "1.6")
scalacOptions ++= Seq("-target:jvm-1.6", "-Xexperimental")
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" % "6.0",
"commons-net" % "commons-net" % "3.3",
"com.google.zxing" % "android-integration" % "2.2"
)
libraryDependencies ++= Seq(
"com.google.zxing" % "android-integration" % "3.1.0",
"com.joanzapata.android" % "android-iconify" % "1.0.11",
"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"
)
libraryDependencies ++= Seq(
"de.keyboardsurfer.android.widget" % "crouton" % "1.8.4" exclude("com.google.android", "support-v4"),
"com.google.android.gms" % "play-services-base" % "8.1.0",
"com.google.android.gms" % "play-services-ads" % "8.1.0",
"com.google.android.gms" % "play-services-analytics" % "8.1.0",
"com.android.support" % "support-v4" % "23.0.1",
"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"
"com.j256.ormlite" % "ormlite-core" % "4.48",
"com.j256.ormlite" % "ormlite-android" % "4.48"
)
proguardOptions in Android ++= Seq("-keep class android.support.v4.app.** { *; }",
@@ -41,6 +49,8 @@ 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 com.google.android.gms.internal.zzhu",
"-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 -j8
# 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
+13 -9
View File
@@ -24,6 +24,8 @@ def main():
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"112.124.47.0/24",
"114.114.114.0/24",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
@@ -39,16 +41,18 @@ def main():
]))
china_list_set += internal_list
# 取反
all = IPy.IPSet([IPy.IP("0.0.0.0/0")])
# 剔除所有孤立的C段
for ip in china_list_set:
all.discard(ip)
all = china_list_set
filter = itertools.ifilter(lambda x: len(x) <= 65536, all)
for ip in filter:
all.discard(ip)
all.add(IPy.IP(ip.strNormal(0)).make_net('255.255.0.0'))
# 取反
# all = IPy.IPSet([IPy.IP("0.0.0.0/0")])
# 剔除所有孤立的C段
# for ip in china_list_set:
# all.discard(ip)
# filter = itertools.ifilter(lambda x: len(x) <= 65536, all)
# for ip in filter:
# all.discard(ip)
# all.add(IPy.IP(ip.strNormal(0)).make_net('255.255.0.0'))
# 输出结果
for ip in all:
-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 c0b5a13973
+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.5.6")
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")
resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.7.0-SNAPSHOT")
+90 -84
View File
@@ -1,101 +1,107 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.shadowsocks"
android:versionCode="81"
android:versionName="2.4.1">
package="com.github.shadowsocks"
android:versionCode="120"
android:versionName="2.8.3">
<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-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false"/>
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false"/>
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="21"/>
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="23"/>
<application
android:allowBackup="true"
android:name=".ShadowsocksApplication"
android:hardwareAccelerated="true"
android:icon="@drawable/ic_launcher"
android:backupAgent=".ShadowsocksBackupAgent"
android:label="@string/app_name">
<application
android:allowBackup="true"
android:name=".ShadowsocksApplication"
android:hardwareAccelerated="true"
android:icon="@drawable/ic_launcher"
android:backupAgent=".ShadowsocksBackupAgent"
android:label="@string/app_name">
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<meta-data android:name="com.google.android.backup.api_key"
android:value="AEdPqrEAAAAI_zVxZthz2HDuz9toTvkYvL0L5GA-OjeUIfBeXg"/>
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<meta-data android:name="com.google.android.backup.api_key"
android:value="AEdPqrEAAAAI_zVxZthz2HDuz9toTvkYvL0L5GA-OjeUIfBeXg"/>
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
<activity
android:name=".Shadowsocks"
android:label="@string/app_name"
android:theme="@style/Theme.Shadowsocks"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".Shadowsocks"
android:label="@string/app_name"
android:theme="@style/Theme.Shadowsocks"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".ParserActivity"
android:theme="@style/PopupTheme"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="ss"/>
</intent-filter>
</activity>
<activity
android:name=".ParserActivity"
android:theme="@style/PopupTheme"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="ss"/>
</intent-filter>
</activity>
<activity
android:name=".ShadowsocksRunnerActivity"
android:theme="@android:style/Theme.NoDisplay"
android:launchMode="singleTask">
</activity>
<activity
android:name=".ShadowsocksRunnerActivity"
android:theme="@android:style/Theme.NoDisplay"
android:launchMode="singleTask">
</activity>
<activity
android:name=".AppManager"
android:theme="@style/Theme.AppManager"
android:label="@string/app_name">
<intent-filter>
<action android:name="com.github.shadowsocks.AppManager"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity
android:name=".AppManager"
android:theme="@style/Theme.AppManager"
android:label="@string/app_name"
android:parentActivityName=".Shadowsocks">
<intent-filter>
<action android:name="com.github.shadowsocks.AppManager"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<service
android:name=".ShadowsocksNatService"
android:exported="false">
</service>
<service
android:name=".ShadowsocksRunnerService"
android:exported="false">
</service>
<service
android:name=".ShadowsocksVpnService"
android:label="@string/app_name"
android:permission="android.permission.BIND_VPN_SERVICE"
android:exported="false">
<intent-filter>
<action android:name="android.net.VpnService"/>
</intent-filter>
</service>
<service
android:name=".ShadowsocksNatService"
android:process=":nat"
android:exported="false">
</service>
<receiver android:name=".ShadowsocksReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="com.github.shadowsocks.ACTION_UPDATE_STATE"/>
</intent-filter>
</receiver>
<service
android:name=".ShadowsocksVpnService"
android:process=":vpn"
android:label="@string/app_name"
android:permission="android.permission.BIND_VPN_SERVICE"
android:exported="false">
<intent-filter>
<action android:name="android.net.VpnService"/>
</intent-filter>
</service>
</application>
<receiver android:name=".ShadowsocksReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="com.github.shadowsocks.ACTION_UPDATE_STATE"/>
</intent-filter>
</receiver>
</application>
</manifest>
@@ -10,6 +10,8 @@ public class Config implements Parcelable {
public boolean isBypassApps = false;
public boolean isTrafficStat = false;
public boolean isUdpDns = false;
public boolean isAuth = false;
public boolean isIpv6 = false;
public String profileName = "Untitled";
public String proxy = "127.0.0.1";
@@ -33,13 +35,15 @@ public class Config implements Parcelable {
};
public Config(boolean isGlobalProxy, boolean isGFWList, boolean isBypassApps,
boolean isTrafficStat, boolean isUdpDns, String profileName, String proxy, String sitekey,
boolean isTrafficStat, boolean isUdpDns, boolean isAuth, boolean isIpv6, String profileName, String proxy, String sitekey,
String encMethod, String proxiedAppString, String route, int remotePort, int localPort) {
this.isGlobalProxy = isGlobalProxy;
this.isGFWList = isGFWList;
this.isBypassApps = isBypassApps;
this.isTrafficStat = isTrafficStat;
this.isUdpDns = isUdpDns;
this.isAuth = isAuth;
this.isIpv6 = isIpv6;
this.profileName = profileName;
this.proxy = proxy;
this.sitekey = sitekey;
@@ -60,6 +64,8 @@ public class Config implements Parcelable {
isBypassApps = in.readInt() == 1;
isTrafficStat = in.readInt() == 1;
isUdpDns = in.readInt() == 1;
isAuth = in.readInt() == 1;
isIpv6 = in.readInt() == 1;
profileName = in.readString();
proxy = in.readString();
sitekey = in.readString();
@@ -80,6 +86,8 @@ public class Config implements Parcelable {
out.writeInt(isBypassApps ? 1 : 0);
out.writeInt(isTrafficStat ? 1 : 0);
out.writeInt(isUdpDns ? 1 : 0);
out.writeInt(isAuth ? 1 : 0);
out.writeInt(isIpv6 ? 1 : 0);
out.writeString(profileName);
out.writeString(proxy);
out.writeString(sitekey);
+11
View File
@@ -286,6 +286,17 @@ GNU General Public License for more details.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
<h3>Open Source Licenses</h3>
<ul>
<li>shadowsocks-libev: <a href="https://github.com/shadowsocks/shadowsocks-libev/blob/master/LICENSE">GPLv3</a></li>
<li>tun2socks: <a href="https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/badvpn/COPYING">BSD</a></li>
<li>redsocks: <a href="https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/redsocks/README">APL 2.0</a></li>
<li>OpenSSL: <a href="https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/openssl/NOTICE">OpenSSL</a></li>
<li>pdnsd: <a href="https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/pdnsd/COPYING">GPLv3</a></li>
<li>libev: <a href="https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/libev/LICENSE">GPLv2</a></li>
<li>libevent: <a href="https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/libevent/LICENSE">BSD</a></li>
</ul>
</body>
</html>
<!-- This document was created with MarkdownPad, the Markdown editor for Windows (http://markdownpad.com) -->
+123
View File
@@ -0,0 +1,123 @@
/*
* Copyright (C) 2007 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.
*/
package android.util;
/**
* Math routines similar to those found in {@link java.lang.Math}.
*
* <p>Historically these methods were faster than the equivalent double-based
* {@link java.lang.Math} methods. On versions of Android with a JIT they
* became slower and have since been re-implemented to wrap calls to
* {@link java.lang.Math}. {@link java.lang.Math} should be used in
* preference.
*
* @deprecated Use {@link java.lang.Math} instead.
*/
@Deprecated
public class FloatMath {
/** Prevents instantiation. */
private FloatMath() {}
/**
* Returns the float conversion of the most positive (i.e. closest to
* positive infinity) integer value which is less than the argument.
*
* @param value to be converted
* @return the floor of value
*/
public static float floor(float value) {
return (float) Math.floor(value);
}
/**
* Returns the float conversion of the most negative (i.e. closest to
* negative infinity) integer value which is greater than the argument.
*
* @param value to be converted
* @return the ceiling of value
*/
public static float ceil(float value) {
return (float) Math.ceil(value);
}
/**
* Returns the closest float approximation of the sine of the argument.
*
* @param angle to compute the cosine of, in radians
* @return the sine of angle
*/
public static float sin(float angle) {
return (float) Math.sin(angle);
}
/**
* Returns the closest float approximation of the cosine of the argument.
*
* @param angle to compute the cosine of, in radians
* @return the cosine of angle
*/
public static float cos(float angle) {
return (float) Math.cos(angle);
}
/**
* Returns the closest float approximation of the square root of the
* argument.
*
* @param value to compute sqrt of
* @return the square root of value
*/
public static float sqrt(float value) {
return (float) Math.sqrt(value);
}
/**
* Returns the closest float approximation of the raising "e" to the power
* of the argument.
*
* @param value to compute the exponential of
* @return the exponential of value
*/
public static float exp(float value) {
return (float) Math.exp(value);
}
/**
* Returns the closest float approximation of the result of raising {@code
* x} to the power of {@code y}.
*
* @param x the base of the operation.
* @param y the exponent of the operation.
* @return {@code x} to the power of {@code y}.
*/
public static float pow(float x, float y) {
return (float) Math.pow(x, y);
}
/**
* Returns {@code sqrt(}<i>{@code x}</i><sup>{@code 2}</sup>{@code +} <i>
* {@code y}</i><sup>{@code 2}</sup>{@code )}.
*
* @param x a float number
* @param y a float number
* @return the hypotenuse
*/
public static float hypot(float x, float y) {
return (float) Math.hypot(x, y);
}
}
@@ -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);
}
@@ -45,4 +45,6 @@ public class System {
public static native void exec(String cmd);
public static native String getABI();
public static native int sendfd(int fd);
public static native void jniclose(int fd);
}
@@ -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);
}
+426
View File
@@ -0,0 +1,426 @@
# 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)
########################################################
## libancillary
########################################################
include $(CLEAR_VARS)
ANCILLARY_SOURCE := fd_recv.c fd_send.c
LOCAL_MODULE := libancillary
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/libancillary
LOCAL_SRC_FILES := $(addprefix libancillary/, $(ANCILLARY_SOURCE))
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 android.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)/libancillary \
-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 libancillary
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 android.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)/libancillary \
-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 libancillary
LOCAL_LDLIBS := -llog
include $(BUILD_EXECUTABLE)
########################################################
## system
########################################################
include $(CLEAR_VARS)
LOCAL_MODULE:= system
LOCAL_C_INCLUDES:= $(LOCAL_PATH)/libancillary
LOCAL_SRC_FILES:= system.cpp
LOCAL_LDLIBS := -ldl -llog
LOCAL_STATIC_LIBRARIES := cpufeatures libancillary
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_STATIC_LIBRARIES := libancillary
LOCAL_C_INCLUDES:= \
$(LOCAL_PATH)/libancillary \
$(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