From e911f757c3dfa96143c87e93cdf8864c5f7c98ad Mon Sep 17 00:00:00 2001 From: evilsocket Date: Sat, 27 Jan 2018 16:29:01 +0100 Subject: [PATCH] fix: redirecting to http if http.proxy is running (should fix #29) --- modules/http_proxy_base.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/http_proxy_base.go b/modules/http_proxy_base.go index 3deaca39..832e8197 100644 --- a/modules/http_proxy_base.go +++ b/modules/http_proxy_base.go @@ -64,6 +64,9 @@ func NewHTTPProxy(s *session.Session) *HTTPProxy { p.Proxy.NonproxyHandler = http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { if p.doProxy(req) == true { + if p.isTLS == false { + req.URL.Scheme = "http" + } req.URL.Host = req.Host p.Proxy.ServeHTTP(w, req) }