Skip to content

Commit

Permalink
Merge pull request #12066 from montag451/socks5-proxy
Browse files Browse the repository at this point in the history
shared/proxy: allow SOCKS5 proxy
  • Loading branch information
tomponline authored Jul 24, 2023
2 parents f814ba6 + d9af620 commit 9ffb12a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func ProxyFromConfig(httpsProxy string, httpProxy string, noProxy string) func(r
}

proxyURL, err := url.Parse(proxy)
if err != nil || !strings.HasPrefix(proxyURL.Scheme, "http") {
if err != nil || (!strings.HasPrefix(proxyURL.Scheme, "http") && proxyURL.Scheme != "socks5") {
// proxy was bogus. Try prepending "http://" to it and
// see if that parses correctly. If not, we fall
// through and complain about the original one.
Expand Down

0 comments on commit 9ffb12a

Please sign in to comment.