xref: /aosp_15_r20/external/curl/docs/libcurl/libcurl-env.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker---
2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
4*6236dae4SAndroid Build Coastguard WorkerTitle: libcurl-env
5*6236dae4SAndroid Build Coastguard WorkerSection: 3
6*6236dae4SAndroid Build Coastguard WorkerSource: libcurl
7*6236dae4SAndroid Build Coastguard WorkerSee-also:
8*6236dae4SAndroid Build Coastguard Worker  - libcurl-env-dbg (3)
9*6236dae4SAndroid Build Coastguard WorkerProtocol:
10*6236dae4SAndroid Build Coastguard Worker  - All
11*6236dae4SAndroid Build Coastguard WorkerAdded-in: n/a
12*6236dae4SAndroid Build Coastguard Worker---
13*6236dae4SAndroid Build Coastguard Worker
14*6236dae4SAndroid Build Coastguard Worker# NAME
15*6236dae4SAndroid Build Coastguard Worker
16*6236dae4SAndroid Build Coastguard Workerlibcurl-env - environment variables libcurl understands
17*6236dae4SAndroid Build Coastguard Worker
18*6236dae4SAndroid Build Coastguard Worker# DESCRIPTION
19*6236dae4SAndroid Build Coastguard Worker
20*6236dae4SAndroid Build Coastguard Workerlibcurl reads and understands a set of environment variables that if set
21*6236dae4SAndroid Build Coastguard Workercontrols and changes behaviors. This is the full list of variables to set and
22*6236dae4SAndroid Build Coastguard Workerdescription of what they do. Also note that curl, the command line tool,
23*6236dae4SAndroid Build Coastguard Workersupports a set of additional environment variables independently of this.
24*6236dae4SAndroid Build Coastguard Worker
25*6236dae4SAndroid Build Coastguard Worker## `[scheme]_proxy`
26*6236dae4SAndroid Build Coastguard Worker
27*6236dae4SAndroid Build Coastguard WorkerWhen libcurl is given a URL to use in a transfer, it first extracts the scheme
28*6236dae4SAndroid Build Coastguard Workerpart from the URL and checks if there is a given proxy set for that in its
29*6236dae4SAndroid Build Coastguard Workercorresponding environment variable. A URL like https://example.com makes
30*6236dae4SAndroid Build Coastguard Workerlibcurl use the **http_proxy** variable, while a URL like ftp://example.com
31*6236dae4SAndroid Build Coastguard Workeruses the **ftp_proxy** variable.
32*6236dae4SAndroid Build Coastguard Worker
33*6236dae4SAndroid Build Coastguard WorkerThese proxy variables are also checked for in their uppercase versions, except
34*6236dae4SAndroid Build Coastguard Workerthe **http_proxy** one which is only used lowercase. Note also that some
35*6236dae4SAndroid Build Coastguard Workersystems actually have a case insensitive handling of environment variables and
36*6236dae4SAndroid Build Coastguard Workerthen of course **HTTP_PROXY** still works.
37*6236dae4SAndroid Build Coastguard Worker
38*6236dae4SAndroid Build Coastguard WorkerAn exception exists for the WebSocket **ws** and **wss** URL schemes, where
39*6236dae4SAndroid Build Coastguard Workerlibcurl first checks **ws_proxy** or **wss_proxy** but if they are not set, it
40*6236dae4SAndroid Build Coastguard Workerfalls back and tries the http and https versions instead if set.
41*6236dae4SAndroid Build Coastguard Worker
42*6236dae4SAndroid Build Coastguard Worker## `ALL_PROXY`
43*6236dae4SAndroid Build Coastguard Worker
44*6236dae4SAndroid Build Coastguard WorkerThis is a setting to set proxy for all URLs, independently of what scheme is
45*6236dae4SAndroid Build Coastguard Workerbeing used. Note that the scheme specific variables overrides this one if set.
46*6236dae4SAndroid Build Coastguard Worker
47*6236dae4SAndroid Build Coastguard Worker## `CURL_SSL_BACKEND`
48*6236dae4SAndroid Build Coastguard Worker
49*6236dae4SAndroid Build Coastguard WorkerWhen libcurl is built to support multiple SSL backends, it selects a specific
50*6236dae4SAndroid Build Coastguard Workerbackend at first use. If no selection is done by the program using libcurl,
51*6236dae4SAndroid Build Coastguard Workerthis variable's selection is used. Setting a name that is not a built-in
52*6236dae4SAndroid Build Coastguard Workeralternative makes libcurl stay with the default.
53*6236dae4SAndroid Build Coastguard Worker
54*6236dae4SAndroid Build Coastguard WorkerSSL backend names (case-insensitive): BearSSL, GnuTLS, mbedTLS,
55*6236dae4SAndroid Build Coastguard Workernss, OpenSSL, Rustls, Schannel, Secure-Transport, wolfSSL
56*6236dae4SAndroid Build Coastguard Worker
57*6236dae4SAndroid Build Coastguard Worker## `HOME`
58*6236dae4SAndroid Build Coastguard Worker
59*6236dae4SAndroid Build Coastguard WorkerWhen the netrc feature is used (CURLOPT_NETRC(3)), this variable is
60*6236dae4SAndroid Build Coastguard Workerchecked as the primary way to find the "current" home directory in which
61*6236dae4SAndroid Build Coastguard Workerthe .netrc file is likely to exist.
62*6236dae4SAndroid Build Coastguard Worker
63*6236dae4SAndroid Build Coastguard Worker## `USERPROFILE`
64*6236dae4SAndroid Build Coastguard Worker
65*6236dae4SAndroid Build Coastguard WorkerWhen the netrc feature is used (CURLOPT_NETRC(3)), this variable is
66*6236dae4SAndroid Build Coastguard Workerchecked as the secondary way to find the "current" home directory (on Windows
67*6236dae4SAndroid Build Coastguard Workeronly) in which the .netrc file is likely to exist.
68*6236dae4SAndroid Build Coastguard Worker
69*6236dae4SAndroid Build Coastguard Worker## `LOGNAME`
70*6236dae4SAndroid Build Coastguard Worker
71*6236dae4SAndroid Build Coastguard WorkerUsername to use when invoking the *ntlm-wb* tool, if *NTLMUSER* was
72*6236dae4SAndroid Build Coastguard Workernot set.
73*6236dae4SAndroid Build Coastguard Worker
74*6236dae4SAndroid Build Coastguard Worker## `NO_PROXY`
75*6236dae4SAndroid Build Coastguard Worker
76*6236dae4SAndroid Build Coastguard WorkerThis has the same functionality as the CURLOPT_NOPROXY(3) option: it
77*6236dae4SAndroid Build Coastguard Workergives libcurl a comma-separated list of hostname patterns for which libcurl
78*6236dae4SAndroid Build Coastguard Workershould not use a proxy.
79*6236dae4SAndroid Build Coastguard Worker
80*6236dae4SAndroid Build Coastguard Worker## `NTLMUSER`
81*6236dae4SAndroid Build Coastguard Worker
82*6236dae4SAndroid Build Coastguard WorkerUsername to use when invoking the *ntlm-wb* tool.
83*6236dae4SAndroid Build Coastguard Worker
84*6236dae4SAndroid Build Coastguard Worker## `SSLKEYLOGFILE`
85*6236dae4SAndroid Build Coastguard Worker
86*6236dae4SAndroid Build Coastguard WorkerWhen set and libcurl runs with a SSL backend that supports this feature,
87*6236dae4SAndroid Build Coastguard Workerlibcurl saves SSL secrets into the given filename. Using those SSL secrets,
88*6236dae4SAndroid Build Coastguard Workerother tools (such as Wireshark) can decrypt the SSL communication and
89*6236dae4SAndroid Build Coastguard Workeranalyze/view the traffic.
90*6236dae4SAndroid Build Coastguard Worker
91*6236dae4SAndroid Build Coastguard WorkerThese secrets and this file might be sensitive. Users are advised to take
92*6236dae4SAndroid Build Coastguard Workerprecautions so that they are not stolen or otherwise inadvertently revealed.
93*6236dae4SAndroid Build Coastguard Worker
94*6236dae4SAndroid Build Coastguard Worker## `USER`
95*6236dae4SAndroid Build Coastguard Worker
96*6236dae4SAndroid Build Coastguard WorkerUsername to use when invoking the *ntlm-wb* tool, if *NTLMUSER* and *LOGNAME*
97*6236dae4SAndroid Build Coastguard Workerwere not set.
98*6236dae4SAndroid Build Coastguard Worker
99*6236dae4SAndroid Build Coastguard Worker# Debug Variables
100*6236dae4SAndroid Build Coastguard Worker
101*6236dae4SAndroid Build Coastguard WorkerDebug variables are intended for internal use and are documented in
102*6236dae4SAndroid Build Coastguard Workerlibcurl-env-dbg(3).
103