Commit Graph
668 Commits
Author SHA1 Message Date
Mygod 6c047eca8e Add error message if failed 2016-08-22 21:10:33 +08:00
Mygod 41417a7546 Refine regex in KcpCliPreference 2016-08-19 19:52:34 +08:00
Mygod 25cfb1623a Remove all the extravagant styles
These styles are either introduced by @AnyOfYou, or exist because of a bug in Android support library. Anyway they can be removed now.
2016-08-19 19:49:43 +08:00
Mygod 25bd5347eb Refine #816 and error handling in startRunner 2016-08-19 15:23:43 +08:00
Max Lv d2a527ed0e Fix #816 2016-08-18 17:49:48 +08:00
Mygod 07ab938719 Prevent createProfile returns null 2016-08-17 12:52:21 +08:00
Mygod b6bfd5bfa0 Fix navigations in ProfileManagerActivity 2016-08-17 12:37:32 +08:00
Mygod 958d387b8c Fix su detection 2016-08-17 12:29:17 +08:00
Mygod eee89774df Refine kcpcli help again 2016-08-17 11:50:40 +08:00
Mygod 8454975a13 Fix NAT notifications on Android 4.4 2016-08-17 11:44:22 +08:00
Max Lv 69cb86a7c5 Format the help output of kcptun 2016-08-17 09:09:30 +08:00
Max Lv 45ea903323 Enable fast-open only with ss-local 2016-08-17 08:30:22 +08:00
Mygod f7303e1564 Revert "Promote default settings to kcptun"
This reverts commit 99ff47bd5f.

See discussion at: https://github.com/shadowsocks/kcptun/pull/1
2016-08-16 22:36:18 +08:00
Mygod 99ff47bd5f Promote default settings to kcptun 2016-08-16 22:16:25 +08:00
Mygod 820d71fb07 Add help for kcpcli (#811)
* Add help for kcpcli

* Filter useless parameters
2016-08-16 22:07:01 +08:00
Mygod a9a6e1c1a6 Track caught exceptions (#810) 2016-08-16 21:26:10 +08:00
Mygod 364d873eba Update to AutoCloseable in Java 1.7 2016-08-16 20:51:47 +08:00
Mygod a722257aba Set tcp_fastopen with echo instead of sysctl 2016-08-16 14:48:30 +08:00
Mygod 80d93a84bd Add support for TCP Fast Open (#809)
* Add support for TCP Fast Open

* Remove useless echo done line

* Check return values before proceeding in TcpFastOpen.enabled
2016-08-16 14:37:21 +08:00
Mygod 9b07239ced Refine default kcpcli 2016-08-16 14:02:16 +08:00
Mygod 5c7174fc5e Add default kcpcli 2016-08-16 11:49:14 +08:00
Mygod 536fe92c83 Refine #806 2016-08-16 11:23:21 +08:00
Mygod c7fc4095ff Remove compatibility code for Jelly Bean 2016-08-16 10:26:52 +08:00
Max Lv 63713b1eea Revert toolchain to GCC 4.9 2016-08-14 10:35:04 +08:00
Max Lv dd6cd3977d Fix #806 #804 2016-08-13 17:33:10 +08:00
Max Lv 0a400ef5f9 Trim the KCP parameters 2016-08-09 12:27:32 +08:00
Mygod 10725c39cb Check QsTile is null 2016-08-09 10:33:03 +08:00
Mygod 984e75ae99 Fix incorrect handling of default values on database upgrade 2016-08-09 04:34:51 +08:00
Mygod 72305c5f60 Fix a bug in SummaryEditTextPreference 2016-08-08 18:47:26 +08:00
Max Lv 4817539ca2 Fix UDP forward 2016-08-07 10:43:25 +08:00
Max Lv 70a7317a1e Update kcptun 2016-08-06 18:41:56 +08:00
Max Lv 586c5e2ae4 Bump version 2016-08-06 17:25:10 +08:00
Max Lv 66ceed8607 Restart kcptun when switching network 2016-08-06 10:55:33 +08:00
Max Lv b9a33cf1db Add KCP support (#788)
Add KCP support for shadowsocks.

KCPTUN should be setup on a different port to avoid conflicts with Shadowsocks' UDP support.
2016-08-04 23:43:18 -05:00
Mygod bae5e9d06b Check bgService in ShadowsocksTileService 2016-07-22 15:44:11 +08:00
Mygod b5ce788353 Bugfix for previous commit 2016-07-18 15:27:55 +08:00
Mygod 360b425d47 Fix #767 2016-07-18 14:37:18 +08:00
Mygod cf9cb3127b Merge branch 'master' of github.com:shadowsocks/shadowsocks-android 2016-07-16 13:12:29 +08:00
Mygod 427ca9b181 Remove useless TargetApi 2016-07-16 13:11:24 +08:00
Max Lv d0117daf6f Fix #759 #760 2016-07-14 08:58:36 +08:00
Mygod b14ff7082d Remove camera requirement 2016-07-13 11:38:23 +08:00
Mygod 76f7306a93 Use Shell.Interactive interactively and removes iptables submodule
The following action will take only one SU request with this commit:

* Start service in NAT mode;
* Reset in NAT mode;
* Flush DNS.

And stopping service in NAT mode doesn't need SU request any more.
2016-07-13 09:42:18 +08:00
Mygod 09220ee335 Reduce notification priority 2016-07-13 00:45:19 +08:00
Mygod 6c992c5937 Refine proguard rules and flushing DNS on Android 4.x
This reverts commit 7a87eab47c.
2016-07-12 18:46:31 +08:00
Mygod c92d66d9f3 Revert "Refine #530 again and again" and probably fix #530
This reverts commit b833cb6267.
2016-07-12 15:56:32 +08:00
Max Lv b833cb6267 Refine #530 again and again
Put ShadowsocksRunnerService into :bg process. It helped to solve #530, but
still I'm not sure why it works.

One assumption is that the startService() in BootReceiver helps to ensure :bg
process in a valid state.
2016-07-12 13:36:23 +08:00
Mygod 44625ae5b0 Bugfix for DropDownPreference 2016-07-11 20:43:53 +08:00
Mygod 159e1dff78 Bugfix for NAT mode 2016-07-11 19:51:47 +08:00
Mygod 84ac2b06fa Refine #530 again
Have. To. Do. More. Refinements.

Here's what happened in the buggy versions: (I think)

* `BootReceiver` starts which invokes `Utils.startSsService` which starts `ShadowsocksRunnerService`;
* `ShadowsocksRunnerService` binds to `BaseService`;
* 1s after it's connected, it invokes `bgService.use` which returns immediately after pushing `use` in the queue since it's an oneway method;
* Then `stopSelf` => `detachService`, `BaseService` now have nothing bound to it and not started either (neither foreground nor background), so the system can destroy it any time; (at this point, `BaseService.use` isn't invoked yet)
* `com.github.shadowsocks` process then probably exits since booting is a resource-heavy task, anyway it doesn't matter;
* Some time later `com.github.shadowsocks:bg` resumes running, and `BaseService` is stopped and destroyed. Now the system is no longer aware of this `BaseService` instance but it isn't garbage collected yet;
* `use` is finally invoked;
* `startService` is invoked in `startRunner` and the destroyed background service starts running; (bug of Android?)
* `startForeground` is invoked in `ShadowsocksNotification` but the system probably refused it since the service itself is already destroyed;
* When the main activity UI is brought up and requests binding, `com.github.shadowsocks:bg` which is unaware of the existing instance of `BaseService` creates another `BaseService` and thus everything gets messed up.

This commit fixes this by invoking `getState` (which isn't an oneway method) immediately after `use` so that `ShadowsocksRunnerService` will wait for `BaseService` to start itself before destroying itself and its connection to `BaseService`. And thus its return value is not used.
2016-07-11 19:22:54 +08:00
Mygod dcf190c1f5 Bugfix for NumberPickerPreference 2016-07-11 17:51:24 +08:00