aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-01-02 21:40:11 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-01-02 21:40:11 +0000
commita46b40b7fdf567250451b984b977f5e03c716d5e (patch)
treed5df5ab441077f295ec172ed2e94beed44622927 /lib/url.c
parent0b9b8acb08aa1a1c1c7668710d01eea8f27039b4 (diff)
Richard Atterer brought a patch that added support for SOCKS4a proxies, which
is an inofficial PROXY4 variant that sends the hostname to the proxy instead of the resolved address (which is already supported by SOCKS5). --socks4a is the curl command line option for it and CURLOPT_PROXYTYPE can now be set to CURLPROXY_SOCKS4A as well.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/url.c b/lib/url.c
index ee8b916e4..a205f9a7b 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -1868,7 +1868,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
case CURLOPT_PROXYTYPE:
/*
- * Set proxy type. HTTP/SOCKS4/SOCKS5
+ * Set proxy type. HTTP/SOCKS4/SOCKS4a/SOCKS5
*/
data->set.proxytype = (curl_proxytype)va_arg(param, long);
break;
@@ -2643,8 +2643,12 @@ static CURLcode ConnectPlease(struct SessionHandle *data,
/* do nothing here. handled later. */
break;
case CURLPROXY_SOCKS4:
- result = Curl_SOCKS4(conn->proxyuser, conn->host.name, conn->remote_port,
- FIRSTSOCKET, conn);
+ result = Curl_SOCKS4(conn->proxyuser, conn->host.name,
+ conn->remote_port, FIRSTSOCKET, conn, false);
+ break;
+ case CURLPROXY_SOCKS4A:
+ result = Curl_SOCKS4(conn->proxyuser, conn->host.name,
+ conn->remote_port, FIRSTSOCKET, conn, true);
break;
default:
failf(data, "unknown proxytype option given");