#include "squid.h"
#include "AccessLogEntry.h"
#include "acl/Address.h"
#include "acl/FilledChecklist.h"
#include "acl/Gadgets.h"
#include "anyp/PortCfg.h"
#include "base/AsyncCallbacks.h"
#include "base/AsyncCbdataCalls.h"
#include "CacheManager.h"
#include "CachePeer.h"
#include "client_side.h"
#include "clients/forward.h"
#include "clients/HttpTunneler.h"
#include "clients/WhoisGateway.h"
#include "comm/Connection.h"
#include "comm/ConnOpener.h"
#include "comm/Loops.h"
#include "CommCalls.h"
#include "errorpage.h"
#include "event.h"
#include "fd.h"
#include "fde.h"
#include "FwdState.h"
#include "globals.h"
#include "HappyConnOpener.h"
#include "hier_code.h"
#include "http.h"
#include "http/Stream.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "icmp/net_db.h"
#include "internal.h"
#include "ip/Intercept.h"
#include "ip/NfMarkConfig.h"
#include "ip/QosConfig.h"
#include "ip/tools.h"
#include "MemObject.h"
#include "mgr/Registration.h"
#include "neighbors.h"
#include "pconn.h"
#include "PeerPoolMgr.h"
#include "ResolvedPeers.h"
#include "security/BlindPeerConnector.h"
#include "SquidConfig.h"
#include "ssl/PeekingPeerConnector.h"
#include "Store.h"
#include "StoreClient.h"
#include "urn.h"
#include "ssl/cert_validate_message.h"
#include "ssl/Config.h"
#include "ssl/helper.h"
#include "ssl/ServerBump.h"
#include "ssl/support.h"
#include <cerrno>
Go to the source code of this file.
Macros | |
#define | MAX_FWD_STATS_IDX 9 |
Functions | |
static time_t | diffOrZero (const time_t larger, const time_t smaller) |
static void | fwdServerClosedWrapper (const CommCloseCbParams ¶ms) |
static void | fwdStats (StoreEntry *s) |
tos_t | aclMapTOS (acl_tos *head, ACLChecklist *ch) |
Checks for a TOS value to apply depending on the ACL. More... | |
Ip::NfMarkConfig | aclFindNfMarkConfig (acl_nfmark *head, ACLChecklist *ch) |
Checks for a netfilter mark value to apply depending on the ACL. More... | |
void | getOutgoingAddress (HttpRequest *request, const Comm::ConnectionPointer &conn) |
static tos_t | GetTosToServer (HttpRequest *request, Comm::Connection &conn) |
static nfmark_t | GetNfmarkToServer (HttpRequest *request, Comm::Connection &conn) |
void | GetMarkingsToServer (HttpRequest *request, Comm::Connection &conn) |
void | ResetMarkingsToServer (HttpRequest *request, Comm::Connection &conn) |
Variables | |
static CLCB | fwdServerClosedWrapper |
static OBJH | fwdStats |
static int | FwdReplyCodes [MAX_FWD_STATS_IDX+1][Http::scInvalidHeader+1] |
PconnPool * | fwdPconnPool = new PconnPool("server-peers", nullptr) |
a collection of previously used persistent Squid-to-peer HTTP(S) connections More... | |
Macro Definition Documentation
◆ MAX_FWD_STATS_IDX
#define MAX_FWD_STATS_IDX 9 |
Definition at line 75 of file FwdState.cc.
Function Documentation
◆ aclFindNfMarkConfig()
Ip::NfMarkConfig aclFindNfMarkConfig | ( | acl_nfmark * | head, |
ACLChecklist * | ch | ||
) |
Definition at line 1470 of file FwdState.cc.
References Acl::Answer::allowed(), ACLChecklist::fastCheck(), head, and squidaio_request_t::next.
Referenced by ClientHttpRequest::doCallouts(), and GetNfmarkToServer().
◆ aclMapTOS()
tos_t aclMapTOS | ( | acl_tos * | head, |
ACLChecklist * | ch | ||
) |
Definition at line 1458 of file FwdState.cc.
References Acl::Answer::allowed(), ACLChecklist::fastCheck(), head, and squidaio_request_t::next.
Referenced by ClientHttpRequest::doCallouts(), and GetTosToServer().
◆ diffOrZero()
|
inlinestatic |
subtracts time_t values, returning zero if smaller exceeds the larger value time_t might be unsigned so we need to be careful when subtracting times...
Definition at line 416 of file FwdState.cc.
Referenced by FwdState::ForwardTimeout().
◆ fwdServerClosedWrapper()
|
static |
Definition at line 675 of file FwdState.cc.
References CommCommonCbParams::data, and FwdState::serverClosed().
◆ fwdStats()
|
static |
Definition at line 1355 of file FwdState.cc.
References FwdReplyCodes, int, MAX_FWD_STATS_IDX, Http::scInvalidHeader, and storeAppendPrintf().
◆ GetMarkingsToServer()
void GetMarkingsToServer | ( | HttpRequest * | request, |
Comm::Connection & | conn | ||
) |
Sets initial TOS value and Netfilter for the future outgoing connection. Updates the given Connection object, not the future transport connection.
Definition at line 1560 of file FwdState.cc.
References debugs, GetNfmarkToServer(), GetTosToServer(), Comm::Connection::local, Comm::Connection::nfmark, and Comm::Connection::tos.
Referenced by HappyConnOpener::openFreshConnection(), PeerPoolMgr::openNewConnection(), and ResetMarkingsToServer().
◆ GetNfmarkToServer()
|
static |
- Returns
- the Netfilter mark that should be set on the to-peer connection
Definition at line 1547 of file FwdState.cc.
References aclFindNfMarkConfig(), ACLFilledChecklist::dst_addr, ACLFilledChecklist::dst_peer_name, Comm::Connection::getPeer(), CachePeer::name, Comm::Connection::remote, and Ip::Qos::TheConfig.
Referenced by GetMarkingsToServer().
◆ getOutgoingAddress()
void getOutgoingAddress | ( | HttpRequest * | request, |
const Comm::ConnectionPointer & | conn | ||
) |
Definition at line 1481 of file FwdState.cc.
References SquidConfig::accessList, Acl::Answer::allowed(), HttpRequest::client_addr, COMM_DOBIND, COMM_TRANSPARENT, Config, ACLFilledChecklist::dst_addr, ACLFilledChecklist::dst_peer_name, ACLChecklist::fastCheck(), HttpRequest::flags, Comm::Connection::flags, Comm::Connection::getPeer(), HttpRequest::indirect_client_addr, Ip::Address::isAnyAddr(), Ip::Address::isIPv4(), Comm::Connection::local, CachePeer::name, Acl::Address::next, CachePeer::no_tproxy, SquidConfig::onoff, CachePeer::options, SquidConfig::outgoing_address, Ip::Address::port(), Comm::Connection::remote, Ip::Address::setIPv4(), RequestFlags::spoofClientIp, and SquidConfig::tproxy_uses_indirect_client.
Referenced by Adaptation::Icap::Xaction::dnsLookupDone(), PeerSelector::handlePath(), PeerPoolMgr::openNewConnection(), and peerProbeConnect().
◆ GetTosToServer()
|
static |
- Returns
- the TOS value that should be set on the to-peer connection
Definition at line 1534 of file FwdState.cc.
References aclMapTOS(), ACLFilledChecklist::dst_addr, ACLFilledChecklist::dst_peer_name, Comm::Connection::getPeer(), CachePeer::name, Comm::Connection::remote, and Ip::Qos::TheConfig.
Referenced by GetMarkingsToServer().
◆ ResetMarkingsToServer()
void ResetMarkingsToServer | ( | HttpRequest * | , |
Comm::Connection & | |||
) |
Recomputes and applies TOS value and Netfilter to the outgoing connection. Updates both the given Connection object and the transport connection.
Definition at line 1569 of file FwdState.cc.
References GetMarkingsToServer(), Comm::Connection::nfmark, Ip::Qos::setSockNfmark(), Ip::Qos::setSockTos(), and Comm::Connection::tos.
Referenced by TunnelStateData::connectDone(), and FwdState::syncWithServerConn().
Variable Documentation
◆ fwdPconnPool
Definition at line 78 of file FwdState.cc.
Referenced by FwdState::closePendingConnection(), FwdState::closeServerConnection(), Http::Tunneler::countFailingConnection(), Security::PeerConnector::countFailingConnection(), HttpStateData::processReplyBody(), HappyConnOpener::reuseOldConnection(), and FwdState::serverClosed().
◆ FwdReplyCodes
|
static |
Definition at line 76 of file FwdState.cc.
Referenced by fwdStats(), and FwdState::logReplyStatus().
◆ fwdServerClosedWrapper
|
static |
Definition at line 71 of file FwdState.cc.
Referenced by FwdState::syncWithServerConn().
◆ fwdStats
|
static |
Definition at line 73 of file FwdState.cc.
Referenced by FwdState::RegisterWithCacheManager().
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products