Documentation ¶
Index ¶
- Constants
- Variables
- func GetUTLSConn(conn net.Conn, ClientFingerprint string, tlsConfig *tls.Config) (net.Conn, bool)
- func IsV2rayHttpUpdate(r *http.Request) bool
- func IsWebSocketUpgrade(r *http.Request) bool
- func StreamH2Conn(conn net.Conn, cfg *H2Config) (net.Conn, error)
- func StreamHTTPConn(conn net.Conn, cfg *HTTPConfig) net.Conn
- func StreamTLSConn(ctx context.Context, conn net.Conn, cfg *TLSConfig) (net.Conn, error)
- func StreamUpgradedWebsocketConn(w http.ResponseWriter, r *http.Request) (net.Conn, error)
- func StreamWebsocketConn(ctx context.Context, conn net.Conn, c *WebsocketConfig) (net.Conn, error)
- type Client
- type Config
- type Conn
- type DstAddr
- type H2Config
- type HTTPConfig
- type ID
- type Security
- type TLSConfig
- type WebsocketConfig
Constants ¶
View Source
const ( OptionChunkStream byte = 1 OptionChunkMasking byte = 4 )
Request Options
View Source
const ( CommandTCP byte = 1 CommandUDP byte = 2 )
Command types
View Source
const ( AtypIPv4 byte = 1 AtypDomainName byte = 2 AtypIPv6 byte = 3 )
Addr types
View Source
const (
IDBytesLen = 16
)
ID cmdKey length
View Source
const Version byte = 1
Version of vmess
Variables ¶
View Source
var CipherMapping = map[string]byte{ "none": SecurityNone, "aes-128-gcm": SecurityAES128GCM, "chacha20-poly1305": SecurityCHACHA20POLY1305, }
CipherMapping return
Functions ¶
func GetUTLSConn ¶
func IsV2rayHttpUpdate ¶
func IsWebSocketUpgrade ¶
func StreamHTTPConn ¶
func StreamHTTPConn(conn net.Conn, cfg *HTTPConfig) net.Conn
func StreamTLSConn ¶
func StreamWebsocketConn ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is vmess connection generator
type Config ¶
type Config struct { UUID string AlterID uint16 Security string Port string HostName string IsAead bool }
Config of vmess
type HTTPConfig ¶
type ID ¶
type ID struct { UUID *uuid.UUID CmdKey []byte }
The ID of en entity, in the form of a UUID.
Click to show internal directories.
Click to hide internal directories.