Based on further discussion on curl-library, I reverted yesterday's SOCKS5

code to instead introduce support for a new proxy type called
CURLPROXY_SOCKS5_HOSTNAME that is used to send the host name to the proxy
instead of IP address and there's thus no longer any need for a new
curl_easy_setopt() option.

The default SOCKS5 proxy is again back to sending the IP address to the
proxy.  The new curl command line option for enabling sending host name to a
SOCKS5 proxy is now --socks5-hostname.
This commit is contained in:
Daniel Stenberg 2008-01-05 22:04:18 +00:00
parent 65008a4e55
commit b430576436
9 changed files with 35 additions and 47 deletions

View file

@ -499,7 +499,10 @@ typedef enum {
CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already
in 7.10 */
CURLPROXY_SOCKS5 = 5, /* added in 7.10 */
CURLPROXY_SOCKS4A = 6 /* added in 7.17.2 */
CURLPROXY_SOCKS4A = 6, /* added in 7.17.2 */
CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the
host name rather than the IP address. added
in 7.17.2 */
} curl_proxytype; /* this enum was added in 7.10 */
#define CURLAUTH_NONE 0 /* nothing */
@ -1172,11 +1175,6 @@ typedef enum {
/* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */
CINIT(PROXY_TRANSFER_MODE, LONG, 166),
/* Set using of SOCKS5 to resolve host names locally instead of sending them
to the proxy to let it resolve them. Valid only if CURLOPT_PROXYTYPE ==
CURLPROXY_SOCKS5, otherwise ignored. */
CINIT(SOCKS5_RESOLVE_LOCAL, LONG, 167),
CURLOPT_LASTENTRY /* the last unused */
} CURLoption;