diff options
| author | David Lönnhager <david.l@mullvad.net> | 2026-04-20 18:37:18 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2026-04-21 15:14:25 +0200 |
| commit | 92196f8bab8dd063ebfa8f1a24ff1370ef13de7b (patch) | |
| tree | 66b5b236fb492d47a59a8630f2c6f1cead3cddb8 | |
| parent | 37776e09e0d98182d60564b00ef3b216c2645fe8 (diff) | |
| download | mullvadvpn-92196f8bab8dd063ebfa8f1a24ff1370ef13de7b.tar.xz mullvadvpn-92196f8bab8dd063ebfa8f1a24ff1370ef13de7b.zip | |
Prefer GotaTun for multihop on Windows
| -rw-r--r-- | talpid-types/Cargo.toml | 3 | ||||
| -rw-r--r-- | talpid-types/src/net/wireguard.rs | 6 | ||||
| -rw-r--r-- | talpid-wireguard/Cargo.toml | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/talpid-types/Cargo.toml b/talpid-types/Cargo.toml index 861a5b2684..3f0dbf9aca 100644 --- a/talpid-types/Cargo.toml +++ b/talpid-types/Cargo.toml @@ -26,5 +26,8 @@ insta = { workspace = true } [target.'cfg(target_os = "android")'.dependencies] jnix = { version = "0.5.1", features = ["derive"] } +[features] +wireguard-go = [] + [lints] workspace = true diff --git a/talpid-types/src/net/wireguard.rs b/talpid-types/src/net/wireguard.rs index 2008ae3952..cb23bb58d5 100644 --- a/talpid-types/src/net/wireguard.rs +++ b/talpid-types/src/net/wireguard.rs @@ -56,7 +56,11 @@ impl TunnelParameters { /// Whether to use userspace WireGuard. pub fn use_userspace_wg(&self) -> bool { - cfg!(target_os = "macos") || self.options.userspace || self.options.daita + cfg!(target_os = "macos") + || self.options.userspace + || self.options.daita + // Always prefer GotaTun for multihop on Windows + || (cfg!(target_os = "windows") && cfg!(not(feature = "wireguard-go")) && self.connection.exit_peer.is_some()) } } diff --git a/talpid-wireguard/Cargo.toml b/talpid-wireguard/Cargo.toml index eb45db85c7..c860831eef 100644 --- a/talpid-wireguard/Cargo.toml +++ b/talpid-wireguard/Cargo.toml @@ -66,7 +66,8 @@ multihop-pcap = ["gotatun/pcap"] wireguard-go = [ "dep:chrono", "dep:wireguard-go-rs", - "talpid-tunnel/wireguard-go" + "talpid-tunnel/wireguard-go", + "talpid-types/wireguard-go" ] [lints] |
