Commit Graph
639 Commits
Author SHA1 Message Date
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
Mygod 74a0e397c1 Refine #752 and NumberPickerPreference 2016-07-11 17:49:17 +08:00
Max Lv f35a4b05b5 Fix #752 2016-07-10 19:22:51 +08:00
Max Lv 82e6266f09 Revert "Disable AutoFocus and Flash"
This reverts commit 9919ead15e.
2016-07-10 16:13:20 +08:00
Max Lv 9919ead15e Disable AutoFocus and Flash 2016-07-10 16:04:43 +08:00
Max Lv fce0ffe566 Refine #530 2016-07-09 09:00:00 +08:00
Max Lv 556d8d78bd Revert "Refine #530"
This reverts commit 56de231c4f.
2016-07-09 08:59:13 +08:00
Mygod 929b8c94ae Ignore exceptions while unbinding service 2016-07-08 12:58:11 +08:00
Max Lv a21d099a34 Fix #746 2016-07-08 11:42:10 +08:00
Mygod 07eb4d2a5c Refine utils.Key for readability 2016-07-05 19:31:58 +08:00
Mygod c480137dec Remove .aidl.Config and persisting SharedPreferences (#742)
Previously a profile can exist in the following forms:

* `.database.Profile` used for everything backend;
* `.ShadowsocksSettings` which uses Preferences to provide UI to tweak settings;
* `.aidl.Config` used for IPC;
* `<data dir>/shared_pref/com.github.shadowsocks_preferences.xml` which exists for no apparent reason.

Thus long code block can be seen whose purpose is simply converting the data from one form to another. This commit intends to remove the latter two by:

1. Using profile ID and take advantage of fs r/w lock SQLite uses for IPC and better extensibility;
2. Stop persisting redundant fields in the preferences file and update database directly.
2016-07-05 01:07:09 -05:00
Mygod 432ab6cc7a Fix the bug where UI is not updated after importing 2016-07-04 10:38:49 +08:00
Max Lv 6d78b496ec Fix a typo 2016-07-03 18:35:29 +08:00
Max Lv df09d39139 Add apply-all action 2016-07-03 17:27:50 +08:00
Mygod 0b3ee8b793 Refine #735
It's impolite to ask for permission over and over again.
2016-07-01 13:26:53 +08:00
Mygod 99fd8f1e69 Fix accessibility issue for title view 2016-07-01 12:56:42 +08:00
Mygod 333ff40621 Fix #737 by using support vector drawables 2016-07-01 12:42:26 +08:00
Max Lv bfd85ecb8e Refine black list 2016-06-30 11:01:41 +08:00
Max Lv e9c912b935 Fix #735 2016-06-29 09:53:21 +08:00
Max Lv 4f13acaffe Add missing files 2016-06-27 17:53:08 +08:00
Max Lv a537a7fc0a Integrate a Barcode Scanner 2016-06-27 15:54:22 +08:00
Mygod 27bf6a2237 Fix connection test not reset in background 2016-06-18 18:26:20 +08:00
Mygod 56de231c4f Refine #530 2016-06-17 17:59:12 +08:00
Max Lv 797b3fda12 Revert "Refine #530"
This reverts commit 292f22cc86.
2016-06-17 17:58:58 +08:00
Max Lv 292f22cc86 Refine #530 2016-06-17 17:37:52 +08:00
Mygod 89df2bc715 Hide stop action in notification if the quick settings tile is present 2016-06-17 14:40:33 +08:00
Mygod 18f03aeb1d Move tile service to a separate process to save memory 2016-06-17 14:24:59 +08:00
Mygod 8e3af71696 Change tile to a quick switch 2016-06-17 13:42:12 +08:00
Mygod 048219a788 Remove screen_name resource 2016-06-17 13:27:35 +08:00
Mygod b4d3103b8f Merge branch 'n' and update to API level 24
Fix #671.
2016-06-17 13:24:56 +08:00