Update freedom.go

This commit is contained in:
风扇滑翔翼 2025-07-12 00:56:12 +08:00 committed by patterniha
parent d34035e644
commit 1cdca10352

View file

@ -314,6 +314,8 @@ func (r *PacketReader) ReadMultiBuffer() (buf.MultiBuffer, error) {
return nil, err
}
b.Resize(0, int32(n))
// if udp dest addr is changed, we are unable to get the correct src addr
// so we don't attach src info to udp packet, break cone behavior, assuming the dial dest is the expected scr addr
if !r.IsAddrChanged {
b.UDP = &net.Destination{
Address: net.IPAddress(d.(*net.UDPAddr).IP),