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
;
101 size_t maxRequestHeaderSize
;
102 int64_t maxRequestBodySize
;
103 int64_t maxChunkedRequestBodySize
;
104 size_t maxRequestBufferSize
;
105 size_t maxReplyHeaderSize
;
106 AclSizeLimit
*ReplyBodySize
;
138 Ip::Address_list
*router
;
140 int forwarding_method
;
142 int assignment_method
;
153 char *as_whois_server
;
158 CustomLog
*accesslogs
;
168 char *visible_appname_string
;
169 char *effectiveGroup
;
187 Helper::ChildConfig redirectChildren
;
188 Helper::ChildConfig storeIdChildren
;
189 time_t authenticateGCInterval
;
190 time_t authenticateTTL
;
191 time_t authenticateIpTTL
;
197 size_t appendDomainLen
;
200 char *mimeTablePathname
;
202 char *visibleHostname
;
203 char *uniqueHostname
;
204 wordlist
*hostnameAliases
;
216 Ip::Address udp_incoming
;
217 Ip::Address udp_outgoing
;
219 Ip::Address snmp_incoming
;
220 Ip::Address snmp_outgoing
;
222 /* FIXME INET6 : this should really be a CIDR value */
223 Ip::Address client_netmask
;
226 size_t udpMaxHitObjsz
;
227 wordlist
*mcast_group_list
;
228 wordlist
*dns_nameservers
;
243 Mgr::ActionPasswordList
*passwd_list
;
246 int objectsPerBucket
;
247 int64_t avgObjectSize
;
248 int64_t maxObjectSize
;
249 int64_t minObjectSize
;
250 size_t maxInMemObjSize
;
272 int test_reachability
;
273 int half_closed_clients
;
275 #if USE_HTTP_VIOLATIONS
281 int redir_rewrites_host
;
283 int nonhierarchical_direct
;
284 int strip_query_terms
;
285 int redirector_bypass
;
287 int ignore_unknown_nameservers
;
291 #if USE_CACHE_DIGESTS
293 int digest_generation
;
297 int vary_ignore_expire
;
298 int surrogate_is_remote
;
299 int request_entities
;
300 int detect_broken_server_pconns
;
301 int balance_on_multiple_ip
;
302 int relaxed_header_parser
;
304 int allow_underscore
;
306 int cache_miss_revalidate
;
308 int httpd_suppress_version_string
;
309 int global_internal_static
;
310 int collapsed_forwarding
;
312 #if FOLLOW_X_FORWARDED_FOR
313 int acl_uses_indirect_client
;
314 int delay_pool_uses_indirect_client
;
315 int log_uses_indirect_client
;
317 int tproxy_uses_indirect_client
;
319 #endif /* FOLLOW_X_FORWARDED_FOR */
321 int WIN32_IpAddrChangeMonitor
;
322 int memory_cache_first
;
323 int memory_cache_disk
;
324 int hostStrictVerify
;
325 int client_dst_passthru
;
329 int pipeline_max_prefetch
;
331 int forward_max_tries
;
338 acl_access
*adapted_http
;
341 acl_access
*NeverDirect
;
342 acl_access
*AlwaysDirect
;
346 acl_access
*storeMiss
;
347 acl_access
*stats_collection
;
352 #if USE_HTTP_VIOLATIONS
353 acl_access
*brokenPosts
;
355 acl_access
*redirector
;
356 acl_access
*store_id
;
358 AclAddress
*outgoing_address
;
362 acl_access
*htcp_clr
;
366 acl_access
*ssl_bump
;
368 #if FOLLOW_X_FORWARDED_FOR
369 acl_access
*followXFF
;
370 #endif /* FOLLOW_X_FORWARDED_FOR */
372 /// acceptible PROXY protocol clients
373 acl_access
*proxyProtocol
;
375 /// spoof_client_ip squid.conf acl.
376 /// nil unless configured
377 acl_access
* spoof_client_ip
;
379 acl_access
*ftp_epsv
;
381 AclDenyInfoList
*denyInfoList
;
394 RefreshPattern
*Refresh
;
397 RefCount
<SwapDir
> *swapDirs
;
400 /// number of disk processes required to support all cache_dirs
404 * I'm sick of having to keep doing this ..
406 #define INDEXSD(i) (Config.cacheSwap.swapDirs[(i)].getRaw())
412 char *errorDirectory
;
414 char *errorDefaultLanguage
;
415 int errorLogMissingLanguages
;
417 char *errorStylesheet
;
429 ClientDelayConfig ClientDelay
;
438 int max_open_disk_fds
;
440 AclSizeLimit
*rangeOffsetLimit
;
441 #if MULTICAST_MISS_STREAM
452 /// request_header_access and request_header_replace
453 HeaderManglers
*request_header_access
;
454 /// reply_header_access and reply_header_replace
455 HeaderManglers
*reply_header_access
;
456 ///request_header_add access list
457 HeaderWithAclList
*request_header_add
;
462 #if USE_CACHE_DIGESTS
466 time_t rebuild_period
;
467 time_t rewrite_period
;
468 size_t swapout_chunk_size
;
469 int rebuild_chunk_percentage
;
475 int unclean_shutdown
;
478 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
;
506 acl_access
*cert_error
;
508 sslproxy_cert_sign
*cert_sign
;
509 sslproxy_cert_adapt
*cert_adapt
;
515 int max_filedescriptors
;
517 CpuAffinityMap
*cpuAffinityMap
;
519 #if USE_LOADABLE_MODULES
520 wordlist
*loadable_module_names
;
523 int client_ip_max_connections
;
525 char *redirector_extras
;
527 char *storeId_extras
;
530 int v4_first
; ///< Place IPv4 first in the order of DNS results.
531 ssize_t packet_max
; ///< maximum size EDNS advertised for DNS replies.
536 extern SquidConfig Config
;
543 int mangle_request_headers
;
545 uid_t effectiveUserID
;
546 gid_t effectiveGroupID
;
549 extern SquidConfig2 Config2
;
551 #endif /* SQUID_SQUIDCONFIG_H_ */