diff options
author | Elliott Hughes <enh@google.com> | 2017-09-20 17:00:17 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2017-09-21 09:38:15 -0700 |
commit | 82be86df6ec7baa34d6169c053fd1dfe56fa858e (patch) | |
tree | afd04b931f1f59dfe81b0daa450306ff0204319b /docs/libcurl/opts/CURLOPT_PROXY.3 | |
parent | bfa505f61d33429f40bf843b7871fc793dd017d4 (diff) | |
download | external_curl-82be86df6ec7baa34d6169c053fd1dfe56fa858e.tar.gz external_curl-82be86df6ec7baa34d6169c053fd1dfe56fa858e.tar.bz2 external_curl-82be86df6ec7baa34d6169c053fd1dfe56fa858e.zip |
Update libcurl from 7.54.1 to 7.55.1.
Bug: http://b/64610131
Test: builds, boots, `vendor/google/tools/fake-ota on streaming` works
Change-Id: I7ecaf9c83e9496ac4a379507791bec637deaa4cb
Diffstat (limited to 'docs/libcurl/opts/CURLOPT_PROXY.3')
-rw-r--r-- | docs/libcurl/opts/CURLOPT_PROXY.3 | 53 |
1 files changed, 42 insertions, 11 deletions
diff --git a/docs/libcurl/opts/CURLOPT_PROXY.3 b/docs/libcurl/opts/CURLOPT_PROXY.3 index 64b74fae..a26355c6 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY.3 +++ b/docs/libcurl/opts/CURLOPT_PROXY.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -20,7 +20,8 @@ .\" * .\" ************************************************************************** .\" -.TH CURLOPT_PROXY 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" +.TH CURLOPT_PROXY 3 "May 31, 2017" "libcurl 7.55.1" "curl_easy_setopt options" + .SH NAME CURLOPT_PROXY \- set proxy to use .SH SYNOPSIS @@ -38,10 +39,22 @@ option \fICURLOPT_PROXYPORT(3)\fP. If not specified, libcurl will default to using port 1080 for proxies. The proxy string may be prefixed with [scheme]:// to specify which kind of -proxy is used. Use socks4://, socks4a://, socks5:// or socks5h:// (the last -one to enable socks5 and asking the proxy to do the resolving, also known as -\fICURLPROXY_SOCKS5_HOSTNAME\fP type) to request the specific SOCKS version to -be used. No scheme specified or http://, will be treated as HTTP proxies. +proxy is used. + +.RS +.IP http:// +HTTP Proxy. Default when no scheme or proxy type is specified. +.IP https:// +HTTPS Proxy. (Added in 7.52.0 for OpenSSL, GnuTLS and NSS) +.IP socks4:// +SOCKS4 Proxy. +.IP socks4a:// +SOCKS4a Proxy. Proxy resolves URL hostname. +.IP socks5:// +SOCKS5 Proxy. +.IP socks5h:// +SOCKS5 Proxy. Proxy resolves URL hostname. +.RE Without a scheme prefix, \fICURLOPT_PROXYTYPE(3)\fP can be used to specify which kind of proxy the string identifies. @@ -53,15 +66,26 @@ an impact on what other features of the library you can use, such as tunnel through the HTTP proxy. Such tunneling is activated with \fICURLOPT_HTTPPROXYTUNNEL(3)\fP. -libcurl respects the environment variables \fBhttp_proxy\fP, \fBftp_proxy\fP, -\fBall_proxy\fP etc, if any of those are set. The \fICURLOPT_PROXY(3)\fP -option does however override any possibly set environment variables. - Setting the proxy string to "" (an empty string) will explicitly disable the use of a proxy, even if there is an environment variable set for it. A proxy host string can also include protocol scheme (http://) and embedded user + password. + +The application does not have to keep the string around after setting this +option. +.SH "Environment variables" +libcurl respects the proxy environment variables named \fBhttp_proxy\fP, +\fBftp_proxy\fP, \fBsftp_proxy\fP etc. If set, libcurl will use the specified +proxy for that URL scheme. So for a "FTP://" URL, the \fBftp_proxy\fP is +considered. \fBall_proxy\fP is used if no protocol specific proxy was set. + +If \fBno_proxy\fP (or \fBNO_PROXY\fP) is set, it can specify a list of host +names to not use a proxy for (even if one of the previous mention variables +are set). That is the exact equivalent of setting the \fICURLOPT_NOPROXY(3)\fP +option. + +The \fICURLOPT_PROXY(3)\fP option overrides environment variables. .SH DEFAULT Default is NULL, meaning no proxy is used. @@ -70,7 +94,14 @@ single port number used widely for proxies. Specify it! .SH PROTOCOLS All except file://. Note that some protocols don't do very well over proxy. .SH EXAMPLE -TODO +.nf +CURL *curl = curl_easy_init(); +if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/file.txt"); + curl_easy_setopt(curl, CURLOPT_PROXY, "http://proxy:80"); + curl_easy_perform(curl); +} +.fi .SH AVAILABILITY Since 7.14.1 the proxy environment variable names can include the protocol scheme. |