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 "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
;
92 time_t pconnLifetime
; ///< pconn_lifetime in squid.conf
95 time_t request_start_timeout
;
96 int icp_query
; /* msec */
97 int icp_query_max
; /* msec */
98 int icp_query_min
; /* msec */
99 int mcast_icp_query
; /* msec */
100 time_msec_t idns_retransmit
;
101 time_msec_t idns_query
;
104 size_t maxRequestHeaderSize
;
105 int64_t maxRequestBodySize
;
106 size_t maxRequestBufferSize
;
107 size_t maxReplyHeaderSize
;
108 AclSizeLimit
*ReplyBodySize
;
140 Ip::Address_list
*router
;
142 int forwarding_method
;
144 int assignment_method
;
155 char *as_whois_server
;
160 CustomLog
*accesslogs
;
170 char *visible_appname_string
;
171 char *effectiveGroup
;
189 Helper::ChildConfig redirectChildren
;
190 Helper::ChildConfig storeIdChildren
;
191 time_t authenticateGCInterval
;
192 time_t authenticateTTL
;
193 time_t authenticateIpTTL
;
199 size_t appendDomainLen
;
202 char *mimeTablePathname
;
204 char *visibleHostname
;
205 char *uniqueHostname
;
206 wordlist
*hostnameAliases
;
218 Ip::Address udp_incoming
;
219 Ip::Address udp_outgoing
;
221 Ip::Address snmp_incoming
;
222 Ip::Address snmp_outgoing
;
224 /* FIXME INET6 : this should really be a CIDR value */
225 Ip::Address client_netmask
;
228 size_t udpMaxHitObjsz
;
229 wordlist
*mcast_group_list
;
230 wordlist
*dns_nameservers
;
245 Mgr::ActionPasswordList
*passwd_list
;
248 int objectsPerBucket
;
249 int64_t avgObjectSize
;
250 int64_t maxObjectSize
;
251 int64_t minObjectSize
;
252 size_t maxInMemObjSize
;
274 int test_reachability
;
275 int half_closed_clients
;
277 #if USE_HTTP_VIOLATIONS
283 int redir_rewrites_host
;
285 int nonhierarchical_direct
;
286 int strip_query_terms
;
287 int redirector_bypass
;
289 int ignore_unknown_nameservers
;
293 #if USE_CACHE_DIGESTS
295 int digest_generation
;
299 int vary_ignore_expire
;
300 int surrogate_is_remote
;
301 int request_entities
;
302 int detect_broken_server_pconns
;
303 int balance_on_multiple_ip
;
304 int relaxed_header_parser
;
306 int allow_underscore
;
308 int cache_miss_revalidate
;
310 int httpd_suppress_version_string
;
311 int global_internal_static
;
312 int collapsed_forwarding
;
314 #if FOLLOW_X_FORWARDED_FOR
315 int acl_uses_indirect_client
;
316 int delay_pool_uses_indirect_client
;
317 int log_uses_indirect_client
;
319 int tproxy_uses_indirect_client
;
321 #endif /* FOLLOW_X_FORWARDED_FOR */
323 int WIN32_IpAddrChangeMonitor
;
324 int memory_cache_first
;
325 int memory_cache_disk
;
326 int hostStrictVerify
;
327 int client_dst_passthru
;
331 int pipeline_max_prefetch
;
333 int forward_max_tries
;
340 acl_access
*adapted_http
;
343 acl_access
*NeverDirect
;
344 acl_access
*AlwaysDirect
;
348 acl_access
*storeMiss
;
349 acl_access
*stats_collection
;
354 #if USE_HTTP_VIOLATIONS
355 acl_access
*brokenPosts
;
357 acl_access
*redirector
;
358 acl_access
*store_id
;
360 Acl::Address
*outgoing_address
;
364 acl_access
*htcp_clr
;
368 acl_access
*ssl_bump
;
370 #if FOLLOW_X_FORWARDED_FOR
371 acl_access
*followXFF
;
372 #endif /* FOLLOW_X_FORWARDED_FOR */
374 /// acceptible PROXY protocol clients
375 acl_access
*proxyProtocol
;
377 /// spoof_client_ip squid.conf acl.
378 /// nil unless configured
379 acl_access
* spoof_client_ip
;
380 acl_access
*on_unsupported_protocol
;
382 acl_access
*ftp_epsv
;
384 acl_access
*forceRequestBodyContinuation
;
386 AclDenyInfoList
*denyInfoList
;
399 RefreshPattern
*Refresh
;
402 RefCount
<SwapDir
> *swapDirs
;
405 /// number of disk processes required to support all cache_dirs
409 * I'm sick of having to keep doing this ..
411 #define INDEXSD(i) (Config.cacheSwap.swapDirs[(i)].getRaw())
417 char *errorDirectory
;
419 char *errorDefaultLanguage
;
420 int errorLogMissingLanguages
;
422 char *errorStylesheet
;
434 ClientDelayConfig ClientDelay
;
443 int max_open_disk_fds
;
445 AclSizeLimit
*rangeOffsetLimit
;
446 #if MULTICAST_MISS_STREAM
457 /// request_header_access and request_header_replace
458 HeaderManglers
*request_header_access
;
459 /// reply_header_access and reply_header_replace
460 HeaderManglers
*reply_header_access
;
461 ///request_header_add access list
462 HeaderWithAclList
*request_header_add
;
467 #if USE_CACHE_DIGESTS
471 time_t rebuild_period
;
472 time_t rewrite_period
;
473 size_t swapout_chunk_size
;
474 int rebuild_chunk_percentage
;
480 int unclean_shutdown
;
483 size_t sessionCacheSize
;
488 wordlist
*ext_methods
;
495 char *store_dir_select_algorithm
;
496 int sleep_after_fork
; /* microseconds */
497 time_t minimum_expiry_time
; /* seconds */
498 external_acl
*externalAclHelperList
;
513 acl_access
*cert_error
;
515 sslproxy_cert_sign
*cert_sign
;
516 sslproxy_cert_adapt
*cert_adapt
;
522 int max_filedescriptors
;
524 CpuAffinityMap
*cpuAffinityMap
;
526 #if USE_LOADABLE_MODULES
527 wordlist
*loadable_module_names
;
530 int client_ip_max_connections
;
532 char *redirector_extras
;
534 struct UrlHelperTimeout
{
537 } onUrlRewriteTimeout
;
539 char *storeId_extras
;
542 int v4_first
; ///< Place IPv4 first in the order of DNS results.
543 ssize_t packet_max
; ///< maximum size EDNS advertised for DNS replies.
548 extern SquidConfig Config
;
555 int mangle_request_headers
;
557 uid_t effectiveUserID
;
558 gid_t effectiveGroupID
;
561 extern SquidConfig2 Config2
;
563 #endif /* SQUID_SQUIDCONFIG_H_ */