[GH-ISSUE #5157] [Bug]: VLESS+XHTTP with vless encryption supports XTLS Vision #3626

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

Originally created by @maxbranson64-eng on GitHub (Jun 10, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5157

Describe the bug

When VLEES is combined with XHTTP and vless encryption (vlessenc) it supports flow: "xtls-rprx-vision", but in 3xui flow is not set automatically. Also if you set it manually it remains but vless:// links generated by 3xui lacks flow field

How to reproduce the problem

  1. Create new VLESS+XHTTP inbound with no security
  2. Set ML-KEM on Protocol's tab
  3. Create client with flow: "xtls-rprx-vision" and attach XHTTP inbound to it
  4. Generate VLESS link

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.3.0

Xray-core version

No response

How did you install 3x-ui?

Docker / Docker Compose

Operating system

Debian 13

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 @maxbranson64-eng on GitHub (Jun 10, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5157 ### Describe the bug When VLEES is combined with XHTTP and vless encryption (vlessenc) it supports flow: "xtls-rprx-vision", but in 3xui flow is not set automatically. Also if you set it manually it remains but vless:// links generated by 3xui lacks flow field ### How to reproduce the problem 1. Create new VLESS+XHTTP inbound with no security 2. Set ML-KEM on Protocol's tab 3. Create client with flow: "xtls-rprx-vision" and attach XHTTP inbound to it 4. Generate VLESS link ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.3.0 ### Xray-core version _No response_ ### How did you install 3x-ui? Docker / Docker Compose ### Operating system Debian 13 ### 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:48 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Jun 10, 2026):

Thanks for the detailed report. I dug into the source to verify each part.

What the code actually does

Link generation (sub/subService.go, lines 474–487):
The genVlessLink function only appends the flow parameter when streamNetwork == "tcp" and security is "tls" or "reality". For a VLESS+XHTTP inbound with security = "none" (which is the case when using vlessenc/ML-KEM), the code falls into the default branch, which only writes security=none and never emits flow — even if the client has it set. This confirms the second part of your report: manually-set flow is silently dropped from the generated vless:// link.

UI / flow selector (frontend/src/lib/xray/protocol-capabilities.ts, lines 42–47):
canEnableTlsFlow returns false for any network other than "tcp", and also for any security other than "tls" or "reality". XHTTP with no security therefore never shows the flow selector at all.

Xray config generation (web/service/xray.go, lines 162–164):
When 3x-ui builds the config it sends to xray-core, it does include flow for VLESS clients regardless of transport — no TCP/XHTTP check here. So if you saved flow: "xtls-rprx-vision" on the client record (e.g., via direct API or the JSON editor), xray-core would receive it.

Where clarification is needed

The UI/link restrictions mirror the established xray-core constraint: XTLS Vision is designed for raw TCP transport (it operates by detecting TLS records in the TCP stream). XHTTP wraps traffic in HTTP, which works differently. This is why 3x-ui's inboundCanEnableTlsFlow comment (web/service/inbound.go:550) explicitly states "XTLS Vision is only valid for VLESS on TCP with tls or reality."

However, you're combining it with vlessenc / ML-KEM (VLESS-level post-quantum encryption, not transport TLS), and claim xray-core accepts the combination. This is the part we need to verify:

  1. Does xray-core actually start and log no errors with this config? Please share the relevant portion of the xray-core log (after adding flow: "xtls-rprx-vision" to the client via e.g. the JSON editor and restarting).
  2. Does a client connecting with flow=xtls-rprx-vision in its outbound actually work end-to-end?
  3. Which exact xray-core version is bundled in your 3x-ui 3.3.0 image? The in-panel Xray settings page shows this; alternatively check x-ui version.

If xray-core genuinely accepts this combination without errors, there are two real bugs here:

  • The link generator not emitting flow for XHTTP transport (even when set)
  • The UI not exposing the flow option for XHTTP+vlessenc inbounds

Knowing whether xray-core actually supports it will determine the right fix.

<!-- gh-comment-id:4668079478 --> @github-actions[bot] commented on GitHub (Jun 10, 2026): Thanks for the detailed report. I dug into the source to verify each part. ## What the code actually does **Link generation (`sub/subService.go`, lines 474–487):** The `genVlessLink` function only appends the `flow` parameter when `streamNetwork == "tcp"` *and* `security` is `"tls"` or `"reality"`. For a VLESS+XHTTP inbound with `security = "none"` (which is the case when using vlessenc/ML-KEM), the code falls into the `default` branch, which only writes `security=none` and never emits `flow` — even if the client has it set. This confirms the second part of your report: manually-set flow is silently dropped from the generated `vless://` link. **UI / flow selector (`frontend/src/lib/xray/protocol-capabilities.ts`, lines 42–47):** `canEnableTlsFlow` returns `false` for any network other than `"tcp"`, and also for any security other than `"tls"` or `"reality"`. XHTTP with no security therefore never shows the flow selector at all. **Xray config generation (`web/service/xray.go`, lines 162–164):** When 3x-ui builds the config it sends to xray-core, it *does* include `flow` for VLESS clients regardless of transport — no TCP/XHTTP check here. So if you saved `flow: "xtls-rprx-vision"` on the client record (e.g., via direct API or the JSON editor), xray-core would receive it. ## Where clarification is needed The UI/link restrictions mirror the established xray-core constraint: **XTLS Vision is designed for raw TCP transport** (it operates by detecting TLS records in the TCP stream). XHTTP wraps traffic in HTTP, which works differently. This is why 3x-ui's `inboundCanEnableTlsFlow` comment (`web/service/inbound.go:550`) explicitly states "XTLS Vision is only valid for VLESS on TCP with tls or reality." However, you're combining it with **vlessenc / ML-KEM** (VLESS-level post-quantum encryption, not transport TLS), and claim xray-core accepts the combination. This is the part we need to verify: 1. **Does xray-core actually start and log no errors with this config?** Please share the relevant portion of the xray-core log (after adding `flow: "xtls-rprx-vision"` to the client via e.g. the JSON editor and restarting). 2. **Does a client connecting with `flow=xtls-rprx-vision` in its outbound actually work end-to-end?** 3. **Which exact xray-core version is bundled in your 3x-ui 3.3.0 image?** The in-panel Xray settings page shows this; alternatively check `x-ui version`. If xray-core genuinely accepts this combination without errors, there are two real bugs here: - The link generator not emitting `flow` for XHTTP transport (even when set) - The UI not exposing the flow option for XHTTP+vlessenc inbounds Knowing whether xray-core actually supports it will determine the right fix.
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#3626
No description provided.