From 2f0d83384802473ad26e09a9a17ca02917b762a4 Mon Sep 17 00:00:00 2001 From: Ramond Date: Sat, 22 Nov 2025 13:34:12 +0800 Subject: [PATCH 1/2] fix: Auto-remove multiplex when VLESS users have xtls-rprx-vision flow Implements intelligent conflict detection between multiplex and xtls-rprx-vision flow. When generating inbound configuration, automatically removes multiplex if any user has Vision flow configured, as these two features are incompatible. Technical background: - Multiplex adds protocol layer headers for connection multiplexing - Vision flow requires direct TLS access to analyze traffic patterns - Mux headers prevent Vision from inspecting TLS handshakes - This causes 'REALITY: processed invalid connection' errors Solution: - Added conflict detection in addUsers() and initUsers() functions - Dynamically removes multiplex from configuration when Vision flow detected - Preserves multiplex for users without Vision flow - No database modification required - works at runtime Related issues: #224, #228, #474, #528 --- service/inbounds.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/service/inbounds.go b/service/inbounds.go index 8d7fc147..8ac6b089 100644 --- a/service/inbounds.go +++ b/service/inbounds.go @@ -300,6 +300,18 @@ func (s *InboundService) addUsers(db *gorm.DB, inboundJson []byte, inboundId uin return nil, err } + // Remove multiplex if any user has xtls-rprx-vision flow (they are incompatible) + if inboundType == "vless" { + if users, ok := inbound["users"].([]json.RawMessage); ok { + for _, user := range users { + if strings.Contains(string(user), "xtls-rprx-vision") { + delete(inbound, "multiplex") + break + } + } + } + } + return json.Marshal(inbound) } @@ -325,6 +337,18 @@ func (s *InboundService) initUsers(db *gorm.DB, inboundJson []byte, clientIds st return nil, err } + // Remove multiplex if any user has xtls-rprx-vision flow (they are incompatible) + if inboundType == "vless" { + if users, ok := inbound["users"].([]json.RawMessage); ok { + for _, user := range users { + if strings.Contains(string(user), "xtls-rprx-vision") { + delete(inbound, "multiplex") + break + } + } + } + } + return json.Marshal(inbound) } From 06452bc811bb2f1667bd5baa899582e8f612a291 Mon Sep 17 00:00:00 2001 From: Ramond Date: Sat, 22 Nov 2025 13:35:17 +0800 Subject: [PATCH 2/2] chore: Update frontend submodule with multiplex fix --- frontend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend b/frontend index 2d0e1fd3..6a7fd1ad 160000 --- a/frontend +++ b/frontend @@ -1 +1 @@ -Subproject commit 2d0e1fd379f0cf4c37b3aa8d767e465c1b37b046 +Subproject commit 6a7fd1ad064279cc455364985055946c5bcab765