tailscale/net
Nick Khyl 9741c1e846 control/controlknobs,net/dns,tailcfg: add a control knob that disables hosts file updates on Windows
In the absence of a better mechanism, writing unqualified hostnames to the hosts file may be required
for MagicDNS to work on some Windows environments, such as domain-joined machines. It can also
improve MagicDNS performance on non-domain joined devices when we are not the device's primary
DNS resolver.

At the same time, updating the hosts file can be slow and expensive, especially when it already contains
many entries, as was previously reported in #14327. It may also have negative side effects, such as interfering
with the system's DNS resolution policies.

Additionally, to fix #18712, we had to extend hosts file usage to domain-joined machines when we are not
the primary DNS resolver. For the reasons above, this change may introduce risk.

To allow customers to disable hosts file updates remotely without disabling MagicDNS entirely, whether on
domain-joined machines or not, this PR introduces the `disable-hosts-file-updates` node attribute.

Updates #18712
Updates #14327

Signed-off-by: Nick Khyl <nickk@tailscale.com>
2026-02-13 11:59:37 -06:00
..
ace all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
art all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
bakedroots all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
batching all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
captivedetection all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
connectproxy all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
dns control/controlknobs,net/dns,tailcfg: add a control knob that disables hosts file updates on Windows 2026-02-13 11:59:37 -06: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: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08: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 all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
neterror ipn/localapi: stop logging "broken pipe" errors (#18487) 2026-01-26 16:41: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 all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netns all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netstat all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netutil all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netx all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
packet all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08: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
proxymux all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
routetable all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
sockopts all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
socks5 all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
sockstats all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
speedtest all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
stun all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
stunserver all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
tcpinfo all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
tlsdial all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
tsaddr all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
tsdial all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
tshttpproxy all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
tstun tstun: add test for intercept ordering 2026-02-11 16:48:19 -05:00
udprelay all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
wsconn all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00