From 642398c6517bac82d80089ecba9c2057a0752d74 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 16 Dec 2016 15:34:14 +0100 Subject: curl: normal socks proxies still use CURLOPT_PROXY ... the newly introduced CURLOPT_SOCKS_PROXY is special and should be asked for specially. (Needs new code.) Unified proxy type to a single variable in the config struct. --- src/tool_operate.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/tool_operate.c') 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) -- cgit v1.2.3