1CURLOPT_PROXYTYPE(3)       curl_easy_setopt options       CURLOPT_PROXYTYPE(3)
2
3
4

NAME

6       CURLOPT_PROXYTYPE - proxy protocol type
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYTYPE, long type);
12

DESCRIPTION

14       Pass one of the values below to set the type of the proxy.
15
16
17              CURLPROXY_HTTP
18                     HTTP Proxy. Default.
19
20              CURLPROXY_HTTPS
21                     HTTPS  Proxy.  (Added  in  7.52.0 for OpenSSL, GnuTLS and
22                     NSS)
23
24              CURLPROXY_HTTP_1_0
25                     HTTP 1.0 Proxy. This is very  similar  to  CURLPROXY_HTTP
26                     except  it  uses  HTTP/1.0 for any CONNECT tunnelling. It
27                     does not change the  HTTP  version  of  the  actual  HTTP
28                     requests, controlled by CURLOPT_HTTP_VERSION(3).
29
30              CURLPROXY_SOCKS4
31                     SOCKS4 Proxy.
32
33              CURLPROXY_SOCKS4A
34                     SOCKS4a Proxy. Proxy resolves URL hostname.
35
36              CURLPROXY_SOCKS5
37                     SOCKS5 Proxy.
38
39              CURLPROXY_SOCKS5_HOSTNAME
40                     SOCKS5 Proxy. Proxy resolves URL hostname.
41
42       Often  it  is more convenient to specify the proxy type with the scheme
43       part of the CURLOPT_PROXY(3) string.
44

DEFAULT

46       CURLPROXY_HTTP
47

PROTOCOLS

49       Most
50

EXAMPLE

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, "local.example.com:1080");
57         /* set the proxy type */
58         curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
59         ret = curl_easy_perform(curl);
60         curl_easy_cleanup(curl);
61       }
62

AVAILABILITY

64       Always
65

RETURN VALUE

67       Returns CURLE_OK
68

SEE ALSO

70       CURLOPT_PROXY(3), CURLOPT_PROXYPORT(3),
71
72
73
74libcurl 7.61.1                   May 30, 2017             CURLOPT_PROXYTYPE(3)
Impressum