Documentation ¶
Index ¶
- Constants
- func AEADReader(r io.Reader, aead cipher.AEAD, iv []byte) io.Reader
- func AEADWriter(w io.Writer, aead cipher.AEAD, iv []byte) io.Writer
- func ChunkedReader(r io.Reader) io.Reader
- func ChunkedWriter(w io.Writer) io.Writer
- func GetKey(uuid [16]byte) []byte
- 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
Constants ¶
View Source
const ( OptBasicFormat byte = 0 OptChunkStream byte = 1 )
Request Options
View Source
const ( 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 AEADReader ¶
AEADReader returns a aead reader
func AEADWriter ¶
AEADWriter returns a aead writer
func ChunkedReader ¶
ChunkedReader returns a chunked reader
func ChunkedWriter ¶
ChunkedWriter returns a chunked writer
func GetKey ¶
GetKey returns the key of AES-128-CFB encrypter Key:MD5(UUID + []byte('c48619fe-8f02-49e0-b9e9-edf763e17e21'))
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.