[GH-ISSUE #47] Watchdog to Auto-Restart VPN if Killed by Android #26

Open
opened 2026-10-13 21:05:16 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @ghost on GitHub (Oct 28, 2025).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-android/issues/47

Problem
On many Android devices, the system may stop the VPN service (or the entire app) due to battery or memory management, even with optimizations disabled. When this happens, the AmneziaWG tunnel is dropped and not automatically restored until the user manually reopens the app.

Proposed Solution
Add a lightweight watchdog or background component (a WorkManager job) that:

  • Detects when the VPN service has been stopped by the OS.
  • Automatically restarts the app/service and re-enables the tunnel with the last configuration.
  • Optionally allows users to toggle this behavior in settings.

Other VPNs use a similar approach to ensure continuous operation.

Originally created by @ghost on GitHub (Oct 28, 2025). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-android/issues/47 **Problem** On many Android devices, the system may stop the VPN service (or the entire app) due to battery or memory management, even with optimizations disabled. When this happens, the AmneziaWG tunnel is dropped and not automatically restored until the user manually reopens the app. **Proposed Solution** Add a lightweight watchdog or background component (a WorkManager job) that: - Detects when the VPN service has been stopped by the OS. - Automatically restarts the app/service and re-enables the tunnel with the last configuration. - Optionally allows users to toggle this behavior in settings. Other VPNs use a similar approach to ensure continuous operation.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-android#26
No description provided.