Versions in this module Expand all Collapse all v0 v0.0.2 Mar 11, 2024 v0.0.1 Mar 11, 2024 Changes in this version + const MaxWeight + var ErrBadVersion = errors.New("bad version") + var ErrRateLimit = errors.New("rate limiting exceeded") + var ErrTunnelID = errors.New("invalid tunnel ID") + var ErrTunnelNotAvailable = errors.New("tunnel not available") + var ErrUnauthorized = errors.New("unauthorized") + var ErrUnknownCmd = errors.New("unknown command") + func NewHandler(opts ...handler.Option) handler.Handler + type Connector struct + func NewConnector(id relay.ConnectorID, tid relay.TunnelID, node string, s *mux.Session, ...) *Connector + func (c *Connector) ID() relay.ConnectorID + func (c *Connector) Session() *mux.Session + type ConnectorPool struct + func NewConnectorPool(node string, sd sd.SD) *ConnectorPool + func (p *ConnectorPool) Add(tid relay.TunnelID, c *Connector, ttl time.Duration) + func (p *ConnectorPool) Get(network string, tid string) *Connector + type Dialer struct + func (d *Dialer) Dial(ctx context.Context, network string, tid string) (conn net.Conn, node string, cid string, err error) + type Tunnel struct + func NewTunnel(node string, tid relay.TunnelID, ttl time.Duration) *Tunnel + func (t *Tunnel) AddConnector(c *Connector) + func (t *Tunnel) CloseOnIdle() bool + func (t *Tunnel) GetConnector(network string) *Connector + func (t *Tunnel) ID() relay.TunnelID + func (t *Tunnel) WithSD(sd sd.SD)