2 * Copyright (C) 1996-2014 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 "icmp/IcmpConfig.h"
19 #include "ip/Address.h"
21 #include "YesNoNone.h"
24 #if HAVE_OPENSSL_SSL_H
25 #include <openssl/ssl.h>
28 class sslproxy_cert_sign
;
29 class sslproxy_cert_adapt
;
34 class ActionPasswordList
;
41 class RemovalPolicySettings
;
49 /// the representation of the configuration. POD.
54 /* These should be for the Store::Root instance.
55 * this needs pluggable parsing to be done smoothly.
61 YesNoNone memShared
; ///< whether the memory cache is shared among workers
70 RemovalPolicySettings
*replPolicy
;
71 RemovalPolicySettings
*memPolicy
;
72 #if USE_HTTP_VIOLATIONS
76 time_t negativeDnsTtl
;
77 time_t positiveDnsTtl
;
78 time_t shutdownLifetime
;
79 time_t backgroundPingRate
;
89 time_t clientIdlePconn
;
90 time_t serverIdlePconn
;
94 int icp_query
; /* msec */
95 int icp_query_max
; /* msec */
96 int icp_query_min
; /* msec */
97 int mcast_icp_query
; /* msec */
98 time_msec_t idns_retransmit
;
99 time_msec_t idns_query
;
102 size_t maxRequestHeaderSize
;
103 int64_t maxRequestBodySize
;
104 int64_t maxChunkedRequestBodySize
;
105 size_t maxRequestBufferSize
;
106 size_t maxReplyHeaderSize
;
107 AclSizeLimit
*ReplyBodySize
;
139 Ip::Address_list
*router
;
141 int forwarding_method
;
143 int assignment_method
;
154 char *as_whois_server
;
159 CustomLog
*accesslogs
;
169 char *visible_appname_string
;
170 char *effectiveGroup
;
188 Helper::ChildConfig redirectChildren
;
189 Helper::ChildConfig storeIdChildren
;
190 time_t authenticateGCInterval
;
191 time_t authenticateTTL
;
192 time_t authenticateIpTTL
;
198 size_t appendDomainLen
;
201 char *mimeTablePathname
;
203 char *visibleHostname
;
204 char *uniqueHostname
;
205 wordlist
*hostnameAliases
;
217 Ip::Address udp_incoming
;
218 Ip::Address udp_outgoing
;
220 Ip::Address snmp_incoming
;
221 Ip::Address snmp_outgoing
;
223 /* FIXME INET6 : this should really be a CIDR value */
224 Ip::Address client_netmask
;
227 size_t udpMaxHitObjsz
;
228 wordlist
*mcast_group_list
;
229 wordlist
*dns_nameservers
;
244 Mgr::ActionPasswordList
*passwd_list
;
247 int objectsPerBucket
;
248 int64_t avgObjectSize
;
249 int64_t maxObjectSize
;
250 int64_t minObjectSize
;
251 size_t maxInMemObjSize
;
273 int test_reachability
;
274 int half_closed_clients
;
276 #if USE_HTTP_VIOLATIONS
282 int redir_rewrites_host
;
284 int nonhierarchical_direct
;
285 int strip_query_terms
;
286 int redirector_bypass
;
288 int ignore_unknown_nameservers
;
292 #if USE_CACHE_DIGESTS
294 int digest_generation
;
298 int vary_ignore_expire
;
299 int surrogate_is_remote
;
300 int request_entities
;
301 int detect_broken_server_pconns
;
302 int balance_on_multiple_ip
;
303 int relaxed_header_parser
;
305 int allow_underscore
;
307 int cache_miss_revalidate
;
309 int httpd_suppress_version_string
;
310 int global_internal_static
;
311 int collapsed_forwarding
;
313 #if FOLLOW_X_FORWARDED_FOR
314 int acl_uses_indirect_client
;
315 int delay_pool_uses_indirect_client
;
316 int log_uses_indirect_client
;
318 int tproxy_uses_indirect_client
;
320 #endif /* FOLLOW_X_FORWARDED_FOR */
322 int WIN32_IpAddrChangeMonitor
;
323 int memory_cache_first
;
324 int memory_cache_disk
;
325 int hostStrictVerify
;
326 int client_dst_passthru
;
330 int pipeline_max_prefetch
;
332 int forward_max_tries
;
339 acl_access
*adapted_http
;
342 acl_access
*NeverDirect
;
343 acl_access
*AlwaysDirect
;
347 acl_access
*storeMiss
;
348 acl_access
*stats_collection
;
353 #if USE_HTTP_VIOLATIONS
354 acl_access
*brokenPosts
;
356 acl_access
*redirector
;
357 acl_access
*store_id
;
359 AclAddress
*outgoing_address
;
363 acl_access
*htcp_clr
;
367 acl_access
*ssl_bump
;
369 #if FOLLOW_X_FORWARDED_FOR
370 acl_access
*followXFF
;
371 #endif /* FOLLOW_X_FORWARDED_FOR */
373 /// acceptible PROXY protocol clients
374 acl_access
*proxyProtocol
;
376 /// spoof_client_ip squid.conf acl.
377 /// nil unless configured
378 acl_access
* spoof_client_ip
;
380 acl_access
*ftp_epsv
;
382 acl_access
*forceRequestBodyContinuation
;
384 AclDenyInfoList
*denyInfoList
;
397 RefreshPattern
*Refresh
;
400 RefCount
<SwapDir
> *swapDirs
;
403 /// number of disk processes required to support all cache_dirs
407 * I'm sick of having to keep doing this ..
409 #define INDEXSD(i) (Config.cacheSwap.swapDirs[(i)].getRaw())
415 char *errorDirectory
;
417 char *errorDefaultLanguage
;
418 int errorLogMissingLanguages
;
420 char *errorStylesheet
;
432 ClientDelayConfig ClientDelay
;
441 int max_open_disk_fds
;
443 AclSizeLimit
*rangeOffsetLimit
;
444 #if MULTICAST_MISS_STREAM
455 /// request_header_access and request_header_replace
456 HeaderManglers
*request_header_access
;
457 /// reply_header_access and reply_header_replace
458 HeaderManglers
*reply_header_access
;
459 ///request_header_add access list
460 HeaderWithAclList
*request_header_add
;
465 #if USE_CACHE_DIGESTS
469 time_t rebuild_period
;
470 time_t rewrite_period
;
471 size_t swapout_chunk_size
;
472 int rebuild_chunk_percentage
;
478 int unclean_shutdown
;
481 size_t sessionCacheSize
;
486 wordlist
*ext_methods
;
493 char *store_dir_select_algorithm
;
494 int sleep_after_fork
; /* microseconds */
495 time_t minimum_expiry_time
; /* seconds */
496 external_acl
*externalAclHelperList
;
510 acl_access
*cert_error
;
512 sslproxy_cert_sign
*cert_sign
;
513 sslproxy_cert_adapt
*cert_adapt
;
519 int max_filedescriptors
;
521 CpuAffinityMap
*cpuAffinityMap
;
523 #if USE_LOADABLE_MODULES
524 wordlist
*loadable_module_names
;
527 int client_ip_max_connections
;
529 char *redirector_extras
;
534 } onUrlRewriteTimeout
;
536 char *storeId_extras
;
539 int v4_first
; ///< Place IPv4 first in the order of DNS results.
540 ssize_t packet_max
; ///< maximum size EDNS advertised for DNS replies.
545 extern SquidConfig Config
;
552 int mangle_request_headers
;
554 uid_t effectiveUserID
;
555 gid_t effectiveGroupID
;
558 extern SquidConfig2 Config2
;
560 #endif /* SQUID_SQUIDCONFIG_H_ */