mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[PR #6418] [MERGED] fix(sub): bind JSON local inbounds to 127.0.0.1 and keep mux.cool off Vision outbounds #6260
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#6260
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6418
Author: @FZ1010
Created: 9/4/2026
Status: ✅ Merged
Merged: 9/5/2026
Merged by: @MHSanaei
Base:
main← Head:fix/sub-json-local-listen-vision-mux📝 Commits (2)
b95b0d6fix(sub): bind JSON local inbounds to 127.0.0.1 and keep mux.cool off Vision outboundseb28fe8fix(sub): keep XUDP settings when disabling TCP mux on Vision outbounds📊 Changes
9 files changed (+79 additions, -6 deletions)
View changed files
📝
docs/content/docs/en/config/subscription.mdx(+1 -1)📝
docs/content/docs/fa/config/subscription.mdx(+1 -1)📝
docs/content/docs/ru/config/subscription.mdx(+1 -1)📝
docs/content/docs/zh/config/subscription.mdx(+1 -1)📝
docs/lib/xray/subscription.test.ts(+2 -1)📝
docs/lib/xray/subscription.ts(+8 -1)📝
internal/sub/default.json(+2 -0)📝
internal/sub/json_service.go(+19 -0)📝
internal/sub/json_service_test.go(+44 -0)📄 Description
Summary
127.0.0.1ininternal/sub/default.json, mirrored in the docs generator and the foursubscription.mdxpages.xtls-rprx-vision), emit thesubJsonMux/ per-host mux object withconcurrency: -1: TCP mux.cool off,enabled,xudpConcurrencyandxudpProxyUDP443preserved (Xray reads the XUDP keys only underenabled).Why
Closes #6417. Refs #6379 / #6395.
Inbounds. Without
listenevery client that runs the profile verbatim binds an unauthenticated proxy on0.0.0.0, and iOS packet-tunnel clients cannot reach it at all — the Happ iOS "CONNECTED with zero traffic" symptom from #6379. #6395 restoredsocks, which works on that device; so does the oldmixedinbound once it is bound to127.0.0.1, and every client's own generated config binds to loopback. Binding explicitly removes the LAN exposure and makes the inbound independent of which protocol alias the client core happens to accept.Mux. XTLS flows do not support mux.cool. With
subJsonMuxset, every VLESS+REALITY+Vision profile connects and then passes nothing: the client tunnelsv1.mux.coolthrough the Vision flow and the server drops it withcommon/mux: unexpected network TCP. This is independent of the client — reproduced on Happ iOS, Happ Android 4.3.0, Happ macOS 3.3.6, V2Box iOS and desktop Xray 26.6.27. Dropping the whole object would also lose the operator's XUDP keys and any per-hostmuxParams, so onlyconcurrencyis changed — the same-1convention the Xray docs and v2rayNG use for XTLS flows. Verified on the same box:concurrency: 8on a Vision outbound →SSL_ERROR_SYSCALL, client logtunneling request to tcp:v1.mux.cool;concurrency: -1with the XUDP keys kept → traffic passes, exit IP is the server.Type of change
Areas affected
How was this tested?
go vet ./internal/sub/ && go test ./internal/sub/— green, including the newTestSubJsonServiceVisionFlowDisablesTCPMuxOnlyand the extendedTestDefaultJSONUsesCompatibleLocalInbounds(both fail onmain).cd docs && pnpm exec vitest run lib/xray/subscription.test.ts— 13/13.www.aws.amazon.com,xtls-rprx-vision), with verdicts from the panel's per-client traffic counters andsson the server:main(nolisten) → Happ iOS 5.2.x: CONNECTED, zero traffic; withlisten: 127.0.0.1→ works (same device, same profile otherwise).subJsonMux→ dead on Happ iOS/Android/macOS, V2Box iOS, desktop Xray (common/mux: unexpected network TCPon the server); withconcurrency: -1on the Vision outbound → works (desktop Xray, exit IP = server); removing the mux block entirely also works on all five clients.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.