WireGuard inbound: Reduce memory held by idle UDP flows (#6856)

https://github.com/XTLS/Xray-core/pull/6856#issuecomment-5870639238
This commit is contained in:
Denis authored and GitHub committed 2026-10-05 01:56:36 +00:00
1 parent e0bae21201
commit 08775afd65
4 files changed
+245 -19

No files matched your search

+1 -1
View File
@@ -101,7 +101,7 @@ func (t *stackGVisor) Start() error {
// Use custom UDP packet handler, instead of strict gVisor forwarder, for FullCone NAT support
udpForwarder := newUdpConnectionHandler(t.handler.HandleConnection, t.writeRawUDPPacket)
ipStack.SetTransportProtocolHandler(udp.ProtocolNumber, func(id stack.TransportEndpointID, pkt *stack.PacketBuffer) bool {
data := pkt.Clone().Data().AsRange().ToSlice()
data := pkt.Data().AsRange().ToSlice()
// if len(data) == 0 {
// return false
// }