2 * Copyright (C) 1996-2015 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 "YesNoNone.h"
24 class sslproxy_cert_sign
;
25 class sslproxy_cert_adapt
;
30 class ActionPasswordList
;
37 class RemovalPolicySettings
;
45 /// the representation of the configuration. POD.
50 /* These should be for the Store::Root instance.
51 * this needs pluggable parsing to be done smoothly.
57 YesNoNone memShared
; ///< whether the memory cache is shared among workers
66 RemovalPolicySettings
*replPolicy
;
67 RemovalPolicySettings
*memPolicy
;
68 #if USE_HTTP_VIOLATIONS
72 time_t negativeDnsTtl
;
73 time_t positiveDnsTtl
;
74 time_t shutdownLifetime
;
75 time_t backgroundPingRate
;
85 time_t clientIdlePconn
;
86 time_t serverIdlePconn
;
88 time_t pconnLifetime
; ///< pconn_lifetime in squid.conf
91 time_t request_start_timeout
;
92 int icp_query
; /* msec */
93 int icp_query_max
; /* msec */
94 int icp_query_min
; /* msec */
95 int mcast_icp_query
; /* msec */
96 time_msec_t idns_retransmit
;
97 time_msec_t idns_query
;
100 size_t maxRequestHeaderSize
;
101 int64_t maxRequestBodySize
;
102 size_t maxRequestBufferSize
;
103 size_t maxReplyHeaderSize
;
104 AclSizeLimit
*ReplyBodySize
;
136 Ip::Address_list
*router
;
138 int forwarding_method
;
140 int assignment_method
;
147 char *as_whois_server
;
152 CustomLog
*accesslogs
;
162 char *visible_appname_string
;
163 char *effectiveGroup
;
181 Helper::ChildConfig redirectChildren
;
182 Helper::ChildConfig storeIdChildren
;
183 time_t authenticateGCInterval
;
184 time_t authenticateTTL
;
185 time_t authenticateIpTTL
;
191 size_t appendDomainLen
;
194 char *mimeTablePathname
;
196 char *visibleHostname
;
197 char *uniqueHostname
;
198 wordlist
*hostnameAliases
;
210 Ip::Address udp_incoming
;
211 Ip::Address udp_outgoing
;
213 Ip::Address snmp_incoming
;
214 Ip::Address snmp_outgoing
;
216 /* FIXME INET6 : this should really be a CIDR value */
217 Ip::Address client_netmask
;
220 size_t udpMaxHitObjsz
;
221 wordlist
*mcast_group_list
;
222 wordlist
*dns_nameservers
;
237 Mgr::ActionPasswordList
*passwd_list
;
240 int objectsPerBucket
;
241 int64_t avgObjectSize
;
242 int64_t maxObjectSize
;
243 int64_t minObjectSize
;
244 size_t maxInMemObjSize
;
266 int test_reachability
;
267 int half_closed_clients
;
269 #if USE_HTTP_VIOLATIONS
275 int redir_rewrites_host
;
277 int nonhierarchical_direct
;
278 int strip_query_terms
;
279 int redirector_bypass
;
281 int ignore_unknown_nameservers
;
285 #if USE_CACHE_DIGESTS
287 int digest_generation
;
291 int vary_ignore_expire
;
292 int surrogate_is_remote
;
293 int request_entities
;
294 int detect_broken_server_pconns
;
295 int balance_on_multiple_ip
;
296 int relaxed_header_parser
;
298 int allow_underscore
;
300 int cache_miss_revalidate
;
302 int httpd_suppress_version_string
;
303 int global_internal_static
;
304 int collapsed_forwarding
;
306 #if FOLLOW_X_FORWARDED_FOR
307 int acl_uses_indirect_client
;
308 int delay_pool_uses_indirect_client
;
309 int log_uses_indirect_client
;
311 int tproxy_uses_indirect_client
;
313 #endif /* FOLLOW_X_FORWARDED_FOR */
315 int WIN32_IpAddrChangeMonitor
;
316 int memory_cache_first
;
317 int memory_cache_disk
;
318 int hostStrictVerify
;
319 int client_dst_passthru
;
323 int pipeline_max_prefetch
;
325 int forward_max_tries
;
332 acl_access
*adapted_http
;
335 acl_access
*NeverDirect
;
336 acl_access
*AlwaysDirect
;
340 acl_access
*storeMiss
;
341 acl_access
*stats_collection
;
346 #if USE_HTTP_VIOLATIONS
347 acl_access
*brokenPosts
;
349 acl_access
*redirector
;
350 acl_access
*store_id
;
352 Acl::Address
*outgoing_address
;
356 acl_access
*htcp_clr
;
360 acl_access
*ssl_bump
;
362 #if FOLLOW_X_FORWARDED_FOR
363 acl_access
*followXFF
;
364 #endif /* FOLLOW_X_FORWARDED_FOR */
366 /// acceptible PROXY protocol clients
367 acl_access
*proxyProtocol
;
369 /// spoof_client_ip squid.conf acl.
370 /// nil unless configured
371 acl_access
* spoof_client_ip
;
372 acl_access
*on_unsupported_protocol
;
374 acl_access
*ftp_epsv
;
376 acl_access
*forceRequestBodyContinuation
;
378 AclDenyInfoList
*denyInfoList
;
391 RefreshPattern
*Refresh
;
394 RefCount
<SwapDir
> *swapDirs
;
397 /// number of disk processes required to support all cache_dirs
401 * I'm sick of having to keep doing this ..
403 #define INDEXSD(i) (Config.cacheSwap.swapDirs[(i)].getRaw())
409 char *errorDirectory
;
411 char *errorDefaultLanguage
;
412 int errorLogMissingLanguages
;
414 char *errorStylesheet
;
426 ClientDelayConfig ClientDelay
;
435 int max_open_disk_fds
;
437 AclSizeLimit
*rangeOffsetLimit
;
438 #if MULTICAST_MISS_STREAM
449 /// request_header_access and request_header_replace
450 HeaderManglers
*request_header_access
;
451 /// reply_header_access and reply_header_replace
452 HeaderManglers
*reply_header_access
;
453 ///request_header_add access list
454 HeaderWithAclList
*request_header_add
;
459 #if USE_CACHE_DIGESTS
463 time_t rebuild_period
;
464 time_t rewrite_period
;
465 size_t swapout_chunk_size
;
466 int rebuild_chunk_percentage
;
472 int unclean_shutdown
;
475 size_t sessionCacheSize
;
480 wordlist
*ext_methods
;
487 char *store_dir_select_algorithm
;
488 int sleep_after_fork
; /* microseconds */
489 time_t minimum_expiry_time
; /* seconds */
490 external_acl
*externalAclHelperList
;
493 Security::ContextPointer sslContext
;
495 acl_access
*cert_error
;
496 sslproxy_cert_sign
*cert_sign
;
497 sslproxy_cert_adapt
*cert_adapt
;
503 int max_filedescriptors
;
505 CpuAffinityMap
*cpuAffinityMap
;
507 #if USE_LOADABLE_MODULES
508 wordlist
*loadable_module_names
;
511 int client_ip_max_connections
;
513 char *redirector_extras
;
515 struct UrlHelperTimeout
{
518 } onUrlRewriteTimeout
;
520 char *storeId_extras
;
523 int v4_first
; ///< Place IPv4 first in the order of DNS results.
524 ssize_t packet_max
; ///< maximum size EDNS advertised for DNS replies.
529 extern SquidConfig Config
;
536 int mangle_request_headers
;
538 uid_t effectiveUserID
;
539 gid_t effectiveGroupID
;
542 extern SquidConfig2 Config2
;
544 #endif /* SQUID_SQUIDCONFIG_H_ */