[PR #5185] [MERGED] fix: enable XTLS vision flow for VLESS+XHTTP+vlessenc in UI and share links (#5157) #5813

Closed
opened 2026-11-02 04:04:15 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5185
Author: @rqzbeh
Created: 6/10/2026
Status: ✅ Merged
Merged: 6/11/2026
Merged by: @MHSanaei

Base: main ← Head: fix/vless-xhttp-vision


📝 Commits (4)

  • 8a4839f fix: enable XTLS vision flow for VLESS+XHTTP+vlessenc in UI and share links (#5157)
  • d0f647f Merge branch 'main' into fix/vless-xhttp-vision
  • 16e0298 Merge branch 'main' into fix/vless-xhttp-vision
  • ffa14d8 fix: enable xtls-rprx-vision flow for VLESS XHTTP with vlessenc encryption (#5157)

📊 Changes

12 files changed (+239 additions, -31 deletions)

View changed files

📝 frontend/public/openapi.json (+1 -1)
📝 frontend/src/lib/xray/protocol-capabilities.ts (+24 -7)
📝 frontend/src/pages/api-docs/endpoints.ts (+1 -1)
📝 frontend/src/pages/inbounds/info/helpers.ts (+4 -0)
📝 frontend/src/test/inbound-from-db.test.ts (+29 -0)
📝 internal/sub/service.go (+19 -0)
📝 internal/web/service/client_crud.go (+1 -1)
📝 internal/web/service/client_flow_isolation_test.go (+16 -8)
📝 internal/web/service/inbound.go (+1 -1)
📝 internal/web/service/inbound_clients.go (+1 -1)
📝 internal/web/service/inbound_protocol.go (+52 -11)
➕ internal/web/service/inbound_protocol_test.go (+90 -0)

📄 Description

Fixes #5157

Summary

This PR fixes two related bugs preventing \xtls-rprx-vision\ flow from working out of the box when using VLESS with XHTTP and \ lessenc\ encryption:

  1. In the UI (\protocol-capabilities.ts), \canEnableTlsFlow\ returned false for XHTTP if security was
    one. It now correctly permits TLS flow configuration if the network is XHTTP and VLESS encryption (\ lessenc) is enabled, allowing users to configure the Vision flow without hacking the API.
  2. In the backend link generator (\internal/sub/service.go), VLESS link generation omitted the \ low\ parameter unless the stream security was \ ls\ or
    eality. It now correctly includes the flow parameter for XHTTP connections that use \ lessenc, ensuring that the generated \ less://\ links contain the required \ low=xtls-rprx-vision.

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation
  • Tests only
  • Build / CI / tooling
  • Other

Areas affected

  • Frontend (UI / panel pages)
  • Backend (API endpoints, login, settings)
  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Statistics / traffic counters
  • Database / migrations
  • Install / upgrade script
  • Docker image
  • Multi-node (sub-nodes)
  • Telegram bot

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable).
  • \go build ./...\ and the test suite pass locally.
  • For frontend changes:
    pm run lint,
    pm run typecheck, and
    pm run build\ pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/5185 **Author:** [@rqzbeh](https://github.com/rqzbeh) **Created:** 6/10/2026 **Status:** ✅ Merged **Merged:** 6/11/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix/vless-xhttp-vision` --- ### 📝 Commits (4) - [`8a4839f`](https://github.com/MHSanaei/3x-ui/commit/8a4839f8aba6766985a8809360bcf9280070dd36) fix: enable XTLS vision flow for VLESS+XHTTP+vlessenc in UI and share links (#5157) - [`d0f647f`](https://github.com/MHSanaei/3x-ui/commit/d0f647f2be87e209ebb5972ebe6394f7e6f0eaef) Merge branch 'main' into fix/vless-xhttp-vision - [`16e0298`](https://github.com/MHSanaei/3x-ui/commit/16e02983df17b5808e8b04f5920d8fc6504383a4) Merge branch 'main' into fix/vless-xhttp-vision - [`ffa14d8`](https://github.com/MHSanaei/3x-ui/commit/ffa14d85c5756dc60f13d08a0e15b1c3fd8d1346) fix: enable xtls-rprx-vision flow for VLESS XHTTP with vlessenc encryption (#5157) ### 📊 Changes **12 files changed** (+239 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `frontend/public/openapi.json` (+1 -1) 📝 `frontend/src/lib/xray/protocol-capabilities.ts` (+24 -7) 📝 `frontend/src/pages/api-docs/endpoints.ts` (+1 -1) 📝 `frontend/src/pages/inbounds/info/helpers.ts` (+4 -0) 📝 `frontend/src/test/inbound-from-db.test.ts` (+29 -0) 📝 `internal/sub/service.go` (+19 -0) 📝 `internal/web/service/client_crud.go` (+1 -1) 📝 `internal/web/service/client_flow_isolation_test.go` (+16 -8) 📝 `internal/web/service/inbound.go` (+1 -1) 📝 `internal/web/service/inbound_clients.go` (+1 -1) 📝 `internal/web/service/inbound_protocol.go` (+52 -11) ➕ `internal/web/service/inbound_protocol_test.go` (+90 -0) </details> ### 📄 Description Fixes #5157 ## Summary This PR fixes two related bugs preventing \xtls-rprx-vision\ flow from working out of the box when using VLESS with XHTTP and \ lessenc\ encryption: 1. In the UI (\protocol-capabilities.ts\), \canEnableTlsFlow\ returned false for XHTTP if security was \ one\. It now correctly permits TLS flow configuration if the network is XHTTP and VLESS encryption (\ lessenc\) is enabled, allowing users to configure the Vision flow without hacking the API. 2. In the backend link generator (\internal/sub/service.go\), VLESS link generation omitted the \ low\ parameter unless the stream security was \ ls\ or \ eality\. It now correctly includes the flow parameter for XHTTP connections that use \ lessenc\, ensuring that the generated \ less://\ links contain the required \ low=xtls-rprx-vision\. ## Type of change - [x] Bug fix - [ ] New feature - [ ] Refactoring (no behavior change) - [ ] Documentation - [ ] Tests only - [ ] Build / CI / tooling - [ ] Other ## Areas affected - [x] Frontend (UI / panel pages) - [ ] Backend (API endpoints, login, settings) - [ ] Xray config generation - [x] Subscription (share links / Clash / JSON) - [ ] Statistics / traffic counters - [ ] Database / migrations - [ ] Install / upgrade script - [ ] Docker image - [ ] Multi-node (sub-nodes) - [ ] Telegram bot ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [ ] I added or updated tests for the new behavior (when applicable). - [ ] \go build ./...\ and the test suite pass locally. - [x] For frontend changes: \ pm run lint\, \ pm run typecheck\, and \ pm run build\ pass. - [ ] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:04:15 +07:00
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#5813
No description provided.