CURLOPT_PR...H_PASSWORD(3)

πŸ’… CURLOPT_PROXY_TLSAUTH_PASSWORD β€” like, the password for proxy TLS auth ✨

okay so bestie, this is a page from the Library Functions Manual (that's the manual name, we're being fancy) and it's all about CURLOPT_PROXY_TLSAUTH_PASSWORD(3) β€” the option that hands over the password your proxy uses for TLS authentication. no cap, it's that simple, but let's get into it πŸŽ€


✨ SYNOPSIS ✨

like, here's the whole vibe in code form:

#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TLSAUTH_PASSWORD,
                          char *pwd);

🌸 DESCRIPTION 🌸

so you pass in a char pointer as the parameter, and it should point at a null-terminated password string. that password is what gets used for whichever TLS authentication method you picked with the CURLOPT_PROXY_TLSAUTH_TYPE(3) option. iykyk πŸ’…

heads up bestie: this one also requires that you've set the CURLOPT_PROXY_TLSAUTH_USERNAME(3) option too. it's a package deal, fr fr 🫢

the good news? the application does not have to keep the string around after setting this option. so you can let it go, it's fine, curl's got it πŸ’–

also, if you set this option multiple times, the last set string overrides all the previous ones. king behavior honestly. and if you set it to NULL, it disables the use of this option again β€” poof, gone ✨


πŸ”₯ DEFAULT πŸ”₯

NULL

(yeah, nothing by default β€” you gotta bring your own password, bestie πŸ™ˆ)


πŸ¦‹ PROTOCOLS πŸ¦‹

this functionality affects, like, all the TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. the whole squad 🌈

but lowkey important: this option works only with the following TLS backends: GnuTLS and OpenSSL

πŸ‘‘ EXAMPLE πŸ‘‘

here's the full main character moment:

int main(void)
{
  CURL *curl = curl_easy_init();
  if(curl) {
    CURLcode result;
    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
    curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
    curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP");
    curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user");
    curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret");
    result = curl_easy_perform(curl);
    curl_easy_cleanup(curl);
  }
}

look at her go πŸ˜­πŸ’œ


⭐ AVAILABILITY ⭐

added in curl 7.52.0 β€” she's been around a minute πŸŽ€


🌸 RETURN VALUE 🌸

curl_easy_setopt(3) returns a CURLcode indicating success or error.

CURLE_OK (which is 0) means everything was OK πŸ˜ŒπŸ’– and anything non-zero means an error occurred β€” go check libcurl-errors(3) for the full tea πŸ“


🧚 SEE ALSO 🧚


okay that's the whole page, you ate that ngl πŸ’…βœ¨ this was libcurl, dated 2026-10-12, and the page you just read is CURLOPT_PR...H_PASSWORD(3) β€” mwah, go set some proxy TLS passwords bestie πŸ«ΆπŸŒˆπŸ’–

πŸ“¦ where this page comes from