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 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 ¶
const ( OptBasicFormat byte = 0 OptChunkStream byte = 1 )
Request Options
const ( SecurityAES128GCM byte = 3 SecurityChacha20Poly1305 byte = 4 SecurityNone byte = 5 )
Security types
const ( CmdTCP byte = 1 CmdUDP byte = 2 )
CMD types
Variables ¶
This section is empty.
Functions ¶
func AEADReader ¶ added in v0.6.2
AEADReader returns a aead reader.
func AEADWriter ¶ added in v0.6.2
AEADWriter returns a aead writer.
func ChunkedReader ¶ added in v0.6.2
ChunkedReader returns a chunked reader.
func ChunkedWriter ¶ added in v0.6.2
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 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 Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a vmess client.
type Conn ¶
Conn is a connection to vmess server.
func (*Conn) DecodeRespHeader ¶
DecodeRespHeader decodes response header.
type User ¶
User of vmess client.
func (*User) GenAlterIDUsers ¶
GenAlterIDUsers generates users according to primary user's id and alterID.