[GH-ISSUE #5166] [Bug]: Cannot create Tunnel inbound with TProxy support from the UI #3631

Closed
opened 2026-10-31 20:33:50 +07:00 by bsakaguchi · 1 comment
Owner

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

  1. Open 3x-ui.
  2. Try to create a Tunnel inbound following the guide: https://xtls.github.io/en/document/level-2/tproxy.html
  3. Attempt to configure the inbound with the settings required for TProxy.
  4. Notice that the necessary options are not available in the UI, making the configuration impossible.

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

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
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 1. Open 3x-ui. 2. Try to create a Tunnel inbound following the guide: https://xtls.github.io/en/document/level-2/tproxy.html 3. Attempt to configure the inbound with the settings required for TProxy. 4. Notice that the necessary options are not available in the UI, making the configuration impossible. ### 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 ```shell ``` ### 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 - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:33:50 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

const STREAM_PROTOCOLS = ['vmess', 'vless', 'trojan', 'shadowsocks', 'hysteria'];

tunnel is not in that list, so canEnableStream() returns false for Tunnel inbounds. As a result:

  • The Stream tab (which contains Sockopt → TProxy) never appears when creating/editing a Tunnel inbound.
  • The Advanced → Stream JSON sub-editor is also hidden for the same reason.
  • Even the Advanced → All JSON editor silently drops any streamSettings you type in, because it also gates on streamEnabled (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 from STREAM_PROTOCOLS in frontend/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 in frontend/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 to POST /panel/api/inbounds/add with a full JSON body that includes streamSettings.sockopt.tproxy.

<!-- gh-comment-id:4670314896 --> @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`): ```typescript const STREAM_PROTOCOLS = ['vmess', 'vless', 'trojan', 'shadowsocks', 'hysteria']; ``` `tunnel` is not in that list, so `canEnableStream()` returns `false` for Tunnel inbounds. As a result: - The **Stream** tab (which contains Sockopt → TProxy) never appears when creating/editing a Tunnel inbound. - The **Advanced → Stream** JSON sub-editor is also hidden for the same reason. - Even the **Advanced → All** JSON editor silently drops any `streamSettings` you type in, because it also gates on `streamEnabled` (`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 from `STREAM_PROTOCOLS` in `frontend/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 in `frontend/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 to `POST /panel/api/inbounds/add` with a full JSON body that includes `streamSettings.sockopt.tproxy`.
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#3631
No description provided.