feat: VLESS support packet encodings (#334)
* adjust: Do not use XTLS on H2 connections * feat: VLESS support XUDP fullcone NAT * fix: VLESS with PacketAddr does not work * fix: VLESS XUDP crash
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
package vless
|
||||
|
||||
import (
|
||||
"github.com/Dreamacro/clash/common/utils"
|
||||
"net"
|
||||
|
||||
"github.com/Dreamacro/clash/common/utils"
|
||||
|
||||
"github.com/gofrs/uuid"
|
||||
)
|
||||
|
||||
@ -19,6 +20,7 @@ const (
|
||||
const (
|
||||
CommandTCP byte = 1
|
||||
CommandUDP byte = 2
|
||||
CommandMux byte = 3
|
||||
)
|
||||
|
||||
// Addr types
|
||||
@ -33,7 +35,8 @@ type DstAddr struct {
|
||||
UDP bool
|
||||
AddrType byte
|
||||
Addr []byte
|
||||
Port uint
|
||||
Port uint16
|
||||
Mux bool // currently used for XUDP only
|
||||
}
|
||||
|
||||
// Client is vless connection generator
|
||||
|
Reference in New Issue
Block a user