Commit Graph

135 Commits

Author SHA1 Message Date
de87ffa73e go.mod: change module to point to personal fork
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-01-07 20:08:15 +03:00
Jason A. Donenfeld
4ba87947ae tools: bump wg-go
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-10-22 02:35:16 +02:00
Jason A. Donenfeld
83c382b6cc tools: bump go
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-10-18 14:26:41 +02:00
Jason A. Donenfeld
353679801e tunnel: use record class where possible
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-07-05 18:16:53 +02:00
Jason A. Donenfeld
a7ce5ad42a gradle: bump to api 34
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-07-05 16:13:19 +02:00
Jason A. Donenfeld
a5b4b9c428 tunnel: add quotes around calling package
Judging by the previous check, this was clearly intended.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-06-08 15:04:39 +02:00
Jason A. Donenfeld
adfd8e247b tunnel: account for recent magisk using UID in sql
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-06-06 03:08:59 +02:00
Jason A. Donenfeld
40eaa54cf0 ui: reformat all code
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-05-05 13:18:30 +02:00
Jason A. Donenfeld
7778ff63b5 gradle: use matching fallback instead of build type
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-05-05 02:43:36 +02:00
Jason A. Donenfeld
d80129ba46 gradle: use += when possible
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-05-03 15:37:06 +02:00
Jason A. Donenfeld
6907663f07 gradle: don't encourage sticking credentials in files
We've only ever used this via environment variables, so keep it that
way.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-05-03 14:19:19 +02:00
Jason A. Donenfeld
dca96a52b4 gradle: reabstract package name
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-05-03 14:09:11 +02:00
Jason A. Donenfeld
cf4fca8086 gradle: remove runtime detection of play store
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-05-04 16:45:01 +02:00
Jason A. Donenfeld
4e28d57aee gradle: use Java 17
It appears to work, even on API 21.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-05-03 14:01:05 +02:00
Harsh Shandilya
1b5f4d6dfd gradle: move JVM target up to 11
1.8 is being deprecated across the board

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-05-03 00:49:47 +05:30
Harsh Shandilya
bed2f2e5d6 gradle: convert build files to Kotlin
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-05-03 00:43:18 +05:30
Jason A. Donenfeld
20480992c4 tunnel: export latest handshake stat
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-24 18:06:57 +02:00
Jason A. Donenfeld
b94a412c09 tools: build elf-cleaner using system compiler
Rather than using the NDK compiler for the host arch and hoping it picks
up on system library locations, just use `cc` and rely on the
traditional symlink to resolve that to the default host compiler.

This should address build errors seen on macOS.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-21 15:43:25 +02:00
Jason A. Donenfeld
6d4d2f4ebf tools: ndk-compat: NDK now is minimum API 19
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-13 19:24:50 +02:00
Jason A. Donenfeld
6ba3e4f001 tools: do not put vcs info into go binary
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-12 15:48:01 +02:00
Jason A. Donenfeld
8c6c909e98 tools: bump go
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-11 19:52:30 +02:00
Jason A. Donenfeld
3907f6a4c1 tunnel: do not keep service running when bringing tunnel down
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>
2023-04-11 19:17:55 +02:00
Jason A. Donenfeld
652971d746 tools: clean compile options a bit
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-11 16:23:37 +02:00
Jason A. Donenfeld
6209d3ee3d tools: clean unwanted ELF flags from binaries
Fixes warnings on old Android, such as:

linker  : /data/data/com.wireguard.android/code_cache/bin/wg-quick: unsupported flags DT_FLAGS_1=0x8000001
linker  : /data/data/com.wireguard.android/code_cache/bin/wg: unsupported flags DT_FLAGS_1=0x8000001

Reported-by: L.W.Reek <syphyr@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-05 13:50:57 +02:00
Jason A. Donenfeld
33aded09c6 tools: deduplicate cmake arguments
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-05 13:50:57 +02:00
Jason A. Donenfeld
f360034f29 tools: remove cmake dependency hack
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-05 12:23:41 +02:00
L.W.Reek
01e72064d4 tools: add missing CLOCK_BOOTTIME case to mips64x
Signed-off-by: L.W.Reek <syphyr@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-05 02:49:26 +02:00
Jason A. Donenfeld
9fae327315 tools: pass -Wl,--build-id=none and -buildid= to toolchain
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>
2023-04-04 15:14:28 +02:00
Jason A. Donenfeld
900654e6b1 tools: use NDK's make binary rather than system's
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-28 18:31:38 +02:00
Harsh Shandilya
fcb7caed23
gradle: opt into new publishing APIs
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-03-28 17:42:07 +05:30
Harsh Shandilya
b7295cd56f build: raise target SDK to 33
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-03-24 14:12:21 +01:00
Jason A. Donenfeld
3ab1f94514 tools: compile with latest NDK
The -mthumb -> -marm hack is unfortunate.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-22 15:02:54 +01:00
Jason A. Donenfeld
4aa4843b74 tools: use __ANDROID_MIN_SDK_VERSION__ instead of __ANDROID_API__
The latter is deprecated.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-22 15:02:54 +01:00
Jason A. Donenfeld
853e86e6d0 global: bump copyright date
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-21 15:41:11 +01:00
Jason A. Donenfeld
a386e3a3d2 build: update to gradle 7.4.2 and restructure lint block
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-21 15:35:00 +01:00
Jason A. Donenfeld
560d9cf967 tools: bump deps
Notably, this isn't bumping to the latest wireguard-go master, which is
still in flux.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-21 15:35:00 +01:00
SlipkHunter
713947e432
gradle: adjust for and raise compileSdk to 33
Signed-off-by: SlipkHunter <abrito025@gmail.com>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-01-20 19:54:23 +05:30
Harsh Shandilya
f8690ca215
gradle: migrate to namespace attribute
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-01-20 19:37:41 +05:30
SlipkHunter
4f26156030
gradle: force the use of an older NDK version
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>
2023-01-20 19:37:41 +05:30
Hwanseung Lee
0459d6d9f4
ui: un-export VpnService
There is no reason to expose this service to external apps.[1]

[1] https://developer.android.com/guide/topics/manifest/activity-element#exported

Signed-off-by: Hwanseung Lee <hwanseung@chromium.org>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2022-12-01 00:15:39 +05:30
Jason A. Donenfeld
aeb8903ba2 tools: bump deps
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-05-16 19:15:07 +02:00
Shahzain Ali
2f244771a2
ui: move target SDK to 31
Signed-off-by: Shahzain Ali <shahzainali93@gmail.com>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2022-04-26 01:27:41 +05:30
Jason A. Donenfeld
62910caae1 tools: bump wireguard-go and go 1.18
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-03-20 22:31:57 -06:00
Michal Murin
72dc677819 tunnel: fix BadConfigExceptionTest
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>
2022-02-09 12:01:56 +01:00
Jason A. Donenfeld
5339e48251 ToolsInstaller: set id=wireguard magisk module param
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-01-21 17:10:28 +01:00
Jason A. Donenfeld
d19e126e2e tools: bump libwg-go
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-29 16:58:28 +02:00
Jason A. Donenfeld
bf84e26a86 global: bump copyright year
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-29 16:47:12 +02:00
Jason A. Donenfeld
a03ad51622 tunnel: remove kernel module downloader
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>
2021-10-29 16:42:36 +02:00
Harsh Shandilya
6da1d5ed01
tunnel: make JSR305 annotations a compileOnly dependency
These have no business being part of the runtime classpath of this library

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-10-28 03:19:55 +05:30
Jason A. Donenfeld
4eb90266a2 tunnel: bump to work on x86_64 architecture
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>
2021-09-26 17:35:57 -06:00