mirror of https://github.com/XTLS/Xray-core
Update packet.go
parent
defe743b23
commit
b6a6d80cff
|
@ -37,11 +37,9 @@ func (w *PacketConnWrapper) ReadPacket(buffer *B.Buffer) (M.Socksaddr, error) {
|
||||||
} else {
|
} else {
|
||||||
buffer.Write(bb.Bytes())
|
buffer.Write(bb.Bytes())
|
||||||
w.cached = mb
|
w.cached = mb
|
||||||
var destination net.Destination
|
var destination net.Destination = w.Dest
|
||||||
if bb.UDP != nil {
|
if bb.UDP != nil {
|
||||||
destination = *bb.UDP
|
destination = *bb.UDP
|
||||||
} else {
|
|
||||||
destination = w.Dest
|
|
||||||
}
|
}
|
||||||
bb.Release()
|
bb.Release()
|
||||||
return ToSocksaddr(destination), nil
|
return ToSocksaddr(destination), nil
|
||||||
|
@ -57,11 +55,9 @@ func (w *PacketConnWrapper) ReadPacket(buffer *B.Buffer) (M.Socksaddr, error) {
|
||||||
} else {
|
} else {
|
||||||
buffer.Write(bb.Bytes())
|
buffer.Write(bb.Bytes())
|
||||||
w.cached = nb
|
w.cached = nb
|
||||||
var destination net.Destination
|
var destination net.Destination = w.Dest
|
||||||
if bb.UDP != nil {
|
if bb.UDP != nil {
|
||||||
destination = *bb.UDP
|
destination = *bb.UDP
|
||||||
} else {
|
|
||||||
destination = w.Dest
|
|
||||||
}
|
}
|
||||||
bb.Release()
|
bb.Release()
|
||||||
return ToSocksaddr(destination), nil
|
return ToSocksaddr(destination), nil
|
||||||
|
|
Loading…
Reference in New Issue