CURLOPT_PROXY) to match it:
socks4- means SOCKS4 with local name resolving
socks4a- means SOCKS4 with proxy's name resolving
socks5- means SOCKS5 with local name resolving
socks5h- means SOCKS5 with proxy's name resolving
http- means HTTP, which always lets the proxy resolve names
https- means HTTPS to the proxy, which always lets the proxy resolve names (Note that HTTPS proxy support was added recently, in curl 7.52.0, and it still only works with a subset of the TLS libraries: OpenSSL, GnuTLS and NSS.)
CURLOPT_PROXYTYPE. Similarly, you can set the proxy port number to use with
[scheme]_proxyto hold the proxy host name (the same way you would specify the host with
-x). So if you want to tell curl to use a proxy when accessing a HTTP server, you set the 'http_proxy' environment variable. Like this:
https_proxy, and so on for the specific protocols you want to proxy. All these proxy environment variable names except http_proxy can also be specified in uppercase, like
ALL_PROXYexists. If a specific protocol variable one exists, such a one will take precedence.
NO_PROXYvariable - or the corresponding
CURLOPT_NOPROXYlibcurl option. Set that to a comma- separated list of host names that should not use a proxy when being accessed. You can set NO_PROXY to be a single asterisk ('*') to match all hosts.
CONNECTrequest to the proxy. Such a request opens a tunnel through the proxy, where it passes data through without understanding it. This way, libcurl can establish a secure end-to-end TLS connection even when a HTTP proxy is present.
CURLOPT_PROXY_CAINFOis the same functionality for the HTTPS proxy as
CURLOPT_CAINFOis for the remote host.
CURLOPT_PROXY_SSL_VERIFYPEERis the proxy version of
CURLOPT_SSL_VERIFYPEERand so on.
CURLOPT_PROXYUSERPWDwhich sets the user name and password to use - unless you set it within the