Versions in this module Expand all Collapse all v0 v0.0.1 Sep 18, 2023 Changes in this version + type ClientBind struct + func NewClientBind(ctx context.Context, errorHandler E.Handler, dialer N.Dialer, isConnect bool, ...) *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) Reset() + func (c *ClientBind) Send(bufs [][]byte, ep conn.Endpoint) error + func (c *ClientBind) SetMark(mark uint32) error + func (c *ClientBind) SetReservedForEndpoint(destination M.Socksaddr, reserved [3]byte) + type Device interface + Start func() error + func NewStackDevice(localAddresses []netip.Prefix, mtu uint32) (Device, error) + type Endpoint M.Socksaddr + func (e Endpoint) ClearSrc() + func (e Endpoint) DstIP() netip.Addr + func (e Endpoint) DstToBytes() []byte + func (e Endpoint) DstToString() string + func (e Endpoint) SrcIP() netip.Addr + func (e Endpoint) SrcToString() string + type SystemDevice struct + func NewSystemDevice(router adapter.Router, interfaceName string, localPrefixes []netip.Prefix, ...) (*SystemDevice, error) + func (w *SystemDevice) BatchSize() int + func (w *SystemDevice) Close() error + func (w *SystemDevice) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (w *SystemDevice) Events() <-chan wgTun.Event + func (w *SystemDevice) File() *os.File + func (w *SystemDevice) Flush() error + func (w *SystemDevice) Inet4Address() netip.Addr + func (w *SystemDevice) Inet6Address() netip.Addr + func (w *SystemDevice) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (w *SystemDevice) MTU() (int, error) + func (w *SystemDevice) Name() (string, error) + func (w *SystemDevice) Read(bufs [][]byte, sizes []int, offset int) (count int, err error) + func (w *SystemDevice) Start() error + func (w *SystemDevice) Write(bufs [][]byte, offset int) (count int, err error)