summaryrefslogtreecommitdiffhomepage
path: root/talpid-routing
AgeCommit message (Collapse)AuthorFilesLines
2025-10-24Integrate GotaTun cleanlyMarkus Pettersson2-2/+12
Refactor `trait Tunnel` and factor `start_daita` into `set_config`. Co-authored-by: Joakim Hulthe <joakim.hulthe@mullvad.net>
2025-10-20Promote widestring to workspace dependencyMarkus Pettersson1-1/+1
Do not care about talpid-openvpn since it's slated for removal
2025-10-03Bump windows-sys version to latestDavid Lönnhager2-26/+19
This also refactors and documents some code
2025-09-17Add note about simplifying code if upstream PR is acceptedMarkus Pettersson1-2/+4
Signed-off-by: Markus Pettersson <markus.pettersson@mullvad.net>
2025-09-17Upgrade rtnetlink libs to latest versionMarkus Pettersson3-214/+232
Signed-off-by: Markus Pettersson <markus.pettersson@mullvad.net>
2025-09-08Refactor and document macOS route socket typesDavid Lönnhager5-398/+333
2025-07-15Fix `collapsible_if` clippy lintMarkus Pettersson1-26/+27
2025-07-10Run `cargo fmt`Sebastian Holmin14-48/+50
2025-07-09Inline format argumentsLinus Färnstrand2-2/+2
2025-07-09Fix `WireguardTunnelMonitoringError` enum sizeSebastian Holmin1-4/+4
2025-07-09Use `Iter::contains`Linus Färnstrand1-1/+1
2025-07-09Use `io:Error::other`Sebastian Holmin1-6/+3
2025-06-19Update default_routes.rsleopardracer1-1/+1
2025-06-19Update data.rsleopardracer1-2/+2
2025-06-10Update nix to 0.30 everywhereJoakim Hulthe2-5/+2
2025-06-05Fix typosomahs2-2/+2
2025-05-28Replace spawn_blocking with spawnJoakim Hulthe1-7/+2
2025-05-14Do not delay first route events in default_routesDavid Lönnhager1-4/+14
Previously, this resulted in short jump to the offline state if IPv6 was unavailable and the daemon connected within a period of NO_ROUTE_GRACE_TIME after starting
2025-04-23Compare routes by interface_index instead of link addrJoakim Hulthe1-19/+21
2025-04-23Handle changes to best default route betterJoakim Hulthe6-276/+698
2025-04-23Implement Debug for RouteSocketAddress manuallyJoakim Hulthe1-1/+35
2025-04-23Ensure that default route still exist on route eventsJoakim Hulthe1-17/+72
2025-04-23Rename _err to _would_blockJoakim Hulthe1-1/+1
2025-04-23Replace loop+bitshift with iteratorJoakim Hulthe1-23/+22
2025-04-10Fix some compilation errors on macOS for Rust 2024David Lönnhager1-1/+1
2025-04-01Fix incorrect decoding of macOS SCDynStore valueJoakim Hulthe1-48/+52
We were incorrectly reading the `Addresses`-key from the `State:/Network/Global/IPvX`-dictionaries, which do not have it. The correct place to look is `State:/Network/Service/<service_id>/IPvX`
2025-04-01Remove some `unsafe` blocksJoakim Hulthe1-17/+32
2025-02-25Add safety comment in talpid_routing::windows::route_managerJoakim Hulthe1-0/+1
2025-02-25Allow undocumented_unsafe_blocks in some modulesJoakim Hulthe1-0/+2
2025-02-25Fix bad pointer deref in talpid-routing::unix::macos::dataJoakim Hulthe1-1/+6
2025-02-25Fix math in talpid-routing::unix::macos::data (?)Joakim Hulthe1-1/+1
2025-02-25Fix safety comment position in talpid-routing::unix::macos::dataJoakim Hulthe1-4/+4
2025-02-25Add safety comments in talpid_routing::windows::route_managerJoakim Hulthe1-0/+2
2025-02-25Fix position of safety comment in talpid_routing::windowsJoakim Hulthe1-3/+5
2025-02-25Reduce open_tun calls (Establish)David Göransson2-20/+52
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 Holmin2-12/+11
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 Holmin2-26/+42
2025-02-12Fix "RPIT lifetime capture rules"Sebastian Holmin1-1/+3
2025-02-12Replace `#[no_mangle]` with `#[unsafe(no_mangle)]`Sebastian Holmin1-1/+1
2025-02-06Request (poll) initial NetworkState at startupMarkus Pettersson2-3/+81
2025-02-06Replace old waitForTunnelUp functionDavid Göransson6-28/+216
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-09-25Add `futures` to workspace dependenciesSebastian Holmin1-1/+1
2024-08-27Use std LazyLock instead of once_cell LazyDavid Lönnhager2-4/+3
2024-08-20Add interface/mtu change listenerDavid Lönnhager3-0/+47
2024-07-25Upgrade pfctl to 0.5.0 and ipnetwork to 0.20Linus Färnstrand1-1/+1
2024-06-25Remove unused `libc` dependency in `talpid-routing`Markus Pettersson1-1/+0
2024-06-24Run `cargo +nightly fmt`Sebastian Holmin2-3/+2
2024-06-20Use only SCDynamicStore for fetching network service IPsDavid Lönnhager1-53/+42
This fixes a regression due to 9c257c424a5ed4d531fec8e813f44a4ede0baaee
2024-04-30Refactor tun moduleDavid Lönnhager1-2/+1