You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reproduced on current main (1b1647c, linux/amd64; the configs and scripts from the report used verbatim).
Repro, base build, 20 sequential fetches with GOMAXPROCS=1:
VLESS over ws: 19 of 20 short (run 1: 14 x 0 bytes, 3 x 8171, 2 x 32749, 1 complete; run 2: 11 x 0, 3 x 8171, 1 x 32749, 1 x 49133, 1 x 57325, 1 x 8173, 2 complete), and all 20 connections log websocket: close 1000 (normal).
Control raw TCP, same build and scripts: 20/20 complete at 65536 bytes, zero close-error lines.
Trace agrees with the report: in transport/internet/websocket/connection.go, Read -> getReader -> c.conn.NextReader() returns gorilla's *websocket.CloseError for close frames 1000/1005, while a byte-stream reader expects io.EOF there. app/proxyman/outbound.Handler.Dispatch then treats it as a failure and calls common.Interrupt, which releases the data still buffered in the pipe before the inbound has taken it - the truncated tail.
Plan: map websocket.IsCloseError(err, websocket.CloseNormalClosure, websocket.CloseNoStatusReceived) to io.EOF in connection.Read; other close codes (1001, 1006, ...) stay errors. Regression test at the connection level (close 1000 and 1005 -> io.EOF; 1001/1006 still errors) plus the end-to-end repro above and the raw/VMess controls. Happy to go a different way if you would rather handle this in the Dispatch/pipe layer instead.
changed the title [-]WebSocket: a normal close (1000/1005) is reported as an error, so VLESS/Trojan over ws drop the tail of a response[/-][+]Withdrawn[/+]on Oct 23, 2026
Activity
thatssoheil commentedon Oct 22, 2026
Reproduced on current main (
1b1647c, linux/amd64; the configs and scripts from the report used verbatim).Repro, base build, 20 sequential fetches with
GOMAXPROCS=1:websocket: close 1000 (normal).Trace agrees with the report: in
transport/internet/websocket/connection.go,Read->getReader->c.conn.NextReader()returns gorilla's*websocket.CloseErrorfor close frames 1000/1005, while a byte-stream reader expectsio.EOFthere.app/proxyman/outbound.Handler.Dispatchthen treats it as a failure and callscommon.Interrupt, which releases the data still buffered in the pipe before the inbound has taken it - the truncated tail.Plan: map
websocket.IsCloseError(err, websocket.CloseNormalClosure, websocket.CloseNoStatusReceived)toio.EOFinconnection.Read; other close codes (1001, 1006, ...) stay errors. Regression test at the connection level (close 1000 and 1005 ->io.EOF; 1001/1006 still errors) plus the end-to-end repro above and the raw/VMess controls. Happy to go a different way if you would rather handle this in the Dispatch/pipe layer instead.[-]WebSocket: a normal close (1000/1005) is reported as an error, so VLESS/Trojan over ws drop the tail of a response[/-][+]Withdrawn[/+]WebSocket transport: Treat normal close frames as io.EOF (XTLS#7236)