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 #if HAVE_OPENSSL_SSL_H
45 #include <openssl/ssl.h>
48 class sslproxy_cert_sign
;
49 class sslproxy_cert_adapt
;
54 class ActionPasswordList
;
61 class RemovalPolicySettings
;
69 /// the representation of the configuration. POD.
74 /* These should be for the Store::Root instance.
75 * this needs pluggable parsing to be done smoothly.
81 YesNoNone memShared
; ///< whether the memory cache is shared among workers
90 RemovalPolicySettings
*replPolicy
;
91 RemovalPolicySettings
*memPolicy
;
92 #if USE_HTTP_VIOLATIONS
96 time_t negativeDnsTtl
;
97 time_t positiveDnsTtl
;
98 time_t shutdownLifetime
;
99 time_t backgroundPingRate
;
109 time_t clientIdlePconn
;
110 time_t serverIdlePconn
;
111 time_t ftpClientIdle
;
114 int icp_query
; /* msec */
115 int icp_query_max
; /* msec */
116 int icp_query_min
; /* msec */
117 int mcast_icp_query
; /* msec */
118 time_msec_t idns_retransmit
;
119 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
;
165 Ip::Address_list
*router
;
167 int forwarding_method
;
169 int assignment_method
;
180 char *as_whois_server
;
185 CustomLog
*accesslogs
;
195 char *visible_appname_string
;
196 char *effectiveGroup
;
214 HelperChildConfig redirectChildren
;
215 HelperChildConfig storeIdChildren
;
216 time_t authenticateGCInterval
;
217 time_t authenticateTTL
;
218 time_t authenticateIpTTL
;
224 size_t appendDomainLen
;
227 char *mimeTablePathname
;
229 char *visibleHostname
;
230 char *uniqueHostname
;
231 wordlist
*hostnameAliases
;
243 Ip::Address udp_incoming
;
244 Ip::Address udp_outgoing
;
246 Ip::Address snmp_incoming
;
247 Ip::Address snmp_outgoing
;
249 /* FIXME INET6 : this should really be a CIDR value */
250 Ip::Address client_netmask
;
253 size_t udpMaxHitObjsz
;
254 wordlist
*hierarchy_stoplist
;
255 wordlist
*mcast_group_list
;
256 wordlist
*dns_nameservers
;
271 Mgr::ActionPasswordList
*passwd_list
;
274 int objectsPerBucket
;
275 int64_t avgObjectSize
;
276 int64_t maxObjectSize
;
277 int64_t minObjectSize
;
278 size_t maxInMemObjSize
;
300 int test_reachability
;
301 int half_closed_clients
;
303 #if USE_HTTP_VIOLATIONS
309 int redir_rewrites_host
;
311 int nonhierarchical_direct
;
312 int strip_query_terms
;
313 int redirector_bypass
;
315 int ignore_unknown_nameservers
;
319 #if USE_CACHE_DIGESTS
321 int digest_generation
;
325 int vary_ignore_expire
;
326 int surrogate_is_remote
;
327 int request_entities
;
328 int detect_broken_server_pconns
;
329 int balance_on_multiple_ip
;
330 int relaxed_header_parser
;
332 int allow_underscore
;
334 int cache_miss_revalidate
;
336 int httpd_suppress_version_string
;
337 int global_internal_static
;
338 int collapsed_forwarding
;
340 #if FOLLOW_X_FORWARDED_FOR
341 int acl_uses_indirect_client
;
342 int delay_pool_uses_indirect_client
;
343 int log_uses_indirect_client
;
345 int tproxy_uses_indirect_client
;
347 #endif /* FOLLOW_X_FORWARDED_FOR */
349 int WIN32_IpAddrChangeMonitor
;
350 int memory_cache_first
;
351 int memory_cache_disk
;
352 int hostStrictVerify
;
353 int client_dst_passthru
;
357 int pipeline_max_prefetch
;
359 int forward_max_tries
;
366 acl_access
*adapted_http
;
369 acl_access
*NeverDirect
;
370 acl_access
*AlwaysDirect
;
374 acl_access
*storeMiss
;
375 acl_access
*stats_collection
;
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 */
400 /// spoof_client_ip squid.conf acl.
401 /// nil unless configured
402 acl_access
* spoof_client_ip
;
404 acl_access
*ftp_epsv
;
406 AclDenyInfoList
*denyInfoList
;
419 RefreshPattern
*Refresh
;
422 RefCount
<SwapDir
> *swapDirs
;
425 /// number of disk processes required to support all cache_dirs
429 * I'm sick of having to keep doing this ..
431 #define INDEXSD(i) (Config.cacheSwap.swapDirs[(i)].getRaw())
437 char *errorDirectory
;
439 char *errorDefaultLanguage
;
440 int errorLogMissingLanguages
;
442 char *errorStylesheet
;
454 ClientDelayConfig ClientDelay
;
463 int max_open_disk_fds
;
465 AclSizeLimit
*rangeOffsetLimit
;
466 #if MULTICAST_MISS_STREAM
477 /// request_header_access and request_header_replace
478 HeaderManglers
*request_header_access
;
479 /// reply_header_access and reply_header_replace
480 HeaderManglers
*reply_header_access
;
481 ///request_header_add access list
482 HeaderWithAclList
*request_header_add
;
487 #if USE_CACHE_DIGESTS
491 time_t rebuild_period
;
492 time_t rewrite_period
;
493 size_t swapout_chunk_size
;
494 int rebuild_chunk_percentage
;
500 int unclean_shutdown
;
503 size_t sessionCacheSize
;
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
;
550 char *redirector_extras
;
552 char *storeId_extras
;
555 int v4_first
; ///< Place IPv4 first in the order of DNS results.
556 ssize_t packet_max
; ///< maximum size EDNS advertised for DNS replies.
561 extern SquidConfig Config
;
568 int mangle_request_headers
;
570 uid_t effectiveUserID
;
571 gid_t effectiveGroupID
;
574 extern SquidConfig2 Config2
;
576 #endif /* SQUID_SQUIDCONFIG_H_ */