#ifndef HEADER_CURL_TOOL_CFGABLE_H
#define HEADER_CURL_TOOL_CFGABLE_H
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at https://curl.se/docs/copyright.html.
*
* 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.
*
* SPDX-License-Identifier: curl
*
***************************************************************************/
#include "tool_setup.h"
#include "tool_sdecls.h"
#include "tool_urlglob.h"
#include "var.h"
struct GlobalConfig;
struct State {
struct getout *urlnode;
struct URLGlob *inglob;
struct URLGlob *urls;
char *outfiles;
char *httpgetfields;
char *uploadfile;
curl_off_t infilenum;
curl_off_t up;
curl_off_t urlnum;
etc */
curl_off_t li;
};
struct OperationConfig {
bool remote_time;
char *useragent;
struct curl_slist *cookies;
char *cookiejar;
struct curl_slist *cookiefiles;
char *altsvc;
char *hsts;
bool cookiesession;
bool encoding;
bool tr_encoding;
unsigned long authtype;
bool use_resume;
bool resume_from_current;
bool disable_epsv;
bool disable_eprt;
bool ftp_pret;
char *proto_str;
bool proto_present;
char *proto_redir_str;
bool proto_redir_present;
char *proto_default;
curl_off_t resume_from;
char *postfields;
struct curlx_dynbuf postdata;
char *referer;
char *query;
long timeout_ms;
long connecttimeout_ms;
long maxredirs;
curl_off_t max_filesize;
char *output_dir;
char *headerfile;
char *ftpport;
char *iface;
long localport;
long localportrange;
unsigned short porttouse;
char *range;
long low_speed_limit;
long low_speed_time;
char *dns_servers;
char *dns_interface;
char *dns_ipv4_addr;
char *dns_ipv6_addr;
char *userpwd;
char *login_options;
char *tls_username;
char *tls_password;
char *tls_authtype;
char *proxy_tls_username;
char *proxy_tls_password;
char *proxy_tls_authtype;
char *proxyuserpwd;
char *proxy;
int proxyver;
char *noproxy;
char *mail_from;
struct curl_slist *mail_rcpt;
char *mail_auth;
bool mail_rcpt_allowfails;
char *sasl_authzid;
bool sasl_ir;
bool proxytunnel;
bool ftp_append;
bool use_ascii;
bool autoreferer;
bool failonerror;
bool failwithbody;
bool show_headers;
bool no_body;
bool dirlistonly;
bool followlocation;
bool unrestricted_auth;
when following redirects, even when hostname
changed */
bool netrc_opt;
bool netrc;
char *netrc_file;
struct getout *url_list;
struct getout *url_last;
struct getout *url_get;
struct getout *url_out;
struct getout *url_ul;
char *ipfs_gateway;
char *doh_url;
char *cipher_list;
char *proxy_cipher_list;
char *cipher13_list;
char *proxy_cipher13_list;
char *cert;
char *encCert;
char *proxy_cert;
char *cert_type;
char *proxy_cert_type;
char *cacert;
char *proxy_cacert;
char *capath;
char *proxy_capath;
char *crlfile;
char *proxy_crlfile;
char *pinnedpubkey;
char *proxy_pinnedpubkey;
char *key;
char *encKey;
char *proxy_key;
char *key_type;
char *proxy_key_type;
char *key_passwd;
char *proxy_key_passwd;
char *pubkey;
char *hostpubmd5;
char *hostpubsha256;
char *engine;
char *etag_save_file;
char *etag_compare_file;
bool crlf;
char *customrequest;
char *ssl_ec_curves;
char *krblevel;
char *request_target;
long httpversion;
bool http09_allowed;
bool nobuffer;
bool readbusy;
bool globoff;
bool use_httpget;
bool insecure_ok;
bool doh_insecure_ok;
for DoH */
bool proxy_insecure_ok;
for proxy */
bool terminal_binary_ok;
bool verifystatus;
bool doh_verifystatus;
bool create_dirs;
bool ftp_create_dirs;
bool ftp_skip_ip;
bool proxynegotiate;
bool proxyntlm;
bool proxydigest;
bool proxybasic;
bool proxyanyauth;
bool jsoned;
char *writeout;
struct curl_slist *quote;
struct curl_slist *postquote;
struct curl_slist *prequote;
long ssl_version;
long ssl_version_max;
long proxy_ssl_version;
long ip_version;
long create_file_mode;
curl_TimeCond timecond;
curl_off_t condtime;
struct curl_slist *headers;
struct curl_slist *proxyheaders;
struct tool_mime *mimeroot;
struct tool_mime *mimecurrent;
curl_mime *mimepost;
struct curl_slist *telnet_options;
struct curl_slist *resolve;
struct curl_slist *connect_to;
HttpReq httpreq;
curl_off_t sendpersecond;
curl_off_t recvpersecond;
bool ftp_ssl;
bool ftp_ssl_reqd;
bool ftp_ssl_control;
bool ftp_ssl_ccc;
int ftp_ssl_ccc_mode;
char *preproxy;
bool socks5_gssapi_nec;
encryption type exchange */
unsigned long socks5_auth;
char *proxy_service_name;
SOCKS5 proxies */
char *service_name;
Kerberos 5 and SPNEGO */
bool tcp_nodelay;
bool tcp_fastopen;
long req_retry;
bool retry_all_errors;
bool retry_connrefused;
long retry_delay;
long retry_maxtime;
char *ftp_account;
char *ftp_alternative_to_user;
int ftp_filemethod;
long mime_options;
long tftp_blksize;
bool tftp_no_options;
bool ignorecl;
bool disable_sessionid;
bool raw;
bool post301;
bool post302;
bool post303;
bool nokeepalive;
long alivetime;
bool content_disposition;
int default_node_flags;
is basically each given URL to transfer */
bool xattr;
long gssapi_delegation;
bool ssl_allow_beast;
bool proxy_ssl_allow_beast;
bool ssl_no_revoke;
bool ssl_revoke_best_effort;
revocation list errors */
bool native_ca_store;
bool proxy_native_ca_store;
bool ssl_auto_client_cert;
certificate for authentication (Schannel) */
bool proxy_ssl_auto_client_cert;
char *oauth_bearer;
bool noalpn;
char *unix_socket_path;
bool abstract_unix_socket;
bool falsestart;
bool path_as_is;
long expect100timeout_ms;
bool suppress_connect_headers;
from user callbacks */
bool synthetic_error;
bool ssh_compression;
long happy_eyeballs_timeout_ms;
0 is valid. default: CURL_HET_DEFAULT. */
bool haproxy_protocol;
char *haproxy_clientip;
bool disallow_username_in_url;
char *aws_sigv4;
enum {
CLOBBER_DEFAULT,
by using the default behavior for -o, -O, and -J.
If those options would have overwritten files, like
-o and -O would, then overwrite them. In the case of
-J, this will not overwrite any files. */
CLOBBER_NEVER,
CLOBBER_ALWAYS
} file_clobber_mode;
struct GlobalConfig *global;
struct OperationConfig *prev;
struct OperationConfig *next;
struct State state;
bool rm_partial;
files */
#ifdef USE_ECH
char *ech;
char *ech_config;
char *ech_public;
#endif
};
struct GlobalConfig {
bool showerror;
bool silent;
bool noprogress;
bool isatty;
char *trace_dump;
FILE *trace_stream;
bool trace_fopened;
trace tracetype;
bool tracetime;
bool traceids;
int progressmode;
char *libcurl;
bool fail_early;
bool styled_output;
long ms_per_transfer;
many milliseconds */
#ifdef CURLDEBUG
bool test_event_based;
#endif
bool parallel;
unsigned short parallel_max;
bool parallel_connect;
char *help_category;
struct var *variables;
struct OperationConfig *first;
struct OperationConfig *current;
struct OperationConfig *last;
};
void config_init(struct OperationConfig *config);
void config_free(struct OperationConfig *config);
#endif