Versions in this module Expand all Collapse all v0 v0.1.0 Nov 18, 2026 Changes in this version + const AddressFamilyIPv4 + const AddressFamilyIPv6 + const CandidateSelectionACK + const CandidateSelectionFanout + const StrategyAuto + const StrategyBirthday + const StrategyDirect + const StrategyPredictive + var ErrClosed = fmt.Errorf("burrow: closed: %w", net.ErrClosed) + var ErrNoListener = errors.New("burrow: no listener in room") + var ErrProofMismatch = errors.New("burrow: signal proof verification failed") + var ErrProofRejected = errors.New("burrow: session proof rejected") + var ErrPunchFailed = errors.New("burrow: hole punching failed") + var ErrResourceLimit = errors.New("burrow: candidate resource budget exhausted") + var ErrSelectionFailed = errors.New("burrow: candidate selection failed") + var ErrStrategyMismatch = errors.New("burrow: strategy or parameters differ between peers") + var ErrUnsupportedNATPair = errors.New("burrow: NAT pair cannot be classified automatically") + var ErrUnsupportedPlatform = errors.New(...) + func QueryUDPMappedAddr(conn net.PacketConn, server string, timeout time.Duration) (*net.UDPAddr, error) + func SetDebug(on bool) + type BirthdayDialDiagnostics struct + Armed int + Connected int + DialErrors BirthdayDialErrorCounts + Requested int + type BirthdayDialErrorCounts struct + Canceled int + Other int + Refused int + Resource int + Timeout int + type BirthdayDialSet struct + Armed <-chan int + Connections <-chan net.Conn + Done <-chan struct{} + func LaunchBirthdayDialSet(ctx context.Context, specs []BirthdayDialSpec, ...) *BirthdayDialSet + func (s *BirthdayDialSet) Diagnostics() BirthdayDialDiagnostics + type BirthdayDialSpec struct + LocalAddr string + Target string + type BirthdayOptions struct + AttemptTimeout time.Duration + Candidates int + MaxPort uint16 + MaxSuccessCandidates int + MinPort uint16 + Selection CandidateSelection + SuccessGrace time.Duration + Warmup time.Duration + type CandidateSelection = signalproto.Selection + type Config struct + AcceptQueue int + AddressFamily string + BindInterface string + Birthday BirthdayOptions + Control func(network, address string, c syscall.RawConn) error + DebugLog DebugLogFunc + InfoLog LogFunc + InterfaceAddr func(name string) string + InterfaceName func() string + MaxConcurrentAttempts int + Mode string + NATProbe NATProbeOptions + PairTimeout time.Duration + PortScanRange int + Predictive PredictiveOptions + PunchTimeout time.Duration + ResolveIP ResolveIPFunc + Room string + SignalAddr string + StableSide bool + StatsLog func(TCPStats) + Strategy Strategy + type DebugLogFunc = LogFunc + type Dialer struct + func NewDialer(cfg Config) (*Dialer, error) + func (d *Dialer) Close() error + func (d *Dialer) Dial(ctx context.Context) (net.Conn, error) + func (d *Dialer) ResetSignal() + type Listener struct + func Listen(cfg Config) (*Listener, error) + func (l *Listener) Accept() (net.Conn, error) + func (l *Listener) Addr() net.Addr + func (l *Listener) Close() error + func (l *Listener) ResetSignal() + type LogFunc func(format string, args ...any) + type NATProbeOptions struct + CacheTTL time.Duration + InitialSamples int + MaxSamples int + Targets []string + Timeout time.Duration + type PacketAttempt struct + Paths []PacketPath + Session string + Strategy Strategy + User int + func (a *PacketAttempt) Close() error + func (a *PacketAttempt) Commit(path int, peer netip.AddrPort) (net.PacketConn, error) + type PacketConfig struct + BindInterface string + Birthday BirthdayOptions + Control func(network, address string, c syscall.RawConn) error + DebugLog DebugLogFunc + InfoLog LogFunc + InterfaceAddr func(string) string + InterfaceName func() string + MaxConcurrentAttempts int + Mode string + PairTimeout time.Duration + Predictive PredictiveOptions + PunchTimeout time.Duration + ResolveIP ResolveIPFunc + Room string + STUN STUNOptions + SignProof ProofSigner + SignalAddr string + StableSide bool + Strategy Strategy + VerifyProof ProofVerifier + type PacketDialer struct + func NewPacketDialer(cfg PacketConfig) (*PacketDialer, error) + func (d *PacketDialer) Close() error + func (d *PacketDialer) DialPacket(ctx context.Context) (*PacketAttempt, error) + func (d *PacketDialer) ResetSignal() + type PacketListener struct + func ListenPacket(cfg PacketConfig) (*PacketListener, error) + func (l *PacketListener) AcceptPacket(ctx context.Context) (*PacketAttempt, error) + func (l *PacketListener) Close() error + func (l *PacketListener) ResetSignal() + type PacketPath struct + Conn *net.UDPConn + PublicAddr netip.AddrPort + Remotes []netip.AddrPort + type PredictiveOptions struct + AttemptTimeout time.Duration + Concurrency int + PortScanRange int + type ProofContext struct + Endpoint string + Fingerprint string + Profile string + Room string + Session string + Strategy Strategy + Transport string + type ProofSigner func(ctx ProofContext) (string, error) + func NewProofSigner(password string) ProofSigner + type ProofVerifier func(ctx ProofContext, proof string) error + func NewProofVerifier(password string) ProofVerifier + type ResolveIPFunc func(ctx context.Context, host string) ([]netip.Addr, error) + type STUNOptions struct + CacheTTL time.Duration + InitialSamples int + MaxSamples int + Servers []string + Timeout time.Duration + type Strategy = signalproto.Strategy + type TCPStats struct + CongestionWindow uint64 + Interval time.Duration + LocalAddr string + RTT time.Duration + ReceiveSpace uint64 + ReceiveWindow uint64 + RemoteAddr string + RetransBytes uint64 + RetransPackets uint64 + Role string + RxBytes uint64 + RxPackets uint64 + Session string + TotalRetransBytes uint64 + TotalRxBytes uint64 + TotalTxBytes uint64 + TxBytes uint64 + TxPackets uint64