Withdrawn
Withdrawn by the author.
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.