-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] - Tunnel is not adapting for a network change #562
Comments
I'm not sure if it's the same issue, but since I upgraded my phone to LineageOS 22.1 (Android 15) I'm always having this problem in the morning: I've configured auto-tunnel to active the vpn anywhere except in my home wifi. It works, but after leaving the phone charging all night it stops working in the morning. If I deactivate auto-tunnel and activate it again, it keeps working until the next day. It looks like the network change monitoring is killed overnight. I've already disabled any battery optimization for the app. Is there anything else I can do? |
Attaching log of a test today (around 07 Feb 2025 09:08 UTC) in which I first turned off the wifi and the tunnel was not activated. Then I turned auto-tunnel off and on and it activated. Tested with WG Tunnel version 3.6.6 |
I am experiencing the same issue mostly over night. I saw @zaneschepke committed some code to overcome this. Hope this will fix the issue. @zaneschepke what do you mean, will our issue be solved with your commits on upcoming versions, or do you need additional logs? |
Since my previous comment I've been testing with the official Wireguard app, using the native always-on VPN and disabling all battery optimizations, but the results were the same: the app was killed in the morning and the phone had no Internet because the VPN was not active. I've been a LineageOS user for many years and this didn't happen in the past with older Android versions, so I now believe it's a new Android 15 behaviour. |
Yeah, also sometimes writing apps on Android and work every version it gets worse. I think the only "workaround" is a monitoring service. |
Unfortunately Google keeps making it harder and harder to make useful apps and they keep locking down features behind more permissions, more aggressive service killing, etc 😦 As for this ping issue, there are definitely some issues with the pinger logic in the current production version. I've made some improvements to this and made sure we are not using cached DNS so it will reresolve the DNS when the pinger bounced the tunnel. |
Describe the bug
When a network change occurs on the phone (e.g. from air plane mode to WiFi, or transitioning from WiFi to mobile), the tunnel cannot use the new network. It's a sporadic issue, but rather frequent (once or twice a week).
Smartphone (please complete the following information):
To Reproduce
Expected behavior
Tunnel keeps up
Additional context
"Last ping" in these cases is sometimes hours ago. As soon as I turn it off and immediately back on, the connection is restored.
Whether a tunnel restart or some other technique is needed when a change is detected, I don't know.
The text was updated successfully, but these errors were encountered: