client_side.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 /* DEBUG: section 33 Client-side Routines */
10 
11 #ifndef SQUID_CLIENTSIDE_H
12 #define SQUID_CLIENTSIDE_H
13 
14 #include "acl/ChecklistFiller.h"
15 #include "base/RunnersRegistry.h"
16 #include "clientStreamForward.h"
17 #include "comm.h"
18 #include "error/Error.h"
19 #include "helper/forward.h"
20 #include "http/forward.h"
21 #include "HttpControlMsg.h"
22 #include "ipc/FdNotes.h"
23 #include "log/forward.h"
24 #include "proxyp/forward.h"
25 #include "sbuf/SBuf.h"
26 #include "servers/Server.h"
27 #if USE_AUTH
28 #include "auth/UserRequest.h"
29 #endif
30 #include "security/KeyLogger.h"
31 #if USE_OPENSSL
32 #include "security/forward.h"
33 #include "security/Handshake.h"
34 #include "ssl/support.h"
35 #endif
36 #if USE_DELAY_POOLS
37 #include "MessageBucket.h"
38 #endif
39 
40 #include <iosfwd>
41 
42 class ClientHttpRequest;
43 class HttpHdrRangeSpec;
44 
45 class MasterXaction;
47 
48 #if USE_OPENSSL
49 namespace Ssl
50 {
51 class ServerBump;
52 }
53 #endif
54 
80  public Server,
81  public HttpControlMsgSink,
82  public Acl::ChecklistFiller,
83  private IndependentRunner
84 {
85 
86 public:
87  explicit ConnStateData(const MasterXactionPointer &xact);
88  virtual ~ConnStateData();
89 
90  /* ::Server API */
91  virtual void receivedFirstByte();
92  virtual bool handleReadData();
93  virtual void afterClientRead();
94  virtual void afterClientWrite(size_t);
95 
96  /* HttpControlMsgSink API */
97  virtual void sendControlMsg(HttpControlMsg);
98  virtual void doneWithControlMsg();
99 
101  bool clientParseRequests();
102  void readNextRequest();
103 
105  void kick();
106 
107  bool isOpen() const;
108 
110 
117  int64_t mayNeedToReadMoreBody() const;
118 
119 #if USE_AUTH
120 
124  const Auth::UserRequest::Pointer &getAuth() const { return auth_; }
125 
134  void setAuth(const Auth::UserRequest::Pointer &aur, const char *cause);
135 #endif
136 
138 
139  struct {
140  bool readMore = true;
141  bool swanSang = false; // XXX: temporary flag to check proper cleanup
142  } flags;
143  struct {
144  Comm::ConnectionPointer serverConnection; /* pinned server side connection */
145  char *host = nullptr;
146  int port = -1;
147  bool pinned = false;
148  bool auth = false;
149  bool reading = false;
150  bool zeroReply = false;
151  bool peerAccessDenied = false;
152  CachePeer *peer = nullptr;
156 
157  bool transparent() const;
158 
160  const char *stoppedReceiving() const { return stoppedReceiving_; }
162  const char *stoppedSending() const { return stoppedSending_; }
164  void stopReceiving(const char *error);
166  void stopSending(const char *error);
167 
169  void resetReadTimeout(time_t timeout);
171  void extendLifetime();
172 
173  void expectNoForwarding();
174 
175  /* BodyPipe API */
178  virtual void noteBodyConsumerAborted(BodyPipe::Pointer) = 0;
179 
180  bool handleRequestBodyData();
181 
184  {
185  public:
187 
190  };
191 
196  void pinBusyConnection(const Comm::ConnectionPointer &pinServerConn, const HttpRequest::Pointer &request);
198  void unpinConnection(const bool andClose);
199 
204  CachePeer *pinnedPeer() const {return pinning.peer;}
205  bool pinnedAuth() const {return pinning.auth;}
206 
209 
210  // pining related comm callbacks
211  virtual void clientPinnedConnectionClosed(const CommCloseCbParams &io);
212 
215  public:
217 
220 
222 
223  private:
224  friend std::ostream &operator <<(std::ostream &, const ServerConnectionContext &);
226  };
227 
231 
232  // comm callbacks
234  void connStateClosed(const CommCloseCbParams &io);
235  void requestTimeout(const CommTimeoutCbParams &params);
236  void lifetimeTimeout(const CommTimeoutCbParams &params);
237 
238  // AsyncJob API
239  virtual void start();
240  virtual bool doneAll() const { return BodyProducer::doneAll() && false;}
241  virtual void swanSong();
242  virtual void callException(const std::exception &);
243 
246  void quitAfterError(HttpRequest *request); // meant to be private
247 
250 
254 
256  void postHttpsAccept();
257 
258 #if USE_OPENSSL
259  void startPeekAndSplice();
261 
265  void doPeekAndSpliceStep();
267  void httpsPeeked(PinnedIdleContext pic);
268 
270  bool splice();
271 
273  void getSslContextStart();
274 
277 
279  static void sslCrtdHandleReplyWrapper(void *data, const Helper::Reply &reply);
281  void sslCrtdHandleReply(const Helper::Reply &reply);
282 
283  void switchToHttps(ClientHttpRequest *, Ssl::BumpMode bumpServerMode);
284  void parseTlsHandshake();
285  bool switchedToHttps() const { return switchedToHttps_; }
287  inline void setServerBump(Ssl::ServerBump *srvBump) {
288  if (!sslServerBump)
289  sslServerBump = srvBump;
290  else
291  assert(sslServerBump == srvBump);
292  }
293  const SBuf &sslCommonName() const {return sslCommonName_;}
294  void resetSslCommonName(const char *name) {sslCommonName_ = name;}
295  const SBuf &tlsClientSni() const { return tlsClientSni_; }
304 
306 
310 #else
311  bool switchedToHttps() const { return false; }
312 #endif
314 
316  void add(const Http::StreamPointer &context);
317 
319  virtual bool writeControlMsgAndCall(HttpReply *rep, AsyncCall::Pointer &call) = 0;
320 
323  virtual void handleReply(HttpReply *header, StoreIOBuffer receivedData) = 0;
324 
326  void consumeInput(const size_t byteCount);
327 
328  /* TODO: Make the methods below (at least) non-public when possible. */
329 
331  Http::Stream *abortRequestParsing(const char *const errUri);
332 
335  bool fakeAConnectRequest(const char *reason, const SBuf &payload);
336 
338  bool initiateTunneledRequest(HttpRequest::Pointer const &cause, Http::MethodType const method, const char *reason, const SBuf &payload);
339 
342  bool shouldPreserveClientData() const;
343 
345  ClientHttpRequest *buildFakeRequest(Http::MethodType const method, SBuf &useHost, unsigned short usePort, const SBuf &payload);
346 
351 
352  /* Registered Runner API */
353  virtual void startShutdown();
354  virtual void endingShutdown();
355 
359  bool hasNotes() const { return bool(theNotes) && !theNotes->empty(); }
360 
362 
364  void updateError(const Error &);
365 
367  void updateError(const err_type c, const ErrorDetailPointer &d) { updateError(Error(c, d)); }
368 
369  /* Acl::ChecklistFiller API */
370  virtual void fillChecklist(ACLFilledChecklist &) const;
371 
378 
379  // Exposed to be accessible inside the ClientHttpRequest constructor.
380  // TODO: Remove. Make sure there is always a suitable ALE instead.
383 
386 
387 protected:
388  void startDechunkingRequest();
389  void finishDechunkingRequest(bool withSuccess);
392 
395 
398 #if USE_OPENSSL
403 #endif
404 
413 
418 
421 
423  virtual int pipelinePrefetchMax() const;
424 
426  virtual time_t idleTimeout() const = 0;
427 
430  void whenClientIpKnown();
431 
433 
435  bool preservingClientData_ = false;
436 
437  bool tunnelOnError(const HttpRequestMethod &, const err_type);
438 
439 private:
440  /* ::Server API */
441  virtual void terminateAll(const Error &, const LogTagsErrors &);
442  virtual bool shouldCloseOnEof() const;
443 
444  void checkLogging();
445 
447  bool concurrentRequestQueueFilled() const;
448 
449  void pinConnection(const Comm::ConnectionPointer &pinServerConn, const HttpRequest &request);
450 
451  /* PROXY protocol functionality */
454  bool proxyProtocolError(const char *reason);
455 
456 #if USE_OPENSSL
457  Security::ContextPointer getTlsContextFromCache(const SBuf &cacheKey, const Ssl::CertificateProperties &certProperties);
459 
462  void storeTlsContextToCache(const SBuf &cacheKey, Security::ContextPointer &ctx);
464 #endif
465 
468 
471 
472 #if USE_AUTH
475 #endif
476 
477 #if USE_OPENSSL
478  bool switchedToHttps_ = false;
479  bool parsingTlsHandshake = false;
480  uint64_t parsedBumpedRequestCount = 0;
482 
485  unsigned short tlsConnectPort = 0;
487 
491 
495 #endif
496 
498  const char *stoppedSending_ = nullptr;
500  const char *stoppedReceiving_ = nullptr;
505 };
506 
507 const char *findTrailingHTTPVersion(const char *uriAndHTTPVersion, const char *end = NULL);
508 
509 int varyEvaluateMatch(StoreEntry * entry, HttpRequest * req);
510 
513 
514 void clientOpenListenSockets(void);
515 void clientConnectionsClose(void);
516 void httpRequestFree(void *);
517 
520 
522 void clientPackRangeHdr(const HttpReplyPointer &, const HttpHdrRangeSpec *, String boundary, MemBuf *);
523 
525 void clientPackTermBound(String boundary, MemBuf *);
526 
527 /* misplaced declaratrions of Stream callbacks provided/used by client side */
533 
537 
538 std::ostream &operator <<(std::ostream &os, const ConnStateData::PinnedIdleContext &pic);
539 std::ostream &operator <<(std::ostream &, const ConnStateData::ServerConnectionContext &);
540 
541 #endif /* SQUID_CLIENTSIDE_H */
542 
std::ostream & operator<<(std::ostream &os, const ConnStateData::PinnedIdleContext &pic)
virtual void noteMoreBodySpaceAvailable(BodyPipe::Pointer)=0
bool shouldPreserveClientData() const
void whenClientIpKnown()
Comm::ConnectionPointer connection()
gives to-server connection to the new owner
Definition: client_side.h:219
virtual void noteBodyConsumerAborted(BodyPipe::Pointer)=0
virtual void clientPinnedConnectionClosed(const CommCloseCbParams &io)
Our close handler called by Comm when the pinned connection is closed.
void clientAfterReadingRequests()
SBuf tlsClientSni_
TLS client delivered SNI value. Empty string if none has been received.
Definition: client_side.h:489
void pinConnection(const Comm::ConnectionPointer &pinServerConn, const HttpRequest &request)
Forward future client requests using the given server connection.
virtual void processParsedRequest(Http::StreamPointer &)=0
start processing a freshly parsed request
void fillConnectionLevelDetails(ACLFilledChecklist &) const
SQUIDCEXTERN CSR clientGetMoreData
Definition: client_side.h:528
A RegisteredRunner with lifetime determined by forces outside the Registry.
void pinBusyConnection(const Comm::ConnectionPointer &pinServerConn, const HttpRequest::Pointer &request)
CSCB clientSocketRecipient
Definition: client_side.h:531
void stopPinnedConnectionMonitoring()
The caller assumes responsibility for connection closure detection.
SQUIDCEXTERN CSS clientReplyStatus
Definition: client_side.h:529
void setServerBump(Ssl::ServerBump *srvBump)
Definition: client_side.h:287
CertSignAlgorithm
Definition: gadgets.h:150
void lifetimeTimeout(const CommTimeoutCbParams &params)
CachePeer * peer
CachePeer the connection goes via.
Definition: client_side.h:152
std::shared_ptr< SSL_CTX > ContextPointer
Definition: Context.h:29
Comm::ConnectionPointer connection
to-server connection to be pinned
Definition: client_side.h:188
virtual bool handleReadData()
const char * stoppedSending() const
true if we stopped sending the response
Definition: client_side.h:162
void enterOrphanage()
close the still-open connection when its last reference is gone
Definition: Connection.h:88
@ Error
Definition: ResultCode.h:19
void getSslContextStart()
Start to create dynamic Security::ContextPointer for host or uses static port SSL context.
void setAuth(const Auth::UserRequest::Pointer &aur, const char *cause)
Definition: client_side.cc:510
void resetSslCommonName(const char *name)
Definition: client_side.h:294
const ProxyProtocol::HeaderPointer & proxyProtocolHeader() const
Definition: client_side.h:361
struct ConnStateData::@39 pinning
bool proxyProtocolError(const char *reason)
void sslCrtdHandleReply(const Helper::Reply &reply)
Process response from ssl_crtd.
NotePairs::Pointer theNotes
Definition: client_side.h:504
void clientProcessRequest(ConnStateData *, const Http1::RequestParserPointer &, Http::Stream *)
bool peerAccessDenied
cache_peer_access denied pinned connection reuse
Definition: client_side.h:151
void extendLifetime()
(re)sets client_lifetime timeout
Definition: client_side.cc:598
PinnedIdleContext(const Comm::ConnectionPointer &conn, const HttpRequest::Pointer &req)
Definition: client_side.h:186
void doPeekAndSpliceStep()
Comm::ConnectionPointer borrowPinnedConnection(HttpRequest *, const AccessLogEntryPointer &)
ConnStateData-specific part of BorrowPinnedConnection()
void error(char *format,...)
CachePeer * pinnedPeer() const
Definition: client_side.h:204
Ip::Address log_addr
Definition: client_side.h:137
void readNextRequest()
Definition: client_side.cc:873
bool pinned
this connection was pinned
Definition: client_side.h:147
bool clientParseRequests()
Traffic parsing.
Comm::ConnectionPointer serverConnection
Definition: client_side.h:144
Definition: SBuf.h:87
virtual void sendControlMsg(HttpControlMsg)
called to send the 1xx message and notify the Source
BumpMode
Definition: support.h:126
void clientPackRangeHdr(const HttpReplyPointer &, const HttpHdrRangeSpec *, String boundary, MemBuf *)
append a "part" HTTP header (as in a multi-part/range reply) to the buffer
Definition: client_side.cc:725
BodyPipe::Pointer bodyPipe
set when we are reading request body
Definition: client_side.h:432
bool initiateTunneledRequest(HttpRequest::Pointer const &cause, Http::MethodType const method, const char *reason, const SBuf &payload)
generates and sends to tunnel.cc a fake request with a given payload
bool splice()
Splice a bumped client connection on peek-and-splice mode.
const char * stoppedReceiving_
the reason why we no longer read the request or nil
Definition: client_side.h:500
int64_t mayNeedToReadMoreBody() const
Definition: Server.h:30
clientStream_status_t CSS(clientStreamNode *, ClientHttpRequest *)
@ bumpEnd
Definition: support.h:126
virtual void terminateAll(const Error &, const LogTagsErrors &)
abort any pending transactions and prevent new ones (by closing)
Security::KeyLogger keyLogger
managers logging of the being-accepted TLS connection secrets
Definition: client_side.h:385
CSD clientSocketDetach
Definition: client_side.h:532
Http1::TeChunkedParser * bodyParser
parses HTTP/1.1 chunked request body
Definition: client_side.h:109
struct ConnStateData::@38 flags
ClientHttpRequest * buildFakeRequest(Http::MethodType const method, SBuf &useHost, unsigned short usePort, const SBuf &payload)
build a fake http request
a summary a TLS I/O operation outcome
Definition: Io.h:19
void handleSslBumpHandshakeError(const Security::IoResult &)
process a problematic Security::Accept() result on the SslBump code path
virtual void fillChecklist(ACLFilledChecklist &) const
configure the given checklist (to reflect the current transaction state)
bool empty() const
Definition: Notes.h:253
err_type
Definition: forward.h:14
const char * findTrailingHTTPVersion(const char *uriAndHTTPVersion, const char *end=NULL)
virtual bool doneAll() const
whether positive goal has been reached
Definition: client_side.h:240
SBuf sslBumpCertKey
Key to use to store/retrieve generated certificate.
Definition: client_side.h:490
virtual bool shouldCloseOnEof() const
whether to stop serving our client after reading EOF on its connection
virtual void afterClientRead()
processing to be done after a Comm::Read()
static void sslCrtdHandleReplyWrapper(void *data, const Helper::Reply &reply)
Callback function. It is called when squid receive message from ssl_crtd.
void startDechunkingRequest()
initialize dechunking state
static int port
Definition: ldap_backend.cc:69
unsigned short tlsConnectPort
The TLS server port number as passed in the CONNECT request.
Definition: client_side.h:485
Security::IoResult acceptTls()
virtual void endingShutdown()
void startPinnedConnectionMonitoring()
void finishDechunkingRequest(bool withSuccess)
put parsed content into input buffer and clean up
void stopReceiving(const char *error)
note request receiving error and close as soon as we write the response
bool zeroReply
server closed w/o response (ERR_ZERO_SIZE_OBJECT)
Definition: client_side.h:150
a transaction problem
Definition: Error.h:18
bool readMore
needs comm_read (for this request or new requests)
Definition: client_side.h:140
Http::Stream * parseHttpRequest(const Http1::RequestParserPointer &)
void postHttpsAccept()
the second part of old httpsAccept, waiting for future HttpsServer home
Ssl::ServerBump * sslServerBump
HTTPS server cert. fetching state for bump-ssl-server-first.
Definition: client_side.h:493
const char * stoppedSending_
the reason why we no longer write the response or nil
Definition: client_side.h:498
void connStateClosed(const CommCloseCbParams &io)
Definition: client_side.cc:499
virtual Http::Stream * parseOneRequest()=0
Ssl::CertSignAlgorithm signAlgorithm
The signing algorithm to use.
Definition: client_side.h:494
bool needProxyProtocolHeader_
whether PROXY protocol header is still expected
Definition: client_side.h:467
int size
Definition: ModDevPoll.cc:76
parameters for the async notePinnedConnectionBecameIdle() call
Definition: client_side.h:184
void leaveOrphanage()
resume relying on owner(s) to initiate an explicit connection closure
Definition: Connection.h:90
void httpRequestFree(void *)
Definition: client_side.cc:491
#define NULL
Definition: types.h:166
virtual bool doneAll() const
whether positive goal has been reached
Definition: AsyncJob.cc:97
@ algSignTrusted
Definition: gadgets.h:150
AsyncCall::Pointer closeHandler
The close handler for pinned server side connection.
Definition: client_side.h:154
bool reading
we are monitoring for peer connection closure
Definition: client_side.h:149
void CSD(clientStreamNode *, ClientHttpRequest *)
client stream detach
virtual void handleReply(HttpReply *header, StoreIOBuffer receivedData)=0
void CSR(clientStreamNode *, ClientHttpRequest *)
client stream read
Ssl::BumpMode sslBumpMode
ssl_bump decision (Ssl::bumpEnd if n/a).
Definition: client_side.h:305
bundles HTTP 1xx reply and the "successfully forwarded" callback
void updateError(const Error &)
if necessary, stores new error information (if any)
Definition: client_side.cc:644
bool parsingTlsHandshake
Definition: client_side.h:479
virtual void receivedFirstByte()
Update flags and timeout after the first byte received.
#define SQUIDCEXTERN
Definition: squid.h:21
Definition: MemBuf.h:24
ServerConnectionContext(const Comm::ConnectionPointer &conn, const SBuf &post101Bytes)
Definition: client_side.h:216
virtual void doneWithControlMsg()
bool concurrentRequestQueueFilled() const
Definition: Xaction.cc:49
void httpsPeeked(PinnedIdleContext pic)
called by FwdState when it is done bumping the server
bool preservingClientData_
whether preservedClientData is valid and should be kept up to date
Definition: client_side.h:435
void clientOpenListenSockets(void)
void resetReadTimeout(time_t timeout)
(re)sets timeout for receiving more bytes from the client
Definition: client_side.cc:590
FdNoteId
We cannot send char* FD notes to other processes. Pass int IDs and convert.
Definition: FdNotes.h:20
void stopSending(const char *error)
note response sending error and close as soon as we read the request
Definition: client_side.cc:991
void clientConnectionsClose(void)
bool handleIdleClientPinnedTlsRead()
virtual int pipelinePrefetchMax() const
returning N allows a pipeline of 1+N requests (see pipeline_prefetch)
manages collecting and logging secrets of a TLS connection to tls_key_log
Definition: KeyLogger.h:24
int varyEvaluateMatch(StoreEntry *entry, HttpRequest *req)
SBuf tlsConnectHostOrIp
The TLS server host name appears in CONNECT request or the server ip address for the intercepted requ...
Definition: client_side.h:484
NotePairs::Pointer notes()
void parseTlsHandshake()
Http::Stream * abortRequestParsing(const char *const errUri)
stop parsing the request and create context for relaying error info
int conn
the current server connection FD
Definition: Transport.cc:26
#define assert(EX)
Definition: assert.h:19
AsyncCall::Pointer readHandler
detects serverConnection closure
Definition: client_side.h:153
bool transparent() const
bool switchedToHttps() const
Definition: client_side.h:285
BodyPipe::Pointer expectRequestBody(int64_t size)
void buildSslCertGenerationParams(Ssl::CertificateProperties &certProperties)
void updateError(const err_type c, const ErrorDetailPointer &d)
emplacement/convenience wrapper for updateError(const Error &)
Definition: client_side.h:367
void clientPackTermBound(String boundary, MemBuf *)
put terminating boundary for multiparts to the buffer
Definition: client_side.cc:718
void add(const Http::StreamPointer &context)
registers a newly created stream
bool proxyProtocolValidateClient()
void quitAfterError(HttpRequest *request)
virtual time_t idleTimeout() const =0
timeout to use when waiting for the next request
void consumeInput(const size_t byteCount)
remove no longer needed leading bytes from the input buffer
virtual void callException(const std::exception &)
called when the job throws during an async call
Definition: client_side.cc:631
ProxyProtocol::HeaderPointer proxyProtocolHeader_
the parsed PROXY protocol header
Definition: client_side.h:470
bool pinnedAuth() const
Definition: client_side.h:205
void notePinnedConnectionBecameIdle(PinnedIdleContext pic)
Called when a pinned connection becomes available for forwarding the next request.
virtual void start()
called by AsyncStart; do not call directly
bool switchedToHttps_
Definition: client_side.h:478
SBuf preservedClientData
Definition: client_side.h:350
enum Http::_method_t MethodType
virtual bool writeControlMsgAndCall(HttpReply *rep, AsyncCall::Pointer &call)=0
handle a control message received by context from a peer and call back
void clientPinnedConnectionRead(const CommIoCbParams &io)
virtual void notePeerConnection(Comm::ConnectionPointer)
called just before a FwdState-dispatched job starts using connection
Definition: client_side.h:208
uint64_t parsedBumpedRequestCount
The number of parsed HTTP requests headers on a bumped client connection.
Definition: client_side.h:481
void getSslContextDone(Security::ContextPointer &)
finish configuring the newly created SSL context"
SBuf sslCommonName_
CN name for SSL certificate generation.
Definition: client_side.h:486
bool tunnelOnError(const HttpRequestMethod &, const err_type)
initiate tunneling if possible or return false otherwise
void switchToHttps(ClientHttpRequest *, Ssl::BumpMode bumpServerMode)
void abortChunkedRequestBody(const err_type error)
quit on errors related to chunked request body handling
void expectNoForwarding()
cleans up virgin request [body] forwarding state
const Auth::UserRequest::Pointer & getAuth() const
Definition: client_side.h:124
static Comm::ConnectionPointer BorrowPinnedConnection(HttpRequest *, const AccessLogEntryPointer &)
err_type handleChunkedRequestBody()
parses available chunked encoded body bytes, checks size, returns errors
bool handleRequestBodyData()
void startPeekAndSplice()
Initializes and starts a peek-and-splice negotiation with the SSL client.
sends a single control message, notifying the Sink
friend std::ostream & operator<<(std::ostream &, const ServerConnectionContext &)
noteTakeServerConnectionControl() callback parameter
Definition: client_side.h:214
Auth::UserRequest::Pointer auth_
some user details that can be used to perform authentication on this connection
Definition: client_side.h:474
void clientStartListeningOn(AnyP::PortCfgPointer &port, const RefCount< CommCbFunPtrCallT< CommAcceptCbPtrFun > > &subCall, const Ipc::FdNoteId noteId)
accept requests to a given port and inform subCall about them
bool serveDelayedError(Http::Stream *)
void clientReadFtpData(const CommIoCbParams &io)
void clientSetKeepaliveFlag(ClientHttpRequest *http)
decide whether to expect multiple requests on the corresponding connection
Definition: client_side.cc:690
Comm::ConnectionPointer conn_
to-server connection
Definition: client_side.h:225
const SBuf & sslCommonName() const
Definition: client_side.h:293
Error bareError
a problem that occurred without a request (e.g., while parsing headers)
Definition: client_side.h:382
void clientPostHttpsAccept(ConnStateData *)
ConnStateData(const MasterXactionPointer &xact)
RefCount< MasterXaction > MasterXactionPointer
Definition: client_side.h:45
virtual void startShutdown()
bool auth
pinned for www authentication
Definition: client_side.h:148
Ssl::ServerBump * serverBump()
Definition: client_side.h:286
SBuf preReadServerBytes
post-101 bytes received from the server
Definition: client_side.h:221
const char * stoppedReceiving() const
true if we stopped receiving the request
Definition: client_side.h:160
const SBuf & tlsClientSni() const
Definition: client_side.h:295
SQUIDCEXTERN CSD clientReplyDetach
Definition: client_side.h:530
Incremental TLS/SSL Handshake parser.
Definition: Handshake.h:61
void clientProcessRequestFinished(ConnStateData *, const HttpRequest::Pointer &)
void checkLogging()
log the last (attempt at) transaction if nobody else did
int port
port of pinned connection
Definition: client_side.h:146
void kick()
try to make progress on a transaction or read more I/O
Definition: client_side.cc:910
bool isOpen() const
Definition: client_side.cc:656
virtual ~ConnStateData()
Definition: client_side.cc:663
void storeTlsContextToCache(const SBuf &cacheKey, Security::ContextPointer &ctx)
virtual void swanSong()
Definition: client_side.cc:607
bool fakeAConnectRequest(const char *reason, const SBuf &payload)
void CSCB(clientStreamNode *, ClientHttpRequest *, HttpReply *, StoreIOBuffer)
client stream read callback
struct _request * request(char *urlin)
Definition: tcp-banger2.c:291
virtual void afterClientWrite(size_t)
processing to sync state after a Comm::Write()
virtual void noteTakeServerConnectionControl(ServerConnectionContext)
Definition: client_side.h:230
an interface for those capable of configuring an ACLFilledChecklist object
Security::HandshakeParser tlsParser
Definition: client_side.h:309
void unpinConnection(const bool andClose)
Undo pinConnection() and, optionally, close the pinned connection.
HttpRequest::Pointer request
to-server request that initiated serverConnection
Definition: client_side.h:189
char * host
host name of pinned connection
Definition: client_side.h:145
char * prepareTlsSwitchingURL(const Http1::RequestParserPointer &hp)
void requestTimeout(const CommTimeoutCbParams &params)
Security::ContextPointer getTlsContextFromCache(const SBuf &cacheKey, const Ssl::CertificateProperties &certProperties)
bool parseProxyProtocolHeader()
bool hasNotes() const
Definition: client_side.h:359

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors