diff options
-rw-r--r-- | src/tool_cfgable.h | 2 | ||||
-rw-r--r-- | src/tool_getparam.c | 16 | ||||
-rw-r--r-- | src/tool_operate.c | 11 |
3 files changed, 14 insertions, 15 deletions
diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h index 6589d8824..30749ffff 100644 --- a/src/tool_cfgable.h +++ b/src/tool_cfgable.h @@ -180,7 +180,7 @@ struct OperationConfig { int ftp_ssl_ccc_mode; char *socksproxy; /* set to server string */ - int socksver; /* set to CURLPROXY_SOCKS* define */ + int socks5_gssapi_nec; /* The NEC reference server does not protect the encryption type exchange */ char *proxy_service_name; /* set authentication service name for HTTP and diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 9b5c9a54c..f94a2b629 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -799,21 +799,21 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ break; 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; + GetStr(&config->proxy, nextarg); + config->proxyver = CURLPROXY_SOCKS5; break; case 't': /* --socks4 specifies a socks4 proxy to use */ - GetStr(&config->socksproxy, nextarg); - config->socksver = CURLPROXY_SOCKS4; + GetStr(&config->proxy, nextarg); + config->proxyver = CURLPROXY_SOCKS4; break; case 'T': /* --socks4a specifies a socks4a proxy to use */ - GetStr(&config->socksproxy, nextarg); - config->socksver = CURLPROXY_SOCKS4A; + GetStr(&config->proxy, nextarg); + config->proxyver = CURLPROXY_SOCKS4A; break; case '2': /* --socks5-hostname specifies a socks5 proxy and enables name resolving with the proxy */ - GetStr(&config->socksproxy, nextarg); - config->socksver = CURLPROXY_SOCKS5_HOSTNAME; + GetStr(&config->proxy, nextarg); + config->proxyver = CURLPROXY_SOCKS5_HOSTNAME; break; case 'd': /* --tcp-nodelay option */ config->tcp_nodelay = toggle; diff --git a/src/tool_operate.c b/src/tool_operate.c index 504c20769..9fc03b43b 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -858,19 +858,18 @@ static CURLcode operate_do(struct GlobalConfig *global, /* TODO: Make this a run-time check instead of compile-time one. */ my_setopt_str(curl, CURLOPT_PROXY, config->proxy); + /* new in libcurl 7.5 */ + if(config->proxy) + my_setopt_enum(curl, CURLOPT_PROXYTYPE, config->proxyver); + my_setopt_str(curl, CURLOPT_PROXYUSERPWD, config->proxyuserpwd); /* new in libcurl 7.3 */ my_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, config->proxytunnel?1L:0L); - /* new in libcurl 7.5 */ - if(config->proxy) - my_setopt_enum(curl, CURLOPT_PROXYTYPE, (long)config->proxyver); - /* new in libcurl 7.52.0 */ - if(config->socksproxy) { + if(config->socksproxy) my_setopt_str(curl, CURLOPT_SOCKS_PROXY, config->socksproxy); - } /* new in libcurl 7.10.6 */ if(config->proxyanyauth) |