summaryrefslogtreecommitdiffhomepage
path: root/talpid-wireguard
AgeCommit message (Collapse)AuthorFilesLines
2025-03-24Make it possible to disable IPv6 in the tunnelJonatan Rhodin1-1/+7
2025-03-21Use regular default route for the tunnel interface on WindowsDavid Lönnhager1-22/+1
This replaces the /1 routes for two reasons: 1. This mitigates an issue in our fork of wireguard-nt, which intentionally allows routes back to the tunnel interface. The fork explicitly disallows this only for routes with a prefix 0, which means that the /1 routes are not exempted. This can result in an infinite routing loop if the non-tunnel route to the relay is removed (e.g., if the default interface or its routes disappear). 2. This simplifies the code and routes. The /1 routes are unnecessary since we're setting the metric on the default route and interface to the lowest value anyway, so the OS should always prefer the tunnel default route. Even if it doesn't, the firewall will prevent leaks.
2025-03-19Set MTU on IPv6 interface for wireguard-nt only if IPv6 is enabledDavid Lönnhager2-3/+8
2025-03-18Remove superfluous .to_vec()'s, and replace some with vec![]Linus Färnstrand1-114/+74
2025-02-27Use socket instead of ping command when pinging on androidJonatan Rhodin4-89/+14
Previous implementation spawned a process with tokio which in turn registered a signal handler without ONASTACK flag set. When using GO code, all signal handlers needs to have this flag set otherwise a signal might be handled on a goroutine thread which has a small stack and thus can overflow. Reference: DROID-1825 Co-authored-by: David Lönnhager <david.l@mullvad.net>
2025-02-25Fix connection loop regressionDavid Göransson1-0/+6
2025-02-25Fix comment about routes on androidDavid Göransson1-3/+5
2025-02-25Allow undocumented_unsafe_blocks in even more modulesJoakim Hulthe1-0/+2
2025-02-25Add safety comment to talpid_wireguard::wireguard_goJoakim Hulthe1-0/+4
2025-02-25Fix unaligned pointer readJoakim Hulthe1-16/+27
2025-02-25Move iface_index helper to talpid-netJoakim Hulthe1-27/+1
2025-02-25Move some safety comments to clippy recognizes themJoakim Hulthe1-3/+3
2025-02-25Reduce open_tun calls (Establish)David Göransson3-33/+93
Each call to Establish opens a window for leaks on android. By only invoking Establish if the VpnConfig if any of the input has changed and reusing it otherwise we avoid many of these leaks. This commit also waits for android to report back that the routes have been created to ping and verify connectivity to avoid pings going outside the tunnel.
2025-02-12Format workspaceSebastian Holmin1-7/+7
The 2024 edition contains new formatting rules. All of these are not compatible with the 2021 formatting style, but most of them are. To change the formatting to be as close to the new style as possible while remaining compatible with the 2021 edition, I first ran `cargo +beta fmt` with the edition set to 2024, then, with the edition set to 2021, I ran `cargo fmt`.
2025-02-12Fix `unsafe_op_in_unsafe_fn` warningSebastian Holmin3-26/+31
2025-02-06Do not change routes between tunnel reconfigurationMarkus Pettersson1-1/+6
2025-02-06Replace old waitForTunnelUp functionDavid Göransson1-1/+7
After invoking VpnService.establish() we will get a tunnel file descriptor that corresponds to the interface that was created. However, this has no guarantee of the routing table beeing up to date, and we might thus send traffic outside the tunnel. Previously this was done through looking at the tunFd to see that traffic is sent to verify that the routing table has changed. If no traffic is seen some traffic is induced to a random IP address to ensure traffic can be seen. This new implementation is slower but won't risk sending UDP traffic to a random public address at the internet.
2025-01-27Do bikesheddingSebastian Holmin1-41/+19
2025-01-27Refactor error message for LinuxSebastian Holmin1-23/+12
2025-01-27Split into a fn per platformSebastian Holmin1-100/+107
2025-01-27Refactor wireguard implementation pickerSebastian Holmin1-62/+87
2025-01-24Complete leak checker and implement in daemonJoakim Hulthe1-1/+1
2025-01-24Remove block_in_placeDavid Lönnhager1-9/+8
2025-01-24Make start_tunnel async on WindowsDavid Lönnhager2-13/+8
2025-01-24Support `FORCE_USERSPACE_WIREGUARD` on windowsSebastian Holmin1-3/+3
2025-01-24Target macos and linux when conditionally compilingDavid Lönnhager1-1/+1
2025-01-24Remove more use of `#[cfg(daita)]`Markus Pettersson2-4/+0
2025-01-24Format codeDavid Lönnhager5-22/+25
2025-01-24Fix socket rebind on default route changes when using multihopDavid Lönnhager1-28/+5
2025-01-24Handle network changes for wireguard-go (rebind endpoint socket)David Lönnhager2-4/+60
2025-01-24Enable DAITA v2 for Windows via wireguard-goDavid Lönnhager6-32/+84
2025-01-24Build wireguard-go via wireguard-go-rs on WindowsDavid Lönnhager3-6/+24
2025-01-24Ensure tunnel is running after updating wireguard configDavid Göransson1-2/+7
2025-01-23Refactor connectivity check to be asyncDavid Lönnhager15-499/+548
2025-01-14Add route to obfuscator if necessaryMarkus Pettersson1-1/+1
2025-01-07Fix bug where `block_on` was called from an async contextMarkus Pettersson1-4/+22
2025-01-03Upgrade `tun` to get rid of set_address code on LinuxMarkus Pettersson1-3/+9
2024-12-20Remove unwrapSebastian Holmin1-1/+2
2024-12-20Add `log_tunnel_data_usage` to Android tooSebastian Holmin1-3/+11
2024-12-20Add logging for ephemeral peer negotiation timeouts on WindowsSebastian Holmin1-2/+29
2024-12-20Revert `force_wireguard_handshake` because it was brokenMarkus Pettersson4-74/+4
2024-12-19Remove 'force_wireguard_handshake' on non-WindowsDavid Lönnhager2-2/+4
The firewall blocks the pinger in some circumstances
2024-12-19Do not block during ephemeral peer exchangeDavid Lönnhager1-7/+8
2024-12-18Revert reset of pinger establish timeoutDavid Lönnhager1-2/+0
2024-12-18Ignore failed ping (since multihop is flaky)David Lönnhager1-1/+3
2024-12-18Reset connection monitor state and timeout between each ping attemptDavid Lönnhager1-0/+2
2024-12-18Force WireGuard handshake before PQ handshakeDavid Lönnhager4-6/+71
2024-12-17Do not drop conn checker when updating tun without toggling multihopDavid Lönnhager1-6/+11
2024-12-12Remove some deprecated ref patternsJoakim Hulthe1-5/+1
2024-12-12Remove unused testDavid Lönnhager1-30/+0