CURLOPT_PR...RVICE_NAME(3)

CURLOPT_PR...RVICE_NAME(3) Β· Library Functions Manual Β· okay bestie, welcome to the proxy authentication service name page ✨ it's short, it's useful, and it's giving β€œsmall but mighty” πŸ’…

🌸 NAME 🌸

CURLOPT_PROXY_SERVICE_NAME β€” proxy authentication service name. periodt.

✨ SYNOPSIS ✨

first, the include and signature, exactly:

#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SERVICE_NAME,
                          char *name);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the vibe is: you pass a char pointer as parameter to a string holding the name of the service. The default service name is "HTTP" for HTTP based proxies and "rcmd" for SOCKS5. This option is literally the glow-up that lets you change it πŸ’–

ngl, the application does not have to keep the string around after setting this option β€” set it and let it go, bestie 🫢

using this option multiple times makes the last set string override the previous ones. Set it to NULL to disable its use again. no cap.

πŸŽ€ DEFAULT πŸŽ€

See above πŸ‘€

🌈 PROTOCOLS 🌈

This functionality affects all supported protocols. all of them. every single one. slay ✨

πŸ’» EXAMPLE πŸ’»

here's the example, exact and ready to be iconic:

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_SERVICE_NAME, "custom");
    result = curl_easy_perform(curl);
  }
}

⭐ AVAILABILITY ⭐

Added in curl 7.43.0 β€” vintage but still slaying πŸ’…

πŸ’œ RETURN VALUE πŸ’œ

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

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see libcurl-errors(3). lowkey important, fr fr.

πŸ”₯ SEE ALSO πŸ”₯

mwah πŸ’‹ β€” source/version: libcurl; date: 2026-10-12; footer label: CURLOPT_PR...RVICE_NAME(3). that's the whole page, ily, bye πŸŽ€

πŸ“¦ where this page comes from