github Jolymmiles/Xray-core v26.10.6-2241
Xray-core v26.10.6-2241

7 hours ago

Highlights

  • One stalled client can no longer hang a Mux.Cool server's shutdown. If a client stopped reading while an XUDP response was being written to it, closing its mux connection, and with it the whole mux server, could wait as long as that client kept the connection open.

This release is v26.10.5-1858 plus that fix; see v26.10.5-1858 for the upstream sync and the other fork fixes.

Fork fixes

  • XUDP response shutdown (Mux.Cool). Closing a Mux.Cool connection waited for any XUDP response write already under way. A VLESS inbound's link writer cannot be interrupted, so when the client stopped reading, that write ended only when the connection closed. The inbound, however, closes the connection only after the mux worker has finished, so the wait was circular and lasted as long as the client kept its TCP window at zero. Every worker shares one XUDP runtime, which Server.Close shuts down, so the same write also held the shutdown or reload of the whole mux server.
    • Closing now releases the queued responses and no longer waits for a write already under way; that write fails once the connection closes.
    • A response not yet being written when closing starts is released unsent.
    • The XHTTP Mux.Cool KeepAlive in v26.10.5-1858 follows the same rule (#18 and #20).
  • Process-test port allocation (test-only). The process tests got their listener ports from the kernel's automatic source-port range. An outbound connection could take such a port before Xray or a client bound it, so release-gate runs failed intermittently with bind: address already in use; this hit the VLESS and XHTTP Mux.Cool gates for this release. One allocator now hands out ports outside that range, starts at a random offset, checks that the needed transports can bind, and never hands out a port twice. It also fixes a helper that returned the same port on two consecutive calls (#21, #22). Shipped binaries are unaffected.

Upstream changes

No new upstream changes; upstream/main is still 7da5dae6, as in v26.10.5-1858.

Compatibility notes

  • No wire format or configuration changes. VLESS, Trojan, REALITY, Vision, SMUX and Mux.Cool bytes are unchanged.
  • An XUDP response write that started before shutdown may still complete or fail after the mux worker reports closed. Session End frames and KeepAlive frames already behaved this way.
  • Release assets are built with Go 1.27.1 and -tags http2legacy, as in v26.10.5-1858. The compatibility notes of that release still apply.
  • The REALITY version bytes are now 26.10.6. The HHMM stamp is display-only.

Validation

All local gates ran on Linux/amd64 with Go 1.27.1 and GOFLAGS=-tags=http2legacy.

  • Regression tests. The new tests drive the production VLESS writer chain: a PrefixWriter over a net.Pipe whose peer never reads, in synctest. Each failed before the fix:
    • TestResponseSinkCloseDoesNotWaitForStuckWrite
    • TestRuntimeCloseDoesNotWaitForStuckResponseWrite
    • TestServerWorkerCloseDoesNotWaitForStuckXUDPResponse
  • Pull-request gates (#20):
    • race on ./common/mux/... three times, and the XUDP tests 30 times;
    • the XUDP, legacy-mux and reverse version-skew gates, 9/9.
  • Release commit 86135d2a, local gates:
    • vformat, protobuf-header check, go vet ./..., go test ./...;
    • race and checkptr;
    • version test (26.10.6-2241).
  • Process interoperability. An Xray server on the release commit was tested with Xray, sing-box and Mihomo clients:
    • VLESS TCP TLS/REALITY × no-flow/Vision 36/36 (three runs);
    • SMUX 24/24 and H2MUX 24/24;
    • Hysteria 3/3, plus Mux.Cool over Hysteria with carrier teardown;
    • Mux.Cool over XHTTP 6/6.
  • Pre-release Validation passed on 86135d2a: 529 tests passed, none failed. It covers:
    • repository-wide unit, race and checkptr;
    • the SMUX and H2MUX matrices, three runs each;
    • stress, reconnect and hardening profiles;
    • the direct, legacy-mux, XUDP, reverse and WireGuard version-skew gates;
    • the candidate-versus-v26.8.25-1457 performance and resource budgets, three runs;
    • the RemnaNode configuration contract;
    • a 30-minute mixed-path soak, 67 cycles.
  • Tests and Checkings passed on the same commit.
  • Release-flag Linux/amd64 build: static, -tags=http2legacy, GOAMD64=v1, CGO_ENABLED=0, -trimpath.
  • Code review. Review bots reviewed #20, #21 and #22. Every finding was either fixed with a test (the port-check findings in #22) or answered with a written reason in the pull request (the late-write window in #20).
  • These results are correctness and compatibility evidence. No performance improvement or traffic-camouflage gain is claimed.

Don't miss a new Xray-core release

NewReleases is sending notifications on new releases.