mirror of
https://github.com/go-gost/x.git
synced 2026-10-19 16:16:32 +00:00
The read deadline set for ClientHello sniffing was reset via defer, so it remained on the client connection until Handle returned, i.e. for the whole session. xnet.Pipe is called without a read timeout for TLS/HTTP, so nothing refreshed it and any connection was torn down after readTimeout (15s default) regardless of traffic. Clear the deadline immediately after sniffing, matching the relay/router/tunnel/socks4 handlers. Regression test asserts the deadline is zero when the upstream dial fires. Fixes #904