GNURLOPT_PROXYUSERNAME(3)
β¨ NAME β¨
This is the GNURLOPT_PROXYUSERNAME(3) page, hanging out in the curl_easy_setopt options manual, bestie π
and the actual name of the thing is CURLOPT_PROXYUSERNAME: the user name to use for proxy authentication. Periodt.
π SYNOPSIS π
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYUSERNAME,
char *username);
π¦ DESCRIPTION π¦
Okay so you pass a char * as the parameter, and it should be pointing to the null-terminated user name to use for the transfer. No cap.
CURLOPT_PROXYUSERNAME(3) sets the user name to be used in protocol authentication with the proxy. Itβs giving proxy-auth main character energy π₯
To specify the proxy password, use CURLOPT_PROXYPASSWORD(3). Iykyk.
And the application does not have to keep the string around after setting this option β lowkey convenient, fr fr.
πΈ DEFAULT πΈ
blank
π§ PROTOCOLS π§
Most
π EXAMPLE π
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 β vintage but iconic, honestly.
π 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. Slay.
π SEE ALSO π
Cute lil footer check, bestie: this page is from libcurl 7.37.0, dated 19 Jun 2014, and its manual title is GNURLOPT_PROXYUSERNAME(3). Bye and go proxy-auth responsibly π«Άβ¨
π¦ 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