Documentation ¶
Index ¶
- Constants
- func GetKey(uuid [16]byte) []byte
- func NewVMessDialer(s string, dialer proxy.Dialer) (proxy.Dialer, error)
- func ParseAddr(s string) (Atyp, Addr, Port, error)
- func StrToUUID(s string) (uuid [16]byte, err error)
- func TimestampHash(t time.Time) []byte
- type Addr
- type Atyp
- type Client
- type Conn
- type Port
- type User
- type VMess
Constants ¶
View Source
const ( OptChunkStream byte = 1 OptReuseTCPConnection byte = 2 OptMetadataObfuscate byte = 4 )
Request Options
View Source
const ( SecurityUnknown byte = 0 // don't use in client SecurityLegacy byte = 1 // don't use in client (aes-128-cfb) SecurityAuto byte = 2 // don't use in client SecurityAES128GCM byte = 3 SecurityChacha20Poly1305 byte = 4 SecurityNone byte = 5 )
Security types
View Source
const ( CmdTCP byte = 1 CmdUDP byte = 2 )
CMD types
Variables ¶
This section is empty.
Functions ¶
func GetKey ¶
GetKey returns the key of AES-128-CFB encrypter Key:MD5(UUID + []byte('c48619fe-8f02-49e0-b9e9-edf763e17e21'))
func NewVMessDialer ¶
NewVMessDialer returns a vmess proxy dialer.
func TimestampHash ¶
TimestampHash returns the iv of AES-128-CFB encrypter IV:MD5(X + X + X + X),X = []byte(timestamp.now) (8 bytes, Big Endian)
Types ¶
type Conn ¶
Conn is a connection to vmess server
func (*Conn) EncodeAuthInfo ¶
EncodeAuthInfo returns HMAC("md5", UUID, UTC) result
func (*Conn) EncodeRequest ¶
EncodeRequest encodes requests to network bytes
type User ¶
User of vmess client
func (*User) GenAlterIDUsers ¶
GenAlterIDUsers generates users according to primary user's id and alterID
Click to show internal directories.
Click to hide internal directories.