GNURLOPT_PROXYPASSWORD(3)
π GNURLOPT_PROXYPASSWORD π
okay so bestie, this page is from the curl_easy_setopt options manual, and it's all about GNURLOPT_PROXYPASSWORD(3). we're literally about to make proxy password setup make sense. π
πΈ NAME πΈ
CURLOPT_PROXYPASSWORD β password to use with proxy authentication π
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYPASSWORD, char
*pwd);
π¦ DESCRIPTION π¦
Pass a char * as parameter, and it should be pointing to the null-terminated password to use for authentication with the proxy. fr fr, that's the whole job.
The CURLOPT_PROXYPASSWORD(3) option should be used in conjunction with the CURLOPT_PROXYUSERNAME(3) option β they're a matching set, iykyk. π«Ά
The application does not have to keep the string around after setting this option. lowkey convenient, right? π
π DEFAULT π
blank β literally no default password, bestie. π
π PROTOCOLS π
Most β not all, but most. that's the vibe. β¨
π EXAMPLE π
Here's the whole example, verbatim, no cap:
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080");
curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, "mrsmith");
curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, "qwerty");
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
π₯ AVAILABILITY π₯
Added in 7.19.1 β iconic since way back. π
β RETURN VALUE β
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. that's it, that's the tea. π΅
π SEE ALSO π
go read these too, bestie:
π cute sign-off: this page is from libcurl 7.37.0, dated 19 Jun 2014, and it's the GNURLOPT_PROXYPASSWORD(3) page. periodt. π
π¦ 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