summaryrefslogtreecommitdiffhomepage
path: root/talpid-wireguard/src/wireguard_go
AgeCommit message (Collapse)AuthorFilesLines
2025-10-24Add DAITA stats to 'Stats'David Lönnhager1-0/+1
2025-10-24Integrate GotaTun cleanlyMarkus Pettersson1-21/+23
Refactor `trait Tunnel` and factor `start_daita` into `set_config`. Co-authored-by: Joakim Hulthe <joakim.hulthe@mullvad.net>
2025-10-08Block tunnel traffic when negotiating with an ephemeral peer on AndroidMarkus Pettersson1-41/+4
Patch tunnel config to block traffic to non-gateway destinations during PQ setup when using Boringtun on Android. Move `patch_allowed_ips` to `config` module.
2025-09-03Add last WG handshake to statsDavid Lönnhager1-0/+33
2025-07-10Run `cargo fmt`Sebastian Holmin1-5/+5
2025-06-12Fix tun file descriptor ownershipJoakim Hulthe1-9/+7
We accidentally borrowed the file descriptor when we should have moved it. This commit adds more `OwnedFd` and friends to help handle ownership correctly. Signed-off-by: Joakim Hulthe <joakim.hulthe@mullvad.net>
2025-06-10Update nix to 0.30 everywhereJoakim Hulthe1-6/+6
2025-05-26Add BoringtunJoakim Hulthe1-98/+193
Co-authored-by: Joakim Hulthe <joakim.hulthe@mullvad.net> Co-authored-by: Sebastian Holmin <sebastian.holmin@mullvad.net> Co-authored-by: David Göransson <david.goransson@mullvad.net> Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net> Co-authored-by: David Lönnhager <david.l@mullvad.net>
2025-03-24Make it possible to disable IPv6 in the tunnelJonatan Rhodin1-1/+7
2025-03-19Set MTU on IPv6 interface for wireguard-nt only if IPv6 is enabledDavid Lönnhager1-1/+2
2025-02-25Fix connection loop regressionDavid Göransson1-0/+6
2025-02-25Fix comment about routes on androidDavid Göransson1-3/+5
2025-02-25Add safety comment to talpid_wireguard::wireguard_goJoakim Hulthe1-0/+4
2025-02-25Reduce open_tun calls (Establish)David Göransson1-22/+74
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-12Fix `unsafe_op_in_unsafe_fn` warningSebastian Holmin1-1/+1
2025-02-06Do not change routes between tunnel reconfigurationMarkus Pettersson1-1/+6
2025-01-24Remove block_in_placeDavid Lönnhager1-9/+8
2025-01-24Make start_tunnel async on WindowsDavid Lönnhager1-8/+5
2025-01-24Target macos and linux when conditionally compilingDavid Lönnhager1-1/+1
2025-01-24Format codeDavid Lönnhager1-8/+7
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önnhager1-1/+55
2025-01-24Enable DAITA v2 for Windows via wireguard-goDavid Lönnhager1-1/+67
2025-01-24Build wireguard-go via wireguard-go-rs on WindowsDavid Lönnhager1-2/+6
2025-01-24Ensure tunnel is running after updating wireguard configDavid Göransson1-2/+7
2025-01-23Refactor connectivity check to be asyncDavid Lönnhager1-51/+44
2025-01-03Upgrade `tun` to get rid of set_address code on LinuxMarkus Pettersson1-3/+9
2024-12-17Do not drop conn checker when updating tun without toggling multihopDavid Lönnhager1-6/+11
2024-12-12Remove unused testDavid Lönnhager1-30/+0
2024-12-12Adjust DAITA buffer sizesDavid Lönnhager1-2/+2
Previous size resulted in occasional dropped events
2024-12-12Use dynamic DAITA machines in wireguard-goDavid Lönnhager1-25/+11
Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net>
2024-12-02Make tunnel connection errors recoverableKalle Lindström1-3/+6
2024-11-22Check that that tunnel can serve traffic after starting a new tunnelKalle Lindström1-8/+60
- Split up "ConnectivityCheck" into more descriptive types and collect them in a new `connectivity` module. - Fix allow Wireguard-Go tunnel setup to be cancelled - Use retry param in connectivity check
2024-11-22Fix a lot of thingsMarkus Pettersson1-81/+81
- Fix remaining rustc warnings on non-Android platforms - Fix lookup entry peer if it exists in wireguard-go - Fix talpid-wireguard not compiling on windows - Fix entry peer config code - Fix clippy issue - Fix Daita - Remove TODOs
2024-11-22Add multihop negotiation with ephemeral peersKalle Lindström1-87/+183
Use `WgGoTunnel` directly on Android because a specialized implemenation of `set_config` has to be used.
2024-11-22Split up platform specific `start_tunnel` functionsMarkus Pettersson1-45/+92
2024-11-22Clean upJonatan Rhodin1-3/+3
- Fix outdated comment - Remove unused go function - Remove outdated TODO comment - Run `go fmt` on `libwg_android.go` - Document `AllowedTunnelTraffic`, `get_socket_v4` and `get_socket_v6`
2024-11-22Fix socket function in wireguard-goJonatan Rhodin1-0/+16
2024-11-22Add initial multihop config on AndroidJonatan Rhodin1-0/+50
- Add some minor wireguard go changes
2024-11-12Use maybenotv2 on iOS, remove maybenotv1Emīls1-1/+1
2024-11-01Document purpose of testsDavid Lönnhager1-0/+2
2024-11-01Add unit test for maybenot machines for wg-goDavid Lönnhager1-10/+30
2024-10-30Add back maybenot_machines version 1Joakim Hulthe1-1/+1
2024-09-02Set tunnel name to wg0-mullvad for wireguard-goDavid Lönnhager1-0/+6
Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net>
2024-08-26Remove unwraps in start_daitaJoakim Hulthe1-3/+4
2024-08-13Refactor tunnel provider and TalpidVpnServiceDavid Lönnhager1-36/+8
This also fixes the issue of the VPN service being restarted unnecessarily
2024-08-13Don't pass in excluded apps from wireguard-goDavid Lönnhager1-5/+0
2024-06-25Add `daita` as a Cargo cfg variableMarkus Pettersson1-10/+10
Gate DAITA compilation on `"cargo::rustc-cfg=daita"` emitted in build files per platform.
2024-06-25Use Wireguard-go when DAITA is enabledMarkus Pettersson1-1/+4
2024-06-25Add a safe FFI wrapper in `wireguard-go-rs`Sebastian Holmin1-0/+408
- Add local wireguard go import - Activate DAITA and add `wgActivateDaita` and `wgReceiveEvent` FFI - Implement `start_daita` on Wireguard-go tunnel type - Mention DAITA in `wireguard-go-rs` description - Do not compile `wireguard-go-rs` on Windows - Handle DAITA closed on `nil` event - Handle daita action timeouts in libwg - Remove noisy log lines - Remove `maybenot_on_action` callback - Remove unused link to `../build/lib` for `talpid-wireguard` - Bump the `wireguard-go` submodule to a signed release tag in Mullvad's `wireguard-go` fork. - Update path to `libwg/go.sum` in verification script Also: - Use u64 instead of *mut void as log context - Make Tunnel::set_config take a &mut self - Use dyn Error instead of i32s for wg errors Co-authored-by: Joakim Hulthe <joakim@hulthe.net>