libcurl-env(3)

πŸ’– libcurl-env(3) β€” Library Functions Manual πŸ’–

okay bestie, listen up: this is libcurl-env(3), and it's literally the cheat sheet for every environment variable libcurl actually understands πŸ‘‘


✨ NAME ✨

libcurl-env β€” the environment variables libcurl understands, like, all of them 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

libcurl reads and understands a whole little set of environment variables that, if you set them, control and change its behavior. This is the full list of variables you can set, plus what each one does. no gatekeeping, we're giving you everything πŸ’…

Also, quick heads up: curl, the command line tool, supports its own set of additional environment variables independently of this list. different vibes, different list πŸŽ€


  • [scheme]_proxy β€” okay so when libcurl gets a URL for a transfer, the first thing it does is pull out the scheme part of that URL and check if there's a proxy set for that scheme in the matching environment variable. so a URL like https://example.com makes libcurl use the http_proxy variable, while a URL like ftp://example.com uses the ftp_proxy variable. iconic behavior fr fr πŸ¦‹

These proxy variables also get checked in their uppercase versions, except http_proxy which is only ever used lowercase. and note that some systems actually handle environment variables case-insensitively, in which case HTTP_PROXY still works, periodt.

There's one exception and it's for the WebSocket ws and wss URL schemes πŸ‘€ there, libcurl checks ws_proxy or wss_proxy first, but if those aren't set it falls back and tries the http and https versions instead if they're set. slay, adaptive.

  • ALL_PROXY β€” the "set a proxy for literally everything" setting, independent of whatever scheme is being used. but lowkey the scheme-specific variables override this one if they're set, so it's giving backup plan energy πŸ’œ
  • CURL_SSL_BACKEND β€” when libcurl is built to support multiple SSL backends, it picks a specific backend on first use. if the program using libcurl doesn't make a selection, then this variable's selection is what gets used. set a name that isn't a built-in alternative and libcurl just stays with the default πŸ™ˆ

The SSL backend names (case-insensitive, bestie): GnuTLS, mbedTLS, OpenSSL, Rustls, Schannel, wolfSSL ✨

  • HOME β€” when the netrc feature is in play (CURLOPT_NETRC(3)), this variable gets checked as the primary way to find the "current" home directory where the .netrc file is likely hanging out 🏠
  • USERPROFILE β€” when the netrc feature is in play (CURLOPT_NETRC(3)), this variable gets checked as the secondary way to find the "current" home directory (on Windows only, iykyk) where the .netrc file is likely to exist πŸ’»
  • NETRC β€” the filename used as the netrc file when CURLOPT_NETRC(3) is used without CURLOPT_NETRC_FILE(3). (Added in 8.16.0, so don't come at her if you're on an older build 🫢)
  • NO_PROXY β€” same functionality as the CURLOPT_NOPROXY(3) option: it hands libcurl a comma-separated list of hostname patterns for which libcurl should not use a proxy. bye-bye proxy, no cap 🚫
  • SSLKEYLOGFILE β€” when this is set and libcurl is running with an SSL backend that supports the feature, libcurl saves SSL secrets into the given filename. and with those SSL secrets, other tools (like Wireshark πŸ‘€) can decrypt the SSL communication and analyze/view the traffic. literally main character energy for debugging πŸ”₯
⚠️ okay this part matters, bestie: these secrets and this file might be sensitive. users are advised to take precautions so that they're not stolen or otherwise inadvertently revealed. protect the file like it's your diary πŸ’€πŸ”’

πŸŽ€ Debug Variables πŸŽ€

Debug variables are intended for internal use and are documented in libcurl-env-dbg(3). not for you, unless you're built different 🧚


🌈 SEE ALSO 🌈


and that's the whole page, bestie πŸ’– this was libcurl (that's the source/version, yes bestie, version libcurl) dropped on 2026-10-12, and the page is libcurl-env(3). go forth and configure your env responsibly πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from