Files
Xray-core/proxy
copilot-swe-agent[bot] 8ca8e07fe0 Fix Vision timing issue: ensure complete TLS records before switching to direct copy
The issue was in the timing/conditions for switching to direct copy mode. When Vision receives CommandPaddingDirect from the server, it would immediately switch to direct mode even if the current buffer contains incomplete TLS records. This caused SSL protocol errors, especially with testpre where connections may have fragmented data.

The fix: Before actually performing the switch to direct copy mode, check if the current buffer contains complete TLS records using IsCompleteRecord(). If records are incomplete, return the buffer and delay the switch until the next read cycle when complete records are available.

This ensures Vision only switches to direct mode at safe TLS record boundaries, preventing data corruption.

Fixes #4878

Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
2026-01-11 08:54:18 +00:00
..
2024-11-09 11:16:11 +00:00
2025-09-05 08:15:16 +00:00
2024-11-09 11:16:11 +00:00