tshttpproxy, controlclient, derphttp, logpolicy: send Negotiate auth to proxies

For Windows only, and only when built with Tailscale's Go tree.

Updates tailscale/corp#583
This commit is contained in:
Brad Fitzpatrick
2020-08-26 20:02:16 -07:00
parent 756d6a72bd
commit 28f9cd06f5
5 changed files with 61 additions and 1 deletions

View File

@@ -149,6 +149,7 @@ func NewDirect(opts Options) (*Direct, error) {
dialer := netns.NewDialer()
tr := http.DefaultTransport.(*http.Transport).Clone()
tr.Proxy = tshttpproxy.ProxyFromEnvironment
tshttpproxy.SetTransportGetProxyConnectHeader(tr)
tr.DialContext = dialer.DialContext
tr.ForceAttemptHTTP2 = true
tr.TLSClientConfig = tlsdial.Config(serverURL.Host, tr.TLSClientConfig)