diff --git a/listener/sing_tun/dns.go b/listener/sing_tun/dns.go index 57dcb1a5..9974eae4 100644 --- a/listener/sing_tun/dns.go +++ b/listener/sing_tun/dns.go @@ -149,6 +149,7 @@ func (h *ListenerHandler) NewPacketConnection(ctx context.Context, conn network. defer cancel() inData := readBuff.Bytes() writeBuff := readBuff + writeBuff.Resize(writeBuff.Start(), 0) if writeBuff.Cap() < rwOptions.MTU { // only create a new buffer when space don't enough writeBuff = rwOptions.NewPacketBuffer() }