commit 68221fd260c5989ebdbdd0e0a596c5c162fa0efd Author: David Fifield david@bamsoftware.com Date: Fri Feb 1 01:59:35 2019 -0700
Don't set the helper proxy when not using the helper.
It causes an error when it uses something unsupported, like username:password.
This was a regression added in 3fe68658f433adb2b8bec215d4daf48e81003cf7. --- meek-client/meek-client.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/meek-client/meek-client.go b/meek-client/meek-client.go index d773dcb..11c26d2 100644 --- a/meek-client/meek-client.go +++ b/meek-client/meek-client.go @@ -461,10 +461,12 @@ func main() { } log.Printf("using proxy %s", options.ProxyURL.String()) httpRoundTripper.Proxy = http.ProxyURL(options.ProxyURL) - err = helperRoundTripper.SetProxy(options.ProxyURL) - if err != nil { - pt.ProxyError(err.Error()) - log.Fatal(fmt.Sprintf("proxy error: %s", err)) + if options.UseHelper { + err = helperRoundTripper.SetProxy(options.ProxyURL) + if err != nil { + pt.ProxyError(err.Error()) + log.Fatal(fmt.Sprintf("proxy error: %s", err)) + } } if ptInfo.ProxyURL != nil { pt.ProxyDone()
tor-commits@lists.torproject.org