mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Added --proxy-anyauth
This commit is contained in:
parent
31443724c6
commit
970722483c
@ -21,7 +21,7 @@
|
|||||||
.\" * $Id$
|
.\" * $Id$
|
||||||
.\" **************************************************************************
|
.\" **************************************************************************
|
||||||
.\"
|
.\"
|
||||||
.TH curl 1 "25 Jan 2005" "Curl 7.13.0" "Curl Manual"
|
.TH curl 1 "29 Mar 2005" "Curl 7.13.2" "Curl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl \- transfer a URL
|
curl \- transfer a URL
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -647,6 +647,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-anyauth"
|
||||||
|
Tells curl to pick a suitable authentication method when communicating with
|
||||||
|
the given proxy. This will cause an extra request/response round-trip. Added
|
||||||
|
in curl 7.13.2.
|
||||||
|
|
||||||
|
If this option is used twice, the second will again disable the proxy use-any
|
||||||
|
authentication.
|
||||||
.IP "--proxy-basic"
|
.IP "--proxy-basic"
|
||||||
Tells curl to use HTTP Basic authentication when communicating with the given
|
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
|
proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is
|
||||||
|
12
src/main.c
12
src/main.c
@ -383,6 +383,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-anyauth Let curl pick proxy authentication method (H)",
|
||||||
" --proxy-basic Enable Basic authentication on the proxy (H)",
|
" --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)",
|
||||||
@ -512,6 +513,7 @@ struct Configurable {
|
|||||||
bool proxyntlm;
|
bool proxyntlm;
|
||||||
bool proxydigest;
|
bool proxydigest;
|
||||||
bool proxybasic;
|
bool proxybasic;
|
||||||
|
bool proxyanyauth;
|
||||||
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 */
|
||||||
FILE *errors; /* if stderr redirect is requested */
|
FILE *errors; /* if stderr redirect is requested */
|
||||||
@ -1257,6 +1259,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||||||
{"$k", "3p-user", TRUE},
|
{"$k", "3p-user", TRUE},
|
||||||
{"$l", "3p-quote", TRUE},
|
{"$l", "3p-quote", TRUE},
|
||||||
{"$m", "ftp-account", TRUE},
|
{"$m", "ftp-account", TRUE},
|
||||||
|
{"$n", "proxy-anyauth", FALSE},
|
||||||
|
|
||||||
{"0", "http1.0", FALSE},
|
{"0", "http1.0", FALSE},
|
||||||
{"1", "tlsv1", FALSE},
|
{"1", "tlsv1", FALSE},
|
||||||
@ -1641,9 +1644,12 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||||||
case 'm': /* --ftp-account */
|
case 'm': /* --ftp-account */
|
||||||
GetStr(&config->ftp_account, nextarg);
|
GetStr(&config->ftp_account, nextarg);
|
||||||
break;
|
break;
|
||||||
|
case 'n': /* --proxy-anyauth */
|
||||||
|
config->proxyanyauth ^= TRUE;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '#': /* added 19990617 larsa */
|
case '#': /* --progress-bar */
|
||||||
config->progressmode ^= CURL_PROGRESS_BAR;
|
config->progressmode ^= CURL_PROGRESS_BAR;
|
||||||
break;
|
break;
|
||||||
case '0':
|
case '0':
|
||||||
@ -3650,7 +3656,9 @@ operate(struct Configurable *config, int argc, char *argv[])
|
|||||||
/* new in curl 7.10.7 */
|
/* new in curl 7.10.7 */
|
||||||
curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS,
|
curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS,
|
||||||
config->ftp_create_dirs);
|
config->ftp_create_dirs);
|
||||||
if(config->proxyntlm)
|
if(config->proxyanyauth)
|
||||||
|
curl_easy_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
|
||||||
|
else if(config->proxyntlm)
|
||||||
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user