mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #5166] [Bug]: Cannot create Tunnel inbound with TProxy support from the UI #3631
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#3631
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 @Kamp11 on GitHub (Jun 10, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5166
Describe the bug
It is currently impossible to create a Tunnel inbound configured for TProxy in 3x-ui according to the official XTLS documentation.
The XTLS documentation describes how to configure transparent proxying using a Tunnel (dokodemo-door) inbound with followRedirect / TProxy support:
https://xtls.github.io/en/document/level-2/tproxy.html
However, the 3x-ui panel does not provide the required options to create such an inbound through the UI. As a result, users cannot configure a transparent proxy setup following the official guide.
How to reproduce the problem
Expected behavior
3x-ui should allow creating a Tunnel inbound with the settings required for TProxy transparent proxy deployments, as described in the official XTLS documentation.
Either:
expose the necessary TProxy-related options in the inbound configuration UI, or
allow advanced/custom JSON fields for Tunnel inbounds so that the documented Xray configuration can be reproduced.
Actual behavior
The required TProxy configuration cannot be created from the panel interface.
Relevant logs
Screenshots
No response
3x-ui version
3.3.0
Xray-core version
26.6.1
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 24.04
Which parts of the panel are affected?
No response
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Jun 10, 2026):
Thanks for the detailed report. I've confirmed this is a real bug by tracing it through the source code.
What's happening
The Follow Redirect toggle (
followRedirect) is present in the Tunnel inbound form (Protocol tab →frontend/src/pages/inbounds/form/protocols/tunnel.tsx:28-34), so that part works fine.The problem is with TProxy mode. That option lives inside the Sockopt panel, which is part of the Stream Settings tab. The Stream tab is only rendered for a hardcoded list of protocols (
frontend/src/lib/xray/protocol-capabilities.ts:12):tunnelis not in that list, socanEnableStream()returnsfalsefor Tunnel inbounds. As a result:streamSettingsyou type in, because it also gates onstreamEnabled(advanced-editors.tsx:181).In short, there is currently no way to set
streamSettings.sockopt.tproxy(or any other stream-level option) for a Tunnel inbound through the UI.Root cause
'tunnel'is missing fromSTREAM_PROTOCOLSinfrontend/src/lib/xray/protocol-capabilities.ts. Adding it (or giving Tunnel inbounds access to at least the Sockopt section) would expose the TProxy dropdown (off / redirect / tproxy) that already exists infrontend/src/pages/inbounds/form/transport/sockopt.tsx:120-129.Workaround (none at present)
There is no current workaround through the panel UI. Until this is fixed, the only option is to manually edit the Xray config file on the server and restart (
systemctl restart x-ui), or use the REST API directly toPOST /panel/api/inbounds/addwith a full JSON body that includesstreamSettings.sockopt.tproxy.