[GH-ISSUE #6774] [Feature]: Option to serve AmneziaWG in raw subscription as plain .conf or wireguard:// instead of vpn:// #4511

Open
opened 2026-10-31 20:40:09 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @agevlakh on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6774

Describe the bug

When an AmneziaWG client is exposed through the built-in subscription server, the raw (base64) endpoint emits a single line:

vpn://<base64 of the .conf>

vpn:// is Amnezia's own container scheme. It is understood by AmneziaVPN/AmneziaWG apps and by some third-party clients on Android, but a large share of subscription clients — in particular on iOS/macOS — do not implement it and silently skip the entry. When a subscription contains only AmneziaWG entries, the result is an apparently empty subscription with no diagnostic shown to the user.

The other endpoints are not a workaround:

  • JSON — AmneziaWG is intentionally omitted there (documented in docs/content/docs/en/config/subscription.mdx, see also #6410).
  • Clash/Mihomo — AmneziaWG is included, but the AWG 3.1 parameter set is emitted in a form that not every client applies correctly (see #6310 and "Actual behavior" below). Notably allowed-ips is not emitted at all, although the .conf contains AllowedIPs = 0.0.0.0/0, ::/0.

The exact same configuration, delivered as a plain [Interface]/[Peer] text file over the very same HTTPS host, imports and connects on every client tested — including those that fail on vpn://.

There is currently no panel option to serve AmneziaWG as a plain .conf or as a wireguard:// URI, so operators have to put a converting reverse proxy in front of the panel.

How to reproduce the problem

  1. Install a clean 3x-ui 3.9.0.
  2. Create an AmneziaWG inbound with the AWG 3.1 parameter set (Jc/Jmin/Jmax, S1–S4, H1–H4, I1, HeaderProtectionKey, RandomTrailers, ContentPaddingAddition, RekeyAfterTime, RekeyTimeout, RejectAfterTime, KeepaliveTimeout, MaxHandshakeAttempts, DisableCookies).
  3. Add one client, assign a subscription ID.
  4. Panel Settings → Subscription: enable the subscription server, set a domain with a valid certificate. JSON subscription may stay disabled.
  5. Fetch the raw subscription:
curl -s https://sub.example.com/<subPath>/<subId>
  1. Decode the response and observe that the whole payload is a single vpn:// line:
curl -s https://sub.example.com/<subPath>/<subId> | base64 -d
# vpn://W0ludGVyZmFjZV0KUHJpdmF0ZUtleSA9 ...
  1. Import this URL into a subscription client without vpn:// support (reproduced with an iOS client; the Android build of the same app works) → the entry is dropped and the subscription appears empty.
  2. Decode the inner payload into a plain .conf and serve it as text/plain from the same host:
curl -s https://sub.example.com/<subPath>/<subId> \
  | base64 -d | sed 's|^vpn://||' | base64 -d
  1. Import that URL into the same client → imports and connects successfully, traffic flows, Subscription-Userinfo is displayed correctly.

Expected behavior

The subscription server should be able to deliver AmneziaWG in a format that generic subscription clients can consume, without an external converting proxy.

Suggested options:

  1. A per-panel (or per-inbound) setting controlling how AmneziaWG/WireGuard clients are serialised in the raw subscription:

    Mode Output
    vpn:// current behaviour, default — preserves backward compatibility
    conf raw [Interface]/[Peer] text, identical to the downloadable .conf
    wireguard:// URI form (wireguard://<key>@host:port/?address=…&jc=…&h1=…), already understood by several clients
  2. Or a dedicated endpoint such as /<subPath>/<subId>.conf that always returns the plain configuration, so operators can hand platform-specific links to users.

  3. Optionally, User-Agent-aware selection, consistent with how raw/JSON/Clash are already auto-selected.

Additionally, allowed-ips should be emitted in the Clash/Mihomo output to match the .conf.

Actual behavior

Same server, same client configuration, three delivery methods:

Delivery Client A (Android build) Client B (iOS build)
raw subscription, vpn:// import OK, connect OK entry ignored, subscription empty
Clash/Mihomo YAML, type: wireguard + amnezia-wg-option: version: 3 import OK, connect OK import OK, handshake never completes
plain .conf (local file or HTTPS URL) OK OK

The panel returns byte-identical responses regardless of User-Agent (same status, same Content-Length, same body), so the transport and the panel-side generation are consistent; the problem is the serialisation format.

Two observations about the Clash/Mihomo output:

  • allowed-ips is not emitted, although the .conf contains AllowedIPs = 0.0.0.0/0, ::/0. Clients that expect it explicitly may end up without routes.
  • AWG 3.1 keys (header-protection-key, random-trailers, content-padding-addition, reject-after-time, rekey-after-time, rekey-timeout, keepalive-timeout, max-handshake-attempts, i1) are emitted, but a client that ignores unknown keys falls back to plain WireGuard / AWG 2.0 and is then dropped by a server with header protection enabled. Related: #6310.

Related issues: #6410 (AmneziaWG not handled in JSON subscription), #6310 (Clash subscription omits AmneziaWG entries), #5113 (AWG 2.0 support).

Relevant logs

No panel errors are produced — the panel returns HTTP 200 in all cases. The issue is the payload format, so the subscription responses are shown instead.

Raw subscription (identical for every User-Agent):


HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Content-Length: 1288
Profile-Title: base64:<redacted>
Profile-Update-Interval: 12
Subscription-Userinfo: upload=0; download=0; total=0; expire=0

dnBuOi8vVzBsdWRHVnlabUZqWlYw...


Decoded payload — one single line:


vpn://W0ludGVyZmFjZV0KUHJpdmF0ZUtleSA9 ...


Inner payload decoded (this exact text works when served as plain `text/plain`):


[Interface]
PrivateKey = <redacted>
Address = 10.8.1.x/32
DNS = 8.8.8.8, 8.8.4.4
MTU = 1280
Jc = 3
Jmin = 47
Jmax = 207
S1 = 73
S2 = 65
S3 = 48
S4 = 13
H1 = <redacted>
H2 = <redacted>
H3 = <redacted>
H4 = <redacted>
I1 = <r 48>
HeaderProtectionKey = <redacted>
ContentPaddingAddition = 16-52
RekeyAfterTime = 114-132
RekeyTimeout = 4-8
RejectAfterTime = 164-214
KeepaliveTimeout = 8-15
MaxHandshakeAttempts = 20-40
RandomTrailers = on
DisableCookies = on

[Peer]
PublicKey = <redacted>
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = <redacted>:443
PersistentKeepalive = 25


Clash/Mihomo endpoint for the same client (note the missing `allowed-ips`):


proxies:
- amnezia-wg-option:
    content-padding-addition: 16-52
    disable-cookies: true
    h1: '<redacted>'
    h2: '<redacted>'
    h3: '<redacted>'
    h4: '<redacted>'
    header-protection-key: <redacted>
    i1: <r 48>
    jc: 3
    jmax: 207
    jmin: 47
    keepalive-timeout: 8-15
    max-handshake-attempts: 20-40
    random-trailers: true
    reject-after-time: 164-214
    rekey-after-time: 114-132
    rekey-timeout: 4-8
    s1: 73
    s2: 65
    s3: 48
    s4: 13
    version: 3
  dns: [8.8.8.8, 8.8.4.4]
  ip: 10.8.1.x
  mtu: 1280
  name: awg-test
  persistent-keepalive: 25
  port: 443
  private-key: <redacted>
  public-key: <redacted>
  remote-dns-resolve: true
  server: <redacted>
  type: wireguard
  udp: true
proxy-groups:
- name: PROXY
  type: select
  proxies: [awg-test, DIRECT]
rules:
- MATCH,PROXY

Screenshots

Not applicable — this is not a UI bug. All relevant data is provided as text above.

3x-ui version

3.9.0

Xray-core version

26.9.30

How did you install 3x-ui?

install.sh script

Operating system

Alpine Linux 3.24.2 (x86_64)

Which parts of the panel are affected?

Subscription (share links / Clash / JSON)

Browser (only if it is a UI bug)

N/A

Is the panel behind a reverse proxy or CDN?

Yes — Nginx

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @agevlakh on GitHub (Oct 8, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6774 ### Describe the bug When an AmneziaWG client is exposed through the built-in subscription server, the raw (base64) endpoint emits a single line: ``` vpn://<base64 of the .conf> ``` `vpn://` is Amnezia's own container scheme. It is understood by AmneziaVPN/AmneziaWG apps and by some third-party clients on Android, but a large share of subscription clients — in particular on iOS/macOS — do not implement it and silently skip the entry. When a subscription contains only AmneziaWG entries, the result is an apparently empty subscription with no diagnostic shown to the user. The other endpoints are not a workaround: - **JSON** — AmneziaWG is intentionally omitted there (documented in `docs/content/docs/en/config/subscription.mdx`, see also #6410). - **Clash/Mihomo** — AmneziaWG is included, but the AWG 3.1 parameter set is emitted in a form that not every client applies correctly (see #6310 and "Actual behavior" below). Notably `allowed-ips` is not emitted at all, although the `.conf` contains `AllowedIPs = 0.0.0.0/0, ::/0`. The exact same configuration, delivered as a plain `[Interface]`/`[Peer]` text file over the very same HTTPS host, imports and connects on every client tested — including those that fail on `vpn://`. There is currently no panel option to serve AmneziaWG as a plain `.conf` or as a `wireguard://` URI, so operators have to put a converting reverse proxy in front of the panel. ### How to reproduce the problem 1. Install a clean 3x-ui 3.9.0. 2. Create an AmneziaWG inbound with the AWG 3.1 parameter set (`Jc/Jmin/Jmax`, `S1–S4`, `H1–H4`, `I1`, `HeaderProtectionKey`, `RandomTrailers`, `ContentPaddingAddition`, `RekeyAfterTime`, `RekeyTimeout`, `RejectAfterTime`, `KeepaliveTimeout`, `MaxHandshakeAttempts`, `DisableCookies`). 3. Add one client, assign a subscription ID. 4. Panel Settings → Subscription: enable the subscription server, set a domain with a valid certificate. JSON subscription may stay disabled. 5. Fetch the raw subscription: ```bash curl -s https://sub.example.com/<subPath>/<subId> ``` 6. Decode the response and observe that the whole payload is a single `vpn://` line: ```bash curl -s https://sub.example.com/<subPath>/<subId> | base64 -d # vpn://W0ludGVyZmFjZV0KUHJpdmF0ZUtleSA9 ... ``` 7. Import this URL into a subscription client without `vpn://` support (reproduced with an iOS client; the Android build of the same app works) → the entry is dropped and the subscription appears empty. 8. Decode the inner payload into a plain `.conf` and serve it as `text/plain` from the same host: ```bash curl -s https://sub.example.com/<subPath>/<subId> \ | base64 -d | sed 's|^vpn://||' | base64 -d ``` 9. Import that URL into the same client → imports and connects successfully, traffic flows, `Subscription-Userinfo` is displayed correctly. ### Expected behavior The subscription server should be able to deliver AmneziaWG in a format that generic subscription clients can consume, without an external converting proxy. Suggested options: 1. A per-panel (or per-inbound) setting controlling how AmneziaWG/WireGuard clients are serialised in the raw subscription: | Mode | Output | |---|---| | `vpn://` | current behaviour, default — preserves backward compatibility | | `conf` | raw `[Interface]`/`[Peer]` text, identical to the downloadable `.conf` | | `wireguard://` | URI form (`wireguard://<key>@host:port/?address=…&jc=…&h1=…`), already understood by several clients | 2. Or a dedicated endpoint such as `/<subPath>/<subId>.conf` that always returns the plain configuration, so operators can hand platform-specific links to users. 3. Optionally, User-Agent-aware selection, consistent with how raw/JSON/Clash are already auto-selected. Additionally, `allowed-ips` should be emitted in the Clash/Mihomo output to match the `.conf`. ### Actual behavior Same server, same client configuration, three delivery methods: | Delivery | Client A (Android build) | Client B (iOS build) | |---|---|---| | raw subscription, `vpn://` | import OK, connect OK | **entry ignored, subscription empty** | | Clash/Mihomo YAML, `type: wireguard` + `amnezia-wg-option: version: 3` | import OK, connect OK | import OK, **handshake never completes** | | plain `.conf` (local file or HTTPS URL) | OK | **OK** | The panel returns byte-identical responses regardless of User-Agent (same status, same `Content-Length`, same body), so the transport and the panel-side generation are consistent; the problem is the serialisation format. Two observations about the Clash/Mihomo output: - `allowed-ips` is not emitted, although the `.conf` contains `AllowedIPs = 0.0.0.0/0, ::/0`. Clients that expect it explicitly may end up without routes. - AWG 3.1 keys (`header-protection-key`, `random-trailers`, `content-padding-addition`, `reject-after-time`, `rekey-after-time`, `rekey-timeout`, `keepalive-timeout`, `max-handshake-attempts`, `i1`) are emitted, but a client that ignores unknown keys falls back to plain WireGuard / AWG 2.0 and is then dropped by a server with header protection enabled. Related: #6310. Related issues: #6410 (AmneziaWG not handled in JSON subscription), #6310 (Clash subscription omits AmneziaWG entries), #5113 (AWG 2.0 support). ### Relevant logs ```shell No panel errors are produced — the panel returns HTTP 200 in all cases. The issue is the payload format, so the subscription responses are shown instead. Raw subscription (identical for every User-Agent): HTTP/1.1 200 OK Content-Type: text/plain; charset=utf-8 Content-Length: 1288 Profile-Title: base64:<redacted> Profile-Update-Interval: 12 Subscription-Userinfo: upload=0; download=0; total=0; expire=0 dnBuOi8vVzBsdWRHVnlabUZqWlYw... Decoded payload — one single line: vpn://W0ludGVyZmFjZV0KUHJpdmF0ZUtleSA9 ... Inner payload decoded (this exact text works when served as plain `text/plain`): [Interface] PrivateKey = <redacted> Address = 10.8.1.x/32 DNS = 8.8.8.8, 8.8.4.4 MTU = 1280 Jc = 3 Jmin = 47 Jmax = 207 S1 = 73 S2 = 65 S3 = 48 S4 = 13 H1 = <redacted> H2 = <redacted> H3 = <redacted> H4 = <redacted> I1 = <r 48> HeaderProtectionKey = <redacted> ContentPaddingAddition = 16-52 RekeyAfterTime = 114-132 RekeyTimeout = 4-8 RejectAfterTime = 164-214 KeepaliveTimeout = 8-15 MaxHandshakeAttempts = 20-40 RandomTrailers = on DisableCookies = on [Peer] PublicKey = <redacted> AllowedIPs = 0.0.0.0/0, ::/0 Endpoint = <redacted>:443 PersistentKeepalive = 25 Clash/Mihomo endpoint for the same client (note the missing `allowed-ips`): proxies: - amnezia-wg-option: content-padding-addition: 16-52 disable-cookies: true h1: '<redacted>' h2: '<redacted>' h3: '<redacted>' h4: '<redacted>' header-protection-key: <redacted> i1: <r 48> jc: 3 jmax: 207 jmin: 47 keepalive-timeout: 8-15 max-handshake-attempts: 20-40 random-trailers: true reject-after-time: 164-214 rekey-after-time: 114-132 rekey-timeout: 4-8 s1: 73 s2: 65 s3: 48 s4: 13 version: 3 dns: [8.8.8.8, 8.8.4.4] ip: 10.8.1.x mtu: 1280 name: awg-test persistent-keepalive: 25 port: 443 private-key: <redacted> public-key: <redacted> remote-dns-resolve: true server: <redacted> type: wireguard udp: true proxy-groups: - name: PROXY type: select proxies: [awg-test, DIRECT] rules: - MATCH,PROXY ``` ### Screenshots Not applicable — this is not a UI bug. All relevant data is provided as text above. ### 3x-ui version 3.9.0 ### Xray-core version 26.9.30 ### How did you install 3x-ui? install.sh script ### Operating system Alpine Linux 3.24.2 (x86_64) ### Which parts of the panel are affected? Subscription (share links / Clash / JSON) ### Browser (only if it is a UI bug) N/A ### Is the panel behind a reverse proxy or CDN? Yes — Nginx ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
Author
Owner

@github-actions[bot] commented on GitHub (Oct 8, 2026):

This is a feature request, not a bug. The raw subscription wraps AmneziaWG in vpn:// on purpose, and the panel has no setting for another format. Adding a plain .conf or wireguard:// mode would be new functionality, so I have relabelled the issue enhancement. I also retitled it from "[Bug]: AmneziaWG in raw subscription is wrapped in vpn://, which many clients cannot parse — no option to serve plain .conf" so the title names the request.

Why vpn:// is the current output

genAmneziaWGLink in internal/sub/service.go:1072-1101 builds the .conf text and always wraps it:

// genAmneziaWGLink builds a per-client vpn://<base64url .conf text> share
// link matching the real AmneziaVPN app's own share-link scheme (see the
...
links = append(links, "vpn://"+base64.RawURLEncoding.EncodeToString([]byte(text)))

The UI builder it mirrors gives the reason, at frontend/src/lib/xray/inbound-link.ts:1062-1067: "Confirmed against the app's own source (importController.cpp's checkConfigFormat/extractWireGuardConfig)". The tests internal/sub/service_amneziawg_test.go:17-45 (TestGenAmneziaWGLinkFields) and internal/sub/export_all_links_test.go:206 fail on any link without the vpn:// prefix. Nothing in the code selects a different scheme. The controller's User-Agent switching (internal/sub/controller.go:311-313) only chooses between raw, Clash and JSON. It never changes how an AmneziaWG link is written inside the raw output.

Plain WireGuard inbounds already get a wireguard:// URI (internal/sub/service.go:963), so a URI form exists in the code, but only for plain WireGuard. Any alternative mode for AmneziaWG would also need a matching change in the UI builder (frontend/src/lib/xray/inbound-link.ts) and in docs/lib/xray/, or the three link generators would start producing different output.

The two Clash/Mihomo points

  1. allowed-ips: you are right that buildAmneziaWGProxy (internal/sub/clash_service.go:755-903) never sets it. It emits ip/ipv6, mtu, dns and amnezia-wg-option, and nothing else for routing. Whether that matters depends on what the client does when the key is missing. I believe mihomo then routes everything (0.0.0.0/0, ::/0), but that is an inference: mihomo's source is not in this repository, so I could not check it. If a specific client actually loses its routes without the key, please post that client's name and version as text.
  2. The handshake failing on the iOS client: the panel sends every AWG 3.1 key and sets version: 3 whenever one of them is present (clash_service.go:857-896). A client that drops keys it does not know is a limitation of that client, not something the panel generates wrongly. I could not confirm which client you used, because the report does not name it.

Until something like this exists, your current approach (a reverse proxy that decodes the vpn:// payload and serves it as plain text) is the only way to do it without changing code. The decoded text is exactly what amneziaWGConfigText (internal/sub/service.go:983) produces.

Related: #6310 (closed, Clash omitting AmneziaWG) and #6410 (closed, JSON subscription). Neither is a duplicate; this request is about the raw scheme.

Verdict: Feature request

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:6071076909 --> @github-actions[bot] commented on GitHub (Oct 8, 2026): This is a feature request, not a bug. The raw subscription wraps AmneziaWG in `vpn://` on purpose, and the panel has no setting for another format. Adding a plain `.conf` or `wireguard://` mode would be new functionality, so I have relabelled the issue `enhancement`. I also retitled it from "[Bug]: AmneziaWG in raw subscription is wrapped in vpn://, which many clients cannot parse — no option to serve plain .conf" so the title names the request. **Why `vpn://` is the current output** `genAmneziaWGLink` in `internal/sub/service.go:1072-1101` builds the `.conf` text and always wraps it: ```go // genAmneziaWGLink builds a per-client vpn://<base64url .conf text> share // link matching the real AmneziaVPN app's own share-link scheme (see the ... links = append(links, "vpn://"+base64.RawURLEncoding.EncodeToString([]byte(text))) ``` The UI builder it mirrors gives the reason, at `frontend/src/lib/xray/inbound-link.ts:1062-1067`: "Confirmed against the app's own source (importController.cpp's checkConfigFormat/extractWireGuardConfig)". The tests `internal/sub/service_amneziawg_test.go:17-45` (`TestGenAmneziaWGLinkFields`) and `internal/sub/export_all_links_test.go:206` fail on any link without the `vpn://` prefix. Nothing in the code selects a different scheme. The controller's User-Agent switching (`internal/sub/controller.go:311-313`) only chooses between raw, Clash and JSON. It never changes how an AmneziaWG link is written inside the raw output. Plain WireGuard inbounds already get a `wireguard://` URI (`internal/sub/service.go:963`), so a URI form exists in the code, but only for plain WireGuard. Any alternative mode for AmneziaWG would also need a matching change in the UI builder (`frontend/src/lib/xray/inbound-link.ts`) and in `docs/lib/xray/`, or the three link generators would start producing different output. **The two Clash/Mihomo points** 1. `allowed-ips`: you are right that `buildAmneziaWGProxy` (`internal/sub/clash_service.go:755-903`) never sets it. It emits `ip`/`ipv6`, `mtu`, `dns` and `amnezia-wg-option`, and nothing else for routing. Whether that matters depends on what the client does when the key is missing. I believe mihomo then routes everything (`0.0.0.0/0, ::/0`), but that is an inference: mihomo's source is not in this repository, so I could not check it. If a specific client actually loses its routes without the key, please post that client's name and version as text. 2. The handshake failing on the iOS client: the panel sends every AWG 3.1 key and sets `version: 3` whenever one of them is present (`clash_service.go:857-896`). A client that drops keys it does not know is a limitation of that client, not something the panel generates wrongly. I could not confirm which client you used, because the report does not name it. Until something like this exists, your current approach (a reverse proxy that decodes the `vpn://` payload and serves it as plain text) is the only way to do it without changing code. The decoded text is exactly what `amneziaWGConfigText` (`internal/sub/service.go:983`) produces. Related: #6310 (closed, Clash omitting AmneziaWG) and #6410 (closed, JSON subscription). Neither is a duplicate; this request is about the raw scheme. Verdict: Feature request *This reply was generated automatically; a maintainer may follow up.* <!-- claude-issue:analyst -->
Author
Owner

@agevlakh commented on GitHub (Oct 9, 2026):

Thanks for the triage — agreed, "enhancement" is the right label.

Client details (omitted in the original report, sorry):

  • iOS: INCY 2.6.2 (App Store), UA INCY/2.6.2/ios CFNetwork/3860.300.31 Darwin/25.2.0, iPhone/iPad on iOS/iPadOS 18.7
  • Android: INCY 3.7.0, UA INCY/3.7.0/android Dalvik/2.1.0

Same subscription URL, same server, same AmneziaWG 3.1 inbound:

Delivery INCY 3.7.0 (Android) INCY 2.6.2 (iOS)
raw subscription, vpn:// import OK, connect OK entry ignored, subscription appears empty
Clash/Mihomo YAML import OK, connect OK import OK, handshake never completes
plain .conf (file or HTTPS URL) OK OK

On the handshake: agreed that a client silently dropping unknown keys is a client-side limitation. I have filed it separately with the INCY developers: . This request is only about the raw scheme.

On scope: thanks for pointing at service.go:963 — plain WireGuard already gets a wireguard:// URI, so the URI path exists. From an operator's point of view the smallest useful change would be either:

  1. a subscription setting AmneziaWG link format: vpn:// (default) | conf | wireguard://, or
  2. a dedicated endpoint, e.g. /<subPath>/<subId>.conf, always returning amneziaWGConfigText output unchanged.

Option 2 looks the least invasive: it would not touch genAmneziaWGLink, would not break TestGenAmneziaWGLinkFields / export_all_links_test.go, and would not require matching changes in frontend/src/lib/xray/inbound-link.ts or docs/lib/xray/, since the existing three generators keep producing identical output.

For reference, my current workaround is exactly what you described: a reverse proxy that matches ^INCY/[0-9.]+/(ios|ipados|mac) on the User-Agent, fetches the raw subscription from the panel, decodes the vpn:// payload and serves it as text/plain, forwarding Profile-Title, Profile-Update-Interval and Subscription-Userinfo. It works and traffic accounting is unaffected, but it only handles subscriptions containing a single AmneziaWG entry, since a .conf cannot express multiple servers. Happy to test a branch if one appears.

<!-- gh-comment-id:6075805937 --> @agevlakh commented on GitHub (Oct 9, 2026): Thanks for the triage — agreed, "enhancement" is the right label. **Client details** (omitted in the original report, sorry): - iOS: **INCY 2.6.2** (App Store), UA `INCY/2.6.2/ios CFNetwork/3860.300.31 Darwin/25.2.0`, iPhone/iPad on iOS/iPadOS 18.7 - Android: **INCY 3.7.0**, UA `INCY/3.7.0/android Dalvik/2.1.0` Same subscription URL, same server, same AmneziaWG 3.1 inbound: | Delivery | INCY 3.7.0 (Android) | INCY 2.6.2 (iOS) | |---|---|---| | raw subscription, `vpn://` | import OK, connect OK | entry ignored, subscription appears empty | | Clash/Mihomo YAML | import OK, connect OK | import OK, handshake never completes | | plain `.conf` (file or HTTPS URL) | OK | **OK** | **On the handshake:** agreed that a client silently dropping unknown keys is a client-side limitation. I have filed it separately with the INCY developers: <link to the INCY issue>. This request is only about the raw scheme. **On scope:** thanks for pointing at `service.go:963` — plain WireGuard already gets a `wireguard://` URI, so the URI path exists. From an operator's point of view the smallest useful change would be either: 1. a subscription setting `AmneziaWG link format: vpn:// (default) | conf | wireguard://`, or 2. a dedicated endpoint, e.g. `/<subPath>/<subId>.conf`, always returning `amneziaWGConfigText` output unchanged. Option 2 looks the least invasive: it would not touch `genAmneziaWGLink`, would not break `TestGenAmneziaWGLinkFields` / `export_all_links_test.go`, and would not require matching changes in `frontend/src/lib/xray/inbound-link.ts` or `docs/lib/xray/`, since the existing three generators keep producing identical output. For reference, my current workaround is exactly what you described: a reverse proxy that matches `^INCY/[0-9.]+/(ios|ipados|mac)` on the User-Agent, fetches the raw subscription from the panel, decodes the `vpn://` payload and serves it as `text/plain`, forwarding `Profile-Title`, `Profile-Update-Interval` and `Subscription-Userinfo`. It works and traffic accounting is unaffected, but it only handles subscriptions containing a single AmneziaWG entry, since a `.conf` cannot express multiple servers. Happy to test a branch if one appears.
Sign in to join this conversation.
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
MHSanaei/3x-ui#4511
No description provided.