mirror of
https://github.com/curl/curl.git
synced 2026-07-31 02:48:03 +03:00
socks proxy: allow socks5h:// prefix too
Using 'socks5h' as proxy protocol will make it a CURLPROXY_SOCKS5_HOSTNAME proxy which is SOCKS5 and asking the proxy to resolve host names. I found no "standard" protocol name for this.
This commit is contained in:
parent
fda0985bfd
commit
558f997e99
2 changed files with 8 additions and 4 deletions
|
|
@ -4069,7 +4069,9 @@ static CURLcode parse_proxy(struct SessionHandle *data,
|
|||
endofprot = strstr(proxy, "://");
|
||||
if(endofprot) {
|
||||
proxyptr = endofprot+3;
|
||||
if(checkprefix("socks5", proxy))
|
||||
if(checkprefix("socks5h", proxy))
|
||||
conn->proxytype = CURLPROXY_SOCKS5_HOSTNAME;
|
||||
else if(checkprefix("socks5", proxy))
|
||||
conn->proxytype = CURLPROXY_SOCKS5;
|
||||
else if(checkprefix("socks4a", proxy))
|
||||
conn->proxytype = CURLPROXY_SOCKS4A;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue