[GH-ISSUE #5253] [Feature]: Allow making dummy inbound #3679

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

Originally created by @X-Oracle on GitHub (Jun 13, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5253

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?

  • 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 @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? - [ ] 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 (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 Inbound and a one-line guard in GetXrayConfig would 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:

if \!inbound.Enable    { continue }   // disabled
if inbound.NodeID \!= nil { continue } // lives on a remote node
if inbound.Protocol == model.MTProto { continue } // handled separately

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 externalProxy already partially addresses the address side

streamSettings.externalProxy is an existing 3x-ui extension (see internal/sub/service.go:463 and related buildVmessExternalProxyLinks / genVlessLink helpers). When present, the subscription generator emits the external addresses instead of the inbound's own listen: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. The externalProxy feature 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

  1. internal/database/model/model.go — add a new boolean field to Inbound, for example SubscriptionOnly bool. A GORM migration is also required.
  2. internal/web/service/xray.go:128 — add if inbound.SubscriptionOnly { continue } alongside the existing guards.
  3. internal/sub/service.go:276 (getInboundsBySubId) — the existing query already includes all enabled local inbounds with a matching sub_id; subscription-only inbounds would be included naturally since the query does not filter on any "local vs. remote" criterion.
  4. Frontend — expose the toggle in the inbound edit panel so users can enable it per inbound.

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.1 on a throwaway port and setting the real address/port in externalProxy — 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 in GetXrayConfig entirely.

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), and frontend/src/ (UI toggle). The subscription service should require no changes.


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

<!-- gh-comment-id:4697395291 --> @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 `Inbound` and a one-line guard in `GetXrayConfig` would 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: ```go if \!inbound.Enable { continue } // disabled if inbound.NodeID \!= nil { continue } // lives on a remote node if inbound.Protocol == model.MTProto { continue } // handled separately ``` 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 `externalProxy` already partially addresses the address side** `streamSettings.externalProxy` is an existing 3x-ui extension (see `internal/sub/service.go:463` and related `buildVmessExternalProxyLinks` / `genVlessLink` helpers). When present, the subscription generator emits the external addresses instead of the inbound's own `listen: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. The `externalProxy` feature 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** 1. **`internal/database/model/model.go`** — add a new boolean field to `Inbound`, for example `SubscriptionOnly bool`. A GORM migration is also required. 2. **`internal/web/service/xray.go:128`** — add `if inbound.SubscriptionOnly { continue }` alongside the existing guards. 3. **`internal/sub/service.go:276`** (`getInboundsBySubId`) — the existing query already includes all enabled local inbounds with a matching `sub_id`; subscription-only inbounds would be included naturally since the query does not filter on any "local vs. remote" criterion. 4. **Frontend** — expose the toggle in the inbound edit panel so users can enable it per inbound. 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.1` on a throwaway port and setting the real address/port in `externalProxy` — 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 in `GetXrayConfig` entirely. 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), and `frontend/src/` (UI toggle). The subscription service should require no changes. --- *This reply was generated automatically; a maintainer may follow up.*
Author
Owner

@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:

  • keep many existing 3x-ui servers independent;
  • copy their vless://... share links into one central 3x-ui instance;
  • add those links to a single client via Client -> Links;
  • expose only one unified subscription URL to my devices.

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.1 just 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 only

or simply allow inboundIds = [] when the client has at least one external link or remote subscription.

Thanks for considering it.

<!-- gh-comment-id:5293562561 --> @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: - keep many existing 3x-ui servers independent; - copy their `vless://...` share links into one central 3x-ui instance; - add those links to a single client via **Client -> Links**; - expose only one unified subscription URL to my devices. 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.1` just 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 only` or simply allow `inboundIds = []` when the client has at least one external link or remote subscription. Thanks for considering it.
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#3679
No description provided.