WireGuard: Use Xray's buffer (#5880)

Fixes https://github.com/XTLS/Xray-core/issues/5878
This commit is contained in:
风扇滑翔翼
2026-04-04 05:22:45 +08:00
committed by GitHub
parent 1e89a8fd98
commit 6eccc59728
2 changed files with 18 additions and 13 deletions
+5 -5
View File
@@ -101,17 +101,17 @@ func (s *Server) Process(ctx context.Context, network net.Network, conn stat.Con
}
for i, b := range mb {
buff := b.Bytes()
rawBytes := b.Bytes()
if b.Len() > 3 {
buff[1] = 0
buff[2] = 0
buff[3] = 0
rawBytes[1] = 0
rawBytes[2] = 0
rawBytes[3] = 0
}
select {
case s.bindServer.readQueue <- &netReadInfo{
buff: buff,
buff: b,
endpoint: nep,
}:
case <-s.bindServer.closedCh: