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>
51 class AclDenyInfoList
;
55 class RemovalPolicySettings
;
65 /* These should be for the Store::Root instance.
66 * this needs pluggable parsing to be done smoothly.
72 YesNoNone memShared
; ///< whether the memory cache is shared among workers
81 RemovalPolicySettings
*replPolicy
;
82 RemovalPolicySettings
*memPolicy
;
83 #if USE_HTTP_VIOLATIONS
87 time_t negativeDnsTtl
;
88 time_t positiveDnsTtl
;
89 time_t shutdownLifetime
;
90 time_t backgroundPingRate
;
100 time_t clientIdlePconn
;
101 time_t serverIdlePconn
;
104 int icp_query
; /* msec */
105 int icp_query_max
; /* msec */
106 int icp_query_min
; /* msec */
107 int mcast_icp_query
; /* msec */
110 time_msec_t idns_retransmit
;
111 time_msec_t idns_query
;
115 size_t maxRequestHeaderSize
;
116 int64_t maxRequestBodySize
;
117 int64_t maxChunkedRequestBodySize
;
118 size_t maxRequestBufferSize
;
119 size_t maxReplyHeaderSize
;
120 acl_size_t
*ReplyBodySize
;
137 AnyP::PortCfg
*https
;
158 Ip::Address_list
*router
;
160 int forwarding_method
;
162 int assignment_method
;
173 char *as_whois_server
;
178 CustomLog
*accesslogs
;
188 char *visible_appname_string
;
189 char *effectiveGroup
;
210 HelperChildConfig dnsChildren
;
213 HelperChildConfig redirectChildren
;
214 time_t authenticateGCInterval
;
215 time_t authenticateTTL
;
216 time_t authenticateIpTTL
;
222 size_t appendDomainLen
;
225 char *mimeTablePathname
;
227 char *visibleHostname
;
228 char *uniqueHostname
;
229 wordlist
*hostnameAliases
;
241 Ip::Address udp_incoming
;
242 Ip::Address udp_outgoing
;
244 Ip::Address snmp_incoming
;
245 Ip::Address snmp_outgoing
;
247 /* FIXME INET6 : this should really be a CIDR value */
248 Ip::Address client_netmask
;
251 size_t udpMaxHitObjsz
;
252 wordlist
*hierarchy_stoplist
;
253 wordlist
*mcast_group_list
;
254 wordlist
*dns_nameservers
;
269 CacheMgrPasswd
*passwd_list
;
272 int objectsPerBucket
;
273 int64_t avgObjectSize
;
274 int64_t maxObjectSize
;
275 int64_t minObjectSize
;
276 size_t maxInMemObjSize
;
298 int test_reachability
;
299 int half_closed_clients
;
301 #if USE_HTTP_VIOLATIONS
307 int redir_rewrites_host
;
309 int nonhierarchical_direct
;
310 int strip_query_terms
;
311 int redirector_bypass
;
312 int ignore_unknown_nameservers
;
316 #if USE_CACHE_DIGESTS
318 int digest_generation
;
322 int vary_ignore_expire
;
323 int pipeline_prefetch
;
324 int surrogate_is_remote
;
325 int request_entities
;
326 int detect_broken_server_pconns
;
327 int balance_on_multiple_ip
;
328 int relaxed_header_parser
;
330 int allow_underscore
;
333 int httpd_suppress_version_string
;
334 int global_internal_static
;
336 #if FOLLOW_X_FORWARDED_FOR
337 int acl_uses_indirect_client
;
338 int delay_pool_uses_indirect_client
;
339 int log_uses_indirect_client
;
341 int tproxy_uses_indirect_client
;
343 #endif /* FOLLOW_X_FORWARDED_FOR */
345 int WIN32_IpAddrChangeMonitor
;
346 int memory_cache_first
;
347 int memory_cache_disk
;
348 int hostStrictVerify
;
349 int client_dst_passthru
;
352 int forward_max_tries
;
359 acl_access
*adapted_http
;
362 acl_access
*NeverDirect
;
363 acl_access
*AlwaysDirect
;
371 #if USE_HTTP_VIOLATIONS
372 acl_access
*brokenPosts
;
374 acl_access
*redirector
;
376 AclAddress
*outgoing_address
;
380 acl_access
*htcp_clr
;
384 acl_access
*ssl_bump
;
386 #if FOLLOW_X_FORWARDED_FOR
387 acl_access
*followXFF
;
388 #endif /* FOLLOW_X_FORWARDED_FOR */
394 AclDenyInfoList
*denyInfoList
;
407 RefreshPattern
*Refresh
;
410 RefCount
<SwapDir
> *swapDirs
;
413 /// number of disk processes required to support all cache_dirs
417 * I'm sick of having to keep doing this ..
419 #define INDEXSD(i) (Config.cacheSwap.swapDirs[(i)].getRaw())
425 char *errorDirectory
;
427 char *errorDefaultLanguage
;
428 int errorLogMissingLanguages
;
430 char *errorStylesheet
;
442 ClientDelayConfig ClientDelay
;
451 int max_open_disk_fds
;
453 acl_size_t
*rangeOffsetLimit
;
454 #if MULTICAST_MISS_STREAM
465 /// request_header_access and request_header_replace
466 HeaderManglers
*request_header_access
;
467 /// reply_header_access and reply_header_replace
468 HeaderManglers
*reply_header_access
;
469 ///request_header_add access list
470 HeaderWithAclList
*request_header_add
;
473 #if USE_CACHE_DIGESTS
477 time_t rebuild_period
;
478 time_t rewrite_period
;
479 size_t swapout_chunk_size
;
480 int rebuild_chunk_percentage
;
486 int unclean_shutdown
;
491 wordlist
*ext_methods
;
498 char *store_dir_select_algorithm
;
499 int sleep_after_fork
; /* microseconds */
500 time_t minimum_expiry_time
; /* seconds */
501 external_acl
*externalAclHelperList
;
515 acl_access
*cert_error
;
517 sslproxy_cert_sign
*cert_sign
;
518 sslproxy_cert_adapt
*cert_adapt
;
524 int max_filedescriptors
;
526 CpuAffinityMap
*cpuAffinityMap
;
528 #if USE_LOADABLE_MODULES
529 wordlist
*loadable_module_names
;
532 int client_ip_max_connections
;
535 int v4_first
; ///< Place IPv4 first in the order of DNS results.
536 ssize_t packet_max
; ///< maximum size EDNS advertised for DNS replies.
541 extern SquidConfig Config
;
544 struct SquidConfig2
{
547 int mangle_request_headers
;
549 uid_t effectiveUserID
;
550 gid_t effectiveGroupID
;
553 extern SquidConfig2 Config2
;
555 #endif /* SQUID_SQUIDCONFIG_H_ */