• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al.
3SPDX-License-Identifier: curl
4Title: libcurl-env
5Section: 3
6Source: libcurl
7See-also:
8  - libcurl-env-dbg (3)
9---
10
11# NAME
12
13libcurl-env - environment variables libcurl understands
14
15# DESCRIPTION
16
17libcurl reads and understands a set of environment variables that if set
18controls and changes behaviors. This is the full list of variables to set and
19description of what they do. Also note that curl, the command line tool,
20supports a set of additional environment variables independently of this.
21
22## [scheme]_proxy
23
24When libcurl is given a URL to use in a transfer, it first extracts the scheme
25part from the URL and checks if there is a given proxy set for that in its
26corresponding environment variable. A URL like https://example.com makes
27libcurl use the **http_proxy** variable, while a URL like ftp://example.com
28uses the **ftp_proxy** variable.
29
30These proxy variables are also checked for in their uppercase versions, except
31the **http_proxy** one which is only used lowercase. Note also that some
32systems actually have a case insensitive handling of environment variables and
33then of course **HTTP_PROXY** still works.
34
35An exception exists for the WebSocket **ws** and **wss** URL schemes,
36where libcurl first checks **ws_proxy** or **wss_proxy** but if they are
37not set, it will fall back and try the http and https versions instead if set.
38
39## ALL_PROXY
40
41This is a setting to set proxy for all URLs, independently of what scheme is
42being used. Note that the scheme specific variables overrides this one if set.
43
44## CURL_SSL_BACKEND
45
46When libcurl is built to support multiple SSL backends, it selects a specific
47backend at first use. If no selection is done by the program using libcurl,
48this variable's selection is used. Setting a name that is not a built-in
49alternative makes libcurl stay with the default.
50
51SSL backend names (case-insensitive): BearSSL, GnuTLS, mbedTLS,
52nss, OpenSSL, rustls, Schannel, Secure-Transport, wolfSSL
53
54## HOME
55
56When the netrc feature is used (CURLOPT_NETRC(3)), this variable is
57checked as the primary way to find the "current" home directory in which
58the .netrc file is likely to exist.
59
60## USERPROFILE
61
62When the netrc feature is used (CURLOPT_NETRC(3)), this variable is
63checked as the secondary way to find the "current" home directory (on Windows
64only) in which the .netrc file is likely to exist.
65
66## LOGNAME
67
68User name to use when invoking the *ntlm-wb* tool, if *NTLMUSER* was
69not set.
70
71## NO_PROXY
72
73This has the same functionality as the CURLOPT_NOPROXY(3) option: it
74gives libcurl a comma-separated list of hostname patterns for which libcurl
75should not use a proxy.
76
77## NTLMUSER
78
79User name to use when invoking the *ntlm-wb* tool.
80
81## SSLKEYLOGFILE
82
83When set and libcurl runs with a SSL backend that supports this feature,
84libcurl saves SSL secrets into the given filename. Using those SSL secrets,
85other tools (such as Wireshark) can decrypt the SSL communication and
86analyze/view the traffic.
87
88These secrets and this file might be sensitive. Users are advised to take
89precautions so that they are not stolen or otherwise inadvertently revealed.
90
91## USER
92
93User name to use when invoking the *ntlm-wb* tool, if *NTLMUSER* and
94*LOGNAME* were not set.
95
96# Debug Variables
97
98Debug variables are intended for internal use and are documented in
99libcurl-env-dbg(3).
100