1 #ifndef SQUID_SQUIDCONFIG_H_
2 #define SQUID_SQUIDCONFIG_H_
7 * SQUID Web Proxy Cache http://www.squid-cache.org/
8 * ----------------------------------------------------------
10 * Squid is the result of efforts by numerous individuals from
11 * the Internet community; see the CONTRIBUTORS file for full
12 * details. Many organizations have provided support for Squid's
13 * development; see the SPONSORS file for full details. Squid is
14 * Copyrighted (C) 2001 by the Regents of the University of
15 * California; see the COPYRIGHT file for full details. Squid
16 * incorporates software developed and/or copyrighted by other
17 * sources; see the CREDITS file for full details.
19 * This program is free software; you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License as published by
21 * the Free Software Foundation; either version 2 of the License, or
22 * (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
35 #include "acl/AclAddress.h"
36 #include "ClientDelayConfig.h"
37 #include "DelayConfig.h"
38 #include "HttpHeaderTools.h"
39 #include "icmp/IcmpConfig.h"
40 #include "ip/Address.h"
43 #include "YesNoNone.h"
46 #include <openssl/ssl.h>
50 class AclDenyInfoList
;
55 class RemovalPolicySettings
;
64 /* These should be for the Store::Root instance.
65 * this needs pluggable parsing to be done smoothly.
71 YesNoNone memShared
; ///< whether the memory cache is shared among workers
80 RemovalPolicySettings
*replPolicy
;
81 RemovalPolicySettings
*memPolicy
;
82 #if USE_HTTP_VIOLATIONS
86 time_t negativeDnsTtl
;
87 time_t positiveDnsTtl
;
88 time_t shutdownLifetime
;
89 time_t backgroundPingRate
;
99 time_t clientIdlePconn
;
100 time_t serverIdlePconn
;
103 int icp_query
; /* msec */
104 int icp_query_max
; /* msec */
105 int icp_query_min
; /* msec */
106 int mcast_icp_query
; /* msec */
109 time_msec_t idns_retransmit
;
110 time_msec_t idns_query
;
114 size_t maxRequestHeaderSize
;
115 int64_t maxRequestBodySize
;
116 int64_t maxChunkedRequestBodySize
;
117 size_t maxRequestBufferSize
;
118 size_t maxReplyHeaderSize
;
119 acl_size_t
*ReplyBodySize
;
136 AnyP::PortCfg
*https
;
157 Ip::Address_list
*router
;
159 int forwarding_method
;
161 int assignment_method
;
172 char *as_whois_server
;
177 customlog
*accesslogs
;
187 char *visible_appname_string
;
188 char *effectiveGroup
;
209 HelperChildConfig dnsChildren
;
212 HelperChildConfig redirectChildren
;
213 time_t authenticateGCInterval
;
214 time_t authenticateTTL
;
215 time_t authenticateIpTTL
;
221 size_t appendDomainLen
;
224 char *mimeTablePathname
;
226 char *visibleHostname
;
227 char *uniqueHostname
;
228 wordlist
*hostnameAliases
;
240 Ip::Address udp_incoming
;
241 Ip::Address udp_outgoing
;
243 Ip::Address snmp_incoming
;
244 Ip::Address snmp_outgoing
;
246 /* FIXME INET6 : this should really be a CIDR value */
247 Ip::Address client_netmask
;
250 size_t udpMaxHitObjsz
;
251 wordlist
*hierarchy_stoplist
;
252 wordlist
*mcast_group_list
;
253 wordlist
*dns_nameservers
;
268 cachemgr_passwd
*passwd_list
;
271 int objectsPerBucket
;
272 int64_t avgObjectSize
;
273 int64_t maxObjectSize
;
274 int64_t minObjectSize
;
275 size_t maxInMemObjSize
;
297 int test_reachability
;
298 int half_closed_clients
;
300 #if USE_HTTP_VIOLATIONS
306 int redir_rewrites_host
;
308 int nonhierarchical_direct
;
309 int strip_query_terms
;
310 int redirector_bypass
;
311 int ignore_unknown_nameservers
;
315 #if USE_CACHE_DIGESTS
317 int digest_generation
;
321 int vary_ignore_expire
;
322 int pipeline_prefetch
;
323 int surrogate_is_remote
;
324 int request_entities
;
325 int detect_broken_server_pconns
;
326 int balance_on_multiple_ip
;
327 int relaxed_header_parser
;
329 int allow_underscore
;
332 int httpd_suppress_version_string
;
333 int global_internal_static
;
335 #if FOLLOW_X_FORWARDED_FOR
336 int acl_uses_indirect_client
;
337 int delay_pool_uses_indirect_client
;
338 int log_uses_indirect_client
;
340 int tproxy_uses_indirect_client
;
342 #endif /* FOLLOW_X_FORWARDED_FOR */
344 int WIN32_IpAddrChangeMonitor
;
345 int memory_cache_first
;
346 int memory_cache_disk
;
347 int hostStrictVerify
;
348 int client_dst_passthru
;
351 int forward_max_tries
;
358 acl_access
*adapted_http
;
361 acl_access
*NeverDirect
;
362 acl_access
*AlwaysDirect
;
370 #if USE_HTTP_VIOLATIONS
371 acl_access
*brokenPosts
;
373 acl_access
*redirector
;
375 AclAddress
*outgoing_address
;
379 acl_access
*htcp_clr
;
383 acl_access
*ssl_bump
;
385 #if FOLLOW_X_FORWARDED_FOR
386 acl_access
*followXFF
;
387 #endif /* FOLLOW_X_FORWARDED_FOR */
393 AclDenyInfoList
*denyInfoList
;
409 RefCount
<SwapDir
> *swapDirs
;
412 /// number of disk processes required to support all cache_dirs
416 * I'm sick of having to keep doing this ..
418 #define INDEXSD(i) (Config.cacheSwap.swapDirs[(i)].getRaw())
424 char *errorDirectory
;
426 char *errorDefaultLanguage
;
427 int errorLogMissingLanguages
;
429 char *errorStylesheet
;
441 ClientDelayConfig ClientDelay
;
450 int max_open_disk_fds
;
452 acl_size_t
*rangeOffsetLimit
;
453 #if MULTICAST_MISS_STREAM
464 /// request_header_access and request_header_replace
465 HeaderManglers
*request_header_access
;
466 /// reply_header_access and reply_header_replace
467 HeaderManglers
*reply_header_access
;
468 ///request_header_add access list
469 HeaderWithAclList
*request_header_add
;
472 #if USE_CACHE_DIGESTS
476 time_t rebuild_period
;
477 time_t rewrite_period
;
478 size_t swapout_chunk_size
;
479 int rebuild_chunk_percentage
;
485 int unclean_shutdown
;
490 wordlist
*ext_methods
;
497 char *store_dir_select_algorithm
;
498 int sleep_after_fork
; /* microseconds */
499 time_t minimum_expiry_time
; /* seconds */
500 external_acl
*externalAclHelperList
;
514 acl_access
*cert_error
;
516 sslproxy_cert_sign
*cert_sign
;
517 sslproxy_cert_adapt
*cert_adapt
;
523 int max_filedescriptors
;
525 CpuAffinityMap
*cpuAffinityMap
;
527 #if USE_LOADABLE_MODULES
528 wordlist
*loadable_module_names
;
531 int client_ip_max_connections
;
534 int v4_first
; ///< Place IPv4 first in the order of DNS results.
535 ssize_t packet_max
; ///< maximum size EDNS advertised for DNS replies.
540 extern SquidConfig Config
;
543 struct SquidConfig2
{
546 int mangle_request_headers
;
548 uid_t effectiveUserID
;
549 gid_t effectiveGroupID
;
552 extern SquidConfig2 Config2
;
554 #endif /* SQUID_SQUIDCONFIG_H_ */