tailscale/wgengine/router/dns
David Anderson 68ddf134d7 wgengine/router/dns: issue ipconfig /registerdns when applying DNS settings.
Amazingly, there doesn't seem to be a documented way of updating network
configuration programmatically in a way that Windows takes notice of.
The naturopathic remedy for this is to invoke ipconfig /registerdns, which
does a variety of harmless things and also invokes the private API that
tells windows to notice new adapter settings. This makes our DNS config
changes stick within a few seconds of us setting them.

If we're invoking a shell command anyway, why futz with the registry at
all? Because netsh has no command for changing the DNS suffix list, and
its commands for setting resolvers requires parsing its output and
keeping track of which server is in what index. Amazingly, twiddling
the registry directly is the less painful option.

Fixes #853.

Signed-off-by: David Anderson <danderson@tailscale.com>
2020-10-29 20:05:38 -07:00
..
config.go tailcfg, tsdns: derive root domains from list of nodes (#708) 2020-08-24 17:27:21 -04:00
direct.go all: dns refactor, add Proxied and PerDomain flags from control (#615) 2020-07-31 16:27:09 -04:00
manager_default.go all: dns refactor, add Proxied and PerDomain flags from control (#615) 2020-07-31 16:27:09 -04:00
manager_freebsd.go all: dns refactor, add Proxied and PerDomain flags from control (#615) 2020-07-31 16:27:09 -04:00
manager_linux.go all: dns refactor, add Proxied and PerDomain flags from control (#615) 2020-07-31 16:27:09 -04:00
manager_openbsd.go all: dns refactor, add Proxied and PerDomain flags from control (#615) 2020-07-31 16:27:09 -04:00
manager_windows.go wgengine/router/dns: issue ipconfig /registerdns when applying DNS settings. 2020-10-29 20:05:38 -07:00
manager.go wgengine/router/dns: appease staticcheck (again) 2020-09-11 11:02:57 -07:00
nm.go router/dns: detect host endianness for NetworkManager. 2020-08-12 16:13:05 -04:00
noop.go all: dns refactor, add Proxied and PerDomain flags from control (#615) 2020-07-31 16:27:09 -04:00
resolvconf.go all: dns refactor, add Proxied and PerDomain flags from control (#615) 2020-07-31 16:27:09 -04:00
resolved.go all: dns refactor, add Proxied and PerDomain flags from control (#615) 2020-07-31 16:27:09 -04:00