From e1f14eab88066ee13c752d92caab1453de09211e Mon Sep 17 00:00:00 2001 From: Sergey Frolov Date: Tue, 31 Oct 2017 16:02:52 -0600 Subject: [PATCH] PAC file: configure to access localhost directly Implements #5 --- forwardproxy.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/forwardproxy.go b/forwardproxy.go index 56792e4..59fcd43 100644 --- a/forwardproxy.go +++ b/forwardproxy.go @@ -208,6 +208,8 @@ func (fp *ForwardProxy) shouldServePacFile(r *http.Request) bool { const pacFile = ` function FindProxyForURL(url, host) { + if (host === "127.0.0.1" || host === "::1" || host === "localhost") + return "DIRECT"; return "HTTPS %s:%s"; } `