fix: redirecting to http if http.proxy is running (should fix #29)

This commit is contained in:
evilsocket 2018-01-27 16:29:01 +01:00
commit e911f757c3

View file

@ -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)
}