From 9812de853bac5c61ac38f6497014e7db1e4e290e Mon Sep 17 00:00:00 2001 From: Zoltan Papp Date: Fri, 1 Nov 2024 00:33:25 +0100 Subject: [PATCH] Allocate new buffer for every package (#2823) --- client/iface/wgproxy/bind/proxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/iface/wgproxy/bind/proxy.go b/client/iface/wgproxy/bind/proxy.go index e986d6d7b07..e0883715a99 100644 --- a/client/iface/wgproxy/bind/proxy.go +++ b/client/iface/wgproxy/bind/proxy.go @@ -104,8 +104,8 @@ func (p *ProxyBind) proxyToLocal(ctx context.Context) { } }() - buf := make([]byte, 1500) for { + buf := make([]byte, 1500) n, err := p.remoteConn.Read(buf) if err != nil { if ctx.Err() != nil {