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.
func (*Server) GetSessions ¶ added in v1.90.0
func (s *Server) GetSessions() []status.ServerSession
GetSessions returns a slice of peer relay session statuses, with each entry containing detailed info about the server and clients involved in each session. This information is intended for debugging/status UX, and should not be relied on for any purpose outside of that.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package endpoint contains types relating to UDP relay server endpoints.
|
Package endpoint contains types relating to UDP relay server endpoints. |
|
Package status contains types relating to the status of peer relay sessions between peer relay client nodes via a peer relay server.
|
Package status contains types relating to the status of peer relay sessions between peer relay client nodes via a peer relay server. |