[GH-ISSUE #7056] [Feature]: Import AmneziaWG links and subscriptions as outbounds #6601

Open
opened 2026-11-07 14:33:26 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @lovexiaoyiyi on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/7056

Need to divert the amneziawg protocol through 3XU

Describe the solution you'd like

The current subscription links and outbound rules do not support importing amneziawa protocol links, and subscription links are also not supported

Alternatives you've considered

No response

Concrete use case

No response

Mockups, screenshots, or examples

No response

Which parts of the panel would this affect?

No response

Are you willing to help?

  • I'd like to implement this feature myself and open a PR.
  • I can help test once a PR is open.

Before submitting

  • I searched existing issues and this feature has not been requested.
  • This feature request is written in English.
Originally created by @lovexiaoyiyi on GitHub (Nov 3, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/7056 ### Is your feature request related to a problem? Need to divert the amneziawg protocol through 3XU ### Describe the solution you'd like The current subscription links and outbound rules do not support importing amneziawa protocol links, and subscription links are also not supported ### Alternatives you've considered _No response_ ### Concrete use case _No response_ ### Mockups, screenshots, or examples _No response_ ### Which parts of the panel would this affect? _No response_ ### Are you willing to help? - [ ] I'd like to implement this feature myself and open a PR. - [ ] I can help test once a PR is open. ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this feature has not been requested. - [x] This feature request is written in English.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 3, 2026):

This is a valid feature request. The panel can already serve AmneziaWG through subscriptions and has an AmneziaWG outbound you configure by hand. What it cannot do is import an AmneziaWG link, either pasted into the outbound form or pulled from an outbound subscription URL. That import path only understands vmess, vless, trojan, ss, hysteria2 and wireguard.

What the current code does:

  1. Serving AmneziaWG to clients already works. For each client of an AmneziaWG inbound, the subscription server builds a vpn:// link in the AmneziaVPN app's format (internal/sub/service.go:1248-1274):
    links = append(links, "vpn://"+base64.RawURLEncoding.EncodeToString([]byte(text)))
    
  2. The AmneziaWG outbound exists. In Xray Settings → Outbounds, add an outbound and pick protocol amneziawg (frontend/src/pages/xray/outbounds/protocols/amneziawg.tsx). Then copy the keys, endpoint and obfuscation parameters from your .conf file into the form. This is the workaround for now.
  3. Importing does not support AmneziaWG. The backend link parser, which outbound subscriptions also use through ParseSubscriptionBody (internal/util/link/outbound.go:68), handles only these schemes and rejects everything else (internal/util/link/outbound.go:165-181):
    case strings.HasPrefix(link, "wireguard://"), strings.HasPrefix(link, "wg://"):
        return parseWireguard(link)
    default:
        return nil, fmt.Errorf("unsupported link scheme")
    
    Lines it cannot parse are skipped without any message (outbound.go:69-71), so an outbound subscription made only of vpn:// lines produces no outbounds at all. The link box in the outbound form has the same limit (frontend/src/lib/xray/outbound-link-parser.ts:859-868): its parser chain ends at parseWireguardLink.

So even a vpn:// link from another 3x-ui panel cannot be imported as an outbound today. Adding this means adding a vpn:// parser that produces an amneziawg outbound, in both the Go parser and the frontend parser.

I changed the title to say what is missing (import of AmneziaWG links and subscriptions as outbounds) and fixed the "amneziawa" typo. The old title was "[Feature]: Support amneziawa protocol subscription".

Verdict: Feature request

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

<!-- gh-comment-id:6595781241 --> @github-actions[bot] commented on GitHub (Nov 3, 2026): This is a valid feature request. The panel can already **serve** AmneziaWG through subscriptions and has an AmneziaWG **outbound** you configure by hand. What it cannot do is **import** an AmneziaWG link, either pasted into the outbound form or pulled from an outbound subscription URL. That import path only understands vmess, vless, trojan, ss, hysteria2 and wireguard. What the current code does: 1. **Serving AmneziaWG to clients already works.** For each client of an AmneziaWG inbound, the subscription server builds a `vpn://` link in the AmneziaVPN app's format (`internal/sub/service.go:1248-1274`): ```go links = append(links, "vpn://"+base64.RawURLEncoding.EncodeToString([]byte(text))) ``` 2. **The AmneziaWG outbound exists.** In **Xray Settings → Outbounds**, add an outbound and pick protocol `amneziawg` (`frontend/src/pages/xray/outbounds/protocols/amneziawg.tsx`). Then copy the keys, endpoint and obfuscation parameters from your `.conf` file into the form. This is the workaround for now. 3. **Importing does not support AmneziaWG.** The backend link parser, which outbound subscriptions also use through `ParseSubscriptionBody` (`internal/util/link/outbound.go:68`), handles only these schemes and rejects everything else (`internal/util/link/outbound.go:165-181`): ```go case strings.HasPrefix(link, "wireguard://"), strings.HasPrefix(link, "wg://"): return parseWireguard(link) default: return nil, fmt.Errorf("unsupported link scheme") ``` Lines it cannot parse are skipped without any message (`outbound.go:69-71`), so an outbound subscription made only of `vpn://` lines produces no outbounds at all. The link box in the outbound form has the same limit (`frontend/src/lib/xray/outbound-link-parser.ts:859-868`): its parser chain ends at `parseWireguardLink`. So even a `vpn://` link from another 3x-ui panel cannot be imported as an outbound today. Adding this means adding a `vpn://` parser that produces an `amneziawg` outbound, in both the Go parser and the frontend parser. I changed the title to say what is missing (import of AmneziaWG links and subscriptions as outbounds) and fixed the "amneziawa" typo. The old title was "[Feature]: Support amneziawa protocol subscription". Verdict: Feature request *This reply was generated automatically; a maintainer may follow up.* <!-- claude-issue:analyst -->
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#6601
No description provided.