Versions in this module Expand all Collapse all v1 v1.3.1 May 29, 2026 v1.3.0 May 27, 2026 Changes in this version + func MaintainTunnel(ctx context.Context, cfg MaintainTunnelConfig) + func RunHook(path string, extraEnv map[string]string) + type MaintainTunnelConfig struct + AlwaysReconnect bool + Device TunnelDevice + Endpoint net.Addr + HookEnv map[string]string + InitialPacketSize uint16 + KeepalivePeriod time.Duration + MTU int + OnConnect string + OnDisconnect string + ReconnectDelay time.Duration + TLSConfig *tls.Config + UseHTTP2 bool + type NetBuffer struct + func NewNetBuffer(capacity int) *NetBuffer + func (n *NetBuffer) Get() []byte + func (n *NetBuffer) Put(buf []byte) + type NetstackAdapter struct + func (n *NetstackAdapter) ReadPacket(buf []byte) (int, error) + func (n *NetstackAdapter) WritePacket(pkt []byte) error + type TunnelDevice interface + ReadPacket func(buf []byte) (int, error) + WritePacket func(pkt []byte) error + func NewNetstackAdapter(dev tun.Device) TunnelDevice