Compare commits

...
404 Commits
Author SHA1 Message Date
Max Lv 8277b07d24 Bump version 2017-02-10 10:16:27 +08:00
Max Lv b982867130 Merge branch 'beta' 2017-02-10 10:05:18 +08:00
Max Lv 491710679a Fix #1111 2017-02-09 10:50:44 +08:00
Max Lv 24c6aca85c Add remote DNS to route 2017-02-09 10:02:02 +08:00
Mygod 293e9b5dff Fix equals missing in Subnet 2017-02-08 18:47:53 +08:00
Mygod 3ac77e1f8d Fix crash on back pressed after MainActivity recreated 2017-02-08 18:47:23 +08:00
Mygod fd2c67d0b8 Add missing file 2017-02-08 17:19:22 +08:00
Mygod 684698c8e4 Refine URLs 2017-02-08 17:18:04 +08:00
Mygod 6a02d4b985 Add change log to plugin library 2017-02-08 17:13:17 +08:00
Mygod 7219ce429c Bump version 2017-02-08 17:07:56 +08:00
Max Lv 9975b135d0 Remove chacha20-poly1305 2017-02-08 12:19:51 +08:00
Max Lv 5d46ef45e3 Bump version 2017-02-08 12:03:16 +08:00
Max Lv 018aa781d3 Merge branch 'develop' into beta 2017-02-08 12:01:05 +08:00
Max Lv f7e2f8694d Add missing rules of base64.c 2017-02-08 11:58:15 +08:00
Max Lv 2d86122297 Update shadowsocks-libev 2017-02-08 11:58:15 +08:00
Max Lv ad0578d073 Fix UDP relay issues 2017-02-08 11:58:15 +08:00
Max Lv b671bc2c50 Update shadowsocks-libev 2017-02-08 11:58:15 +08:00
Mygod be5036183d Fix issues about SIP002 2017-02-08 11:58:15 +08:00
Mygod 212c3f666b Update shadowsocks-libev 2017-02-08 11:58:15 +08:00
Mygod deba1028c0 Remove unused sources in libsodium 2017-02-08 11:58:15 +08:00
Mygod 5559295beb Remove useless files in libsodium makefile 2017-02-08 11:58:15 +08:00
Mygod 41eec3e351 Use stable branch of libsodium 2017-02-08 11:58:15 +08:00
Mygod 56709385b1 Add missing AEAD ciphers 2017-02-08 11:58:15 +08:00
Mygod dc13249a1e Implement SIP002
https://github.com/shadowsocks/shadowsocks-org/issues/27
2017-02-08 11:58:15 +08:00
Mygod d579660682 Remove obsolete ciphers 2017-02-08 11:58:15 +08:00
Mygod 1e96a13ab1 Implement SIP004
https://github.com/shadowsocks/shadowsocks-org/issues/30
2017-02-08 11:58:15 +08:00
Mygod b71b27fbdf Use official repo of libsodium 2017-02-08 11:58:15 +08:00
Mygod 3fa8a0c90c Refine roundings for TrafficMonitor 2017-02-04 11:46:13 +08:00
Mygod f121ea2549 Prevent crashing when no market is installed 2017-02-02 21:51:52 +08:00
Mygod df1e40d60b Refine Subnet 2017-02-02 21:51:13 +08:00
Mygod ee08f02660 Use remote DNS for VPN 2017-02-02 21:49:31 +08:00
Mygod 7af26d1a4b Increase minimum sync time to let shadowsocks set up 2017-02-02 21:49:24 +08:00
Mygod 88319ecac7 Suggest to use fully qualified name for authorities in doc 2017-02-02 21:43:01 +08:00
Mygod b397ab2bbd Support pasting multiple lines 2017-02-02 21:27:35 +08:00
Mygod 33c087f13f Refine FAQ 2017-02-02 20:58:30 +08:00
Mygod 4996d4fc52 Add a known issue for Huawei's buggy ROM 2017-02-02 17:22:27 +08:00
Mygod 14fd86c716 Update android support library 2017-01-31 20:15:25 +08:00
Mygod 3b9a35d3e6 Merge branch 'beta' into develop 2017-01-31 19:30:37 +08:00
Mygod 3b93302539 Update dependencies 2017-01-31 01:37:25 +08:00
Max Lv 8de1dc1f7a Add signature 2017-01-24 22:59:26 +08:00
Mygod 55667c9e76 Add getOrDefault method for API 23- in plugin lib 2017-01-24 22:53:24 +08:00
Mygod e81c4f257e Bump plugin lib version 2017-01-24 22:52:54 +08:00
Mygod 61a926ff5e Update plugin doc 2017-01-24 22:42:24 +08:00
Mygod 8d1f2da1f0 Implement SIGTERM in jni-helper 2017-01-24 18:44:31 +08:00
Mygod 30c8c7e6eb Fix wrong thread error in binderDied 2017-01-24 16:58:55 +08:00
Mygod dadeffa903 Rename System to JniHelper to rename naming conflicts with
`java.lang.System`
2017-01-24 16:58:20 +08:00
Max Lv 04e0cb02b5 Bump version 2017-01-23 19:17:56 +08:00
Max Lv 1cec7299e8 Clean up 2017-01-23 18:28:52 +08:00
Max Lv e634083820 Add plugins for sonatype 2017-01-23 18:18:28 +08:00
Mygod d8775d4420 Fine tuning icon_list_item_2 padding 2017-01-23 18:17:37 +08:00
Mygod 41da705fc2 Plugin library 0.0.1 2017-01-23 17:42:21 +08:00
Mygod 911eb3dab3 Add documentations to plugin 2017-01-23 17:38:25 +08:00
Mygod a31befef7f Remove duplicated entryValues from BottomSheetPreferenceDialogFragment 2017-01-23 16:36:11 +08:00
Mygod 4d4d6ed1a0 Add RESULT_FALLBACK to ConfigurationActivity 2017-01-23 14:31:42 +08:00
Mygod a8222317d7 Fix layout issues on Android 4.4 2017-01-23 14:19:08 +08:00
Mygod b3bab982a8 Fix HelpCallback 2017-01-23 03:43:23 +08:00
Mygod 6fb7330e36 Fix crash on unknown plugin 2017-01-23 03:42:59 +08:00
Mygod 974c254460 Fix plugin preference icon 2017-01-23 02:48:36 +08:00
Mygod c0aff7dda1 Add signature checking to plugin platform 2017-01-23 02:42:09 +08:00
Mygod f6253d2eba Fix crash when creating Snackbar in ProfileConfigFragment 2017-01-23 02:33:58 +08:00
Mygod cbb0345e5b Fix obtaining packageName in NativePlugin 2017-01-23 01:40:56 +08:00
Mygod 128d47aba1 Properly speed up ndk-build
Original idea from @wongsyrone.
2017-01-23 01:03:03 +08:00
Mygod e3ad38318d Update README and licenses 2017-01-22 21:10:48 +08:00
Mygod 77296cbd3e Remove obsolete permission 2017-01-22 20:51:59 +08:00
Mygod 14745317d0 Implement native mode without binary copying
Plugins that support this mode only need to implement `NativePluginProvider.getExecutable`.
2017-01-22 20:51:16 +08:00
Mygod 9e6948caf6 Fix switch to VPN button in Snackbar 2017-01-22 16:16:48 +08:00
Mygod 18302e1c40 Refine code style 2017-01-22 16:06:47 +08:00
Max Lv 340e9cfffa Update GFWList 2017-01-21 16:51:10 +08:00
Max Lv caf5731ff6 Update GFWList 2017-01-21 16:48:50 +08:00
Max Lv 36faaad44d Update simple-obfs 2017-01-21 16:46:54 +08:00
Max Lv 4c45c923be Update shadowsocks-libev 2017-01-21 16:35:45 +08:00
Max Lv 2181e664ef Add gvt2 2017-01-21 16:22:55 +08:00
Mygod 56e4f153ed Update backup helper 2017-01-20 17:57:28 +08:00
Mygod 2e3baa727d Move config files to files directory
It looks nicer.

Other changes btw:

* Removes duplicated logcats from GuardedProcess;
* local_port is moved to command line options since that's not sensitive;
* pdnsd uses cache dir;
* Refinements to Utils.
2017-01-20 17:57:28 +08:00
Mygod 7491a667a5 Fix ss-tunnel local port 2017-01-20 17:27:42 +08:00
Mygod 1041dc370a Move non-options to command line options 2017-01-20 15:35:57 +08:00
Max Lv d734e9fd4e Fix socket protect in simple-obfs 2017-01-20 09:57:26 +08:00
Mygod 0e85514c76 Connection test should connect to China LAN when using Chinalist
Fix #1080.
2017-01-20 06:13:33 +08:00
Mygod 7e6cc4e846 Refine EditTextPreference layout 2017-01-20 06:10:50 +08:00
Mygod 4f3c7dd8fd Use proper JSON support for config files 2017-01-20 04:37:22 +08:00
Mygod 923374a28b Add back handler for ACL fragment 2017-01-20 04:30:59 +08:00
Mygod 7d3f6096b7 Add plugin to card
Fix #1054.
2017-01-20 04:13:59 +08:00
Mygod c7c72c6543 Add missing layout 2017-01-20 03:49:08 +08:00
Mygod b95bee968a Use dimen instead of Utils.dpToPx 2017-01-20 03:46:43 +08:00
Mygod 99d97d1dbd Fix launching plugin 2017-01-20 03:29:17 +08:00
Max Lv b78c10e8cc Fix content provider 2017-01-19 20:43:02 +08:00
Max Lv 91be4146f9 Update README 2017-01-19 15:52:37 +08:00
Max Lv 77a06cb519 Fix CFLAGS 2017-01-18 17:56:10 +08:00
Max Lv 6eb6c571ac Update makefile 2017-01-18 17:29:21 +08:00
Max Lv 01c5e8bb6f Update submodules 2017-01-18 16:22:55 +08:00
Max Lv 437d8c3026 Revert "Revert "Speed up ndk-build from sbt-android""
This reverts commit bcbd860457.
2017-01-17 21:30:54 +08:00
Mygod 70e0b3991d Misc improvements for plugin design 2017-01-17 21:14:10 +08:00
Mygod 0ffae32a44 Implement plugin interface in mobile app 2017-01-16 22:30:26 +08:00
Max Lv 44b47e6cd3 Update background for #1082 2017-01-16 16:18:18 +08:00
Mygod c54745e241 Adapt to simple-obfs plugin options parser 2017-01-16 09:31:37 +08:00
Mygod e3cf54f703 Update shadowsocks-libev 2017-01-16 09:22:31 +08:00
Mygod d5be325ab5 Some bugfixes for new UI 2017-01-14 02:31:01 +08:00
Mygod a38c9920c3 Add initial support for configuring plugins 2017-01-14 02:20:27 +08:00
Mygod 1887c6ffb0 Initial commit for plugin library
See spec at #1073.
2017-01-13 20:20:33 +08:00
Mygod 5ead55d67a Rename plugin-lib to plugin 2017-01-13 02:35:02 +08:00
Mygod a03ef5dfe9 Initial commit for plugin-lib 2017-01-13 02:29:49 +08:00
Mygod f6bbaa7251 Remove kcptun from travis 2017-01-13 00:33:57 +08:00
Mygod 2798eddaa7 Remove KCP from project 2017-01-13 00:31:58 +08:00
Mygod 044f6f1fce Apply commonSettings to root 2017-01-12 23:52:10 +08:00
Mygod 0030c29b62 Move app to mobile subproject 2017-01-12 23:31:52 +08:00
Mygod 2c1c4b9b4f Update strings.xml (POEditor.com) 2017-01-12 08:53:17 -06:00
Mygod f2c260a438 Update strings.xml (POEditor.com) 2017-01-12 08:53:15 -06:00
Mygod d2d1796852 Update strings.xml (POEditor.com) 2017-01-12 08:53:12 -06:00
Max Lv c7b242789d Bump version 2017-01-12 22:11:18 +08:00
Mygod 1c53181c9c Remove hash tag if profile name is empty 2017-01-10 11:17:56 +08:00
Max Lv bcbd860457 Revert "Speed up ndk-build from sbt-android" 2017-01-09 21:29:15 +08:00
Syrone Wong 33d8139f57 Speed up ndk-build from sbt-android
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2017-01-09 20:02:43 +08:00
Mygod 5a8493e0b1 Remove unused strings 2017-01-09 18:22:16 +08:00
Mygod 3c3e531718 Add backup entry for custom rules
Refine #1069.
2017-01-09 16:36:45 +08:00
Mygod 1f6d6bbd14 Update Acl.scala to be compliant with acl.c 2017-01-09 15:41:19 +08:00
Mygod c25433e2da Remove suggestions when inputting custom rules 2017-01-09 15:31:56 +08:00
Mygod 0b68faf672 Fix Subnet ordering 2017-01-09 15:29:06 +08:00
Mygod 7978bcedbf Remove unused include in system.cpp 2017-01-09 15:20:27 +08:00
Mygod eb3b01053e Fix 'Fix #1064' 2017-01-09 15:12:53 +08:00
Mygod 17bedaffcd Fix #1064 2017-01-09 14:47:14 +08:00
Mygod 49fbfcc2ac Refine an issue mentioned in #1064 2017-01-09 00:16:50 +08:00
Mygod c2930bfe04 Refine README 2017-01-08 23:52:26 +08:00
Mygod e7cc5ad0ba Use NDK build in sbt-android instead 2017-01-08 23:51:30 +08:00
Mygod f81b16ead6 Update issue_template 2017-01-08 23:37:20 +08:00
Max Lv 162fcb47bc Fix #1066 2017-01-08 11:23:37 +08:00
Mygod 67fab0392f Let Android system extract native libraries 2017-01-07 06:37:27 -06:00
Mygod bf89e202d1 Refine README 2017-01-07 18:03:33 +08:00
Mygod 050cc7a018 Add POEditor for translators 2017-01-07 17:49:12 +08:00
Mygod 7e92e1ac0d Update strings.xml (POEditor.com) 2017-01-07 03:43:05 -06:00
Mygod 1758f360c0 Update strings.xml (POEditor.com) 2017-01-07 03:42:51 -06:00
Mygod e32ac67794 Update strings.xml (POEditor.com) 2017-01-07 03:42:46 -06:00
Mygod 5434193903 Update strings.xml (POEditor.com) 2017-01-07 03:42:43 -06:00
Mygod 2efb6fb4c6 Update strings.xml (POEditor.com) 2017-01-07 03:42:41 -06:00
Mygod 5d744066ac Remove untranslatable strings 2017-01-07 17:31:41 +08:00
Mygod b897e4d044 Make bytes translatable 2017-01-07 17:19:09 +08:00
Mygod 5206b4c1f1 Simplify strings.xml 2017-01-07 17:17:28 +08:00
Mygod 694be8abbe Update README and LICENSE 2017-01-07 16:50:08 +08:00
Mygod 0a2d374de2 Use variables to store android support lib and google services version 2017-01-07 16:50:08 +08:00
LNDDYL 9dec28a022 Update translation for Traditional Chinese (#1061)
* Update translation for Traditional Chinese

* Update EN

* Fix
2017-01-07 02:49:08 -06:00
Mygod 5a6e45a2a7 Fix NullPointerException caused by delay 2017-01-07 15:14:41 +08:00
Mygod 6d536a901b Fix ETXTBSY when opening custom rules 2017-01-07 15:09:11 +08:00
Mygod 57be4055d3 Show nothing for profiles with no bandwidth history 2017-01-07 14:53:56 +08:00
Mygod 2d9102719e Remove obsolete camera shortcut 2017-01-07 14:51:09 +08:00
Mygod 5e9f78d31a Prevent crash when importing
Fix #1060.
2017-01-07 14:48:19 +08:00
Max Lv f4026e5a86 Bump version 2017-01-07 11:03:06 +08:00
Max Lv fb98b3e4a1 Fix fast scroller in per-app config 2017-01-07 09:49:22 +08:00
Max Lv f629c432b0 Update licenses, close #1059 2017-01-07 08:56:19 +08:00
Mygod 4c15d27a99 Update dependencies 2017-01-07 04:05:02 +08:00
Mygod 341c85049b Add fast scroller to custom rules and per-app proxy config 2017-01-07 03:54:01 +08:00
Mygod 35d7611524 Add state check before sending initial trafficUpdated event 2017-01-07 02:52:25 +08:00
Mygod d10acf52ec Fix remoteDns not used in NAT with UDP disabled 2017-01-06 17:13:31 +08:00
Max Lv 0234acbf5f Merge pull request #1056 from Mygod/custom-rules
Implement custom rules
2017-01-06 02:59:32 -06:00
Mygod 292c76b227 Fix remove snackbar 2017-01-06 16:46:54 +08:00
Mygod a67c29314e Fix deprecation warning in UndoSnackbarManager 2017-01-06 16:43:37 +08:00
Mygod 0fc9c6fb8a Remove unused copy_url 2017-01-06 16:38:40 +08:00
Mygod 82a3e429d1 Prevent syncing custom-rules 2017-01-06 16:30:41 +08:00
Mygod b4425e3b06 Fix NullReferenceException 2017-01-06 16:29:37 +08:00
Mygod ac2b668a4b Implement custom rules
Fix #1009 finally!
2017-01-06 16:20:26 +08:00
Mygod 8374a8cdcc Fix building 2017-01-06 13:00:50 +08:00
Mygod 7feb049f4b Update gfwlist 2017-01-06 12:29:42 +08:00
Mygod 5bc7c9f8cc Fix bandwidth display in ProfilesFragment when hot swapping profiles 2017-01-05 22:08:37 +08:00
Mygod 115fbcb2fe Add a fading when switching profiles 2017-01-05 21:25:59 +08:00
Mygod 69d2bc1ee5 Set card background using StateListDrawable 2017-01-05 21:21:51 +08:00
Mygod af9e8c786d Bugfix for layout gravity 2017-01-05 20:51:51 +08:00
Max Lv 5ca3baac95 Update licenses #1043 2016-12-31 16:10:02 +08:00
Mygod 878c53ee30 Refine profile bandwidth gravity 2016-12-31 00:14:01 +08:00
Mygod eb7e608d0b Use custom tabs in AboutFragment 2016-12-30 22:22:06 +08:00
Mygod ef6a9e7727 Remove obsolete tools:ignore 2016-12-30 22:10:47 +08:00
Mygod 2edc14a695 Refine database package 2016-12-30 22:10:47 +08:00
Max Lv bc94adef38 Use centerCrop 2016-12-30 20:43:15 +08:00
Max Lv dd8031519c Revert "Replace image with gradient color"
This reverts commit b0412b4f1f.
2016-12-30 20:42:04 +08:00
Max Lv b0412b4f1f Replace image with gradient color 2016-12-30 18:33:36 +08:00
Mygod 7e94e25d49 Refine #1034 2016-12-29 17:51:44 +08:00
Mygod 068906cd0f Remove obsolete items in FAQ 2016-12-29 16:21:53 +08:00
Mygod e24c2256af Hide circle onResume 2016-12-29 16:20:37 +08:00
Mygod d78e823ce2 Allow user to use any QR code scanner and remove unused resources 2016-12-29 16:16:56 +08:00
Mygod 8e46be5900 Allow user to use any QR code scanner 2016-12-29 16:01:32 +08:00
Mygod 2e73741825 Fix excess unsaved prompt
AppManager's sub-activity should maintain dirty flags by themselves. Fix #1032.
2016-12-29 15:34:54 +08:00
Mygod 022b6da9c9 Refine issue template 2016-12-29 01:29:36 -06:00
Mygod 622cef048c Add an FAQ section in drawer 2016-12-29 01:29:36 -06:00
Max Lv 8dd6027790 Bump version 2016-12-29 13:29:39 +08:00
Max Lv f05524810e Remove internal QR Scanner. #1021
Report to @Mygod if you have any question. :)
2016-12-29 13:12:31 +08:00
Max Lv 1ffd132651 Use internal scanner as fallback 2016-12-29 12:43:10 +08:00
Max Lv 4ddebb7ca6 Merge pull request #1027 from shadowsocks/drawer
New UI with drawer (#762)
2016-12-28 20:02:05 -06:00
Mygod 8cb0d0d771 Remove duplicate string entry shutting_down 2016-12-29 01:32:18 +08:00
Mygod 77ddc3ac77 Merge branch 'master' into drawer 2016-12-29 01:22:04 +08:00
Mygod 346f0c7269 Remove unused resources 2016-12-29 01:20:12 +08:00
Mygod 2377e48a9e Change colorAccent 2016-12-29 00:54:16 +08:00
Mygod b83eac0056 Localize more strings 2016-12-29 00:49:48 +08:00
Mygod 9a4b66b22f Add shadow to minidrawer 2016-12-29 00:34:42 +08:00
Mygod 2d8257d3de Localize new strings in drawer 2016-12-29 00:21:03 +08:00
Mygod 3da6994704 Use FrameLayout instead of LinearLayout 2016-12-29 00:04:11 +08:00
Max Lv 4f4123185c Update localizations 2016-12-28 17:13:22 +08:00
Mygod 3ce7f7e9eb Add minidrawer for large screens 2016-12-28 05:08:34 +08:00
Mygod da8a65993a Fix another naming conflict in @+id/content 2016-12-28 05:05:19 +08:00
Mygod b069b3e003 Don't setToolbar in minidrawer mode 2016-12-28 05:01:03 +08:00
Mygod dfe469e1e6 Prevent bandwidth and border flashing in ProfilesFragment 2016-12-28 04:51:43 +08:00
Mygod f96f58f30a Refine proguard rules 2016-12-28 04:27:27 +08:00
Mygod 0732dd5981 Broken minidrawer draft 2016-12-28 04:13:31 +08:00
Mygod c3102d4b54 Add savedInstanceState to drawer 2016-12-28 04:12:37 +08:00
Mygod f828268e3b Disable editing for ProfilesFragment depending on service state 2016-12-28 03:06:11 +08:00
Mygod b636d6b85a Fix a naming conflict 2016-12-28 02:17:27 +08:00
Mygod 13c01f3ae4 Update total traffic after service stopped 2016-12-28 02:15:54 +08:00
Mygod f1a9fd5ba5 Refine ProfilesFragment 2016-12-28 02:14:53 +08:00
Mygod bc7c29c3e3 Refine drawer item ids 2016-12-28 01:50:18 +08:00
Mygod c1c15f5361 Refine connection test feature 2016-12-28 01:48:24 +08:00
Mygod e33adc4f66 Seriously clean up Shadowsocks MainActivity
This activity contains lots of obsolete code and it's time to do a cleanup.
2016-12-28 01:45:23 +08:00
Mygod 418ae2151c Refrain from unregistering stateChanged callbacks too aggressively
This commit adds `startListeningForBandwidth` and `stopListeningForBandwidth` to save battery as well as keeping the listener for state changing alive.
2016-12-28 00:49:18 +08:00
Mygod fdd8a1127c Sort dependencies in build.sbt 2016-12-27 23:55:24 +08:00
Mygod e2d080b830 Refine "Fix issues on Android 4.4" 2016-12-27 23:54:14 +08:00
Mygod 654b627747 Use VectorDrawable for ic_navigation_close on API 21+ 2016-12-27 23:39:02 +08:00
Mygod a4f326157d Refine "Replace HttpRequest with OkHttp3" 2016-12-27 23:36:30 +08:00
Max Lv e782a4c777 Update ACL 2016-12-27 16:01:47 +08:00
Max Lv f7924a2767 Update GFWList 2016-12-27 15:58:46 +08:00
Max Lv 5596b8ac49 Update GFWList 2016-12-27 15:58:20 +08:00
Mygod ad25b149e0 Update ACL URL 2016-12-27 15:56:30 +08:00
Max Lv a865ee8308 Replace HttpRequest with OkHttp3 2016-12-27 12:49:26 +08:00
Max Lv 5419b4b567 Fix issues on Android 4.4 2016-12-26 17:50:15 +08:00
Max Lv 2852309183 Move snackbar to the bottom 2016-12-26 12:52:13 +08:00
Max Lv 62e2d636ba Avoid overlapping snackbar 2016-12-26 12:16:08 +08:00
Max Lv ed0dba8fb3 Revert "Prevent snackbar overlapping with bottom bar"
This reverts commit 806f4e13bd.
2016-12-26 12:16:01 +08:00
Mygod a18eb32b59 Promote global settings to main drawer 2016-12-26 00:40:39 +08:00
Mygod 915a0efff4 Decrease profile name text size 2016-12-25 15:01:03 +08:00
Max Lv ab326dc238 Update header background 2016-12-25 11:32:33 +08:00
Max Lv 5c8f6189ee Update licenses 2016-12-25 11:31:38 +08:00
Mygod 72e137bab3 Update ACL URL 2016-12-24 12:53:52 -06:00
Mygod 806f4e13bd Prevent snackbar overlapping with bottom bar 2016-12-25 02:14:33 +08:00
Mygod 2ca8d50eb0 Refine layout for wide screens 2016-12-25 00:37:44 +08:00
Mygod 3a66bbba88 Move share functionality to ProfilesFragment 2016-12-24 23:42:09 +08:00
Mygod 5898d29177 Fix a bug in serializing profile 2016-12-24 23:25:23 +08:00
Mygod c429978aee Refine drawer selection color 2016-12-24 23:22:37 +08:00
Mygod 64f32a644b Refine connection test layout 2016-12-24 23:07:29 +08:00
Mygod 7de4a01db2 Refine back navigation for main activity 2016-12-24 22:49:34 +08:00
Mygod cceb4ad9d7 Move about to fragment 2016-12-24 22:47:40 +08:00
Mygod 48a1abeeba Add missing drawable 2016-12-24 22:47:24 +08:00
Mygod 0bc50bbe10 Merge branch 'drawer' of github.com:shadowsocks/shadowsocks-android into drawer 2016-12-24 22:33:48 +08:00
Mygod 719d8eaa94 Move reset functionality to drawer 2016-12-24 22:33:22 +08:00
Max Lv 97f8ad0987 Refine AdSize 2016-12-24 16:43:18 +08:00
Mygod 34fe03c9e5 Add icon tinting to drawer drawables 2016-12-24 16:03:29 +08:00
Mygod a78c8aa526 Refine add profile icon 2016-12-24 13:56:58 +08:00
Mygod 2e902a1109 Refine drawer icons 2016-12-24 13:54:21 +08:00
Mygod f01cbe15b7 Prompt to save changes when exiting profile config 2016-12-24 13:46:49 +08:00
Mygod f9e504b092 Refine profile name display 2016-12-24 13:38:13 +08:00
Max Lv eae97bc192 Update the drawer header and icons 2016-12-24 13:21:32 +08:00
Max Lv 91e5223a53 Refine AdView 2016-12-24 10:44:24 +08:00
Mygod 93d468c581 Refine no selected profile case again 2016-12-24 02:37:58 +08:00
Mygod 2be75d0b9a Refine adview 2016-12-24 02:25:53 +08:00
Mygod 3ffca24908 Handle error msg for no profile 2016-12-24 02:25:45 +08:00
Mygod c38e37c06b Start configuring right after manual config was selected 2016-12-24 02:21:26 +08:00
Mygod 8eed34dc9b Create default profile when creating new profiles 2016-12-24 02:18:08 +08:00
Mygod 0fe62e256b Prevent crash when removing current profile 2016-12-24 02:11:40 +08:00
Mygod 68992ea535 Refine profiles layout 2016-12-24 02:02:42 +08:00
Mygod f095a38894 Move adView construction to code 2016-12-24 01:52:52 +08:00
Mygod e4df378967 Fix back press crash 2016-12-24 01:43:43 +08:00
Mygod 25b6a307de Layout bugfixes 2016-12-24 01:40:55 +08:00
Mygod 5217b1d1fa Remove redundant Typefaces 2016-12-24 01:27:54 +08:00
Mygod 015fefe3db Fix corner radius for background 2016-12-24 01:26:49 +08:00
Mygod 5e9be12d50 Reorder build.sbt 2016-12-24 01:15:35 +08:00
Max Lv e5db0f630f Add a header layout 2016-12-23 21:21:13 +08:00
Max Lv aa1e052b91 Add native adview 2016-12-21 15:21:32 +08:00
Max Lv 7564ba5184 Fix a bug of profile serializing 2016-12-20 18:15:09 +08:00
Max Lv 406661e346 Refine the layout 2016-12-20 13:54:17 +08:00
Max Lv c87930b261 Refine the profile item layout 2016-12-20 13:34:49 +08:00
Max Lv 436119e0ab Disable profile switching when connected 2016-12-18 15:31:10 +08:00
Max Lv e8ff469eac Add indicator for profile items 2016-12-18 15:11:57 +08:00
Mygod e7d2dec952 Don't navigate up if scanning was cancelled 2016-12-18 00:03:26 +08:00
Mygod cd25dcdc13 Add a confirm dialog before discarding changes 2016-12-17 23:58:23 +08:00
Mygod 859ef5307b Move callback method to ToolbarFragment 2016-12-17 23:38:00 +08:00
Max Lv d0c4384cc7 Avoid attach/detach service in the fragment 2016-12-17 16:28:09 +08:00
sunsysjp d1e914ce85 Update Japanese translation
Alter the wording

20:15 16/12/2016
2016-12-17 01:04:09 -06:00
Max Lv 0c930b3650 Refine regex 2016-12-17 07:27:16 +08:00
Mygod 02513418c8 Remove the no longer needed quick switch 2016-12-16 23:23:49 +08:00
Mygod 59c5d01c8d Fix ImageView app:srcCompat 2016-12-16 23:17:54 +08:00
Mygod ae4e57abc0 Fix profile selection 2016-12-16 23:14:34 +08:00
Mygod dbb137c5d8 Initial redesign draft for #762 2016-12-16 23:02:33 +08:00
Max Lv 325e28f562 Refine #1014 again 2016-12-16 20:25:27 +08:00
Max Lv c6b88cf73d Refine #1014 2016-12-16 20:09:33 +08:00
Max Lv 4aea4a1db5 Fix #1014 2016-12-16 15:21:16 +08:00
Max Lv ef707e4383 Refine ACL 2016-12-15 20:54:22 +08:00
Max Lv 7eddf8be78 Revert "Use symlink for gfwlist.acl" 2016-12-15 05:27:05 -06:00
Mygod ba894b1b40 Use symlink for gfwlist.acl 2016-12-15 05:22:02 -06:00
Mygod 9b211d7151 Update Android Support library 2016-12-15 19:21:08 +08:00
sunsysjp 1383a151af Update strings.xml
correct some translation mistakes
7:27 AM 13.12.2016
2016-12-13 19:02:16 -06:00
Max Lv 828b72dfdb Fix #1007 2016-12-14 08:54:49 +08:00
Mygod 139ea388b0 Update build tools 2016-12-13 20:10:30 +08:00
Syrone Wong 4400a6b81c acl: add telegram IPs 2016-12-13 03:50:34 -06:00
sunsysjp 12a2781f8a Update strings.xml
当前版本的日语翻译已完成,请xida也检查一下吧
2016-12-12 16:41:32 -06:00
yyxida abd8099c0f Revise translation (#999)
* add/Revise translation

add “Remote DNS” translation

Revise translation by @sunsysjp

* Update strings.xml

* Update strings.xml

* Update strings.xml

* Update strings.xml

* Update strings.xml
2016-12-11 17:14:57 -06:00
Mygod a5df60ae03 Refine code style 2016-12-09 16:42:20 +08:00
Mygod c9b404faad Update dependencies 2016-12-08 18:47:13 +08:00
Max Lv b00aa3a564 Bump version 2016-12-07 13:28:51 +08:00
Max Lv 933b7f4964 Refine #997 2016-12-06 16:12:36 +08:00
Max Lv b8d70fe12f Fix #997 2016-12-06 14:43:57 +08:00
Mygod 7dbae18d10 Update dependencies 2016-11-30 17:32:55 +08:00
Mygod 357130cda0 Refine #989 2016-11-30 16:54:20 +08:00
Max Lv d197ec2fc5 Add remote DNS setting #991 2016-11-30 15:26:49 +08:00
Max Lv a7c729883e Fix #989 2016-11-30 15:26:19 +08:00
Max Lv df9f0ad52a Update LICENSE 2016-11-30 10:36:47 +08:00
Max Lv a33fcc6930 Bump version 2016-11-24 16:56:56 +08:00
Max Lv d82539b198 Drop the table if the database upgrading failed. #987 2016-11-23 12:22:43 +08:00
Max Lv 7922159e5e Bump version 2016-11-23 09:13:54 +08:00
yyxida fabab2854f completed Japanese translation (The vast majority) (#986)
completed Japanese translation (The vast majority)

日本語の翻訳は完成した(大多数)
2016-11-20 00:06:34 -06:00
Eva Kane 6a9464e08d Fix Japanese translation again (#983) 2016-11-19 20:11:05 +08:00
Mygod f70e905bce Fix Japanese translation 2016-11-19 17:31:12 +08:00
Max Lv 90b5780d91 Fix #982 2016-11-19 09:22:08 +08:00
Max Lv d189044808 Bump version 2016-11-19 09:22:08 +08:00
yyxida 5a03f52545 Update strings.xml (#981)
Change some words
2016-11-18 07:08:49 -06:00
yyxida 2d4d6737ff Add Japanese translation (#978) 2016-11-18 01:20:47 -06:00
Max Lv 80fdc07bdd Fix #968 2016-11-12 10:24:47 +08:00
Mygod 5ca3a8e9fd Suppress NewApi in lint.xml 2016-11-11 17:58:05 +08:00
Mygod f3a458161a Remove useless components in ads 2016-11-11 11:30:16 +08:00
Mygod e067c6fae2 Update dependency 2016-11-11 11:15:41 +08:00
Mygod f48ad61220 Refine #964 2016-11-04 14:02:44 +08:00
Max Lv 27f9992447 Fix #964 2016-11-04 13:59:06 +08:00
Mygod 546a5d010d Refine design for preference package 2016-11-03 21:20:04 +08:00
Mygod cbb839ec11 Fix up navigation 2016-11-03 20:50:53 +08:00
Mygod 179e5456f8 Refine shortcuts on Android 7.1 2016-11-03 19:18:25 +08:00
Mygod 30700facd3 Remove unused private_route 2016-11-01 13:10:35 +08:00
Max Lv 82103d286d Fix #961 2016-10-31 09:26:13 +08:00
Mygod a9ca3c049d Revert "Revert "Refine Travis rules""
This reverts commit d0b4819dc5.
2016-10-25 20:16:23 +08:00
Mygod 0433704d87 Revert "Force to update Android SDK"
This reverts commit c1dd21e0c3.
2016-10-25 20:16:12 +08:00
Max Lv 2f23462c84 Fix the build 2016-10-25 13:11:38 +08:00
Max Lv c1dd21e0c3 Force to update Android SDK 2016-10-25 12:50:42 +08:00
Max Lv d0b4819dc5 Revert "Refine Travis rules"
This reverts commit 0fdbd19bff.
2016-10-25 12:19:00 +08:00
Mygod d99757f1a3 Fix a deprecation in build.sbt 2016-10-24 16:44:26 +08:00
Mygod 8ed71d1707 Add quick switch to shortcuts 2016-10-24 16:04:34 +08:00
Mygod ffdb6f84e3 Refine shortcuts.xml 2016-10-24 15:49:27 +08:00
Mygod 094b307254 Add taskAffinity to invisible activities 2016-10-24 15:40:57 +08:00
Mygod bd5fff100d Update proguard 2016-10-24 15:27:04 +08:00
Mygod 479e697e6d Experimental support for demo users
TODO: Untested code. Need to find out how to activate demo users.

Fix #950 nevertheless.
2016-10-23 15:39:06 +08:00
Mygod e98dadf0a2 Fix a minor UI issue 2016-10-23 14:35:33 +08:00
Mygod 4cfab40ec2 Fix wrong activity launched when long pressing QS tile 2016-10-23 14:32:57 +08:00
Mygod 0fdbd19bff Refine Travis rules 2016-10-23 14:30:16 +08:00
Mygod 913ec3c06b Fix #949 2016-10-23 14:29:26 +08:00
Mygod 617c6dac1b Fix crashing on Android 6.0+ 2016-10-23 14:22:02 +08:00
Mygod 244c2ecdfd Add quick toggle shortcut (#950)
Mainly for Android 7.1, also backward compatible.
2016-10-23 14:16:56 +08:00
Mygod 54c696d00a Merge branch 'master' of github.com:shadowsocks/shadowsocks-android 2016-10-23 13:13:44 +08:00
Mygod c4d9edc224 Recreate round launcher icon with Android Studio (#950)
The icon was created using shadow.png.
2016-10-23 13:12:32 +08:00
Max Lv 7a7cbf5803 Update travis-ci 2016-10-23 12:07:04 +08:00
Max Lv f53936421d Fix #951 2016-10-23 11:54:39 +08:00
Mygod 5ef2849c4a Update build target to Android 7.1 Developer Preview 2016-10-23 00:30:20 +08:00
Mygod e1f58bfd0c Update dependencies
Disabling `android:extractNativeLib` will reduce apk install size and reduce install time.
2016-10-23 00:24:59 +08:00
Max Lv 7098e57893 Bump version 2016-10-18 15:14:29 +08:00
Max Lv a4c5fc4919 Fix building error 2016-10-18 09:23:44 +08:00
Max Lv 3c69b23a5b Refine ACLs #941 2016-10-15 18:56:47 +08:00
Mygod 738febbac7 Always show stop button for now
Fix #940.
2016-10-15 13:47:29 +08:00
Max Lv ed91010b18 Update shadowsocks-libev 2016-10-14 19:27:33 +08:00
Mygod 8f4d7db797 Remove manual input handling in NumberPickerPreferenceDialogFragment 2016-10-14 00:27:32 +08:00
Mygod 52ead0a02c Fix NullPointerException in NumberPickerPreferenceDialogFragment 2016-10-14 00:18:28 +08:00
Mygod 7d099b1faf Fix IllegalStateException in PreferenceFragment 2016-10-14 00:17:02 +08:00
Mygod 89b9914f15 Fix ETXTBSY in copyAssets 2016-10-14 00:03:30 +08:00
Mygod 809b81a332 Update build tools to 24.0.3 for Travis 2016-10-13 12:23:08 +08:00
Mygod 395c07a0f6 Add last version that doesn't exhibit the issue to issue_template 2016-10-13 12:14:24 +08:00
Mygod cb61c290a4 Refine issue_template 2016-10-13 12:10:40 +08:00
Mygod 9ccf2bc436 Update sbt-android to 1.7.0 2016-10-13 12:08:53 +08:00
Mygod 674d493c2d Refine #937 2016-10-13 10:43:37 +08:00
Max Lv 17382a1002 Bump version 2016-10-13 09:40:15 +08:00
Max Lv 7370b6a0b8 Fix #937 2016-10-13 08:45:10 +08:00
Max Lv 158afb1d9f Bump version 2016-10-12 20:31:46 +08:00
Mygod 085c6dbebf Fix job rescheduling 2016-10-12 18:12:11 +08:00
Mygod c401d7eb3a Extend execution window from 10 seconds to 4 weeks 2016-10-12 15:17:59 +08:00
Mygod 118cea9f7a Add play-services-gcm
This is needed so that Android-Job will use GcmNetworkManager if GCM is installed on user's device. (for KitKat only)
2016-10-12 15:04:01 +08:00
Mygod 5b1ae13faa Clean up extraneous files 2016-10-12 15:03:28 +08:00
Mygod b5f655beb5 Boring bugfix don't look 2016-10-12 14:56:50 +08:00
Mygod 9a3ed94fe0 Refine error handling in services 2016-10-12 14:54:17 +08:00
Mygod 0191d1d0fc Download acl files from GitHub 2016-10-12 14:30:02 +08:00
Mygod 6a56704f52 Refine copyAssets 2016-10-12 11:30:48 +08:00
Mygod a95308d283 Fix a deprecation 2016-10-12 11:26:44 +08:00
Mygod 6acbae0c7e Move copyAssets to BaseService
Fix #926.
2016-10-12 11:24:21 +08:00
Max Lv 97d31cb927 Fix #930 2016-10-10 15:45:25 +08:00
Mygod 7474269f6b Fix crash on 4.4 2016-10-10 13:00:54 +08:00
Mygod 40447ce1d2 Refine fetching ACL from cloud 2016-10-10 09:44:48 +08:00
Max Lv 4162057a22 Add missing files 2016-10-09 15:27:35 +08:00
Max Lv 0f24d7c0bc Add cloud based ACL updating 2016-10-09 10:51:08 +08:00
Mygod bbf614484d Refine unexpected cases for Chinese locales 2016-10-09 00:21:38 +08:00
Mygod 396d31a0a7 Fix Chinese locales once and for all (up to Nougat)
Seriously fix #927. From now on it will work even in Hong Kong (`/^zh-Han[st]-HK$/`) where for some reason people use Simplified Chinese and Traditional Chinese at the same time.
2016-10-09 00:08:06 +08:00
Mygod 812dc6769a Refine pref_all.xml 2016-10-07 23:09:22 +08:00
Max Lv 8feb587ebe Fix #923 2016-10-07 16:54:25 +08:00
Max Lv 89f073cc49 Merge pull request #922 from Mygod/master
Refine GitHub templates
2016-10-06 10:00:36 -05:00
Max Lv 07ac8fb839 Bump version 2016-10-06 22:58:01 +08:00
Mygod 57b75ad971 Refine GitHub templates 2016-10-06 21:59:39 +08:00
Mygod 1d6a0b0f2b Use styling to fix #910 2016-10-05 23:12:25 +08:00
Mygod abcbc98ce3 Refine MyNumberPicker 2016-10-05 22:58:18 +08:00
Mygod 2722b1aa78 Rename package 2016-10-05 22:47:56 +08:00
Mygod 4bfc5ee070 Update email 2016-10-05 13:39:51 +08:00
Max Lv c842f7fd41 Bump version 2016-10-03 19:47:53 +08:00
Max Lv c2f02994f8 Refine DNS server with China List 2016-10-02 19:36:53 +08:00
Max Lv 54247d6b2b Update DNS 2016-09-30 20:48:20 +08:00
Max Lv e7fbfd668d Update config name 2016-09-30 19:43:30 +08:00
Max Lv b6d0af1ec3 Fix #910 2016-09-30 19:28:03 +08:00
Max Lv f58301b80b Bump version 2016-09-30 13:49:16 +08:00
Max Lv 792870b289 Update ACL 2016-09-29 11:53:40 +08:00
Max Lv 3b6eff6d9d Fix #905 2016-09-28 14:36:36 +08:00
Max Lv 528fea136d Clean up 2016-09-28 10:40:16 +08:00
Mygod 5d7e88310b Update dependencies 2016-09-26 19:51:38 +08:00
Max Lv 8c4508843b Refine DNS resolution 2016-09-26 13:54:34 +08:00
Max Lv 79acf14069 Reduce the timeout of default DNS server 2016-09-26 09:48:42 +08:00
Max Lv 5f43500b9f Fix auto-start again 2016-09-26 07:51:54 +08:00
Max Lv 8b4a8a92f2 Bump version 2016-09-25 18:29:41 +08:00
Max Lv 7887d18f6f Clean up 2016-09-25 17:40:53 +08:00
Max Lv fb960d0664 Fix #900 2016-09-25 17:32:16 +08:00
Max Lv 9ed320d33b Fix #901 2016-09-25 17:29:27 +08:00
Max Lv 2599e88a81 Add fake demographics 2016-09-24 11:34:08 +08:00
Max Lv ac0a8c7600 Bump version 2016-09-24 10:59:24 +08:00
285 changed files with 33801 additions and 15677 deletions
+49
View File
@@ -0,0 +1,49 @@
### Troubleshooting
Cannot connect to server:
1. Stop battery saver if it's active;
2. If an upgrade breaks anything, do a manual reset first by pressing Reset at the end of the list;
3. Check your config;
4. Wipe app data.
Crash: [Submit an issue](https://github.com/shadowsocks/shadowsocks-android/issues/new) with logcat attached, or submit a crash report to Google Play. Then, try wiping app data.
### UI tips
* Tap the number to enter the port you wish to use; (if the keyboard doesn't pop up automatically for some reason)
* Use Tasker integration to create a desktop widget.
### Why is NAT mode deprecated?
1. Requiring ROOT permission;
2. No IPv6 support;
3. No UDP relay support.
### How to remove the exclamation mark when using VPN mode?
The exclamation mark in the Wi-Fi/cellular icon appears because the system fails to connect to portal server (defaults to `clients3.google.com`) without VPN connection. To remove it, follow the instructions in [this article](https://www.noisyfox.cn/45.html). (in Simplified Chinese)
### Why are MIUI, EMUI and other AOSPs in China not officially supported?
1. Broken VPNService implementation, especially for IPv6;
2. Aggressive (or called broken) background service killing policy.
* Fixes for MIUI: [#772](https://github.com/shadowsocks/shadowsocks-android/issues/772)
* Fixes for Huawei: [#1091 (comment)](https://github.com/shadowsocks/shadowsocks-android/issues/1091#issuecomment-276949836)
### How to pause Shadowsocks service?
* For Android 7.0+: Use quick switch tile in Quick Settings;
* Use Tasker integration;
* Add a profile with per-app proxy enabled for Shadowsocks only, bypass mode off.
### Why does Shadowsocks consume so much battery on Android 5.0+?
As Shadowsocks takes over the whole device network, any battery used by network activities from other apps are also counted as those from Shadowsocks. So, the battery usage of Shadowsocks equals to the sum of all the network activities of your device. Shadowsocks itself is a totally I/O bound application on modern Android devices, which is expected not to consume any notable battery.
So if you notice a significant increase in battery usage after you use Shadowsocks, it's most likely caused by other apps. For example, Google Play services can consume more battery after being able to connecting to Google, etc.
### It works fine under Wi-Fi but can't connect through cellular data?
Allow this app to consume background data in app settings.
+32 -5
View File
@@ -1,10 +1,39 @@
Please answer these questions before submitting your issue. Thanks!
Please read FAQ then answer these questions before submitting your issue. Thanks!
### What version of Shadowsocks are you using?
### Environment
* Android version: *e.g. "7.0.0_r14", more detailed description is preferred*
* Device: *e.g. Google Pixel XL*
* Shadowsocks version: *version code "v3.0.0" or commit ID "a073f85"*
* Last version that did not exhibit the issue (if applicable):
### What Android OS version and device are you using?
### Configuration
_Put an `x` inside the [ ] that applies._
* [ ] IPv4 server address
* [ ] IPv6 server address
* [ ] Client IPv4 availability
* [ ] Client IPv6 availability
* Local port: 1080
* Encrypt method:
* [ ] One-time authentication
* Route
* [ ] All
* [ ] Bypass LAN
* [ ] Bypass China
* [ ] Bypass LAN & China
* [ ] GFW List
* [ ] China List
* [ ] Custom rules
* [ ] IPv6 route
* [ ] Per-App Proxy
* [ ] Bypass mode
* [ ] UDP Forwarding
* Plugin configuration (if applicable):
* [ ] Auto Connect
* [ ] TCP Fast Open
* [ ] NAT mode
### What did you do?
@@ -14,5 +43,3 @@ Please answer these questions before submitting your issue. Thanks!
### What did you see instead?
### What is your config in detail (with all sensitive info masked)?
+14
View File
@@ -0,0 +1,14 @@
### Type of changes
_Put an `x` inside the [ ] that applies._
* [ ] Bugfix
* [ ] New feature
* [ ] Translation
* [ ] General refinement
* Other:
### Details
Please provide more details about changes if necessary.
+2 -24
View File
@@ -1,33 +1,11 @@
classes
bin
gen
target
local.properties
.classpath
.project
.settings
tests/bin
tests/gen
tests/local.properties
NUL
gen_*
*.class
*.o
local.sbt
.deps
/proguard-sbt.txt
#Intellij IDEA
*.iml
*.ipr
*.iws
.idea/
out/
.d
#NDK
src/main/obj
src/main/libs
src/main/assets/armeabi-v7a/*
src/main/assets/x86/*
jni/Application.mk
mobile/src/main/libs
mobile/src/main/obj
+26 -22
View File
@@ -1,35 +1,39 @@
[submodule "src/main/jni/shadowsocks-libev"]
path = src/main/jni/shadowsocks-libev
[submodule "mobile/src/main/jni/shadowsocks-libev"]
path = mobile/src/main/jni/shadowsocks-libev
url = https://github.com/shadowsocks/shadowsocks-libev
[submodule "src/main/jni/badvpn"]
path = src/main/jni/badvpn
[submodule "mobile/src/main/jni/badvpn"]
path = mobile/src/main/jni/badvpn
url = https://github.com/shadowsocks/badvpn.git
branch = shadowsocks-android
[submodule "src/main/jni/libancillary"]
path = src/main/jni/libancillary
[submodule "mobile/src/main/jni/libancillary"]
path = mobile/src/main/jni/libancillary
url = https://github.com/shadowsocks/libancillary.git
branch = shadowsocks-android
[submodule "src/main/jni/libevent"]
path = src/main/jni/libevent
[submodule "mobile/src/main/jni/libevent"]
path = mobile/src/main/jni/libevent
url = https://github.com/shadowsocks/libevent.git
branch = shadowsocks-android
[submodule "src/main/jni/redsocks"]
path = src/main/jni/redsocks
[submodule "mobile/src/main/jni/redsocks"]
path = mobile/src/main/jni/redsocks
url = https://github.com/shadowsocks/redsocks.git
branch = shadowsocks-android
[submodule "src/main/jni/pdnsd"]
path = src/main/jni/pdnsd
[submodule "mobile/src/main/jni/pdnsd"]
path = mobile/src/main/jni/pdnsd
url = https://github.com/shadowsocks/pdnsd.git
branch = shadowsocks-android
[submodule "kcptun/kcptun"]
path = kcptun/kcptun
url = https://github.com/shadowsocks/kcptun
[submodule "kcptun/go"]
path = kcptun/go
url = https://github.com/shadowsocks/go
[submodule "src/main/jni/mbedtls"]
path = src/main/jni/mbedtls
[submodule "mobile/src/main/jni/mbedtls"]
path = mobile/src/main/jni/mbedtls
url = https://github.com/ARMmbed/mbedtls
[submodule "src/main/jni/pcre"]
path = src/main/jni/pcre
[submodule "mobile/src/main/jni/pcre"]
path = mobile/src/main/jni/pcre
url = https://android.googlesource.com/platform/external/pcre
[submodule "mobile/src/main/jni/libsodium"]
path = mobile/src/main/jni/libsodium
url = https://github.com/jedisct1/libsodium.git
branch = stable
[submodule "mobile/src/main/jni/libev"]
path = mobile/src/main/jni/libev
url = https://github.com/shadowsocks/libev.git
[submodule "mobile/src/main/jni/libudns"]
path = mobile/src/main/jni/libudns
url = https://github.com/shadowsocks/libudns.git
+2
View File
@@ -0,0 +1,2 @@
# Scala source
".*\\.scala" -> frame open:"/*" line:"*" close:"*/"
+2 -3
View File
@@ -7,7 +7,6 @@ env:
global:
- NDK_VERSION=r12b
- NDK_CCACHE=ccache
- GOROOT_BOOTSTRAP=$GOROOT
- ANDROID_NDK_HOME=$HOME/.android/android-ndk-${NDK_VERSION}
- SBTPATH=$HOME/.sbt
- PATH=${ANDROID_NDK_HOME}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${PATH}
@@ -27,7 +26,7 @@ cache:
android:
components:
- tools
- build-tools-24.0.1
- build-tools-25.0.2
- extra-android-m2repository
- extra-google-m2repository
@@ -50,4 +49,4 @@ install:
fi
script:
- $SBTPATH/sbt native-build android:package-debug
- $SBTPATH/sbt android:package
+12 -669
View File
@@ -1,674 +1,17 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Copyright (C) 2017 by Max Lv <max.c.lv@gmail.com>
Copyright (C) 2017 by Mygod Studio <contact-shadowsocks-android@mygod.be>
Preamble
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.
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
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.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+27 -17
View File
@@ -12,9 +12,8 @@ A [shadowsocks](http://shadowsocks.org) client for Android, written in Scala.
* JDK 1.8
* SBT 0.13.0+
* Go 1.4+
* Android SDK
- Build Tools 24+ (as required by [`sbt-android`](https://github.com/scala-android/sbt-android))
- Build Tools 25+
- Android Support Repository and Google Repository (see `build.sbt` for version)
* Android NDK r12b+
@@ -22,34 +21,45 @@ A [shadowsocks](http://shadowsocks.org) client for Android, written in Scala.
* Set environment variable `ANDROID_HOME` to `/path/to/android-sdk`
* Set environment variable `ANDROID_NDK_HOME` to `/path/to/android-ndk`
* Set environment variable `GOROOT_BOOTSTRAP` to `/path/to/go`
* Create your key following the instructions at https://developer.android.com/studio/publish/app-signing.html
* Put your key in ~/.keystore
* Create `local.properties` from `local.properties.example` with your own key information
* Create `mobile/local.properties` from `mobile/local.properties.example` with your own key information
* Invoke the building like this
```bash
git submodule update --init
git submodule update --init --recursive
# Build the App
sbt native-build clean android:package-release
sbt clean android:package-release
```
### TRANSLATE
Translators can go to [POEditor](https://poeditor.com/join/project/u5VHO9vhSf) to help translate shadowsocks-android. Guidelines:
* It's okay to leave some strings untranslated if you think it should use the same string as English (US).
* `faq_url` should not be changed. If you'd like to translate FAQ, submit a pull request with the translated [`faq.md`](https://github.com/shadowsocks/shadowsocks-android/blob/master/.github/faq.md) (it should be named properly, e.g. `.github/faq.zh-CN.md`). Administrators will take care of the rest.
* Do not add/edit/remove comments.
## OPEN SOURCE LICENSES
* shadowsocks-libev: [GPLv3](https://github.com/shadowsocks/shadowsocks-libev/blob/master/LICENSE)
* tun2socks: [BSD](https://github.com/shadowsocks/badvpn/blob/shadowsocks-android/COPYING)
* redsocks: [APL 2.0](https://github.com/shadowsocks/redsocks/blob/master/README)
* OpenSSL: [OpenSSL](https://github.com/shadowsocks/openssl-android/blob/master/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/libevent/blob/master/LICENSE)
* kcptun: [MIT](https://github.com/xtaci/kcptun)
<ul>
<li>redsocks: <a href="https://github.com/shadowsocks/redsocks/blob/shadowsocks-android/README">APL 2.0</a></li>
<li>mbed TLS: <a href="https://github.com/ARMmbed/mbedtls/blob/development/LICENSE">APL 2.0</a></li>
<li>libevent: <a href="https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/libevent/LICENSE">BSD</a></li>
<li>tun2socks: <a href="https://github.com/shadowsocks/badvpn/blob/shadowsocks-android/COPYING">BSD</a></li>
<li>pcre: <a href="https://android.googlesource.com/platform/external/pcre/+/master/dist2/LICENCE">BSD</a></li>
<li>libancillary: <a href="https://github.com/shadowsocks/libancillary/blob/shadowsocks-android/COPYING">BSD</a></li>
<li>shadowsocks-libev: <a href="https://github.com/shadowsocks/shadowsocks-libev/blob/master/LICENSE">GPLv3</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-libev/blob/master/libev/LICENSE">GPLv2</a></li>
<li>libsodium: <a href="https://github.com/jedisct1/libsodium/blob/master/LICENSE">ISC</a></li>
<li>libudns: <a href="https://github.com/shadowsocks/libudns/blob/master/COPYING.LGPL">LGPL</a></li>
</ul>
### LICENSE
Copyright (C) 2016 by Max Lv <<max.c.lv@gmail.com>>
Copyright (C) 2016 by Mygod Studio <<mygodstudio@gmail.com>>
Copyright (C) 2017 by Max Lv <<max.c.lv@gmail.com>>
Copyright (C) 2017 by Mygod Studio <<contact-shadowsocks-android@mygod.be>>
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
+35 -58
View File
@@ -1,68 +1,45 @@
import android.Keys._
lazy val commonSettings = Seq(
scalaVersion := "2.11.8",
dexMaxHeap := "4g",
android.Plugin.androidBuild
organization := "com.github.shadowsocks",
platformTarget in Android := "android-24"
platformTarget := "android-25",
name := "shadowsocks"
compileOrder := CompileOrder.JavaThenScala,
javacOptions ++= "-source" :: "1.7" :: "-target" :: "1.7" :: Nil,
scalacOptions ++= "-target:jvm-1.7" :: "-Xexperimental" :: Nil,
ndkArgs := "-j" :: java.lang.Runtime.getRuntime.availableProcessors.toString :: Nil,
scalaVersion := "2.11.8"
proguardVersion := "5.3.2",
proguardCache := Seq(),
compileOrder in Compile := CompileOrder.JavaThenScala
javacOptions ++= Seq("-source", "1.7", "-target", "1.7")
scalacOptions ++= Seq("-target:jvm-1.7", "-Xexperimental")
ndkJavah in Android := List()
ndkBuild in Android := List()
shrinkResources in Android := true
typedResources in Android := false
resConfigs in Android := Seq("ru", "zh", "zh-rCN")
dexMaxHeap in Android := "4g"
resolvers += Resolver.jcenterRepo
useSupportVectors
libraryDependencies ++= Seq(
"com.android.support" % "design" % "24.2.1",
"com.android.support" % "gridlayout-v7" % "24.2.1",
"com.android.support" % "preference-v14" % "24.2.1",
"com.github.clans" % "fab" % "1.6.4",
"com.github.jorgecastilloprz" % "fabprogresscircle" % "1.01",
"com.github.kevinsawicki" % "http-request" % "6.0",
"com.google.android.gms" % "play-services-ads" % "9.6.0",
"com.google.android.gms" % "play-services-analytics" % "9.6.0",
"com.j256.ormlite" % "ormlite-android" % "5.0",
"com.twofortyfouram" % "android-plugin-api-for-locale" % "1.0.2",
"dnsjava" % "dnsjava" % "2.1.7",
"eu.chainfire" % "libsuperuser" % "1.0.0.201608240809",
"me.dm7.barcodescanner" % "zxing" % "1.9",
"net.glxn.qrgen" % "android" % "2.0"
shrinkResources := true,
typedResources := false
)
proguardVersion in Android := "5.2.1"
val supportLibsVersion = "25.1.1"
lazy val root = Project(id = "shadowsocks-android", base = file("."))
.settings(commonSettings)
.aggregate(plugin, mobile)
proguardCache in Android := Seq()
install in Android := (install in (mobile, Android)).value
run in Android := (run in (mobile, Android)).evaluated
proguardOptions in Android ++= Seq(
"-keep class com.github.shadowsocks.System { *; }",
"-dontwarn com.google.android.gms.internal.**",
"-dontwarn com.j256.ormlite.**",
"-dontwarn org.xbill.**")
lazy val plugin = project
.settings(commonSettings)
.settings(
libraryDependencies += "com.android.support" % "preference-v14" % supportLibsVersion
)
lazy val nativeBuild = TaskKey[Unit]("native-build", "Build native executables")
nativeBuild := {
val logger = streams.value.log
Process("./build.sh") ! logger match {
case 0 => // Success!
case n => sys.error(s"Native build script exit code: $n")
}
}
lazy val mobile = project
.settings(commonSettings)
.settings(
libraryDependencies ++=
"com.android.support" % "cardview-v7" % supportLibsVersion ::
"com.android.support" % "customtabs" % supportLibsVersion ::
"com.android.support" % "design" % supportLibsVersion ::
"com.android.support" % "gridlayout-v7" % supportLibsVersion ::
Nil
)
.dependsOn(plugin)
-28
View File
@@ -1,28 +0,0 @@
#!/bin/bash
function try () {
"$@" || exit -1
}
# Build native binaries
pushd src/main
try $ANDROID_NDK_HOME/ndk-build -j8
rm -rf assets/armeabi-v7a
rm -rf assets/x86
mkdir -p assets/armeabi-v7a
mkdir -p assets/x86
#copy executables
for app in pdnsd redsocks ss-local ss-tunnel tun2socks
do
echo $app
try mv libs/armeabi-v7a/$app assets/armeabi-v7a/
try mv libs/x86/$app assets/x86/
done
popd
# Build kcptun
pushd kcptun
try ./make.bash
popd
Submodule kcptun/go deleted from c3f75e654d
Submodule kcptun/kcptun deleted from 46dd8eab14
-69
View File
@@ -1,69 +0,0 @@
#!/bin/bash
function try () {
"$@" || exit -1
}
[ -z "$ANDROID_NDK_HOME" ] && ANDROID_NDK_HOME=~/android-ndk-r12b
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DEPS=$DIR/.deps
ANDROID_ARM_TOOLCHAIN=$DEPS/android-toolchain-16-arm
ANDROID_X86_TOOLCHAIN=$DEPS/android-toolchain-16-x86
ANDROID_ARM_CC=$ANDROID_ARM_TOOLCHAIN/bin/arm-linux-androideabi-gcc
ANDROID_ARM_STRIP=$ANDROID_ARM_TOOLCHAIN/bin/arm-linux-androideabi-strip
ANDROID_X86_CC=$ANDROID_X86_TOOLCHAIN/bin/i686-linux-android-gcc
ANDROID_X86_STRIP=$ANDROID_X86_TOOLCHAIN/bin/i686-linux-android-strip
if [ ! -d "$DEPS" ]; then
mkdir -p $DEPS
fi
if [ ! -d "$ANDROID_ARM_TOOLCHAIN" ]; then
echo "Make standalone toolchain for ARM arch"
$ANDROID_NDK_HOME/build/tools/make_standalone_toolchain.py --arch arm \
--api 16 --install-dir $ANDROID_ARM_TOOLCHAIN
fi
if [ ! -d "$ANDROID_X86_TOOLCHAIN" ]; then
echo "Make standalone toolchain for X86 arch"
$ANDROID_NDK_HOME/build/tools/make_standalone_toolchain.py --arch x86 \
--api 16 --install-dir $ANDROID_X86_TOOLCHAIN
fi
if [ ! -d "$DIR/go/bin" ]; then
echo "Build the custom go"
pushd $DIR/go/src
try ./make.bash
popd
fi
export GOROOT=$DIR/go
export GOPATH=$DEPS/gopath
export GOBIN=$GOPATH/bin
mkdir -p $GOBIN
export PATH=$GOROOT/bin:$PATH
pushd kcptun/client
echo "Get dependences for kcptun"
go get -u github.com/xtaci/kcp-go
go get -u github.com/xtaci/smux
go get
echo "Cross compile kcptun for arm"
try env CGO_ENABLED=1 CC=$ANDROID_ARM_CC GOOS=android GOARCH=arm GOARM=7 go build -ldflags="-s -w"
try $ANDROID_ARM_STRIP client
try mv client $DIR/../src/main/assets/armeabi-v7a/kcptun
echo "Cross compile kcptun for x86"
try env CGO_ENABLED=1 CC=$ANDROID_X86_CC GOOS=android GOARCH=386 go build -ldflags="-s -w"
try $ANDROID_X86_STRIP client
try mv client $DIR/../src/main/assets/x86/kcptun
popd
echo "Successfully build kcptun"
+38
View File
@@ -0,0 +1,38 @@
enablePlugins(AndroidApp)
android.useSupportVectors
name := "shadowsocks"
version := "4.0.2"
versionCode := Some(177)
proguardOptions ++=
"-keep class com.github.shadowsocks.JniHelper { *; }" ::
"-dontwarn com.google.android.gms.internal.**" ::
"-dontwarn com.j256.ormlite.**" ::
"-dontwarn okio.**" ::
"-dontwarn org.xbill.**" ::
Nil
resConfigs := Seq("ja", "ru", "zh-rCN", "zh-rTW")
val playServicesVersion = "10.0.1"
resolvers += Resolver.jcenterRepo
libraryDependencies ++=
"com.futuremind.recyclerfastscroll" % "fastscroll" % "0.2.5" ::
"com.evernote" % "android-job" % "1.1.5" ::
"com.github.jorgecastilloprz" % "fabprogresscircle" % "1.01" ::
"com.google.android.gms" % "play-services-ads" % playServicesVersion ::
"com.google.android.gms" % "play-services-analytics" % playServicesVersion ::
"com.google.android.gms" % "play-services-gcm" % playServicesVersion ::
"com.j256.ormlite" % "ormlite-android" % "5.0" ::
"com.mikepenz" % "crossfader" % "1.5.0" ::
"com.mikepenz" % "fastadapter" % "2.1.6" ::
"com.mikepenz" % "iconics-core" % "2.8.2" ::
"com.mikepenz" % "materialdrawer" % "5.8.1" ::
"com.mikepenz" % "materialize" % "1.0.0" ::
"com.squareup.okhttp3" % "okhttp" % "3.6.0" ::
"com.twofortyfouram" % "android-plugin-api-for-locale" % "1.0.2" ::
"dnsjava" % "dnsjava" % "2.1.8" ::
"eu.chainfire" % "libsuperuser" % "1.0.0.201608240809" ::
"net.glxn.qrgen" % "android" % "2.0" ::
Nil
+3
View File
@@ -0,0 +1,3 @@
<issue id="NewApi">
<ignore path="src/main/res/drawable"/>
</issue>
@@ -1,18 +1,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" package="com.github.shadowsocks"
android:versionCode="158"
android:versionName="3.1.6">
xmlns:tools="http://schemas.android.com/tools" package="com.github.shadowsocks">
<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.NFC" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.touchscreen"
android:required="false"/>
<uses-feature android:name="android.hardware.camera"
android:required="false"/>
<uses-feature android:name="android.hardware.nfc"
android:required="false"/>
<uses-feature android:name="android.software.leanback"
@@ -20,16 +14,13 @@
<uses-sdk
android:minSdkVersion="19"
android:targetSdkVersion="24"/>
android:targetSdkVersion="25"/>
<application
android:allowBackup="true"
android:name=".ShadowsocksApplication"
android:hardwareAccelerated="true"
android:icon="@drawable/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:backupAgent=".ShadowsocksBackupAgent"
android:label="@string/app_name"
android:theme="@style/Theme.Material"
android:banner="@drawable/ic_start_connected">
<meta-data android:name="com.google.android.gms.version"
@@ -38,11 +29,7 @@
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=".Shadowsocks"
android:name=".MainActivity"
android:label="@string/app_name"
android:launchMode="singleTask">
<intent-filter>
@@ -51,26 +38,7 @@
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE" />
</intent-filter>
</activity>
<activity
android:name=".ShadowsocksRunnerActivity"
android:theme="@android:style/Theme.NoDisplay"
android:excludeFromRecents="true"
android:launchMode="singleTask">
</activity>
<activity
android:name=".ProfileManagerActivity"
android:label="@string/profiles"
android:parentActivityName=".Shadowsocks"
android:excludeFromRecents="true"
android:launchMode="singleTask">
<intent-filter>
<action android:name="com.github.shadowsocks.ProfileManagerActivity"/>
<category android:name="android.intent.category.DEFAULT"/>
<action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
@@ -83,36 +51,46 @@
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="ss" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
android:resource="@xml/shortcuts"/>
</activity>
<activity
android:name=".ScannerActivity"
android:label="@string/add_profile_methods_scan_qr_code"
android:parentActivityName=".ProfileManagerActivity"
android:excludeFromRecents="true"/>
android:name=".ProfileConfigActivity"
android:excludeFromRecents="true"
android:label="@string/profile_config"
android:launchMode="singleTask"/>
<activity
android:name=".ShadowsocksRunnerActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:excludeFromRecents="true"
android:taskAffinity=""
android:launchMode="singleTask"/>
<activity
android:name=".AppManager"
android:label="@string/proxied_apps"
android:parentActivityName=".Shadowsocks"
android:parentActivityName=".ProfileConfigActivity"
android:excludeFromRecents="true"
android:launchMode="singleTask"/>
<activity android:name=".TaskerActivity"
android:icon="@drawable/ic_launcher">
android:icon="@mipmap/ic_launcher">
<intent-filter>
<action android:name="com.twofortyfouram.locale.intent.action.EDIT_SETTING" />
</intent-filter>
</activity>
<activity android:name=".ShadowsocksQuickSwitchActivity"
android:launchMode="singleInstance"
android:excludeFromRecents="true"
android:taskAffinity=""
android:theme="@style/Theme.Material.Dialog">
<activity
android:name=".QuickToggleShortcut"
android:label="@string/quick_toggle"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:excludeFromRecents="true"
android:taskAffinity=""
android:launchMode="singleTask">
<intent-filter>
<action android:name="com.github.shadowsocks.QUICK_SWITCH" />
<category android:name="android.intent.category.DEFAULT"/>
<action android:name="android.intent.action.CREATE_SHORTCUT" />
</intent-filter>
</activity>
@@ -158,6 +136,21 @@
<action android:name="com.twofortyfouram.locale.intent.action.FIRE_SETTING"/>
</intent-filter>
</receiver>
<!-- android-job components -->
<service android:name="com.evernote.android.job.v21.PlatformJobService"
android:process=":bg"/>
<service android:name="com.evernote.android.job.v14.PlatformAlarmService"
android:process=":bg"/>
<service android:name="com.evernote.android.job.gcm.PlatformGcmService"
android:process=":bg"/>
<receiver android:name="com.evernote.android.job.v14.PlatformAlarmReceiver"
android:process=":bg"/>
<receiver android:name="com.evernote.android.job.JobBootReceiver"
android:process=":bg"/>
<!-- Strip useless components -->
<activity android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity" tools:node="remove"/>
</application>
</manifest>
@@ -7,6 +7,8 @@ interface IShadowsocksService {
String getProfileName();
oneway void registerCallback(IShadowsocksServiceCallback cb);
oneway void startListeningForBandwidth(IShadowsocksServiceCallback cb);
oneway void stopListeningForBandwidth(IShadowsocksServiceCallback cb);
oneway void unregisterCallback(IShadowsocksServiceCallback cb);
oneway void use(in int profileId);
@@ -0,0 +1,8 @@
package com.github.shadowsocks.aidl;
interface IShadowsocksServiceCallback {
oneway void stateChanged(int state, String profileName, String msg);
oneway void trafficUpdated(int profileId, long txRate, long rxRate, long txTotal, long rxTotal);
// Traffic data has persisted to database, listener should refetch their data from database
oneway void trafficPersisted(int profileId);
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+14
View File
@@ -0,0 +1,14 @@
0.0.0.0/8
10.0.0.0/8
100.64.0.0/10
127.0.0.0/8
169.254.0.0/16
172.16.0.0/12
192.0.0.0/29
192.0.2.0/24
192.88.99.0/24
192.168.0.0/16
198.18.0.0/15
198.51.100.0/24
203.0.113.0/24
224.0.0.0/3
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -274,8 +274,8 @@ img {
</head>
<body>
<p>A <a href="http://shadowsocks.org">Shadowsocks</a> client for Android, written in Scala.</p>
<p>Copyright (C) 2016 by Max Lv <a href="&#x6d;&#97;&#x69;&#108;&#116;&#111;&#x3a;&#x6d;&#97;x&#46;&#99;.&#108;&#118;&#x40;&#103;&#109;&#97;&#x69;&#108;&#46;&#x63;&#x6f;&#109;">&#x6d;&#97;&#x78;.&#x63;&#x2e;&#108;v&#64;&#x67;&#109;&#x61;&#x69;&#108;&#x2e;&#99;&#111;&#109;</a></p>
<p>Copyright (C) 2016 by Mygod Studio <a href="mygodstudio@gmail.com">mygodstudio@gmail.com</a></p>
<p>Copyright (C) 2017 by Max Lv <a href="&#x6d;&#97;&#x69;&#108;&#116;&#111;&#x3a;&#x6d;&#97;x&#46;&#99;.&#108;&#118;&#x40;&#103;&#109;&#97;&#x69;&#108;&#46;&#x63;&#x6f;&#109;">&#x6d;&#97;&#x78;.&#x63;&#x2e;&#108;v&#64;&#x67;&#109;&#x61;&#x69;&#108;&#x2e;&#99;&#111;&#109;</a></p>
<p>Copyright (C) 2017 by Mygod Studio <a href="contact-shadowsocks-android@mygod.be">contact-shadowsocks-android@mygod.be</a></p>
<p>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
@@ -289,14 +289,17 @@ along with this program. If not, see <a href="http://www.gnu.org/licenses/">http
<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/badvpn/blob/shadowsocks-android/COPYING">BSD</a></li>
<li>redsocks: <a href="https://github.com/shadowsocks/redsocks/blob/shadowsocks-android/README">APL 2.0</a></li>
<li>OpenSSL: <a href="https://github.com/shadowsocks/openssl-android/blob/master/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/libevent/blob/shadowsocks-android/LICENSE">GPLv2</a></li>
<li>mbed TLS: <a href="https://github.com/ARMmbed/mbedtls/blob/development/LICENSE">APL 2.0</a></li>
<li>libevent: <a href="https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/libevent/LICENSE">BSD</a></li>
<li>kcptun: <a href="https://github.com/xtaci/kcptun/commits/master/LICENSE.md">MIT</a></li>
<li>tun2socks: <a href="https://github.com/shadowsocks/badvpn/blob/shadowsocks-android/COPYING">BSD</a></li>
<li>pcre: <a href="https://android.googlesource.com/platform/external/pcre/+/master/dist2/LICENCE">BSD</a></li>
<li>libancillary: <a href="https://github.com/shadowsocks/libancillary/blob/shadowsocks-android/COPYING">BSD</a></li>
<li>shadowsocks-libev: <a href="https://github.com/shadowsocks/shadowsocks-libev/blob/master/LICENSE">GPLv3</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-libev/blob/master/libev/LICENSE">GPLv2</a></li>
<li>libsodium: <a href="https://github.com/jedisct1/libsodium/blob/master/LICENSE">ISC</a></li>
<li>libudns: <a href="https://github.com/shadowsocks/libudns/blob/master/COPYING.LGPL">LGPL</a></li>
</ul>
</body>
Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

@@ -0,0 +1,15 @@
package com.github.shadowsocks;
import android.app.Activity;
/**
* This helper class is used to solve Java-Scala interop problem. Use onAttach(Context) and remove this class
* when minSdkVersion >= 23.
*
* @author Mygod
*/
public class DialogFragment extends android.app.DialogFragment {
protected void superOnAttach(Activity activity) {
super.onAttach(activity);
}
}
@@ -38,13 +38,23 @@
package com.github.shadowsocks;
public class System {
static {
java.lang.System.loadLibrary("system");
}
import android.os.Build;
import android.system.ErrnoException;
public static native int exec(String cmd);
public static native String getABI();
public static native int sendfd(int fd, String path);
public static native void jniclose(int fd);
public class JniHelper {
static {
System.loadLibrary("jni-helper");
}
@Deprecated // Use Process.destroy() since API 24
public static void sigtermCompat(Process process) throws Exception {
if (Build.VERSION.SDK_INT >= 24) throw new UnsupportedOperationException("Never call this method in OpenJDK!");
int errno = sigterm(process);
if (errno != 0) throw Build.VERSION.SDK_INT >= 21
? new ErrnoException("kill", errno) : new Exception("kill failed: " + errno);
}
private static native int sigterm(Process process);
public static native int sendFd(int fd, String path);
public static native void close(int fd);
}
@@ -0,0 +1,155 @@
package com.github.shadowsocks.utils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;
/**
* Commandline objects help handling command lines specifying processes to
* execute.
*
* The class can be used to define a command line as nested elements or as a
* helper to define a command line by an application.
* <p>
* <code>
* &lt;someelement&gt;<br>
* &nbsp;&nbsp;&lt;acommandline executable="/executable/to/run"&gt;<br>
* &nbsp;&nbsp;&nbsp;&nbsp;&lt;argument value="argument 1" /&gt;<br>
* &nbsp;&nbsp;&nbsp;&nbsp;&lt;argument line="argument_1 argument_2 argument_3" /&gt;<br>
* &nbsp;&nbsp;&nbsp;&nbsp;&lt;argument value="argument 4" /&gt;<br>
* &nbsp;&nbsp;&lt;/acommandline&gt;<br>
* &lt;/someelement&gt;<br>
* </code>
*
* Based on: https://github.com/apache/ant/blob/588ce1f/src/main/org/apache/tools/ant/types/Commandline.java
*
* Adds support for escape character '\'.
*
* @author Mygod
*/
public final class Commandline {
private Commandline() { }
/**
* Quote the parts of the given array in way that makes them
* usable as command line arguments.
* @param args the list of arguments to quote.
* @return empty string for null or no command, else every argument split
* by spaces and quoted by quoting rules.
*/
public static String toString(Iterable<String> args) {
// empty path return empty string
if (args == null) {
return "";
}
// path containing one or more elements
final StringBuilder result = new StringBuilder();
for (String arg : args) {
if (result.length() > 0) result.append(' ');
for (int j = 0; j < arg.length(); ++j) {
char ch = arg.charAt(j);
switch (ch) {
case ' ': case '\\': case '"': case '\'': result.append('\\'); // intentionally no break
default: result.append(ch);
}
}
}
return result.toString();
}
/**
* Quote the parts of the given array in way that makes them
* usable as command line arguments.
* @param args the list of arguments to quote.
* @return empty string for null or no command, else every argument split
* by spaces and quoted by quoting rules.
*/
public static String toString(String[] args) {
return toString(Arrays.asList(args)); // thanks to Java, arrays aren't iterable
}
/**
* Crack a command line.
* @param toProcess the command line to process.
* @return the command line broken into strings.
* An empty or null toProcess parameter results in a zero sized array.
*/
public static String[] translateCommandline(String toProcess) {
if (toProcess == null || toProcess.length() == 0) {
//no command? no string
return new String[0];
}
// parse with a simple finite state machine
final int normal = 0;
final int inQuote = 1;
final int inDoubleQuote = 2;
int state = normal;
final StringTokenizer tok = new StringTokenizer(toProcess, "\\\"\' ", true);
final ArrayList<String> result = new ArrayList<>();
final StringBuilder current = new StringBuilder();
boolean lastTokenHasBeenQuoted = false;
boolean lastTokenIsSlash = false;
while (tok.hasMoreTokens()) {
String nextTok = tok.nextToken();
switch (state) {
case inQuote:
if ("\'".equals(nextTok)) {
lastTokenHasBeenQuoted = true;
state = normal;
} else {
current.append(nextTok);
}
break;
case inDoubleQuote:
if ("\"".equals(nextTok)) {
if (lastTokenIsSlash) {
current.append(nextTok);
lastTokenIsSlash = false;
} else {
lastTokenHasBeenQuoted = true;
state = normal;
}
} else if ("\\".equals(nextTok)) {
if (lastTokenIsSlash) {
current.append(nextTok);
lastTokenIsSlash = false;
} else lastTokenIsSlash = true;
} else {
if (lastTokenIsSlash) {
current.append("\\"); // unescaped
lastTokenIsSlash = false;
}
current.append(nextTok);
}
break;
default:
if (lastTokenIsSlash) {
current.append(nextTok);
lastTokenIsSlash = false;
} else if ("\\".equals(nextTok)) lastTokenIsSlash = true; else if ("\'".equals(nextTok)) {
state = inQuote;
} else if ("\"".equals(nextTok)) {
state = inDoubleQuote;
} else if (" ".equals(nextTok)) {
if (lastTokenHasBeenQuoted || current.length() != 0) {
result.add(current.toString());
current.setLength(0);
}
} else {
current.append(nextTok);
}
lastTokenHasBeenQuoted = false;
break;
}
}
if (lastTokenHasBeenQuoted || current.length() != 0) {
result.add(current.toString());
}
if (state == inQuote || state == inDoubleQuote) {
throw new IllegalArgumentException("unbalanced quotes in " + toProcess);
}
if (lastTokenIsSlash) throw new IllegalArgumentException("escape character following nothing in " + toProcess);
return result.toArray(new String[result.size()]);
}
}
@@ -16,6 +16,8 @@
LOCAL_PATH := $(call my-dir)
ROOT_PATH := $(LOCAL_PATH)
BUILD_SHARED_EXECUTABLE := $(LOCAL_PATH)/build-shared-executable.mk
########################################################
## libsodium
########################################################
@@ -24,176 +26,37 @@ include $(CLEAR_VARS)
SODIUM_SOURCE := \
crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c \
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/crypto_box.c \
crypto_box/crypto_box_easy.c \
crypto_box/crypto_box_seal.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/hsalsa20/ref2/core_hsalsa20.c \
crypto_core/hsalsa20/core_hsalsa20_api.c \
crypto_core/salsa20/ref/core_salsa20.c \
crypto_core/salsa20/core_salsa20_api.c \
crypto_generichash/crypto_generichash.c \
crypto_generichash/blake2/generichash_blake2_api.c \
crypto_generichash/blake2/ref/blake2-impl.h \
crypto_generichash/blake2/ref/blake2.h \
crypto_generichash/blake2/ref/blake2b-compress-ref.c \
crypto_generichash/blake2/ref/blake2b-load-sse2.h \
crypto_generichash/blake2/ref/blake2b-load-sse41.h \
crypto_generichash/blake2/ref/blake2b-ref.c \
crypto_generichash/blake2/ref/blake2b-round.h \
crypto_generichash/blake2/ref/generichash_blake2b.c \
crypto_hash/crypto_hash.c \
crypto_hash/sha256/hash_sha256_api.c \
crypto_hash/sha256/cp/hash_sha256.c \
crypto_hash/sha512/hash_sha512_api.c \
crypto_hash/sha512/cp/hash_sha512.c \
crypto_onetimeauth/crypto_onetimeauth.c \
crypto_onetimeauth/poly1305/onetimeauth_poly1305.c \
crypto_onetimeauth/poly1305/onetimeauth_poly1305.h \
crypto_onetimeauth/poly1305/donna/poly1305_donna.h \
crypto_onetimeauth/poly1305/donna/poly1305_donna32.h \
crypto_onetimeauth/poly1305/donna/poly1305_donna64.h \
crypto_onetimeauth/poly1305/donna/poly1305_donna.c \
crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c \
crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h \
crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c \
crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c \
crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.h \
crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c \
crypto_pwhash/scryptsalsa208sha256/sysendian.h \
crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c \
crypto_scalarmult/crypto_scalarmult.c \
crypto_pwhash/crypto_pwhash.c \
crypto_pwhash/argon2/argon2-core.c \
crypto_pwhash/argon2/argon2.c \
crypto_pwhash/argon2/argon2-encoding.c \
crypto_pwhash/argon2/argon2-fill-block-ref.c \
crypto_pwhash/argon2/blake2b-long.c \
crypto_pwhash/argon2/pwhash_argon2i.c \
crypto_scalarmult/curve25519/scalarmult_curve25519.c \
crypto_scalarmult/curve25519/scalarmult_curve25519.h \
crypto_secretbox/crypto_secretbox.c \
crypto_secretbox/crypto_secretbox_easy.c \
crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c \
crypto_secretbox/xsalsa20poly1305/ref/box_xsalsa20poly1305.c \
crypto_shorthash/crypto_shorthash.c \
crypto_shorthash/siphash24/shorthash_siphash24_api.c \
crypto_shorthash/siphash24/ref/shorthash_siphash24.c \
crypto_sign/crypto_sign.c \
crypto_sign/ed25519/ref10/base.h \
crypto_sign/ed25519/ref10/base2.h \
crypto_sign/ed25519/sign_ed25519_api.c \
crypto_sign/ed25519/ref10/d.h \
crypto_sign/ed25519/ref10/d2.h \
crypto_sign/ed25519/ref10/fe.h \
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.h \
crypto_sign/ed25519/ref10/ge_add.c \
crypto_sign/ed25519/ref10/ge_add.h \
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_madd.h \
crypto_sign/ed25519/ref10/ge_msub.c \
crypto_sign/ed25519/ref10/ge_msub.h \
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_p2_dbl.h \
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_sub.h \
crypto_sign/ed25519/ref10/ge_tobytes.c \
crypto_sign/ed25519/ref10/keypair.c \
crypto_sign/ed25519/ref10/open.c \
crypto_sign/ed25519/ref10/pow22523.h \
crypto_sign/ed25519/ref10/pow225521.h \
crypto_sign/ed25519/ref10/sc.h \
crypto_sign/ed25519/ref10/sc_muladd.c \
crypto_sign/ed25519/ref10/sc_reduce.c \
crypto_sign/ed25519/ref10/sign.c \
crypto_sign/ed25519/ref10/sqrtm1.h \
crypto_stream/crypto_stream.c \
crypto_stream/chacha20/stream_chacha20.c \
crypto_stream/chacha20/stream_chacha20.h \
crypto_stream/chacha20/ref/stream_chacha20_ref.h \
crypto_stream/chacha20/ref/stream_chacha20_ref.c \
crypto_stream/salsa20/stream_salsa20_api.c \
crypto_stream/xsalsa20/stream_xsalsa20_api.c \
crypto_stream/xsalsa20/ref/stream_xsalsa20.c \
crypto_stream/xsalsa20/ref/xor_xsalsa20.c \
crypto_verify/16/verify_16_api.c \
crypto_stream/salsa20/ref/stream_salsa20_ref.c \
crypto_stream/salsa20/ref/xor_salsa20_ref.c \
crypto_verify/16/ref/verify_16.c \
crypto_verify/32/verify_32_api.c \
crypto_verify/32/ref/verify_32.c \
crypto_verify/64/verify_64_api.c \
crypto_verify/64/ref/verify_64.c \
randombytes/randombytes.c \
randombytes/sysrandom/randombytes_sysrandom.c \
sodium/core.c \
sodium/runtime.c \
sodium/utils.c \
sodium/version.c
SODIUM_SOURCE += \
crypto_scalarmult/curve25519/ref10/curve25519_ref10.c \
crypto_scalarmult/curve25519/ref10/curve25519_ref10.h \
crypto_scalarmult/curve25519/ref10/fe.h \
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_mul_curve25519_ref10.c \
crypto_scalarmult/curve25519/ref10/fe_mul121666_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/montgomery.h \
crypto_scalarmult/curve25519/ref10/pow225521.h
SODIUM_SOURCE += \
crypto_stream/salsa20/ref/stream_salsa20_ref.c \
crypto_stream/salsa20/ref/xor_salsa20_ref.c
SODIUM_SOURCE += \
randombytes/sysrandom/randombytes_sysrandom.c
LOCAL_MODULE := sodium
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/shadowsocks-libev/libsodium/src/libsodium/include \
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/libsodium/src/libsodium/include \
-I$(LOCAL_PATH)/include \
-I$(LOCAL_PATH)/include/sodium \
-I$(LOCAL_PATH)/shadowsocks-libev/libsodium/src/libsodium/include/sodium \
-I$(LOCAL_PATH)/libsodium/src/libsodium/include/sodium \
-DPACKAGE_NAME=\"libsodium\" -DPACKAGE_TARNAME=\"libsodium\" \
-DPACKAGE_VERSION=\"1.0.7\" -DPACKAGE_STRING=\"libsodium\ 1.0.7\" \
-DPACKAGE_BUGREPORT=\"https://github.com/jedisct1/libsodium/issues\" \
@@ -209,7 +72,7 @@ LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/shadowsocks-libev/libsodium/src/libsodium/in
-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))
LOCAL_SRC_FILES := $(addprefix libsodium/src/libsodium/,$(SODIUM_SOURCE))
include $(BUILD_STATIC_LIBRARY)
@@ -273,7 +136,7 @@ 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))
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/libipset/src/libipset/,$(IPSET_SOURCE))
include $(BUILD_STATIC_LIBRARY)
@@ -300,7 +163,7 @@ 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))
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/libcork/src/libcork/,$(CORK_SOURCE))
include $(BUILD_STATIC_LIBRARY)
@@ -316,10 +179,10 @@ UDNS_SOURCES := udns_dn.c udns_dntosp.c udns_parse.c udns_resolver.c udns_init.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 \
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/libudns \
-DHAVE_DECL_INET_NTOP
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/libudns/,$(UDNS_SOURCES))
LOCAL_SRC_FILES := $(addprefix libudns/,$(UDNS_SOURCES))
include $(BUILD_STATIC_LIBRARY)
@@ -333,8 +196,8 @@ LOCAL_MODULE := libev
LOCAL_CFLAGS += -O2 -DNDEBUG -DHAVE_CONFIG_H \
-I$(LOCAL_PATH)/include/libev
LOCAL_SRC_FILES := \
shadowsocks-libev/libev/ev.c \
shadowsocks-libev/libev/event.c
libev/ev.c \
libev/event.c
include $(BUILD_STATIC_LIBRARY)
@@ -358,7 +221,7 @@ LOCAL_CFLAGS := -O2 -std=gnu99 -DUSE_IPTABLES \
-I$(LOCAL_PATH)/libevent/include \
-I$(LOCAL_PATH)/libevent
include $(BUILD_EXECUTABLE)
include $(BUILD_SHARED_EXECUTABLE)
########################################################
## pdnsd
@@ -375,7 +238,7 @@ LOCAL_CFLAGS := -DANDROID -Wall -O2 -I$(LOCAL_PATH)/pdnsd \
LOCAL_STATIC_LIBRARIES := libancillary
LOCAL_LDLIBS := -llog
include $(BUILD_EXECUTABLE)
include $(BUILD_SHARED_EXECUTABLE)
########################################################
## shadowsocks-libev local
@@ -383,8 +246,11 @@ include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
SHADOWSOCKS_SOURCES := local.c cache.c udprelay.c encrypt.c \
utils.c netutils.c json.c jconf.c acl.c http.c tls.c rule.c \
SHADOWSOCKS_SOURCES := local.c \
cache.c udprelay.c utils.c netutils.c json.c jconf.c \
acl.c http.c tls.c rule.c \
crypto.c aead.c stream.c base64.c \
plugin.c \
android.c
LOCAL_MODULE := ss-local
@@ -397,19 +263,19 @@ LOCAL_CFLAGS := -Wall -O2 -fno-strict-aliasing -DMODULE_LOCAL \
-I$(LOCAL_PATH)/libancillary \
-I$(LOCAL_PATH)/mbedtls/include \
-I$(LOCAL_PATH)/pcre \
-I$(LOCAL_PATH)/shadowsocks-libev/libudns \
-I$(LOCAL_PATH)/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)/libsodium/src/libsodium/include \
-I$(LOCAL_PATH)/libsodium/src/libsodium/include/sodium \
-I$(LOCAL_PATH)/shadowsocks-libev/libipset/include \
-I$(LOCAL_PATH)/shadowsocks-libev/libev
-I$(LOCAL_PATH)/libev
LOCAL_STATIC_LIBRARIES := libev libmbedtls libipset libcork libudns \
libsodium libancillary libpcre
LOCAL_LDLIBS := -llog
include $(BUILD_EXECUTABLE)
include $(BUILD_SHARED_EXECUTABLE)
########################################################
## shadowsocks-libev tunnel
@@ -417,7 +283,11 @@ include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
SHADOWSOCKS_SOURCES := tunnel.c cache.c udprelay.c encrypt.c utils.c netutils.c json.c jconf.c android.c
SHADOWSOCKS_SOURCES := tunnel.c \
cache.c udprelay.c utils.c netutils.c json.c jconf.c \
crypto.c aead.c stream.c base64.c \
plugin.c \
android.c
LOCAL_MODULE := ss-tunnel
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/src/, $(SHADOWSOCKS_SOURCES))
@@ -426,31 +296,31 @@ LOCAL_CFLAGS := -Wall -O2 -fno-strict-aliasing -DMODULE_TUNNEL \
-DCONNECT_IN_PROGRESS=EINPROGRESS \
-I$(LOCAL_PATH)/libancillary \
-I$(LOCAL_PATH)/include \
-I$(LOCAL_PATH)/shadowsocks-libev/libudns \
-I$(LOCAL_PATH)/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)/libsodium/src/libsodium/include \
-I$(LOCAL_PATH)/libsodium/src/libsodium/include/sodium \
-I$(LOCAL_PATH)/mbedtls/include \
-I$(LOCAL_PATH)/shadowsocks-libev/libev \
-I$(LOCAL_PATH)/libev \
-I$(LOCAL_PATH)/include/shadowsocks-libev
LOCAL_STATIC_LIBRARIES := libev libmbedtls libsodium libcork libudns libancillary
LOCAL_LDLIBS := -llog
include $(BUILD_EXECUTABLE)
include $(BUILD_SHARED_EXECUTABLE)
########################################################
## system
## jni-helper
########################################################
include $(CLEAR_VARS)
LOCAL_MODULE:= system
LOCAL_MODULE:= jni-helper
LOCAL_C_INCLUDES:= $(LOCAL_PATH)/libancillary
LOCAL_SRC_FILES:= system.cpp
LOCAL_SRC_FILES:= jni-helper.cpp
LOCAL_LDLIBS := -ldl -llog
@@ -549,7 +419,7 @@ LOCAL_LDLIBS := -ldl -llog
LOCAL_SRC_FILES := $(addprefix badvpn/, $(TUN2SOCKS_SOURCES))
include $(BUILD_EXECUTABLE)
include $(BUILD_SHARED_EXECUTABLE)
########################################################
## mbed TLS
@@ -573,7 +443,7 @@ include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := pcre
LOCAL_MODULE := pcre
LOCAL_CFLAGS += -DHAVE_CONFIG_H
@@ -1,4 +1,4 @@
APP_ABI := armeabi-v7a x86
APP_PLATFORM := android-16
APP_PLATFORM := android-19
APP_STL := stlport_static
NDK_TOOLCHAIN_VERSION := clang
@@ -0,0 +1,31 @@
# 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.
#
# this file is included from Android.mk files to build a target-specific
# executable program
#
# Modified by @Mygod, based on:
# https://android.googlesource.com/platform/ndk/+/f2e98f8c066aed59caf61163d4b87c2b858f9814/build/core/build-shared-library.mk
# https://android.googlesource.com/platform/ndk/+/f2e98f8c066aed59caf61163d4b87c2b858f9814/build/core/build-executable.mk
LOCAL_BUILD_SCRIPT := BUILD_EXECUTABLE
LOCAL_MAKEFILE := $(local-makefile)
$(call check-defined-LOCAL_MODULE,$(LOCAL_BUILD_SCRIPT))
$(call check-LOCAL_MODULE,$(LOCAL_MAKEFILE))
$(call check-LOCAL_MODULE_FILENAME)
# we are building target objects
my := TARGET_
$(call handle-module-filename,lib,$(TARGET_SONAME_EXTENSION))
$(call handle-module-built)
LOCAL_MODULE_CLASS := EXECUTABLE
include $(BUILD_SYSTEM)/build-module.mk
@@ -1,12 +1,14 @@
#define LOG_TAG "Shadowsocks"
#define LOG_TAG "JniHelper"
#include "jni.h"
#include <android/log.h>
#include <sys/system_properties.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <cpu-features.h>
#include <signal.h>
#include <sys/un.h>
#include <sys/stat.h>
@@ -17,54 +19,33 @@
#define LOGI(...) do { __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__); } while(0)
#define LOGW(...) do { __android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__); } while(0)
#define LOGE(...) do { __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__); } while(0)
#define THROW(env, clazz, msg) do { env->ThrowNew(env->FindClass(clazz), msg); } while (0)
jstring Java_com_github_shadowsocks_system_getabi(JNIEnv *env, jobject thiz) {
AndroidCpuFamily family = android_getCpuFamily();
uint64_t features = android_getCpuFeatures();
const char *abi;
static jclass ProcessImpl;
static jfieldID ProcessImpl_pid;
if (family == ANDROID_CPU_FAMILY_X86) {
abi = "x86";
} else if (family == ANDROID_CPU_FAMILY_MIPS) {
abi = "mips";
} else if (family == ANDROID_CPU_FAMILY_ARM) {
// if (features & ANDROID_CPU_ARM_FEATURE_ARMv7) {
abi = "armeabi-v7a";
// } else {
// abi = "armeabi";
// }
}
return env->NewStringUTF(abi);
static int sdk_version() {
char version[PROP_VALUE_MAX + 1];
__system_property_get("ro.build.version.sdk", version);
return atoi(version);
}
jint Java_com_github_shadowsocks_system_exec(JNIEnv *env, jobject thiz, jstring cmd) {
const char *cmd_str = env->GetStringUTFChars(cmd, 0);
pid_t pid;
/* Fork off the parent process */
pid = fork();
if (pid < 0) {
env->ReleaseStringUTFChars(cmd, cmd_str);
jint Java_com_github_shadowsocks_jnihelper_sigterm(JNIEnv *env, jobject thiz, jobject process) {
if (!env->IsInstanceOf(process, ProcessImpl)) {
THROW(env, "java/lang/ClassCastException",
"Unsupported process object. Only java.lang.ProcessManager$ProcessImpl is accepted.");
return -1;
}
if (pid > 0) {
env->ReleaseStringUTFChars(cmd, cmd_str);
return pid;
}
execl("/system/bin/sh", "sh", "-c", cmd_str, NULL);
env->ReleaseStringUTFChars(cmd, cmd_str);
return 1;
jint pid = env->GetIntField(process, ProcessImpl_pid);
// Suppress "No such process" errors. We just want the process killed. It's fine if it's already killed.
return kill(pid, SIGTERM) == -1 && errno != ESRCH ? errno : 0;
}
void Java_com_github_shadowsocks_system_jniclose(JNIEnv *env, jobject thiz, jint fd) {
void Java_com_github_shadowsocks_jnihelper_close(JNIEnv *env, jobject thiz, jint fd) {
close(fd);
}
jint Java_com_github_shadowsocks_system_sendfd(JNIEnv *env, jobject thiz, jint tun_fd, jstring path) {
jint Java_com_github_shadowsocks_jnihelper_sendfd(JNIEnv *env, jobject thiz, jint tun_fd, jstring path) {
int fd;
struct sockaddr_un addr;
const char *sock_str = env->GetStringUTFChars(path, 0);
@@ -95,17 +76,15 @@ jint Java_com_github_shadowsocks_system_sendfd(JNIEnv *env, jobject thiz, jint t
return 0;
}
static const char *classPathName = "com/github/shadowsocks/System";
static const char *classPathName = "com/github/shadowsocks/JniHelper";
static JNINativeMethod method_table[] = {
{ "jniclose", "(I)V",
(void*) Java_com_github_shadowsocks_system_jniclose },
{ "sendfd", "(ILjava/lang/String;)I",
(void*) Java_com_github_shadowsocks_system_sendfd },
{ "exec", "(Ljava/lang/String;)I",
(void*) Java_com_github_shadowsocks_system_exec },
{ "getABI", "()Ljava/lang/String;",
(void*) Java_com_github_shadowsocks_system_getabi }
{ "close", "(I)V",
(void*) Java_com_github_shadowsocks_jnihelper_close },
{ "sendFd", "(ILjava/lang/String;)I",
(void*) Java_com_github_shadowsocks_jnihelper_sendfd },
{ "sigterm", "(Ljava/lang/Process;)I",
(void*) Java_com_github_shadowsocks_jnihelper_sigterm }
};
@@ -161,20 +140,30 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
jint result = -1;
JNIEnv* env = NULL;
LOGI("JNI_OnLoad");
if (vm->GetEnv(&uenv.venv, JNI_VERSION_1_4) != JNI_OK) {
LOGE("ERROR: GetEnv failed");
if (vm->GetEnv(&uenv.venv, JNI_VERSION_1_6) != JNI_OK) {
THROW(env, "java/lang/RuntimeException", "GetEnv failed");
goto bail;
}
env = uenv.env;
if (registerNatives(env) != JNI_TRUE) {
LOGE("ERROR: registerNatives failed");
THROW(env, "java/lang/RuntimeException", "registerNativeMethods failed");
goto bail;
}
result = JNI_VERSION_1_4;
if (sdk_version() < 24) {
if (!(ProcessImpl = env->FindClass("java/lang/ProcessManager$ProcessImpl"))) {
THROW(env, "java/lang/RuntimeException", "ProcessManager$ProcessImpl not found");
goto bail;
}
ProcessImpl = (jclass) env->NewGlobalRef((jobject) ProcessImpl);
if (!(ProcessImpl_pid = env->GetFieldID(ProcessImpl, "pid", "I"))) {
THROW(env, "java/lang/RuntimeException", "ProcessManager$ProcessImpl.pid not found");
goto bail;
}
}
result = JNI_VERSION_1_6;
bail:
return result;

Before

Width:  |  Height:  |  Size: 221 B

After

Width:  |  Height:  |  Size: 221 B

Before

Width:  |  Height:  |  Size: 806 B

After

Width:  |  Height:  |  Size: 806 B

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 175 B

Before

Width:  |  Height:  |  Size: 556 B

After

Width:  |  Height:  |  Size: 556 B

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight">
<item>
<selector android:enterFadeDuration="@android:integer/config_mediumAnimTime"
android:exitFadeDuration="@android:integer/config_mediumAnimTime">
<item android:state_selected="true">
<color android:color="@color/material_primary_100"/>
</item>
</selector>
</item>
</ripple>

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 257 B

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 347 B

After

Width:  |  Height:  |  Size: 347 B

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before

Width:  |  Height:  |  Size: 436 B

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/material_primary_300" />
<corners android:radius="4dp"/>
</shape>
</item>
<item>
<selector android:enterFadeDuration="@android:integer/config_mediumAnimTime"
android:exitFadeDuration="@android:integer/config_mediumAnimTime">
<item android:state_selected="true">
<shape android:shape="rectangle">
<solid android:color="@color/material_green_700" />
<corners android:radius="4dp"/>
</shape>
</item>
</selector>
</item>
<item android:left="8dp">
<shape android:shape="rectangle">
<solid android:color="@android:color/white" />
<corners android:bottomRightRadius="4dp" android:topRightRadius="4dp"/>
</shape>
</item>
</layer-list>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="@android:integer/config_mediumAnimTime"
android:exitFadeDuration="@android:integer/config_mediumAnimTime">
<item android:state_selected="true">
<color android:color="@color/material_primary_100"/>
</item>
</selector>
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M19,3h-4.18C14.4,1.84 13.3,1 12,1c-1.3,0 -2.4,0.84 -2.82,2L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM12,3c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM14,17L7,17v-2h7v2zM17,13L7,13v-2h10v2zM17,9L7,9L7,7h10v2z"/>
</vector>
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M10.08,10.86c0.05,-0.33 0.16,-0.62 0.3,-0.87s0.34,-0.46 0.59,-0.62c0.24,-0.15 0.54,-0.22 0.91,-0.23 0.23,0.01 0.44,0.05 0.63,0.13 0.2,0.09 0.38,0.21 0.52,0.36s0.25,0.33 0.34,0.53 0.13,0.42 0.14,0.64h1.79c-0.02,-0.47 -0.11,-0.9 -0.28,-1.29s-0.4,-0.73 -0.7,-1.01 -0.66,-0.5 -1.08,-0.66 -0.88,-0.23 -1.39,-0.23c-0.65,0 -1.22,0.11 -1.7,0.34s-0.88,0.53 -1.2,0.92 -0.56,0.84 -0.71,1.36S8,11.29 8,11.87v0.27c0,0.58 0.08,1.12 0.23,1.64s0.39,0.97 0.71,1.35 0.72,0.69 1.2,0.91 1.05,0.34 1.7,0.34c0.47,0 0.91,-0.08 1.32,-0.23s0.77,-0.36 1.08,-0.63 0.56,-0.58 0.74,-0.94 0.29,-0.74 0.3,-1.15h-1.79c-0.01,0.21 -0.06,0.4 -0.15,0.58s-0.21,0.33 -0.36,0.46 -0.32,0.23 -0.52,0.3c-0.19,0.07 -0.39,0.09 -0.6,0.1 -0.36,-0.01 -0.66,-0.08 -0.89,-0.23 -0.25,-0.16 -0.45,-0.37 -0.59,-0.62s-0.25,-0.55 -0.3,-0.88 -0.08,-0.67 -0.08,-1v-0.27c0,-0.35 0.03,-0.68 0.08,-1.01zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/>
</vector>
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
</vector>
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M14,2L6,2c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2L18,22c1.1,0 2,-0.9 2,-2L20,8l-6,-6zM16,18L8,18v-2h8v2zM16,14L8,14v-2h8v2zM13,9L13,3.5L18.5,9L13,9z"/>
</vector>
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M9,16.2L4.8,12l-1.4,1.4L9,19 21,7l-1.4,-1.4L9,16.2z"/>
</vector>
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M11,18h2v-2h-2v2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM12,6c-2.21,0 -4,1.79 -4,4h2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2c0,2 -3,1.75 -3,5h2c0,-2.25 3,-2.5 3,-5 0,-2.21 -1.79,-4 -4,-4z"/>
</vector>
@@ -1,4 +1,3 @@
<!--suppress NewApi -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
@@ -6,5 +5,5 @@
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M18,7l-1.41,-1.41 -6.34,6.34 1.41,1.41L18,7zM22.24,5.59L11.66,16.17 7.48,12l-1.41,1.41L11.66,19l12,-12 -1.42,-1.41zM0.41,13.41L6,19l1.41,-1.41L1.83,12 0.41,13.41z"/>
android:pathData="M14,2L6,2c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2L18,22c1.1,0 2,-0.9 2,-2L20,8l-6,-6zM16,16h-3v3h-2v-3L8,16v-2h3v-3h2v3h3v2zM13,9L13,3.5L18.5,9L13,9z"/>
</vector>
@@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:fillColor="#FF000000"
android:pathData="M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z"/>
</vector>
@@ -1,4 +1,3 @@
<!--suppress NewApi -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
@@ -6,5 +5,5 @@
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
android:pathData="M14,10L2,10v2h12v-2zM14,6L2,6v2h12L14,6zM18,14v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM2,16h8v-2L2,14v2z"/>
</vector>
@@ -1,4 +1,3 @@
<!--suppress NewApi -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
@@ -1,4 +1,3 @@
<!--suppress NewApi -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
@@ -1,10 +1,9 @@
<!--suppress NewApi -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:fillColor="#FF000000"
android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
</vector>
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M17.65,6.35C16.2,4.9 14.21,4 12,4c-4.42,0 -7.99,3.58 -7.99,8s3.57,8 7.99,8c3.73,0 6.84,-2.55 7.73,-6h-2.08c-0.82,2.33 -3.04,4 -5.65,4 -3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6c1.66,0 3.14,0.69 4.22,1.78L13,11h7V4l-2.35,2.35z"/>
</vector>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="48"
android:viewportHeight="48">
<path
android:fillColor="#f5f5f5"
android:pathData="M24,24m-22,0a22,22 0,1 1,44 0a22,22 0,1 1,-44 0Z" />
<path
android:fillColor="#546e7a"
android:pathData="M34,14.72 L30.52,30.04 L22.72,27.53 L29.61,19.31 L20.43,27.04 L14,24.62
L34,14.72 Z" />
<path
android:fillColor="#546e7a"
android:pathData="M22.89,29.1 L25.38,29.9 L22.9,33.28 L22.89,29.1 Z" />
</vector>
@@ -1,4 +1,3 @@
<!--suppress NewApi -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--suppress NewApi -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--suppress NewApi -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--suppress NewApi -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Spinner android:id="@+id/template_selector"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:entries="@array/acl_rule_templates"/>
<EditText android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textNoSuggestions|textMultiLine"/>
</LinearLayout>
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:paddingStart="12dp"
android:paddingEnd="12dp">
<ImageView android:id="@android:id/icon"
android:layout_width="52dp"
android:layout_height="52dp"/>
<Space android:layout_width="4dp"
android:layout_height="wrap_content"/>
<LinearLayout android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical">
<TextView android:id="@android:id/text1"
android:textAppearance="?android:attr/textAppearance"
android:textColor="@android:color/primary_text_light"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="2"
android:ellipsize="end"/>
<TextView android:id="@android:id/text2"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="2"
android:ellipsize="end"/>
</LinearLayout>
</LinearLayout>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/toolbar_light_dark"/>
<WebView android:id="@+id/web_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
</LinearLayout>
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
@@ -19,24 +20,22 @@
android:textSize="18sp"
android:textColor="?android:attr/textColorSecondary"
android:paddingStart="60dp"
android:paddingEnd="8dp"
android:paddingEnd="16dp"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="RtlHardcoded"/>
android:layout_height="wrap_content"/>
<Switch android:checked="true"
android:id="@+id/bypassSwitch"
android:text="@string/bypass_apps"
android:textSize="18sp"
android:textColor="?android:attr/textColorSecondary"
android:paddingStart="60dp"
android:paddingEnd="8dp"
android:paddingEnd="16dp"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="RtlHardcoded"/>
android:layout_height="wrap_content"/>
</LinearLayout>
<FrameLayout android:layout_width="fill_parent"
android:layout_height="0dp"
@@ -48,7 +47,19 @@
<android.support.v7.widget.RecyclerView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/applistview"
android:id="@+id/list"
android:visibility="gone"/>
<com.futuremind.recyclerviewfastscroll.FastScroller
android:id="@+id/fastscroller"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:visibility="gone"
app:fastscroll__handleColor="@color/material_primary_500"
app:fastscroll__bubbleColor="@color/material_primary_500"
app:fastscroll__bubbleTextAppearance="@style/StyledScrollerTextAppearance"/>
</FrameLayout>
</LinearLayout>
@@ -28,6 +28,6 @@
android:focusable="false"
android:focusableInTouchMode="false"
android:clickable="false"
android:layout_marginEnd="8dp"/>
android:layout_marginEnd="16dp"/>
</LinearLayout>
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar_light_dark"/>
<FrameLayout android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<android.support.v7.widget.RecyclerView android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="32dp"
android:clipToPadding="false"/>
<com.futuremind.recyclerviewfastscroll.FastScroller
android:id="@+id/fastscroller"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:layout_marginTop="8dp"
android:layout_marginBottom="32dp"
app:fastscroll__handleColor="@color/material_primary_500"
app:fastscroll__bubbleColor="@color/material_primary_500"
app:fastscroll__bubbleTextAppearance="@style/StyledScrollerTextAppearance"/>
</FrameLayout>
</LinearLayout>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/toolbar_light_dark" />
<FrameLayout android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
</LinearLayout>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/background_header"/>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="shadowsocks"
android:gravity="center"
android:textSize="32sp"
android:textColor="@android:color/white"/>
</RelativeLayout>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar_light_dark"/>
<android.support.v7.widget.RecyclerView android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:paddingBottom="32dp"
android:scrollbars="vertical"
android:clipChildren="false"
android:clipToPadding="false"/>
</LinearLayout>
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent"
tools:ignore="UnknownIdInLayout" android:clipChildren="false">
<FrameLayout android:id="@+id/fragment_holder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/stat"/>
<LinearLayout android:id="@+id/stat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="4dp"
android:paddingStart="16dip"
android:paddingEnd="16dip"
android:paddingTop="16dip"
android:paddingBottom="16dip"
android:focusable="true"
android:background="@drawable/background_stat"
android:orientation="vertical"
android:nextFocusRight="@+id/fab"
android:layout_above="@+id/snackbar">
<TextView android:id="@+id/status"
android:textSize="16sp"
android:textColor="?android:attr/textColorPrimary"
android:ellipsize="marquee"
android:paddingEnd="72dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<com.github.shadowsocks.widget.BoundedGridLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
app:bounded_width="288dp"
app:columnCount="4">
<TextView app:layout_column="0" style="@style/TextAppearance.AppCompat.Body2"
android:ellipsize="marquee" android:text="@string/sent"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:gravity="end"/>
<TextView app:layout_column="1" android:id="@+id/tx" android:textSize="14sp"
android:textColor="?android:attr/textColorSecondary" android:ellipsize="marquee"
android:layout_width="0dp" android:layout_height="wrap_content"
app:layout_columnWeight="1" app:layout_gravity="fill_horizontal"/>
<TextView app:layout_column="2" android:textSize="14sp"
android:textColor="?android:attr/textColorSecondary"
android:ellipsize="marquee" android:text="▲"
android:layout_width="wrap_content" android:layout_height="wrap_content"/>
<TextView app:layout_column="3" android:id="@+id/txRate" android:textSize="14sp"
android:textColor="?android:attr/textColorSecondary" android:ellipsize="marquee"
android:layout_width="0dp" android:layout_height="wrap_content" app:layout_columnWeight="1"
app:layout_gravity="fill_horizontal" android:gravity="end"/>
<TextView app:layout_row="1" app:layout_column="0" style="@style/TextAppearance.AppCompat.Body2"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:gravity="end"
android:ellipsize="marquee" android:text="@string/received"/>
<TextView app:layout_row="1" app:layout_column="1" android:id="@+id/rx" android:textSize="14sp"
android:textColor="?android:attr/textColorSecondary" android:ellipsize="marquee"
android:layout_width="0dp" android:layout_height="wrap_content" app:layout_columnWeight="1"
app:layout_gravity="fill_horizontal" />
<TextView app:layout_row="1" app:layout_column="2" android:textSize="14sp"
android:textColor="?android:attr/textColorSecondary" android:ellipsize="marquee"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="▼"/>
<TextView app:layout_row="1" app:layout_column="3" android:id="@+id/rxRate" android:textSize="14sp"
android:textColor="?android:attr/textColorSecondary" android:ellipsize="marquee"
android:layout_width="0dp" android:layout_height="wrap_content" app:layout_columnWeight="1"
app:layout_gravity="fill_horizontal" android:gravity="end"/>
</com.github.shadowsocks.widget.BoundedGridLayout>
</LinearLayout>
<com.github.jorgecastilloprz.FABProgressCircle android:id="@+id/fabProgressCircle"
app:reusable="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="6dp"
android:layout_alignTop="@+id/stat"
android:layout_alignParentEnd="true"
android:layout_marginEnd="16dp"
android:layout_marginTop="@dimen/fab_margin_top">
<android.support.design.widget.FloatingActionButton android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:backgroundTint="@color/material_primary_500"
app:srcCompat="@drawable/ic_start_idle"
app:pressedTranslationZ="6dp"
app:borderWidth="0dp"/>
</com.github.jorgecastilloprz.FABProgressCircle>
<android.support.design.widget.CoordinatorLayout
android:id="@+id/snackbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
</RelativeLayout>
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Based on: https://github.com/android/platform_frameworks_base/blob/505e3ab/core/res/res/layout/simple_list_item_2.xml -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.github.shadowsocks.widget.BoundedCardView android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_gravity="center_horizontal"
app:bounded_width="@dimen/profile_item_max_width"
android:id="@+id/indicator">
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp"
android:focusable="true"
android:nextFocusRight="@+id/edit"
android:id="@+id/content"
android:background="?android:attr/selectableItemBackground">
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:id="@+id/container">
<TextView android:id="@android:id/text1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorPrimary"
android:gravity="center_vertical"
android:maxLines="2"
android:ellipsize="end"/>
<android.support.v7.widget.AppCompatImageView android:id="@+id/share"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="4dp"
android:layout_gravity="top"
app:srcCompat="@drawable/ic_social_share"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/share"
android:focusable="true"
android:nextFocusLeft="@+id/container"/>
<android.support.v7.widget.AppCompatImageView android:id="@+id/edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="4dp"
android:layout_gravity="top"
app:srcCompat="@drawable/ic_image_edit"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/edit"
android:focusable="true"/>
</LinearLayout>
<RelativeLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="4dp">
<TextView android:id="@android:id/text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_toStartOf="@+id/traffic"
android:layout_marginEnd="8dp"
android:maxLines="2"
android:ellipsize="end"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"/>
<TextView android:id="@+id/traffic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_alignParentEnd="true"
android:ellipsize="end"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"/>
</RelativeLayout>
</LinearLayout>
</com.github.shadowsocks.widget.BoundedCardView>
</FrameLayout>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/toolbar_light_dark" />
<fragment android:id="@+id/content"
class="com.github.shadowsocks.ProfileConfigFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
</LinearLayout>
@@ -15,7 +15,8 @@
android:textSize="18sp"
android:padding="16dp"/>
</FrameLayout>
<android.support.v7.widget.RecyclerView android:id="@+id/profilesList"
<android.support.v7.widget.RecyclerView android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:scrollbars="vertical"/>
</LinearLayout>
@@ -2,10 +2,9 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_apply_all"
android:title="@string/action_apply_all"
android:icon="@drawable/ic_done_all"
android:alphabeticShortcut="a"
android:numericShortcut="1"
app:showAsAction="always"/>
app:showAsAction="never"/>
<item android:id="@+id/action_export"
android:title="@string/action_export"
android:icon="@drawable/ic_content_copy"

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