1 #ifndef SQUID_SQUIDCONFIG_H_
2 #define SQUID_SQUIDCONFIG_H_
4 * SQUID Web Proxy Cache http://www.squid-cache.org/
5 * ----------------------------------------------------------
7 * Squid is the result of efforts by numerous individuals from
8 * the Internet community; see the CONTRIBUTORS file for full
9 * details. Many organizations have provided support for Squid's
10 * development; see the SPONSORS file for full details. Squid is
11 * Copyrighted (C) 2001 by the Regents of the University of
12 * California; see the COPYRIGHT file for full details. Squid
13 * incorporates software developed and/or copyrighted by other
14 * sources; see the CREDITS file for full details.
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
32 #include "acl/AclAddress.h"
33 #include "ClientDelayConfig.h"
34 #include "DelayConfig.h"
35 #include "HelperChildConfig.h"
36 #include "HttpHeaderTools.h"
37 #include "icmp/IcmpConfig.h"
38 #include "ip/Address.h"
40 #include "YesNoNone.h"
43 #include <openssl/ssl.h>
44 class sslproxy_cert_sign
;
45 class sslproxy_cert_adapt
;
50 class AclDenyInfoList
;
52 class ActionPasswordList
;
59 class RemovalPolicySettings
;
66 /// the representation of the configuration. POD.
71 /* These should be for the Store::Root instance.
72 * this needs pluggable parsing to be done smoothly.
78 YesNoNone memShared
; ///< whether the memory cache is shared among workers
87 RemovalPolicySettings
*replPolicy
;
88 RemovalPolicySettings
*memPolicy
;
89 #if USE_HTTP_VIOLATIONS
93 time_t negativeDnsTtl
;
94 time_t positiveDnsTtl
;
95 time_t shutdownLifetime
;
96 time_t backgroundPingRate
;
106 time_t clientIdlePconn
;
107 time_t serverIdlePconn
;
110 int icp_query
; /* msec */
111 int icp_query_max
; /* msec */
112 int icp_query_min
; /* msec */
113 int mcast_icp_query
; /* msec */
116 time_msec_t idns_retransmit
;
117 time_msec_t idns_query
;
121 size_t maxRequestHeaderSize
;
122 int64_t maxRequestBodySize
;
123 int64_t maxChunkedRequestBodySize
;
124 size_t maxRequestBufferSize
;
125 size_t maxReplyHeaderSize
;
126 AclSizeLimit
*ReplyBodySize
;
143 AnyP::PortCfg
*https
;
164 Ip::Address_list
*router
;
166 int forwarding_method
;
168 int assignment_method
;
179 char *as_whois_server
;
184 CustomLog
*accesslogs
;
194 char *visible_appname_string
;
195 char *effectiveGroup
;
216 HelperChildConfig dnsChildren
;
219 HelperChildConfig redirectChildren
;
220 time_t authenticateGCInterval
;
221 time_t authenticateTTL
;
222 time_t authenticateIpTTL
;
228 size_t appendDomainLen
;
231 char *mimeTablePathname
;
233 char *visibleHostname
;
234 char *uniqueHostname
;
235 wordlist
*hostnameAliases
;
247 Ip::Address udp_incoming
;
248 Ip::Address udp_outgoing
;
250 Ip::Address snmp_incoming
;
251 Ip::Address snmp_outgoing
;
253 /* FIXME INET6 : this should really be a CIDR value */
254 Ip::Address client_netmask
;
257 size_t udpMaxHitObjsz
;
258 wordlist
*hierarchy_stoplist
;
259 wordlist
*mcast_group_list
;
260 wordlist
*dns_nameservers
;
275 Mgr::ActionPasswordList
*passwd_list
;
278 int objectsPerBucket
;
279 int64_t avgObjectSize
;
280 int64_t maxObjectSize
;
281 int64_t minObjectSize
;
282 size_t maxInMemObjSize
;
304 int test_reachability
;
305 int half_closed_clients
;
307 #if USE_HTTP_VIOLATIONS
313 int redir_rewrites_host
;
315 int nonhierarchical_direct
;
316 int strip_query_terms
;
317 int redirector_bypass
;
318 int ignore_unknown_nameservers
;
322 #if USE_CACHE_DIGESTS
324 int digest_generation
;
328 int vary_ignore_expire
;
329 int pipeline_prefetch
;
330 int surrogate_is_remote
;
331 int request_entities
;
332 int detect_broken_server_pconns
;
333 int balance_on_multiple_ip
;
334 int relaxed_header_parser
;
336 int allow_underscore
;
339 int httpd_suppress_version_string
;
340 int global_internal_static
;
342 #if FOLLOW_X_FORWARDED_FOR
343 int acl_uses_indirect_client
;
344 int delay_pool_uses_indirect_client
;
345 int log_uses_indirect_client
;
347 int tproxy_uses_indirect_client
;
349 #endif /* FOLLOW_X_FORWARDED_FOR */
351 int WIN32_IpAddrChangeMonitor
;
352 int memory_cache_first
;
353 int memory_cache_disk
;
354 int hostStrictVerify
;
355 int client_dst_passthru
;
358 int forward_max_tries
;
365 acl_access
*adapted_http
;
368 acl_access
*NeverDirect
;
369 acl_access
*AlwaysDirect
;
377 #if USE_HTTP_VIOLATIONS
378 acl_access
*brokenPosts
;
380 acl_access
*redirector
;
382 AclAddress
*outgoing_address
;
386 acl_access
*htcp_clr
;
390 acl_access
*ssl_bump
;
392 #if FOLLOW_X_FORWARDED_FOR
393 acl_access
*followXFF
;
394 #endif /* FOLLOW_X_FORWARDED_FOR */
400 AclDenyInfoList
*denyInfoList
;
413 RefreshPattern
*Refresh
;
416 RefCount
<SwapDir
> *swapDirs
;
419 /// number of disk processes required to support all cache_dirs
423 * I'm sick of having to keep doing this ..
425 #define INDEXSD(i) (Config.cacheSwap.swapDirs[(i)].getRaw())
431 char *errorDirectory
;
433 char *errorDefaultLanguage
;
434 int errorLogMissingLanguages
;
436 char *errorStylesheet
;
448 ClientDelayConfig ClientDelay
;
457 int max_open_disk_fds
;
459 AclSizeLimit
*rangeOffsetLimit
;
460 #if MULTICAST_MISS_STREAM
471 /// request_header_access and request_header_replace
472 HeaderManglers
*request_header_access
;
473 /// reply_header_access and reply_header_replace
474 HeaderManglers
*reply_header_access
;
475 ///request_header_add access list
476 HeaderWithAclList
*request_header_add
;
479 #if USE_CACHE_DIGESTS
483 time_t rebuild_period
;
484 time_t rewrite_period
;
485 size_t swapout_chunk_size
;
486 int rebuild_chunk_percentage
;
492 int unclean_shutdown
;
497 wordlist
*ext_methods
;
504 char *store_dir_select_algorithm
;
505 int sleep_after_fork
; /* microseconds */
506 time_t minimum_expiry_time
; /* seconds */
507 external_acl
*externalAclHelperList
;
521 acl_access
*cert_error
;
523 sslproxy_cert_sign
*cert_sign
;
524 sslproxy_cert_adapt
*cert_adapt
;
530 int max_filedescriptors
;
532 CpuAffinityMap
*cpuAffinityMap
;
534 #if USE_LOADABLE_MODULES
535 wordlist
*loadable_module_names
;
538 int client_ip_max_connections
;
541 int v4_first
; ///< Place IPv4 first in the order of DNS results.
542 ssize_t packet_max
; ///< maximum size EDNS advertised for DNS replies.
547 extern SquidConfig Config
;
549 struct SquidConfig2
{
552 int mangle_request_headers
;
554 uid_t effectiveUserID
;
555 gid_t effectiveGroupID
;
558 extern SquidConfig2 Config2
;
560 #endif /* SQUID_SQUIDCONFIG_H_ */