aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* tunnel: support IncludedApplications as whitelistJason A. Donenfeld2020-04-054-0/+42
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: hold peers in an ArrayListHarsh Shandilya2020-04-061-3/+1
| | | | | | | A set will cause identical peers to be dropped during save Reported-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* version: bump1.0.20200401Jason A. Donenfeld2020-04-031-0/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: libwg-go: use deterministic verdef nameJason A. Donenfeld2020-04-031-1/+1
| | | | | | | | | | | | | | | | | From the ld.gold source: const char* name = parameters->options().soname(); if (name == NULL) name = parameters->options().output_file_name(); That means by default it uses `-o {output}` as the verdef aux name, which is random every time due to Go's build system. By passing in `--soname={somethingexplicit}` we can instead have a deterministic verdef. This commit makes wireguard-android reproducible. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: libwg-go: remove -x option from flockJason A. Donenfeld2020-04-011-2/+2
| | | | | | It's already the default and the macOS port of flock doesn't support it. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: cleanup code styleJason A. Donenfeld2020-03-306-18/+27
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: libwg-go: check sha256 of downloaded tarballJason A. Donenfeld2020-03-291-1/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: libwg-go: stick go tarball in gradle cacheJason A. Donenfeld2020-03-293-7/+18
| | | | | | This way we don't have to build over and over. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: libwg-go: prevent parallel downloadsJason A. Donenfeld2020-03-291-3/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: fix package name being passed through to cmakeJason A. Donenfeld2020-03-291-0/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: hardcode tags so that minification doesn't ruin the logJason A. Donenfeld2020-03-285-5/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* libwg-go: update go modulesJason A. Donenfeld2020-03-222-13/+13
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* libwg-go: bump go versionJason A. Donenfeld2020-03-221-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* InetEndpoint: return proper parser exceptionJason A. Donenfeld2020-03-191-1/+1
| | | | | | | Wrapping this in something foreign doesn't make sense. Reported-by: Luis Ressel <aranea@aixah.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* publish.gradle: Use non-deprecated API to prevent eager configuration of tasksHarsh Shandilya2020-03-141-2/+2
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>