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/Context.h"
27#include "security/forward.h"
28#if USE_OPENSSL
29#include "ssl/support.h"
30#endif
31#include "store/Disk.h"
32#include "store/forward.h"
33#include "time/gadgets.h"
34
35#include <chrono>
36
37#if USE_OPENSSL
40#endif
41
42namespace Mgr
43{
44class ActionPasswordList;
45} // namespace Mgr
46
47class CachePeers;
48class CustomLog;
49class CpuAffinityMap;
50class DebugMessages;
51class external_acl;
52class HeaderManglers;
53class RefreshPattern;
56
57namespace AnyP
58{
59class PortCfg;
60}
61
62namespace Store {
64public:
65 DiskConfig() { assert(swapDirs == nullptr); }
66 ~DiskConfig() { delete[] swapDirs; }
67
69 int n_allocated = 0;
70 int n_configured = 0;
72 int n_strands = 0;
73};
74#define INDEXSD(i) (Config.cacheSwap.swapDirs[i].getRaw())
75}
76
79{
80public:
81 struct {
82 /* These should be for the Store::Root instance.
83 * this needs pluggable parsing to be done smoothly.
84 */
88
91 size_t memMaxSize;
92
93 struct {
94 int64_t min;
95 int pct;
96 int64_t max;
98 int64_t readAheadGap;
101#if USE_HTTP_VIOLATIONS
103#endif
104 time_t maxStale;
110
111 struct {
112 time_t read;
113 time_t write;
114 time_t lifetime;
115 time_t connect;
116 time_t forward;
118 time_t request;
124 time_t deadPeer;
126 int icp_query; /* msec */
127 int icp_query_max; /* msec */
128 int icp_query_min; /* msec */
129 int mcast_icp_query; /* msec */
139
140 struct {
141 unsigned short icp;
142#if USE_HTCP
143
144 unsigned short htcp;
145#endif
146#if SQUID_SNMP
147
148 unsigned short snmp;
149#endif
151
152#if SQUID_SNMP
153
154 struct {
158#endif
159#if USE_WCCP
160
161 struct {
166#endif
167#if USE_WCCPv2
168
169 struct {
177 void *info;
179#endif
180
182
183 struct {
184 char *store;
185 char *swap;
187#if ICAP_CLIENT
189#endif
199
200 struct {
203#if USE_UNLINKD
204
205 char *unlinkd;
206#endif
207
208 char *diskd;
209#if USE_OPENSSL
210
212#endif
213
215
218
219 struct {
232
233 struct {
234
237#if SQUID_SNMP
240#endif
241 // TODO: this should really be a CIDR value
249
250 struct {
251 int size;
252 int low;
253 int high;
255
256 struct {
257 int size;
262
263 struct {
270
271 struct {
272 int high;
273 int low;
274 time_t period;
276
277 struct {
291#if USE_HTTP_VIOLATIONS
292
294#endif
295
307#if USE_CACHE_DIGESTS
308
310#endif
311
318 int via;
324
325#if FOLLOW_X_FORWARDED_FOR
329#if LINUX_NETFILTER
331#endif
332#endif /* FOLLOW_X_FORWARDED_FOR */
333
340#if USE_OPENSSL
342#endif
344
346
348
349 // these values are actually unsigned
350 // TODO: extend the parser to support more nuanced types
353
354 std::chrono::nanoseconds paranoid_hit_validation;
355
356 class ACL *aclList;
357
358 struct {
370#if SQUID_SNMP
371
373#endif
374#if USE_HTTP_VIOLATIONS
376#endif
381#if USE_HTCP
382
385#endif
386
387#if USE_OPENSSL
389#endif
390#if FOLLOW_X_FORWARDED_FOR
392#endif /* FOLLOW_X_FORWARDED_FOR */
393
396
401
403
409
410 struct {
416 int epsv;
417 int eprt;
422
424
425 struct {
430#if USE_ERR_LOCALES
433#endif
435
436 struct {
439
440 struct {
441 int64_t limit;
443#if USE_DELAY_POOLS
444
448#endif
449
450 struct {
451 struct {
459
474#if USE_CACHE_DIGESTS
475
476 struct {
483#endif
484#if USE_OPENSSL
485
486 struct {
493#endif
494
495 struct {
501 int sleep_after_fork; /* microseconds */
502 time_t minimum_expiry_time; /* seconds */
504
505 struct {
507#if USE_OPENSSL
512#endif
514
516 int umask;
520
521#if USE_LOADABLE_MODULES
523#endif
524
526
528
531 char *response;
533
535
536 struct {
539 ssize_t packet_max;
541
542 struct {
547};
548
549extern SquidConfig Config;
550
552{
553public:
554 void clear() {
555 *this = SquidConfig2();
556 }
557
558 struct {
563};
564
565extern SquidConfig2 Config2;
566
567#endif /* SQUID_SQUIDCONFIG_H_ */
568
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
cache_peer configuration storage
Definition: CachePeers.h:21
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
struct SquidConfig2::@120 onoff
gid_t effectiveGroupID
Definition: SquidConfig.h:562
void clear()
Definition: SquidConfig.h:554
uid_t effectiveUserID
Definition: SquidConfig.h:561
the representation of the configuration. POD.
Definition: SquidConfig.h:79
int cache_miss_revalidate
Definition: SquidConfig.h:319
Ip::Address address
Definition: SquidConfig.h:163
Helper::ChildConfig redirectChildren
Definition: SquidConfig.h:216
struct SquidConfig::@94 Port
int surrogate_is_remote
Definition: SquidConfig.h:313
int64_t limit
Definition: SquidConfig.h:441
char * errHtmlText
Definition: SquidConfig.h:231
time_t negativeDnsTtl
Definition: SquidConfig.h:105
size_t maxRequestBufferSize
Definition: SquidConfig.h:136
Ip::Address udp_outgoing
Definition: SquidConfig.h:236
char * errorStylesheet
Definition: SquidConfig.h:434
time_t request_start_timeout
Definition: SquidConfig.h:125
char * mimeTablePathname
Definition: SquidConfig.h:226
size_t memMaxSize
Definition: SquidConfig.h:91
int nonhierarchical_direct
Definition: SquidConfig.h:299
size_t tcpRcvBufsz
Definition: SquidConfig.h:244
struct SquidConfig::@112 comm_incoming
size_t appendDomainLen
Definition: SquidConfig.h:223
acl_access * adapted_http
Definition: SquidConfig.h:360
Security::KeyLog * tlsKeys
one optional tls_key_log
Definition: SquidConfig.h:190
int64_t readAheadGap
Definition: SquidConfig.h:98
int connect_limit
Definition: SquidConfig.h:543
acl_access * spoof_client_ip
Definition: SquidConfig.h:399
int max_filedescriptors
Definition: SquidConfig.h:517
HeaderWithAclList * request_header_add
request_header_add access list
Definition: SquidConfig.h:465
time_t peer_connect
Definition: SquidConfig.h:117
int errorLogMissingLanguages
Definition: SquidConfig.h:432
HeaderManglers * request_header_access
request_header_access and request_header_replace
Definition: SquidConfig.h:461
int log_uses_indirect_client
Definition: SquidConfig.h:328
acl_access * ASlists
Definition: SquidConfig.h:365
int objectsPerBucket
Definition: SquidConfig.h:264
int acl_uses_indirect_client
Definition: SquidConfig.h:326
sslproxy_cert_adapt * cert_adapt
Definition: SquidConfig.h:511
char * effectiveGroup
Definition: SquidConfig.h:198
time_t siteSelect
Definition: SquidConfig.h:123
int connect_retries
Definition: SquidConfig.h:352
time_t deadPeer
Definition: SquidConfig.h:124
int vary_ignore_expire
Definition: SquidConfig.h:312
int64_t shared_transient_entries_limit
Definition: SquidConfig.h:345
char * ssl_password
Definition: SquidConfig.h:211
wordlist * store_id
Definition: SquidConfig.h:202
struct SquidConfig::@103 fqdncache
struct SquidConfig::@105 Netdb
int delay_pool_uses_indirect_client
Definition: SquidConfig.h:327
char * agentInfo
Definition: SquidConfig.h:156
char * foreignIntermediateCertsPath
Definition: SquidConfig.h:508
Helper::ChildConfig storeIdChildren
Definition: SquidConfig.h:217
CustomLog * accesslogs
Definition: SquidConfig.h:186
void * info
Definition: SquidConfig.h:177
char * errorDirectory
Definition: SquidConfig.h:429
Ip::Address snmp_outgoing
Definition: SquidConfig.h:239
time_msec_t idns_retransmit
Definition: SquidConfig.h:130
Ip::Address_list * router
Definition: SquidConfig.h:170
int error_pconns
Definition: SquidConfig.h:306
int store_id_bypass
Definition: SquidConfig.h:302
acl_access * followXFF
Definition: SquidConfig.h:391
time_t rebuild_period
Definition: SquidConfig.h:478
char * EmailFrom
Definition: SquidConfig.h:194
int server_pconns
Definition: SquidConfig.h:305
struct SquidConfig::@102 ipcache
struct SquidConfig::@95 Snmp
int use_short_names
Definition: SquidConfig.h:427
acl_access * redirector
Definition: SquidConfig.h:377
char * storeId_extras
Definition: SquidConfig.h:534
int64_t avgObjectSize
Definition: SquidConfig.h:265
struct SquidConfig::@111 MemPools
int res_defnames
Definition: SquidConfig.h:279
char * errorDefaultLanguage
Definition: SquidConfig.h:431
HeaderManglers * reply_header_access
reply_header_access and reply_header_replace
Definition: SquidConfig.h:463
struct SquidConfig::@108 Ftp
time_t write
Definition: SquidConfig.h:113
char * anon_user
Definition: SquidConfig.h:413
struct SquidConfig::@107 accessList
acl_access * icp
Definition: SquidConfig.h:361
char * accept_filter
Definition: SquidConfig.h:515
int hostStrictVerify
Definition: SquidConfig.h:337
time_t ftpClientIdle
Definition: SquidConfig.h:121
char * visible_appname_string
Definition: SquidConfig.h:197
int mcast_icp_query
Definition: SquidConfig.h:129
int memory_cache_first
Definition: SquidConfig.h:335
int strip_query_terms
Definition: SquidConfig.h:300
wordlist * loadable_module_names
Definition: SquidConfig.h:522
int client_dst_passthru
Definition: SquidConfig.h:338
ClientDelayConfig ClientDelay
Definition: SquidConfig.h:446
int tproxy_uses_indirect_client
Definition: SquidConfig.h:330
int forward_max_tries
Definition: SquidConfig.h:351
char * etcHostsPath
Definition: SquidConfig.h:227
Notes notes
note
Definition: SquidConfig.h:471
size_t maxReplyHeaderSize
Definition: SquidConfig.h:137
acl_access * reply
Definition: SquidConfig.h:379
acl_access * htcp_clr
Definition: SquidConfig.h:384
time_msec_t idns_query
Definition: SquidConfig.h:131
int reload_into_ims
Definition: SquidConfig.h:293
struct SquidConfig::@106 onoff
int lowWaterMark
Definition: SquidConfig.h:86
acl_access * brokenPosts
Definition: SquidConfig.h:375
char * swap
Definition: SquidConfig.h:185
acl_access * http
Definition: SquidConfig.h:359
struct SquidConfig::@92 quickAbort
int connect_timeout
Definition: SquidConfig.h:545
acl_access * collapsedForwardingAccess
Definition: SquidConfig.h:406
char * unlinkd
Definition: SquidConfig.h:205
time_t request
Definition: SquidConfig.h:118
RemovalPolicySettings * replPolicy
Definition: SquidConfig.h:99
CustomLog * icaplogs
Definition: SquidConfig.h:188
int redirector_bypass
Definition: SquidConfig.h:301
wordlist * redirect
Definition: SquidConfig.h:201
struct SquidConfig::@99 Program
char * store
Definition: SquidConfig.h:184
int unclean_shutdown
Definition: SquidConfig.h:487
int64_t maxRequestBodySize
Definition: SquidConfig.h:135
std::chrono::nanoseconds paranoid_hit_validation
Definition: SquidConfig.h:354
size_t sessionCacheSize
Definition: SquidConfig.h:490
Store::DiskConfig cacheSwap
Definition: SquidConfig.h:423
int emailErrData
Definition: SquidConfig.h:320
RefreshPattern * Refresh
Definition: SquidConfig.h:421
struct SquidConfig::@100 Accel
acl_access * store_id
Definition: SquidConfig.h:378
Ip::Address udp_incoming
Definition: SquidConfig.h:235
Acl::Address * outgoing_address
Definition: SquidConfig.h:380
time_t lifetime
Definition: SquidConfig.h:114
class ACL * aclList
Definition: SquidConfig.h:356
char * appendDomain
Definition: SquidConfig.h:222
int uri_whitespace
Definition: SquidConfig.h:457
int WIN32_IpAddrChangeMonitor
Definition: SquidConfig.h:334
time_t forward
Definition: SquidConfig.h:116
sslproxy_cert_sign * cert_sign
Definition: SquidConfig.h:510
char * coredump_dir
Definition: SquidConfig.h:472
int memory_cache_disk
Definition: SquidConfig.h:336
int test_reachability
Definition: SquidConfig.h:288
time_t negativeTtl
Definition: SquidConfig.h:102
size_t swapout_chunk_size
Definition: SquidConfig.h:480
CpuAffinityMap * cpuAffinityMap
Definition: SquidConfig.h:519
struct SquidConfig::@101 Addrs
size_t high_memory
Definition: SquidConfig.h:498
acl_access * cert_error
Definition: SquidConfig.h:509
YesNoNone shmLocking
shared_memory_locking
Definition: SquidConfig.h:90
time_t read
Definition: SquidConfig.h:112
time_t pconnLifetime
pconn_lifetime in squid.conf
Definition: SquidConfig.h:122
RemovalPolicySettings * memPolicy
Definition: SquidConfig.h:100
time_t urlRewrite
Definition: SquidConfig.h:132
int minDirectRtt
Definition: SquidConfig.h:260
ssize_t packet_max
maximum size EDNS advertised for DNS replies.
Definition: SquidConfig.h:539
struct SquidConfig::@112::@119 udp
Mgr::ActionPasswordList * passwd_list
Definition: SquidConfig.h:261
HeaderWithAclList * reply_header_add
reply_header_add access list
Definition: SquidConfig.h:467
size_t maxInMemObjSize
Definition: SquidConfig.h:268
int forwarding_method
Definition: SquidConfig.h:172
char * surrogate_id
Definition: SquidConfig.h:220
int buffered_logs
Definition: SquidConfig.h:284
char * certSignHash
Definition: SquidConfig.h:491
time_t shutdownLifetime
Definition: SquidConfig.h:107
int prefer_direct
Definition: SquidConfig.h:298
AclDenyInfoList * denyInfoList
Definition: SquidConfig.h:408
int icp_query_max
Definition: SquidConfig.h:127
struct SquidConfig::@114 SSL
struct SquidConfig::@104 Store
CachePeers * peers
Definition: SquidConfig.h:247
int log_mime_hdrs
Definition: SquidConfig.h:286
external_acl * externalAclHelperList
Definition: SquidConfig.h:503
bool logTlsServerHelloDetails
Definition: SquidConfig.h:341
time_t clientIdlePconn
Definition: SquidConfig.h:119
int rebuild_chunk_percentage
Definition: SquidConfig.h:481
time_t maxStale
Definition: SquidConfig.h:104
char * ssl_engine
Definition: SquidConfig.h:488
acl_access * stats_collection
Definition: SquidConfig.h:369
Ip::Address snmp_incoming
Definition: SquidConfig.h:238
int icp_query_min
Definition: SquidConfig.h:128
int digest_generation
Definition: SquidConfig.h:309
size_t maxRequestHeaderSize
Definition: SquidConfig.h:134
int client_pconns
Definition: SquidConfig.h:304
int collapsed_forwarding
Definition: SquidConfig.h:323
char * chroot_dir
Definition: SquidConfig.h:473
acl_access * serverPconnForNonretriable
Definition: SquidConfig.h:405
unsigned short icp
Definition: SquidConfig.h:141
wordlist * mcast_group_list
Definition: SquidConfig.h:246
size_t udpMaxHitObjsz
Definition: SquidConfig.h:245
struct SquidConfig::UrlHelperTimeout onUrlRewriteTimeout
struct SquidConfig::@118 happyEyeballs
int assignment_method
Definition: SquidConfig.h:174
acl_access * ssl_bump
Definition: SquidConfig.h:388
struct SquidConfig::@96 Wccp
size_t list_width
Definition: SquidConfig.h:411
AclSizeLimit * rangeOffsetLimit
Definition: SquidConfig.h:458
int check_hostnames
Definition: SquidConfig.h:316
Ip::Address router
Definition: SquidConfig.h:162
char * configFile
Definition: SquidConfig.h:155
char * netdbFilename
Definition: SquidConfig.h:225
int64_t min
Definition: SquidConfig.h:94
char * as_whois_server
Definition: SquidConfig.h:181
int sleep_after_fork
Definition: SquidConfig.h:501
acl_access * storeMiss
Definition: SquidConfig.h:368
time_t hopelessKidRevivalDelay
hopeless_kid_revival_delay
Definition: SquidConfig.h:109
int max_open_disk_fds
Definition: SquidConfig.h:456
int minDirectHops
Definition: SquidConfig.h:259
struct SquidConfig::@112::@119 tcp
char * visibleHostname
Definition: SquidConfig.h:228
acl_access * htcp
Definition: SquidConfig.h:383
char * adminEmail
Definition: SquidConfig.h:193
time_t rewrite_period
Definition: SquidConfig.h:479
int relaxed_header_parser
Definition: SquidConfig.h:315
time_t connect
Definition: SquidConfig.h:115
struct SquidConfig::@109 icons
struct SquidConfig::@98 Log
char * redirector_extras
Definition: SquidConfig.h:527
time_t positiveDnsTtl
Definition: SquidConfig.h:106
char * uniqueHostname
Definition: SquidConfig.h:229
time_t minimum_expiry_time
Definition: SquidConfig.h:502
int rotateNumber
Definition: SquidConfig.h:191
acl_access * sendHit
Definition: SquidConfig.h:367
acl_access * on_unsupported_protocol
Definition: SquidConfig.h:400
Ip::Address client_netmask
Definition: SquidConfig.h:242
struct SquidConfig::@116 ssl_client
char * EmailProgram
Definition: SquidConfig.h:195
char * pidFilename
Definition: SquidConfig.h:224
acl_access * ftp_epsv
Definition: SquidConfig.h:402
acl_access * snmp
Definition: SquidConfig.h:372
acl_access * noCache
Definition: SquidConfig.h:366
int64_t maxObjectSize
Definition: SquidConfig.h:266
struct SquidConfig::@93 Timeout
time_t serverIdlePconn
Definition: SquidConfig.h:120
int icp_hit_stale
Definition: SquidConfig.h:283
char * store_dir_select_algorithm
Definition: SquidConfig.h:500
int allow_underscore
Definition: SquidConfig.h:317
AclSizeLimit * ReplyBodySize
Definition: SquidConfig.h:138
int highWaterMark
Definition: SquidConfig.h:85
int client_ip_max_connections
Definition: SquidConfig.h:525
char * directory
Definition: SquidConfig.h:426
int pipeline_max_prefetch
Definition: SquidConfig.h:347
struct SquidConfig::@113 digest
int v4_first
Place IPv4 first in the order of DNS results.
Definition: SquidConfig.h:538
int redir_rewrites_host
Definition: SquidConfig.h:297
char * effectiveUser
Definition: SquidConfig.h:196
HttpUpgradeProtocolAccess * http_upgrade_request_protocols
http_upgrade_request_protocols
Definition: SquidConfig.h:469
acl_access * proxyProtocol
acceptable PROXY protocol clients
Definition: SquidConfig.h:395
int64_t max
Definition: SquidConfig.h:96
time_t backgroundPingRate
Definition: SquidConfig.h:108
int detect_broken_server_pconns
Definition: SquidConfig.h:314
int bits_per_entry
Definition: SquidConfig.h:477
time_t period
Definition: SquidConfig.h:274
unsigned short htcp
Definition: SquidConfig.h:144
unsigned short snmp
Definition: SquidConfig.h:148
int return_method
Definition: SquidConfig.h:173
acl_access * miss
Definition: SquidConfig.h:362
int half_closed_clients
Definition: SquidConfig.h:289
DelayConfig Delay
Definition: SquidConfig.h:445
acl_access * NeverDirect
Definition: SquidConfig.h:363
struct SquidConfig::@115 warnings
struct SquidConfig::@91 Swap
int global_internal_static
Definition: SquidConfig.h:322
wordlist * hostnameAliases
Definition: SquidConfig.h:230
YesNoNone memShared
whether the memory cache is shared among workers
Definition: SquidConfig.h:89
SBufList nameservers
Definition: SquidConfig.h:537
char * diskd
Definition: SquidConfig.h:208
struct SquidConfig::@110 retry
struct SquidConfig::@97 Wccp2
Security::ContextPointer sslContext
Definition: SquidConfig.h:506
MessageDelayConfig MessageDelay
Definition: SquidConfig.h:447
int ignore_unknown_nameservers
Definition: SquidConfig.h:303
acl_access * AlwaysDirect
Definition: SquidConfig.h:364
int httpd_suppress_version_string
Definition: SquidConfig.h:321
acl_access * forceRequestBodyContinuation
Definition: SquidConfig.h:404
int64_t minObjectSize
Definition: SquidConfig.h:267
int refresh_all_ims
Definition: SquidConfig.h:290
struct SquidConfig::@112::@119 dns
RefCount< SwapDir > * swapDirs
Definition: SquidConfig.h:68
int n_strands
number of disk processes required to support all cache_dirs
Definition: SquidConfig.h:72
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