aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/java/com/wireguard/android/model/TunnelManager.java (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rename app module to uiHarsh Shandilya2020-03-091-301/+0
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Tunnel: move state change into interfaceJason A. Donenfeld2020-03-091-14/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* backend: do not depend on anything except configJason A. Donenfeld2020-03-091-32/+46
| | | | | | | | | This is likely broken but should make for a good starting point. It also should hopefully handle stopping tunnels before starting new ones, in the case of the GoBackend. Again, untested. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Update copyrightJason A. Donenfeld2019-01-071-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Migrate to AndroidXHarsh Shandilya2018-12-181-3/+3
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Remodel the ModelSamuel Holland2018-12-081-1/+3
| | | | | | | | | | | | | | - The configuration and crypto model is now entirely independent of Android classes other than Nullable and TextUtils. - Model classes are immutable and use builders that enforce the appropriate optional/required attributes. - The Android config proxies (for Parcelable and databinding) are moved to the Android side of the codebase, and are designed to be safe for two-way databinding. This allows proper observability in TunnelDetailFragment. - Various robustness fixes and documentation updates to helper classes. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Auto-format the source directoriesSamuel Holland2018-11-111-14/+13
| | | | | | Blame Jason for writing Java in vim. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: update copyright headersJason A. Donenfeld2018-09-061-2/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Extract error messages to string resourcesHarsh Shandilya2018-08-261-4/+6
| | | | | | Useful for validation errors and localisation later on Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* TunnelDetailFragment now restores state correctly after process deathEric Kuck2018-07-261-7/+11
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: Add nullity annotationsEric Kuck2018-07-131-9/+8
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* global: move to Apache 2.0Jason A. Donenfeld2018-07-061-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* android: model: Make some methods staticHarsh Shandilya2018-06-301-2/+2
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* global: supply backend asynchronouslyJason A. Donenfeld2018-06-141-14/+11
| | | | | | | We can't block for IO, so move everything to async workers or to callbacks. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Give Samuel heart attack by removing DaggerJason A. Donenfeld2018-06-071-31/+19
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* TunnelManager: disable dangerous intents for nowJason A. Donenfeld2018-06-041-0/+6
| | | | | | | 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>
* TunnelManager: new intentsJason A. Donenfeld2018-06-041-0/+37
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* android: Cleanup classesHarsh Shandilya2018-06-021-4/+4
| | | | | | | - Use final modifer wherever possible - Use try-with-resources for input/output streams Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Support always-on-vpnJason A. Donenfeld2018-05-271-2/+28
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: fix up copyrightsJason A. Donenfeld2018-05-031-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: Add or update copyright headers in Java codeSamuel Holland2018-05-021-0/+5
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* global: Automatic code formattingSamuel Holland2018-04-301-9/+9
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* Quick cleanup across the boardHarsh Shandilya2018-04-281-2/+2
| | | | | | | | | | - 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>
* Update application state based on wg-quickJason A. Donenfeld2018-04-231-0/+9
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* TunnelManager: Use constants directly where appropriateSamuel Holland2018-01-171-2/+2
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* model: Use ConfigStore.rename() to avoid recreating tunnelsSamuel Holland2018-01-101-47/+32
| | | | | | Rename all of the functions to be in line with setConfig/setState Signed-off-by: Samuel Holland <samuel@sholland.org>
* model: Chain completions to avoid race conditionsSamuel Holland2018-01-091-20/+12
| | | | | | | | Otherwise getConfigAsync().thenCompose(x -> setState()) would be unsafe. This reverts commit a6595a273afd50524cc66765c6bfbdcc34cb12e4. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: Fix or suppress most lints/warningsSamuel Holland2018-01-081-3/+4
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* global: Prefix tags with WireGuard/Jason A. Donenfeld2018-01-081-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ToggleSwitch: Improve reliabilitySamuel Holland2018-01-081-3/+4
| | | | | | It's not great, but it's better than it was. Signed-off-by: Samuel Holland <samuel@sholland.org>
* TunnelManager: Simplify save/resume methodsSamuel Holland2018-01-071-9/+8
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* TunnelManager/QuickTileService: Remember last used tunnelSamuel Holland2018-01-071-18/+82
| | | | | | | 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>
* Move bundle keys where they are usedSamuel Holland2018-01-071-1/+0
| | | | | | This both clarifies and simplifies the code. Signed-off-by: Samuel Holland <samuel@sholland.org>
* model: Allow renaming tunnelsSamuel Holland2018-01-071-0/+26
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* model: Remove confusing uses of completion chainingSamuel Holland2018-01-071-10/+20
| | | | | | This looks like the builder pattern, but isn't. Signed-off-by: Samuel Holland <samuel@sholland.org>
* Make TunnelManager the point of asynchronicitySamuel Holland2018-01-071-23/+35
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* TunnelManager: Sort tunnels case-insensitivelySamuel Holland2018-01-061-1/+5
| | | | | | | The second comparator is required to allow multiple tunnels that differ only in case. Signed-off-by: Samuel Holland <samuel@sholland.org>
* Keyed...: Rename all the thingsSamuel Holland2018-01-061-5/+5
| | | | | | Hooray for diamond interface inheritance. Signed-off-by: Samuel Holland <samuel@sholland.org>
* model: Proxy all async work through the TunnelManagerSamuel Holland2018-01-061-21/+37
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* TunnelManager: Enumerate running tunnels only onceSamuel Holland2018-01-061-7/+5
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* Tunnel: Require passing a state to the constructorSamuel Holland2018-01-061-4/+5
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* Convert the list of tunnels to a KeyedObservableListSamuel Holland2018-01-061-5/+8
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* TunnelManager: Clear primary tunnel when it's removedSamuel Holland2018-01-061-1/+5
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* Serviceless rewrite, part 1Samuel Holland2018-01-061-0/+111
Signed-off-by: Samuel Holland <samuel@sholland.org>