aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c24
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 */