Squid Web Cache master
Loading...
Searching...
No Matches
PortCfg.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 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#ifndef SQUID_SRC_ANYP_PORTCFG_H
10#define SQUID_SRC_ANYP_PORTCFG_H
11
12#include "anyp/forward.h"
14#include "anyp/TrafficMode.h"
15#include "base/CodeContext.h"
16#include "comm/Connection.h"
17#include "comm/Tcp.h"
19
20namespace AnyP
21{
22
23class PortCfg : public CodeContext
24{
25public:
26 PortCfg();
27 // no public copying/moving but see ipV4clone()
28 PortCfg(PortCfg &&) = delete;
29 ~PortCfg() override;
30
32 PortCfg *ipV4clone() const;
33
34 /* CodeContext API */
35 ScopedId codeContextGist() const override;
36 std::ostream &detailCodeContext(std::ostream &os) const override;
37
39
42 char *name; /* visible name */
43 char *defaultsite; /* default web site */
44
46
48 bool vhost;
50 bool ignore_cc;
51
53
55
56 int vport;
59
61
68
71
72private:
73 explicit PortCfg(const PortCfg &other); // for ipV4clone() needs only!
74};
75
76} // namespace AnyP
77
80
83
84#if !defined(MAXTCPLISTENPORTS)
85// Max number of TCP listening ports
86#define MAXTCPLISTENPORTS 128
87#endif
88
89// TODO: kill this global array. Need to check performance of array vs list though.
90extern int NHttpSockets;
92
93#endif /* SQUID_SRC_ANYP_PORTCFG_H */
94
int NHttpSockets
Definition PortCfg.cc:25
AnyP::PortCfgPointer FtpPortList
list of Squid ftp_port configured
Definition PortCfg.cc:23
int HttpSockets[MAXTCPLISTENPORTS]
Definition PortCfg.cc:26
AnyP::PortCfgPointer HttpPortList
list of Squid http(s)_port configured
Definition PortCfg.cc:22
#define MAXTCPLISTENPORTS
Definition PortCfg.h:86
bool ftp_track_dirs
whether transactions should track FTP directories
Definition PortCfg.h:54
Comm::TcpKeepAlive tcp_keepalive
Definition PortCfg.h:60
bool ignore_cc
Ignore request Cache-Control directives.
Definition PortCfg.h:50
PortCfgPointer next
Definition PortCfg.h:38
PortCfg(PortCfg &&)=delete
Security::ServerOptions secure
TLS configuration options for this listening port.
Definition PortCfg.h:70
int disable_pmtu_discovery
Definition PortCfg.h:57
char * defaultsite
Definition PortCfg.h:43
AnyP::ProtocolVersion transport
transport protocol and version received by this port
Definition PortCfg.h:41
PortCfg * ipV4clone() const
creates the same port configuration but listening on any IPv4 address
Definition PortCfg.cc:85
bool connection_auth_disabled
Don't support connection oriented auth.
Definition PortCfg.h:52
Ip::Address s
Definition PortCfg.h:40
char * name
Definition PortCfg.h:42
bool vhost
uses host header
Definition PortCfg.h:48
bool workerQueues
whether listening queues should be worker-specific
Definition PortCfg.h:58
ScopedId codeContextGist() const override
Definition PortCfg.cc:95
TrafficMode flags
flags indicating what type of traffic to expect via this port.
Definition PortCfg.h:45
bool allow_direct
Allow direct forwarding in accelerator mode.
Definition PortCfg.h:47
~PortCfg() override
Definition PortCfg.cc:48
std::ostream & detailCodeContext(std::ostream &os) const override
appends human-friendly context description line(s) to a cache.log record
Definition PortCfg.cc:103
Comm::ConnectionPointer listenConn
Definition PortCfg.h:67
int vport
virtual port support. -1 if dynamic, >0 static
Definition PortCfg.h:56
bool actAsOrigin
update replies to conform with RFC 2616
Definition PortCfg.h:49
Configuration settings for the TCP keep-alive feature.
Definition Tcp.h:17
TLS squid.conf settings for a listening port.
Definition forward.h:15