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>
Unfortunately, we need to fix this up in both the Makefile and in CMake,
because add_link_options doesn't immediately reflect on the CMake
variables in scope.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
NDK 25.x removed the bundled ld.gold/ld.bfd linkers, replacing
them with the ld.ldd linker from LLVM. This causes the toolchains
to pick up the host OS' `ld.gold` instead, which does not
know how to link ARM(64) code and fails the build.
Fixes: f269fb175d ("gradle: update AndroidX and Kotlin")
Signed-off-by: SlipkHunter <abrito025@gmail.com>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Fix the test by changing the DNS to a string with an invalid char in the
`invalid-value.conf` test configuration file.
Signed-off-by: Michal Murin <michal.murin@jamf.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
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>
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>
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>
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>
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>