From dcb0822aeaad7c42af2a281c2cbf530253bc2016 Mon Sep 17 00:00:00 2001 From: webbrain-one <295484252+webbrain-one@users.noreply.github.com> Date: Thu, 13 Aug 2026 06:08:01 +0300 Subject: [PATCH] Honor system proxy bypass list Respect system proxy exceptions when inferring settings. Requests to hosts in the bypass list are now routed directly. --- proxy.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/proxy.go b/proxy.go index b97a4bd..11991ab 100644 --- a/proxy.go +++ b/proxy.go @@ -41,7 +41,12 @@ func NewDialContext(p Proxy) DialContext { // if no provided Proxy.URL, infer from system settings if p.URL == nil || p.URL.String() == "" { debugf("proxy> No proxy provided. Attempting to infer from system.") - systemProxy := ggp.NewProvider("").GetProxy(p.TargetURL.Scheme, p.TargetURL.String()) + systemProxy, err := ggp.NewProvider("").GetProxy(p.TargetURL.Scheme, p.TargetURL.String()) + if err != nil { + debugf("proxy> Error inferring proxy from system: %v", err) + d := net.Dialer{} + return d.DialContext + } // if no Proxy.URL was provided and no URL could be determined from system, // then assume connection is direct. if systemProxy == nil {