Skip to content

[Feature]: Android Quick Settings Tile for quick VPN connect/disconnect #296

Description

@alenpaulvarghese

Problem description

When using the official WireGuard Android client, users have access to an Android Quick Settings (QS) Tile in their status bar / notification shade. This allows enabling or disabling a VPN tunnel with a single tap without needing to unlock the device, locate the app icon, and open the full UI.

Migrating to DefGuard currently introduces friction for mobile users who frequently toggle VPN access for internal networks, as there is no Quick Settings Tile available.

Proposed solution

Implement an Android TileService in the DefGuard/mobile-client Android layer to provide a Quick Settings Tile.

Key Behaviors:

  1. Status & State Reflection:
    • The tile reflects whether a DefGuard tunnel is currently ACTIVE (connected) or INACTIVE (disconnected), syncing in real time with tunnel events from wireguard_plugin / GoBackend.
  2. Disconnection:
    • Tapping the tile while a tunnel is active immediately disconnects the active tunnel from the background.
  3. Connection Handling:
    • For tunnels without MFA/posture requirements: Directly initiates the connection from the background using the default / last active VPN configuration.
    • For MFA / Biometric / Posture-gated tunnels (or if VPN permission needs to be granted): Tapping the tile launches the app directly into the authentication/connection flow (TileService.startActivityAndCollapse()).
  4. Target Configuration:
    • Defaults to the last connected / active VPN location (or user-selected default location).

Implementation Details:

  • Register DefguardTileService in AndroidManifest.xml with android.permission.BIND_QUICK_SETTINGS_TILE.
  • Implement TileService in Kotlin with state listeners connected to the backend tunnel state.
  • Coordinate with the Flutter plugin to update tile status on tunnel state changes (TUNNEL_UP, TUNNEL_DOWN, MFA_SESSION_EXPIRED).

I would like to contribute this feature and can submit a PR with the implementation.

Alternatives considered

Opening the app manually every time a connection or disconnection is required, which adds friction for everyday internal VPN usage.

Impact

Important

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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