Skip to content

Commit

Permalink
shared/proxy: allow SOCKS5 proxy
Browse files Browse the repository at this point in the history
Signed-off-by: montag451 <[email protected]>
  • Loading branch information
montag451 committed Jul 24, 2023
1 parent fa2ec65 commit d9af620
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 d9af620

Please sign in to comment.