]> git.ipfire.org Git - thirdparty/squid.git/commit
Splice to origin cache_peer.
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Fri, 3 Jul 2015 14:07:05 +0000 (17:07 +0300)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Fri, 3 Jul 2015 14:07:05 +0000 (17:07 +0300)
commitd9a7bc7137e01aa10ff7ae3f4dd24d1c8cbbe69b
tree24caae2f841cd2d402e425be5e958ec078362fba
parentab248038fe0cdd598ebd619dbd414e4067f55080
Splice to origin cache_peer.

Currently, Squid cannot redirect intercepted connections that are subject to
SslBump rules to _originserver_ cache_peer. For example, consider Squid that
enforces "safe search" by redirecting clients to forcesafesearch.example.com.
Consider a TLS client that tries to connect to www.example.com. Squid needs to
send that client to forcesafesearch.example.com (without changing the host
header and SNI information; those would still point to www.example.com for
safe search to work as intended!).

The admin may configure Squid to send intercepted clients to an originserver
cache_peer with the forcesafesearch.example.com address. Such a configuration
does not currently work together with ssl_bump peek/splice rules.

This patch:

* Fixes src/neighbors.cc bug which prevented CONNECT requests from going
  to originserver cache peers. This bug affects both true CONNECT requests
  and intercepted SSL/TLS connections (with fake CONNECT requests). Squid
  use the CachePeer::in_addr.port which is not meant to be used for the HTTP
  port, apparently. HTTP checks should use CachePeer::http_port instead.

* Changes Squid to not initiate SSL/TLS connection to cache_peer for
  true CONNECT requests.

* Allows forwarding being-peeked (or stared) at connections to originserver
  cache_peers.

The bug fix described in the first bullet makes the last two changes
necessary.

This is a Measurement Factory project.
src/FwdState.cc
src/neighbors.cc