summaryrefslogtreecommitdiffhomepage
path: root/talpid-routing/src/unix/mod.rs
AgeCommit message (Collapse)AuthorFilesLines
2025-10-24Integrate GotaTun cleanlyMarkus Pettersson1-1/+11
Refactor `trait Tunnel` and factor `start_daita` into `set_config`. Co-authored-by: Joakim Hulthe <joakim.hulthe@mullvad.net>
2025-07-10Run `cargo fmt`Sebastian Holmin1-1/+1
2025-04-10Fix some compilation errors on macOS for Rust 2024David Lönnhager1-1/+1
2025-02-25Reduce open_tun calls (Establish)David Göransson1-3/+17
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 "RPIT lifetime capture rules"Sebastian Holmin1-1/+3
2025-02-06Request (poll) initial NetworkState at startupMarkus Pettersson1-0/+5
2025-02-06Replace old waitForTunnelUp functionDavid Göransson1-8/+39
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-24Complete leak checker and implement in daemonJoakim Hulthe1-1/+1
2024-08-20Add interface/mtu change listenerDavid Lönnhager1-0/+20
2024-06-24Run `cargo +nightly fmt`Sebastian Holmin1-1/+1
2024-04-30Add initial split tunneling implementation for macOSDavid Lönnhager1-13/+46
2024-03-14Simplify route manager handleDavid Lönnhager1-157/+105
2024-03-11Don't block when dropping route managerDavid Lönnhager1-3/+4
2024-03-11Use block_in_place() in drop implAndrej Mihajlov1-3/+3
See: https://github.com/tokio-rs/tokio/issues/5843
2024-03-11Remove unnecessary mutabilityDavid Lönnhager1-4/+4
2024-03-11Simplify unix route monitorDavid Lönnhager1-40/+19
2024-03-11Remove unused error variants in routing::unix::ErrorAndrej Mihajlov1-7/+1
2024-02-27Replace err_derive with thiserrorJoakim Hulthe1-8/+8
`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-01-31Simplify retry logic in connecting stateDavid Lönnhager1-0/+19
2023-10-10Refresh routes when connecting in offline statesDavid Lönnhager1-0/+8
2023-10-05Coalesce route events in macOS route monitorDavid Lönnhager1-3/+8
2023-06-05Rework macOS routingDavid Lönnhager1-91/+42
2023-06-05Attempt to setup routes the other wayEmīls1-3/+83
2023-05-24Restructure routing modules to be hierarchicalLinus Färnstrand1-0/+302