mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-24 02:31:18 -08:00
Contining the trend of making everything be optional that could possibly be optional, this makes the magicsock UDP underlay transport be optional. (mostly replacing a bunch of GOOS != "js" checks in the process) Omitting udptransport (ts_omit_udptransport) makes magicsock DERP-only: no UDP sockets, no advertised endpoints, and netcheck measures DERP latency over HTTPS. Omitting only nattraversal keeps disco ping/pong to peers' advertised endpoints but drops STUN, call-me-maybe, the peer relay client, the endpoint tracker, and UDP lifetime probing. Both are plain linker dead-code elimination via buildfeatures constants. (as oppposed to moving the code all over into feature packages and indirecting through hooks) The minimal linux/amd64 tailscaled shrinks by 258 KB without nattraversal and 561 KB without both. Updates #12614 Change-Id: Ife10804b48a168d9481e4321c18ed8fc85fa71f1 Signed-off-by: Brad Fitzpatrick <[email protected]>
14 lines
538 B
Go
14 lines
538 B
Go
// Copyright (c) Tailscale Inc & contributors
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
// Code generated by gen.go; DO NOT EDIT.
|
|
|
|
//go:build ts_omit_udptransport
|
|
|
|
package buildfeatures
|
|
|
|
// HasUDPTransport is whether the binary was built with support for modular feature "UDP transport to peers (if omitted, all peer traffic is relayed over DERP)".
|
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_udptransport" build tag.
|
|
// It's a const so it can be used for dead code elimination.
|
|
const HasUDPTransport = false
|