• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1.SH FILES
2.I ~/.curlrc
3.RS
4Default config file, see --config for details.
5.SH ENVIRONMENT
6The environment variables can be specified in lower case or upper case. The
7lower case version has precedence. http_proxy is an exception as it is only
8available in lower case.
9
10Using an environment variable to set the proxy has the same effect as using
11the --proxy option.
12
13.IP "http_proxy [protocol://]<host>[:port]"
14Sets the proxy server to use for HTTP.
15.IP "HTTPS_PROXY [protocol://]<host>[:port]"
16Sets the proxy server to use for HTTPS.
17.IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
18Sets the proxy server to use for [url-protocol], where the protocol is a
19protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
20SMTP, LDAP, etc.
21.IP "ALL_PROXY [protocol://]<host>[:port]"
22Sets the proxy server to use if no protocol-specific proxy is set.
23.IP "NO_PROXY <comma-separated list of hosts/domains>"
24list of host names that should not go through any proxy. If set to an asterisk
25'*' only, it matches all hosts. Each name in this list is matched as either
26a domain name which contains the hostname, or the hostname itself.
27
28This environment variable disables use of the proxy even when specified with
29the --proxy option. That is
30.B NO_PROXY=direct.example.com curl -x http://proxy.example.com
31.B http://direct.example.com
32accesses the target URL directly, and
33.B NO_PROXY=direct.example.com curl -x http://proxy.example.com
34.B http://somewhere.example.com
35accesses the target URL through the proxy.
36
37The list of host names can also be include numerical IP addresses, and IPv6
38versions should then be given without enclosing brackets.
39
40Since 7.86.0, IP addresses can be specified using CIDR notation: an appended
41slash and number specifies the number of "network bits" out of the address to
42use in the comparison. For example "192.168.0.0/16" would match all addresses
43starting with "192.168".
44.IP "APPDATA <dir>"
45On Windows, this variable is used when trying to find the home directory. If
46the primary home variable are all unset.
47.IP "COLUMNS <terminal width>"
48If set, the specified number of characters will be used as the terminal width
49when the alternative progress-bar is shown. If not set, curl will try to
50figure it out using other ways.
51.IP "CURL_CA_BUNDLE <file>"
52If set, will be used as the --cacert value.
53.IP "CURL_HOME <dir>"
54If set, is the first variable curl checks when trying to find its home
55directory. If not set, it continues to check *XDG_CONFIG_HOME*
56.IP "CURL_SSL_BACKEND <TLS backend>"
57If curl was built with support for "MultiSSL", meaning that it has built-in
58support for more than one TLS backend, this environment variable can be set to
59the case insensitive name of the particular backend to use when curl is
60invoked. Setting a name that is not a built-in alternative will make curl
61stay with the default.
62
63SSL backend names (case-insensitive): bearssl, gnutls, gskit, mbedtls,
64nss, openssl, rustls, schannel, secure-transport, wolfssl
65.IP "HOME <dir>"
66If set, this is used to find the home directory when that is needed. Like when
67looking for the default .curlrc. *CURL_HOME* and *XDG_CONFIG_HOME*
68have preference.
69.IP "QLOGDIR <directory name>"
70If curl was built with HTTP/3 support, setting this environment variable to a
71local directory will make curl produce qlogs in that directory, using file
72names named after the destination connection id (in hex). Do note that these
73files can become rather large. Works with both QUIC backends.
74.IP SHELL
75Used on VMS when trying to detect if using a DCL or a "unix" shell.
76.IP "SSL_CERT_DIR <dir>"
77If set, will be used as the --capath value.
78.IP "SSL_CERT_FILE <path>"
79If set, will be used as the --cacert value.
80.IP "SSLKEYLOGFILE <file name>"
81If you set this environment variable to a file name, curl will store TLS
82secrets from its connections in that file when invoked to enable you to
83analyze the TLS traffic in real time using network analyzing tools such as
84Wireshark. This works with the following TLS backends: OpenSSL, libressl,
85BoringSSL, GnuTLS, NSS and wolfSSL.
86.IP "USERPROFILE <dir>"
87On Windows, this variable is used when trying to find the home directory. If
88the other, primary, variable are all unset. If set, curl will use the path
89"$USERPROFILE\\Application Data".
90.IP "XDG_CONFIG_HOME <dir>"
91If *CURL_HOME* is not set, this variable is checked when looking for a
92default .curlrc file.
93.SH "PROXY PROTOCOL PREFIXES"
94The proxy string may be specified with a protocol:// prefix to specify
95alternative proxy protocols. (Added in 7.21.7)
96
97If no protocol is specified in the proxy string or if the string does not match
98a supported one, the proxy will be treated as an HTTP proxy.
99
100The supported proxy protocol prefixes are as follows:
101.IP "http://"
102Makes it use it as an HTTP proxy. The default if no scheme prefix is used.
103.IP "https://"
104Makes it treated as an **HTTPS** proxy.
105.IP "socks4://"
106Makes it the equivalent of --socks4
107.IP "socks4a://"
108Makes it the equivalent of --socks4a
109.IP "socks5://"
110Makes it the equivalent of --socks5
111.IP "socks5h://"
112Makes it the equivalent of --socks5-hostname
113.SH EXIT CODES
114There are a bunch of different error codes and their corresponding error
115messages that may appear under error conditions. At the time of this writing,
116the exit codes are:
117.IP 0
118Success. The operation completed successfully according to the instructions.
119.IP 1
120Unsupported protocol. This build of curl has no support for this protocol.
121.IP 2
122Failed to initialize.
123.IP 3
124URL malformed. The syntax was not correct.
125.IP 4
126A feature or option that was needed to perform the desired request was not
127enabled or was explicitly disabled at build-time. To make curl able to do
128this, you probably need another build of libcurl.
129.IP 5
130Could not resolve proxy. The given proxy host could not be resolved.
131.IP 6
132Could not resolve host. The given remote host could not be resolved.
133.IP 7
134Failed to connect to host.
135.IP 8
136Weird server reply. The server sent data curl could not parse.
137.IP 9
138FTP access denied. The server denied login or denied access to the particular
139resource or directory you wanted to reach. Most often you tried to change to a
140directory that does not exist on the server.
141.IP 10
142FTP accept failed. While waiting for the server to connect back when an active
143FTP session is used, an error code was sent over the control connection or
144similar.
145.IP 11
146FTP weird PASS reply. Curl could not parse the reply sent to the PASS request.
147.IP 12
148During an active FTP session while waiting for the server to connect back to
149curl, the timeout expired.
150.IP 13
151FTP weird PASV reply, Curl could not parse the reply sent to the PASV request.
152.IP 14
153FTP weird 227 format. Curl could not parse the 227-line the server sent.
154.IP 15
155FTP cannot use host. Could not resolve the host IP we got in the 227-line.
156.IP 16
157HTTP/2 error. A problem was detected in the HTTP2 framing layer. This is
158somewhat generic and can be one out of several problems, see the error message
159for details.
160.IP 17
161FTP could not set binary. Could not change transfer method to binary.
162.IP 18
163Partial file. Only a part of the file was transferred.
164.IP 19
165FTP could not download/access the given file, the RETR (or similar) command
166failed.
167.IP 21
168FTP quote error. A quote command returned error from the server.
169.IP 22
170HTTP page not retrieved. The requested URL was not found or returned another
171error with the HTTP error code being 400 or above. This return code only
172appears if --fail is used.
173.IP 23
174Write error. Curl could not write data to a local filesystem or similar.
175.IP 25
176FTP could not STOR file. The server denied the STOR operation, used for FTP
177uploading.
178.IP 26
179Read error. Various reading problems.
180.IP 27
181Out of memory. A memory allocation request failed.
182.IP 28
183Operation timeout. The specified time-out period was reached according to the
184conditions.
185.IP 30
186FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT
187command, try doing a transfer using PASV instead!
188.IP 31
189FTP could not use REST. The REST command failed. This command is used for
190resumed FTP transfers.
191.IP 33
192HTTP range error. The range "command" did not work.
193.IP 34
194HTTP post error. Internal post-request generation error.
195.IP 35
196SSL connect error. The SSL handshaking failed.
197.IP 36
198Bad download resume. Could not continue an earlier aborted download.
199.IP 37
200FILE could not read file. Failed to open the file. Permissions?
201.IP 38
202LDAP cannot bind. LDAP bind operation failed.
203.IP 39
204LDAP search failed.
205.IP 41
206Function not found. A required LDAP function was not found.
207.IP 42
208Aborted by callback. An application told curl to abort the operation.
209.IP 43
210Internal error. A function was called with a bad parameter.
211.IP 45
212Interface error. A specified outgoing interface could not be used.
213.IP 47
214Too many redirects. When following redirects, curl hit the maximum amount.
215.IP 48
216Unknown option specified to libcurl. This indicates that you passed a weird
217option to curl that was passed on to libcurl and rejected. Read up in the
218manual!
219.IP 49
220Malformed telnet option.
221.IP 52
222The server did not reply anything, which here is considered an error.
223.IP 53
224SSL crypto engine not found.
225.IP 54
226Cannot set SSL crypto engine as default.
227.IP 55
228Failed sending network data.
229.IP 56
230Failure in receiving network data.
231.IP 58
232Problem with the local certificate.
233.IP 59
234Could not use specified SSL cipher.
235.IP 60
236Peer certificate cannot be authenticated with known CA certificates.
237.IP 61
238Unrecognized transfer encoding.
239.IP 63
240Maximum file size exceeded.
241.IP 64
242Requested FTP SSL level failed.
243.IP 65
244Sending the data requires a rewind that failed.
245.IP 66
246Failed to initialise SSL Engine.
247.IP 67
248The user name, password, or similar was not accepted and curl failed to log in.
249.IP 68
250File not found on TFTP server.
251.IP 69
252Permission problem on TFTP server.
253.IP 70
254Out of disk space on TFTP server.
255.IP 71
256Illegal TFTP operation.
257.IP 72
258Unknown TFTP transfer ID.
259.IP 73
260File already exists (TFTP).
261.IP 74
262No such user (TFTP).
263.IP 77
264Problem reading the SSL CA cert (path? access rights?).
265.IP 78
266The resource referenced in the URL does not exist.
267.IP 79
268An unspecified error occurred during the SSH session.
269.IP 80
270Failed to shut down the SSL connection.
271.IP 82
272Could not load CRL file, missing or wrong format (added in 7.19.0).
273.IP 83
274Issuer check failed (added in 7.19.0).
275.IP 84
276The FTP PRET command failed.
277.IP 85
278Mismatch of RTSP CSeq numbers.
279.IP 86
280Mismatch of RTSP Session Identifiers.
281.IP 87
282Unable to parse FTP file list.
283.IP 88
284FTP chunk callback reported error.
285.IP 89
286No connection available, the session will be queued.
287.IP 90
288SSL public key does not matched pinned public key.
289.IP 91
290Invalid SSL certificate status.
291.IP 92
292Stream error in HTTP/2 framing layer.
293.IP 93
294An API function was called from inside a callback.
295.IP 94
296An authentication function returned an error.
297.IP 95
298A problem was detected in the HTTP/3 layer. This is somewhat generic and can
299be one out of several problems, see the error message for details.
300.IP 96
301QUIC connection error. This error may be caused by an SSL library error. QUIC
302is the protocol used for HTTP/3 transfers.
303.IP 97
304Proxy handshake error.
305.IP 98
306A client-side certificate is required to complete the TLS handshake.
307.IP 99
308Poll or select returned fatal error.
309.IP XX
310More error codes will appear here in future releases. The existing ones
311are meant to never change.
312.SH BUGS
313If you experience any problems with curl, submit an issue in the project's bug
314tracker on GitHub: https://github.com/curl/curl/issues
315.SH AUTHORS / CONTRIBUTORS
316Daniel Stenberg is the main author, but the whole list of contributors is
317found in the separate THANKS file.
318.SH WWW
319https://curl.se
320.SH "SEE ALSO"
321.BR ftp (1),
322.BR wget (1)
323