summaryrefslogtreecommitdiffhomepage
path: root/talpid-routing/src/unix
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-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 Pettersson1-207/+227
Signed-off-by: Markus Pettersson <markus.pettersson@mullvad.net>
2025-09-08Refactor and document macOS route socket typesDavid Lönnhager4-397/+332
2025-07-15Fix `collapsible_if` clippy lintMarkus Pettersson1-26/+27
2025-07-10Run `cargo fmt`Sebastian Holmin8-30/+31
2025-07-09Inline format argumentsLinus Färnstrand1-1/+1
2025-07-09Fix `WireguardTunnelMonitoringError` enum sizeSebastian Holmin1-4/+4
2025-07-09Use `Iter::contains`Linus Färnstrand1-1/+1
2025-06-19Update default_routes.rsleopardracer1-1/+1
2025-06-19Update data.rsleopardracer1-2/+2
2025-06-10Update nix to 0.30 everywhereJoakim Hulthe1-4/+1
2025-06-05Fix typosomahs1-1/+1
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-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-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-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öransson4-25/+180
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-27Use std LazyLock instead of once_cell LazyDavid Lönnhager1-3/+3
2024-08-20Add interface/mtu change listenerDavid Lönnhager3-0/+47
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
2024-04-30Simplify interface filteringDavid Lönnhager2-54/+37
2024-04-30Handle already-applied routes gentlyDavid Lönnhager2-6/+17
2024-04-30Add initial split tunneling implementation for macOSDavid Lönnhager3-125/+215
2024-04-03Enable single-use-lifetimes rustc lintLinus Färnstrand1-1/+1
Removes superfluous lifetime definitions. Simplifying the code
2024-03-14Simplify route manager handleDavid Lönnhager1-157/+105
2024-03-13Fix recv errorDavid Lönnhager1-1/+1
2024-03-13Recreate routing socket if it has been shut down while readingDavid Lönnhager1-5/+13
2024-03-13Hide wait_for_responseDavid Lönnhager1-1/+1
2024-03-13Add helper for checking if routing socket has been shut downDavid Lönnhager1-0/+17
2024-03-13Log when select functions are called an unusual number of timesDavid Lönnhager2-0/+10
2024-03-11Don't block when dropping route managerDavid Lönnhager1-3/+4