Skip to content

Commit

Permalink
fix: gvisor stack's dns hijack not working
Browse files Browse the repository at this point in the history
  • Loading branch information
wwqgtxx committed Dec 8, 2023
1 parent b538aa6 commit fdc9c01
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions listener/sing_tun/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit fdc9c01

Please sign in to comment.