curl/src
Alex Rousskov cb4e2be7c6 proxy: Support HTTPS proxy and SOCKS+HTTP(s)
* HTTPS proxies:

An HTTPS proxy receives all transactions over an SSL/TLS connection.
Once a secure connection with the proxy is established, the user agent
uses the proxy as usual, including sending CONNECT requests to instruct
the proxy to establish a [usually secure] TCP tunnel with an origin
server. HTTPS proxies protect nearly all aspects of user-proxy
communications as opposed to HTTP proxies that receive all requests
(including CONNECT requests) in vulnerable clear text.

With HTTPS proxies, it is possible to have two concurrent _nested_
SSL/TLS sessions: the "outer" one between the user agent and the proxy
and the "inner" one between the user agent and the origin server
(through the proxy). This change adds supports for such nested sessions
as well.

A secure connection with a proxy requires its own set of the usual SSL
options (their actual descriptions differ and need polishing, see TODO):

  --proxy-cacert FILE        CA certificate to verify peer against
  --proxy-capath DIR         CA directory to verify peer against
  --proxy-cert CERT[:PASSWD] Client certificate file and password
  --proxy-cert-type TYPE     Certificate file type (DER/PEM/ENG)
  --proxy-ciphers LIST       SSL ciphers to use
  --proxy-crlfile FILE       Get a CRL list in PEM format from the file
  --proxy-insecure           Allow connections to proxies with bad certs
  --proxy-key KEY            Private key file name
  --proxy-key-type TYPE      Private key file type (DER/PEM/ENG)
  --proxy-pass PASS          Pass phrase for the private key
  --proxy-ssl-allow-beast    Allow security flaw to improve interop
  --proxy-sslv2              Use SSLv2
  --proxy-sslv3              Use SSLv3
  --proxy-tlsv1              Use TLSv1
  --proxy-tlsuser USER       TLS username
  --proxy-tlspassword STRING TLS password
  --proxy-tlsauthtype STRING TLS authentication type (default SRP)

All --proxy-foo options are independent from their --foo counterparts,
except --proxy-crlfile which defaults to --crlfile and --proxy-capath
which defaults to --capath.

Curl now also supports %{proxy_ssl_verify_result} --write-out variable,
similar to the existing %{ssl_verify_result} variable.

Supported backends: OpenSSL, GnuTLS, and NSS.

* A SOCKS proxy + HTTP/HTTPS proxy combination:

If both --socks* and --proxy options are given, Curl first connects to
the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS
proxy.

TODO: Update documentation for the new APIs and --proxy-* options.
Look for "Added in 7.XXX" marks.
2016-11-24 23:41:44 +01:00
..
macos s/cURL/curl 2016-11-07 10:36:23 +01:00
.gitignore gitignore: ignore more generated VC Makefiles 2015-09-03 23:35:41 +02:00
CMakeLists.txt s/cURL/curl 2016-11-07 10:36:23 +01:00
Makefile.Watcom s/cURL/curl 2016-11-07 10:36:23 +01:00
Makefile.am src/checksrc.whitelist: removed 2016-04-19 08:56:06 +02:00
Makefile.b32 URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
Makefile.inc strcase: make the tool use curl_str[n]equal instead 2016-10-31 21:51:19 +01:00
Makefile.m32 makefile.m32: add crypt32 for winssl builds 2016-06-01 10:39:13 +02:00
Makefile.netware s/cURL/curl 2016-11-07 10:36:23 +01:00
Makefile.vc6 msvc builds: s/rawstr/strcase 2016-10-31 13:35:26 +01:00
curl.rc s/cURL/curl 2016-10-18 13:59:54 +02:00
makefile.amiga s/cURL/curl 2016-11-07 10:36:23 +01:00
makefile.dj s/cURL/curl 2016-11-07 10:36:23 +01:00
mkhelp.pl URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
slist_wc.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
slist_wc.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_binmode.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_binmode.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_bname.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_bname.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_dbg.c strcasecompare: is the new name for strequal() 2016-10-31 08:46:35 +01:00
tool_cb_dbg.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_hdr.c strcasecompare: all case insensitive string compares ignore locale now 2016-10-31 08:46:35 +01:00
tool_cb_hdr.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_prg.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_prg.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_rea.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_rea.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_see.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_see.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_wrt.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_wrt.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cfgable.c proxy: Support HTTPS proxy and SOCKS+HTTP(s) 2016-11-24 23:41:44 +01:00
tool_cfgable.h proxy: Support HTTPS proxy and SOCKS+HTTP(s) 2016-11-24 23:41:44 +01:00
tool_convert.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_convert.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_dirhie.c curl: make --create-dirs on windows grok both forward and backward slashes 2016-09-14 07:48:43 +02:00
tool_dirhie.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_doswin.c tool_doswin: Support for literal path prefix \\?\ 2016-02-09 03:28:58 -05:00
tool_doswin.h tool_doswin: Improve sanitization processing 2016-02-05 01:44:27 -05:00
tool_easysrc.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_easysrc.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_formparse.c strcasecompare: all case insensitive string compares ignore locale now 2016-10-31 08:46:35 +01:00
tool_formparse.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_getparam.c proxy: Support HTTPS proxy and SOCKS+HTTP(s) 2016-11-24 23:41:44 +01:00
tool_getparam.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_getpass.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_getpass.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_help.c proxy: Support HTTPS proxy and SOCKS+HTTP(s) 2016-11-24 23:41:44 +01:00
tool_help.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_helpers.c strcase: make the tool use curl_str[n]equal instead 2016-10-31 21:51:19 +01:00
tool_helpers.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_homedir.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_homedir.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_hugehelp.c.cvs URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_hugehelp.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_libinfo.c strcase: make the tool use curl_str[n]equal instead 2016-10-31 21:51:19 +01:00
tool_libinfo.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_main.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_main.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_metalink.c metalink: simplify the hex parsing function 2016-11-02 00:31:49 +01:00
tool_metalink.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_mfiles.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_mfiles.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_msgs.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_msgs.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_operate.c proxy: Support HTTPS proxy and SOCKS+HTTP(s) 2016-11-24 23:41:44 +01:00
tool_operate.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_operhlp.c strcasecompare: all case insensitive string compares ignore locale now 2016-10-31 08:46:35 +01:00
tool_operhlp.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_panykey.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_panykey.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_paramhlp.c strcase: make the tool use curl_str[n]equal instead 2016-10-31 21:51:19 +01:00
tool_paramhlp.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_parsecfg.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_parsecfg.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_sdecls.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_setopt.c proxy: Support HTTPS proxy and SOCKS+HTTP(s) 2016-11-24 23:41:44 +01:00
tool_setopt.h proxy: Support HTTPS proxy and SOCKS+HTTP(s) 2016-11-24 23:41:44 +01:00
tool_setup.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_sleep.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_sleep.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_strdup.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_strdup.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_urlglob.c glob: fix [a-c] globbing regression 2016-11-15 08:22:54 +01:00
tool_urlglob.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_util.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_util.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_version.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_vms.c code: style updates 2016-04-03 22:38:36 +02:00
tool_vms.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_writeenv.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_writeenv.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_writeout.c proxy: Support HTTPS proxy and SOCKS+HTTP(s) 2016-11-24 23:41:44 +01:00
tool_writeout.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_xattr.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_xattr.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00