Versions in this module Expand all Collapse all v1 v1.1.0 Feb 21, 2026 v1.0.0 Feb 6, 2026 Changes in this version + func ParseProxyURL(proxyURL string) (addr, user, pass string, err error) + type Config struct + AutoReconnect bool + ConnectTimeout int + Logger Logger + ReadBufferSize int + TCPKeepAlive bool + TCPKeepAlivePeriod int + WriteBufferSize int + func DefaultConfig() Config + type Connection struct + func Dial(proxyURL, target string, config ...Config) (*Connection, error) + func DialContext(ctx context.Context, proxyURL, target string, config ...Config) (*Connection, error) + func (c *Connection) Close() error + func (c *Connection) PacketConn() *net.UDPConn + func (c *Connection) RelayAddr() *net.UDPAddr + func (c *Connection) Stats() Stats + func (c *Connection) Target() string + func (c *Connection) Tunnel() *Tunnel + type Logger interface + Debug func(msg string, args ...any) + Error func(msg string, args ...any) + Info func(msg string, args ...any) + type Manager struct + func NewManager(config ...Config) *Manager + func (m *Manager) AddTunnel(name, proxyURL string) (*Tunnel, error) + func (m *Manager) AddTunnelContext(ctx context.Context, name, proxyURL string) (*Tunnel, error) + func (m *Manager) CloseAll() + func (m *Manager) Dial(name, proxyURL, target string) (*Connection, error) + func (m *Manager) DialContext(ctx context.Context, name, proxyURL, target string) (*Connection, error) + func (m *Manager) GetTunnel(name string) (*Tunnel, error) + func (m *Manager) List() []string + func (m *Manager) RemoveTunnel(name string) error + type Stats struct + BytesRecv uint64 + BytesSent uint64 + PacketsRecv uint64 + PacketsSent uint64 + type Tunnel struct + func NewTunnel(proxyURL string, config ...Config) (*Tunnel, error) + func (t *Tunnel) Close() error + func (t *Tunnel) Connect() error + func (t *Tunnel) ConnectContext(ctx context.Context) error + func (t *Tunnel) Dial(target string) (*Connection, error) + func (t *Tunnel) DialContext(ctx context.Context, target string) (*Connection, error) + func (t *Tunnel) Stats() TunnelStats + type TunnelStats = Stats