From 9be1917c5bbdd21e44287a8850e01e383efabc15 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 24 Aug 2020 09:21:33 -0700 Subject: [PATCH] net/tshttpproxy: discard secondary Windows proxies for now --- net/tshttpproxy/tshttpproxy_windows.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/tshttpproxy/tshttpproxy_windows.go b/net/tshttpproxy/tshttpproxy_windows.go index 382df745f..cf67483f6 100644 --- a/net/tshttpproxy/tshttpproxy_windows.go +++ b/net/tshttpproxy/tshttpproxy_windows.go @@ -51,6 +51,10 @@ func proxyFromWinHTTP(req *http.Request) (*url.URL, error) { return nil, nil } if v != "" { + // Discard all but first proxy value for now. + if i := strings.Index(v, ";"); i != -1 { + v = v[:i] + } if !strings.HasPrefix(v, "https://") { v = "http://" + v }