Jason A. Donenfeld
5658584803
global: update copyright headers
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-09-06 21:32:46 -06:00
Harsh Shandilya
c38f6c471d
Extract error messages to string resources
...
Useful for validation errors and localisation later on
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-08-26 11:04:01 -06:00
Eric Kuck
9652fe99df
TunnelDetailFragment now restores state correctly after process death
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-26 05:17:43 +02:00
Eric Kuck
67ea8b2936
global: Add nullity annotations
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-07-13 03:46:23 +02:00
Jason A. Donenfeld
7b28d51cdd
global: move to Apache 2.0
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-06 16:28:46 +02:00
Jason A. Donenfeld
124f186983
TunnelEditor: fix nits
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-06 16:28:46 +02:00
Eric Kuck
500a705531
AppListDialogFragment: add implementation for excluding applications
...
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
2018-07-06 04:14:19 +02:00
Harsh Shandilya
363d0b9126
android: model: Make some methods static
...
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-06-30 21:19:59 +02:00
Samuel Holland
4acee49d4b
util: Extract non-Android utility interfaces
...
As part of a refactoring that will likely introduce more custom
collection classes, move the non-Android-specific parts outside the
com.wireguard.android package.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-06-19 21:59:44 -05:00
Jason A. Donenfeld
e8891d775b
global: supply backend asynchronously
...
We can't block for IO, so move everything to async workers or to
callbacks.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-06-14 05:06:18 +02:00
Jason A. Donenfeld
24605c9c01
Give Samuel heart attack by removing Dagger
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-06-07 04:12:42 +02:00
Jason A. Donenfeld
c4e32328fc
TunnelManager: disable dangerous intents for now
...
We need to think about how to allow this securely. It's not okay for all
apps to be allowed to twiddle with VPN settings.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-06-04 07:06:28 +02:00
Jason A. Donenfeld
a2ccbf003c
TunnelManager: new intents
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-06-04 07:06:28 +02:00
Harsh Shandilya
4671f59c67
android: Cleanup classes
...
- Use final modifer wherever possible
- Use try-with-resources for input/output streams
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-06-02 19:14:56 +02:00
Jason A. Donenfeld
292df12175
Support always-on-vpn
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-05-27 18:57:52 +02:00
Jason A. Donenfeld
f77eac6796
global: fix up copyrights
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-05-03 19:15:09 -05:00
Samuel Holland
aa92c4a9d5
global: Add or update copyright headers in Java code
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-05-02 10:31:25 -05:00
Samuel Holland
7eedf08d4b
global: Automatic code formatting
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-04-30 11:39:12 -05:00
Harsh Shandilya
ba862b166b
Quick cleanup across the board
...
- Clean up imports
- Adjust method visibility
- Drop in NonNull annotations where needed
- Prevent potential NPEs from nulled getActivity calls
- Remove unused methods
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2018-04-28 06:07:48 +02:00
Jason A. Donenfeld
88cf839c90
Update application state based on wg-quick
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-23 17:04:17 +02:00
Samuel Holland
54f201174d
TunnelManager: Use constants directly where appropriate
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-17 14:35:39 -06:00
Samuel Holland
7b9c1a536c
model: Use ConfigStore.rename() to avoid recreating tunnels
...
Rename all of the functions to be in line with setConfig/setState
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-10 00:03:03 -06:00
Jason A. Donenfeld
df3062c7ad
Tunnel: ifname has max len 15
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-10 02:49:06 +01:00
Samuel Holland
933a685585
model: Chain completions to avoid race conditions
...
Otherwise getConfigAsync().thenCompose(x -> setState()) would be unsafe.
This reverts commit a6595a273afd50524cc66765c6bfbdcc34cb12e4.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-09 10:03:29 -06:00
Samuel Holland
4f02817ef0
global: Fix or suppress most lints/warnings
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08 23:39:26 -06:00
Jason A. Donenfeld
7645ea15c4
global: Prefix tags with WireGuard/
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-08 20:29:51 +01:00
Samuel Holland
b6ed17884f
ToggleSwitch: Improve reliability
...
It's not great, but it's better than it was.
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08 04:31:04 -06:00
Samuel Holland
ec81014c4e
Tunnel: Add a State factory method
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-08 04:25:15 -06:00
Samuel Holland
1f30e133d6
TunnelManager: Simplify save/resume methods
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 21:52:14 -06:00
Samuel Holland
1fd9547f6a
TunnelManager/QuickTileService: Remember last used tunnel
...
This is actually a bit simpler than having a manually-selected "primary"
tunnel, and is hopefully easier for the user.
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 21:50:43 -06:00
Samuel Holland
0ab3e29432
Tunnel: Remove UNKNOWN state
...
It's never used.
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 20:33:07 -06:00
Samuel Holland
11f851abf8
Move bundle keys where they are used
...
This both clarifies and simplifies the code.
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 20:32:01 -06:00
Samuel Holland
30396b8718
model: Allow renaming tunnels
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 01:22:31 -06:00
Samuel Holland
e70b242c01
model: Remove confusing uses of completion chaining
...
This looks like the builder pattern, but isn't.
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 00:41:47 -06:00
Samuel Holland
1862ff0bbe
Tunnel: The name passed to isNameValid is never null
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 00:25:49 -06:00
Samuel Holland
be8b6017d5
Make TunnelManager the point of asynchronicity
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-07 00:24:56 -06:00
Samuel Holland
5a2f692d73
TunnelManager: Sort tunnels case-insensitively
...
The second comparator is required to allow multiple tunnels that differ
only in case.
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 23:45:49 -06:00
Samuel Holland
4f2b6bef84
Keyed...: Rename all the things
...
Hooray for diamond interface inheritance.
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 23:07:17 -06:00
Samuel Holland
22bdffcecd
model: Proxy all async work through the TunnelManager
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 06:30:41 -06:00
Samuel Holland
2315a699fb
TunnelManager: Enumerate running tunnels only once
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 05:20:11 -06:00
Samuel Holland
df7d18fb5d
Tunnel: Require passing a state to the constructor
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 05:18:34 -06:00
Samuel Holland
193de10972
TunnelDetailFragment: Remove state text and last change
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 05:18:34 -06:00
Samuel Holland
ff0bb081a0
Convert the list of tunnels to a KeyedObservableList
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 04:09:30 -06:00
Samuel Holland
58eedfd6d9
TunnelManager: Clear primary tunnel when it's removed
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 04:09:30 -06:00
Samuel Holland
609194fae2
Serviceless rewrite, part 1
...
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-06 04:09:29 -06:00