From 9c85ee8b61c24587a228b3644c37b1b4fdfb7dcb Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Wed, 12 Sep 2012 17:36:19 +0200 Subject: inets httpc: TLS via proxy Introduces new option htts_proxy so that it is possible to have different proxies for http and https. The new option defaults to the old proxy option. Implements HTTP-1.1 extension method CONNECT to establish SSL/TLS tunnel We choose not to implement "TLS upgrade" as defined by RFC 2817 as this method of upgrade is vulnerable to man in the middle attacks, can be easily broken by proxies and does not seem to be widely adopted. --- lib/inets/doc/src/httpc.xml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'lib/inets/doc') diff --git a/lib/inets/doc/src/httpc.xml b/lib/inets/doc/src/httpc.xml index 14ce3cbe7f..fd63dc6dea 100644 --- a/lib/inets/doc/src/httpc.xml +++ b/lib/inets/doc/src/httpc.xml @@ -449,7 +449,8 @@ apply(Module, Function, [ReplyInfo | Args]) Options = [Option] Option = {proxy, {Proxy, NoProxy}} | - {max_sessions, MaxSessions} | + {https_proxy, {Proxy, NoProxy}} | + {max_sessions, MaxSessions} | {max_keep_alive_length, MaxKeepAlive} | {keep_alive_timeout, KeepAliveTimeout} | {max_pipeline_length, MaxPipeline} | @@ -460,25 +461,23 @@ apply(Module, Function, [ReplyInfo | Args]) {port, Port} | {socket_opts, socket_opts()} | {verbose, VerboseMode} + Proxy = {Hostname, Port} Hostname = string() ex: "localhost" or "foo.bar.se" Port = integer() ex: 8080 - socket_opts() = [socket_opt()] - The options are appended to the socket options used by the - client. - These are the default values when a new request handler - is started (for the initial connect). They are passed directly - to the underlying transport (gen_tcp or ssl) without - verification! NoProxy = [NoProxyDesc] NoProxyDesc = DomainDesc | HostName | IPDesc DomainDesc = "*.Domain" ex: "*.ericsson.se" IpDesc = string() ex: "134.138" or "[FEDC:BA98" (all IP-addresses starting with 134.138 or FEDC:BA98), "66.35.250.150" or "[2010:836B:4179::836B:4179]" (a complete IP-address). - MaxSessions = integer() + + proxy defaults to {undefined, []} e.i. no proxy is configured and https_proxy defaults to + the value of proxy. + + MaxSessions = integer() Default is 2. Maximum number of persistent connections to a host. MaxKeepAlive = integer() @@ -520,6 +519,13 @@ apply(Module, Function, [ReplyInfo | Args]) Port = integer() Specify which local port number to use. See gen_tcp:connect/3,4 for more info. + socket_opts() = [socket_opt()] + The options are appended to the socket options used by the + client. + These are the default values when a new request handler + is started (for the initial connect). They are passed directly + to the underlying transport (gen_tcp or ssl) without + verification! VerboseMode = false | verbose | debug | trace Default is false. This option is used to switch on (or off) @@ -554,7 +560,8 @@ apply(Module, Function, [ReplyInfo | Args]) Gets the currently used options. OptionItems = all | [option_item()] - option_item() = proxy | + option_item() = proxy | + https_proxy max_sessions | keep_alive_timeout | max_keep_alive_length | -- cgit v1.2.3