1---
2c: Copyright (C) Daniel Stenberg, <daniel.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)
11---
12
13# NAME
14
15CURLOPT_PROXY_SERVICE_NAME - proxy authentication service name
16
17# SYNOPSIS
18
19~~~c
20#include <curl/curl.h>
21
22CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SERVICE_NAME,
23                          char *name);
24~~~
25
26# DESCRIPTION
27
28Pass a char pointer as parameter to a string holding the *name* of the
29service. The default service name is **"HTTP"** for HTTP based proxies and
30**"rcmd"** for SOCKS5. This option allows you to change it.
31
32The application does not have to keep the string around after setting this
33option.
34
35# DEFAULT
36
37See above
38
39# PROTOCOLS
40
41All network protocols
42
43# EXAMPLE
44
45~~~c
46int main(void)
47{
48  CURL *curl = curl_easy_init();
49  if(curl) {
50    CURLcode ret;
51    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
52    curl_easy_setopt(curl, CURLOPT_PROXY_SERVICE_NAME, "custom");
53    ret = curl_easy_perform(curl);
54  }
55}
56~~~
57
58# AVAILABILITY
59
60Added in 7.43.0 for HTTP proxies, 7.49.0 for SOCKS5 proxies.
61
62# RETURN VALUE
63
64Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
65CURLE_OUT_OF_MEMORY if there was insufficient heap space.
66