[GH-ISSUE #3298] [Feature Request] Support for URL-based Subscriptions with Auto-Update (v2rayN/Hiddify/Happ standard) #3165

Open
opened 2026-10-25 04:14:48 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @deyzaneck on GitHub (Oct 18, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3298

### Summary

We propose adding native support for
**URL-based configuration subscriptions** to
the AmneziaVPN client, following the de-facto
ecosystem standard established by clients
like Happ, Incy, v2rayN/v2rayNG, Hiddify, and
Sing-box.

Currently, configurations in AmneziaVPN must
be imported individually (one `vpn://` key,
file, or QR code at a time). For
administrators managing multiple servers or
adjusting endpoints during ongoing ISP/DPI
blocks, this creates severe manual overhead.

---

### Background & Technical Context

In the current client architecture:
1. **Self-hosted configs are completely
static:** There is no mechanism for an
administrator to push updated endpoints (IPs,
ports, or AmneziaWG obfuscation parameters
like `Jc`/`Jmin`/`Jmax`/`H1`-`H4`) to
end-users without manually issuing new keys.
2. **Legacy API v1 was deprecated:** The
historical `api_endpoint` field in JSON
configs is now rejected with
`ErrorCode::LegacyApiV1NotSupportedError` in
`importController.cpp`.
3. **Amnezia Gateway v2/v3 is proprietary &
hardcoded:** The modern auto-updating
subsystem (`SubscriptionController` +
`libagw`) relies on hardcoded keys and
endpoints (`PROD_AGW_PUBLIC_KEY`,
`PROD_S3_ENDPOINT` in `CMakeLists.txt`) and
is restricted to `amnezia-premium`,
`amnezia-free`, and `external-premium`.
Self-hosted admins and third-party community
providers cannot use it.

Introducing a standard HTTP(S) subscription
mechanism solves this cleanly without
burdening Amnezia's own gateway
infrastructure.

---

### Proposed Solution & Specifications

#### 1. Import Mechanism
* **Input:** Allow importing via HTTPS URL
(pasting URL, scanning a subscription QR
code, or opening via Deeplink).
* **Deeplink:** Support 1-click import via
custom scheme, e.g.:

`amnezia://import-sub?url=https%3A%2F%2Fexamp
le.com%2Fsub`
* **Grouping:** Imported servers should
automatically be grouped under the
subscription name in the UI.

#### 2. Subscription Payload Format
* A standard HTTP(S) `GET` endpoint returning
a list of configurations (plain text or
standard Base64-encoded, newline-separated):
 * `vpn://...` connection strings.
 * Native AmneziaWG / AmneziaXRay (VLESS)
JSON blocks or WireGuard configs.

#### 3. Standard HTTP Headers Support
Adopt standard subscription metadata headers
widely supported across clients:
* **`profile-title`** (or
`Content-Disposition: filename=...`): Display
name of the subscription / server group.
* **`profile-update-interval`**: Recommended
auto-refresh interval in hours (e.g. `12` or
`24`).
* **`subscription-userinfo`**: Key-value
pairs for quota and validity:
 `upload=1073741824; download=5368709120;
total=107374182400; expire=1735689600`
 *(Used to render remaining data transfer
and subscription expiration date in the UI).*
* **`profile-web-page-url`**: URL to user
billing/dashboard.
* **`support-url`**: URL to support
channel/bot.

#### 4. Synchronization & Update Lifecycle
* **Update triggers:**
 * Automatically on application startup.
 * Periodically in the background via a
timer derived from `profile-update-interval`.
 * On-demand via a manual "Refresh
Subscription" button in the UI.
* **Diff reconciliation:**
 * Servers removed from the subscription URL
should be deleted or marked inactive.
 * Newly added servers are registered into
the subscription group.
 * Modified endpoints (changed IP, port, or
AWG parameters) are updated in-place without
breaking client-side custom settings (like
split tunneling rules).

#### 5. User Management & Controls
* Option to rename the subscription group.
* Toggle to enable/disable background
auto-updates.
* Option to delete the entire subscription
and all associated profiles in one click.

---

### Why This Matters

1. **Anti-Censorship Agility:** In
high-censorship environments (e.g., TSPU/RKN
in Russia, Iran, China), server IPs and ports
are blocked rapidly. Administrators can
change endpoints on the backend, and all
clients update seamlessly without user
intervention.
2. **Simplified User Experience:**
Non-technical family members and friends only
need to import a link once; they no longer
need to import new QR codes every time an IP
is rotated.
3. **Familiarity & Lower Barrier to Entry:**
Users migrating from Happ, Incy, Hiddify, or
v2rayN are already accustomed to subscription
links. Adding this feature makes AmneziaVPN
significantly more user-friendly and
competitive.

---

### Alternatives Considered

Currently, the only alternative is manual
re-distribution of `vpn://` strings or
`.conf` files via messenger apps whenever an
IP is blocked or a parameter changes, which
is unsustainable for multi-user setups.
Originally created by @deyzaneck on GitHub (Oct 18, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3298 ```markdown ### Summary We propose adding native support for **URL-based configuration subscriptions** to the AmneziaVPN client, following the de-facto ecosystem standard established by clients like Happ, Incy, v2rayN/v2rayNG, Hiddify, and Sing-box. Currently, configurations in AmneziaVPN must be imported individually (one `vpn://` key, file, or QR code at a time). For administrators managing multiple servers or adjusting endpoints during ongoing ISP/DPI blocks, this creates severe manual overhead. --- ### Background & Technical Context In the current client architecture: 1. **Self-hosted configs are completely static:** There is no mechanism for an administrator to push updated endpoints (IPs, ports, or AmneziaWG obfuscation parameters like `Jc`/`Jmin`/`Jmax`/`H1`-`H4`) to end-users without manually issuing new keys. 2. **Legacy API v1 was deprecated:** The historical `api_endpoint` field in JSON configs is now rejected with `ErrorCode::LegacyApiV1NotSupportedError` in `importController.cpp`. 3. **Amnezia Gateway v2/v3 is proprietary & hardcoded:** The modern auto-updating subsystem (`SubscriptionController` + `libagw`) relies on hardcoded keys and endpoints (`PROD_AGW_PUBLIC_KEY`, `PROD_S3_ENDPOINT` in `CMakeLists.txt`) and is restricted to `amnezia-premium`, `amnezia-free`, and `external-premium`. Self-hosted admins and third-party community providers cannot use it. Introducing a standard HTTP(S) subscription mechanism solves this cleanly without burdening Amnezia's own gateway infrastructure. --- ### Proposed Solution & Specifications #### 1. Import Mechanism * **Input:** Allow importing via HTTPS URL (pasting URL, scanning a subscription QR code, or opening via Deeplink). * **Deeplink:** Support 1-click import via custom scheme, e.g.: `amnezia://import-sub?url=https%3A%2F%2Fexamp le.com%2Fsub` * **Grouping:** Imported servers should automatically be grouped under the subscription name in the UI. #### 2. Subscription Payload Format * A standard HTTP(S) `GET` endpoint returning a list of configurations (plain text or standard Base64-encoded, newline-separated): * `vpn://...` connection strings. * Native AmneziaWG / AmneziaXRay (VLESS) JSON blocks or WireGuard configs. #### 3. Standard HTTP Headers Support Adopt standard subscription metadata headers widely supported across clients: * **`profile-title`** (or `Content-Disposition: filename=...`): Display name of the subscription / server group. * **`profile-update-interval`**: Recommended auto-refresh interval in hours (e.g. `12` or `24`). * **`subscription-userinfo`**: Key-value pairs for quota and validity: `upload=1073741824; download=5368709120; total=107374182400; expire=1735689600` *(Used to render remaining data transfer and subscription expiration date in the UI).* * **`profile-web-page-url`**: URL to user billing/dashboard. * **`support-url`**: URL to support channel/bot. #### 4. Synchronization & Update Lifecycle * **Update triggers:** * Automatically on application startup. * Periodically in the background via a timer derived from `profile-update-interval`. * On-demand via a manual "Refresh Subscription" button in the UI. * **Diff reconciliation:** * Servers removed from the subscription URL should be deleted or marked inactive. * Newly added servers are registered into the subscription group. * Modified endpoints (changed IP, port, or AWG parameters) are updated in-place without breaking client-side custom settings (like split tunneling rules). #### 5. User Management & Controls * Option to rename the subscription group. * Toggle to enable/disable background auto-updates. * Option to delete the entire subscription and all associated profiles in one click. --- ### Why This Matters 1. **Anti-Censorship Agility:** In high-censorship environments (e.g., TSPU/RKN in Russia, Iran, China), server IPs and ports are blocked rapidly. Administrators can change endpoints on the backend, and all clients update seamlessly without user intervention. 2. **Simplified User Experience:** Non-technical family members and friends only need to import a link once; they no longer need to import new QR codes every time an IP is rotated. 3. **Familiarity & Lower Barrier to Entry:** Users migrating from Happ, Incy, Hiddify, or v2rayN are already accustomed to subscription links. Adding this feature makes AmneziaVPN significantly more user-friendly and competitive. --- ### Alternatives Considered Currently, the only alternative is manual re-distribution of `vpn://` strings or `.conf` files via messenger apps whenever an IP is blocked or a parameter changes, which is unsustainable for multi-user setups. ```
Author
Owner

@Vitalik93 commented on GitHub (Oct 18, 2026):

https://github.com/amnezia-vpn/amnezia-client/issues/3292

<!-- gh-comment-id:6252114636 --> @Vitalik93 commented on GitHub (Oct 18, 2026): https://github.com/amnezia-vpn/amnezia-client/issues/3292
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#3165
No description provided.