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 π§
CURLOPT_PROXY_TLSAUTH_TYPE(3)CURLOPT_PROXY_TLSAUTH_USERNAME(3)CURLOPT_TLSAUTH_TYPE(3)CURLOPT_TLSAUTH_USERNAME(3)
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
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms