aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-12-16 16:02:08 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-12-16 16:04:23 +0100
commit845522cadb6ac9d357d68bb022a148a8c3be2e6a (patch)
tree8e49eea5efe813a1d985c8a700025755226a14a3 /lib
parent642398c6517bac82d80089ecba9c2057a0752d74 (diff)
preproxy: renamed what was added as SOCKS_PROXY
CURLOPT_SOCKS_PROXY -> CURLOPT_PRE_PROXY Added the corresponding --preroxy command line option. Sets a SOCKS proxy to connect to _before_ connecting to a HTTP(S) proxy.
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c10
-rw-r--r--lib/urldata.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/url.c b/lib/url.c
index f975b0d69..7944d7b0c 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1472,14 +1472,14 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option,
va_arg(param, char *));
break;
- case CURLOPT_SOCKS_PROXY:
+ case CURLOPT_PRE_PROXY:
/*
* Set proxy server:port to use as SOCKS proxy.
*
* If the proxy is set to "" or NULL we explicitly say that we don't want
* to use the socks proxy.
*/
- result = setstropt(&data->set.str[STRING_SOCKS_PROXY],
+ result = setstropt(&data->set.str[STRING_PRE_PROXY],
va_arg(param, char *));
break;
@@ -4126,7 +4126,7 @@ static struct connectdata *allocate_conn(struct Curl_easy *data)
conn->bits.socksproxy = (conn->bits.proxy &&
!conn->bits.httpproxy) ? TRUE : FALSE;
- if(data->set.str[STRING_SOCKS_PROXY] && *data->set.str[STRING_SOCKS_PROXY]) {
+ if(data->set.str[STRING_PRE_PROXY] && *data->set.str[STRING_PRE_PROXY]) {
conn->bits.proxy = TRUE;
conn->bits.socksproxy = TRUE;
}
@@ -6184,8 +6184,8 @@ static CURLcode create_conn(struct Curl_easy *data,
}
}
- if(data->set.str[STRING_SOCKS_PROXY]) {
- socksproxy = strdup(data->set.str[STRING_SOCKS_PROXY]);
+ if(data->set.str[STRING_PRE_PROXY]) {
+ socksproxy = strdup(data->set.str[STRING_PRE_PROXY]);
/* if global socks proxy is set, this is it */
if(NULL == socksproxy) {
failf(data, "memory shortage");
diff --git a/lib/urldata.h b/lib/urldata.h
index 595e797b7..0271d266b 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1468,7 +1468,7 @@ enum dupstring {
STRING_NETRC_FILE, /* if not NULL, use this instead of trying to find
$HOME/.netrc */
STRING_PROXY, /* proxy to use */
- STRING_SOCKS_PROXY, /* socks proxy to use */
+ STRING_PRE_PROXY, /* pre socks proxy to use */
STRING_SET_RANGE, /* range, if used */
STRING_SET_REFERER, /* custom string for the HTTP referer field */
STRING_SET_URL, /* what original URL to work on */