chore: tuic server can handle V4 and V5 in same port

This commit is contained in:
wwqgtxx
2023-06-21 13:53:37 +08:00
parent 1d94546902
commit 6d824c8745
11 changed files with 474 additions and 432 deletions

View File

@ -35,6 +35,8 @@ const (
HeartbeatType = CommandType(0x04)
)
const VER byte = 0x05
func (c CommandType) String() string {
switch c {
case AuthenticateType:
@ -63,7 +65,7 @@ type CommandHead struct {
func NewCommandHead(TYPE CommandType) CommandHead {
return CommandHead{
VER: 0x05,
VER: VER,
TYPE: TYPE,
}
}