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 GetWriteBuffer() *bytes.Buffer
- func NewVMessDialer(remote, uuid, sectp string, aid int, dialer proxy.Dialer) (proxy.Dialer, error)
- func ParseAddr(s string) (Atyp, Addr, Port, error)
- func PutWriteBuffer(buf *bytes.Buffer)
- 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 ¶
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 GetWriteBuffer ¶
GetWriteBuffer returns a bytes.buffer from pool.
func NewVMessDialer ¶
NewVMessDialer returns a vmess proxy dialer.
func PutWriteBuffer ¶
PutWriteBuffer puts a bytes.buffer into pool.
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.