parse_port_option(s, token);
}
+#if USE_SSL
+ if (strcasecmp(protocol, "https") == 0) {
+ /* ssl-bump on https_port configuration requires either tproxy or intercepted, and vice versa */
+ const bool hijacked = s->spoof_client_ip || s->intercepted;
+ if (s->sslBump && !hijacked) {
+ debugs(3, DBG_CRITICAL, "FATAL: ssl-bump on https_port requires tproxy/intercepted which is missing.");
+ self_destruct();
+ }
+ if (hijacked && !s->sslBump) {
+ debugs(3, DBG_CRITICAL, "FATAL: tproxy/intercepted on https_port requires ssl-bump which is missing.");
+ self_destruct();
+ }
+ }
+#endif
+
if (Ip::EnableIpv6&IPV6_SPECIAL_SPLITSTACK && s->s.IsAnyAddr()) {
// clone the port options from *s to *(s->next)
- s->next = s->clone();
+ s->next = cbdataReference(s->clone());
s->next->s.SetIPv4();
debugs(3, 3, protocol << "_port: clone wildcard address for split-stack: " << s->s << " and " << s->next->s);
}
if (serverConnection()->getPeer())
peerConnectSucceded(serverConnection()->getPeer());
+ if (request->flags.canRePin && request->clientConnectionManager.valid()) {
+ debugs(17, 3, HERE << "repinning " << serverConn);
+ request->clientConnectionManager->pinConnection(serverConn,
+ request, serverConn->getPeer(), request->flags.auth);
+ request->flags.pinned = 1;
+ }
+
#if USE_SSL
- if ((serverConnection()->getPeer() && serverConnection()->getPeer()->use_ssl) ||
- (!serverConnection()->getPeer() && request->protocol == AnyP::PROTO_HTTPS) ||
- (request->flags.sslPeek)) {
- initiateSSL();
- return;
+ if (!request->flags.pinned) {
+ if ((serverConnection()->getPeer() && serverConnection()->getPeer()->use_ssl) ||
- (!serverConnection()->getPeer() && request->protocol == AnyP::PROTO_HTTPS)) {
++ (!serverConnection()->getPeer() && request->protocol == AnyP::PROTO_HTTPS) ||
++ request->flags.sslPeek) {
+ initiateSSL();
+ return;
+ }
}
#endif