]> git.ipfire.org Git - thirdparty/squid.git/commit
Enable flexible transport protocol in Server hierarchy
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 21 Oct 2014 11:10:13 +0000 (04:10 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 21 Oct 2014 11:10:13 +0000 (04:10 -0700)
commit4599cdedc0b8f82192bfb47488f9659bc2a3629a
tree2b6dd824e5e2ab69f0b2be68ba38f6921cc636bd
parentc16af8fdc5b8d5c10269057c120e802eded355ef
Enable flexible transport protocol in Server hierarchy

We are quickly approaching a time when a client connection can freely
migrate between protocols or versions of protocols. Already we have
ssl-bump which can switch a connection from HTTP to HTTPS. We are also
expecting switching HTTP<->HTTPS via Upgrade, and HTTP/1<->HTTP/2 via
"magic", Upgrade, or ALPN.

Based on ssl-bump experience with switchedToHttps() and the pain that
can be predicted when there are several permutations of such accessors
to test against make the Server class aware of what transfer protocol
is in use at whatever the 'top' layer of the protocol stack is.

* Add a transportVersion member to ConnStateData which holds the current
  protocol to be used over the clientConnection socket. This variable can
  be altered whenever necessary to cause an on-wire protocol change. New
  connections default to the protocol signalled in the http(s)_port directive.

* ssl-bump transforms the transportVersion from whatever it was
  previously (usually HTTP or HTTPS) to HTTPS, and back to HTTP is splice
  action is performed.

* transparent and reverse-proxy URL reconstruction is updated to use the
  new member instead of the http(s)_port protocol= setting. This removes
  edge conditions where the URL reconstructor needs to figure out ssl-bump
  existence.
src/client_side.cc
src/client_side.h