2011-10-04 18:03:20 -04:00
|
|
|
/***************************************************************************
|
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2021-01-12 01:34:52 -05:00
|
|
|
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
2011-10-04 18:03:20 -04:00
|
|
|
*
|
|
|
|
* This software is licensed as described in the file COPYING, which
|
|
|
|
* you should have received as part of this distribution. The terms
|
2020-11-04 08:02:01 -05:00
|
|
|
* are also available at https://curl.se/docs/copyright.html.
|
2011-10-04 18:03:20 -04:00
|
|
|
*
|
|
|
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
* copies of the Software, and permit persons to whom the Software is
|
|
|
|
* furnished to do so, under the terms of the COPYING file.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
***************************************************************************/
|
2012-04-06 17:35:15 -04:00
|
|
|
#include "tool_setup.h"
|
2019-08-28 12:11:47 -04:00
|
|
|
#if defined(HAVE_STRCASECMP) && defined(HAVE_STRINGS_H)
|
2019-03-30 01:46:30 -04:00
|
|
|
#include <strings.h>
|
|
|
|
#endif
|
2011-10-04 18:03:20 -04:00
|
|
|
|
|
|
|
#include "tool_panykey.h"
|
|
|
|
#include "tool_help.h"
|
2014-02-22 12:45:38 -05:00
|
|
|
#include "tool_libinfo.h"
|
|
|
|
#include "tool_version.h"
|
2011-10-04 18:03:20 -04:00
|
|
|
|
2013-01-03 20:50:28 -05:00
|
|
|
#include "memdebug.h" /* keep this as LAST include */
|
2011-10-04 18:03:20 -04:00
|
|
|
|
|
|
|
#ifdef MSDOS
|
|
|
|
# define USE_WATT32
|
|
|
|
#endif
|
|
|
|
|
2020-09-02 14:11:20 -04:00
|
|
|
/*
|
|
|
|
* The bitmask output is generated with the following command
|
|
|
|
------------------------------------------------------------
|
|
|
|
cd $srcroot/docs/cmdline-opts
|
|
|
|
./gen.pl listcats *.d
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define CURLHELP_HIDDEN 1u << 0u
|
|
|
|
#define CURLHELP_AUTH 1u << 1u
|
|
|
|
#define CURLHELP_CONNECTION 1u << 2u
|
|
|
|
#define CURLHELP_CURL 1u << 3u
|
|
|
|
#define CURLHELP_DNS 1u << 4u
|
|
|
|
#define CURLHELP_FILE 1u << 5u
|
|
|
|
#define CURLHELP_FTP 1u << 6u
|
|
|
|
#define CURLHELP_HTTP 1u << 7u
|
|
|
|
#define CURLHELP_IMAP 1u << 8u
|
|
|
|
#define CURLHELP_IMPORTANT 1u << 9u
|
|
|
|
#define CURLHELP_MISC 1u << 10u
|
|
|
|
#define CURLHELP_OUTPUT 1u << 11u
|
|
|
|
#define CURLHELP_POP3 1u << 12u
|
|
|
|
#define CURLHELP_POST 1u << 13u
|
|
|
|
#define CURLHELP_PROXY 1u << 14u
|
|
|
|
#define CURLHELP_SCP 1u << 15u
|
|
|
|
#define CURLHELP_SFTP 1u << 16u
|
|
|
|
#define CURLHELP_SMTP 1u << 17u
|
|
|
|
#define CURLHELP_SSH 1u << 18u
|
|
|
|
#define CURLHELP_TELNET 1u << 19u
|
|
|
|
#define CURLHELP_TFTP 1u << 20u
|
|
|
|
#define CURLHELP_TLS 1u << 21u
|
|
|
|
#define CURLHELP_UPLOAD 1u << 22u
|
|
|
|
#define CURLHELP_VERBOSE 1u << 23u
|
|
|
|
|
|
|
|
typedef unsigned int curlhelp_t;
|
|
|
|
|
|
|
|
struct category_descriptors {
|
|
|
|
const char *opt;
|
|
|
|
const char *desc;
|
|
|
|
curlhelp_t category;
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct category_descriptors categories[] = {
|
|
|
|
{"auth", "Different types of authentication methods", CURLHELP_AUTH},
|
|
|
|
{"connection", "Low level networking operations",
|
|
|
|
CURLHELP_CONNECTION},
|
|
|
|
{"curl", "The command line tool itself", CURLHELP_CURL},
|
|
|
|
{"dns", "General DNS options", CURLHELP_DNS},
|
|
|
|
{"file", "FILE protocol options", CURLHELP_FILE},
|
|
|
|
{"ftp", "FTP protocol options", CURLHELP_FTP},
|
|
|
|
{"http", "HTTP and HTTPS protocol options", CURLHELP_HTTP},
|
|
|
|
{"imap", "IMAP protocol options", CURLHELP_IMAP},
|
|
|
|
/* important is left out because it is the default help page */
|
|
|
|
{"misc", "Options that don't fit into any other category", CURLHELP_MISC},
|
2020-10-22 11:23:36 -04:00
|
|
|
{"output", "Filesystem output", CURLHELP_OUTPUT},
|
2020-09-02 14:11:20 -04:00
|
|
|
{"pop3", "POP3 protocol options", CURLHELP_POP3},
|
|
|
|
{"post", "HTTP Post specific options", CURLHELP_POST},
|
|
|
|
{"proxy", "All options related to proxies", CURLHELP_PROXY},
|
|
|
|
{"scp", "SCP protocol options", CURLHELP_SCP},
|
|
|
|
{"sftp", "SFTP protocol options", CURLHELP_SFTP},
|
|
|
|
{"smtp", "SMTP protocol options", CURLHELP_SMTP},
|
|
|
|
{"ssh", "SSH protocol options", CURLHELP_SSH},
|
|
|
|
{"telnet", "TELNET protocol options", CURLHELP_TELNET},
|
|
|
|
{"tftp", "TFTP protocol options", CURLHELP_TFTP},
|
|
|
|
{"tls", "All TLS/SSL related options", CURLHELP_TLS},
|
|
|
|
{"upload", "All options for uploads",
|
|
|
|
CURLHELP_UPLOAD},
|
|
|
|
{"verbose", "Options related to any kind of command line output of curl",
|
|
|
|
CURLHELP_VERBOSE},
|
|
|
|
{NULL, NULL, CURLHELP_HIDDEN}
|
|
|
|
};
|
|
|
|
|
2011-10-04 18:03:20 -04:00
|
|
|
/*
|
2017-05-08 17:30:29 -04:00
|
|
|
* The help output is generated with the following command
|
|
|
|
---------------------------------------------------------
|
|
|
|
|
|
|
|
cd $srcroot/docs/cmdline-opts
|
2020-03-25 18:16:28 -04:00
|
|
|
./gen.pl listhelp *.d
|
2011-10-04 18:03:20 -04:00
|
|
|
*/
|
|
|
|
|
2017-05-08 17:30:29 -04:00
|
|
|
struct helptxt {
|
|
|
|
const char *opt;
|
|
|
|
const char *desc;
|
2020-09-02 14:11:20 -04:00
|
|
|
curlhelp_t categories;
|
2017-05-08 17:30:29 -04:00
|
|
|
};
|
|
|
|
|
2020-05-12 03:13:43 -04:00
|
|
|
|
2017-05-08 17:30:29 -04:00
|
|
|
static const struct helptxt helptext[] = {
|
|
|
|
{" --abstract-unix-socket <path>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Connect via abstract Unix domain socket",
|
|
|
|
CURLHELP_CONNECTION},
|
2019-03-03 05:17:52 -05:00
|
|
|
{" --alt-svc <file name>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Enable alt-svc with this cache file",
|
|
|
|
CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --anyauth",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Pick any authentication method",
|
|
|
|
CURLHELP_HTTP | CURLHELP_PROXY | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-a, --append",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Append to target file when uploading",
|
|
|
|
CURLHELP_FTP | CURLHELP_SFTP},
|
2021-01-25 09:02:09 -05:00
|
|
|
{" --aws-sigv4 <provider1[:provider2[:region[:service]]]>",
|
2021-01-12 01:34:52 -05:00
|
|
|
"Use AWS V4 signature authentication",
|
|
|
|
CURLHELP_AUTH | CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --basic",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use HTTP Basic Authentication",
|
|
|
|
CURLHELP_AUTH},
|
2017-08-14 10:13:32 -04:00
|
|
|
{" --cacert <file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"CA certificate to verify peer against",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --capath <dir>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"CA directory to verify peer against",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-E, --cert <certificate[:password]>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Client certificate file and password",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --cert-status",
|
2021-02-11 17:09:59 -05:00
|
|
|
"Verify the status of the server cert via OCSP-staple",
|
2020-09-02 14:11:20 -04:00
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --cert-type <type>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Certificate type (DER/PEM/ENG)",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ciphers <list of ciphers>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"SSL ciphers to use",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --compressed",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Request compressed response",
|
|
|
|
CURLHELP_HTTP},
|
2017-08-05 05:26:04 -04:00
|
|
|
{" --compressed-ssh",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Enable SSH compression",
|
|
|
|
CURLHELP_SCP | CURLHELP_SSH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-K, --config <file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Read config from a file",
|
|
|
|
CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --connect-timeout <seconds>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Maximum time allowed for connection",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --connect-to <HOST1:PORT1:HOST2:PORT2>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Connect to host",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-C, --continue-at <offset>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Resumed transfer offset",
|
|
|
|
CURLHELP_CONNECTION},
|
2019-03-14 05:54:10 -04:00
|
|
|
{"-b, --cookie <data|filename>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Send cookies from string/file",
|
|
|
|
CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-c, --cookie-jar <filename>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Write cookies to <filename> after operation",
|
|
|
|
CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --create-dirs",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Create necessary local directory hierarchy",
|
|
|
|
CURLHELP_CURL},
|
2021-02-10 14:10:49 -05:00
|
|
|
{" --create-file-mode <mode>",
|
|
|
|
"File mode (octal) for created files",
|
2021-01-12 01:34:52 -05:00
|
|
|
CURLHELP_SFTP | CURLHELP_SCP | CURLHELP_FILE | CURLHELP_UPLOAD},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --crlf",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Convert LF to CRLF in upload",
|
|
|
|
CURLHELP_FTP | CURLHELP_SMTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --crlfile <file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Get a CRL list in PEM format from the given file",
|
|
|
|
CURLHELP_TLS},
|
2020-08-29 08:09:24 -04:00
|
|
|
{" --curves <algorithm list>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"(EC) TLS key exchange algorithm(s) to request",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-d, --data <data>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"HTTP POST data",
|
|
|
|
CURLHELP_IMPORTANT | CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --data-ascii <data>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"HTTP POST ASCII data",
|
|
|
|
CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --data-binary <data>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"HTTP POST binary data",
|
|
|
|
CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --data-raw <data>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"HTTP POST data, '@' allowed",
|
|
|
|
CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --data-urlencode <data>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"HTTP POST data url encoded",
|
|
|
|
CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --delegation <LEVEL>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"GSS-API delegation permission",
|
2020-10-03 03:13:34 -04:00
|
|
|
CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --digest",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use HTTP Digest Authentication",
|
|
|
|
CURLHELP_PROXY | CURLHELP_AUTH | CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-q, --disable",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Disable .curlrc",
|
|
|
|
CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --disable-eprt",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Inhibit using EPRT or LPRT",
|
|
|
|
CURLHELP_FTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --disable-epsv",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Inhibit using EPSV",
|
|
|
|
CURLHELP_FTP},
|
2018-02-25 14:17:25 -05:00
|
|
|
{" --disallow-username-in-url",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Disallow username in url",
|
|
|
|
CURLHELP_CURL | CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --dns-interface <interface>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Interface to use for DNS requests",
|
|
|
|
CURLHELP_DNS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --dns-ipv4-addr <address>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"IPv4 address to use for DNS requests",
|
|
|
|
CURLHELP_DNS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --dns-ipv6-addr <address>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"IPv6 address to use for DNS requests",
|
|
|
|
CURLHELP_DNS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --dns-servers <addresses>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"DNS server addrs to use",
|
|
|
|
CURLHELP_DNS},
|
2021-02-11 17:09:59 -05:00
|
|
|
{" --doh-cert-status",
|
|
|
|
"Verify the status of the DOH server cert via OCSP-staple",
|
|
|
|
CURLHELP_DNS | CURLHELP_TLS},
|
|
|
|
{" --doh-insecure",
|
|
|
|
"Allow insecure DOH server connections",
|
|
|
|
CURLHELP_DNS | CURLHELP_TLS},
|
2018-09-06 03:16:02 -04:00
|
|
|
{" --doh-url <URL>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Resolve host names over DOH",
|
|
|
|
CURLHELP_DNS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-D, --dump-header <filename>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Write the received headers to <filename>",
|
|
|
|
CURLHELP_HTTP | CURLHELP_FTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --egd-file <file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"EGD socket path for random data",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --engine <name>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Crypto engine to use",
|
|
|
|
CURLHELP_TLS},
|
2019-10-30 04:43:14 -04:00
|
|
|
{" --etag-compare <file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Pass an ETag from a file as a custom header",
|
|
|
|
CURLHELP_HTTP},
|
2020-05-12 03:13:43 -04:00
|
|
|
{" --etag-save <file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Parse ETag from a request and save it to a file",
|
|
|
|
CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --expect100-timeout <seconds>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"How long to wait for 100-continue",
|
|
|
|
CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-f, --fail",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Fail silently (no output at all) on HTTP errors",
|
|
|
|
CURLHELP_IMPORTANT | CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --fail-early",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Fail on first transfer error, do not continue",
|
|
|
|
CURLHELP_CURL},
|
2021-02-11 02:30:39 -05:00
|
|
|
{" --fail-with-body",
|
|
|
|
"Fail on HTTP errors but save the body",
|
|
|
|
CURLHELP_HTTP | CURLHELP_OUTPUT},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --false-start",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Enable TLS False Start",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-F, --form <name=content>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Specify multipart MIME data",
|
|
|
|
CURLHELP_HTTP | CURLHELP_UPLOAD},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --form-string <name=string>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Specify multipart MIME data",
|
|
|
|
CURLHELP_HTTP | CURLHELP_UPLOAD},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ftp-account <data>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Account data string",
|
|
|
|
CURLHELP_FTP | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ftp-alternative-to-user <command>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"String to replace USER [name]",
|
|
|
|
CURLHELP_FTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ftp-create-dirs",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Create the remote dirs if not present",
|
|
|
|
CURLHELP_FTP | CURLHELP_SFTP | CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ftp-method <method>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Control CWD usage",
|
|
|
|
CURLHELP_FTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ftp-pasv",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use PASV/EPSV instead of PORT",
|
|
|
|
CURLHELP_FTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-P, --ftp-port <address>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use PORT instead of PASV",
|
|
|
|
CURLHELP_FTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ftp-pret",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Send PRET before PASV",
|
|
|
|
CURLHELP_FTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ftp-skip-pasv-ip",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Skip the IP address for PASV",
|
|
|
|
CURLHELP_FTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ftp-ssl-ccc",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Send CCC after authenticating",
|
|
|
|
CURLHELP_FTP | CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ftp-ssl-ccc-mode <active/passive>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Set CCC mode",
|
|
|
|
CURLHELP_FTP | CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ftp-ssl-control",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Require SSL/TLS for FTP login, clear for transfer",
|
|
|
|
CURLHELP_FTP | CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-G, --get",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Put the post data in the URL and use GET",
|
|
|
|
CURLHELP_HTTP | CURLHELP_UPLOAD},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-g, --globoff",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Disable URL sequences and ranges using {} and []",
|
|
|
|
CURLHELP_CURL},
|
2018-05-29 10:12:52 -04:00
|
|
|
{" --happy-eyeballs-timeout-ms <milliseconds>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Time for IPv6 before trying IPv4",
|
|
|
|
CURLHELP_CONNECTION},
|
2016-12-01 07:05:04 -05:00
|
|
|
{" --haproxy-protocol",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Send HAProxy PROXY protocol v1 header",
|
|
|
|
CURLHELP_HTTP | CURLHELP_PROXY},
|
2018-05-29 10:12:52 -04:00
|
|
|
{"-I, --head",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Show document info only",
|
|
|
|
CURLHELP_HTTP | CURLHELP_FTP | CURLHELP_FILE},
|
2017-06-21 17:35:08 -04:00
|
|
|
{"-H, --header <header/@file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Pass custom header(s) to server",
|
|
|
|
CURLHELP_HTTP},
|
|
|
|
{"-h, --help <category>",
|
|
|
|
"Get help for commands",
|
|
|
|
CURLHELP_IMPORTANT | CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --hostpubmd5 <md5>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Acceptable MD5 hash of the host public key",
|
|
|
|
CURLHELP_SFTP | CURLHELP_SCP},
|
2020-11-02 17:17:01 -05:00
|
|
|
{" --hsts <file name>",
|
|
|
|
"Enable HSTS with this cache file",
|
|
|
|
CURLHELP_HTTP},
|
2018-12-17 09:46:56 -05:00
|
|
|
{" --http0.9",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Allow HTTP 0.9 responses",
|
|
|
|
CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-0, --http1.0",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use HTTP 1.0",
|
|
|
|
CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --http1.1",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use HTTP 1.1",
|
|
|
|
CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --http2",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use HTTP 2",
|
|
|
|
CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --http2-prior-knowledge",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use HTTP 2 without HTTP/1.1 Upgrade",
|
|
|
|
CURLHELP_HTTP},
|
2019-08-07 08:17:48 -04:00
|
|
|
{" --http3",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use HTTP v3",
|
|
|
|
CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ignore-content-length",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Ignore the size of the remote resource",
|
|
|
|
CURLHELP_HTTP | CURLHELP_FTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-i, --include",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Include protocol response headers in the output",
|
|
|
|
CURLHELP_IMPORTANT | CURLHELP_VERBOSE},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-k, --insecure",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Allow insecure server connections when using SSL",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --interface <name>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use network INTERFACE (or address)",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-4, --ipv4",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Resolve names to IPv4 addresses",
|
|
|
|
CURLHELP_CONNECTION | CURLHELP_DNS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-6, --ipv6",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Resolve names to IPv6 addresses",
|
|
|
|
CURLHELP_CONNECTION | CURLHELP_DNS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-j, --junk-session-cookies",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Ignore session cookies read from file",
|
|
|
|
CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --keepalive-time <seconds>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Interval time for keepalive probes",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --key <key>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Private key file name",
|
|
|
|
CURLHELP_TLS | CURLHELP_SSH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --key-type <type>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Private key file type (DER/PEM/ENG)",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --krb <level>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Enable Kerberos with security <level>",
|
|
|
|
CURLHELP_FTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --libcurl <file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Dump libcurl equivalent code of this command line",
|
|
|
|
CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --limit-rate <speed>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Limit transfer speed to RATE",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-l, --list-only",
|
2020-09-02 14:11:20 -04:00
|
|
|
"List only mode",
|
|
|
|
CURLHELP_FTP | CURLHELP_POP3},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --local-port <num/range>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Force use of RANGE for local port numbers",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-L, --location",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Follow redirects",
|
|
|
|
CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --location-trusted",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Like --location, and send auth to other hosts",
|
|
|
|
CURLHELP_HTTP | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --login-options <options>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Server login options",
|
|
|
|
CURLHELP_IMAP | CURLHELP_POP3 | CURLHELP_SMTP | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --mail-auth <address>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Originator address of the original email",
|
|
|
|
CURLHELP_SMTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --mail-from <address>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Mail from this address",
|
|
|
|
CURLHELP_SMTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --mail-rcpt <address>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Mail to this address",
|
|
|
|
CURLHELP_SMTP},
|
2020-01-14 17:22:38 -05:00
|
|
|
{" --mail-rcpt-allowfails",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Allow RCPT TO command to fail for some recipients",
|
|
|
|
CURLHELP_SMTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-M, --manual",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Display the full manual",
|
|
|
|
CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --max-filesize <bytes>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Maximum file size to download",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --max-redirs <num>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Maximum number of redirects allowed",
|
|
|
|
CURLHELP_HTTP},
|
2018-04-21 14:19:37 -04:00
|
|
|
{"-m, --max-time <seconds>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Maximum time allowed for the transfer",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --metalink",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Process given URLs as metalink XML file",
|
|
|
|
CURLHELP_MISC},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --negotiate",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use HTTP Negotiate (SPNEGO) authentication",
|
|
|
|
CURLHELP_AUTH | CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-n, --netrc",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Must read .netrc for user name and password",
|
|
|
|
CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --netrc-file <filename>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Specify FILE for netrc",
|
|
|
|
CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --netrc-optional",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use either .netrc or URL",
|
|
|
|
CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-:, --next",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Make next URL use its separate set of options",
|
|
|
|
CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --no-alpn",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Disable the ALPN TLS extension",
|
|
|
|
CURLHELP_TLS | CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-N, --no-buffer",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Disable buffering of the output stream",
|
|
|
|
CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --no-keepalive",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Disable TCP keepalive on the connection",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --no-npn",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Disable the NPN TLS extension",
|
|
|
|
CURLHELP_TLS | CURLHELP_HTTP},
|
2019-10-08 17:05:35 -04:00
|
|
|
{" --no-progress-meter",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Do not show the progress meter",
|
|
|
|
CURLHELP_VERBOSE},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --no-sessionid",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Disable SSL session-ID reusing",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --noproxy <no-proxy-list>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"List of hosts which do not use proxy",
|
|
|
|
CURLHELP_PROXY},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ntlm",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use HTTP NTLM authentication",
|
|
|
|
CURLHELP_AUTH | CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ntlm-wb",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use HTTP NTLM authentication with winbind",
|
|
|
|
CURLHELP_AUTH | CURLHELP_HTTP},
|
2017-06-16 05:30:36 -04:00
|
|
|
{" --oauth2-bearer <token>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"OAuth 2 Bearer Token",
|
|
|
|
CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-o, --output <file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Write to file instead of stdout",
|
|
|
|
CURLHELP_IMPORTANT | CURLHELP_CURL},
|
2020-08-24 02:31:36 -04:00
|
|
|
{" --output-dir <dir>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Directory to save files in",
|
|
|
|
CURLHELP_CURL},
|
2019-07-20 13:14:00 -04:00
|
|
|
{"-Z, --parallel",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Perform transfers in parallel",
|
|
|
|
CURLHELP_CONNECTION | CURLHELP_CURL},
|
2019-10-17 04:05:53 -04:00
|
|
|
{" --parallel-immediate",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Do not wait for multiplexing (with --parallel)",
|
|
|
|
CURLHELP_CONNECTION | CURLHELP_CURL},
|
2019-07-20 13:14:00 -04:00
|
|
|
{" --parallel-max",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Maximum concurrency for parallel transfers",
|
|
|
|
CURLHELP_CONNECTION | CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --pass <phrase>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Pass phrase for the private key",
|
|
|
|
CURLHELP_SSH | CURLHELP_TLS | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --path-as-is",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Do not squash .. sequences in URL path",
|
|
|
|
CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --pinnedpubkey <hashes>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"FILE/HASHES Public key to verify peer against",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --post301",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Do not switch to GET after following a 301",
|
|
|
|
CURLHELP_HTTP | CURLHELP_POST},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --post302",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Do not switch to GET after following a 302",
|
|
|
|
CURLHELP_HTTP | CURLHELP_POST},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --post303",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Do not switch to GET after following a 303",
|
|
|
|
CURLHELP_HTTP | CURLHELP_POST},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --preproxy [protocol://]host[:port]",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use this proxy first",
|
|
|
|
CURLHELP_PROXY},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-#, --progress-bar",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Display transfer progress as a bar",
|
|
|
|
CURLHELP_VERBOSE},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proto <protocols>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Enable/disable PROTOCOLS",
|
|
|
|
CURLHELP_CONNECTION | CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proto-default <protocol>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use PROTOCOL for any URL missing a scheme",
|
|
|
|
CURLHELP_CONNECTION | CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proto-redir <protocols>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Enable/disable PROTOCOLS on redirect",
|
|
|
|
CURLHELP_CONNECTION | CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-x, --proxy [protocol://]host[:port]",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use this proxy",
|
|
|
|
CURLHELP_PROXY},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-anyauth",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Pick any proxy authentication method",
|
|
|
|
CURLHELP_PROXY | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-basic",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use Basic authentication on the proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-cacert <file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"CA certificate to verify peer against for proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-capath <dir>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"CA directory to verify peer against for proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-cert <cert[:passwd]>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Set client certificate for proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-cert-type <type>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Client certificate type for HTTPS proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-ciphers <list>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"SSL ciphers to use for proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-crlfile <file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Set a CRL list for proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-digest",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use Digest authentication on the proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS},
|
2017-06-21 17:35:08 -04:00
|
|
|
{" --proxy-header <header/@file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Pass custom header(s) to proxy",
|
|
|
|
CURLHELP_PROXY},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-insecure",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Do HTTPS proxy connections without verifying the proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-key <key>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Private key for HTTPS proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-key-type <type>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Private key file type for proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-negotiate",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use HTTP Negotiate (SPNEGO) authentication on the proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-ntlm",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use NTLM authentication on the proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-pass <phrase>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Pass phrase for the private key for HTTPS proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS | CURLHELP_AUTH},
|
2018-01-28 08:15:56 -05:00
|
|
|
{" --proxy-pinnedpubkey <hashes>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"FILE/HASHES public key to verify proxy with",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-service-name <name>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"SPNEGO proxy service name",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-ssl-allow-beast",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Allow security flaw for interop for HTTPS proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS},
|
2020-05-12 03:13:43 -04:00
|
|
|
{" --proxy-tls13-ciphers <ciphersuite list>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"TLS 1.3 proxy cipher suites",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-tlsauthtype <type>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"TLS authentication type for HTTPS proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-tlspassword <string>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"TLS password for HTTPS proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-tlsuser <name>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"TLS username for HTTPS proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy-tlsv1",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use TLSv1 for HTTPS proxy",
|
|
|
|
CURLHELP_PROXY | CURLHELP_TLS | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-U, --proxy-user <user:password>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Proxy user and password",
|
|
|
|
CURLHELP_PROXY | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --proxy1.0 <host[:port]>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use HTTP/1.0 proxy on given port",
|
|
|
|
CURLHELP_PROXY},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-p, --proxytunnel",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Operate through an HTTP proxy tunnel (using CONNECT)",
|
|
|
|
CURLHELP_PROXY},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --pubkey <key>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"SSH Public key file name",
|
|
|
|
CURLHELP_SFTP | CURLHELP_SCP | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-Q, --quote",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Send command(s) to server before transfer",
|
|
|
|
CURLHELP_FTP | CURLHELP_SFTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --random-file <file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"File for reading random data from",
|
|
|
|
CURLHELP_MISC},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-r, --range <range>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Retrieve only the bytes within RANGE",
|
|
|
|
CURLHELP_HTTP | CURLHELP_FTP | CURLHELP_SFTP | CURLHELP_FILE},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --raw",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Do HTTP \"raw\"; no transfer decoding",
|
|
|
|
CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-e, --referer <URL>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Referrer URL",
|
|
|
|
CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-J, --remote-header-name",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use the header-provided filename",
|
|
|
|
CURLHELP_OUTPUT},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-O, --remote-name",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Write output to a file named as the remote file",
|
|
|
|
CURLHELP_IMPORTANT | CURLHELP_OUTPUT},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --remote-name-all",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use the remote file name for all URLs",
|
|
|
|
CURLHELP_OUTPUT},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-R, --remote-time",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Set the remote file's time on the local output",
|
|
|
|
CURLHELP_OUTPUT},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-X, --request <command>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Specify request command to use",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-06-21 17:35:08 -04:00
|
|
|
{" --request-target",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Specify the target for this request",
|
|
|
|
CURLHELP_HTTP},
|
2021-01-12 01:34:52 -05:00
|
|
|
{" --resolve <[+]host:port:addr[,addr]...>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Resolve the host+port to this address",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --retry <num>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Retry request if transient problems occur",
|
|
|
|
CURLHELP_CURL},
|
2020-05-12 03:13:43 -04:00
|
|
|
{" --retry-all-errors",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Retry all errors (use with --retry)",
|
|
|
|
CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --retry-connrefused",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Retry on connection refused (use with --retry)",
|
|
|
|
CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --retry-delay <seconds>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Wait time between retries",
|
|
|
|
CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --retry-max-time <seconds>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Retry only within this period",
|
|
|
|
CURLHELP_CURL},
|
2020-05-12 03:13:43 -04:00
|
|
|
{" --sasl-authzid <identity>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Identity for SASL PLAIN authentication",
|
|
|
|
CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --sasl-ir",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Enable initial response in SASL authentication",
|
|
|
|
CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --service-name <name>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"SPNEGO service name",
|
|
|
|
CURLHELP_MISC},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-S, --show-error",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Show error even when -s is used",
|
|
|
|
CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-s, --silent",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Silent mode",
|
|
|
|
CURLHELP_IMPORTANT | CURLHELP_VERBOSE},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --socks4 <host[:port]>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"SOCKS4 proxy on given host + port",
|
|
|
|
CURLHELP_PROXY},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --socks4a <host[:port]>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"SOCKS4a proxy on given host + port",
|
|
|
|
CURLHELP_PROXY},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --socks5 <host[:port]>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"SOCKS5 proxy on given host + port",
|
|
|
|
CURLHELP_PROXY},
|
2017-05-19 12:11:47 -04:00
|
|
|
{" --socks5-basic",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Enable username/password auth for SOCKS5 proxies",
|
|
|
|
CURLHELP_PROXY | CURLHELP_AUTH},
|
2017-05-19 12:11:47 -04:00
|
|
|
{" --socks5-gssapi",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Enable GSS-API auth for SOCKS5 proxies",
|
|
|
|
CURLHELP_PROXY | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --socks5-gssapi-nec",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Compatibility with NEC SOCKS5 server",
|
|
|
|
CURLHELP_PROXY | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --socks5-gssapi-service <name>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"SOCKS5 proxy service name for GSS-API",
|
|
|
|
CURLHELP_PROXY | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --socks5-hostname <host[:port]>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"SOCKS5 proxy, pass host name to proxy",
|
|
|
|
CURLHELP_PROXY},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-Y, --speed-limit <speed>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Stop transfers slower than this",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-y, --speed-time <seconds>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Trigger 'speed-limit' abort after this time",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ssl",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Try SSL/TLS",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ssl-allow-beast",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Allow security flaw to improve interop",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ssl-no-revoke",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Disable cert revocation checks (Schannel)",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --ssl-reqd",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Require SSL/TLS",
|
|
|
|
CURLHELP_TLS},
|
2020-05-12 03:13:43 -04:00
|
|
|
{" --ssl-revoke-best-effort",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Ignore missing/offline cert CRL dist points",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-2, --sslv2",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use SSLv2",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-3, --sslv3",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use SSLv3",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --stderr",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Where to redirect stderr",
|
|
|
|
CURLHELP_VERBOSE},
|
2018-05-17 08:09:17 -04:00
|
|
|
{" --styled-output",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Enable styled output for HTTP headers",
|
|
|
|
CURLHELP_VERBOSE},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --suppress-connect-headers",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Suppress proxy CONNECT response headers",
|
2020-10-03 03:13:34 -04:00
|
|
|
CURLHELP_PROXY},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --tcp-fastopen",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use TCP Fast Open",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --tcp-nodelay",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use the TCP_NODELAY option",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-t, --telnet-option <opt=val>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Set telnet option",
|
|
|
|
CURLHELP_TELNET},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --tftp-blksize <value>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Set TFTP BLKSIZE option",
|
|
|
|
CURLHELP_TFTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --tftp-no-options",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Do not send any TFTP options",
|
|
|
|
CURLHELP_TFTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-z, --time-cond <time>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Transfer based on a time condition",
|
|
|
|
CURLHELP_HTTP | CURLHELP_FTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --tls-max <VERSION>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Set maximum allowed TLS version",
|
|
|
|
CURLHELP_TLS},
|
2020-05-12 03:13:43 -04:00
|
|
|
{" --tls13-ciphers <ciphersuite list>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"TLS 1.3 cipher suites to use",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --tlsauthtype <type>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"TLS authentication type",
|
|
|
|
CURLHELP_TLS | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --tlspassword",
|
2020-09-02 14:11:20 -04:00
|
|
|
"TLS password",
|
|
|
|
CURLHELP_TLS | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --tlsuser <name>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"TLS user name",
|
|
|
|
CURLHELP_TLS | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-1, --tlsv1",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use TLSv1.0 or greater",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --tlsv1.0",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use TLSv1.0 or greater",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --tlsv1.1",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use TLSv1.1 or greater",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --tlsv1.2",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use TLSv1.2 or greater",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --tlsv1.3",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use TLSv1.3 or greater",
|
|
|
|
CURLHELP_TLS},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --tr-encoding",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Request compressed transfer encoding",
|
|
|
|
CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --trace <file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Write a debug trace to FILE",
|
|
|
|
CURLHELP_VERBOSE},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --trace-ascii <file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Like --trace, but without hex output",
|
|
|
|
CURLHELP_VERBOSE},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --trace-time",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Add time stamps to trace/verbose output",
|
|
|
|
CURLHELP_VERBOSE},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --unix-socket <path>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Connect through this Unix domain socket",
|
|
|
|
CURLHELP_CONNECTION},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-T, --upload-file <file>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Transfer local FILE to destination",
|
|
|
|
CURLHELP_IMPORTANT | CURLHELP_UPLOAD},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --url <url>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"URL to work with",
|
|
|
|
CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-B, --use-ascii",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use ASCII/text transfer",
|
|
|
|
CURLHELP_MISC},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-u, --user <user:password>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Server user and password",
|
|
|
|
CURLHELP_IMPORTANT | CURLHELP_AUTH},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-A, --user-agent <name>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Send User-Agent <name> to server",
|
|
|
|
CURLHELP_IMPORTANT | CURLHELP_HTTP},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-v, --verbose",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Make the operation more talkative",
|
|
|
|
CURLHELP_IMPORTANT | CURLHELP_VERBOSE},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-V, --version",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Show version number and quit",
|
|
|
|
CURLHELP_IMPORTANT | CURLHELP_CURL},
|
2017-05-08 17:30:29 -04:00
|
|
|
{"-w, --write-out <format>",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Use output FORMAT after completion",
|
|
|
|
CURLHELP_VERBOSE},
|
2017-05-08 17:30:29 -04:00
|
|
|
{" --xattr",
|
2020-09-02 14:11:20 -04:00
|
|
|
"Store metadata in extended file attributes",
|
|
|
|
CURLHELP_MISC},
|
|
|
|
{ NULL, NULL, CURLHELP_HIDDEN }
|
2011-10-04 18:03:20 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef NETWARE
|
|
|
|
# define PRINT_LINES_PAUSE 23
|
|
|
|
#endif
|
|
|
|
|
2014-02-22 12:45:38 -05:00
|
|
|
struct feat {
|
|
|
|
const char *name;
|
|
|
|
int bitmask;
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct feat feats[] = {
|
|
|
|
{"AsynchDNS", CURL_VERSION_ASYNCHDNS},
|
|
|
|
{"Debug", CURL_VERSION_DEBUG},
|
|
|
|
{"TrackMemory", CURL_VERSION_CURLDEBUG},
|
|
|
|
{"IDN", CURL_VERSION_IDN},
|
|
|
|
{"IPv6", CURL_VERSION_IPV6},
|
|
|
|
{"Largefile", CURL_VERSION_LARGEFILE},
|
2020-07-14 04:30:17 -04:00
|
|
|
{"Unicode", CURL_VERSION_UNICODE},
|
2014-07-21 03:53:45 -04:00
|
|
|
{"SSPI", CURL_VERSION_SSPI},
|
|
|
|
{"GSS-API", CURL_VERSION_GSSAPI},
|
2014-11-15 09:08:43 -05:00
|
|
|
{"Kerberos", CURL_VERSION_KERBEROS5},
|
2014-07-21 03:53:45 -04:00
|
|
|
{"SPNEGO", CURL_VERSION_SPNEGO},
|
2014-02-22 12:45:38 -05:00
|
|
|
{"NTLM", CURL_VERSION_NTLM},
|
|
|
|
{"NTLM_WB", CURL_VERSION_NTLM_WB},
|
|
|
|
{"SSL", CURL_VERSION_SSL},
|
|
|
|
{"libz", CURL_VERSION_LIBZ},
|
2017-11-05 09:28:16 -05:00
|
|
|
{"brotli", CURL_VERSION_BROTLI},
|
2020-05-25 11:49:46 -04:00
|
|
|
{"zstd", CURL_VERSION_ZSTD},
|
2014-02-22 12:45:38 -05:00
|
|
|
{"CharConv", CURL_VERSION_CONV},
|
|
|
|
{"TLS-SRP", CURL_VERSION_TLSAUTH_SRP},
|
2014-11-27 17:59:25 -05:00
|
|
|
{"HTTP2", CURL_VERSION_HTTP2},
|
2019-07-21 17:48:58 -04:00
|
|
|
{"HTTP3", CURL_VERSION_HTTP3},
|
2014-12-26 15:45:21 -05:00
|
|
|
{"UnixSockets", CURL_VERSION_UNIX_SOCKETS},
|
2017-08-18 02:51:24 -04:00
|
|
|
{"HTTPS-proxy", CURL_VERSION_HTTPS_PROXY},
|
2018-02-18 17:09:24 -05:00
|
|
|
{"MultiSSL", CURL_VERSION_MULTI_SSL},
|
|
|
|
{"PSL", CURL_VERSION_PSL},
|
2019-03-03 05:17:52 -05:00
|
|
|
{"alt-svc", CURL_VERSION_ALTSVC},
|
2020-11-02 17:17:01 -05:00
|
|
|
{"HSTS", CURL_VERSION_HSTS},
|
2021-02-11 02:54:23 -05:00
|
|
|
{"gsasl", CURL_VERSION_GSASL},
|
2014-02-22 12:45:38 -05:00
|
|
|
};
|
|
|
|
|
2020-09-02 14:11:20 -04:00
|
|
|
static void print_category(curlhelp_t category)
|
|
|
|
{
|
|
|
|
unsigned int i;
|
|
|
|
for(i = 0; helptext[i].opt; ++i)
|
|
|
|
if(helptext[i].categories & category) {
|
tool_help: Increase space between option and description
- Increase the minimum number of spaces between the option and the
description from 1 to 2.
Before:
~~~
-u, --user <user:password> Server user and password
-A, --user-agent <name> Send User-Agent <name> to server
-v, --verbose Make the operation more talkative
-V, --version Show version number and quit
-w, --write-out <format> Use output FORMAT after completion
--xattr Store metadata in extended file attributes
~~~
After:
~~~
-u, --user <user:password> Server user and password
-A, --user-agent <name> Send User-Agent <name> to server
-v, --verbose Make the operation more talkative
-V, --version Show version number and quit
-w, --write-out <format> Use output FORMAT after completion
--xattr Store metadata in extended file attributes
~~~
Closes https://github.com/curl/curl/pull/6674
2021-02-27 18:08:53 -05:00
|
|
|
printf(" %-18s %s\n", helptext[i].opt, helptext[i].desc);
|
2020-09-02 14:11:20 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Prints category if found. If not, it returns 1 */
|
|
|
|
static int get_category_content(const char *category)
|
|
|
|
{
|
|
|
|
unsigned int i;
|
|
|
|
for(i = 0; categories[i].opt; ++i)
|
|
|
|
if(curl_strequal(categories[i].opt, category)) {
|
|
|
|
printf("%s: %s\n", categories[i].opt, categories[i].desc);
|
|
|
|
print_category(categories[i].category);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Prints all categories and their description */
|
|
|
|
static void get_categories(void)
|
|
|
|
{
|
|
|
|
unsigned int i;
|
|
|
|
for(i = 0; categories[i].opt; ++i)
|
|
|
|
printf(" %-11s %s\n", categories[i].opt, categories[i].desc);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-09-18 02:09:09 -04:00
|
|
|
void tool_help(char *category)
|
2011-10-04 18:03:20 -04:00
|
|
|
{
|
2017-05-08 17:30:29 -04:00
|
|
|
puts("Usage: curl [options...] <url>");
|
2020-09-02 14:11:20 -04:00
|
|
|
/* If no category was provided */
|
|
|
|
if(!category) {
|
|
|
|
const char *category_note = "\nThis is not the full help, this "
|
2020-09-18 02:09:09 -04:00
|
|
|
"menu is stripped into categories.\nUse \"--help category\" to get "
|
|
|
|
"an overview of all categories.\nFor all options use the manual"
|
|
|
|
" or \"--help all\".";
|
2020-09-02 14:11:20 -04:00
|
|
|
print_category(CURLHELP_IMPORTANT);
|
|
|
|
puts(category_note);
|
|
|
|
}
|
|
|
|
/* Lets print everything if "all" was provided */
|
2020-09-18 02:09:09 -04:00
|
|
|
else if(curl_strequal(category, "all"))
|
2020-09-02 14:11:20 -04:00
|
|
|
/* Print everything except hidden */
|
|
|
|
print_category(~(CURLHELP_HIDDEN));
|
|
|
|
/* Lets handle the string "category" differently to not print an errormsg */
|
2020-09-18 02:09:09 -04:00
|
|
|
else if(curl_strequal(category, "category"))
|
2020-09-02 14:11:20 -04:00
|
|
|
get_categories();
|
|
|
|
/* Otherwise print category and handle the case if the cat was not found */
|
2020-09-18 02:09:09 -04:00
|
|
|
else if(get_category_content(category)) {
|
2020-09-02 14:11:20 -04:00
|
|
|
puts("Invalid category provided, here is a list of all categories:\n");
|
|
|
|
get_categories();
|
2011-10-04 18:03:20 -04:00
|
|
|
}
|
2020-09-18 02:09:09 -04:00
|
|
|
free(category);
|
2011-10-04 18:03:20 -04:00
|
|
|
}
|
2014-02-22 11:04:30 -05:00
|
|
|
|
2019-02-25 06:25:15 -05:00
|
|
|
static int
|
|
|
|
featcomp(const void *p1, const void *p2)
|
|
|
|
{
|
|
|
|
/* The arguments to this function are "pointers to pointers to char", but
|
|
|
|
the comparison arguments are "pointers to char", hence the following cast
|
|
|
|
plus dereference */
|
|
|
|
#ifdef HAVE_STRCASECMP
|
|
|
|
return strcasecmp(* (char * const *) p1, * (char * const *) p2);
|
|
|
|
#elif defined(HAVE_STRCMPI)
|
|
|
|
return strcmpi(* (char * const *) p1, * (char * const *) p2);
|
|
|
|
#else
|
|
|
|
return strcmp(* (char * const *) p1, * (char * const *) p2);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2014-02-22 12:45:38 -05:00
|
|
|
void tool_version_info(void)
|
|
|
|
{
|
|
|
|
const char *const *proto;
|
|
|
|
|
|
|
|
printf(CURL_ID "%s\n", curl_version());
|
2017-05-14 11:09:45 -04:00
|
|
|
#ifdef CURL_PATCHSTAMP
|
|
|
|
printf("Release-Date: %s, security patched: %s\n",
|
|
|
|
LIBCURL_TIMESTAMP, CURL_PATCHSTAMP);
|
|
|
|
#else
|
|
|
|
printf("Release-Date: %s\n", LIBCURL_TIMESTAMP);
|
|
|
|
#endif
|
2014-02-22 12:45:38 -05:00
|
|
|
if(curlinfo->protocols) {
|
|
|
|
printf("Protocols: ");
|
|
|
|
for(proto = curlinfo->protocols; *proto; ++proto) {
|
|
|
|
printf("%s ", *proto);
|
|
|
|
}
|
|
|
|
puts(""); /* newline */
|
|
|
|
}
|
|
|
|
if(curlinfo->features) {
|
2019-02-25 06:25:15 -05:00
|
|
|
char *featp[ sizeof(feats) / sizeof(feats[0]) + 1];
|
|
|
|
size_t numfeat = 0;
|
2014-02-22 12:45:38 -05:00
|
|
|
unsigned int i;
|
2019-02-25 06:25:15 -05:00
|
|
|
printf("Features:");
|
2014-02-22 12:45:38 -05:00
|
|
|
for(i = 0; i < sizeof(feats)/sizeof(feats[0]); i++) {
|
|
|
|
if(curlinfo->features & feats[i].bitmask)
|
2019-02-25 06:25:15 -05:00
|
|
|
featp[numfeat++] = (char *)feats[i].name;
|
2014-02-22 12:45:38 -05:00
|
|
|
}
|
|
|
|
#ifdef USE_METALINK
|
2019-02-25 06:25:15 -05:00
|
|
|
featp[numfeat++] = (char *)"Metalink";
|
2014-02-22 12:45:38 -05:00
|
|
|
#endif
|
2019-02-25 06:25:15 -05:00
|
|
|
qsort(&featp[0], numfeat, sizeof(char *), featcomp);
|
|
|
|
for(i = 0; i< numfeat; i++)
|
|
|
|
printf(" %s", featp[i]);
|
2014-02-22 12:45:38 -05:00
|
|
|
puts(""); /* newline */
|
|
|
|
}
|
2019-04-13 01:12:18 -04:00
|
|
|
if(strcmp(CURL_VERSION, curlinfo->version)) {
|
|
|
|
printf("WARNING: curl and libcurl versions do not match. "
|
|
|
|
"Functionality may be affected.\n");
|
|
|
|
}
|
2014-02-22 12:45:38 -05:00
|
|
|
}
|
|
|
|
|
2019-07-20 13:14:00 -04:00
|
|
|
void tool_list_engines(void)
|
2014-02-22 11:04:30 -05:00
|
|
|
{
|
2019-07-20 13:14:00 -04:00
|
|
|
CURL *curl = curl_easy_init();
|
2014-02-22 11:04:30 -05:00
|
|
|
struct curl_slist *engines = NULL;
|
|
|
|
|
2014-02-22 11:21:53 -05:00
|
|
|
/* Get the list of engines */
|
2014-02-22 11:04:30 -05:00
|
|
|
curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines);
|
2014-02-22 11:21:53 -05:00
|
|
|
|
|
|
|
puts("Build-time engines:");
|
|
|
|
if(engines) {
|
|
|
|
for(; engines; engines = engines->next)
|
|
|
|
printf(" %s\n", engines->data);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
puts(" <none>");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Cleanup the list of engines */
|
2014-02-22 11:04:30 -05:00
|
|
|
curl_slist_free_all(engines);
|
2019-07-20 13:14:00 -04:00
|
|
|
curl_easy_cleanup(curl);
|
2014-02-22 11:04:30 -05:00
|
|
|
}
|