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/forward.h"
33 #include "base/RefCount.h"
34 #include "ClientDelayConfig.h"
35 #include "DelayConfig.h"
36 #include "HelperChildConfig.h"
37 #include "HttpHeaderTools.h"
38 #include "icmp/IcmpConfig.h"
39 #include "ip/Address.h"
41 #include "YesNoNone.h"
44 #include <openssl/ssl.h>
45 class sslproxy_cert_sign
;
46 class sslproxy_cert_adapt
;
51 class ActionPasswordList
;
58 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
;
217 HelperChildConfig dnsChildren
;
220 HelperChildConfig redirectChildren
;
221 HelperChildConfig storeIdChildren
;
222 time_t authenticateGCInterval
;
223 time_t authenticateTTL
;
224 time_t authenticateIpTTL
;
230 size_t appendDomainLen
;
233 char *mimeTablePathname
;
235 char *visibleHostname
;
236 char *uniqueHostname
;
237 wordlist
*hostnameAliases
;
249 Ip::Address udp_incoming
;
250 Ip::Address udp_outgoing
;
252 Ip::Address snmp_incoming
;
253 Ip::Address snmp_outgoing
;
255 /* FIXME INET6 : this should really be a CIDR value */
256 Ip::Address client_netmask
;
259 size_t udpMaxHitObjsz
;
260 wordlist
*hierarchy_stoplist
;
261 wordlist
*mcast_group_list
;
262 wordlist
*dns_nameservers
;
277 Mgr::ActionPasswordList
*passwd_list
;
280 int objectsPerBucket
;
281 int64_t avgObjectSize
;
282 int64_t maxObjectSize
;
283 int64_t minObjectSize
;
284 size_t maxInMemObjSize
;
306 int test_reachability
;
307 int half_closed_clients
;
309 #if USE_HTTP_VIOLATIONS
315 int redir_rewrites_host
;
317 int nonhierarchical_direct
;
318 int strip_query_terms
;
319 int redirector_bypass
;
321 int ignore_unknown_nameservers
;
325 #if USE_CACHE_DIGESTS
327 int digest_generation
;
331 int vary_ignore_expire
;
332 int pipeline_prefetch
;
333 int surrogate_is_remote
;
334 int request_entities
;
335 int detect_broken_server_pconns
;
336 int balance_on_multiple_ip
;
337 int relaxed_header_parser
;
339 int allow_underscore
;
342 int httpd_suppress_version_string
;
343 int global_internal_static
;
345 #if FOLLOW_X_FORWARDED_FOR
346 int acl_uses_indirect_client
;
347 int delay_pool_uses_indirect_client
;
348 int log_uses_indirect_client
;
350 int tproxy_uses_indirect_client
;
352 #endif /* FOLLOW_X_FORWARDED_FOR */
354 int WIN32_IpAddrChangeMonitor
;
355 int memory_cache_first
;
356 int memory_cache_disk
;
357 int hostStrictVerify
;
358 int client_dst_passthru
;
361 int forward_max_tries
;
368 acl_access
*adapted_http
;
371 acl_access
*NeverDirect
;
372 acl_access
*AlwaysDirect
;
380 #if USE_HTTP_VIOLATIONS
381 acl_access
*brokenPosts
;
383 acl_access
*redirector
;
384 acl_access
*store_id
;
386 AclAddress
*outgoing_address
;
390 acl_access
*htcp_clr
;
394 acl_access
*ssl_bump
;
396 #if FOLLOW_X_FORWARDED_FOR
397 acl_access
*followXFF
;
398 #endif /* FOLLOW_X_FORWARDED_FOR */
404 /// spoof_client_ip squid.conf acl.
405 /// nil unless configured
406 acl_access
* spoof_client_ip
;
408 AclDenyInfoList
*denyInfoList
;
421 RefreshPattern
*Refresh
;
424 RefCount
<SwapDir
> *swapDirs
;
427 /// number of disk processes required to support all cache_dirs
431 * I'm sick of having to keep doing this ..
433 #define INDEXSD(i) (Config.cacheSwap.swapDirs[(i)].getRaw())
439 char *errorDirectory
;
441 char *errorDefaultLanguage
;
442 int errorLogMissingLanguages
;
444 char *errorStylesheet
;
456 ClientDelayConfig ClientDelay
;
465 int max_open_disk_fds
;
467 AclSizeLimit
*rangeOffsetLimit
;
468 #if MULTICAST_MISS_STREAM
479 /// request_header_access and request_header_replace
480 HeaderManglers
*request_header_access
;
481 /// reply_header_access and reply_header_replace
482 HeaderManglers
*reply_header_access
;
483 ///request_header_add access list
484 HeaderWithAclList
*request_header_add
;
489 #if USE_CACHE_DIGESTS
493 time_t rebuild_period
;
494 time_t rewrite_period
;
495 size_t swapout_chunk_size
;
496 int rebuild_chunk_percentage
;
502 int unclean_shutdown
;
507 wordlist
*ext_methods
;
514 char *store_dir_select_algorithm
;
515 int sleep_after_fork
; /* microseconds */
516 time_t minimum_expiry_time
; /* seconds */
517 external_acl
*externalAclHelperList
;
531 acl_access
*cert_error
;
533 sslproxy_cert_sign
*cert_sign
;
534 sslproxy_cert_adapt
*cert_adapt
;
540 int max_filedescriptors
;
542 CpuAffinityMap
*cpuAffinityMap
;
544 #if USE_LOADABLE_MODULES
545 wordlist
*loadable_module_names
;
548 int client_ip_max_connections
;
551 int v4_first
; ///< Place IPv4 first in the order of DNS results.
552 ssize_t packet_max
; ///< maximum size EDNS advertised for DNS replies.
557 extern SquidConfig Config
;
564 int mangle_request_headers
;
566 uid_t effectiveUserID
;
567 gid_t effectiveGroupID
;
570 extern SquidConfig2 Config2
;
572 #endif /* SQUID_SQUIDCONFIG_H_ */