summaryrefslogtreecommitdiffhomepage
path: root/android/lib/talpid
AgeCommit message (Collapse)AuthorFilesLines
2025-09-30Improve documentation and logging of connectivity statusJonatan Rhodin2-4/+19
- Clarify why we need to listen for all non-VPN network events. - Log default network event types in production build. - Add log for when we try to check connectivity status. - Improve logging of when we can't access the internet via socket.
2025-07-03Fix gradle kotlinOptions warningsDavid Göransson1-3/+7
2025-06-04Fix connectivity manager util testsJonatan Rhodin1-2/+2
2025-06-03Listen for all network events to fix missing default network eventsJonatan Rhodin1-39/+113
2025-05-26Migrate remaining deps and versions to version catalogsDavid Göransson1-4/+4
2025-03-25Avoid using an unavailable ip version to connect to a relayJonatan Rhodin5-13/+37
Co-authored-by: Sebastian Holmin <sebastian.holmin@mullvad.net>
2025-03-24Make it possible to disable IPv6 in the tunnelJonatan Rhodin1-3/+3
2025-03-07Use the correct connect function to detect online statusJonatan Rhodin1-1/+1
2025-03-07Track IPv6 connectivity on AndroidDavid Lönnhager5-118/+160
Co-authored-by: Jonatan Rhoidn <jonatan.rhodin@mullvad.net> Co-authored-by: David Göransson <david.goransson@mullvad.net>
2025-03-04Improve connectivity listener online detectionDavid Göransson2-72/+77
Fixes incorrect filter for networkEvents. Also adds debouncing to offline state when roaming to cellular from WiFi, this would otherwise cause a full reconnection.
2025-03-03Fix connectivity listenerDavid Göransson1-27/+55
Fixes an issue where another VPN app or user having unfortunate timing of turning on airplane mode and connecting at almost the same time would leave a lingering network cached in the scan. This fix will start with the all networks state and give the networkEvents flow 1 second to start up and emit the actual network state.
2025-02-26Fix spamming of connectivity changed eventsJonatan Rhodin1-0/+2
2025-02-25Remove cached VpnConfig in TalpidVpnServiceDavid Göransson1-8/+1
2025-02-25Reduce open_tun calls (Establish)David Göransson2-28/+18
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-25Fix incorrectly notifying offlineDavid Göransson1-19/+30
Incorrectly notifying that we are offline to the daemon would result in us enter ErrorState, and thus restarting the tunnel in a blocking state, opening a small window for leaks of traffic.
2025-02-25Allow invalidating NetworkState cacheDavid Göransson1-2/+13
2025-02-25Refactor defaultRawNetworkStateFlowDavid Göransson1-18/+13
2025-02-06Replace old waitForTunnelUp functionDavid Göransson6-168/+244
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-12-19Make Number of networks log less noisyDavid Göransson1-3/+6
2024-12-12Add logging to connectivity listenerJonatan Rhodin1-2/+11
2024-11-27Handle legacy always-on vpn profilesDavid Göransson4-16/+24
Co-authored-by: Jonatan Rhodin <jonatan.rhodin@mullvad.net>
2024-11-22Make connectivity sender staticDavid Lönnhager2-27/+2
2024-11-22Refactor ConnectivityListenerDavid Göransson4-61/+207
2024-11-22Simplify ConnectivityListenerDavid Lönnhager1-8/+5
2024-11-22Expose current dns serversDavid Göransson2-1/+23
2024-10-08Suppress ConnectivityListener unusedDavid Göransson1-0/+4
2024-10-08Suppress return countDavid Göransson1-0/+3
2024-10-03Make all compiler warnings errorsDavid Göransson1-1/+4
2024-09-24Set build tools version to 35.0.0David Göransson1-0/+1
2024-09-06Handle Exception when tunnel fails to establishDavid Göransson1-3/+14
2024-09-06Make prefixForAddress a extension functionDavid Göransson1-6/+8
2024-08-28Reformat kotlin code using updated ktfmt pluginAlbin1-1/+1
This commit mostly adds trailing commas throughout the project, but also includes a few other formatting changes.
2024-08-13Refactor tunnel provider and TalpidVpnServiceDavid Lönnhager1-24/+16
This also fixes the issue of the VPN service being restarted unnecessarily
2024-08-13Migrate to version catalogsAlbin1-10/+10
2024-06-26Migrate log calls to kermitAlbin1-3/+2
2024-06-26Add kermit dependencyAlbin1-1/+2
2024-05-29Migrate to gRPCDavid Göransson19-230/+79
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 if none are validDavid Göransson1-0/+17
This is a fix for DNS leaks when no DNS server has been configured due to an underlying OS bug. 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-05Fix too general ExceptionDavid Göransson1-1/+1
2023-11-17Add missing FirewallPolicyError classJonatan Rhodin2-8/+21
2023-09-21Apply automatic formatting and cleanup of gradle filesAlbin1-6/+2
2023-09-12Perform AS Code CleanupDavid Göransson1-5/+5
2023-08-04Remove targetSdk from libsAlbin1-1/+0
2023-08-04Apply updated ktfmt formattingAlbin2-0/+2
2023-08-03Bump container image, jdk, gradle and agpAlbin1-2/+2
2023-07-25Add network permission to talpid moduleAlbin1-1/+3
2023-07-25Move talpid classes to talpid moduleAlbin19-0/+471
2023-07-25Add empty talpid moduleAlbin2-0/+35