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

@ -36,6 +36,8 @@ const (
ResponseType = CommandType(0xff)
)
const VER byte = 0x04
func (c CommandType) String() string {
switch c {
case AuthenticateType:
@ -66,7 +68,7 @@ type CommandHead struct {
func NewCommandHead(TYPE CommandType) CommandHead {
return CommandHead{
VER: 0x04,
VER: VER,
TYPE: TYPE,
}
}