mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-21 10:27:30 +00:00
wgengine/magicsock,all: allocate peer relay over disco instead of PeerAPI (#16603)
Updates tailscale/corp#30583 Updates tailscale/corp#30534 Updates tailscale/corp#30557 Signed-off-by: Dylan Bargatze <dylan@tailscale.com> Signed-off-by: Jordan Whited <jordan@tailscale.com> Co-authored-by: Dylan Bargatze <dylan@tailscale.com>
This commit is contained in:
@@ -7,11 +7,16 @@ package endpoint
|
||||
|
||||
import (
|
||||
"net/netip"
|
||||
"time"
|
||||
|
||||
"tailscale.com/tstime"
|
||||
"tailscale.com/types/key"
|
||||
)
|
||||
|
||||
// ServerRetryAfter is the default
|
||||
// [tailscale.com/net/udprelay.ErrServerNotReady.RetryAfter] value.
|
||||
const ServerRetryAfter = time.Second * 3
|
||||
|
||||
// ServerEndpoint contains details for an endpoint served by a
|
||||
// [tailscale.com/net/udprelay.Server].
|
||||
type ServerEndpoint struct {
|
||||
@@ -21,6 +26,10 @@ type ServerEndpoint struct {
|
||||
// unique ServerEndpoint allocation.
|
||||
ServerDisco key.DiscoPublic
|
||||
|
||||
// ClientDisco are the Disco public keys of the relay participants permitted
|
||||
// to handshake with this endpoint.
|
||||
ClientDisco [2]key.DiscoPublic
|
||||
|
||||
// LamportID is unique and monotonically non-decreasing across
|
||||
// ServerEndpoint allocations for the lifetime of Server. It enables clients
|
||||
// to dedup and resolve allocation event order. Clients may race to allocate
|
||||
|
Reference in New Issue
Block a user