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 "SquidTime.h"
22 #include "YesNoNone.h"
25 class sslproxy_cert_sign
;
26 class sslproxy_cert_adapt
;
31 class ActionPasswordList
;
39 class RemovalPolicySettings
;
47 /// the representation of the configuration. POD.
52 /* These should be for the Store::Root instance.
53 * this needs pluggable parsing to be done smoothly.
59 YesNoNone memShared
; ///< whether the memory cache is shared among workers
68 RemovalPolicySettings
*replPolicy
;
69 RemovalPolicySettings
*memPolicy
;
70 #if USE_HTTP_VIOLATIONS
74 time_t negativeDnsTtl
;
75 time_t positiveDnsTtl
;
76 time_t shutdownLifetime
;
77 time_t backgroundPingRate
;
87 time_t clientIdlePconn
;
88 time_t serverIdlePconn
;
90 time_t pconnLifetime
; ///< pconn_lifetime in squid.conf
93 time_t request_start_timeout
;
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 size_t maxRequestBufferSize
;
105 size_t maxReplyHeaderSize
;
106 AclSizeLimit
*ReplyBodySize
;
138 Ip::Address_list
*router
;
140 int forwarding_method
;
142 int assignment_method
;
149 char *as_whois_server
;
154 CustomLog
*accesslogs
;
164 char *visible_appname_string
;
165 char *effectiveGroup
;
183 Helper::ChildConfig redirectChildren
;
184 Helper::ChildConfig storeIdChildren
;
185 time_t authenticateGCInterval
;
186 time_t authenticateTTL
;
187 time_t authenticateIpTTL
;
193 size_t appendDomainLen
;
196 char *mimeTablePathname
;
198 char *visibleHostname
;
199 char *uniqueHostname
;
200 wordlist
*hostnameAliases
;
212 Ip::Address udp_incoming
;
213 Ip::Address udp_outgoing
;
215 Ip::Address snmp_incoming
;
216 Ip::Address snmp_outgoing
;
218 /* FIXME INET6 : this should really be a CIDR value */
219 Ip::Address client_netmask
;
222 size_t udpMaxHitObjsz
;
223 wordlist
*mcast_group_list
;
224 wordlist
*dns_nameservers
;
239 Mgr::ActionPasswordList
*passwd_list
;
242 int objectsPerBucket
;
243 int64_t avgObjectSize
;
244 int64_t maxObjectSize
;
245 int64_t minObjectSize
;
246 size_t maxInMemObjSize
;
268 int test_reachability
;
269 int half_closed_clients
;
271 #if USE_HTTP_VIOLATIONS
277 int redir_rewrites_host
;
279 int nonhierarchical_direct
;
280 int strip_query_terms
;
281 int redirector_bypass
;
283 int ignore_unknown_nameservers
;
287 #if USE_CACHE_DIGESTS
289 int digest_generation
;
293 int vary_ignore_expire
;
294 int surrogate_is_remote
;
295 int request_entities
;
296 int detect_broken_server_pconns
;
297 int balance_on_multiple_ip
;
298 int relaxed_header_parser
;
300 int allow_underscore
;
302 int cache_miss_revalidate
;
304 int httpd_suppress_version_string
;
305 int global_internal_static
;
306 int collapsed_forwarding
;
308 #if FOLLOW_X_FORWARDED_FOR
309 int acl_uses_indirect_client
;
310 int delay_pool_uses_indirect_client
;
311 int log_uses_indirect_client
;
313 int tproxy_uses_indirect_client
;
315 #endif /* FOLLOW_X_FORWARDED_FOR */
317 int WIN32_IpAddrChangeMonitor
;
318 int memory_cache_first
;
319 int memory_cache_disk
;
320 int hostStrictVerify
;
321 int client_dst_passthru
;
325 int pipeline_max_prefetch
;
327 int forward_max_tries
;
334 acl_access
*adapted_http
;
337 acl_access
*NeverDirect
;
338 acl_access
*AlwaysDirect
;
342 acl_access
*storeMiss
;
343 acl_access
*stats_collection
;
348 #if USE_HTTP_VIOLATIONS
349 acl_access
*brokenPosts
;
351 acl_access
*redirector
;
352 acl_access
*store_id
;
354 Acl::Address
*outgoing_address
;
358 acl_access
*htcp_clr
;
362 acl_access
*ssl_bump
;
364 #if FOLLOW_X_FORWARDED_FOR
365 acl_access
*followXFF
;
366 #endif /* FOLLOW_X_FORWARDED_FOR */
368 /// acceptible PROXY protocol clients
369 acl_access
*proxyProtocol
;
371 /// spoof_client_ip squid.conf acl.
372 /// nil unless configured
373 acl_access
* spoof_client_ip
;
374 acl_access
*on_unsupported_protocol
;
376 acl_access
*ftp_epsv
;
378 acl_access
*forceRequestBodyContinuation
;
380 AclDenyInfoList
*denyInfoList
;
393 RefreshPattern
*Refresh
;
396 RefCount
<SwapDir
> *swapDirs
;
399 /// number of disk processes required to support all cache_dirs
403 * I'm sick of having to keep doing this ..
405 #define INDEXSD(i) (Config.cacheSwap.swapDirs[(i)].getRaw())
411 char *errorDirectory
;
413 char *errorDefaultLanguage
;
414 int errorLogMissingLanguages
;
416 char *errorStylesheet
;
428 ClientDelayConfig ClientDelay
;
437 int max_open_disk_fds
;
439 AclSizeLimit
*rangeOffsetLimit
;
440 #if MULTICAST_MISS_STREAM
451 /// request_header_access and request_header_replace
452 HeaderManglers
*request_header_access
;
453 /// reply_header_access and reply_header_replace
454 HeaderManglers
*reply_header_access
;
455 ///request_header_add access list
456 HeaderWithAclList
*request_header_add
;
461 #if USE_CACHE_DIGESTS
465 time_t rebuild_period
;
466 time_t rewrite_period
;
467 size_t swapout_chunk_size
;
468 int rebuild_chunk_percentage
;
474 int unclean_shutdown
;
477 size_t sessionCacheSize
;
482 wordlist
*ext_methods
;
489 char *store_dir_select_algorithm
;
490 int sleep_after_fork
; /* microseconds */
491 time_t minimum_expiry_time
; /* seconds */
492 external_acl
*externalAclHelperList
;
495 Security::ContextPointer sslContext
;
497 acl_access
*cert_error
;
498 sslproxy_cert_sign
*cert_sign
;
499 sslproxy_cert_adapt
*cert_adapt
;
505 int max_filedescriptors
;
507 CpuAffinityMap
*cpuAffinityMap
;
509 #if USE_LOADABLE_MODULES
510 wordlist
*loadable_module_names
;
513 int client_ip_max_connections
;
515 char *redirector_extras
;
517 struct UrlHelperTimeout
{
520 } onUrlRewriteTimeout
;
522 char *storeId_extras
;
525 int v4_first
; ///< Place IPv4 first in the order of DNS results.
526 ssize_t packet_max
; ///< maximum size EDNS advertised for DNS replies.
531 extern SquidConfig Config
;
538 int mangle_request_headers
;
540 uid_t effectiveUserID
;
541 gid_t effectiveGroupID
;
544 extern SquidConfig2 Config2
;
546 #endif /* SQUID_SQUIDCONFIG_H_ */