aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-05-05 11:47:55 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-05-05 11:47:55 +0200
commit558f997e99c4c8e4f6ed888a85d748b33920cdf2 (patch)
treedc3d362f3b0d82195f17dfa505a94c610ff3ced4 /lib
parentfda0985bfde585f66dc64d2cd7483fcd10c45e5d (diff)
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index edbb16429..22f8b3391 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -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;