refactor bytes functions

This commit is contained in:
v2ray
2016-06-26 22:34:48 +02:00
parent d12d5b0593
commit 67ac925ee7
16 changed files with 78 additions and 64 deletions
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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 {