--proxy-basic added for completeness
This commit is contained in:
Родитель
f7f6b288eb
Коммит
765754d39d
|
@ -609,6 +609,13 @@ You may use this option as many times as you have number of URLs.
|
||||||
(SSL) Pass phrase for the private key
|
(SSL) Pass phrase for the private key
|
||||||
|
|
||||||
If this option is used several times, the last one will be used.
|
If this option is used several times, the last one will be used.
|
||||||
|
.IP "--proxy-basic"
|
||||||
|
Tells curl to use HTTP Basic authentication when communicating with the given
|
||||||
|
proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is
|
||||||
|
the default authentication method curl uses with proxies.
|
||||||
|
|
||||||
|
If this option is used twice, the second will again disable proxy HTTP Basic
|
||||||
|
authentication.
|
||||||
.IP "--proxy-digest"
|
.IP "--proxy-digest"
|
||||||
Tells curl to use HTTP Digest authentication when communicating with the given
|
Tells curl to use HTTP Digest authentication when communicating with the given
|
||||||
proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
|
proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
|
||||||
|
|
10
src/main.c
10
src/main.c
|
@ -349,6 +349,7 @@ static void help(void)
|
||||||
" -o/--output <file> Write output to <file> instead of stdout",
|
" -o/--output <file> Write output to <file> instead of stdout",
|
||||||
" -O/--remote-name Write output to a file named as the remote file",
|
" -O/--remote-name Write output to a file named as the remote file",
|
||||||
" -p/--proxytunnel Operate through a HTTP proxy tunnel (using CONNECT)",
|
" -p/--proxytunnel Operate through a HTTP proxy tunnel (using CONNECT)",
|
||||||
|
" --proxy-basic Enable Basic authentication on the proxy (H)",
|
||||||
" --proxy-digest Enable Digest authentication on the proxy (H)",
|
" --proxy-digest Enable Digest authentication on the proxy (H)",
|
||||||
" --proxy-ntlm Enable NTLM authentication on the proxy (H)",
|
" --proxy-ntlm Enable NTLM authentication on the proxy (H)",
|
||||||
" -P/--ftp-port <address> Use PORT with address instead of PASV (F)",
|
" -P/--ftp-port <address> Use PORT with address instead of PASV (F)",
|
||||||
|
@ -474,6 +475,7 @@ struct Configurable {
|
||||||
bool ftp_create_dirs;
|
bool ftp_create_dirs;
|
||||||
bool proxyntlm;
|
bool proxyntlm;
|
||||||
bool proxydigest;
|
bool proxydigest;
|
||||||
|
bool proxybasic;
|
||||||
|
|
||||||
char *writeout; /* %-styled format string to output */
|
char *writeout; /* %-styled format string to output */
|
||||||
bool writeenv; /* write results to environment, if available */
|
bool writeenv; /* write results to environment, if available */
|
||||||
|
@ -1166,7 +1168,8 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
||||||
{"$b", "ftp-pasv", FALSE},
|
{"$b", "ftp-pasv", FALSE},
|
||||||
{"$c", "socks5", TRUE},
|
{"$c", "socks5", TRUE},
|
||||||
{"$d", "tcp-nodelay",FALSE},
|
{"$d", "tcp-nodelay",FALSE},
|
||||||
{"$e", "proxy-digest", FALSE},
|
{"$e", "proxy-digest", FALSE},
|
||||||
|
{"$f", "proxy-basic", FALSE},
|
||||||
{"0", "http1.0", FALSE},
|
{"0", "http1.0", FALSE},
|
||||||
{"1", "tlsv1", FALSE},
|
{"1", "tlsv1", FALSE},
|
||||||
{"2", "sslv2", FALSE},
|
{"2", "sslv2", FALSE},
|
||||||
|
@ -1499,6 +1502,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
||||||
case 'e': /* --proxy-digest */
|
case 'e': /* --proxy-digest */
|
||||||
config->proxydigest ^= TRUE;
|
config->proxydigest ^= TRUE;
|
||||||
break;
|
break;
|
||||||
|
case 'f': /* --proxy-basic */
|
||||||
|
config->proxybasic ^= TRUE;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '#': /* added 19990617 larsa */
|
case '#': /* added 19990617 larsa */
|
||||||
|
@ -3393,6 +3399,8 @@ operate(struct Configurable *config, int argc, char *argv[])
|
||||||
curl_easy_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
|
curl_easy_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
|
||||||
else if(config->proxydigest)
|
else if(config->proxydigest)
|
||||||
curl_easy_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_DIGEST);
|
curl_easy_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_DIGEST);
|
||||||
|
else if(config->proxybasic)
|
||||||
|
curl_easy_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
|
||||||
|
|
||||||
/* new in curl 7.10.8 */
|
/* new in curl 7.10.8 */
|
||||||
if(config->max_filesize)
|
if(config->max_filesize)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче