Documentation ¶
Index ¶
- Constants
- func AddrString(atyp Atyp, addr Addr, port Port) string
- func NewVLessDialer(s string, dialer proxy.Dialer) (proxy.Dialer, error)
- func NewVLessServer(s string, p proxy.Proxy) (proxy.Server, error)
- func ParseAddr(s string) (Atyp, Addr, Port, error)
- func ReadAddr(r io.Reader) (atyp Atyp, host Addr, port Port, err error)
- func ReadAddrString(r io.Reader) (string, error)
- func StrToUUID(s string) (uuid [16]byte, err error)
- type Addr
- type Atyp
- type ClientConn
- type CmdType
- type PktConn
- type Port
- type ServerConn
- type VLess
Constants ¶
View Source
const MaxHostLen = 255
MaxHostLen is the maximum size of host in bytes.
View Source
const Version byte = 0
Version of vless protocol.
Variables ¶
This section is empty.
Functions ¶
func AddrString ¶ added in v0.11.1
AddrString returns a addr string in format of "host:port".
func NewVLessDialer ¶
NewVLessDialer returns a vless proxy dialer.
func NewVLessServer ¶ added in v0.11.1
NewVLessServer returns a vless proxy server.
func ReadAddrString ¶ added in v0.11.1
ReadAddrString reads just enough bytes from r to get addr string.
Types ¶
type ClientConn ¶
ClientConn is a vless client connection.
func NewClientConn ¶ added in v0.11.1
NewClientConn returns a new vless client conn.
type PktConn ¶
PktConn is a udp Packet.Conn.
func NewPktConn ¶
NewPktConn returns a PktConn.
type ServerConn ¶ added in v0.11.1
ServerConn is a vless client connection.
func NewServerConn ¶ added in v0.11.1
func NewServerConn(c net.Conn) *ServerConn
NewServerConn returns a new vless client conn.
type VLess ¶
type VLess struct {
// contains filtered or unexported fields
}
VLess struct.
func (*VLess) DialUDP ¶
func (s *VLess) DialUDP(network, addr string) (net.PacketConn, error)
DialUDP connects to the given address via the proxy.
func (*VLess) ListenAndServe ¶ added in v0.11.1
func (s *VLess) ListenAndServe()
ListenAndServe listen and serves connections.
Click to show internal directories.
Click to hide internal directories.