mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-01 16:18:24 +00:00
refactor bytes functions
This commit is contained in:
@@ -306,5 +306,5 @@ func (r *Socks5Response) Write(writer io.Writer) {
|
||||
case 0x04:
|
||||
writer.Write(r.IPv6[:])
|
||||
}
|
||||
writer.Write(r.Port.Bytes())
|
||||
writer.Write(r.Port.Bytes(nil))
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ func (request *Socks5UDPRequest) Write(buffer *alloc.Buffer) {
|
||||
case request.Address.IsDomain():
|
||||
buffer.AppendBytes(AddrTypeDomain, byte(len(request.Address.Domain()))).Append([]byte(request.Address.Domain()))
|
||||
}
|
||||
buffer.Append(request.Port.Bytes())
|
||||
buffer.AppendUint16(request.Port.Value())
|
||||
buffer.Append(request.Data.Value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user