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

NAME

6       CURLOPT_PROXYPORT - port number the proxy listens on
7

SYNOPSIS

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

DESCRIPTION

14       Pass a long with this option to set the proxy port to connect to unless
15       it is specified in the proxy string CURLOPT_PROXY(3) or  uses  443  for
16       https proxies and 1080 for all others as default.
17
18       While  this accepts a 'long', the port number is 16 bit so it cannot be
19       larger than 65535.
20

DEFAULT

22       0, not specified which makes it use the default port
23

PROTOCOLS

25       All
26

EXAMPLE

28       CURL *curl = curl_easy_init();
29       if(curl) {
30         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
31         curl_easy_setopt(curl, CURLOPT_PROXY, "localhost");
32         curl_easy_setopt(curl, CURLOPT_PROXYPORT, 8080L);
33         ret = curl_easy_perform(curl);
34         curl_easy_cleanup(curl);
35       }
36

AVAILABILITY

38       Always
39

RETURN VALUE

41       Returns CURLE_OK
42

SEE ALSO

44       CURLOPT_PROXY(3), CURLOPT_PROXYTYPE(3),
45
46
47
48libcurl 7.82.0                 November 26, 2021          CURLOPT_PROXYPORT(3)
Impressum