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 */
114 time_msec_t idns_retransmit
;
115 time_msec_t idns_query
;
117 size_t maxRequestHeaderSize
;
118 int64_t maxRequestBodySize
;
119 int64_t maxChunkedRequestBodySize
;
120 size_t maxRequestBufferSize
;
121 size_t maxReplyHeaderSize
;
122 AclSizeLimit
*ReplyBodySize
;
139 AnyP::PortCfg
*https
;
160 Ip::Address_list
*router
;
162 int forwarding_method
;
164 int assignment_method
;
175 char *as_whois_server
;
180 CustomLog
*accesslogs
;
190 char *visible_appname_string
;
191 char *effectiveGroup
;
209 HelperChildConfig redirectChildren
;
210 HelperChildConfig storeIdChildren
;
211 time_t authenticateGCInterval
;
212 time_t authenticateTTL
;
213 time_t authenticateIpTTL
;
219 size_t appendDomainLen
;
222 char *mimeTablePathname
;
224 char *visibleHostname
;
225 char *uniqueHostname
;
226 wordlist
*hostnameAliases
;
238 Ip::Address udp_incoming
;
239 Ip::Address udp_outgoing
;
241 Ip::Address snmp_incoming
;
242 Ip::Address snmp_outgoing
;
244 /* FIXME INET6 : this should really be a CIDR value */
245 Ip::Address client_netmask
;
248 size_t udpMaxHitObjsz
;
249 wordlist
*hierarchy_stoplist
;
250 wordlist
*mcast_group_list
;
251 wordlist
*dns_nameservers
;
266 Mgr::ActionPasswordList
*passwd_list
;
269 int objectsPerBucket
;
270 int64_t avgObjectSize
;
271 int64_t maxObjectSize
;
272 int64_t minObjectSize
;
273 size_t maxInMemObjSize
;
295 int test_reachability
;
296 int half_closed_clients
;
298 #if USE_HTTP_VIOLATIONS
304 int redir_rewrites_host
;
306 int nonhierarchical_direct
;
307 int strip_query_terms
;
308 int redirector_bypass
;
310 int ignore_unknown_nameservers
;
314 #if USE_CACHE_DIGESTS
316 int digest_generation
;
320 int vary_ignore_expire
;
321 int surrogate_is_remote
;
322 int request_entities
;
323 int detect_broken_server_pconns
;
324 int balance_on_multiple_ip
;
325 int relaxed_header_parser
;
327 int allow_underscore
;
329 int cache_miss_revalidate
;
331 int httpd_suppress_version_string
;
332 int global_internal_static
;
334 #if FOLLOW_X_FORWARDED_FOR
335 int acl_uses_indirect_client
;
336 int delay_pool_uses_indirect_client
;
337 int log_uses_indirect_client
;
339 int tproxy_uses_indirect_client
;
341 #endif /* FOLLOW_X_FORWARDED_FOR */
343 int WIN32_IpAddrChangeMonitor
;
344 int memory_cache_first
;
345 int memory_cache_disk
;
346 int hostStrictVerify
;
347 int client_dst_passthru
;
351 int pipeline_max_prefetch
;
353 int forward_max_tries
;
360 acl_access
*adapted_http
;
363 acl_access
*NeverDirect
;
364 acl_access
*AlwaysDirect
;
368 acl_access
*storeMiss
;
369 acl_access
*stats_collection
;
374 #if USE_HTTP_VIOLATIONS
375 acl_access
*brokenPosts
;
377 acl_access
*redirector
;
378 acl_access
*store_id
;
380 AclAddress
*outgoing_address
;
384 acl_access
*htcp_clr
;
388 acl_access
*ssl_bump
;
390 #if FOLLOW_X_FORWARDED_FOR
391 acl_access
*followXFF
;
392 #endif /* FOLLOW_X_FORWARDED_FOR */
394 /// spoof_client_ip squid.conf acl.
395 /// nil unless configured
396 acl_access
* spoof_client_ip
;
398 AclDenyInfoList
*denyInfoList
;
411 RefreshPattern
*Refresh
;
414 RefCount
<SwapDir
> *swapDirs
;
417 /// number of disk processes required to support all cache_dirs
421 * I'm sick of having to keep doing this ..
423 #define INDEXSD(i) (Config.cacheSwap.swapDirs[(i)].getRaw())
429 char *errorDirectory
;
431 char *errorDefaultLanguage
;
432 int errorLogMissingLanguages
;
434 char *errorStylesheet
;
446 ClientDelayConfig ClientDelay
;
455 int max_open_disk_fds
;
457 AclSizeLimit
*rangeOffsetLimit
;
458 #if MULTICAST_MISS_STREAM
469 /// request_header_access and request_header_replace
470 HeaderManglers
*request_header_access
;
471 /// reply_header_access and reply_header_replace
472 HeaderManglers
*reply_header_access
;
473 ///request_header_add access list
474 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
;
554 int mangle_request_headers
;
556 uid_t effectiveUserID
;
557 gid_t effectiveGroupID
;
560 extern SquidConfig2 Config2
;
562 #endif /* SQUID_SQUIDCONFIG_H_ */