mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #5253] [Feature]: Allow making dummy inbound #3679
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#3679
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 @X-Oracle on GitHub (Jun 13, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5253
Is your feature request related to a problem?
Hi there, glad to see you are active these days.
The purpose of this feature is to add inbounds which are for other panels but we don't want to be added to x-ray inbounds, use resources, allocate port.
Describe the solution you'd like
The solution I think of is a flag for the inbound which if enabled the inbound Uri can be generated in sub just like before and the address and port can be given with external proxy section. but the inbound wouldn't be added to the panels x-ray core inbounds thus preventing the x-ray core from allocating useless resources or ports of the server.
It is a kind of usage I use because of powerful subscription generation of x-ui. Right now I'm achieving this by adding inbound to local host and dummy TLS certificates but adding real IP and port in external ports.
Alternatives you've considered
No response
Concrete use case
For example adding inbound for a 3rd party panel like BPB. Which their core are not configurable by 3x-ui panel or node services.
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
Frontend (UI / panel pages), Backend (API endpoints, login, settings), Xray config generation, Subscription (share links / Clash / JSON), Database / migrations
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Jun 13, 2026):
This feature does not exist today, but the codebase already contains the two pieces needed to make it work — a new boolean field on
Inboundand a one-line guard inGetXrayConfigwould be enough for the back end.What the code currently does
internal/web/service/xray.go(GetXrayConfig, lines 128–134) iterates all inbounds and skips three categories before adding them to the xray-core config it writes to disk:There is no "subscription-only" or "skip-from-xray" flag. If an inbound is enabled and local, it is always pushed to xray-core.
How
externalProxyalready partially addresses the address sidestreamSettings.externalProxyis an existing 3x-ui extension (seeinternal/sub/service.go:463and relatedbuildVmessExternalProxyLinks/genVlessLinkhelpers). When present, the subscription generator emits the external addresses instead of the inbound's ownlisten:port. The field is intentionally stripped before the config reaches xray-core (xray.go:249), so it is already safe to put third-party addresses there. TheexternalProxyfeature handles the address-rewriting part of what you are asking for; only the "don't create a local listener" part is missing.What implementing this feature would require
internal/database/model/model.go— add a new boolean field toInbound, for exampleSubscriptionOnly bool. A GORM migration is also required.internal/web/service/xray.go:128— addif inbound.SubscriptionOnly { continue }alongside the existing guards.internal/sub/service.go:276(getInboundsBySubId) — the existing query already includes all enabled local inbounds with a matchingsub_id; subscription-only inbounds would be included naturally since the query does not filter on any "local vs. remote" criterion.No changes to Xray's config schema are needed because the inbound simply does not appear in the generated config at all.
Current workaround
Your existing approach — binding the inbound to
127.0.0.1on a throwaway port and setting the real address/port inexternalProxy— does produce correct subscription links today. The only downside is that xray-core still allocates the loopback listener and the associated routing/stats objects for that port. The feature request would eliminate that overhead by skipping the inbound inGetXrayConfigentirely.If you intend to submit a PR, the relevant entry points are
internal/database/model/model.go(model + migration),internal/web/service/xray.go(config generation guard), andfrontend/src/(UI toggle). The subscription service should require no changes.This reply was generated automatically; a maintainer may follow up.
@xinian5216 commented on GitHub (Aug 14, 2026):
I ran into the same limitation in 3x-ui v3.6.0, but with the newer per-client External Links / remote subscription workflow.
My use case is to use 3x-ui purely as a subscription aggregator:
vless://...share links into one central 3x-ui instance;The awkward part is that the client still has to be attached to at least one real inbound. That means I have to create a dummy inbound on
127.0.0.1just so the client can exist, even though every actual proxy node in that subscription comes from External Links.So I think a broader form of this feature would be very useful: allow a subscription-only client (or a client with no inbound IDs) whose subscription is generated only from External Links / Remote Subscriptions. Such a client should not create any Xray inbound, bind any port, or appear as a usable local proxy node.
This would make the External Links feature much more useful for users who want 3x-ui to act as a central subscription manager without turning the central server into another proxy endpoint.
A possible UI option could be something like:
Client type: Normal / Subscription onlyor simply allow
inboundIds = []when the client has at least one external link or remote subscription.Thanks for considering it.