Movatterモバイル変換


[0]ホーム

URL:


udprelay

package
v1.92.2Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2025 License:BSD-3-ClauseImports:33Imported by:0

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package udprelay contains constructs for relaying Disco and WireGuard packetsbetween Tailscale clients over UDP. This package is currently consideredexperimental.

Index

Constants

This section is empty.

Variables

View Source
var ErrServerClosed =errors.New("server closed")

Functions

This section is empty.

Types

typeErrServerNotReadyadded inv1.86.0

type ErrServerNotReady struct {RetryAftertime.Duration}

ErrServerNotReady indicates the server is not ready. Allocation should berequested after waiting for at least RetryAfter duration.

func (ErrServerNotReady)Erroradded inv1.86.0

func (eErrServerNotReady) Error()string

typeServer

type Server struct {// contains filtered or unexported fields}

Server implements an experimental UDP relay server.

funcNewServer

func NewServer(logflogger.Logf, portuint16, onlyStaticAddrPortsbool) (s *Server, errerror)

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:

  1. ErrServerClosed if the server has been closed.
  2. ErrServerNotReady if the server is not ready.

func (*Server)Close

func (s *Server) Close()error

Close closes the server.

func (*Server)GetSessionsadded 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)SetDERPMapViewadded inv1.90.7

func (s *Server) SetDERPMapView(viewtailcfg.DERPMapView)

SetDERPMapView sets thetailcfg.DERPMapView to use for future netcheckreports.

func (*Server)SetStaticAddrPortsadded inv1.92.0

func (s *Server) SetStaticAddrPorts(addrPortsviews.Slice[netip.AddrPort])

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.

Source Files

View all Source files

Directories

PathSynopsis
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp