2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_SQUIDCONFIG_H_
10 #define SQUID_SQUIDCONFIG_H_
12 #include "acl/forward.h"
13 #include "base/RefCount.h"
14 #include "ClientDelayConfig.h"
15 #include "DelayConfig.h"
16 #include "helper/ChildConfig.h"
17 #include "HttpHeaderTools.h"
18 #include "ip/Address.h"
20 #include "security/forward.h"
21 #include "SquidTime.h"
23 #include "ssl/support.h"
25 #include "store/forward.h"
26 #include "YesNoNone.h"
29 class sslproxy_cert_sign
;
30 class sslproxy_cert_adapt
;
35 class ActionPasswordList
;
43 class RemovalPolicySettings
;
53 RefCount
<SwapDir
> *swapDirs
;
56 /// number of disk processes required to support all cache_dirs
59 #define INDEXSD(i) (Config.cacheSwap.swapDirs[i].getRaw())
62 /// the representation of the configuration. POD.
67 /* These should be for the Store::Root instance.
68 * this needs pluggable parsing to be done smoothly.
74 YesNoNone memShared
; ///< whether the memory cache is shared among workers
83 RemovalPolicySettings
*replPolicy
;
84 RemovalPolicySettings
*memPolicy
;
85 #if USE_HTTP_VIOLATIONS
89 time_t negativeDnsTtl
;
90 time_t positiveDnsTtl
;
91 time_t shutdownLifetime
;
92 time_t backgroundPingRate
;
102 time_t clientIdlePconn
;
103 time_t serverIdlePconn
;
104 time_t ftpClientIdle
;
105 time_t pconnLifetime
; ///< pconn_lifetime in squid.conf
108 time_t request_start_timeout
;
109 int icp_query
; /* msec */
110 int icp_query_max
; /* msec */
111 int icp_query_min
; /* msec */
112 int mcast_icp_query
; /* msec */
113 time_msec_t idns_retransmit
;
114 time_msec_t idns_query
;
117 size_t maxRequestHeaderSize
;
118 int64_t maxRequestBodySize
;
119 size_t maxRequestBufferSize
;
120 size_t maxReplyHeaderSize
;
121 AclSizeLimit
*ReplyBodySize
;
153 Ip::Address_list
*router
;
155 int forwarding_method
;
157 int assignment_method
;
164 char *as_whois_server
;
169 CustomLog
*accesslogs
;
179 char *visible_appname_string
;
180 char *effectiveGroup
;
198 Helper::ChildConfig redirectChildren
;
199 Helper::ChildConfig storeIdChildren
;
200 time_t authenticateGCInterval
;
201 time_t authenticateTTL
;
202 time_t authenticateIpTTL
;
208 size_t appendDomainLen
;
211 char *mimeTablePathname
;
213 char *visibleHostname
;
214 char *uniqueHostname
;
215 wordlist
*hostnameAliases
;
227 Ip::Address udp_incoming
;
228 Ip::Address udp_outgoing
;
230 Ip::Address snmp_incoming
;
231 Ip::Address snmp_outgoing
;
233 /* FIXME INET6 : this should really be a CIDR value */
234 Ip::Address client_netmask
;
237 size_t udpMaxHitObjsz
;
238 wordlist
*mcast_group_list
;
239 wordlist
*dns_nameservers
;
254 Mgr::ActionPasswordList
*passwd_list
;
257 int objectsPerBucket
;
258 int64_t avgObjectSize
;
259 int64_t maxObjectSize
;
260 int64_t minObjectSize
;
261 size_t maxInMemObjSize
;
283 int test_reachability
;
284 int half_closed_clients
;
286 #if USE_HTTP_VIOLATIONS
292 int redir_rewrites_host
;
294 int nonhierarchical_direct
;
295 int strip_query_terms
;
296 int redirector_bypass
;
298 int ignore_unknown_nameservers
;
302 #if USE_CACHE_DIGESTS
304 int digest_generation
;
308 int vary_ignore_expire
;
309 int surrogate_is_remote
;
310 int request_entities
;
311 int detect_broken_server_pconns
;
312 int balance_on_multiple_ip
;
313 int relaxed_header_parser
;
315 int allow_underscore
;
317 int cache_miss_revalidate
;
319 int httpd_suppress_version_string
;
320 int global_internal_static
;
321 int collapsed_forwarding
;
323 #if FOLLOW_X_FORWARDED_FOR
324 int acl_uses_indirect_client
;
325 int delay_pool_uses_indirect_client
;
326 int log_uses_indirect_client
;
328 int tproxy_uses_indirect_client
;
330 #endif /* FOLLOW_X_FORWARDED_FOR */
332 int WIN32_IpAddrChangeMonitor
;
333 int memory_cache_first
;
334 int memory_cache_disk
;
335 int hostStrictVerify
;
336 int client_dst_passthru
;
339 bool logTlsServerHelloDetails
;
343 int pipeline_max_prefetch
;
345 int forward_max_tries
;
352 acl_access
*adapted_http
;
355 acl_access
*NeverDirect
;
356 acl_access
*AlwaysDirect
;
360 acl_access
*storeMiss
;
361 acl_access
*stats_collection
;
366 #if USE_HTTP_VIOLATIONS
367 acl_access
*brokenPosts
;
369 acl_access
*redirector
;
370 acl_access
*store_id
;
372 Acl::Address
*outgoing_address
;
376 acl_access
*htcp_clr
;
380 acl_access
*ssl_bump
;
382 #if FOLLOW_X_FORWARDED_FOR
383 acl_access
*followXFF
;
384 #endif /* FOLLOW_X_FORWARDED_FOR */
386 /// acceptible PROXY protocol clients
387 acl_access
*proxyProtocol
;
389 /// spoof_client_ip squid.conf acl.
390 /// nil unless configured
391 acl_access
* spoof_client_ip
;
392 acl_access
*on_unsupported_protocol
;
394 acl_access
*ftp_epsv
;
396 acl_access
*forceRequestBodyContinuation
;
398 AclDenyInfoList
*denyInfoList
;
411 RefreshPattern
*Refresh
;
413 Store::DiskConfig cacheSwap
;
419 char *errorDirectory
;
421 char *errorDefaultLanguage
;
422 int errorLogMissingLanguages
;
424 char *errorStylesheet
;
436 ClientDelayConfig ClientDelay
;
445 int max_open_disk_fds
;
447 AclSizeLimit
*rangeOffsetLimit
;
448 #if MULTICAST_MISS_STREAM
459 /// request_header_access and request_header_replace
460 HeaderManglers
*request_header_access
;
461 /// reply_header_access and reply_header_replace
462 HeaderManglers
*reply_header_access
;
463 ///request_header_add access list
464 HeaderWithAclList
*request_header_add
;
469 #if USE_CACHE_DIGESTS
473 time_t rebuild_period
;
474 time_t rewrite_period
;
475 size_t swapout_chunk_size
;
476 int rebuild_chunk_percentage
;
482 int unclean_shutdown
;
485 size_t sessionCacheSize
;
490 wordlist
*ext_methods
;
497 char *store_dir_select_algorithm
;
498 int sleep_after_fork
; /* microseconds */
499 time_t minimum_expiry_time
; /* seconds */
500 external_acl
*externalAclHelperList
;
503 Security::ContextPtr sslContext
;
505 char *foreignIntermediateCertsPath
;
506 acl_access
*cert_error
;
507 sslproxy_cert_sign
*cert_sign
;
508 sslproxy_cert_adapt
*cert_adapt
;
514 int max_filedescriptors
;
516 CpuAffinityMap
*cpuAffinityMap
;
518 #if USE_LOADABLE_MODULES
519 wordlist
*loadable_module_names
;
522 int client_ip_max_connections
;
524 char *redirector_extras
;
526 struct UrlHelperTimeout
{
529 } onUrlRewriteTimeout
;
531 char *storeId_extras
;
534 int v4_first
; ///< Place IPv4 first in the order of DNS results.
535 ssize_t packet_max
; ///< maximum size EDNS advertised for DNS replies.
540 extern SquidConfig Config
;
547 int mangle_request_headers
;
549 uid_t effectiveUserID
;
550 gid_t effectiveGroupID
;
553 extern SquidConfig2 Config2
;
555 #endif /* SQUID_SQUIDCONFIG_H_ */