Fix the two reliability problems in the in-process Xray emulator by matching XTLS/Xray-core's transport semantics: - XHTTP upload queue: rewrite as a faithful port of xray-core's uploadQueue (bounded channel + sequence reorder heap). Packet-up POSTs are now acked immediately on buffering instead of blocking until the tunnel reader consumes them. The old block-until-consumed behavior throttled the uplink to the reassembly rate and deadlocked against the client's concurrent-POST limit, which showed up as "download a burst, stall, repeat" on video/large downloads. - Mux: dial the backend and pump uplink on a per-session goroutine fed by a bounded channel (mirrors xray-core's per-session buffered pipe). Previously the dial and backend writes ran inline in the shared read loop, so one slow target or backpressured session stalled every other muxed session. - XHTTP download writer: flush every write (matches httpServerConn.Write) instead of batching behind a 2ms/32KB window. - XHTTP: enforce a single download (stream-down) per session to stop two GETs from splitting the decoded stream and corrupting the tunnel. - Fix a close-of-closed-channel race in the mux session teardown (sync.Once). Remove the now-inert XHTTP tuning knobs (xhttp_queue_timeout_ms, xhttp_flush_ms, xhttp_flush_bytes) from the backend struct and the admin panel UI. Split admin/assets/app.js into ordered classic-script modules under admin/assets/js/ for maintainability. The concatenation is byte-identical to the old file and load order is preserved via defer, so behavior is unchanged. Add regression tests for the mux head-of-line stall and the out-of-order packet-up burst-stall; add golang.org/x/text to go.mod so tests build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
22 lines
651 B
AMPL
22 lines
651 B
AMPL
module shell2
|
|
|
|
go 1.25.4
|
|
|
|
require golang.org/x/crypto v0.45.0
|
|
|
|
require (
|
|
github.com/flynn/noise v1.0.0 // indirect
|
|
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
|
|
github.com/klauspost/reedsolomon v1.12.0 // indirect
|
|
github.com/lib/pq v1.10.9 // indirect
|
|
github.com/pkg/errors v0.9.1 // indirect
|
|
github.com/tjfoc/gmsm v1.4.1 // indirect
|
|
github.com/xtaci/kcp-go/v5 v5.6.61 // indirect
|
|
github.com/xtaci/smux v1.5.50 // indirect
|
|
golang.org/x/net v0.47.0 // indirect
|
|
golang.org/x/sys v0.38.0 // indirect
|
|
golang.org/x/text v0.31.0 // indirect
|
|
golang.org/x/time v0.14.0 // indirect
|
|
www.bamsoftware.com/git/dnstt.git v1.20241021.0 // indirect
|
|
)
|