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
{{ message }}
Repository navigation
test: No CI test covers tunnel behaviour (server-first protocols, half-close) #1553
Nothing tests how a raw tunnel carries bytes in both directions with real protocol timing. #1544 slipped through this gap: through CONNECT, a server that speaks first hangs, and a half-close loses the reply.
What exists today
TestHandleTransparentConn_Tunnels (core/listener/forwardproxy/transparent_test.go) sends an upstream banner, but only through the transparent listener, with no TLS bridge, over a net.Pipe. That path never peeks the client's bytes, so it cannot see the hang.
No test calls CloseWrite() through a tunnel. The one CloseWrite in the forward-proxy tests (requestbodyfailure_test.go:164) is about request bodies.
Cases: server speaks first, client half-close then read, a large transfer in both directions at once, and a client that sends nothing then closes.
Paths:CONNECT with the bridge off, CONNECT with the bridge on to a port it does not bridge, and HandleTransparentConn over a real TCP pair.
Assert: each case behaves the same as a direct connection, within a short deadline. Also check that the tunnel rows' bytesUp/bytesDown match what crossed.
The reproduction source in #1544 is a working starting point.
Activity
Test: Check that tunnels behave like direct connections