aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tools: bump libwg-goJason A. Donenfeld2021-10-295-24/+20
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: bump copyright yearJason A. Donenfeld2021-10-2930-30/+30
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: remove kernel module downloaderJason A. Donenfeld2021-10-293-2723/+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>
* tunnel: make JSR305 annotations a compileOnly dependencyHarsh Shandilya2021-10-281-1/+1
| | | | | | These have no business being part of the runtime classpath of this library Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* tunnel: bump to work on x86_64 architectureJason A. Donenfeld2021-09-262-6/+6
| | | | | | | | | | | | | Bionic bans poll, so switch to ppoll. Folks were experiencing crashes on ChromeOS. We're waiting for https://go-review.googlesource.com/c/sys/+/352310 to be merged, but for now we rely on https://git.zx2c4.com/wireguard-go/commit/?id=fcc601dbf0f6b626ec1d47a880cbe64f9c8fe385 Reported-by: Rodrigo Alexandre <rdrslv00@gmail.com> Reported-by: Mace Moneta <moneta.mace@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui,tunnel: support DNS search domainsJason A. Donenfeld2021-09-253-2/+49
| | | | | | | | 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>
* tools: bump depsJason A. Donenfeld2021-09-244-16/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: bump depsJason A. Donenfeld2021-09-132-13/+14
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tools: bump for android 12Jason A. Donenfeld2021-09-091-0/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* gradle: update property set with AGP 7 experimental flagsHarsh Shandilya2021-07-291-3/+0
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* build: fix CMake warningHarsh Shandilya2021-07-291-0/+1
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* build: switch to modern plugin application layoutHarsh Shandilya2021-07-291-1/+3
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* 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: bump depsJason A. Donenfeld2021-05-072-12/+12
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: download hash list in chunks if necessaryJason A. Donenfeld2021-05-071-1/+5
| | | | 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>
* tools: bump depsJason A. Donenfeld2021-05-054-18/+20
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: update to go 1.16 and newer apiJason A. Donenfeld2021-02-225-31/+32
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: report git commit as wgVersionJason A. Donenfeld2021-02-124-5/+20
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: add developer information to pom xmlJason A. Donenfeld2021-02-111-0/+4
| | | | | | Otherwise sonatype gets upset. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: bump all toolsJason A. Donenfeld2021-02-114-5/+13
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: sign using gpg-agentJason A. Donenfeld2021-02-111-0/+1
| | | | | | This way we don't have to have a separate java universe. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: switch publishing to MavenCentralHarsh Shandilya2021-02-111-4/+9
| | | | | | | | | | | | | | | | | Since MavenCentral requires GPG signed artifacts, we'll need to configure some things on the machine running the deployment. Specifically, these three Gradle properties need to be set (preferably in ~/.gradle/gradle.properties) ``` signing.keyId= // Duh signing.password= // I have absolutely no idea how this will work with HSMs signing.secretKeyRingFile= // $HOME/.gnupg/... you know the deal ``` The BINTRAY_USER and BINTRAY_KEY variables are replaced by SONATYPE_USER and SONATYPE_PASSWORD to better reflect their new contents. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* tunnel: bump libwg-go and use newer logging functionJason A. Donenfeld2021-01-273-47/+45
| | | | | | | We also plug a memory leak. C.CString was calling malloc, and these were never freed. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* libwg-go: update to go 1.15.6L.W.Reek2021-01-231-3/+3
| | | | Signed-off-by: L.W.Reek <syphyr@gmail.com>
* tunnel: bump libwg-goJason A. Donenfeld2020-12-232-10/+10
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: bump libwg-goJason A. Donenfeld2020-12-162-18/+22
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: switch to Gradle's maven-publish pluginHarsh Shandilya2020-11-072-48/+45
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ToolsInstaller: unbreak cleanupJason A. Donenfeld2020-10-271-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: do not constantly raise toasts when process is opportunistically killedJason A. Donenfeld2020-10-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | Modern Android likes to kill processes to free ram and resources. When kernel-mode WireGuard is in use, this is quite alright with us, since the app doesn't actually need to consume any resources at all in order for the tunnel to run. So, we want to allow and encourage this resource frugality. However, when the quick settings tile is being used or when the app is referenced otherwise, the app will occasionally be restarted, to, for example, repaint the quick settings tile. This is also fine, as the process winds up being short-lived again. But, since process initialization means asking for a new root shell in order to check on kernel-mode WireGuard, this means that Magisk raises a systemwide toast. On some phones, this happens each and every time that the notification shade is pulled down. It's not only annoying but it sometimes obscures other notifications that users want to see, prompting their pulling down of the notification shade in the first place. In order to get rid of this nuisance, just disable these notifications and extraneous logs, so that we don't clutter the system every time that the process is opportunistically killed and restarted. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: clean up some docstring wordingJason A. Donenfeld2020-10-203-3/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: use more subtle roaming escape hatchJason A. Donenfeld2020-10-073-4/+4
| | | | 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>
* libwg-go: use PeekLookAtSocketFd6(), not PeekLookAtSocketFd4()Jonathan Davies2020-09-161-1/+1
| | | | | | | Signed-off-by: Jonathan Davies <jpds@protonmail.com> Fixes: 3d088411 ("libwg-go: use conn.Bind for socketfd peek") Cc: David Crawshaw <crawshaw@tailscale.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: document more public API from backend packageHarsh Shandilya2020-09-166-1/+174
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Ed25519: use implementation from TinkJason A. Donenfeld2020-09-164-23/+2513
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wireguard-tools: bump to fix invalid freeJason A. Donenfeld2020-09-151-0/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* libwg-go: update to go 1.15.2Jason A. Donenfeld2020-09-153-21/+21
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* gradle: desugar retrofuture and remove old depsJason A. Donenfeld2020-09-156-21/+11
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tools: bump for Android 11 ndc fixHarsh Shandilya2020-08-261-0/+0
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* build: target SDK 30Harsh Shandilya2020-08-251-2/+2
| | | | | | We're all set to support it from the application side of things. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* build: remove explicit buildToolsVersionHarsh Shandilya2020-08-231-1/+0
| | | | | | AGP sets it automatically, let's rely on that Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* libwg-go: use conn.Bind for socketfd peekDavid Crawshaw2020-06-223-9/+19
| | | | | Signed-off-by: David Crawshaw <crawshaw@tailscale.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tools: bump versionsJason A. Donenfeld2020-06-075-20/+21
| | | | 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>
* libwg-go: bump go versionHarsh Shandilya2020-04-261-3/+3
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ToolsInstaller: update Magisk directoryHarsh Shandilya2020-04-231-6/+6
| | | | | | | | | | /data/adb/modules has been the location for modules since v18.0 and nobody should reasonably be on any older version anymore. This has continued to work for this long because Magisk created symlinks for backwards compat. However, these symlinks are not created anymore on Android 11, which is where this problem first surfaced. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* tunnel: disable LongLogTag lintHarsh Shandilya2020-04-191-0/+3
| | | | | | | Should have been part of the patch that disabled this for ui/ Fixes: 8d128cf2e963 ("ui: disable LongLogTag lint") Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* tunnel: disable BuildConfig generationHarsh Shandilya2020-04-081-0/+3
| | | | | | | We don't (and shouldn't) use BuildConfig values, but the class was polluting our public API regardless which is undesirable. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>