tailscale/net/tshttpproxy
Nick Khyl 191afd3390 net/tshttpproxy: fix WDAP/PAC proxy detection on Win10 1607 and earlier
Using WINHTTP_AUTOPROXY_ALLOW_AUTOCONFIG on Windows versions older than Windows 10 1703 (build 15063)
is not supported and causes WinHttpGetProxyForUrl to fail with ERROR_INVALID_PARAMETER. This results in failures
reaching the control on environments where a proxy is required.

We use wingoes version detection to conditionally set the WINHTTP_AUTOPROXY_ALLOW_AUTOCONFIG flag
on Windows builds greater than 15063.

While there, we also update proxy detection to use WINHTTP_AUTO_DETECT_TYPE_DNS_A, as DNS-based proxy discovery
might be required with Active Directory and in certain other environments.

Updates tailscale/corp#29168
Fixes #879

Signed-off-by: Nick Khyl <nickk@tailscale.com>
2025-05-29 14:28:37 -05:00
..
mksyscall.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
tshttpproxy_linux.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
tshttpproxy_synology_test.go all: fix golangci-lint errors 2025-01-07 13:05:37 -08:00
tshttpproxy_synology.go all: fix golangci-lint errors 2025-01-07 13:05:37 -08:00
tshttpproxy_test.go all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
tshttpproxy_windows.go net/tshttpproxy: fix WDAP/PAC proxy detection on Win10 1607 and earlier 2025-05-29 14:28:37 -05:00
tshttpproxy.go net/tshttpproxy: log when we're using a proxy 2024-02-22 19:22:50 -05:00
zsyscall_windows.go net/tshttpproxy: fix incorrect type in Windows implementation, switch to mkwinsyscall, fix memory leak 2022-07-27 16:33:57 -06:00