diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2008-01-05 22:04:18 +0000 | 
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2008-01-05 22:04:18 +0000 | 
| commit | b4305764367f24f06ce7dedc557d90772a00eec1 (patch) | |
| tree | d723ad3a4b96f6d4bb810e5853de764f83da99da /src | |
| parent | 65008a4e55db71cff22e3fca6b36f15eb642b92d (diff) | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 24 | 
1 files changed, 8 insertions, 16 deletions
| diff --git a/src/main.c b/src/main.c index 1f3ff706b..95046bca7 100644 --- a/src/main.c +++ b/src/main.c @@ -480,8 +480,6 @@ struct Configurable {    bool raw;    bool post301;    bool nokeepalive; -  bool socks5_resolve_local; /* don't use SOCKS5 proxy server to resolve -                                domain names */    struct OutStruct *outs;  }; @@ -713,10 +711,10 @@ static void help(void)      "    --retry-max-time <seconds> Retry only within this period",      " -s/--silent        Silent mode. Don't output anything",      " -S/--show-error    Show error. With -s, make curl show errors when they occur", -    "    --socks4 <host[:port]> Use SOCKS4 proxy on given host + port", -    "    --socks4a <host[:port]> Use SOCKS4a proxy on given host + port", -    "    --socks5 <host[:port]> Use SOCKS5 proxy and let the proxy resolve names", -    "    --socks5ip <host[:port]> Use SOCKS5 proxy on given host + port", +    "    --socks4 <host[:port]> SOCKS4 proxy on given host + port", +    "    --socks4a <host[:port]> SOCKS4a proxy on given host + port", +    "    --socks5-hostname <host[:port]> SOCKS5 proxy, pass name instead of IP", +    "    --socks5 <host[:port]> SOCKS5 proxy on given host + port",      "    --stderr <file> Where to redirect stderr. - means stdout",      " -t/--telnet-option <OPT=val> Set telnet option",      "    --trace <file>  Write a debug trace to the given file", @@ -1906,11 +1904,10 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */            free(config->ftpport);          config->ftpport = NULL;          break; -      case 'c': /* --socks5ip specifies a socks5 proxy to use, but resolves +      case 'c': /* --socks5 specifies a socks5 proxy to use, and resolves                     the name locally and passes on the resolved address */          GetStr(&config->socksproxy, nextarg);          config->socksver = CURLPROXY_SOCKS5; -        config->socks5_resolve_local = TRUE;          break;        case 't': /* --socks4 specifies a socks4 proxy to use */          GetStr(&config->socksproxy, nextarg); @@ -1920,11 +1917,10 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */          GetStr(&config->socksproxy, nextarg);          config->socksver = CURLPROXY_SOCKS4A;          break; -      case '2': /* --socks5 specifies a socks5 proxy and enables name resolving -                   with the proxy */ +      case '2': /* --socks5-hostname specifies a socks5 proxy and enables name +                   resolving with the proxy */          GetStr(&config->socksproxy, nextarg); -        config->socksver = CURLPROXY_SOCKS5; -        config->socks5_resolve_local = FALSE; +        config->socksver = CURLPROXY_SOCKS5_HOSTNAME;          break;        case 'd': /* --tcp-nodelay option */          config->tcp_nodelay ^= TRUE; @@ -4511,10 +4507,6 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])          if(config->socksproxy) {            my_setopt(curl, CURLOPT_PROXY, config->socksproxy);            my_setopt(curl, CURLOPT_PROXYTYPE, config->socksver); -          if(config->socksver==CURLPROXY_SOCKS5) -            /* added in 7.17.2 */ -            my_setopt(curl, CURLOPT_SOCKS5_RESOLVE_LOCAL, -                      config->socks5_resolve_local);          }          /* curl 7.13.0 */ | 
