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
;
92 time_t pconnLifetime
; ///< pconn_lifetime in squid.conf
95 int icp_query
; /* msec */
96 int icp_query_max
; /* msec */
97 int icp_query_min
; /* msec */
98 int mcast_icp_query
; /* msec */
99 time_msec_t idns_retransmit
;
100 time_msec_t idns_query
;
103 size_t maxRequestHeaderSize
;
104 int64_t maxRequestBodySize
;
105 int64_t maxChunkedRequestBodySize
;
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 AclAddress
*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
;
381 acl_access
*ftp_epsv
;
383 acl_access
*forceRequestBodyContinuation
;
385 AclDenyInfoList
*denyInfoList
;
398 RefreshPattern
*Refresh
;
401 RefCount
<SwapDir
> *swapDirs
;
404 /// number of disk processes required to support all cache_dirs
408 * I'm sick of having to keep doing this ..
410 #define INDEXSD(i) (Config.cacheSwap.swapDirs[(i)].getRaw())
416 char *errorDirectory
;
418 char *errorDefaultLanguage
;
419 int errorLogMissingLanguages
;
421 char *errorStylesheet
;
433 ClientDelayConfig ClientDelay
;
442 int max_open_disk_fds
;
444 AclSizeLimit
*rangeOffsetLimit
;
445 #if MULTICAST_MISS_STREAM
456 /// request_header_access and request_header_replace
457 HeaderManglers
*request_header_access
;
458 /// reply_header_access and reply_header_replace
459 HeaderManglers
*reply_header_access
;
460 ///request_header_add access list
461 HeaderWithAclList
*request_header_add
;
466 #if USE_CACHE_DIGESTS
470 time_t rebuild_period
;
471 time_t rewrite_period
;
472 size_t swapout_chunk_size
;
473 int rebuild_chunk_percentage
;
479 int unclean_shutdown
;
482 size_t sessionCacheSize
;
487 wordlist
*ext_methods
;
494 char *store_dir_select_algorithm
;
495 int sleep_after_fork
; /* microseconds */
496 time_t minimum_expiry_time
; /* seconds */
497 external_acl
*externalAclHelperList
;
511 acl_access
*cert_error
;
513 sslproxy_cert_sign
*cert_sign
;
514 sslproxy_cert_adapt
*cert_adapt
;
520 int max_filedescriptors
;
522 CpuAffinityMap
*cpuAffinityMap
;
524 #if USE_LOADABLE_MODULES
525 wordlist
*loadable_module_names
;
528 int client_ip_max_connections
;
530 char *redirector_extras
;
532 struct UrlHelperTimeout
{
535 } onUrlRewriteTimeout
;
537 char *storeId_extras
;
540 int v4_first
; ///< Place IPv4 first in the order of DNS results.
541 ssize_t packet_max
; ///< maximum size EDNS advertised for DNS replies.
546 extern SquidConfig Config
;
553 int mangle_request_headers
;
555 uid_t effectiveUserID
;
556 gid_t effectiveGroupID
;
559 extern SquidConfig2 Config2
;
561 #endif /* SQUID_SQUIDCONFIG_H_ */