page-footer 12 KB

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