Files
Xray-core/proxy
copilot-swe-agent[bot] 4e0a87faf4 Implement unified reader architecture for multi-peer WireGuard
Replaced the competing reader goroutines with a unified reading architecture:
- Each peer connection continuously reads into a shared data channel
- A single dispatcher goroutine matches received data with read requests
- Eliminates blocking issues - all connections are monitored simultaneously
- No more race conditions between peer readers

This addresses @RPRX's suggestion to "统一 read 后再分给指定的 peer reader"
(unified read then distribute to specified peer readers).

Architecture:
- connectTo() registers connection and starts a dedicated reader per connection
- Each connection reader continuously reads and sends to dataChan
- unifiedReader() dispatcher waits for data, then matches with pending requests
- All peers can receive simultaneously without any blocking

Tests pass successfully.

Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
2026-01-11 09:19:10 +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