Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion proxy.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -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 {
Expand Down