tailscale/net
Brad Fitzpatrick f343b496c3 wgengine, all: remove LazyWG, use wireguard-go callback API for on-demand peers
Replace the UAPI text protocol-based wireguard configuration with
wireguard-go's new direct callback API (SetPeerLookupFunc,
SetPeerByIPPacketFunc, RemoveMatchingPeers, SetPrivateKey).

Instead of computing a trimmed wireguard config ahead of time upon
control plane updates and pushing it via UAPI, install callbacks so
wireguard-go creates peers on demand when packets arrive. This removes
all the LazyWG trimming machinery: idle peer tracking, activity maps,
noteRecvActivity callbacks, the KeepFullWGConfig control knob, and the
ts_omit_lazywg build tag.

For incoming packets, PeerLookupFunc answers wireguard-go's questions
about unknown public keys by looking up the peer in the full config.
For outgoing packets, PeerByIPPacketFunc (installed from
LocalBackend.lookupPeerByIP) maps destination IPs to node public keys
using the existing nodeByAddr index.

Updates tailscale/corp#12345

Change-Id: I4cba80979ac49a1231d00a01fdba5f0c2af95dd8
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-04-29 19:46:19 -07:00
..
ace all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
art all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
bakedroots all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
batching cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
captivedetection all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
connectproxy all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
dns net/dns: use os.Root to prevent path traversal in darwin resolver 2026-04-28 11:08:22 -04:00
dnscache all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
dnsfallback all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
flowtrack all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
ipset all: use bart.Lite instead of bart.Table where appropriate 2026-03-24 14:45:23 +00:00
ktimeout all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
memnet all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netaddr all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netcheck cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
neterror all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
netkernelconf all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netknob all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netmon ipn/ipnlocal,net/netmon: make frequent darkwake more efficient 2026-04-06 15:46:51 -07:00
netns netns: add Android callback to bind socket to network (#18915) 2026-03-11 12:28:28 -07:00
netstat all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netutil all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
netx all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
packet net,tsnet: fix the capitalisation of "Wireshark" 2026-03-26 19:39:29 +00:00
ping all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
portmapper all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
porttrack net/porttrack: change magic listen address format for Go 1.26 2026-03-04 21:57:05 -08:00
proxymux all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
routetable netns,wgengine: add OpenBSD support to netns via an rtable 2026-02-25 12:44:32 -08:00
sockopts all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
socks5 all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
sockstats all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
speedtest cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
stun cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
stunserver all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
tcpinfo all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
tlsdial tsd, all: add Sys.ExtraRootCAs, plumb through TLS dial paths 2026-04-07 18:10:54 -07:00
tsaddr all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
tsdial net/tsdial, ipn/localapi, client/local: let clients dial non-Tailscale addresses directly 2026-04-27 09:33:27 -07:00
tshttpproxy cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
tstun wgengine, all: remove LazyWG, use wireguard-go callback API for on-demand peers 2026-04-29 19:46:19 -07:00
udprelay cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
wsconn all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00