summaryrefslogtreecommitdiffhomepage
path: root/talpid-tunnel
AgeCommit message (Collapse)AuthorFilesLines
2025-10-24Integrate GotaTun cleanlyMarkus Pettersson1-2/+2
Refactor `trait Tunnel` and factor `start_daita` into `set_config`. Co-authored-by: Joakim Hulthe <joakim.hulthe@mullvad.net>
2025-10-07Define networks as const valuesMarkus Pettersson1-16/+9
2025-10-03Bump windows-sys version to latestDavid Lönnhager1-3/+3
This also refactors and documents some code
2025-09-15Update ipnetwork and convert LazyLock to constJoakim Hulthe1-2/+2
2025-07-25Create new boringtun devices when toggling multihopDavid Lönnhager1-1/+2
2025-07-25Set MTU in Unix tun providerDavid Lönnhager1-0/+7
2025-07-10Run `cargo fmt`Sebastian Holmin3-5/+5
2025-07-09Inline format argumentsLinus Färnstrand1-6/+3
2025-06-12Fix variable nameJoakim Hulthe1-4/+4
2025-06-12Fix tun file descriptor ownershipJoakim Hulthe1-4/+4
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-12Add IPv6 support to Windows tun providerDavid Lönnhager1-16/+23
2025-06-10Update nix to 0.30 everywhereJoakim Hulthe2-2/+37
2025-05-26Add BoringtunJoakim Hulthe5-150/+522
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-0/+6
2025-03-19Set MTU on IPv6 interface for wireguard-nt only if IPv6 is enabledDavid Lönnhager1-3/+10
2025-02-25Rename and comment variableDavid Göransson1-3/+4
2025-02-25Suppress unsafe warning when cloning JavaVMJoakim Hulthe1-0/+5
2025-02-25Reduce open_tun calls (Establish)David Göransson2-22/+76
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-13Downgrade to tun 0.5.5David Lönnhager1-11/+14
2025-02-06Replace old waitForTunnelUp functionDavid Göransson1-2/+5
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-09Use `ip -6 addr` command for setting ipv6 addr on linuxJoakim Hulthe1-25/+25
Using tun throws strange I/O errors. There may be a bug related to ipv6 in tun 0.7.10
2025-01-03Promote `tun` to a workspace dependencyMarkus Pettersson1-1/+1
2025-01-03Enable the `async` feature of `tun`Markus Pettersson2-24/+4
Use `tun::AsyncDevice` instead of hand-rolling an async tunnel device with `tun::Device` + sys calls.
2025-01-03Clean up API for setting tunnel device nameMarkus Pettersson2-4/+7
2025-01-03Derive `Default` for `TunnelDeviceBuilder`Markus Pettersson1-7/+1
2025-01-03Upgrade `tun` to get rid of set_address code on LinuxMarkus Pettersson3-44/+53
2025-01-03Remove `duct` from `talpid-tunnel`Markus Pettersson2-23/+15
2024-12-18Fix JNI enum namesDavid Göransson1-5/+7
2024-12-02Replace generic with new typeSebastian Holmin1-8/+27
2024-12-02Replace dyn fn with genericSebastian Holmin1-3/+5
2024-11-27Handle legacy always-on vpn profilesDavid Göransson1-4/+14
Co-authored-by: Jonatan Rhodin <jonatan.rhodin@mullvad.net>
2024-09-25Add `futures` to workspace dependenciesSebastian Holmin1-1/+1
2024-09-02Remove unused NetworkInterface traitDavid Lönnhager1-52/+29
2024-09-02Set tunnel name to wg0-mullvad for wireguard-goDavid Lönnhager2-32/+58
Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net>
2024-09-02Run `cargo +nightly clippy --fix`Markus Pettersson1-0/+1
2024-08-27Use std LazyLock instead of once_cell LazyDavid Lönnhager2-7/+8
2024-08-13Refactor tunnel provider and TalpidVpnServiceDavid Lönnhager6-247/+221
This also fixes the issue of the VPN service being restarted unnecessarily
2024-08-13Update missing commentDavid Lönnhager1-1/+1
2024-08-13Remove duplicate dummy DNS fix for VpnServiceDavid Lönnhager1-9/+0
2024-08-13Don't pass in excluded apps from wireguard-goDavid Lönnhager1-5/+0
2024-07-30Reconnect if split tunnel state changedMarkus Pettersson1-1/+1
2024-07-25Fix Android code related to ipnetwork upgradesLinus Färnstrand1-3/+3
2024-07-25Upgrade pfctl to 0.5.0 and ipnetwork to 0.20Linus Färnstrand1-1/+1
2024-05-29Migrate to gRPCDavid Göransson2-9/+35
Co-authored-by: Jonatan Rhodin <jonatan.rhodin@mullvad.net> Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net> Co-authored-by: David Lönnhager <david.l@mullvad.net>
2024-05-08Set dummy DNS servers in blocking statesDavid Lönnhager1-11/+30
This is a fix for DNS leaks in blocking states due to an underlying OS bug where DNS queries leak when no DNS server is configured. Lockdown mode ("Block connections without VPN") would also not help in this case. More information on this issue: https://issuetracker.google.com/issues/337961996
2024-02-27Replace err_derive with thiserrorJoakim Hulthe3-43/+33
`err_derive` is unmaintained and will probably stop working with rust edition 2024. `thiserror` is almost a drop-in replacement. This commit simply replaces all occurences of `derive(err_derive::Error)` with `derive(thiserror::Error)` and fixes the attributes, but the Error and Display impls should be identical.
2024-02-08Removed unused functionMarkus Pettersson1-9/+0
2024-02-08Move constantsSebastian Holmin1-0/+13
2024-02-08Fix typosSebastian Holmin1-1/+1
2024-01-16Add rust-version to all Cargo.tomlLinus Färnstrand1-0/+1