mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-01-15 07:02:36 +08:00
When testpre is enabled, connections are pre-established and may sit idle for up to 2 minutes. During this time, TLS 1.3 post-handshake messages (NewSessionTicket, etc.) can accumulate in the TLS connection's internal buffers (input and rawInput). These stale messages are not part of the proxied application data and should not be forwarded by Vision. The fix clears these buffers immediately after extracting them for Vision use, before any data transfer begins. This prevents the SSL protocol errors that occur when Vision later reads and forwards these stale TLS control messages as if they were application data. Fixes #4878 Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>