1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-10-13 12:34:10 -04:00

support packet transfer type in mux

This commit is contained in:
Darien Raymond
2017-05-02 22:23:07 +02:00
parent 96da76c5b0
commit 7a4bab4940
13 changed files with 258 additions and 161 deletions

View File

@@ -6,8 +6,6 @@ import (
"golang.org/x/crypto/sha3"
"v2ray.com/core/common/crypto"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"
)
@@ -108,11 +106,3 @@ func (s *ShakeSizeParser) Encode(size uint16, b []byte) []byte {
mask := s.next()
return serial.Uint16ToBytes(mask^size, b[:0])
}
func GetStreamMode(request *protocol.RequestHeader) crypto.StreamMode {
if request.Command == protocol.RequestCommandTCP {
return crypto.ModeStream
}
return crypto.ModePacket
}