Skip to content

Watchdog to Auto-Restart VPN if Killed by Android #47

@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions