mirror of
https://github.com/lxc/incus
synced 2026-08-02 05:26:46 +00:00
[lxd-import] shared/proxy: allow SOCKS5 proxy
Signed-off-by: montag451 <montag451@laposte.net>
This commit is contained in:
parent
fc097b3991
commit
df94d23e89
@ -94,7 +94,7 @@ func FromConfig(httpsProxy string, httpProxy string, noProxy string) func(req *h
|
||||
}
|
||||
|
||||
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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user