summaryrefslogtreecommitdiffhomepage
path: root/tunnel
AgeCommit message (Collapse)Author
2021-05-06tunnel: avoid race between shutdown and statsJason A. Donenfeld
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>
2021-05-05tools: bump depsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-02-22tunnel: update to go 1.16 and newer apiJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-02-12tunnel: report git commit as wgVersionJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-02-11tunnel: add developer information to pom xmlJason A. Donenfeld
Otherwise sonatype gets upset. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-02-11tunnel: bump all toolsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-02-11tunnel: sign using gpg-agentJason A. Donenfeld
This way we don't have to have a separate java universe. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-02-11tunnel: switch publishing to MavenCentralHarsh Shandilya
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>
2021-01-27tunnel: bump libwg-go and use newer logging functionJason A. Donenfeld
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>
2021-01-23libwg-go: update to go 1.15.6L.W.Reek
Signed-off-by: L.W.Reek <syphyr@gmail.com>
2020-12-23tunnel: bump libwg-goJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-12-16tunnel: bump libwg-goJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-11-07build: switch to Gradle's maven-publish pluginHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-27ToolsInstaller: unbreak cleanupJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-10-26tunnel: do not constantly raise toasts when process is opportunistically killedJason A. Donenfeld
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>
2020-10-20tunnel: clean up some docstring wordingJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-10-07tunnel: use more subtle roaming escape hatchJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-21Statistics: only do one hash lookupJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-21TunnelManager: catch exception in intent receiverJason A. Donenfeld
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>
2020-09-16libwg-go: use PeekLookAtSocketFd6(), not PeekLookAtSocketFd4()Jonathan Davies
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>
2020-09-16tunnel: document more public API from backend packageHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-16Ed25519: use implementation from TinkJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-15wireguard-tools: bump to fix invalid freeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-15libwg-go: update to go 1.15.2Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-15gradle: desugar retrofuture and remove old depsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-08-26tools: bump for Android 11 ndc fixHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-25build: target SDK 30Harsh Shandilya
We're all set to support it from the application side of things. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-08-23build: remove explicit buildToolsVersionHarsh Shandilya
AGP sets it automatically, let's rely on that Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-06-22libwg-go: use conn.Bind for socketfd peekDavid Crawshaw
Signed-off-by: David Crawshaw <crawshaw@tailscale.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-06-07tools: bump versionsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-05-04tunnel: add windows-style killswitch semantics for GoBackendJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-04-26libwg-go: bump go versionHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-04-23ToolsInstaller: update Magisk directoryHarsh Shandilya
/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>
2020-04-19tunnel: disable LongLogTag lintHarsh Shandilya
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>
2020-04-08tunnel: disable BuildConfig generationHarsh Shandilya
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>
2020-04-05tunnel: support IncludedApplications as whitelistJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-04-06tunnel: hold peers in an ArrayListHarsh Shandilya
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>
2020-04-03version: bumpJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-04-03tunnel: libwg-go: use deterministic verdef nameJason A. Donenfeld
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>
2020-04-01tunnel: libwg-go: remove -x option from flockJason A. Donenfeld
It's already the default and the macOS port of flock doesn't support it. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-30global: cleanup code styleJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-29tunnel: libwg-go: check sha256 of downloaded tarballJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-29tunnel: libwg-go: stick go tarball in gradle cacheJason A. Donenfeld
This way we don't have to build over and over. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-29tunnel: libwg-go: prevent parallel downloadsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-29tunnel: fix package name being passed through to cmakeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-28global: hardcode tags so that minification doesn't ruin the logJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-22libwg-go: update go modulesJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-22libwg-go: bump go versionJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-19InetEndpoint: return proper parser exceptionJason A. Donenfeld
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>
2020-03-14publish.gradle: Use non-deprecated API to prevent eager configuration of tasksHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>