Files
mihomo/component/sniffer
semanym faf5a5e0a2 fix: do not cache zero-byte closed connections in sniffer skipList (#3550)
In Dispatcher.TCPSniff, any error returned by sniffDomain incremented
skipList[dstIP:port], including connections that closed or were canceled
before sending a single application byte (such as speculative browser
pre-connects or Happy Eyeballs races). Six such zero-byte closures
disabled SNI sniffing for all domains sharing that IP:port for the full
600 s TTL.

Skip caching the failure when conn.Buffered() == 0 and the error is a
connection-closed or cancellation error (io.EOF, io.ErrUnexpectedEOF,
net.ErrClosed, syscall.ECONNRESET, context.Canceled, etc.), while still
counting server-first read timeouts (os.ErrDeadlineExceeded) and
unrecognized or truncated payloads.

Fixes #3527
2026-11-30 18:42:08 +08:00
..
2023-11-03 21:58:21 +08:00