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
+10
View File
@@ -9,6 +9,7 @@ import (
"tailscale.com/ipn"
"tailscale.com/net/udprelay/endpoint"
"tailscale.com/tsd"
"tailscale.com/types/key"
"tailscale.com/types/ptr"
)
@@ -108,9 +109,18 @@ func Test_extension_profileStateChanged(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
sys := tsd.NewSystem()
bus := sys.Bus.Get()
e := &extension{
port: tt.fields.port,
server: tt.fields.server,
bus: bus,
}
if e.port != nil {
// Entering profileStateChanged with a non-nil port requires
// bus init, which is called in profileStateChanged when
// transitioning port from nil to non-nil.
e.initBusConnection()
}
e.profileStateChanged(ipn.LoginProfileView{}, tt.args.prefs, tt.args.sameNode)
if tt.wantNilServer != (e.server == nil) {