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 shouldn't 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
40IPv6 numerical addresses are compared as strings, so they will only match if
41the representations are the same: "::1" is the same as "::0:1" but they don't
42match.
43.IP "CURL_SSL_BACKEND <TLS backend>"
44If curl was built with support for "MultiSSL", meaning that it has built-in
45support for more than one TLS backend, this environment variable can be set to
46the case insensitive name of the particular backend to use when curl is
47invoked. Setting a name that isn't a built-in alternative, will make curl
48stay with the default.
49.IP "QLOGDIR <directory name>"
50If curl was built with HTTP/3 support, setting this environment variable to a
51local directory will make curl produce qlogs in that directory, using file
52names named after the destination connection id (in hex). Do note that these
53files can become rather large. Works with both QUIC backends.
54.IP "SSLKEYLOGFILE <file name>"
55If you set this environment variable to a file name, curl will store TLS
56secrets from its connections in that file when invoked to enable you to
57analyze the TLS traffic in real time using network analyzing tools such as
58Wireshark. This works with the following TLS backends: OpenSSL, libressl,
59BoringSSL, GnuTLS, NSS and wolfSSL.
60.SH "PROXY PROTOCOL PREFIXES"
61Since curl version 7.21.7, the proxy string may be specified with a
62protocol:// prefix to specify alternative proxy protocols.
63
64If no protocol is specified in the proxy string or if the string doesn't match
65a supported one, the proxy will be treated as an HTTP proxy.
66
67The supported proxy protocol prefixes are as follows:
68.IP "http://"
69Makes it use it as an HTTP proxy. The default if no scheme prefix is used.
70.IP "https://"
71Makes it treated as an \fBHTTPS\fP proxy.
72.IP "socks4://"
73Makes it the equivalent of --socks4
74.IP "socks4a://"
75Makes it the equivalent of --socks4a
76.IP "socks5://"
77Makes it the equivalent of --socks5
78.IP "socks5h://"
79Makes it the equivalent of --socks5-hostname
80.SH EXIT CODES
81There are a bunch of different error codes and their corresponding error
82messages that may appear during bad conditions. At the time of this writing,
83the exit codes are:
84.IP 1
85Unsupported protocol. This build of curl has no support for this protocol.
86.IP 2
87Failed to initialize.
88.IP 3
89URL malformed. The syntax was not correct.
90.IP 4
91A feature or option that was needed to perform the desired request was not
92enabled or was explicitly disabled at build-time. To make curl able to do
93this, you probably need another build of libcurl!
94.IP 5
95Couldn't resolve proxy. The given proxy host could not be resolved.
96.IP 6
97Couldn't resolve host. The given remote host was not resolved.
98.IP 7
99Failed to connect to host.
100.IP 8
101Weird server reply. The server sent data curl couldn't parse.
102.IP 9
103FTP access denied. The server denied login or denied access to the particular
104resource or directory you wanted to reach. Most often you tried to change to a
105directory that doesn't exist on the server.
106.IP 10
107FTP accept failed. While waiting for the server to connect back when an active
108FTP session is used, an error code was sent over the control connection or
109similar.
110.IP 11
111FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.
112.IP 12
113During an active FTP session while waiting for the server to connect back to
114curl, the timeout expired.
115.IP 13
116FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.
117.IP 14
118FTP weird 227 format. Curl couldn't parse the 227-line the server sent.
119.IP 15
120FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
121.IP 16
122HTTP/2 error. A problem was detected in the HTTP2 framing layer. This is
123somewhat generic and can be one out of several problems, see the error message
124for details.
125.IP 17
126FTP couldn't set binary. Couldn't change transfer method to binary.
127.IP 18
128Partial file. Only a part of the file was transferred.
129.IP 19
130FTP couldn't download/access the given file, the RETR (or similar) command
131failed.
132.IP 21
133FTP quote error. A quote command returned error from the server.
134.IP 22
135HTTP page not retrieved. The requested url was not found or returned another
136error with the HTTP error code being 400 or above. This return code only
137appears if --fail is used.
138.IP 23
139Write error. Curl couldn't write data to a local filesystem or similar.
140.IP 25
141FTP couldn't STOR file. The server denied the STOR operation, used for FTP
142uploading.
143.IP 26
144Read error. Various reading problems.
145.IP 27
146Out of memory. A memory allocation request failed.
147.IP 28
148Operation timeout. The specified time-out period was reached according to the
149conditions.
150.IP 30
151FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT
152command, try doing a transfer using PASV instead!
153.IP 31
154FTP couldn't use REST. The REST command failed. This command is used for
155resumed FTP transfers.
156.IP 33
157HTTP range error. The range "command" didn't work.
158.IP 34
159HTTP post error. Internal post-request generation error.
160.IP 35
161SSL connect error. The SSL handshaking failed.
162.IP 36
163Bad download resume. Couldn't continue an earlier aborted download.
164.IP 37
165FILE couldn't read file. Failed to open the file. Permissions?
166.IP 38
167LDAP cannot bind. LDAP bind operation failed.
168.IP 39
169LDAP search failed.
170.IP 41
171Function not found. A required LDAP function was not found.
172.IP 42
173Aborted by callback. An application told curl to abort the operation.
174.IP 43
175Internal error. A function was called with a bad parameter.
176.IP 45
177Interface error. A specified outgoing interface could not be used.
178.IP 47
179Too many redirects. When following redirects, curl hit the maximum amount.
180.IP 48
181Unknown option specified to libcurl. This indicates that you passed a weird
182option to curl that was passed on to libcurl and rejected. Read up in the
183manual!
184.IP 49
185Malformed telnet option.
186.IP 51
187The peer's SSL certificate or SSH MD5 fingerprint was not OK.
188.IP 52
189The server didn't reply anything, which here is considered an error.
190.IP 53
191SSL crypto engine not found.
192.IP 54
193Cannot set SSL crypto engine as default.
194.IP 55
195Failed sending network data.
196.IP 56
197Failure in receiving network data.
198.IP 58
199Problem with the local certificate.
200.IP 59
201Couldn't use specified SSL cipher.
202.IP 60
203Peer certificate cannot be authenticated with known CA certificates.
204.IP 61
205Unrecognized transfer encoding.
206.IP 62
207Invalid LDAP URL.
208.IP 63
209Maximum file size exceeded.
210.IP 64
211Requested FTP SSL level failed.
212.IP 65
213Sending the data requires a rewind that failed.
214.IP 66
215Failed to initialise SSL Engine.
216.IP 67
217The user name, password, or similar was not accepted and curl failed to log in.
218.IP 68
219File not found on TFTP server.
220.IP 69
221Permission problem on TFTP server.
222.IP 70
223Out of disk space on TFTP server.
224.IP 71
225Illegal TFTP operation.
226.IP 72
227Unknown TFTP transfer ID.
228.IP 73
229File already exists (TFTP).
230.IP 74
231No such user (TFTP).
232.IP 75
233Character conversion failed.
234.IP 76
235Character conversion functions required.
236.IP 77
237Problem with reading the SSL CA cert (path? access rights?).
238.IP 78
239The resource referenced in the URL does not exist.
240.IP 79
241An unspecified error occurred during the SSH session.
242.IP 80
243Failed to shut down the SSL connection.
244.IP 82
245Could not load CRL file, missing or wrong format (added in 7.19.0).
246.IP 83
247Issuer check failed (added in 7.19.0).
248.IP 84
249The FTP PRET command failed
250.IP 85
251RTSP: mismatch of CSeq numbers
252.IP 86
253RTSP: mismatch of Session Identifiers
254.IP 87
255unable to parse FTP file list
256.IP 88
257FTP chunk callback reported error
258.IP 89
259No connection available, the session will be queued
260.IP 90
261SSL public key does not matched pinned public key
262.IP 91
263Invalid SSL certificate status.
264.IP 92
265Stream error in HTTP/2 framing layer.
266.IP 93
267An API function was called from inside a callback.
268.IP 94
269An authentication function returned an error.
270.IP 95
271A problem was detected in the HTTP/3 layer. This is somewhat generic and can
272be one out of several problems, see the error message for details.
273.IP 96
274QUIC connection error. This error may be caused by an SSL library error. QUIC
275is the protocol used for HTTP/3 transfers.
276.IP XX
277More error codes will appear here in future releases. The existing ones
278are meant to never change.
279.SH AUTHORS / CONTRIBUTORS
280Daniel Stenberg is the main author, but the whole list of contributors is
281found in the separate THANKS file.
282.SH WWW
283https://curl.haxx.se
284.SH "SEE ALSO"
285.BR ftp (1),
286.BR wget (1)
287