Documentation ¶
Index ¶
- type ClientBind
- func (c *ClientBind) BatchSize() int
- func (c *ClientBind) Close() error
- func (c *ClientBind) Open(port uint16) (fns []conn.ReceiveFunc, actualPort uint16, err error)
- func (c *ClientBind) ParseEndpoint(s string) (conn.Endpoint, error)
- func (c *ClientBind) Send(bufs [][]byte, ep conn.Endpoint) error
- func (c *ClientBind) SetMark(mark uint32) error
- func (c *ClientBind) SetReservedForEndpoint(destination netip.AddrPort, reserved [3]byte)
- type Device
- type DeviceOptions
- type Endpoint
- func (e *Endpoint) BindUpdate() error
- func (e *Endpoint) Close() error
- func (e *Endpoint) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)
- func (e *Endpoint) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)
- func (e *Endpoint) Start(resolve bool) error
- type EndpointOptions
- type PeerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientBind ¶
type ClientBind struct {
// contains filtered or unexported fields
}
func NewClientBind ¶
func (*ClientBind) BatchSize ¶
func (c *ClientBind) BatchSize() int
func (*ClientBind) Close ¶
func (c *ClientBind) Close() error
func (*ClientBind) Open ¶
func (c *ClientBind) Open(port uint16) (fns []conn.ReceiveFunc, actualPort uint16, err error)
func (*ClientBind) ParseEndpoint ¶
func (c *ClientBind) ParseEndpoint(s string) (conn.Endpoint, error)
func (*ClientBind) SetMark ¶
func (c *ClientBind) SetMark(mark uint32) error
func (*ClientBind) SetReservedForEndpoint ¶
func (c *ClientBind) SetReservedForEndpoint(destination netip.AddrPort, reserved [3]byte)
type DeviceOptions ¶
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
func NewEndpoint ¶
func NewEndpoint(options EndpointOptions) (*Endpoint, error)
func (*Endpoint) BindUpdate ¶
func (*Endpoint) DialContext ¶
func (*Endpoint) ListenPacket ¶
type EndpointOptions ¶
type EndpointOptions struct { Context context.Context Logger logger.ContextLogger System bool Handler tun.Handler UDPTimeout time.Duration Dialer N.Dialer CreateDialer func(interfaceName string) N.Dialer Name string MTU uint32 Address []netip.Prefix PrivateKey string ListenPort uint16 ResolvePeer func(domain string) (netip.Addr, error) Peers []PeerOptions Workers int }
Click to show internal directories.
Click to hide internal directories.