1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLOPT_PROXY_SERVICE_NAME
5Section: 3
6Source: libcurl
7See-also:
8  - CURLOPT_PROXY (3)
9  - CURLOPT_PROXYTYPE (3)
10  - CURLOPT_SERVICE_NAME (3)
11Protocol:
12  - All
13Added-in: 7.43.0
14---
15
16# NAME
17
18CURLOPT_PROXY_SERVICE_NAME - proxy authentication service name
19
20# SYNOPSIS
21
22~~~c
23#include <curl/curl.h>
24
25CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SERVICE_NAME,
26                          char *name);
27~~~
28
29# DESCRIPTION
30
31Pass a char pointer as parameter to a string holding the *name* of the
32service. The default service name is **"HTTP"** for HTTP based proxies and
33**"rcmd"** for SOCKS5. This option allows you to change it.
34
35The application does not have to keep the string around after setting this
36option.
37
38Using this option multiple times makes the last set string override the
39previous ones. Set it to NULL to disable its use again.
40
41# DEFAULT
42
43See above
44
45# %PROTOCOLS%
46
47# EXAMPLE
48
49~~~c
50int main(void)
51{
52  CURL *curl = curl_easy_init();
53  if(curl) {
54    CURLcode ret;
55    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
56    curl_easy_setopt(curl, CURLOPT_PROXY_SERVICE_NAME, "custom");
57    ret = curl_easy_perform(curl);
58  }
59}
60~~~
61
62# %AVAILABILITY%
63
64# RETURN VALUE
65
66Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
67CURLE_OUT_OF_MEMORY if there was insufficient heap space.
68