mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5293] [Feature]: Support appending external subscription links in Inbound/Client configurations to enable "Merged Subscriptions" delivery #3707
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3707
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xingshuwen03-prog on GitHub (Jun 13, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5293
Is your feature request related to a problem?
As a panel admin, I want to provide a SINGLE subscription URL to my users for the best experience.
However, besides the nodes generated by 3X-UI, I also have completely independent external subscription URLs (For example, a ready-to-use subscription link like: https://example.com/sub?token=xxxxxx, which contains Cloudflare preferred IPs or other backup nodes).
Currently, users have to add two separate subscription links in their clients (one for 3X-UI, one for the external URL). This is very confusing for non-technical users.
To be absolutely clear: I do NOT need 3X-UI to manage, parse, or test these external nodes. They are just raw proxy links hosted elsewhere. I just want to merge them into the 3X-UI subscription delivery at the Inbound level.
Describe the solution you'd like
I request a very simple, lightweight "Subscription Concatenation" feature bound to specific Inbounds
UI Layout:
In the Add/Edit Inbound modal, add a simple text area named: "Append External Subscription URLs (One per line)".
Describe the solution you'd like
I request a very simple "Subscription Merge" feature bound to specific Inbounds.
UI Layout:
In the Add/Edit Inbound modal, add a simple text area named: "Append External Subscription URLs (One per line)".
When a client requests their subscription update, the panel identifies which inbounds the client is bound to.
The panel generates the proxy links for these local inbounds as usual.
The panel checks if any of these authorized inbounds have "External Subscription URLs" configured.
If so, the panel fetches the proxy links from those external URLs.
The panel merges the fetched external links with the local ones and delivers them together as ONE single subscription to the client.
This feature will be very useful
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?
Frontend (UI / panel pages), Backend (API endpoints, login, settings), Subscription (share links / Clash / JSON)
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Jun 13, 2026):
This feature does not exist today. The following is a precise description of what would need to change, based on reading the source.
What the current subscription pipeline does
When a client fetches their subscription URL,
GetSubs()ininternal/sub/service.goqueries the database for every enabled inbound whoseclient_inboundstable contains the client'ssub_id, then callsGetLink()to build one or more proxy URI strings per inbound. There is no step that reaches out to an external URL. The same pipeline is used for the Clash (GetClash()) and JSON (GetJson()) subscription flavors.The
Inboundmodel (internal/database/model/model.go) has no field for external subscription URLs. TheOutboundSubscriptionmodel that already exists in the code is an entirely different subsystem — it fetches remote subscriptions to populate Xray outbound routing rules, not to append proxy links to client-facing subscriptions.What implementation would require
Schema change — A new persisted field (or a separate table) on
Inboundto store one or more external subscription URLs per inbound. The inbound'sSettings/StreamSettingscolumns are Xray config blobs and are not an appropriate place for panel-only metadata.Backend change —
GetSubs()(and the analogous loops inSubJsonService.GetJson()andSubClashService.GetClash()) would need to, for each inbound that has external URLs configured, issue an outbound HTTP request, parse the response as a base64-encoded newline-separated link list, and concatenate the result with the locally generated links.Request-time HTTP fetching — Fetching external URLs synchronously on every client subscription refresh carries latency, timeout, and availability risk. Caching the fetched content (similar to how
OutboundSubscriptionworks withLastFetchedOutboundsand a background refresh job) is the more robust approach, but adds further complexity.Security — Because the panel would be making outbound HTTP requests to URLs controlled by the admin, a SSRF (Server-Side Request Forgery) risk exists if access to the panel's configuration is ever compromised. Any implementation would need to document this clearly.
Frontend change — The inbound add/edit modal in
frontend/src/would need the new textarea field, validation, and storage.Summary
This is a valid and coherent feature request. The scope is moderate: schema migration, backend subscription-building changes across all three output formats (plain, JSON, Clash), a background-fetch layer to avoid per-request latency, and frontend UI changes. There is no code in the repository that partially satisfies this request today.
If you plan to open a PR, the most relevant files to study are
internal/sub/service.go(GetSubs),internal/sub/json_service.go(GetJson),internal/sub/clash_service.go(GetClash),internal/database/model/model.go(Inboundstruct),internal/web/service/outbound_subscription.go(reference for the background-fetch pattern), andinternal/database/db.go(migration registration).This reply was generated automatically; a maintainer may follow up.