Versions in this module Expand all Collapse all v0 v0.1.0 Nov 26, 2026 Changes in this version + const DefaultServerURL + const Version + var ErrKeepAliveTimeout = errors.New("tuna: keepalive timeout") + func Forward(ctx context.Context, o Options, localAddr string) error + func IsPermanent(err error) bool + type Event struct + Err error + ExpiresIn time.Duration + Message string + Reason string + RetryIn time.Duration + Type EventType + URL string + type EventType string + const EventBanner + const EventConnected + const EventLocalError + const EventReconnected + const EventReconnecting + const EventSessionExpiring + const EventTerminated + type Options struct + APIKey string + CIDRAllow []string + CIDRDeny []string + ClientName string + ConnectTimeout time.Duration + Domain string + Location string + OnEvent func(Event) + Port string + Protocol string + ProxyProtocol int + ServerURL string + Subdomain string + TLSConfig *tls.Config + type ServerError struct + Code string + Message string + RequestID string + RetryAfter time.Duration + Status int + func (e *ServerError) Error() string + type TerminatedError struct + Reason string + func (e *TerminatedError) Error() string + type Tunnel struct + func Listen(ctx context.Context, o Options) (*Tunnel, error) + func (t *Tunnel) Accept() (net.Conn, error) + func (t *Tunnel) Addr() net.Addr + func (t *Tunnel) Close() error + func (t *Tunnel) URL() string