page-footer 12 KB

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