[GH-ISSUE #2499] Feature request: URL scheme + .conf intent-filter for standalone AmneziaWG Android app (one-tap import) #1126

Open
opened 2026-10-13 20:34:56 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @PanCrucian on GitHub (Apr 19, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/2499

Summary

The standalone AmneziaWG Android app (built from
amnezia-vpn/amneziawg-android)
has no registered URL scheme and no inbound file-association
intent-filter. Inspection of ui/src/main/AndroidManifest.xml shows
MainActivity declares only MAIN/LAUNCHER and QS_TILE_PREFERENCES;
there is no <data android:scheme="..."/>, no ACTION_VIEW filter
for text/plain / application/octet-stream / pathPattern=".*\.conf",
and no App Links (autoVerify="true" + .well-known/assetlinks.json).

Import today happens only through the in-app SAF flow:
MainActivity launches ACTION_OPEN_DOCUMENT, then
TunnelImporter.importTunnel(contentResolver, uri, ...) reads the file.
There is no way for an external app or a browser download to route a
.conf or a deep link into AmneziaWG directly.

This is a sibling request to #2498 (iOS) and in the same spirit as
#1067 (main Amnezia client, different codebase). The Android story is
actually worse than iOS here: iOS at least declares a .conf document
type, so the share sheet can route a file into AmneziaWG. Android has
neither document-type nor scheme.

Why

Importing a fresh .conf on Android today forces users through a
multi-step flow:

  1. Save the .conf file to device storage
  2. Open AmneziaWG
  3. Tap + → "Import from file"
  4. Pick the file via SAF

Compare with apps that register an intent-filter: tap a .conf file
in any source → Android offers "Open with AmneziaWG" → done.

Proposed behavior

Two complementary changes, either or both:

  1. Intent-filter for .conf import in MainActivity (or a dedicated
    importer activity) — covers the text/plain / application/octet-stream
    / pathPattern=".*\.conf" cases so a tap on a .conf in any source
    routes into the app:

    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="content" />
        <data android:scheme="file" />
        <data android:mimeType="application/octet-stream" />
        <data android:mimeType="text/plain" />
    </intent-filter>
    

    Handler routes the incoming Uri into the existing
    TunnelImporter.importTunnel(contentResolver, uri, ...) path.

  2. Custom URL scheme (e.g. amneziawg://import?config=<base64url> or
    amneziawg://import?url=https://...) via an additional intent-filter
    with <data android:scheme="amneziawg"/>. Same handler routes the
    scheme payload through TunnelImporter.

Happy to open a draft PR against `amneziawg-android` if external
contributions are accepted there (issues are disabled on that repo, so
I'm filing here).

Out of scope

  • App Links (https:// autoVerify) — would need assetlinks.json hosting
    by the Amnezia team, separate discussion.

Platform

  • App: standalone AmneziaWG Android (not the main Amnezia VPN client)
  • Repo: amnezia-vpn/amneziawg-android
  • Related: #2498 (iOS counterpart of this request), #1067 (different app,
    different scheme, same spirit)
Originally created by @PanCrucian on GitHub (Apr 19, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/2499 ### Summary The standalone **AmneziaWG** Android app (built from [amnezia-vpn/amneziawg-android](https://github.com/amnezia-vpn/amneziawg-android)) has no registered URL scheme and no inbound file-association intent-filter. Inspection of `ui/src/main/AndroidManifest.xml` shows `MainActivity` declares only `MAIN`/`LAUNCHER` and `QS_TILE_PREFERENCES`; there is no `<data android:scheme="..."/>`, no `ACTION_VIEW` filter for `text/plain` / `application/octet-stream` / `pathPattern=".*\.conf"`, and no App Links (`autoVerify="true"` + `.well-known/assetlinks.json`). Import today happens only through the in-app SAF flow: `MainActivity` launches `ACTION_OPEN_DOCUMENT`, then `TunnelImporter.importTunnel(contentResolver, uri, ...)` reads the file. There is no way for an external app or a browser download to route a `.conf` or a deep link into AmneziaWG directly. This is a sibling request to #2498 (iOS) and in the same spirit as #1067 (main Amnezia client, different codebase). The Android story is actually worse than iOS here: iOS at least declares a `.conf` document type, so the share sheet can route a file into AmneziaWG. Android has neither document-type nor scheme. ### Why Importing a fresh `.conf` on Android today forces users through a multi-step flow: 1. Save the `.conf` file to device storage 2. Open AmneziaWG 3. Tap `+` → "Import from file" 4. Pick the file via SAF Compare with apps that register an intent-filter: tap a `.conf` file in any source → Android offers "Open with AmneziaWG" → done. ### Proposed behavior Two complementary changes, either or both: 1. **Intent-filter for `.conf` import** in `MainActivity` (or a dedicated importer activity) — covers the `text/plain` / `application/octet-stream` / `pathPattern=".*\.conf"` cases so a tap on a `.conf` in any source routes into the app: ```xml <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="content" /> <data android:scheme="file" /> <data android:mimeType="application/octet-stream" /> <data android:mimeType="text/plain" /> </intent-filter> ``` Handler routes the incoming `Uri` into the existing `TunnelImporter.importTunnel(contentResolver, uri, ...)` path. 2. **Custom URL scheme** (e.g. `amneziawg://import?config=<base64url>` or `amneziawg://import?url=https://...`) via an additional intent-filter with `<data android:scheme="amneziawg"/>`. Same handler routes the scheme payload through `TunnelImporter`. Happy to open a draft PR against \`amneziawg-android\` if external contributions are accepted there (issues are disabled on that repo, so I'm filing here). ### Out of scope - App Links (https:// autoVerify) — would need assetlinks.json hosting by the Amnezia team, separate discussion. ### Platform - App: standalone AmneziaWG Android (not the main Amnezia VPN client) - Repo: amnezia-vpn/amneziawg-android - Related: #2498 (iOS counterpart of this request), #1067 (different app, different scheme, same spirit)
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/amnezia-client#1126
No description provided.