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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user