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:
Jordan Whited
2025-07-21 10:02:37 -07:00
committed by GitHub
parent 5d4e67fd93
commit 1677fb1905
16 changed files with 1290 additions and 743 deletions

View File

@@ -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