udprelay
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package udprelay contains constructs for relaying Disco and WireGuard packetsbetween Tailscale clients over UDP. This package is currently consideredexperimental.
Index¶
- Variables
- type ErrServerNotReady
- type Server
- func (s *Server) AllocateEndpoint(discoA, discoB key.DiscoPublic) (endpoint.ServerEndpoint, error)
- func (s *Server) Close() error
- func (s *Server) GetSessions() []status.ServerSession
- func (s *Server) SetDERPMapView(view tailcfg.DERPMapView)
- func (s *Server) SetStaticAddrPorts(addrPorts views.Slice[netip.AddrPort])
Constants¶
This section is empty.
Variables¶
var ErrServerClosed =errors.New("server closed")Functions¶
This section is empty.
Types¶
typeErrServerNotReady¶added inv1.86.0
ErrServerNotReady indicates the server is not ready. Allocation should berequested after waiting for at least RetryAfter duration.
func (ErrServerNotReady)Error¶added inv1.86.0
func (eErrServerNotReady) Error()string
typeServer¶
type Server struct {// contains filtered or unexported fields}Server implements an experimental UDP relay server.
funcNewServer¶
NewServer constructs aServer listening on port. If port is zero, thenport selection is left up to the host networking stack. IfonlyStaticAddrPorts is true, then dynamic addr:port discovery will bedisabled, and only addr:port's set viaServer.SetStaticAddrPorts will beused.
func (*Server)AllocateEndpoint¶
func (s *Server) AllocateEndpoint(discoA, discoBkey.DiscoPublic) (endpoint.ServerEndpoint,error)
AllocateEndpoint allocates anendpoint.ServerEndpoint for the provided pairofkey.DiscoPublic's. If an allocation already exists for discoA and discoBit is returned without modification/reallocation. AllocateEndpoint returnsthe following notable errors:
- ErrServerClosed if the server has been closed.
- ErrServerNotReady if the server is not ready.
func (*Server)GetSessions¶added inv1.90.0
func (s *Server) GetSessions() []status.ServerSession
GetSessions returns a slice of peer relay session statuses, with eachentry containing detailed info about the server and clients involved ineach session. This information is intended for debugging/status UX, andshould not be relied on for any purpose outside of that.
func (*Server)SetDERPMapView¶added inv1.90.7
func (s *Server) SetDERPMapView(viewtailcfg.DERPMapView)
SetDERPMapView sets thetailcfg.DERPMapView to use for future netcheckreports.
func (*Server)SetStaticAddrPorts¶added inv1.92.0
SetStaticAddrPorts sets addr:port pairs theServer will advertiseas candidates it is potentially reachable over, in combination withdynamically discovered pairs. This replaces any previously-provided staticvalues.
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. |