aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel/src/main/java/com/wireguard/android/backend (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tunnel: uatch minSdk between tunnel and uiL.W.Reek2026-03-151-2/+1
| | | | | | Signed-off-by: L.W.Reek <syphyr@gmail.com> [Jason: remove else clause] Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: newIncompleteFuture requires API 31Jason A. Donenfeld2026-01-021-1/+4
| | | | | Fixes: 3b6ab660 ("ui: raise min SDK to 24") Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: raise min SDK to 24Harsh Shandilya2025-10-201-33/+2
| | | | | | | | The difference between the usage of 21 and 24 is not big enough to hold on to all the baggage from API 21 Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: add isAlwaysOn and isLockdownEnabledBrandon T2025-10-203-0/+50
| | | | | | | Signed-off-by: Brandon T <JustBrandonT@gmail.com> [Harsh: fix build and Javadoc errors] Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: update copyright noticesJason A. Donenfeld2025-05-196-6/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: use record class where possibleJason A. Donenfeld2023-07-051-26/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: export latest handshake statJason A. Donenfeld2023-04-243-42/+74
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: do not keep service running when bringing tunnel downJason A. Donenfeld2023-04-111-0/+3
| | | | | | | | Doing so causes the process to restart when the activity is cleared, even when no tunnel is running. I fear this might also lead to the current flurry of DeadSystemExceptions. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: bump copyright dateJason A. Donenfeld2023-03-216-6/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: bump copyright yearJason A. Donenfeld2021-10-296-6/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: remove kernel module downloaderJason A. Donenfeld2021-10-291-0/+4
| | | | | | | | Nathan Chance dropped the ball repeatedly and never maintained this in a consistent way that anybody could use. With Android 12 out now, just drop it all together. A bummer, but I don't see much of a choice. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui,tunnel: support DNS search domainsJason A. Donenfeld2021-09-251-0/+3
| | | | | | | | wg-quick has supported this for a while, but not the config layer, and not the Go backend, so wire this all up. Requested-by: Alexis Geoffrey <alexis.geoffrey97@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: retry DNS resolution for 10 secondsJason A. Donenfeld2021-05-262-1/+23
| | | | | | | | | | This has several problems: 1) it blocks the main thread; 2) it doesn't distinguish between a permanent error and a transient one; 3) the 10 seconds is hard coded; 4) there's no way for the user to cancel it. We'll have to improve this. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: avoid race between shutdown and statsJason A. Donenfeld2021-05-061-5/+6
| | | | | | | | | | | | | | wgTurnOff can block for a while, in which case, calling getStatistics will use a stale handle and stale tunnel. Not only that, but wgGetConfig might return null, in which case string.split throws. java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String[] java.lang.String.split(java.lang.String)' on a null at com.wireguard.android.backend.GoBackend.getStatistics Reported-by: tomt@adslweb.co.uk Link: https://lists.zx2c4.com/pipermail/wireguard/2021-May/006709.html Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: report git commit as wgVersionJason A. Donenfeld2021-02-121-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: clean up some docstring wordingJason A. Donenfeld2020-10-201-1/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Statistics: only do one hash lookupJason A. Donenfeld2020-09-211-4/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* TunnelManager: catch exception in intent receiverJason A. Donenfeld2020-09-211-7/+4
| | | | | | | | | | | | | | | | | | | java.lang.IllegalStateException: at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1720) at android.app.ContextImpl.startService (ContextImpl.java:1675) at android.content.ContextWrapper.startService (ContextWrapper.java:669) at com.wireguard.android.backend.GoBackend.startVpnService (GoBackend.java:4) at com.wireguard.android.backend.GoBackend.setStateInternal (GoBackend.java:4) at com.wireguard.android.backend.GoBackend.setState (GoBackend.java:2) at com.wireguard.android.model.TunnelManager$setTunnelState$2$1.invokeSuspend (TunnelManager.java:6) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (BaseContinuationImpl.java:2) at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.java:2) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.java) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.java:7) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.java:7) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.java:7) Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: document more public API from backend packageHarsh Shandilya2020-09-165-1/+137
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* gradle: desugar retrofuture and remove old depsJason A. Donenfeld2020-09-151-3/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: add windows-style killswitch semantics for GoBackendJason A. Donenfeld2020-05-041-1/+12
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: support IncludedApplications as whitelistJason A. Donenfeld2020-04-051-0/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: cleanup code styleJason A. Donenfeld2020-03-302-0/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: hardcode tags so that minification doesn't ruin the logJason A. Donenfeld2020-03-282-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: replace CompletableFuture with GhettoCompletableFutureJason A. Donenfeld2020-03-121-2/+33
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: add javadoc supportJason A. Donenfeld2020-03-111-1/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: Codestyle cleanupsHarsh Shandilya2020-03-102-5/+6
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* global: format codeJason A. Donenfeld2020-03-095-53/+58
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: optimize importsJason A. Donenfeld2020-03-094-14/+8
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: get rid of nonnull gradle hackJason A. Donenfeld2020-03-096-0/+18
| | | | | | | | | | Hacking things up via gradle is not right, and package-info.java poses problems with two modules, so instead we just apply it manually to every class. Remember to add this to new classes! Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* WgQuickBackend: by default use single-tunnel mode like GoBackend, but add optionJason A. Donenfeld2020-03-091-3/+35
| | | | | | | | | Note that this currently doesn't play well with people activating wg-quick tunnels from outside the app. Those tunnels won't be deactivated. But presumably that's desired behavior anyway, considering people are mucking around at the command line. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Migrate tunnel related classes to tunnel/ Gradle moduleHarsh Shandilya2020-03-096-0/+651
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>