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 GetBuffer(size int) []byte
- func GetKey(uuid [16]byte) []byte
- func GetWriteBuffer() *bytes.Buffer
- func InitBufPools() []sync.Pool
- func InitWriteBufPool() sync.Pool
- func PutBuffer(buf []byte) error
- func PutWriteBuffer(buf *bytes.Buffer)
- func StrToUUID(s string) (uuid [16]byte, err error)
- func TimestampHash(unixSec int64) []byte
- type APIConfig
- type Client
- type Config
- type InboundConn
- type MySQLConfig
- type OutboundConn
- type Server
- type SessionId
- type Tunnel
- type User
- type UserAtTime
- type Users
Constants ¶
View Source
const ( TCP tunnel.Command = 1 UDP tunnel.Command = 2 )
View Source
const ( OptBasicFormat byte = 0 // 不加密传输 OptChunkStream byte = 1 // 分块传输,每个分块使用如下Security方法加密 )
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
View Source
const ( AtypIP4 byte = 1 AtypDomain byte = 2 AtypIP6 byte = 3 )
Atyp
View Source
const Name = "VMESS"
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 ¶
func InitBufPools ¶
func InitWriteBufPool ¶
func PutWriteBuffer ¶
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 APIConfig ¶ added in v1.0.7
type APIConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DialPacket ¶
type Config ¶
type Config struct { LocalHost string `json:"local_addr" yaml:"local-addr"` LocalPort int `json:"local_port" yaml:"local-port"` RemoteHost string `json:"remote_addr" yaml:"remote-addr"` RemotePort int `json:"remote_port" yaml:"remote-port"` UUID string `json:"uuid" yaml:"uuid"` AlterID int `json:"alterId" yaml:"alterId"` Security string `json:"security" yaml:"security"` Port string `json:"port" yaml:"port"` HostName string `json:"hostName" yaml:"hostName"` IsAead bool `json:"isAead" yaml:"isAead"` MySQL MySQLConfig `json:"mysql" yaml:"mysql"` API APIConfig `json:"api" yaml:"api"` }
type InboundConn ¶
InboundConn is a vmess inbound connection
func (*InboundConn) Close ¶ added in v1.0.7
func (c *InboundConn) Close() error
func (*InboundConn) Metadata ¶
func (c *InboundConn) Metadata() *tunnel.Metadata
type MySQLConfig ¶ added in v1.0.7
type MySQLConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
}
type OutboundConn ¶
func (*OutboundConn) Auth ¶
func (vc *OutboundConn) Auth() error
func (*OutboundConn) DecodeRespHeader ¶
func (vc *OutboundConn) DecodeRespHeader() error
func (*OutboundConn) Metadata ¶
func (c *OutboundConn) Metadata() *tunnel.Metadata
func (*OutboundConn) Request ¶
func (vc *OutboundConn) Request() error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AcceptPacket ¶
type User ¶
Vmess user
func (*User) GenAlterIDUsers ¶
GenAlterIDUsers generates users according to primary user's id and alterID
type UserAtTime ¶
type UserAtTime struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.