Repository navigation
Description
Problem Description
VPN connections may sometimes become unresponsive after an internet connection loss, switching between Wi-Fi and mobile data, or waking the device from sleep.
In some cases, Throne may continue to show the VPN as connected even though traffic is no longer passing through the tunnel. The user then has to manually disconnect and reconnect the VPN to restore connectivity.
Keep-alive mechanisms alone may not be sufficient to detect and recover from every type of connection failure, especially when a tunnel becomes unresponsive or its underlying transport session is lost.
This issue may affect different tunnel types, including:
- WireGuard
- AmneziaWG
- MASQUE over HTTP/2
- MASQUE over HTTP/3 (QUIC)
Proposed Solution
Implement a general VPN tunnel health monitoring and automatic recovery mechanism (Watchdog) for Android.
The proposed behavior:
- Periodically check whether internet connectivity is actually available through the active VPN tunnel.
- Detect situations where Android reports the VPN as connected, but traffic through the tunnel is no longer working.
- Distinguish temporary network interruptions from a stalled or lost tunnel.
- Automatically restart or recreate the affected tunnel when a failure is confirmed.
- Retry failed connections using progressively longer intervals (exponential backoff).
- Trigger recovery when the underlying network changes (Wi-Fi ↔ mobile data).
- Preserve the Android VPN service whenever possible, restarting only the affected tunnel instead of requiring a complete VPN service restart.
- Resume normal operation automatically when internet connectivity becomes available again.
The health-check mechanism could be shared across supported protocols, while the actual recovery procedure should be implemented according to the requirements of each protocol and transport.
Suggested Settings
It would be useful to provide configurable options:
- Enable or disable automatic recovery.
- Health-check interval.
- Number of consecutive failed checks before recovery is triggered.
- Initial retry delay.
- Maximum retry delay.
Expected Result
Throne should automatically detect and recover from VPN tunnel failures, including network interruptions, stalled connections, and network changes.
Users should not have to manually disconnect and reconnect the VPN to restore connectivity.
Environment
- Android
- Throne for Android
- Affected tunnel types: WireGuard, AmneziaWG, and MASQUE (HTTP/2 and HTTP/3).
Thank you for your work on Throne!
Activity