aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tool_cfgable.c2
-rw-r--r--src/tool_cfgable.h4
-rw-r--r--src/tool_getparam.c14
-rw-r--r--src/tool_help.c1
-rw-r--r--src/tool_operate.c4
5 files changed, 16 insertions, 9 deletions
diff --git a/src/tool_cfgable.c b/src/tool_cfgable.c
index 5d38fb338..f00a0d1e7 100644
--- a/src/tool_cfgable.c
+++ b/src/tool_cfgable.c
@@ -150,7 +150,7 @@ static void free_config_fields(struct OperationConfig *config)
curl_slist_free_all(config->resolve);
curl_slist_free_all(config->connect_to);
- Curl_safefree(config->socksproxy);
+ Curl_safefree(config->preproxy);
Curl_safefree(config->proxy_service_name);
Curl_safefree(config->service_name);
diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h
index 30749ffff..5db86f4e3 100644
--- a/src/tool_cfgable.h
+++ b/src/tool_cfgable.h
@@ -178,9 +178,7 @@ struct OperationConfig {
bool ftp_ssl_control;
bool ftp_ssl_ccc;
int ftp_ssl_ccc_mode;
-
- char *socksproxy; /* set to server string */
-
+ char *preproxy;
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 f94a2b629..16d58489f 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -290,6 +290,7 @@ static const struct LongShort aliases[]= {
{"V", "version", FALSE},
{"w", "write-out", TRUE},
{"x", "proxy", TRUE},
+ {"xa", "preproxy", TRUE},
{"X", "request", TRUE},
{"Y", "speed-limit", TRUE},
{"y", "speed-time", TRUE},
@@ -1920,9 +1921,16 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
GetStr(&config->writeout, nextarg);
break;
case 'x':
- /* proxy */
- GetStr(&config->proxy, nextarg);
- config->proxyver = CURLPROXY_HTTP;
+ switch(subletter) {
+ case 'a': /* --preproxy */
+ GetStr(&config->preproxy, nextarg);
+ break;
+ default:
+ /* --proxy */
+ GetStr(&config->proxy, nextarg);
+ config->proxyver = CURLPROXY_HTTP;
+ break;
+ }
break;
case 'X':
/* set custom request */
diff --git a/src/tool_help.c b/src/tool_help.c
index 978d8b601..a21a336d9 100644
--- a/src/tool_help.c
+++ b/src/tool_help.c
@@ -168,6 +168,7 @@ static const char *const helptext[] = {
"Do not switch to GET after following a 302 redirect (H)",
" --post303 "
"Do not switch to GET after following a 303 redirect (H)",
+ " --preproxy [PROTOCOL://]HOST[:PORT] Proxy before HTTP(S) proxy",
" -#, --progress-bar Display transfer progress as a progress bar",
" --proto PROTOCOLS Enable/disable PROTOCOLS",
" --proto-default PROTOCOL Use PROTOCOL for any URL missing a scheme",
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 9fc03b43b..54a11f653 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -868,8 +868,8 @@ static CURLcode operate_do(struct GlobalConfig *global,
my_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, config->proxytunnel?1L:0L);
/* new in libcurl 7.52.0 */
- if(config->socksproxy)
- my_setopt_str(curl, CURLOPT_SOCKS_PROXY, config->socksproxy);
+ if(config->preproxy)
+ my_setopt_str(curl, CURLOPT_PRE_PROXY, config->preproxy);
/* new in libcurl 7.10.6 */
if(config->proxyanyauth)