mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #5213] [Feature]: allow VLESS reverse proxy #3652
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#3652
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 @lordtgm on GitHub (Jun 11, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5213
Is your feature request related to a problem?
I'm trying to set up VLESS reverse proxy. The panel's client settings allows setting a reverse proxy tag for each client and properly sets it up. However the client has no way of automatically getting the correct configuration with reverse proxy, requiring manual setup.
Describe the solution you'd like
If a client has a reverse tag set, the panel should automatically generate a valid client configuration for them as described in the documentation. As of my knowledge, this can only be done in a JSON configuration as it requires an additional outbound and a routing rule.
Additionally, allowing the user to set custom JSON configuration templates for each client (and for each sub, while we are at it) could resolve this problem and give users much more flexibility in this field
Alternatives you've considered
Although one can manually create a valid client configuration, it's quite tedious to do with multiple outbounds. I've even considered hijacking the JSON sub response and altering it outside this app, but that would be rather unprofessional.
Concrete use case
VLESS reverse proxy is a solution for accepting incoming connections, which has many use cases such as hosting online games and torrenting.
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
Xray config generation, Subscription (share links / Clash / JSON)
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Jun 11, 2026):
The gap you describe is confirmed in the source: the panel stores the per-client
reverse.tagand injects it into the server-side Xray config, but the JSON subscription path does not yet generate a matching client-side reverse proxy configuration.What currently happens
reverseTagfield for VLESS inbounds (frontend/src/pages/clients/ClientFormModal.tsx).reverse: { tag: "<tag>" }on the client record (internal/database/model/model.go,ClientReversestruct).internal/web/service/xray.go,GetXrayConfig()), thatreverseobject is passed into the inbound's client entry so Xray knows to treat that client as part of the reverse proxy tunnel.GetClientReverseTags()(internal/web/service/inbound.go:1129) so they can be referenced in the Xray config template routing rules — but the admin must wire those routing rules up manually.What is missing
The JSON subscription generator (
internal/sub/json_service.go,genVless(), line 315) readsclient.Flowandclient.IDbut never checksclient.Reverse. It emits a standard VLESS outbound with noreversetop-level section, no bridge/portal outbound, and no reverse-aware routing rules. A client that imports this JSON will behave as a normal proxy, not a reverse proxy bridge.Share links (
vless://URIs, generated bygenVlessLink()ininternal/sub/service.go) have no standard mechanism for encoding reverse proxy configuration, so JSON subscription is the only viable delivery path for this.Regarding per-client / per-sub custom templates
The JSON subscription service uses a single embedded
default.json(internal/sub/default.json) as the base config and exposes only three global knobs (mux, rules, finalMask) via settings. There is currently no per-client or per-sub template override mechanism.Scope of a potential implementation
A PR addressing the first part of the request would need to:
genVless()(or a newgenVlessReverse()branch ingetConfig()), detectclient.Reverse \!= niland, instead of a plain outbound, emit a config containing:reversesection.reversetop-level section with abridgesentry pointing at that tag.ClientReversestruct, which only holds atagstring), so the data model may also need extending.Per-client template overrides would be a broader feature and would likely be tracked separately.
This reply was generated automatically; a maintainer may follow up.