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 Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements an experimental UDP relay server.
func NewServer ¶
NewServer constructs a Server listening on 0.0.0.0:'port'. IPv6 is not yet supported. Port may be 0, and what ultimately gets bound is returned as 'boundPort'. Supplied 'addrs' are joined with 'boundPort' and returned as endpoint.ServerEndpoint.AddrPorts in response to Server.AllocateEndpoint() requests.
TODO: IPv6 support TODO: dynamic addrs:port discovery
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 ErrServerClosed if the server has been closed.