Documentation
¶
Overview ¶
Package udprelay contains constructs for relaying Disco and WireGuard packets between Tailscale clients over UDP. This package is currently considered experimental.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrServerClosed = errors.New("server closed")
Functions ¶
This section is empty.
Types ¶
type ErrServerNotReady ¶ added in v1.86.0
ErrServerNotReady indicates the server is not ready. Allocation should be requested after waiting for at least RetryAfter duration.
func (ErrServerNotReady) Error ¶ added in v1.86.0
func (e ErrServerNotReady) Error() string
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements an experimental UDP relay server.
func NewServer ¶
NewServer constructs a Server listening on port. If port is zero, then port selection is left up to the host networking stack. If len(overrideAddrs) > 0 these will be used in place of dynamic discovery, which is useful to override in tests.
func (*Server) AllocateEndpoint ¶
func (s *Server) AllocateEndpoint(discoA, discoB key.DiscoPublic) (endpoint.ServerEndpoint, error)
AllocateEndpoint allocates an endpoint.ServerEndpoint for the provided pair of key.DiscoPublic's. If an allocation already exists for discoA and discoB it is returned without modification/reallocation. AllocateEndpoint returns the following notable errors:
- ErrServerClosed if the server has been closed.
- ErrServerNotReady if the server is not ready.