mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5376] [Feature]: Displaying Outgoing Connections in the Inbox tab and in subscriptions #3763
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#3763
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 @vrcher on GitHub (Jun 16, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5376
Is your feature request related to a problem?
I would like to use Outgoing Connections in my subscription, but there is no way to add it directly there. Currently, the only option is to add any incoming connection and configure routing through the settings panel to the desired outgoing server. This means that the traffic goes through my server.
Describe the solution you'd like
When adding Outgoing Connections or subscriptions, the option to check a box to display that connection in your subscription
Alternatives you've considered
Concrete use case
No response
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
Frontend (UI / panel pages), Subscription (share links / Clash / JSON)
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Jun 16, 2026):
This is a distinct feature from the existing outbound-subscription mechanism and does not exist in the current codebase.
What the current code does (for context)
The
OutboundSubscriptionService(internal/web/service/outbound_subscription.go) lets the admin import remote proxy lists and inject them as server-side Xray outbounds — traffic from clients still enters via an inbound, and Xray routes it through one of those outbounds. The client never sees the outbound config.The client-facing subscription path (
internal/sub/service.go,internal/sub/json_service.go) generates proxy links from inbound entries only. There is no code path that reads the panel's outbound objects and converts them to client-consumable share links.What this request adds
A way to mark one or more outbound entries so they appear directly in a client's subscription output (raw links, Clash YAML, or full JSON config), allowing the client to connect to that outbound server directly rather than routing through the panel's inbound→outbound chain.
Technical scope for an implementation PR
Marking outbounds for export. The outbound template blob in
xrayTemplateConfig(a raw JSON field in DB) currently has no "visible to subscription" flag. This would need either a new structured DB column on outbounds, or a convention (e.g. a tag suffix) that the sub service can detect. The UI infrontend/src/lib/xray/outbound-form-adapter.tsand the Outbounds panel form would need a corresponding toggle.Outbound-to-share-link conversion.
internal/sub/json_service.go:93callsparsedExternalOutbound(link)to convert a share link into an outbound JSON object. The reverse is needed here: take a VLESS/VMess/Trojan/Shadowsocks outbound object and serialize it back to the corresponding URI scheme. No such encoder exists in the currentinternal/sub/orinternal/util/link/packages; it would need to be written. Note thatdirect,block, SOCKS, HTTP proxy, and WireGuard outbounds do not have universally supported client-side URI formats, so the feature would likely cover only VLESS, VMess, Trojan, and Shadowsocks outbounds.Sub-service integration.
SubService.GetSubs(),SubJsonService.GetJson(), andClashService.GetClash()ininternal/sub/would each need a new code path to append the exported-outbound links alongside the inbound-derived links, scoped to the requesting client's subscription ID (or a separate flag).Subscription-imported outbounds. For outbounds that originally came from an
OutboundSubscriptionfetch, the original share links are not preserved — only the parsed outbound JSON is stored inLastFetchedOutbounds. Re-exporting them to clients would require re-encoding from JSON, which is the same problem as point 2.If you plan to open a PR, it would be helpful to include a design comment or draft PR that covers: (a) how the "visible to subscription" flag is stored, (b) which outbound protocols are in scope, and (c) whether the export targets all clients universally or is scoped per-client/per-subscription-ID.
This reply was generated automatically; a maintainer may follow up.