summaryrefslogtreecommitdiffhomepage
path: root/talpid-routing/src/unix/android.rs
AgeCommit message (Collapse)AuthorFilesLines
2025-07-10Run `cargo fmt`Sebastian Holmin1-3/+3
2025-07-09Inline format argumentsLinus Färnstrand1-1/+1
2025-02-25Reduce open_tun calls (Establish)David Göransson1-17/+35
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-12Replace `#[no_mangle]` with `#[unsafe(no_mangle)]`Sebastian Holmin1-1/+1
2025-02-06Request (poll) initial NetworkState at startupMarkus Pettersson1-3/+76
2025-02-06Replace old waitForTunnelUp functionDavid Göransson1-16/+138
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.
2024-02-27Replace err_derive with thiserrorJoakim Hulthe1-2/+2
`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.
2023-06-05Rework macOS routingDavid Lönnhager1-3/+2
2023-05-24Restructure routing modules to be hierarchicalLinus Färnstrand1-0/+38