GNURLOPT_PROXY_TLSAUTH_USERNAME(3)
π GNURLOPT_PROXY_TLSAUTH_USERNAME(3) π
okay bestie, welcome to the GNURLOPT_PROXY_TLSAUTH_USERNAME(3) page from the curl_easy_setopt options manual β yes, thatβs the whole manual name, and itβs giving very βI live in the curl man pagesβ energy. This one is all about the proxy TLS auth username, and itβs lowkey simple but highkey important. π
π NAME π
CURLOPT_PROXY_TLSAUTH_USERNAME β the user name to use for proxy TLS authentication. Thatβs the vibe. π
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TLSAUTH_USERNAME,
char *user);
π¦ DESCRIPTION π¦
So you pass a char * as the parameter, and it should point to the null-terminated username for the HTTPS proxy TLS authentication method you picked with the CURLOPT_PROXY_TLSAUTH_TYPE(3) option. It literally requires that the CURLOPT_PROXY_TLSAUTH_PASSWORD(3) option also be set β theyβre a matching set, bestie. π«Ά
And the cute part? Your app does not have to keep the string around after setting this option. Once itβs set, you can let that string go. β¨
π DEFAULT π
NULL β thatβs the default, periodt. If you donβt set it, itβs just NULL. π
π PROTOCOLS π
All β thatβs the whole list. π
π EXAMPLE π
Hereβs the example, exactly as it appears, no cap:
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
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");
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
β AVAILABILITY β
Added in 7.52.0, bestie. β
π RETURN VALUE π
It returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if it isnβt, or CURLE_OUT_OF_MEMORY if there wasnβt enough heap space. Those are the three outcomes, and yes, CURLE_OUT_OF_MEMORY is the βheap said noβ one. π
π§ SEE ALSO π§
CURLOPT_PROXY_TLSAUTH_TYPE(3)CURLOPT_PROXY_TLSAUTH_PASSWORD(3)CURLOPT_TLSAUTH_TYPE(3)CURLOPT_TLSAUTH_PASSWORD(3), (yes, the original leaves a trailing comma there β iconic π )
This little page comes from libcurl 7.52.0, dated 16 Nov 2016, and the footer stamp would normally say GNURLOPT_P...TH_USERNAME(3) β so consider that your cute archive mark. Mwah! π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms