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