SquidConfig.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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_SQUIDCONFIG_H_
10#define SQUID_SQUIDCONFIG_H_
11
12#include "acl/forward.h"
13#include "base/RefCount.h"
14#include "base/YesNoNone.h"
15#if USE_DELAY_POOLS
16#include "ClientDelayConfig.h"
17#include "DelayConfig.h"
18#endif
19#include "helper/ChildConfig.h"
20#include "HttpHeaderTools.h"
21#include "ip/Address.h"
22#if USE_DELAY_POOLS
23#include "MessageDelayPools.h"
24#endif
25#include "Notes.h"
26#include "security/forward.h"
27#if USE_OPENSSL
28#include "ssl/support.h"
29#endif
30#include "store/Disk.h"
31#include "store/forward.h"
32#include "time/gadgets.h"
33
34#include <chrono>
35
36#if USE_OPENSSL
39#endif
40
41namespace Mgr
42{
43class ActionPasswordList;
44} // namespace Mgr
45class CachePeer;
46class CustomLog;
47class CpuAffinityMap;
48class DebugMessages;
49class external_acl;
50class HeaderManglers;
51class RefreshPattern;
54
55namespace AnyP
56{
57class PortCfg;
58}
59
60namespace Store {
62public:
63 DiskConfig() { assert(swapDirs == nullptr); }
64 ~DiskConfig() { delete[] swapDirs; }
65
67 int n_allocated = 0;
68 int n_configured = 0;
70 int n_strands = 0;
71};
72#define INDEXSD(i) (Config.cacheSwap.swapDirs[i].getRaw())
73}
74
77{
78public:
79 struct {
80 /* These should be for the Store::Root instance.
81 * this needs pluggable parsing to be done smoothly.
82 */
86
89 size_t memMaxSize;
90
91 struct {
92 int64_t min;
93 int pct;
94 int64_t max;
96 int64_t readAheadGap;
99#if USE_HTTP_VIOLATIONS
101#endif
102 time_t maxStale;
108
109 struct {
110 time_t read;
111 time_t write;
112 time_t lifetime;
113 time_t connect;
114 time_t forward;
116 time_t request;
122 time_t deadPeer;
124 int icp_query; /* msec */
125 int icp_query_max; /* msec */
126 int icp_query_min; /* msec */
127 int mcast_icp_query; /* msec */
137
138 struct {
139 unsigned short icp;
140#if USE_HTCP
141
142 unsigned short htcp;
143#endif
144#if SQUID_SNMP
145
146 unsigned short snmp;
147#endif
149
150#if SQUID_SNMP
151
152 struct {
156#endif
157#if USE_WCCP
158
159 struct {
164#endif
165#if USE_WCCPv2
166
167 struct {
175 void *info;
177#endif
178
180
181 struct {
182 char *store;
183 char *swap;
185#if ICAP_CLIENT
187#endif
197
198 struct {
201#if USE_UNLINKD
202
203 char *unlinkd;
204#endif
205
206 char *diskd;
207#if USE_OPENSSL
208
210#endif
211
213
216
217 struct {
230
231 struct {
232
235#if SQUID_SNMP
238#endif
239 // TODO: this should really be a CIDR value
247
248 struct {
249 int size;
250 int low;
251 int high;
253
254 struct {
255 int size;
260
261 struct {
268
269 struct {
270 int high;
271 int low;
272 time_t period;
274
275 struct {
289#if USE_HTTP_VIOLATIONS
290
292#endif
293
305#if USE_CACHE_DIGESTS
306
308#endif
309
316 int via;
322
323#if FOLLOW_X_FORWARDED_FOR
327#if LINUX_NETFILTER
329#endif
330#endif /* FOLLOW_X_FORWARDED_FOR */
331
338#if USE_OPENSSL
340#endif
342
344
346
347 // these values are actually unsigned
348 // TODO: extend the parser to support more nuanced types
351
352 std::chrono::nanoseconds paranoid_hit_validation;
353
354 class ACL *aclList;
355
356 struct {
368#if SQUID_SNMP
369
371#endif
372#if USE_HTTP_VIOLATIONS
374#endif
379#if USE_HTCP
380
383#endif
384
385#if USE_OPENSSL
387#endif
388#if FOLLOW_X_FORWARDED_FOR
390#endif /* FOLLOW_X_FORWARDED_FOR */
391
394
399
401
407
408 struct {
414 int epsv;
415 int eprt;
420
422
423 struct {
428#if USE_ERR_LOCALES
431#endif
433
434 struct {
437
438 struct {
439 int64_t limit;
441#if USE_DELAY_POOLS
442
446#endif
447
448 struct {
449 struct {
457#if MULTICAST_MISS_STREAM
458
459 struct {
460
462 int ttl;
463 unsigned short port;
466#endif
467
482#if USE_CACHE_DIGESTS
483
484 struct {
491#endif
492#if USE_OPENSSL
493
494 struct {
501#endif
502
503 struct {
509 int sleep_after_fork; /* microseconds */
510 time_t minimum_expiry_time; /* seconds */
512
513 struct {
515#if USE_OPENSSL
520#endif
522
524 int umask;
528
529#if USE_LOADABLE_MODULES
531#endif
532
534
536
539 char *response;
541
543
544 struct {
547 ssize_t packet_max;
549
550 struct {
555};
556
557extern SquidConfig Config;
558
560{
561public:
562 void clear() {
563 *this = SquidConfig2();
564 }
565
566 struct {
571};
572
573extern SquidConfig2 Config2;
574
575#endif /* SQUID_SQUIDCONFIG_H_ */
576
std::list< HeaderWithAcl > HeaderWithAclList
SquidConfig Config
Definition: SquidConfig.cc:12
SquidConfig2 Config2
Definition: SquidConfig.cc:14
#define acl_access
Definition: forward.h:45
#define assert(EX)
Definition: assert.h:17
Definition: Acl.h:46
deny_info representation. Currently a POD.
representation of a class of Size-limit ACLs
Definition: AclSizeLimit.h:17
list of address-based ACLs.
Definition: Address.h:20
stores cpu_affinity_map configuration
a collection of DebugMessage objects (with fast access by message IDs)
Definition: Messages.h:68
A collection of headerMangler objects for a given message kind.
Allows or blocks HTTP Upgrade protocols (see http_upgrade_request_protocols)
represents configuration for response delay pools
list of cachemgr password authorization definitions. Currently a POD.
Definition: Notes.h:109
a representation of a refresh pattern.
a single tls_key_log directive configuration and logging handler
Definition: KeyLog.h:21
gid_t effectiveGroupID
Definition: SquidConfig.h:570
void clear()
Definition: SquidConfig.h:562
uid_t effectiveUserID
Definition: SquidConfig.h:569
struct SquidConfig2::@121 onoff
the representation of the configuration. POD.
Definition: SquidConfig.h:77
int cache_miss_revalidate
Definition: SquidConfig.h:317
Ip::Address address
Definition: SquidConfig.h:161
Helper::ChildConfig redirectChildren
Definition: SquidConfig.h:214
struct SquidConfig::@94 Port
int surrogate_is_remote
Definition: SquidConfig.h:311
int64_t limit
Definition: SquidConfig.h:439
char * errHtmlText
Definition: SquidConfig.h:229
time_t negativeDnsTtl
Definition: SquidConfig.h:103
size_t maxRequestBufferSize
Definition: SquidConfig.h:134
Ip::Address udp_outgoing
Definition: SquidConfig.h:234
char * errorStylesheet
Definition: SquidConfig.h:432
time_t request_start_timeout
Definition: SquidConfig.h:123
char * mimeTablePathname
Definition: SquidConfig.h:224
size_t memMaxSize
Definition: SquidConfig.h:89
int nonhierarchical_direct
Definition: SquidConfig.h:297
size_t tcpRcvBufsz
Definition: SquidConfig.h:242
struct SquidConfig::@112 comm_incoming
size_t appendDomainLen
Definition: SquidConfig.h:221
acl_access * adapted_http
Definition: SquidConfig.h:358
Security::KeyLog * tlsKeys
one optional tls_key_log
Definition: SquidConfig.h:188
int64_t readAheadGap
Definition: SquidConfig.h:96
int connect_limit
Definition: SquidConfig.h:551
acl_access * spoof_client_ip
Definition: SquidConfig.h:397
int max_filedescriptors
Definition: SquidConfig.h:525
HeaderWithAclList * request_header_add
request_header_add access list
Definition: SquidConfig.h:473
time_t peer_connect
Definition: SquidConfig.h:115
int errorLogMissingLanguages
Definition: SquidConfig.h:430
HeaderManglers * request_header_access
request_header_access and request_header_replace
Definition: SquidConfig.h:469
int log_uses_indirect_client
Definition: SquidConfig.h:326
acl_access * ASlists
Definition: SquidConfig.h:363
struct SquidConfig::@113 mcast_miss
int objectsPerBucket
Definition: SquidConfig.h:262
int acl_uses_indirect_client
Definition: SquidConfig.h:324
sslproxy_cert_adapt * cert_adapt
Definition: SquidConfig.h:519
char * effectiveGroup
Definition: SquidConfig.h:196
time_t siteSelect
Definition: SquidConfig.h:121
int connect_retries
Definition: SquidConfig.h:350
time_t deadPeer
Definition: SquidConfig.h:122
int vary_ignore_expire
Definition: SquidConfig.h:310
int64_t shared_transient_entries_limit
Definition: SquidConfig.h:343
char * ssl_password
Definition: SquidConfig.h:209
wordlist * store_id
Definition: SquidConfig.h:200
struct SquidConfig::@103 fqdncache
struct SquidConfig::@105 Netdb
int delay_pool_uses_indirect_client
Definition: SquidConfig.h:325
char * agentInfo
Definition: SquidConfig.h:154
char * foreignIntermediateCertsPath
Definition: SquidConfig.h:516
Helper::ChildConfig storeIdChildren
Definition: SquidConfig.h:215
CustomLog * accesslogs
Definition: SquidConfig.h:184
void * info
Definition: SquidConfig.h:175
char * errorDirectory
Definition: SquidConfig.h:427
Ip::Address snmp_outgoing
Definition: SquidConfig.h:237
time_msec_t idns_retransmit
Definition: SquidConfig.h:128
Ip::Address_list * router
Definition: SquidConfig.h:168
int error_pconns
Definition: SquidConfig.h:304
int store_id_bypass
Definition: SquidConfig.h:300
acl_access * followXFF
Definition: SquidConfig.h:389
time_t rebuild_period
Definition: SquidConfig.h:486
char * EmailFrom
Definition: SquidConfig.h:192
int server_pconns
Definition: SquidConfig.h:303
struct SquidConfig::@102 ipcache
struct SquidConfig::@95 Snmp
int use_short_names
Definition: SquidConfig.h:425
struct SquidConfig::@116 warnings
acl_access * redirector
Definition: SquidConfig.h:375
char * storeId_extras
Definition: SquidConfig.h:542
int64_t avgObjectSize
Definition: SquidConfig.h:263
struct SquidConfig::@111 MemPools
int res_defnames
Definition: SquidConfig.h:277
char * errorDefaultLanguage
Definition: SquidConfig.h:429
HeaderManglers * reply_header_access
reply_header_access and reply_header_replace
Definition: SquidConfig.h:471
struct SquidConfig::@108 Ftp
Ip::Address addr
Definition: SquidConfig.h:461
time_t write
Definition: SquidConfig.h:111
char * anon_user
Definition: SquidConfig.h:411
struct SquidConfig::@107 accessList
acl_access * icp
Definition: SquidConfig.h:359
struct SquidConfig::@112::@120 dns
char * accept_filter
Definition: SquidConfig.h:523
int hostStrictVerify
Definition: SquidConfig.h:335
time_t ftpClientIdle
Definition: SquidConfig.h:119
char * visible_appname_string
Definition: SquidConfig.h:195
int mcast_icp_query
Definition: SquidConfig.h:127
int memory_cache_first
Definition: SquidConfig.h:333
int strip_query_terms
Definition: SquidConfig.h:298
wordlist * loadable_module_names
Definition: SquidConfig.h:530
int client_dst_passthru
Definition: SquidConfig.h:336
ClientDelayConfig ClientDelay
Definition: SquidConfig.h:444
int tproxy_uses_indirect_client
Definition: SquidConfig.h:328
int forward_max_tries
Definition: SquidConfig.h:349
char * etcHostsPath
Definition: SquidConfig.h:225
Notes notes
note
Definition: SquidConfig.h:479
size_t maxReplyHeaderSize
Definition: SquidConfig.h:135
acl_access * reply
Definition: SquidConfig.h:377
acl_access * htcp_clr
Definition: SquidConfig.h:382
time_msec_t idns_query
Definition: SquidConfig.h:129
int reload_into_ims
Definition: SquidConfig.h:291
struct SquidConfig::@106 onoff
int lowWaterMark
Definition: SquidConfig.h:84
acl_access * brokenPosts
Definition: SquidConfig.h:373
char * swap
Definition: SquidConfig.h:183
acl_access * http
Definition: SquidConfig.h:357
struct SquidConfig::@92 quickAbort
int connect_timeout
Definition: SquidConfig.h:553
acl_access * collapsedForwardingAccess
Definition: SquidConfig.h:404
char * unlinkd
Definition: SquidConfig.h:203
time_t request
Definition: SquidConfig.h:116
RemovalPolicySettings * replPolicy
Definition: SquidConfig.h:97
CustomLog * icaplogs
Definition: SquidConfig.h:186
int redirector_bypass
Definition: SquidConfig.h:299
wordlist * redirect
Definition: SquidConfig.h:199
struct SquidConfig::@99 Program
char * store
Definition: SquidConfig.h:182
int unclean_shutdown
Definition: SquidConfig.h:495
int64_t maxRequestBodySize
Definition: SquidConfig.h:133
std::chrono::nanoseconds paranoid_hit_validation
Definition: SquidConfig.h:352
size_t sessionCacheSize
Definition: SquidConfig.h:498
Store::DiskConfig cacheSwap
Definition: SquidConfig.h:421
int emailErrData
Definition: SquidConfig.h:318
RefreshPattern * Refresh
Definition: SquidConfig.h:419
struct SquidConfig::@100 Accel
acl_access * store_id
Definition: SquidConfig.h:376
Ip::Address udp_incoming
Definition: SquidConfig.h:233
Acl::Address * outgoing_address
Definition: SquidConfig.h:378
time_t lifetime
Definition: SquidConfig.h:112
class ACL * aclList
Definition: SquidConfig.h:354
char * appendDomain
Definition: SquidConfig.h:220
int uri_whitespace
Definition: SquidConfig.h:455
int WIN32_IpAddrChangeMonitor
Definition: SquidConfig.h:332
time_t forward
Definition: SquidConfig.h:114
sslproxy_cert_sign * cert_sign
Definition: SquidConfig.h:518
char * coredump_dir
Definition: SquidConfig.h:480
int memory_cache_disk
Definition: SquidConfig.h:334
int test_reachability
Definition: SquidConfig.h:286
time_t negativeTtl
Definition: SquidConfig.h:100
size_t swapout_chunk_size
Definition: SquidConfig.h:488
CpuAffinityMap * cpuAffinityMap
Definition: SquidConfig.h:527
struct SquidConfig::@117 ssl_client
struct SquidConfig::@101 Addrs
size_t high_memory
Definition: SquidConfig.h:506
acl_access * cert_error
Definition: SquidConfig.h:517
YesNoNone shmLocking
shared_memory_locking
Definition: SquidConfig.h:88
time_t read
Definition: SquidConfig.h:110
time_t pconnLifetime
pconn_lifetime in squid.conf
Definition: SquidConfig.h:120
RemovalPolicySettings * memPolicy
Definition: SquidConfig.h:98
time_t urlRewrite
Definition: SquidConfig.h:130
int minDirectRtt
Definition: SquidConfig.h:258
ssize_t packet_max
maximum size EDNS advertised for DNS replies.
Definition: SquidConfig.h:547
Mgr::ActionPasswordList * passwd_list
Definition: SquidConfig.h:259
HeaderWithAclList * reply_header_add
reply_header_add access list
Definition: SquidConfig.h:475
size_t maxInMemObjSize
Definition: SquidConfig.h:266
int forwarding_method
Definition: SquidConfig.h:170
char * surrogate_id
Definition: SquidConfig.h:218
int buffered_logs
Definition: SquidConfig.h:282
char * certSignHash
Definition: SquidConfig.h:499
time_t shutdownLifetime
Definition: SquidConfig.h:105
int prefer_direct
Definition: SquidConfig.h:296
AclDenyInfoList * denyInfoList
Definition: SquidConfig.h:406
int icp_query_max
Definition: SquidConfig.h:125
struct SquidConfig::@104 Store
int log_mime_hdrs
Definition: SquidConfig.h:284
external_acl * externalAclHelperList
Definition: SquidConfig.h:511
bool logTlsServerHelloDetails
Definition: SquidConfig.h:339
time_t clientIdlePconn
Definition: SquidConfig.h:117
int rebuild_chunk_percentage
Definition: SquidConfig.h:489
struct SquidConfig::@112::@120 tcp
time_t maxStale
Definition: SquidConfig.h:102
char * ssl_engine
Definition: SquidConfig.h:496
acl_access * stats_collection
Definition: SquidConfig.h:367
Ip::Address snmp_incoming
Definition: SquidConfig.h:236
int icp_query_min
Definition: SquidConfig.h:126
int digest_generation
Definition: SquidConfig.h:307
size_t maxRequestHeaderSize
Definition: SquidConfig.h:132
int client_pconns
Definition: SquidConfig.h:302
CachePeer * peers
Definition: SquidConfig.h:245
int collapsed_forwarding
Definition: SquidConfig.h:321
char * chroot_dir
Definition: SquidConfig.h:481
acl_access * serverPconnForNonretriable
Definition: SquidConfig.h:403
unsigned short icp
Definition: SquidConfig.h:139
wordlist * mcast_group_list
Definition: SquidConfig.h:244
char * encode_key
Definition: SquidConfig.h:464
struct SquidConfig::@119 happyEyeballs
size_t udpMaxHitObjsz
Definition: SquidConfig.h:243
struct SquidConfig::UrlHelperTimeout onUrlRewriteTimeout
int assignment_method
Definition: SquidConfig.h:172
acl_access * ssl_bump
Definition: SquidConfig.h:386
struct SquidConfig::@96 Wccp
size_t list_width
Definition: SquidConfig.h:409
AclSizeLimit * rangeOffsetLimit
Definition: SquidConfig.h:456
int check_hostnames
Definition: SquidConfig.h:314
Ip::Address router
Definition: SquidConfig.h:160
char * configFile
Definition: SquidConfig.h:153
char * netdbFilename
Definition: SquidConfig.h:223
int64_t min
Definition: SquidConfig.h:92
char * as_whois_server
Definition: SquidConfig.h:179
int sleep_after_fork
Definition: SquidConfig.h:509
acl_access * storeMiss
Definition: SquidConfig.h:366
time_t hopelessKidRevivalDelay
hopeless_kid_revival_delay
Definition: SquidConfig.h:107
int max_open_disk_fds
Definition: SquidConfig.h:454
int minDirectHops
Definition: SquidConfig.h:257
char * visibleHostname
Definition: SquidConfig.h:226
acl_access * htcp
Definition: SquidConfig.h:381
char * adminEmail
Definition: SquidConfig.h:191
time_t rewrite_period
Definition: SquidConfig.h:487
int relaxed_header_parser
Definition: SquidConfig.h:313
time_t connect
Definition: SquidConfig.h:113
struct SquidConfig::@109 icons
struct SquidConfig::@98 Log
unsigned short port
Definition: SquidConfig.h:463
char * redirector_extras
Definition: SquidConfig.h:535
struct SquidConfig::@112::@120 udp
time_t positiveDnsTtl
Definition: SquidConfig.h:104
char * uniqueHostname
Definition: SquidConfig.h:227
time_t minimum_expiry_time
Definition: SquidConfig.h:510
int rotateNumber
Definition: SquidConfig.h:189
acl_access * sendHit
Definition: SquidConfig.h:365
acl_access * on_unsupported_protocol
Definition: SquidConfig.h:398
Ip::Address client_netmask
Definition: SquidConfig.h:240
struct SquidConfig::@115 SSL
char * EmailProgram
Definition: SquidConfig.h:193
char * pidFilename
Definition: SquidConfig.h:222
acl_access * ftp_epsv
Definition: SquidConfig.h:400
acl_access * snmp
Definition: SquidConfig.h:370
acl_access * noCache
Definition: SquidConfig.h:364
int64_t maxObjectSize
Definition: SquidConfig.h:264
struct SquidConfig::@93 Timeout
time_t serverIdlePconn
Definition: SquidConfig.h:118
int icp_hit_stale
Definition: SquidConfig.h:281
char * store_dir_select_algorithm
Definition: SquidConfig.h:508
int allow_underscore
Definition: SquidConfig.h:315
AclSizeLimit * ReplyBodySize
Definition: SquidConfig.h:136
int highWaterMark
Definition: SquidConfig.h:83
int client_ip_max_connections
Definition: SquidConfig.h:533
char * directory
Definition: SquidConfig.h:424
int pipeline_max_prefetch
Definition: SquidConfig.h:345
int v4_first
Place IPv4 first in the order of DNS results.
Definition: SquidConfig.h:546
int redir_rewrites_host
Definition: SquidConfig.h:295
char * effectiveUser
Definition: SquidConfig.h:194
HttpUpgradeProtocolAccess * http_upgrade_request_protocols
http_upgrade_request_protocols
Definition: SquidConfig.h:477
acl_access * proxyProtocol
acceptable PROXY protocol clients
Definition: SquidConfig.h:393
int64_t max
Definition: SquidConfig.h:94
time_t backgroundPingRate
Definition: SquidConfig.h:106
int detect_broken_server_pconns
Definition: SquidConfig.h:312
int bits_per_entry
Definition: SquidConfig.h:485
time_t period
Definition: SquidConfig.h:272
unsigned short htcp
Definition: SquidConfig.h:142
unsigned short snmp
Definition: SquidConfig.h:146
int return_method
Definition: SquidConfig.h:171
acl_access * miss
Definition: SquidConfig.h:360
int half_closed_clients
Definition: SquidConfig.h:287
DelayConfig Delay
Definition: SquidConfig.h:443
acl_access * NeverDirect
Definition: SquidConfig.h:361
struct SquidConfig::@91 Swap
int global_internal_static
Definition: SquidConfig.h:320
wordlist * hostnameAliases
Definition: SquidConfig.h:228
YesNoNone memShared
whether the memory cache is shared among workers
Definition: SquidConfig.h:87
SBufList nameservers
Definition: SquidConfig.h:545
char * diskd
Definition: SquidConfig.h:206
struct SquidConfig::@110 retry
struct SquidConfig::@97 Wccp2
Security::ContextPointer sslContext
Definition: SquidConfig.h:514
MessageDelayConfig MessageDelay
Definition: SquidConfig.h:445
int ignore_unknown_nameservers
Definition: SquidConfig.h:301
acl_access * AlwaysDirect
Definition: SquidConfig.h:362
int httpd_suppress_version_string
Definition: SquidConfig.h:319
acl_access * forceRequestBodyContinuation
Definition: SquidConfig.h:402
int64_t minObjectSize
Definition: SquidConfig.h:265
int refresh_all_ims
Definition: SquidConfig.h:288
struct SquidConfig::@114 digest
RefCount< SwapDir > * swapDirs
Definition: SquidConfig.h:66
int n_strands
number of disk processes required to support all cache_dirs
Definition: SquidConfig.h:70
Definition: forward.h:15
Cache Manager API.
Definition: Action.h:20
std::shared_ptr< SSL_CTX > ContextPointer
Definition: Context.h:29
std::list< SBuf > SBufList
Definition: forward.h:23
uint64_t time_msec_t
Definition: gadgets.h:16

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors