mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-02 00:19:24 +00:00
refactor bytes functions
This commit is contained in:
@@ -49,7 +49,7 @@ func ChunkKeyGenerator(iv []byte) func() []byte {
|
||||
return func() []byte {
|
||||
newKey := make([]byte, 0, len(iv)+4)
|
||||
newKey = append(newKey, iv...)
|
||||
newKey = append(newKey, serial.IntToBytes(chunkId)...)
|
||||
serial.IntToBytes(chunkId, newKey)
|
||||
chunkId++
|
||||
return newKey
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ func (this *Server) handlerUDPPayload(payload *alloc.Buffer, source v2net.Destin
|
||||
writer.Write([]byte(request.Address.Domain()))
|
||||
}
|
||||
|
||||
writer.Write(request.Port.Bytes())
|
||||
writer.Write(request.Port.Bytes(nil))
|
||||
writer.Write(payload.Value)
|
||||
|
||||
if request.OTA {
|
||||
|
||||
Reference in New Issue
Block a user