· 6 years ago · Nov 05, 2019, 12:04 PM
1# WELCOME TO SQUID 3.1.19
2# ----------------------------
3#
4# This is the documentation for the Squid configuration file.
5# This documentation can also be found online at:
6# http://www.squid-cache.org/Doc/config/
7#
8# You may wish to look at the Squid home page and wiki for the
9# FAQ and other documentation:
10# http://www.squid-cache.org/
11# http://wiki.squid-cache.org/SquidFaq
12# http://wiki.squid-cache.org/ConfigExamples
13#
14# This documentation shows what the defaults for various directives
15# happen to be. If you don't need to change the default, you should
16# leave the line out of your squid.conf in most cases.
17#
18# In some cases "none" refers to no default setting at all,
19# while in other cases it refers to the value of the option
20# - the comments for that keyword indicate if this is the case.
21#
22
23# Configuration options can be included using the "include" directive.
24# Include takes a list of files to include. Quoting and wildcards are
25# supported.
26#
27# For example,
28#
29# include /path/to/included/file/squid.acl.config
30#
31# Includes can be nested up to a hard-coded depth of 16 levels.
32# This arbitrary restriction is to prevent recursive include references
33# from causing Squid entering an infinite loop whilst trying to load
34# configuration files.
35
36# TAG: dns_testnames
37# Remove this line. DNS is no longer tested on startup.
38#Default:
39# none
40
41# TAG: extension_methods
42# Remove this line. All valid methods for HTTP are accepted by default.
43#Default:
44# none
45
46# TAG: incoming_rate
47#Default:
48# none
49
50# TAG: server_http11
51# Remove this line. HTTP/1.1 is supported by default.
52#Default:
53# none
54
55# TAG: upgrade_http0.9
56# Remove this line. ICY/1.0 streaming protocol is supported by default.
57#Default:
58# none
59
60# TAG: zph_local
61# Alter these entries. Use the qos_flows directive instead.
62#Default:
63# none
64
65# TAG: header_access
66# Since squid-3.0 replace with request_header_access or reply_header_access
67# depending on whether you wish to match client requests or server replies.
68#Default:
69# none
70
71# TAG: httpd_accel_no_pmtu_disc
72# Since squid-3.0 use the 'disable-pmtu-discovery' flag on http_port instead.
73#Default:
74# none
75
76# OPTIONS FOR AUTHENTICATION
77# -----------------------------------------------------------------------------
78
79# TAG: auth_param
80# This is used to define parameters for the various authentication
81# schemes supported by Squid.
82#
83# format: auth_param scheme parameter [setting]
84#
85# The order in which authentication schemes are presented to the client is
86# dependent on the order the scheme first appears in config file. IE
87# has a bug (it's not RFC 2617 compliant) in that it will use the basic
88# scheme if basic is the first entry presented, even if more secure
89# schemes are presented. For now use the order in the recommended
90# settings section below. If other browsers have difficulties (don't
91# recognize the schemes offered even if you are using basic) either
92# put basic first, or disable the other schemes (by commenting out their
93# program entry).
94#
95# Once an authentication scheme is fully configured, it can only be
96# shutdown by shutting squid down and restarting. Changes can be made on
97# the fly and activated with a reconfigure. I.E. You can change to a
98# different helper, but not unconfigure the helper completely.
99#
100# Please note that while this directive defines how Squid processes
101# authentication it does not automatically activate authentication.
102# To use authentication you must in addition make use of ACLs based
103# on login name in http_access (proxy_auth, proxy_auth_regex or
104# external with %LOGIN used in the format tag). The browser will be
105# challenged for authentication on the first such acl encountered
106# in http_access processing and will also be re-challenged for new
107# login credentials if the request is being denied by a proxy_auth
108# type acl.
109#
110# WARNING: authentication can't be used in a transparently intercepting
111# proxy as the client then thinks it is talking to an origin server and
112# not the proxy. This is a limitation of bending the TCP/IP protocol to
113# transparently intercepting port 80, not a limitation in Squid.
114# Ports flagged 'transparent', 'intercept', or 'tproxy' have
115# authentication disabled.
116#
117# === Parameters for the basic scheme follow. ===
118#
119# "program" cmdline
120# Specify the command for the external authenticator. Such a program
121# reads a line containing "username password" and replies "OK" or
122# "ERR" in an endless loop. "ERR" responses may optionally be followed
123# by a error description available as %m in the returned error page.
124# If you use an authenticator, make sure you have 1 acl of type
125# proxy_auth.
126#
127# By default, the basic authentication scheme is not used unless a
128# program is specified.
129#
130# If you want to use the traditional NCSA proxy authentication, set
131# this line to something like
132#
133# auth_param basic program /usr/lib/squid3/ncsa_auth /usr/etc/passwd
134#
135# "utf8" on|off
136# HTTP uses iso-latin-1 as characterset, while some authentication
137# backends such as LDAP expects UTF-8. If this is set to on Squid will
138# translate the HTTP iso-latin-1 charset to UTF-8 before sending the
139# username & password to the helper.
140#
141# "children" numberofchildren
142# The number of authenticator processes to spawn. If you start too few
143# Squid will have to wait for them to process a backlog of credential
144# verifications, slowing it down. When password verifications are
145# done via a (slow) network you are likely to need lots of
146# authenticator processes.
147# auth_param basic children 5
148#
149# "concurrency" concurrency
150# The number of concurrent requests the helper can process.
151# The default of 0 is used for helpers who only supports
152# one request at a time. Setting this changes the protocol used to
153# include a channel number first on the request/response line, allowing
154# multiple requests to be sent to the same helper in parallell without
155# wating for the response.
156# Must not be set unless it's known the helper supports this.
157# auth_param basic concurrency 0
158#
159# "realm" realmstring
160# Specifies the realm name which is to be reported to the
161# client for the basic proxy authentication scheme (part of
162# the text the user will see when prompted their username and
163# password). There is no default.
164# auth_param basic realm Squid proxy-caching web server
165#
166# "credentialsttl" timetolive
167# Specifies how long squid assumes an externally validated
168# username:password pair is valid for - in other words how
169# often the helper program is called for that user. Set this
170# low to force revalidation with short lived passwords. Note
171# setting this high does not impact your susceptibility
172# to replay attacks unless you are using an one-time password
173# system (such as SecureID). If you are using such a system,
174# you will be vulnerable to replay attacks unless you also
175# use the max_user_ip ACL in an http_access rule.
176#
177# "casesensitive" on|off
178# Specifies if usernames are case sensitive. Most user databases are
179# case insensitive allowing the same username to be spelled using both
180# lower and upper case letters, but some are case sensitive. This
181# makes a big difference for user_max_ip ACL processing and similar.
182# auth_param basic casesensitive off
183#
184# === Parameters for the digest scheme follow ===
185#
186# "program" cmdline
187# Specify the command for the external authenticator. Such
188# a program reads a line containing "username":"realm" and
189# replies with the appropriate H(A1) value hex encoded or
190# ERR if the user (or his H(A1) hash) does not exists.
191# See rfc 2616 for the definition of H(A1).
192# "ERR" responses may optionally be followed by a error description
193# available as %m in the returned error page.
194#
195# By default, the digest authentication scheme is not used unless a
196# program is specified.
197#
198# If you want to use a digest authenticator, set this line to
199# something like
200#
201# auth_param digest program /usr/lib/squid3/digest_pw_auth /usr/etc/digpass
202#
203# "utf8" on|off
204# HTTP uses iso-latin-1 as characterset, while some authentication
205# backends such as LDAP expects UTF-8. If this is set to on Squid will
206# translate the HTTP iso-latin-1 charset to UTF-8 before sending the
207# username & password to the helper.
208#
209# "children" numberofchildren
210# The number of authenticator processes to spawn (no default).
211# If you start too few Squid will have to wait for them to
212# process a backlog of H(A1) calculations, slowing it down.
213# When the H(A1) calculations are done via a (slow) network
214# you are likely to need lots of authenticator processes.
215# auth_param digest children 5
216#
217# "realm" realmstring
218# Specifies the realm name which is to be reported to the
219# client for the digest proxy authentication scheme (part of
220# the text the user will see when prompted their username and
221# password). There is no default.
222# auth_param digest realm Squid proxy-caching web server
223#
224# "nonce_garbage_interval" timeinterval
225# Specifies the interval that nonces that have been issued
226# to client_agent's are checked for validity.
227#
228# "nonce_max_duration" timeinterval
229# Specifies the maximum length of time a given nonce will be
230# valid for.
231#
232# "nonce_max_count" number
233# Specifies the maximum number of times a given nonce can be
234# used.
235#
236# "nonce_strictness" on|off
237# Determines if squid requires strict increment-by-1 behavior
238# for nonce counts, or just incrementing (off - for use when
239# useragents generate nonce counts that occasionally miss 1
240# (ie, 1,2,4,6)). Default off.
241#
242# "check_nonce_count" on|off
243# This directive if set to off can disable the nonce count check
244# completely to work around buggy digest qop implementations in
245# certain mainstream browser versions. Default on to check the
246# nonce count to protect from authentication replay attacks.
247#
248# "post_workaround" on|off
249# This is a workaround to certain buggy browsers who sends
250# an incorrect request digest in POST requests when reusing
251# the same nonce as acquired earlier on a GET request.
252#
253# === NTLM scheme options follow ===
254#
255# "program" cmdline
256# Specify the command for the external NTLM authenticator.
257# Such a program reads exchanged NTLMSSP packets with
258# the browser via Squid until authentication is completed.
259# If you use an NTLM authenticator, make sure you have 1 acl
260# of type proxy_auth. By default, the NTLM authenticator_program
261# is not used.
262#
263# auth_param ntlm program /usr/lib/squid3/ntlm_auth
264#
265# "children" numberofchildren
266# The number of authenticator processes to spawn (no default).
267# If you start too few Squid will have to wait for them to
268# process a backlog of credential verifications, slowing it
269# down. When credential verifications are done via a (slow)
270# network you are likely to need lots of authenticator
271# processes.
272#
273# auth_param ntlm children 5
274#
275# "keep_alive" on|off
276# Whether to keep the connection open after the initial response where
277# Squid tells the browser which schemes are supported by the proxy.
278# Some browsers are known to present many login popups or to corrupt
279# POST/PUT requests transfer if the connection is not closed.
280# The default is currently OFF to avoid this, but may change.
281#
282# auth_param ntlm keep_alive on
283#
284# === Options for configuring the NEGOTIATE auth-scheme follow ===
285#
286# "program" cmdline
287# Specify the command for the external Negotiate authenticator.
288# This protocol is used in Microsoft Active-Directory enabled setups with
289# the Microsoft Internet Explorer or Mozilla Firefox browsers.
290# Its main purpose is to exchange credentials with the Squid proxy
291# using the Kerberos mechanisms.
292# If you use a Negotiate authenticator, make sure you have at least
293# one acl of type proxy_auth active. By default, the negotiate
294# authenticator_program is not used.
295# The only supported program for this role is the ntlm_auth
296# program distributed as part of Samba, version 4 or later.
297#
298# auth_param negotiate program /usr/lib/squid3/ntlm_auth --helper-protocol=gss-spnego
299#
300# "children" numberofchildren
301# The number of authenticator processes to spawn (no default).
302# If you start too few Squid will have to wait for them to
303# process a backlog of credential verifications, slowing it
304# down. When crendential verifications are done via a (slow)
305# network you are likely to need lots of authenticator
306# processes.
307# auth_param negotiate children 5
308#
309# "keep_alive" on|off
310# Whether to keep the connection open after the initial response where
311# Squid tells the browser which schemes are supported by the proxy.
312# Some browsers are known to present many login popups or to corrupt
313# POST/PUT requests transfer if the connection is not closed.
314# The default is currently OFF to avoid this, but may change.
315#
316# auth_param negotiate keep_alive on
317#
318#
319# Examples:
320#
321##Recommended minimum configuration per scheme:
322##auth_param negotiate program <uncomment and complete this line to activate>
323##auth_param negotiate children 5
324##auth_param negotiate keep_alive on
325##
326##auth_param ntlm program <uncomment and complete this line to activate>
327##auth_param ntlm children 5
328##auth_param ntlm keep_alive on
329##
330##auth_param digest program <uncomment and complete this line>
331##auth_param digest children 5
332##auth_param digest realm Squid proxy-caching web server
333##auth_param digest nonce_garbage_interval 5 minutes
334##auth_param digest nonce_max_duration 30 minutes
335##auth_param digest nonce_max_count 50
336##
337##auth_param basic program <uncomment and complete this line>
338##auth_param basic children 5
339##auth_param basic realm Squid proxy-caching web server
340##auth_param basic credentialsttl 2 hours
341#Default:
342# none
343
344# TAG: authenticate_cache_garbage_interval
345# The time period between garbage collection across the username cache.
346# This is a tradeoff between memory utilization (long intervals - say
347# 2 days) and CPU (short intervals - say 1 minute). Only change if you
348# have good reason to.
349#Default:
350# authenticate_cache_garbage_interval 1 hour
351
352# TAG: authenticate_ttl
353# The time a user & their credentials stay in the logged in
354# user cache since their last request. When the garbage
355# interval passes, all user credentials that have passed their
356# TTL are removed from memory.
357#Default:
358# authenticate_ttl 1 hour
359
360# TAG: authenticate_ip_ttl
361# If you use proxy authentication and the 'max_user_ip' ACL,
362# this directive controls how long Squid remembers the IP
363# addresses associated with each user. Use a small value
364# (e.g., 60 seconds) if your users might change addresses
365# quickly, as is the case with dialups. You might be safe
366# using a larger value (e.g., 2 hours) in a corporate LAN
367# environment with relatively static address assignments.
368#Default:
369# authenticate_ip_ttl 0 seconds
370
371# ACCESS CONTROLS
372# -----------------------------------------------------------------------------
373
374# TAG: external_acl_type
375# This option defines external acl classes using a helper program
376# to look up the status
377#
378# external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..]
379#
380# Options:
381#
382# ttl=n TTL in seconds for cached results (defaults to 3600
383# for 1 hour)
384# negative_ttl=n
385# TTL for cached negative lookups (default same
386# as ttl)
387# children=n Number of acl helper processes spawn to service
388# external acl lookups of this type. (default 5)
389# concurrency=n concurrency level per process. Only used with helpers
390# capable of processing more than one query at a time.
391# cache=n result cache size, 0 is unbounded (default)
392# grace=n Percentage remaining of TTL where a refresh of a
393# cached entry should be initiated without needing to
394# wait for a new reply. (default 0 for no grace period)
395# protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers
396# ipv4 / ipv6 IP-mode used to communicate to this helper.
397# For compatability with older configurations and helpers
398# the default is currently 'ipv4'.
399#
400# FORMAT specifications
401#
402# %LOGIN Authenticated user login name
403# %EXT_USER Username from external acl
404# %IDENT Ident user name
405# %SRC Client IP
406# %SRCPORT Client source port
407# %URI Requested URI
408# %DST Requested host
409# %PROTO Requested protocol
410# %PORT Requested port
411# %PATH Requested URL path
412# %METHOD Request method
413# %MYADDR Squid interface address
414# %MYPORT Squid http_port number
415# %PATH Requested URL-path (including query-string if any)
416# %USER_CERT SSL User certificate in PEM format
417# %USER_CERTCHAIN SSL User certificate chain in PEM format
418# %USER_CERT_xx SSL User certificate subject attribute xx
419# %USER_CA_xx SSL User certificate issuer attribute xx
420#
421# %>{Header} HTTP request header "Header"
422# %>{Hdr:member}
423# HTTP request header "Hdr" list member "member"
424# %>{Hdr:;member}
425# HTTP request header list member using ; as
426# list separator. ; can be any non-alphanumeric
427# character.
428#
429# %<{Header} HTTP reply header "Header"
430# %<{Hdr:member}
431# HTTP reply header "Hdr" list member "member"
432# %<{Hdr:;member}
433# HTTP reply header list member using ; as
434# list separator. ; can be any non-alphanumeric
435# character.
436#
437# %% The percent sign. Useful for helpers which need
438# an unchanging input format.
439#
440# In addition to the above, any string specified in the referencing
441# acl will also be included in the helper request line, after the
442# specified formats (see the "acl external" directive)
443#
444# The helper receives lines per the above format specification,
445# and returns lines starting with OK or ERR indicating the validity
446# of the request and optionally followed by additional keywords with
447# more details.
448#
449# General result syntax:
450#
451# OK/ERR keyword=value ...
452#
453# Defined keywords:
454#
455# user= The users name (login)
456# password= The users password (for login= cache_peer option)
457# message= Message describing the reason. Available as %o
458# in error pages
459# tag= Apply a tag to a request (for both ERR and OK results)
460# Only sets a tag, does not alter existing tags.
461# log= String to be logged in access.log. Available as
462# %ea in logformat specifications
463#
464# If protocol=3.0 (the default) then URL escaping is used to protect
465# each value in both requests and responses.
466#
467# If using protocol=2.5 then all values need to be enclosed in quotes
468# if they may contain whitespace, or the whitespace escaped using \.
469# And quotes or \ characters within the keyword value must be \ escaped.
470#
471# When using the concurrency= option the protocol is changed by
472# introducing a query channel tag infront of the request/response.
473# The query channel tag is a number between 0 and concurrency-1.
474#Default:
475# none
476
477# TAG: acl
478# Defining an Access List
479#
480# Every access list definition must begin with an aclname and acltype,
481# followed by either type-specific arguments or a quoted filename that
482# they are read from.
483#
484# acl aclname acltype argument ...
485# acl aclname acltype "file" ...
486#
487# When using "file", the file should contain one item per line.
488#
489# By default, regular expressions are CASE-SENSITIVE.
490# To make them case-insensitive, use the -i option. To return case-sensitive
491# use the +i option between patterns, or make a new ACL line without -i.
492#
493# Some acl types require suspending the current request in order
494# to access some external data source.
495# Those which do are marked with the tag [slow], those which
496# don't are marked as [fast].
497# See http://wiki.squid-cache.org/SquidFaq/SquidAcl
498# for further information
499#
500# ***** ACL TYPES AVAILABLE *****
501#
502# acl aclname src ip-address/netmask ... # clients IP address [fast]
503# acl aclname src addr1-addr2/netmask ... # range of addresses [fast]
504# acl aclname dst ip-address/netmask ... # URL host's IP address [slow]
505# acl aclname myip ip-address/netmask ... # local socket IP address [fast]
506#
507# acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation)
508# # The arp ACL requires the special configure option --enable-arp-acl.
509# # Furthermore, the ARP ACL code is not portable to all operating systems.
510# # It works on Linux, Solaris, Windows, FreeBSD, and some
511# # other *BSD variants.
512# # [fast]
513# #
514# # NOTE: Squid can only determine the MAC address for clients that are on
515# # the same subnet. If the client is on a different subnet,
516# # then Squid cannot find out its MAC address.
517#
518# acl aclname srcdomain .foo.com ...
519# # reverse lookup, from client IP [slow]
520# acl aclname dstdomain .foo.com ...
521# # Destination server from URL [fast]
522# acl aclname srcdom_regex [-i] \.foo\.com ...
523# # regex matching client name [slow]
524# acl aclname dstdom_regex [-i] \.foo\.com ...
525# # regex matching server [fast]
526# #
527# # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
528# # based URL is used and no match is found. The name "none" is used
529# # if the reverse lookup fails.
530#
531# acl aclname src_as number ...
532# acl aclname dst_as number ...
533# # [fast]
534# # Except for access control, AS numbers can be used for
535# # routing of requests to specific caches. Here's an
536# # example for routing all requests for AS#1241 and only
537# # those to mycache.mydomain.net:
538# # acl asexample dst_as 1241
539# # cache_peer_access mycache.mydomain.net allow asexample
540# # cache_peer_access mycache_mydomain.net deny all
541#
542# acl aclname peername myPeer ...
543# # [fast]
544# # match against a named cache_peer entry
545# # set unique name= on cache_peer lines for reliable use.
546#
547# acl aclname time [day-abbrevs] [h1:m1-h2:m2]
548# # [fast]
549# # day-abbrevs:
550# # S - Sunday
551# # M - Monday
552# # T - Tuesday
553# # W - Wednesday
554# # H - Thursday
555# # F - Friday
556# # A - Saturday
557# # h1:m1 must be less than h2:m2
558#
559# acl aclname url_regex [-i] ^http:// ...
560# # regex matching on whole URL [fast]
561# acl aclname urlpath_regex [-i] \.gif$ ...
562# # regex matching on URL path [fast]
563#
564# acl aclname port 80 70 21 0-1024... # destination TCP port [fast]
565# # ranges are alloed
566# acl aclname myport 3128 ... # local socket TCP port [fast]
567# acl aclname myportname 3128 ... # http(s)_port name [fast]
568#
569# acl aclname proto HTTP FTP ... # request protocol [fast]
570#
571# acl aclname method GET POST ... # HTTP request method [fast]
572#
573# acl aclname http_status 200 301 500- 400-403 ...
574# # status code in reply [fast]
575#
576# acl aclname browser [-i] regexp ...
577# # pattern match on User-Agent header (see also req_header below) [fast]
578#
579# acl aclname referer_regex [-i] regexp ...
580# # pattern match on Referer header [fast]
581# # Referer is highly unreliable, so use with care
582#
583# acl aclname ident username ...
584# acl aclname ident_regex [-i] pattern ...
585# # string match on ident output [slow]
586# # use REQUIRED to accept any non-null ident.
587#
588# acl aclname proxy_auth [-i] username ...
589# acl aclname proxy_auth_regex [-i] pattern ...
590# # perform http authentication challenge to the client and match against
591# # supplied credentials [slow]
592# #
593# # takes a list of allowed usernames.
594# # use REQUIRED to accept any valid username.
595# #
596# # Will use proxy authentication in forward-proxy scenarios, and plain
597# # http authenticaiton in reverse-proxy scenarios
598# #
599# # NOTE: when a Proxy-Authentication header is sent but it is not
600# # needed during ACL checking the username is NOT logged
601# # in access.log.
602# #
603# # NOTE: proxy_auth requires a EXTERNAL authentication program
604# # to check username/password combinations (see
605# # auth_param directive).
606# #
607# # NOTE: proxy_auth can't be used in a transparent/intercepting proxy
608# # as the browser needs to be configured for using a proxy in order
609# # to respond to proxy authentication.
610#
611# acl aclname snmp_community string ...
612# # A community string to limit access to your SNMP Agent [fast]
613# # Example:
614# #
615# # acl snmppublic snmp_community public
616#
617# acl aclname maxconn number
618# # This will be matched when the client's IP address has
619# # more than <number> TCP connections established. [fast]
620# # NOTE: This only measures direct TCP links so X-Forwarded-For
621# # indirect clients are not counted.
622#
623# acl aclname max_user_ip [-s] number
624# # This will be matched when the user attempts to log in from more
625# # than <number> different ip addresses. The authenticate_ip_ttl
626# # parameter controls the timeout on the ip entries. [fast]
627# # If -s is specified the limit is strict, denying browsing
628# # from any further IP addresses until the ttl has expired. Without
629# # -s Squid will just annoy the user by "randomly" denying requests.
630# # (the counter is reset each time the limit is reached and a
631# # request is denied)
632# # NOTE: in acceleration mode or where there is mesh of child proxies,
633# # clients may appear to come from multiple addresses if they are
634# # going through proxy farms, so a limit of 1 may cause user problems.
635#
636# acl aclname req_mime_type [-i] mime-type ...
637# # regex match against the mime type of the request generated
638# # by the client. Can be used to detect file upload or some
639# # types HTTP tunneling requests [fast]
640# # NOTE: This does NOT match the reply. You cannot use this
641# # to match the returned file type.
642#
643# acl aclname req_header header-name [-i] any\.regex\.here
644# # regex match against any of the known request headers. May be
645# # thought of as a superset of "browser", "referer" and "mime-type"
646# # ACL [fast]
647#
648# acl aclname rep_mime_type [-i] mime-type ...
649# # regex match against the mime type of the reply received by
650# # squid. Can be used to detect file download or some
651# # types HTTP tunneling requests. [fast]
652# # NOTE: This has no effect in http_access rules. It only has
653# # effect in rules that affect the reply data stream such as
654# # http_reply_access.
655#
656# acl aclname rep_header header-name [-i] any\.regex\.here
657# # regex match against any of the known reply headers. May be
658# # thought of as a superset of "browser", "referer" and "mime-type"
659# # ACLs [fast]
660#
661# acl aclname external class_name [arguments...]
662# # external ACL lookup via a helper class defined by the
663# # external_acl_type directive [slow]
664#
665# acl aclname user_cert attribute values...
666# # match against attributes in a user SSL certificate
667# # attribute is one of DN/C/O/CN/L/ST [fast]
668#
669# acl aclname ca_cert attribute values...
670# # match against attributes a users issuing CA SSL certificate
671# # attribute is one of DN/C/O/CN/L/ST [fast]
672#
673# acl aclname ext_user username ...
674# acl aclname ext_user_regex [-i] pattern ...
675# # string match on username returned by external acl helper [slow]
676# # use REQUIRED to accept any non-null user name.
677#
678# acl aclname tag tagvalue ...
679# # string match on tag returned by external acl helper [slow]
680#
681# Examples:
682# acl macaddress arp 09:00:2b:23:45:67
683# acl myexample dst_as 1241
684# acl password proxy_auth REQUIRED
685# acl fileupload req_mime_type -i ^multipart/form-data$
686# acl javascript rep_mime_type -i ^application/x-javascript$
687#
688#Default:
689# acl all src all
690#
691#
692# Recommended minimum configuration:
693#
694acl manager proto cache_object
695acl localhost src 127.0.0.1/32 ::1
696acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
697
698# Example rule allowing access from your local networks.
699# Adapt to list your (internal) IP networks from where browsing
700# should be allowed
701#acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
702#acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
703#acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
704#acl localnet src fc00::/7 # RFC 4193 local private network range
705#acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
706
707acl SSL_ports port 443
708acl Safe_ports port 80 # http
709acl Safe_ports port 21 # ftp
710acl Safe_ports port 443 # https
711acl Safe_ports port 70 # gopher
712acl Safe_ports port 210 # wais
713acl Safe_ports port 1025-65535 # unregistered ports
714acl Safe_ports port 280 # http-mgmt
715acl Safe_ports port 488 # gss-http
716acl Safe_ports port 591 # filemaker
717acl Safe_ports port 777 # multiling http
718acl CONNECT method CONNECT
719
720# TAG: follow_x_forwarded_for
721# Allowing or Denying the X-Forwarded-For header to be followed to
722# find the original source of a request.
723#
724# Requests may pass through a chain of several other proxies
725# before reaching us. The X-Forwarded-For header will contain a
726# comma-separated list of the IP addresses in the chain, with the
727# rightmost address being the most recent.
728#
729# If a request reaches us from a source that is allowed by this
730# configuration item, then we consult the X-Forwarded-For header
731# to see where that host received the request from. If the
732# X-Forwarded-For header contains multiple addresses, we continue
733# backtracking until we reach an address for which we are not allowed
734# to follow the X-Forwarded-For header, or until we reach the first
735# address in the list. For the purpose of ACL used in the
736# follow_x_forwarded_for directive the src ACL type always matches
737# the address we are testing and srcdomain matches its rDNS.
738#
739# The end result of this process is an IP address that we will
740# refer to as the indirect client address. This address may
741# be treated as the client address for access control, ICAP, delay
742# pools and logging, depending on the acl_uses_indirect_client,
743# icap_uses_indirect_client, delay_pool_uses_indirect_client and
744# log_uses_indirect_client options.
745#
746# This clause only supports fast acl types.
747# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
748#
749# SECURITY CONSIDERATIONS:
750#
751# Any host for which we follow the X-Forwarded-For header
752# can place incorrect information in the header, and Squid
753# will use the incorrect information as if it were the
754# source address of the request. This may enable remote
755# hosts to bypass any access control restrictions that are
756# based on the client's source addresses.
757#
758# For example:
759#
760# acl localhost src 127.0.0.1
761# acl my_other_proxy srcdomain .proxy.example.com
762# follow_x_forwarded_for allow localhost
763# follow_x_forwarded_for allow my_other_proxy
764#Default:
765# follow_x_forwarded_for deny all
766
767# TAG: acl_uses_indirect_client on|off
768# Controls whether the indirect client address
769# (see follow_x_forwarded_for) is used instead of the
770# direct client address in acl matching.
771#
772# NOTE: maxconn ACL considers direct TCP links and indirect
773# clients will always have zero. So no match.
774#Default:
775# acl_uses_indirect_client on
776
777# TAG: delay_pool_uses_indirect_client on|off
778# Controls whether the indirect client address
779# (see follow_x_forwarded_for) is used instead of the
780# direct client address in delay pools.
781#Default:
782# delay_pool_uses_indirect_client on
783
784# TAG: log_uses_indirect_client on|off
785# Controls whether the indirect client address
786# (see follow_x_forwarded_for) is used instead of the
787# direct client address in the access log.
788#Default:
789# log_uses_indirect_client on
790
791# TAG: http_access
792# Allowing or Denying access based on defined access lists
793#
794# Access to the HTTP port:
795# http_access allow|deny [!]aclname ...
796#
797# NOTE on default values:
798#
799# If there are no "access" lines present, the default is to deny
800# the request.
801#
802# If none of the "access" lines cause a match, the default is the
803# opposite of the last line in the list. If the last line was
804# deny, the default is allow. Conversely, if the last line
805# is allow, the default will be deny. For these reasons, it is a
806# good idea to have an "deny all" entry at the end of your access
807# lists to avoid potential confusion.
808#
809# This clause supports both fast and slow acl types.
810# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
811#
812#Default:
813# http_access deny all
814#
815
816#
817# Recommended minimum Access Permission configuration:
818#
819# Only allow cachemgr access from localhost
820http_access allow manager localhost
821http_access deny manager
822
823# Deny requests to certain unsafe ports
824http_access deny !Safe_ports
825
826# Deny CONNECT to other than secure SSL ports
827http_access deny CONNECT !SSL_ports
828
829# We strongly recommend the following be uncommented to protect innocent
830# web applications running on the proxy server who think the only
831# one who can access services on "localhost" is a local user
832#http_access deny to_localhost
833
834#
835# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
836#
837
838# Example rule allowing access from your local networks.
839# Adapt localnet in the ACL section to list your (internal) IP networks
840# from where browsing should be allowed
841#http_access allow localnet
842acl localnet src 192.168.0.0/16
843http_access allow localhost
844
845# And finally deny all other access to this proxy
846http_access allow localhost
847http_access allow localnet
848http_access deny all
849
850# TAG: adapted_http_access
851# Allowing or Denying access based on defined access lists
852#
853# Essentially identical to http_access, but runs after redirectors
854# and ICAP/eCAP adaptation. Allowing access control based on their
855# output.
856#
857# If not set then only http_access is used.
858#Default:
859# none
860
861# TAG: http_reply_access
862# Allow replies to client requests. This is complementary to http_access.
863#
864# http_reply_access allow|deny [!] aclname ...
865#
866# NOTE: if there are no access lines present, the default is to allow
867# all replies
868#
869# If none of the access lines cause a match the opposite of the
870# last line will apply. Thus it is good practice to end the rules
871# with an "allow all" or "deny all" entry.
872#
873# This clause supports both fast and slow acl types.
874# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
875#Default:
876# none
877
878# TAG: icp_access
879# Allowing or Denying access to the ICP port based on defined
880# access lists
881#
882# icp_access allow|deny [!]aclname ...
883#
884# See http_access for details
885#
886# This clause only supports fast acl types.
887# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
888#
889## Allow ICP queries from local networks only
890##icp_access allow localnet
891##icp_access deny all
892#Default:
893# icp_access deny all
894
895# TAG: htcp_access
896# Allowing or Denying access to the HTCP port based on defined
897# access lists
898#
899# htcp_access allow|deny [!]aclname ...
900#
901# See http_access for details
902#
903# NOTE: The default if no htcp_access lines are present is to
904# deny all traffic. This default may cause problems with peers
905# using the htcp or htcp-oldsquid options.
906#
907# This clause only supports fast acl types.
908# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
909#
910## Allow HTCP queries from local networks only
911##htcp_access allow localnet
912##htcp_access deny all
913#Default:
914icp_access allow localnet
915http_port 3128
916icp_port 3130
917cache_mem 8 MB
918cache_dir ufs /var/spool/squid3 100 16 256
919client_netmask 255.255.255.255
920# htcp_access deny all
921
922# TAG: htcp_clr_access
923# Allowing or Denying access to purge content using HTCP based
924# on defined access lists
925#
926# htcp_clr_access allow|deny [!]aclname ...
927#
928# See http_access for details
929#
930# This clause only supports fast acl types.
931# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
932#
933## Allow HTCP CLR requests from trusted peers
934#acl htcp_clr_peer src 172.16.1.2
935#htcp_clr_access allow htcp_clr_peer
936#Default:
937# htcp_clr_access deny all
938
939# TAG: miss_access
940# Determins whether network access is permitted when satisfying a request.
941#
942# For example;
943# to force your neighbors to use you as a sibling instead of
944# a parent.
945#
946# acl localclients src 172.16.0.0/16
947# miss_access allow localclients
948# miss_access deny !localclients
949#
950# This means only your local clients are allowed to fetch relayed/MISS
951# replies from the network and all other clients can only fetch cached
952# objects (HITs).
953#
954#
955# The default for this setting allows all clients who passed the
956# http_access rules to relay via this proxy.
957#
958# This clause only supports fast acl types.
959# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
960#Default:
961# miss_access allow all
962
963# TAG: ident_lookup_access
964# A list of ACL elements which, if matched, cause an ident
965# (RFC 931) lookup to be performed for this request. For
966# example, you might choose to always perform ident lookups
967# for your main multi-user Unix boxes, but not for your Macs
968# and PCs. By default, ident lookups are not performed for
969# any requests.
970#
971# To enable ident lookups for specific client addresses, you
972# can follow this example:
973#
974# acl ident_aware_hosts src 198.168.1.0/24
975# ident_lookup_access allow ident_aware_hosts
976# ident_lookup_access deny all
977#
978# Only src type ACL checks are fully supported. A srcdomain
979# ACL might work at times, but it will not always provide
980# the correct result.
981#
982# This clause only supports fast acl types.
983# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
984#Default:
985# ident_lookup_access deny all
986
987# TAG: reply_body_max_size size [acl acl...]
988# This option specifies the maximum size of a reply body. It can be
989# used to prevent users from downloading very large files, such as
990# MP3's and movies. When the reply headers are received, the
991# reply_body_max_size lines are processed, and the first line where
992# all (if any) listed ACLs are true is used as the maximum body size
993# for this reply.
994#
995# This size is checked twice. First when we get the reply headers,
996# we check the content-length value. If the content length value exists
997# and is larger than the allowed size, the request is denied and the
998# user receives an error message that says "the request or reply
999# is too large." If there is no content-length, and the reply
1000# size exceeds this limit, the client's connection is just closed
1001# and they will receive a partial reply.
1002#
1003# WARNING: downstream caches probably can not detect a partial reply
1004# if there is no content-length header, so they will cache
1005# partial responses and give them out as hits. You should NOT
1006# use this option if you have downstream caches.
1007#
1008# WARNING: A maximum size smaller than the size of squid's error messages
1009# will cause an infinite loop and crash squid. Ensure that the smallest
1010# non-zero value you use is greater that the maximum header size plus
1011# the size of your largest error page.
1012#
1013# If you set this parameter none (the default), there will be
1014# no limit imposed.
1015#
1016# Configuration Format is:
1017# reply_body_max_size SIZE UNITS [acl ...]
1018# ie.
1019# reply_body_max_size 10 MB
1020#
1021#Default:
1022# none
1023
1024# NETWORK OPTIONS
1025# -----------------------------------------------------------------------------
1026
1027# TAG: http_port
1028# Usage: port [options]
1029# hostname:port [options]
1030# 1.2.3.4:port [options]
1031#
1032# The socket addresses where Squid will listen for HTTP client
1033# requests. You may specify multiple socket addresses.
1034# There are three forms: port alone, hostname with port, and
1035# IP address with port. If you specify a hostname or IP
1036# address, Squid binds the socket to that specific
1037# address. This replaces the old 'tcp_incoming_address'
1038# option. Most likely, you do not need to bind to a specific
1039# address, so you can use the port number alone.
1040#
1041# If you are running Squid in accelerator mode, you
1042# probably want to listen on port 80 also, or instead.
1043#
1044# The -a command line option may be used to specify additional
1045# port(s) where Squid listens for proxy request. Such ports will
1046# be plain proxy ports with no options.
1047#
1048# You may specify multiple socket addresses on multiple lines.
1049#
1050# Options:
1051#
1052# intercept Support for IP-Layer interception of
1053# outgoing requests without browser settings.
1054# NP: disables authentication and IPv6 on the port.
1055#
1056# tproxy Support Linux TPROXY for spoofing outgoing
1057# connections using the client IP address.
1058# NP: disables authentication and maybe IPv6 on the port.
1059#
1060# accel Accelerator mode. Also needs at least one of
1061# vhost / vport / defaultsite.
1062#
1063# allow-direct Allow direct forwarding in accelerator mode. Normally
1064# accelerated requests are denied direct forwarding as if
1065# never_direct was used.
1066#
1067# defaultsite=domainname
1068# What to use for the Host: header if it is not present
1069# in a request. Determines what site (not origin server)
1070# accelerators should consider the default.
1071# Implies accel.
1072#
1073# vhost Accelerator mode using Host header for virtual domain support.
1074# Also uses the port as specified in Host: header unless
1075# overridden by the vport option. Implies accel.
1076#
1077# vport Virtual host port support. Using the http_port number
1078# instead of the port passed on Host: headers. Implies accel.
1079#
1080# vport=NN Virtual host port support. Using the specified port
1081# number instead of the port passed on Host: headers.
1082# Implies accel.
1083#
1084# protocol= Protocol to reconstruct accelerated requests with.
1085# Defaults to http.
1086#
1087# ignore-cc Ignore request Cache-Control headers.
1088#
1089# Warning: This option violates HTTP specifications if
1090# used in non-accelerator setups.
1091#
1092# connection-auth[=on|off]
1093# use connection-auth=off to tell Squid to prevent
1094# forwarding Microsoft connection oriented authentication
1095# (NTLM, Negotiate and Kerberos)
1096#
1097# disable-pmtu-discovery=
1098# Control Path-MTU discovery usage:
1099# off lets OS decide on what to do (default).
1100# transparent disable PMTU discovery when transparent
1101# support is enabled.
1102# always disable always PMTU discovery.
1103#
1104# In many setups of transparently intercepting proxies
1105# Path-MTU discovery can not work on traffic towards the
1106# clients. This is the case when the intercepting device
1107# does not fully track connections and fails to forward
1108# ICMP must fragment messages to the cache server. If you
1109# have such setup and experience that certain clients
1110# sporadically hang or never complete requests set
1111# disable-pmtu-discovery option to 'transparent'.
1112#
1113# ssl-bump Intercept each CONNECT request matching ssl_bump ACL,
1114# establish secure connection with the client and with
1115# the server, decrypt HTTP messages as they pass through
1116# Squid, and treat them as unencrypted HTTP messages,
1117# becoming the man-in-the-middle.
1118#
1119# When this option is enabled, additional options become
1120# available to specify SSL-related properties of the
1121# client-side connection: cert, key, version, cipher,
1122# options, clientca, cafile, capath, crlfile, dhparams,
1123# sslflags, and sslcontext. See the https_port directive
1124# for more information on these options.
1125#
1126# The ssl_bump option is required to fully enable
1127# the SslBump feature.
1128#
1129# name= Specifies a internal name for the port. Defaults to
1130# the port specification (port or addr:port)
1131#
1132# tcpkeepalive[=idle,interval,timeout]
1133# Enable TCP keepalive probes of idle connections.
1134# In seconds; idle is the initial time before TCP starts
1135# probing the connection, interval how often to probe, and
1136# timeout the time before giving up.
1137#
1138# If you run Squid on a dual-homed machine with an internal
1139# and an external interface we recommend you to specify the
1140# internal address:port in http_port. This way Squid will only be
1141# visible on the internal address.
1142#
1143#
1144
1145# Squid normally listens to port 3128
1146http_port 3128
1147
1148# TAG: https_port
1149# Note: This option is only available if Squid is rebuilt with the
1150# --enable-ssl option
1151#
1152# Usage: [ip:]port cert=certificate.pem [key=key.pem] [options...]
1153#
1154# The socket address where Squid will listen for HTTPS client
1155# requests.
1156#
1157# This is really only useful for situations where you are running
1158# squid in accelerator mode and you want to do the SSL work at the
1159# accelerator level.
1160#
1161# You may specify multiple socket addresses on multiple lines,
1162# each with their own SSL certificate and/or options.
1163#
1164# Options:
1165#
1166# accel Accelerator mode. Also needs at least one of
1167# defaultsite or vhost.
1168#
1169# defaultsite= The name of the https site presented on
1170# this port. Implies accel.
1171#
1172# vhost Accelerator mode using Host header for virtual
1173# domain support. Requires a wildcard certificate
1174# or other certificate valid for more than one domain.
1175# Implies accel.
1176#
1177# protocol= Protocol to reconstruct accelerated requests with.
1178# Defaults to https.
1179#
1180# cert= Path to SSL certificate (PEM format).
1181#
1182# key= Path to SSL private key file (PEM format)
1183# if not specified, the certificate file is
1184# assumed to be a combined certificate and
1185# key file.
1186#
1187# version= The version of SSL/TLS supported
1188# 1 automatic (default)
1189# 2 SSLv2 only
1190# 3 SSLv3 only
1191# 4 TLSv1 only
1192#
1193# cipher= Colon separated list of supported ciphers.
1194# NOTE: some ciphers such as EDH ciphers depend on
1195# additional settings. If those settings are
1196# omitted the ciphers may be silently ignored
1197# by the OpenSSL library.
1198#
1199# options= Various SSL engine options. The most important
1200# being:
1201# NO_SSLv2 Disallow the use of SSLv2
1202# NO_SSLv3 Disallow the use of SSLv3
1203# NO_TLSv1 Disallow the use of TLSv1
1204# SINGLE_DH_USE Always create a new key when using
1205# temporary/ephemeral DH key exchanges
1206# See OpenSSL SSL_CTX_set_options documentation for a
1207# complete list of options.
1208#
1209# clientca= File containing the list of CAs to use when
1210# requesting a client certificate.
1211#
1212# cafile= File containing additional CA certificates to
1213# use when verifying client certificates. If unset
1214# clientca will be used.
1215#
1216# capath= Directory containing additional CA certificates
1217# and CRL lists to use when verifying client certificates.
1218#
1219# crlfile= File of additional CRL lists to use when verifying
1220# the client certificate, in addition to CRLs stored in
1221# the capath. Implies VERIFY_CRL flag below.
1222#
1223# dhparams= File containing DH parameters for temporary/ephemeral
1224# DH key exchanges. See OpenSSL documentation for details
1225# on how to create this file.
1226# WARNING: EDH ciphers will be silently disabled if this
1227# option is not set.
1228#
1229# sslflags= Various flags modifying the use of SSL:
1230# DELAYED_AUTH
1231# Don't request client certificates
1232# immediately, but wait until acl processing
1233# requires a certificate (not yet implemented).
1234# NO_DEFAULT_CA
1235# Don't use the default CA lists built in
1236# to OpenSSL.
1237# NO_SESSION_REUSE
1238# Don't allow for session reuse. Each connection
1239# will result in a new SSL session.
1240# VERIFY_CRL
1241# Verify CRL lists when accepting client
1242# certificates.
1243# VERIFY_CRL_ALL
1244# Verify CRL lists for all certificates in the
1245# client certificate chain.
1246#
1247# sslcontext= SSL session ID context identifier.
1248#
1249# generate-host-certificates[=<on|off>]
1250# Dynamically create SSL server certificates for the
1251# destination hosts of bumped CONNECT requests.When
1252# enabled, the cert and key options are used to sign
1253# generated certificates. Otherwise generated
1254# certificate will be selfsigned.
1255# If there is CA certificate life time of generated
1256# certificate equals lifetime of CA certificate. If
1257# generated certificate is selfsigned lifetime is three
1258# years.
1259# This option is enabled by default when SslBump is used.
1260# See the sslBump option above for more information.
1261#
1262# dynamic_cert_mem_cache_size=SIZE
1263# Approximate total RAM size spent on cached generated
1264# certificates. If set to zero, caching is disabled. The
1265# default value is 4MB. An average XXX-bit certificate
1266# consumes about XXX bytes of RAM.
1267#
1268# vport Accelerator with IP based virtual host support.
1269#
1270# vport=NN As above, but uses specified port number rather
1271# than the https_port number. Implies accel.
1272#
1273# name= Specifies a internal name for the port. Defaults to
1274# the port specification (port or addr:port)
1275#
1276#Default:
1277# none
1278
1279# TAG: tcp_outgoing_tos
1280# Allows you to select a TOS/Diffserv value to mark outgoing
1281# connections with, based on the username or source address
1282# making the request.
1283#
1284# tcp_outgoing_tos ds-field [!]aclname ...
1285#
1286# Example where normal_service_net uses the TOS value 0x00
1287# and good_service_net uses 0x20
1288#
1289# acl normal_service_net src 10.0.0.0/24
1290# acl good_service_net src 10.0.1.0/24
1291# tcp_outgoing_tos 0x00 normal_service_net
1292# tcp_outgoing_tos 0x20 good_service_net
1293#
1294# TOS/DSCP values really only have local significance - so you should
1295# know what you're specifying. For more information, see RFC2474,
1296# RFC2475, and RFC3260.
1297#
1298# The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
1299# "default" to use whatever default your host has. Note that in
1300# practice often only multiples of 4 is usable as the two rightmost bits
1301# have been redefined for use by ECN (RFC 3168 section 23.1).
1302#
1303# Processing proceeds in the order specified, and stops at first fully
1304# matching line.
1305#
1306# Note: The use of this directive using client dependent ACLs is
1307# incompatible with the use of server side persistent connections. To
1308# ensure correct results it is best to set server_persisten_connections
1309# to off when using this directive in such configurations.
1310#Default:
1311# none
1312
1313# TAG: clientside_tos
1314# Allows you to select a TOS/Diffserv value to mark client-side
1315# connections with, based on the username or source address
1316# making the request.
1317#Default:
1318# none
1319
1320# TAG: qos_flows
1321# Allows you to select a TOS/DSCP value to mark outgoing
1322# connections with, based on where the reply was sourced.
1323#
1324# TOS values really only have local significance - so you should
1325# know what you're specifying. For more information, see RFC2474,
1326# RFC2475, and RFC3260.
1327#
1328# The TOS/DSCP byte must be exactly that - octet value 0x00-0xFF.
1329# Note that in practice often only values up to 0x3F are usable
1330# as the two highest bits have been redefined for use by ECN
1331# (RFC3168).
1332#
1333# This setting is configured by setting the source TOS values:
1334#
1335# local-hit=0xFF Value to mark local cache hits.
1336#
1337# sibling-hit=0xFF Value to mark hits from sibling peers.
1338#
1339# parent-hit=0xFF Value to mark hits from parent peers.
1340#
1341#
1342# NOTE: 'miss' preserve feature is only possible on Linux at this time.
1343#
1344# For the following to work correctly, you will need to patch your
1345# linux kernel with the TOS preserving ZPH patch.
1346# The kernel patch can be downloaded from http://zph.bratcheda.org
1347#
1348# disable-preserve-miss
1349# By default, the existing TOS value of the response coming
1350# from the remote server will be retained and masked with
1351# miss-mark. This option disables that feature.
1352#
1353# miss-mask=0xFF
1354# Allows you to mask certain bits in the TOS received from the
1355# remote server, before copying the value to the TOS sent
1356# towards clients.
1357# Default: 0xFF (TOS from server is not changed).
1358#
1359#Default:
1360# none
1361
1362# TAG: tcp_outgoing_address
1363# Allows you to map requests to different outgoing IP addresses
1364# based on the username or source address of the user making
1365# the request.
1366#
1367# tcp_outgoing_address ipaddr [[!]aclname] ...
1368#
1369# Example where requests from 10.0.0.0/24 will be forwarded
1370# with source address 10.1.0.1, 10.0.2.0/24 forwarded with
1371# source address 10.1.0.2 and the rest will be forwarded with
1372# source address 10.1.0.3.
1373#
1374# acl normal_service_net src 10.0.0.0/24
1375# acl good_service_net src 10.0.2.0/24
1376# tcp_outgoing_address 10.1.0.1 normal_service_net
1377# tcp_outgoing_address 10.1.0.2 good_service_net
1378# tcp_outgoing_address 10.1.0.3
1379#
1380# Processing proceeds in the order specified, and stops at first fully
1381# matching line.
1382#
1383# Note: The use of this directive using client dependent ACLs is
1384# incompatible with the use of server side persistent connections. To
1385# ensure correct results it is best to set server_persistent_connections
1386# to off when using this directive in such configurations.
1387#
1388#
1389# IPv6 Magic:
1390#
1391# Squid is built with a capability of bridging the IPv4 and IPv6
1392# internets.
1393# tcp_outgoing_address as exampled above breaks this bridging by forcing
1394# all outbound traffic through a certain IPv4 which may be on the wrong
1395# side of the IPv4/IPv6 boundary.
1396#
1397# To operate with tcp_outgoing_address and keep the bridging benefits
1398# an additional ACL needs to be used which ensures the IPv6-bound traffic
1399# is never forced or permitted out the IPv4 interface.
1400#
1401# # IPv6 destination test along with a dummy access control to perofrm the required DNS
1402# # This MUST be place before any ALLOW rules.
1403# acl to_ipv6 dst ipv6
1404# http_access deny ipv6 !all
1405#
1406# tcp_outgoing_address 2001:db8::c001 good_service_net to_ipv6
1407# tcp_outgoing_address 10.1.0.2 good_service_net !to_ipv6
1408#
1409# tcp_outgoing_address 2001:db8::beef normal_service_net to_ipv6
1410# tcp_outgoing_address 10.1.0.1 normal_service_net !to_ipv6
1411#
1412# tcp_outgoing_address 2001:db8::1 to_ipv6
1413# tcp_outgoing_address 10.1.0.3 !to_ipv6
1414#
1415# WARNING:
1416# 'dst ipv6' bases its selection assuming DIRECT access.
1417# If peers are used the peername ACL are needed to select outgoing
1418# address which can link to the peer.
1419#
1420# 'dst ipv6' is a slow ACL. It will only work here if 'dst' is used
1421# previously in the http_access rules to locate the destination IP.
1422# Some more magic may be needed for that:
1423# http_access allow to_ipv6 !all
1424# (meaning, allow if to IPv6 but not from anywhere ;)
1425#
1426#Default:
1427# none
1428
1429# SSL OPTIONS
1430# -----------------------------------------------------------------------------
1431
1432# TAG: ssl_unclean_shutdown
1433# Note: This option is only available if Squid is rebuilt with the
1434# --enable-ssl option
1435#
1436# Some browsers (especially MSIE) bugs out on SSL shutdown
1437# messages.
1438#Default:
1439# ssl_unclean_shutdown off
1440
1441# TAG: ssl_engine
1442# Note: This option is only available if Squid is rebuilt with the
1443# --enable-ssl option
1444#
1445# The OpenSSL engine to use. You will need to set this if you
1446# would like to use hardware SSL acceleration for example.
1447#Default:
1448# none
1449
1450# TAG: sslproxy_client_certificate
1451# Note: This option is only available if Squid is rebuilt with the
1452# --enable-ssl option
1453#
1454# Client SSL Certificate to use when proxying https:// URLs
1455#Default:
1456# none
1457
1458# TAG: sslproxy_client_key
1459# Note: This option is only available if Squid is rebuilt with the
1460# --enable-ssl option
1461#
1462# Client SSL Key to use when proxying https:// URLs
1463#Default:
1464# none
1465
1466# TAG: sslproxy_version
1467# Note: This option is only available if Squid is rebuilt with the
1468# --enable-ssl option
1469#
1470# SSL version level to use when proxying https:// URLs
1471#Default:
1472# sslproxy_version 1
1473
1474# TAG: sslproxy_options
1475# Note: This option is only available if Squid is rebuilt with the
1476# --enable-ssl option
1477#
1478# SSL engine options to use when proxying https:// URLs
1479#
1480# The most important being:
1481#
1482# NO_SSLv2 Disallow the use of SSLv2
1483# NO_SSLv3 Disallow the use of SSLv3
1484# NO_TLSv1 Disallow the use of TLSv1
1485# SINGLE_DH_USE
1486# Always create a new key when using
1487# temporary/ephemeral DH key exchanges
1488#
1489# These options vary depending on your SSL engine.
1490# See the OpenSSL SSL_CTX_set_options documentation for a
1491# complete list of possible options.
1492#Default:
1493# none
1494
1495# TAG: sslproxy_cipher
1496# Note: This option is only available if Squid is rebuilt with the
1497# --enable-ssl option
1498#
1499# SSL cipher list to use when proxying https:// URLs
1500#
1501# Colon separated list of supported ciphers.
1502#Default:
1503# none
1504
1505# TAG: sslproxy_cafile
1506# Note: This option is only available if Squid is rebuilt with the
1507# --enable-ssl option
1508#
1509# file containing CA certificates to use when verifying server
1510# certificates while proxying https:// URLs
1511#Default:
1512# none
1513
1514# TAG: sslproxy_capath
1515# Note: This option is only available if Squid is rebuilt with the
1516# --enable-ssl option
1517#
1518# directory containing CA certificates to use when verifying
1519# server certificates while proxying https:// URLs
1520#Default:
1521# none
1522
1523# TAG: ssl_bump
1524# Note: This option is only available if Squid is rebuilt with the
1525# --enable-ssl option
1526#
1527# This ACL controls which CONNECT requests to an http_port
1528# marked with an sslBump flag are actually "bumped". Please
1529# see the sslBump flag of an http_port option for more details
1530# about decoding proxied SSL connections.
1531#
1532# By default, no requests are bumped.
1533#
1534# See also: http_port ssl-bump
1535#
1536# This clause supports both fast and slow acl types.
1537# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1538#
1539#
1540# # Example: Bump all requests except those originating from localhost and
1541# # those going to webax.com or example.com sites.
1542#
1543# acl localhost src 127.0.0.1/32
1544# acl broken_sites dstdomain .webax.com
1545# acl broken_sites dstdomain .example.com
1546# ssl_bump deny localhost
1547# ssl_bump deny broken_sites
1548# ssl_bump allow all
1549#Default:
1550# none
1551
1552# TAG: sslproxy_flags
1553# Note: This option is only available if Squid is rebuilt with the
1554# --enable-ssl option
1555#
1556# Various flags modifying the use of SSL while proxying https:// URLs:
1557# DONT_VERIFY_PEER Accept certificates that fail verification.
1558# For refined control, see sslproxy_cert_error.
1559# NO_DEFAULT_CA Don't use the default CA list built in
1560# to OpenSSL.
1561#Default:
1562# none
1563
1564# TAG: sslproxy_cert_error
1565# Note: This option is only available if Squid is rebuilt with the
1566# --enable-ssl option
1567#
1568# Use this ACL to bypass server certificate validation errors.
1569#
1570# For example, the following lines will bypass all validation errors
1571# when talking to servers located at 172.16.0.0/16. All other
1572# validation errors will result in ERR_SECURE_CONNECT_FAIL error.
1573#
1574# acl BrokenServersAtTrustedIP dst 172.16.0.0/16
1575# sslproxy_cert_error allow BrokenServersAtTrustedIP
1576# sslproxy_cert_error deny all
1577#
1578# This clause only supports fast acl types.
1579# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1580# Using slow acl types may result in server crashes
1581#
1582# Without this option, all server certificate validation errors
1583# terminate the transaction. Bypassing validation errors is dangerous
1584# because an error usually implies that the server cannot be trusted and
1585# the connection may be insecure.
1586#
1587# See also: sslproxy_flags and DONT_VERIFY_PEER.
1588#
1589# Default setting: sslproxy_cert_error deny all
1590#Default:
1591# none
1592
1593# TAG: sslpassword_program
1594# Note: This option is only available if Squid is rebuilt with the
1595# --enable-ssl option
1596#
1597# Specify a program used for entering SSL key passphrases
1598# when using encrypted SSL certificate keys. If not specified
1599# keys must either be unencrypted, or Squid started with the -N
1600# option to allow it to query interactively for the passphrase.
1601#
1602# The key file name is given as argument to the program allowing
1603# selection of the right password if you have multiple encrypted
1604# keys.
1605#Default:
1606# none
1607
1608#OPTIONS RELATING TO EXTERNAL SSL_CRTD
1609#-----------------------------------------------------------------------------
1610
1611# TAG: sslcrtd_program
1612# Note: This option is only available if Squid is rebuilt with the
1613# -DUSE_SSL_CRTD define
1614#
1615# Specify the location and options of the executable for ssl_crtd process.
1616# /usr/lib/squid3/ssl_crtd program requires -s and -M parameters
1617# For more information use:
1618# /usr/lib/squid3/ssl_crtd -h
1619#Default:
1620# sslcrtd_program /usr/lib/squid3/ssl_crtd -s /var/lib/ssl_db -M 4MB
1621
1622# TAG: sslcrtd_children
1623# Note: This option is only available if Squid is rebuilt with the
1624# -DUSE_SSL_CRTD define
1625#
1626# The maximum number of processes spawn to service ssl server.
1627# The maximum this may be safely set to is 32.
1628#
1629# You must have at least one ssl_crtd process.
1630#Default:
1631# sslcrtd_children 5
1632
1633# OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
1634# -----------------------------------------------------------------------------
1635
1636cache_peer 192.168.56.3 sibling 3128 3130 default
1637
1638# TAG: cache_peer
1639# To specify other caches in a hierarchy, use the format:
1640#
1641# cache_peer hostname type http-port icp-port [options]
1642#
1643# For example,
1644#
1645# # proxy icp
1646# # hostname type port port options
1647# # -------------------- -------- ----- ----- -----------
1648# cache_peer parent.foo.net parent 3128 3130 default
1649# cache_peer sib1.foo.net sibling 3128 3130 proxy-only
1650# cache_peer sib2.foo.net sibling 3128 3130 proxy-only
1651# cache_peer example.com parent 80 0 default
1652# cache_peer cdn.example.com sibling 3128 0
1653#
1654# type: either 'parent', 'sibling', or 'multicast'.
1655#
1656# proxy-port: The port number where the peer accept HTTP requests.
1657# For other Squid proxies this is usually 3128
1658# For web servers this is usually 80
1659#
1660# icp-port: Used for querying neighbor caches about objects.
1661# Set to 0 if the peer does not support ICP or HTCP.
1662# See ICP and HTCP options below for additional details.
1663#
1664#
1665# ==== ICP OPTIONS ====
1666#
1667# You MUST also set icp_port and icp_access explicitly when using these options.
1668# The defaults will prevent peer traffic using ICP.
1669#
1670#
1671# no-query Disable ICP queries to this neighbor.
1672#
1673# multicast-responder
1674# Indicates the named peer is a member of a multicast group.
1675# ICP queries will not be sent directly to the peer, but ICP
1676# replies will be accepted from it.
1677#
1678# closest-only Indicates that, for ICP_OP_MISS replies, we'll only forward
1679# CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes.
1680#
1681# background-ping
1682# To only send ICP queries to this neighbor infrequently.
1683# This is used to keep the neighbor round trip time updated
1684# and is usually used in conjunction with weighted-round-robin.
1685#
1686#
1687# ==== HTCP OPTIONS ====
1688#
1689# You MUST also set htcp_port and htcp_access explicitly when using these options.
1690# The defaults will prevent peer traffic using HTCP.
1691#
1692#
1693# htcp Send HTCP, instead of ICP, queries to the neighbor.
1694# You probably also want to set the "icp-port" to 4827
1695# instead of 3130.
1696#
1697# htcp-oldsquid Send HTCP to old Squid versions.
1698#
1699# htcp-no-clr Send HTCP to the neighbor but without
1700# sending any CLR requests. This cannot be used with
1701# htcp-only-clr.
1702#
1703# htcp-only-clr Send HTCP to the neighbor but ONLY CLR requests.
1704# This cannot be used with htcp-no-clr.
1705#
1706# htcp-no-purge-clr
1707# Send HTCP to the neighbor including CLRs but only when
1708# they do not result from PURGE requests.
1709#
1710# htcp-forward-clr
1711# Forward any HTCP CLR requests this proxy receives to the peer.
1712#
1713#
1714# ==== PEER SELECTION METHODS ====
1715#
1716# The default peer selection method is ICP, with the first responding peer
1717# being used as source. These options can be used for better load balancing.
1718#
1719#
1720# default This is a parent cache which can be used as a "last-resort"
1721# if a peer cannot be located by any of the peer-selection methods.
1722# If specified more than once, only the first is used.
1723#
1724# round-robin Load-Balance parents which should be used in a round-robin
1725# fashion in the absence of any ICP queries.
1726# weight=N can be used to add bias.
1727#
1728# weighted-round-robin
1729# Load-Balance parents which should be used in a round-robin
1730# fashion with the frequency of each parent being based on the
1731# round trip time. Closer parents are used more often.
1732# Usually used for background-ping parents.
1733# weight=N can be used to add bias.
1734#
1735# carp Load-Balance parents which should be used as a CARP array.
1736# The requests will be distributed among the parents based on the
1737# CARP load balancing hash function based on their weight.
1738#
1739# userhash Load-balance parents based on the client proxy_auth or ident username.
1740#
1741# sourcehash Load-balance parents based on the client source IP.
1742#
1743# multicast-siblings
1744# To be used only for cache peers of type "multicast".
1745# ALL members of this multicast group have "sibling"
1746# relationship with it, not "parent". This is to a multicast
1747# group when the requested object would be fetched only from
1748# a "parent" cache, anyway. It's useful, e.g., when
1749# configuring a pool of redundant Squid proxies, being
1750# members of the same multicast group.
1751#
1752#
1753# ==== PEER SELECTION OPTIONS ====
1754#
1755# weight=N use to affect the selection of a peer during any weighted
1756# peer-selection mechanisms.
1757# The weight must be an integer; default is 1,
1758# larger weights are favored more.
1759# This option does not affect parent selection if a peering
1760# protocol is not in use.
1761#
1762# basetime=N Specify a base amount to be subtracted from round trip
1763# times of parents.
1764# It is subtracted before division by weight in calculating
1765# which parent to fectch from. If the rtt is less than the
1766# base time the rtt is set to a minimal value.
1767#
1768# ttl=N Specify a TTL to use when sending multicast ICP queries
1769# to this address.
1770# Only useful when sending to a multicast group.
1771# Because we don't accept ICP replies from random
1772# hosts, you must configure other group members as
1773# peers with the 'multicast-responder' option.
1774#
1775# no-delay To prevent access to this neighbor from influencing the
1776# delay pools.
1777#
1778# digest-url=URL Tell Squid to fetch the cache digest (if digests are
1779# enabled) for this host from the specified URL rather
1780# than the Squid default location.
1781#
1782#
1783# ==== ACCELERATOR / REVERSE-PROXY OPTIONS ====
1784#
1785# originserver Causes this parent to be contacted as an origin server.
1786# Meant to be used in accelerator setups when the peer
1787# is a web server.
1788#
1789# forceddomain=name
1790# Set the Host header of requests forwarded to this peer.
1791# Useful in accelerator setups where the server (peer)
1792# expects a certain domain name but clients may request
1793# others. ie example.com or www.example.com
1794#
1795# no-digest Disable request of cache digests.
1796#
1797# no-netdb-exchange
1798# Disables requesting ICMP RTT database (NetDB).
1799#
1800#
1801# ==== AUTHENTICATION OPTIONS ====
1802#
1803# login=user:password
1804# If this is a personal/workgroup proxy and your parent
1805# requires proxy authentication.
1806#
1807# Note: The string can include URL escapes (i.e. %20 for
1808# spaces). This also means % must be written as %%.
1809#
1810# login=PROXYPASS
1811# Send login details received from client to this peer.
1812# Authentication is not required, nor changed.
1813#
1814# Note: This will pass any form of authentication but
1815# only Basic auth will work through a proxy unless the
1816# connection-auth options are also used.
1817#
1818# login=PASS Send login details received from client to this peer.
1819# Authentication is not required by this option.
1820# If there are no client-provided authentication headers
1821# to pass on, but username and password are available
1822# from either proxy login or an external ACL user= and
1823# password= result tags they may be sent instead.
1824#
1825# Note: To combine this with proxy_auth both proxies must
1826# share the same user database as HTTP only allows for
1827# a single login (one for proxy, one for origin server).
1828# Also be warned this will expose your users proxy
1829# password to the peer. USE WITH CAUTION
1830#
1831# login=*:password
1832# Send the username to the upstream cache, but with a
1833# fixed password. This is meant to be used when the peer
1834# is in another administrative domain, but it is still
1835# needed to identify each user.
1836# The star can optionally be followed by some extra
1837# information which is added to the username. This can
1838# be used to identify this proxy to the peer, similar to
1839# the login=username:password option above.
1840#
1841# connection-auth=on|off
1842# Tell Squid that this peer does or not support Microsoft
1843# connection oriented authentication, and any such
1844# challenges received from there should be ignored.
1845# Default is auto to automatically determine the status
1846# of the peer.
1847#
1848#
1849# ==== SSL / HTTPS / TLS OPTIONS ====
1850#
1851# ssl Encrypt connections to this peer with SSL/TLS.
1852#
1853# sslcert=/path/to/ssl/certificate
1854# A client SSL certificate to use when connecting to
1855# this peer.
1856#
1857# sslkey=/path/to/ssl/key
1858# The private SSL key corresponding to sslcert above.
1859# If 'sslkey' is not specified 'sslcert' is assumed to
1860# reference a combined file containing both the
1861# certificate and the key.
1862#
1863# Notes:
1864#
1865# On Debian/Ubuntu systems a default snakeoil certificate is
1866# available in /etc/ss and users can set:
1867#
1868# cert=/etc/ssl/certs/ssl-cert-snakeoil.pem
1869#
1870# and
1871#
1872# key=/etc/ssl/private/ssl-cert-snakeoil.key
1873#
1874# for testing.
1875#
1876# sslversion=1|2|3|4
1877# The SSL version to use when connecting to this peer
1878# 1 = automatic (default)
1879# 2 = SSL v2 only
1880# 3 = SSL v3 only
1881# 4 = TLS v1 only
1882#
1883# sslcipher=... The list of valid SSL ciphers to use when connecting
1884# to this peer.
1885#
1886# ssloptions=... Specify various SSL engine options:
1887# NO_SSLv2 Disallow the use of SSLv2
1888# NO_SSLv3 Disallow the use of SSLv3
1889# NO_TLSv1 Disallow the use of TLSv1
1890# See src/ssl_support.c or the OpenSSL documentation for
1891# a more complete list.
1892#
1893# sslcafile=... A file containing additional CA certificates to use
1894# when verifying the peer certificate.
1895#
1896# sslcapath=... A directory containing additional CA certificates to
1897# use when verifying the peer certificate.
1898#
1899# sslcrlfile=... A certificate revocation list file to use when
1900# verifying the peer certificate.
1901#
1902# sslflags=... Specify various flags modifying the SSL implementation:
1903#
1904# DONT_VERIFY_PEER
1905# Accept certificates even if they fail to
1906# verify.
1907# NO_DEFAULT_CA
1908# Don't use the default CA list built in
1909# to OpenSSL.
1910# DONT_VERIFY_DOMAIN
1911# Don't verify the peer certificate
1912# matches the server name
1913#
1914# ssldomain= The peer name as advertised in it's certificate.
1915# Used for verifying the correctness of the received peer
1916# certificate. If not specified the peer hostname will be
1917# used.
1918#
1919# front-end-https
1920# Enable the "Front-End-Https: On" header needed when
1921# using Squid as a SSL frontend in front of Microsoft OWA.
1922# See MS KB document Q307347 for details on this header.
1923# If set to auto the header will only be added if the
1924# request is forwarded as a https:// URL.
1925#
1926#
1927# ==== GENERAL OPTIONS ====
1928#
1929# connect-timeout=N
1930# A peer-specific connect timeout.
1931# Also see the peer_connect_timeout directive.
1932#
1933# connect-fail-limit=N
1934# How many times connecting to a peer must fail before
1935# it is marked as down. Default is 10.
1936#
1937# allow-miss Disable Squid's use of only-if-cached when forwarding
1938# requests to siblings. This is primarily useful when
1939# icp_hit_stale is used by the sibling. To extensive use
1940# of this option may result in forwarding loops, and you
1941# should avoid having two-way peerings with this option.
1942# For example to deny peer usage on requests from peer
1943# by denying cache_peer_access if the source is a peer.
1944#
1945# max-conn=N Limit the amount of connections Squid may open to this
1946# peer. see also
1947#
1948# name=xxx Unique name for the peer.
1949# Required if you have multiple peers on the same host
1950# but different ports.
1951# This name can be used in cache_peer_access and similar
1952# directives to dentify the peer.
1953# Can be used by outgoing access controls through the
1954# peername ACL type.
1955#
1956# no-tproxy Do not use the client-spoof TPROXY support when forwarding
1957# requests to this peer. Use normal address selection instead.
1958#
1959# proxy-only objects fetched from the peer will not be stored locally.
1960#
1961#Default:
1962# none
1963
1964# TAG: cache_peer_domain
1965# Use to limit the domains for which a neighbor cache will be
1966# queried. Usage:
1967#
1968# cache_peer_domain cache-host domain [domain ...]
1969# cache_peer_domain cache-host !domain
1970#
1971# For example, specifying
1972#
1973# cache_peer_domain parent.foo.net .edu
1974#
1975# has the effect such that UDP query packets are sent to
1976# 'bigserver' only when the requested object exists on a
1977# server in the .edu domain. Prefixing the domainname
1978# with '!' means the cache will be queried for objects
1979# NOT in that domain.
1980#
1981# NOTE: * Any number of domains may be given for a cache-host,
1982# either on the same or separate lines.
1983# * When multiple domains are given for a particular
1984# cache-host, the first matched domain is applied.
1985# * Cache hosts with no domain restrictions are queried
1986# for all requests.
1987# * There are no defaults.
1988# * There is also a 'cache_peer_access' tag in the ACL
1989# section.
1990#Default:
1991# none
1992
1993# TAG: cache_peer_access
1994# Similar to 'cache_peer_domain' but provides more flexibility by
1995# using ACL elements.
1996#
1997# cache_peer_access cache-host allow|deny [!]aclname ...
1998#
1999# The syntax is identical to 'http_access' and the other lists of
2000# ACL elements. See the comments for 'http_access' below, or
2001# the Squid FAQ (http://wiki.squid-cache.org/SquidFaq/SquidAcl).
2002#Default:
2003# none
2004
2005# TAG: neighbor_type_domain
2006# usage: neighbor_type_domain neighbor parent|sibling domain domain ...
2007#
2008# Modifying the neighbor type for specific domains is now
2009# possible. You can treat some domains differently than the the
2010# default neighbor type specified on the 'cache_peer' line.
2011# Normally it should only be necessary to list domains which
2012# should be treated differently because the default neighbor type
2013# applies for hostnames which do not match domains listed here.
2014#
2015#EXAMPLE:
2016# cache_peer cache.foo.org parent 3128 3130
2017# neighbor_type_domain cache.foo.org sibling .com .net
2018# neighbor_type_domain cache.foo.org sibling .au .de
2019#Default:
2020# none
2021
2022# TAG: dead_peer_timeout (seconds)
2023# This controls how long Squid waits to declare a peer cache
2024# as "dead." If there are no ICP replies received in this
2025# amount of time, Squid will declare the peer dead and not
2026# expect to receive any further ICP replies. However, it
2027# continues to send ICP queries, and will mark the peer as
2028# alive upon receipt of the first subsequent ICP reply.
2029#
2030# This timeout also affects when Squid expects to receive ICP
2031# replies from peers. If more than 'dead_peer' seconds have
2032# passed since the last ICP reply was received, Squid will not
2033# expect to receive an ICP reply on the next query. Thus, if
2034# your time between requests is greater than this timeout, you
2035# will see a lot of requests sent DIRECT to origin servers
2036# instead of to your parents.
2037#Default:
2038# dead_peer_timeout 10 seconds
2039
2040# TAG: forward_max_tries
2041# Controls how many different forward paths Squid will try
2042# before giving up. See also forward_timeout.
2043#Default:
2044# forward_max_tries 25
2045
2046# TAG: hierarchy_stoplist
2047# A list of words which, if found in a URL, cause the object to
2048# be handled directly by this cache. In other words, use this
2049# to not query neighbor caches for certain objects. You may
2050# list this option multiple times.
2051#
2052# Example:
2053# hierarchy_stoplist cgi-bin ?
2054#
2055# Note: never_direct overrides this option.
2056#Default:
2057# none
2058
2059# MEMORY CACHE OPTIONS
2060# -----------------------------------------------------------------------------
2061
2062# TAG: cache_mem (bytes)
2063# NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
2064# IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
2065# USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
2066# THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
2067#
2068# 'cache_mem' specifies the ideal amount of memory to be used
2069# for:
2070# * In-Transit objects
2071# * Hot Objects
2072# * Negative-Cached objects
2073#
2074# Data for these objects are stored in 4 KB blocks. This
2075# parameter specifies the ideal upper limit on the total size of
2076# 4 KB blocks allocated. In-Transit objects take the highest
2077# priority.
2078#
2079# In-transit objects have priority over the others. When
2080# additional space is needed for incoming data, negative-cached
2081# and hot objects will be released. In other words, the
2082# negative-cached and hot objects will fill up any unused space
2083# not needed for in-transit objects.
2084#
2085# If circumstances require, this limit will be exceeded.
2086# Specifically, if your incoming request rate requires more than
2087# 'cache_mem' of memory to hold in-transit objects, Squid will
2088# exceed this limit to satisfy the new requests. When the load
2089# decreases, blocks will be freed until the high-water mark is
2090# reached. Thereafter, blocks will be used to store hot
2091# objects.
2092#Default:
2093# cache_mem 256 MB
2094
2095# TAG: maximum_object_size_in_memory (bytes)
2096# Objects greater than this size will not be attempted to kept in
2097# the memory cache. This should be set high enough to keep objects
2098# accessed frequently in memory to improve performance whilst low
2099# enough to keep larger objects from hoarding cache_mem.
2100#Default:
2101# maximum_object_size_in_memory 512 KB
2102
2103# TAG: memory_replacement_policy
2104# The memory replacement policy parameter determines which
2105# objects are purged from memory when memory space is needed.
2106#
2107# See cache_replacement_policy for details.
2108#Default:
2109# memory_replacement_policy lru
2110
2111# DISK CACHE OPTIONS
2112# -----------------------------------------------------------------------------
2113
2114# TAG: cache_replacement_policy
2115# The cache replacement policy parameter determines which
2116# objects are evicted (replaced) when disk space is needed.
2117#
2118# lru : Squid's original list based LRU policy
2119# heap GDSF : Greedy-Dual Size Frequency
2120# heap LFUDA: Least Frequently Used with Dynamic Aging
2121# heap LRU : LRU policy implemented using a heap
2122#
2123# Applies to any cache_dir lines listed below this.
2124#
2125# The LRU policies keeps recently referenced objects.
2126#
2127# The heap GDSF policy optimizes object hit rate by keeping smaller
2128# popular objects in cache so it has a better chance of getting a
2129# hit. It achieves a lower byte hit rate than LFUDA though since
2130# it evicts larger (possibly popular) objects.
2131#
2132# The heap LFUDA policy keeps popular objects in cache regardless of
2133# their size and thus optimizes byte hit rate at the expense of
2134# hit rate since one large, popular object will prevent many
2135# smaller, slightly less popular objects from being cached.
2136#
2137# Both policies utilize a dynamic aging mechanism that prevents
2138# cache pollution that can otherwise occur with frequency-based
2139# replacement policies.
2140#
2141# NOTE: if using the LFUDA replacement policy you should increase
2142# the value of maximum_object_size above its default of 4096 KB to
2143# to maximize the potential byte hit rate improvement of LFUDA.
2144#
2145# For more information about the GDSF and LFUDA cache replacement
2146# policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
2147# and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
2148#Default:
2149# cache_replacement_policy lru
2150
2151# TAG: cache_dir
2152# Usage:
2153#
2154# cache_dir Type Directory-Name Fs-specific-data [options]
2155#
2156# You can specify multiple cache_dir lines to spread the
2157# cache among different disk partitions.
2158#
2159# Type specifies the kind of storage system to use. Only "ufs"
2160# is built by default. To enable any of the other storage systems
2161# see the --enable-storeio configure option.
2162#
2163# 'Directory' is a top-level directory where cache swap
2164# files will be stored. If you want to use an entire disk
2165# for caching, this can be the mount-point directory.
2166# The directory must exist and be writable by the Squid
2167# process. Squid will NOT create this directory for you.
2168#
2169# The ufs store type:
2170#
2171# "ufs" is the old well-known Squid storage format that has always
2172# been there.
2173#
2174# cache_dir ufs Directory-Name Mbytes L1 L2 [options]
2175#
2176# 'Mbytes' is the amount of disk space (MB) to use under this
2177# directory. The default is 100 MB. Change this to suit your
2178# configuration. Do NOT put the size of your disk drive here.
2179# Instead, if you want Squid to use the entire disk drive,
2180# subtract 20% and use that value.
2181#
2182# 'L1' is the number of first-level subdirectories which
2183# will be created under the 'Directory'. The default is 16.
2184#
2185# 'L2' is the number of second-level subdirectories which
2186# will be created under each first-level directory. The default
2187# is 256.
2188#
2189# The aufs store type:
2190#
2191# "aufs" uses the same storage format as "ufs", utilizing
2192# POSIX-threads to avoid blocking the main Squid process on
2193# disk-I/O. This was formerly known in Squid as async-io.
2194#
2195# cache_dir aufs Directory-Name Mbytes L1 L2 [options]
2196#
2197# see argument descriptions under ufs above
2198#
2199# The diskd store type:
2200#
2201# "diskd" uses the same storage format as "ufs", utilizing a
2202# separate process to avoid blocking the main Squid process on
2203# disk-I/O.
2204#
2205# cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
2206#
2207# see argument descriptions under ufs above
2208#
2209# Q1 specifies the number of unacknowledged I/O requests when Squid
2210# stops opening new files. If this many messages are in the queues,
2211# Squid won't open new files. Default is 64
2212#
2213# Q2 specifies the number of unacknowledged messages when Squid
2214# starts blocking. If this many messages are in the queues,
2215# Squid blocks until it receives some replies. Default is 72
2216#
2217# When Q1 < Q2 (the default), the cache directory is optimized
2218# for lower response time at the expense of a decrease in hit
2219# ratio. If Q1 > Q2, the cache directory is optimized for
2220# higher hit ratio at the expense of an increase in response
2221# time.
2222#
2223# The coss store type:
2224#
2225# NP: COSS filesystem in Squid-3 has been deemed too unstable for
2226# production use and has thus been removed from this release.
2227# We hope that it can be made usable again soon.
2228#
2229# block-size=n defines the "block size" for COSS cache_dir's.
2230# Squid uses file numbers as block numbers. Since file numbers
2231# are limited to 24 bits, the block size determines the maximum
2232# size of the COSS partition. The default is 512 bytes, which
2233# leads to a maximum cache_dir size of 512<<24, or 8 GB. Note
2234# you should not change the coss block size after Squid
2235# has written some objects to the cache_dir.
2236#
2237# The coss file store has changed from 2.5. Now it uses a file
2238# called 'stripe' in the directory names in the config - and
2239# this will be created by squid -z.
2240#
2241# Common options:
2242#
2243# no-store, no new objects should be stored to this cache_dir
2244#
2245# max-size=n, refers to the max object size in bytes this cache_dir
2246# supports. It is used to select the cache_dir to store the object.
2247# Note: To make optimal use of the max-size limits you should order
2248# the cache_dir lines with the smallest max-size value first and the
2249# ones with no max-size specification last.
2250#
2251# Note for coss, max-size must be less than COSS_MEMBUF_SZ,
2252# which can be changed with the --with-coss-membuf-size=N configure
2253# option.
2254#
2255
2256# Uncomment and adjust the following to add a disk cache directory.
2257#cache_dir ufs /var/spool/squid3 100 16 256
2258
2259# TAG: store_dir_select_algorithm
2260# Set this to 'round-robin' as an alternative.
2261#Default:
2262# store_dir_select_algorithm least-load
2263
2264# TAG: max_open_disk_fds
2265# To avoid having disk as the I/O bottleneck Squid can optionally
2266# bypass the on-disk cache if more than this amount of disk file
2267# descriptors are open.
2268#
2269# A value of 0 indicates no limit.
2270#Default:
2271# max_open_disk_fds 0
2272
2273# TAG: minimum_object_size (bytes)
2274# Objects smaller than this size will NOT be saved on disk. The
2275# value is specified in kilobytes, and the default is 0 KB, which
2276# means there is no minimum.
2277#Default:
2278# minimum_object_size 0 KB
2279
2280# TAG: maximum_object_size (bytes)
2281# Objects larger than this size will NOT be saved on disk. The
2282# value is specified in kilobytes, and the default is 4MB. If
2283# you wish to get a high BYTES hit ratio, you should probably
2284# increase this (one 32 MB object hit counts for 3200 10KB
2285# hits). If you wish to increase speed more than your want to
2286# save bandwidth you should leave this low.
2287#
2288# NOTE: if using the LFUDA replacement policy you should increase
2289# this value to maximize the byte hit rate improvement of LFUDA!
2290# See replacement_policy below for a discussion of this policy.
2291#Default:
2292# maximum_object_size 4096 KB
2293
2294# TAG: cache_swap_low (percent, 0-100)
2295#Default:
2296# cache_swap_low 90
2297
2298# TAG: cache_swap_high (percent, 0-100)
2299#
2300# The low- and high-water marks for cache object replacement.
2301# Replacement begins when the swap (disk) usage is above the
2302# low-water mark and attempts to maintain utilization near the
2303# low-water mark. As swap utilization gets close to high-water
2304# mark object eviction becomes more aggressive. If utilization is
2305# close to the low-water mark less replacement is done each time.
2306#
2307# Defaults are 90% and 95%. If you have a large cache, 5% could be
2308# hundreds of MB. If this is the case you may wish to set these
2309# numbers closer together.
2310#Default:
2311# cache_swap_high 95
2312
2313# LOGFILE OPTIONS
2314# -----------------------------------------------------------------------------
2315
2316# TAG: logformat
2317# Usage:
2318#
2319# logformat <name> <format specification>
2320#
2321# Defines an access log format.
2322#
2323# The <format specification> is a string with embedded % format codes
2324#
2325# % format codes all follow the same basic structure where all but
2326# the formatcode is optional. Output strings are automatically escaped
2327# as required according to their context and the output format
2328# modifiers are usually not needed, but can be specified if an explicit
2329# output format is desired.
2330#
2331# % ["|[|'|#] [-] [[0]width] [{argument}] formatcode
2332#
2333# " output in quoted string format
2334# [ output in squid text log format as used by log_mime_hdrs
2335# # output in URL quoted format
2336# ' output as-is
2337#
2338# - left aligned
2339# width field width. If starting with 0 the
2340# output is zero padded
2341# {arg} argument such as header name etc
2342#
2343# Format codes:
2344#
2345# % a literal % character
2346# >a Client source IP address
2347# >A Client FQDN
2348# >p Client source port
2349# <A Server IP address or peer name
2350# la Local IP address (http_port)
2351# lp Local port number (http_port)
2352# <la Local IP address of the last server or peer connection
2353# <lp Local port number of the last server or peer connection
2354# ts Seconds since epoch
2355# tu subsecond time (milliseconds)
2356# tl Local time. Optional strftime format argument
2357# default %d/%b/%Y:%H:%M:%S %z
2358# tg GMT time. Optional strftime format argument
2359# default %d/%b/%Y:%H:%M:%S %z
2360# tr Response time (milliseconds)
2361# dt Total time spent making DNS lookups (milliseconds)
2362#
2363# HTTP cache related format codes:
2364#
2365# [http::]>h Original request header. Optional header name argument
2366# on the format header[:[separator]element]
2367# [http::]>ha The HTTP request headers after adaptation and redirection.
2368# Optional header name argument as for >h
2369# [http::]<h Reply header. Optional header name argument
2370# as for >h
2371# [http::]un User name
2372# [http::]ul User name from authentication
2373# [http::]ui User name from ident
2374# [http::]us User name from SSL
2375# [http::]ue User name from external acl helper
2376# [http::]>Hs HTTP status code sent to the client
2377# [http::]<Hs HTTP status code received from the next hop
2378# [http::]Ss Squid request status (TCP_MISS etc)
2379# [http::]Sh Squid hierarchy status (DEFAULT_PARENT etc)
2380# [http::]mt MIME content type
2381# [http::]rm Request method (GET/POST etc)
2382# [http::]ru Request URL
2383# [http::]rp Request URL-Path excluding hostname
2384# [http::]rv Request protocol version
2385# [http::]et Tag returned by external acl
2386# [http::]ea Log string returned by external acl
2387# [http::]<st Sent reply size including HTTP headers
2388# [http::]>st Received request size including HTTP headers. In the
2389# case of chunked requests the chunked encoding metadata
2390# are not included
2391# [http::]>sh Received HTTP request headers size
2392# [http::]<sh Sent HTTP reply headers size
2393# [http::]st Request+Reply size including HTTP headers
2394# [http::]<sH Reply high offset sent
2395# [http::]<sS Upstream object size
2396# [http::]<pt Peer response time in milliseconds. The timer starts
2397# when the last request byte is sent to the next hop
2398# and stops when the last response byte is received.
2399# [http::]<tt Total server-side time in milliseconds. The timer
2400# starts with the first connect request (or write I/O)
2401# sent to the first selected peer. The timer stops
2402# with the last I/O with the last peer.
2403#
2404# If ICAP is enabled, the following two codes become available (as
2405# well as ICAP log codes documented with the icap_log option):
2406#
2407# icap::tt Total ICAP processing time for the HTTP
2408# transaction. The timer ticks when ICAP
2409# ACLs are checked and when ICAP
2410# transaction is in progress.
2411#
2412# icap::<last_h The header of the last ICAP response
2413# related to the HTTP transaction. Like
2414# <h, accepts an optional header name
2415# argument. Will not change semantics
2416# when multiple ICAP transactions per HTTP
2417# transaction are supported.
2418#
2419# If adaptation is enabled the following two codes become available:
2420#
2421# adapt::sum_trs Summed adaptation transaction response
2422# times recorded as a comma-separated list in
2423# the order of transaction start time. Each time
2424# value is recorded as an integer number,
2425# representing response time of one or more
2426# adaptation (ICAP or eCAP) transaction in
2427# milliseconds. When a failed transaction is
2428# being retried or repeated, its time is not
2429# logged individually but added to the
2430# replacement (next) transaction. See also:
2431# adapt::all_trs.
2432#
2433# adapt::all_trs All adaptation transaction response times.
2434# Same as adaptation_strs but response times of
2435# individual transactions are never added
2436# together. Instead, all transaction response
2437# times are recorded individually.
2438#
2439# You can prefix adapt::*_trs format codes with adaptation
2440# service name in curly braces to record response time(s) specific
2441# to that service. For example: %{my_service}adapt::sum_trs
2442#
2443# The default formats available (which do not need re-defining) are:
2444#
2445#logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %un %Sh/%<A %mt
2446#logformat squidmime %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %un %Sh/%<A %mt [%>h] [%<h]
2447#logformat common %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh
2448#logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
2449#Default:
2450# none
2451
2452# TAG: access_log
2453# These files log client request activities. Has a line every HTTP or
2454# ICP request. The format is:
2455# access_log <filepath> [<logformat name> [acl acl ...]]
2456# access_log none [acl acl ...]]
2457#
2458# Will log to the specified file using the specified format (which
2459# must be defined in a logformat directive) those entries which match
2460# ALL the acl's specified (which must be defined in acl clauses).
2461#
2462# If no acl is specified, all requests will be logged to this file.
2463#
2464# To disable logging of a request use the filepath "none", in which case
2465# a logformat name should not be specified.
2466#
2467# To log the request via syslog specify a filepath of "syslog":
2468#
2469# access_log syslog[:facility.priority] [format [acl1 [acl2 ....]]]
2470# where facility could be any of:
2471# authpriv, daemon, local0 .. local7 or user.
2472#
2473# And priority could be any of:
2474# err, warning, notice, info, debug.
2475#
2476# Default:
2477# access_log /var/log/squid3/access.log squid
2478#Default:
2479# access_log /var/log/squid3/access.log squid
2480
2481# TAG: icap_log
2482# ICAP log files record ICAP transaction summaries, one line per
2483# transaction.
2484#
2485# The icap_log option format is:
2486# icap_log <filepath> [<logformat name> [acl acl ...]]
2487# icap_log none [acl acl ...]]
2488#
2489# Please see access_log option documentation for details. The two
2490# kinds of logs share the overall configuration approach and many
2491# features.
2492#
2493# ICAP processing of a single HTTP message or transaction may
2494# require multiple ICAP transactions. In such cases, multiple
2495# ICAP transaction log lines will correspond to a single access
2496# log line.
2497#
2498# ICAP log uses logformat codes that make sense for an ICAP
2499# transaction. Header-related codes are applied to the HTTP header
2500# embedded in an ICAP server response, with the following caveats:
2501# For REQMOD, there is no HTTP response header unless the ICAP
2502# server performed request satisfaction. For RESPMOD, the HTTP
2503# request header is the header sent to the ICAP server. For
2504# OPTIONS, there are no HTTP headers.
2505#
2506# The following format codes are also available for ICAP logs:
2507#
2508# icap::<A ICAP server IP address. Similar to <A.
2509#
2510# icap::<service_name ICAP service name from the icap_service
2511# option in Squid configuration file.
2512#
2513# icap::ru ICAP Request-URI. Similar to ru.
2514#
2515# icap::rm ICAP request method (REQMOD, RESPMOD, or
2516# OPTIONS). Similar to existing rm.
2517#
2518# icap::>st Bytes sent to the ICAP server (TCP payload
2519# only; i.e., what Squid writes to the socket).
2520#
2521# icap::<st Bytes received from the ICAP server (TCP
2522# payload only; i.e., what Squid reads from
2523# the socket).
2524#
2525# icap::tr Transaction response time (in
2526# milliseconds). The timer starts when
2527# the ICAP transaction is created and
2528# stops when the transaction is completed.
2529# Similar to tr.
2530#
2531# icap::tio Transaction I/O time (in milliseconds). The
2532# timer starts when the first ICAP request
2533# byte is scheduled for sending. The timers
2534# stops when the last byte of the ICAP response
2535# is received.
2536#
2537# icap::to Transaction outcome: ICAP_ERR* for all
2538# transaction errors, ICAP_OPT for OPTION
2539# transactions, ICAP_ECHO for 204
2540# responses, ICAP_MOD for message
2541# modification, and ICAP_SAT for request
2542# satisfaction. Similar to Ss.
2543#
2544# icap::Hs ICAP response status code. Similar to Hs.
2545#
2546# icap::>h ICAP request header(s). Similar to >h.
2547#
2548# icap::<h ICAP response header(s). Similar to <h.
2549#
2550# The default ICAP log format, which can be used without an explicit
2551# definition, is called icap_squid:
2552#
2553#logformat icap_squid %ts.%03tu %6icap::tr %>a %icap::to/%03icap::Hs %icap::<size %icap::rm %icap::ru% %un -/%icap::<A -
2554#
2555# See also: logformat, log_icap, and %icap::<last_h
2556#Default:
2557# none
2558
2559# TAG: log_access allow|deny acl acl...
2560# This options allows you to control which requests gets logged
2561# to access.log (see access_log directive). Requests denied for
2562# logging will also not be accounted for in performance counters.
2563#
2564# This clause only supports fast acl types.
2565# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2566#Default:
2567# none
2568
2569# TAG: log_icap
2570# This options allows you to control which requests get logged
2571# to icap.log. See the icap_log directive for ICAP log details.
2572#Default:
2573# none
2574
2575# TAG: cache_store_log
2576# Logs the activities of the storage manager. Shows which
2577# objects are ejected from the cache, and which objects are
2578# saved and for how long. To disable, enter "none" or remove the line.
2579# There are not really utilities to analyze this data, so you can safely
2580# disable it.
2581#
2582# Example:
2583# cache_store_log /var/log/squid3/store.log
2584#Default:
2585# none
2586
2587# TAG: cache_swap_state
2588# Location for the cache "swap.state" file. This index file holds
2589# the metadata of objects saved on disk. It is used to rebuild
2590# the cache during startup. Normally this file resides in each
2591# 'cache_dir' directory, but you may specify an alternate
2592# pathname here. Note you must give a full filename, not just
2593# a directory. Since this is the index for the whole object
2594# list you CANNOT periodically rotate it!
2595#
2596# If %s can be used in the file name it will be replaced with a
2597# a representation of the cache_dir name where each / is replaced
2598# with '.'. This is needed to allow adding/removing cache_dir
2599# lines when cache_swap_log is being used.
2600#
2601# If have more than one 'cache_dir', and %s is not used in the name
2602# these swap logs will have names such as:
2603#
2604# cache_swap_log.00
2605# cache_swap_log.01
2606# cache_swap_log.02
2607#
2608# The numbered extension (which is added automatically)
2609# corresponds to the order of the 'cache_dir' lines in this
2610# configuration file. If you change the order of the 'cache_dir'
2611# lines in this file, these index files will NOT correspond to
2612# the correct 'cache_dir' entry (unless you manually rename
2613# them). We recommend you do NOT use this option. It is
2614# better to keep these index files in each 'cache_dir' directory.
2615#Default:
2616# none
2617
2618# TAG: logfile_rotate
2619# Specifies the number of logfile rotations to make when you
2620# type 'squid -k rotate'. The default is 10, which will rotate
2621# with extensions 0 through 9. Setting logfile_rotate to 0 will
2622# disable the file name rotation, but the logfiles are still closed
2623# and re-opened. This will enable you to rename the logfiles
2624# yourself just before sending the rotate signal.
2625#
2626# Note, the 'squid -k rotate' command normally sends a USR1
2627# signal to the running squid process. In certain situations
2628# (e.g. on Linux with Async I/O), USR1 is used for other
2629# purposes, so -k rotate uses another signal. It is best to get
2630# in the habit of using 'squid -k rotate' instead of 'kill -USR1
2631# <pid>'.
2632#
2633# Note, from Squid-3.1 this option has no effect on the cache.log,
2634# that log can be rotated separately by using debug_options
2635#
2636# Note2, for Debian/Linux the default of logfile_rotate is
2637# zero, since it includes external logfile-rotation methods.
2638#Default:
2639# logfile_rotate 0
2640
2641# TAG: emulate_httpd_log on|off
2642# The Cache can emulate the log file format which many 'httpd'
2643# programs use. To disable/enable this emulation, set
2644# emulate_httpd_log to 'off' or 'on'. The default
2645# is to use the native log format since it includes useful
2646# information Squid-specific log analyzers use.
2647#Default:
2648# emulate_httpd_log off
2649
2650# TAG: log_ip_on_direct on|off
2651# Log the destination IP address in the hierarchy log tag when going
2652# direct. Earlier Squid versions logged the hostname here. If you
2653# prefer the old way set this to off.
2654#Default:
2655# log_ip_on_direct on
2656
2657# TAG: mime_table
2658# Pathname to Squid's MIME table. You shouldn't need to change
2659# this, but the default file contains examples and formatting
2660# information if you do.
2661#Default:
2662# mime_table /usr/share/squid3/mime.conf
2663
2664# TAG: log_mime_hdrs on|off
2665# The Cache can record both the request and the response MIME
2666# headers for each HTTP transaction. The headers are encoded
2667# safely and will appear as two bracketed fields at the end of
2668# the access log (for either the native or httpd-emulated log
2669# formats). To enable this logging set log_mime_hdrs to 'on'.
2670#Default:
2671# log_mime_hdrs off
2672
2673# TAG: useragent_log
2674# Note: This option is only available if Squid is rebuilt with the
2675# --enable-useragent-log option
2676#
2677# Squid will write the User-Agent field from HTTP requests
2678# to the filename specified here. By default useragent_log
2679# is disabled.
2680#Default:
2681# none
2682
2683# TAG: referer_log
2684# Note: This option is only available if Squid is rebuilt with the
2685# --enable-referer-log option
2686#
2687# Squid will write the Referer field from HTTP requests to the
2688# filename specified here. By default referer_log is disabled.
2689# Note that "referer" is actually a misspelling of "referrer"
2690# however the misspelt version has been accepted into the HTTP RFCs
2691# and we accept both.
2692#Default:
2693# none
2694
2695# TAG: pid_filename
2696# A filename to write the process-id to. To disable, enter "none".
2697#Default:
2698# pid_filename /var/run/squid3.pid
2699
2700# TAG: log_fqdn on|off
2701# Turn this on if you wish to log fully qualified domain names
2702# in the access.log. To do this Squid does a DNS lookup of all
2703# IP's connecting to it. This can (in some situations) increase
2704# latency, which makes your cache seem slower for interactive
2705# browsing.
2706#Default:
2707# log_fqdn off
2708
2709# TAG: client_netmask
2710# A netmask for client addresses in logfiles and cachemgr output.
2711# Change this to protect the privacy of your cache clients.
2712# A netmask of 255.255.255.0 will log all IP's in that range with
2713# the last digit set to '0'.
2714#Default:
2715# client_netmask no_addr
2716
2717# TAG: forward_log
2718# Note: This option is only available if Squid is rebuilt with the
2719# -DWIP_FWD_LOG define
2720#
2721# Logs the server-side requests.
2722#
2723# This is currently work in progress.
2724#Default:
2725# none
2726
2727# TAG: strip_query_terms
2728# By default, Squid strips query terms from requested URLs before
2729# logging. This protects your user's privacy.
2730#Default:
2731# strip_query_terms on
2732
2733# TAG: buffered_logs on|off
2734# cache.log log file is written with stdio functions, and as such
2735# it can be buffered or unbuffered. By default it will be unbuffered.
2736# Buffering it can speed up the writing slightly (though you are
2737# unlikely to need to worry unless you run with tons of debugging
2738# enabled in which case performance will suffer badly anyway..).
2739#Default:
2740# buffered_logs off
2741
2742# TAG: netdb_filename
2743# Note: This option is only available if Squid is rebuilt with the
2744# --enable-icmp option
2745#
2746# A filename where Squid stores it's netdb state between restarts.
2747# To disable, enter "none".
2748#Default:
2749# netdb_filename /var/log/squid3/netdb.state
2750
2751# OPTIONS FOR TROUBLESHOOTING
2752# -----------------------------------------------------------------------------
2753
2754# TAG: cache_log
2755# Cache logging file. This is where general information about
2756# your cache's behavior goes. You can increase the amount of data
2757# logged to this file and how often its rotated with "debug_options"
2758#Default:
2759# cache_log /var/log/squid3/cache.log
2760
2761# TAG: debug_options
2762# Logging options are set as section,level where each source file
2763# is assigned a unique section. Lower levels result in less
2764# output, Full debugging (level 9) can result in a very large
2765# log file, so be careful.
2766#
2767# The magic word "ALL" sets debugging levels for all sections.
2768# We recommend normally running with "ALL,1".
2769#
2770# The rotate=N option can be used to keep more or less of these logs
2771# than would otherwise be kept by logfile_rotate.
2772# For most uses a single log should be enough to monitor current
2773# events affecting Squid.
2774#Default:
2775# debug_options ALL,1
2776
2777# TAG: coredump_dir
2778# By default Squid leaves core files in the directory from where
2779# it was started. If you set 'coredump_dir' to a directory
2780# that exists, Squid will chdir() to that directory at startup
2781# and coredump files will be left there.
2782#
2783#Default:
2784# coredump_dir none
2785#
2786
2787# Leave coredumps in the first cache dir
2788coredump_dir /var/spool/squid3
2789
2790# OPTIONS FOR FTP GATEWAYING
2791# -----------------------------------------------------------------------------
2792
2793# TAG: ftp_user
2794# If you want the anonymous login password to be more informative
2795# (and enable the use of picky ftp servers), set this to something
2796# reasonable for your domain, like wwwuser@somewhere.net
2797#
2798# The reason why this is domainless by default is the
2799# request can be made on the behalf of a user in any domain,
2800# depending on how the cache is used.
2801# Some ftp server also validate the email address is valid
2802# (for example perl.com).
2803#Default:
2804# ftp_user Squid@
2805
2806# TAG: ftp_list_width
2807# Sets the width of ftp listings. This should be set to fit in
2808# the width of a standard browser. Setting this too small
2809# can cut off long filenames when browsing ftp sites.
2810#Default:
2811# ftp_list_width 32
2812
2813# TAG: ftp_passive
2814# If your firewall does not allow Squid to use passive
2815# connections, turn off this option.
2816#
2817# Use of ftp_epsv_all option requires this to be ON.
2818#Default:
2819# ftp_passive on
2820
2821# TAG: ftp_epsv_all
2822# FTP Protocol extensions permit the use of a special "EPSV ALL" command.
2823#
2824# NATs may be able to put the connection on a "fast path" through the
2825# translator, as the EPRT command will never be used and therefore,
2826# translation of the data portion of the segments will never be needed.
2827#
2828# When a client only expects to do two-way FTP transfers this may be
2829# useful.
2830# If squid finds that it must do a three-way FTP transfer after issuing
2831# an EPSV ALL command, the FTP session will fail.
2832#
2833# If you have any doubts about this option do not use it.
2834# Squid will nicely attempt all other connection methods.
2835#
2836# Requires ftp_passive to be ON (default) for any effect.
2837#Default:
2838# ftp_epsv_all off
2839
2840# TAG: ftp_epsv
2841# FTP Protocol extensions permit the use of a special "EPSV" command.
2842#
2843# NATs may be able to put the connection on a "fast path" through the
2844# translator using EPSV, as the EPRT command will never be used
2845# and therefore, translation of the data portion of the segments
2846# will never be needed.
2847#
2848# Turning this OFF will prevent EPSV being attempted.
2849# WARNING: Doing so will convert Squid back to the old behavior with all
2850# the related problems with external NAT devices/layers.
2851#
2852# Requires ftp_passive to be ON (default) for any effect.
2853#Default:
2854# ftp_epsv on
2855
2856# TAG: ftp_eprt
2857# FTP Protocol extensions permit the use of a special "EPRT" command.
2858#
2859# This extension provides a protocol neutral alternative to the
2860# IPv4-only PORT command. When supported it enables active FTP data
2861# channels over IPv6 and efficient NAT handling.
2862#
2863# Turning this OFF will prevent EPRT being attempted and will skip
2864# straight to using PORT for IPv4 servers.
2865#
2866# Some devices are known to not handle this extension correctly and
2867# may result in crashes. Devices which suport EPRT enough to fail
2868# cleanly will result in Squid attempting PORT anyway. This directive
2869# should only be disabled when EPRT results in device failures.
2870#
2871# WARNING: Doing so will convert Squid back to the old behavior with all
2872# the related problems with external NAT devices/layers and IPv4-only FTP.
2873#Default:
2874# ftp_eprt on
2875
2876# TAG: ftp_sanitycheck
2877# For security and data integrity reasons Squid by default performs
2878# sanity checks of the addresses of FTP data connections ensure the
2879# data connection is to the requested server. If you need to allow
2880# FTP connections to servers using another IP address for the data
2881# connection turn this off.
2882#Default:
2883# ftp_sanitycheck on
2884
2885# TAG: ftp_telnet_protocol
2886# The FTP protocol is officially defined to use the telnet protocol
2887# as transport channel for the control connection. However, many
2888# implementations are broken and does not respect this aspect of
2889# the FTP protocol.
2890#
2891# If you have trouble accessing files with ASCII code 255 in the
2892# path or similar problems involving this ASCII code you can
2893# try setting this directive to off. If that helps, report to the
2894# operator of the FTP server in question that their FTP server
2895# is broken and does not follow the FTP standard.
2896#Default:
2897# ftp_telnet_protocol on
2898
2899# OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
2900# -----------------------------------------------------------------------------
2901
2902# TAG: diskd_program
2903# Specify the location of the diskd executable.
2904# Note this is only useful if you have compiled in
2905# diskd as one of the store io modules.
2906#Default:
2907# diskd_program /usr/lib/squid3/diskd
2908
2909# TAG: unlinkd_program
2910# Specify the location of the executable for file deletion process.
2911#Default:
2912# unlinkd_program /usr/lib/squid3/unlinkd
2913
2914# TAG: pinger_program
2915# Note: This option is only available if Squid is rebuilt with the
2916# --enable-icmp option
2917#
2918# Specify the location of the executable for the pinger process.
2919#Default:
2920# pinger_program /usr/lib/squid3/pinger
2921
2922# TAG: pinger_enable
2923# Note: This option is only available if Squid is rebuilt with the
2924# --enable-icmp option
2925#
2926# Control whether the pinger is active at run-time.
2927# Enables turning ICMP pinger on and off with a simple
2928# squid -k reconfigure.
2929#Default:
2930# pinger_enable off
2931
2932# OPTIONS FOR URL REWRITING
2933# -----------------------------------------------------------------------------
2934
2935# TAG: url_rewrite_program
2936# Specify the location of the executable URL rewriter to use.
2937# Since they can perform almost any function there isn't one included.
2938#
2939# For each requested URL, the rewriter will receive on line with the format
2940#
2941# URL <SP> client_ip "/" fqdn <SP> user <SP> method [<SP> kvpairs]<NL>
2942#
2943# In the future, the rewriter interface will be extended with
2944# key=value pairs ("kvpairs" shown above). Rewriter programs
2945# should be prepared to receive and possibly ignore additional
2946# whitespace-separated tokens on each input line.
2947#
2948# And the rewriter may return a rewritten URL. The other components of
2949# the request line does not need to be returned (ignored if they are).
2950#
2951# The rewriter can also indicate that a client-side redirect should
2952# be performed to the new URL. This is done by prefixing the returned
2953# URL with "301:" (moved permanently) or 302: (moved temporarily), etc.
2954#
2955# By default, a URL rewriter is not used.
2956#Default:
2957# none
2958
2959# TAG: url_rewrite_children
2960# The number of redirector processes to spawn. If you start
2961# too few Squid will have to wait for them to process a backlog of
2962# URLs, slowing it down. If you start too many they will use RAM
2963# and other system resources.
2964#Default:
2965# url_rewrite_children 5
2966
2967# TAG: url_rewrite_concurrency
2968# The number of requests each redirector helper can handle in
2969# parallel. Defaults to 0 which indicates the redirector
2970# is a old-style single threaded redirector.
2971#
2972# When this directive is set to a value >= 1 then the protocol
2973# used to communicate with the helper is modified to include
2974# a request ID in front of the request/response. The request
2975# ID from the request must be echoed back with the response
2976# to that request.
2977#Default:
2978# url_rewrite_concurrency 0
2979
2980# TAG: url_rewrite_host_header
2981# By default Squid rewrites any Host: header in redirected
2982# requests. If you are running an accelerator this may
2983# not be a wanted effect of a redirector.
2984#
2985# WARNING: Entries are cached on the result of the URL rewriting
2986# process, so be careful if you have domain-virtual hosts.
2987#Default:
2988# url_rewrite_host_header on
2989
2990# TAG: url_rewrite_access
2991# If defined, this access list specifies which requests are
2992# sent to the redirector processes. By default all requests
2993# are sent.
2994#
2995# This clause supports both fast and slow acl types.
2996# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2997#Default:
2998# none
2999
3000# TAG: url_rewrite_bypass
3001# When this is 'on', a request will not go through the
3002# redirector if all redirectors are busy. If this is 'off'
3003# and the redirector queue grows too large, Squid will exit
3004# with a FATAL error and ask you to increase the number of
3005# redirectors. You should only enable this if the redirectors
3006# are not critical to your caching system. If you use
3007# redirectors for access control, and you enable this option,
3008# users may have access to pages they should not
3009# be allowed to request.
3010#Default:
3011# url_rewrite_bypass off
3012
3013# OPTIONS FOR TUNING THE CACHE
3014# -----------------------------------------------------------------------------
3015
3016# TAG: cache
3017# A list of ACL elements which, if matched and denied, cause the request to
3018# not be satisfied from the cache and the reply to not be cached.
3019# In other words, use this to force certain objects to never be cached.
3020#
3021# You must use the words 'allow' or 'deny' to indicate whether items
3022# matching the ACL should be allowed or denied into the cache.
3023#
3024# Default is to allow all to be cached.
3025#
3026# This clause supports both fast and slow acl types.
3027# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
3028#Default:
3029# none
3030
3031# TAG: refresh_pattern
3032# usage: refresh_pattern [-i] regex min percent max [options]
3033#
3034# By default, regular expressions are CASE-SENSITIVE. To make
3035# them case-insensitive, use the -i option.
3036#
3037# 'Min' is the time (in minutes) an object without an explicit
3038# expiry time should be considered fresh. The recommended
3039# value is 0, any higher values may cause dynamic applications
3040# to be erroneously cached unless the application designer
3041# has taken the appropriate actions.
3042#
3043# 'Percent' is a percentage of the objects age (time since last
3044# modification age) an object without explicit expiry time
3045# will be considered fresh.
3046#
3047# 'Max' is an upper limit on how long objects without an explicit
3048# expiry time will be considered fresh.
3049#
3050# options: override-expire
3051# override-lastmod
3052# reload-into-ims
3053# ignore-reload
3054# ignore-no-cache
3055# ignore-no-store
3056# ignore-must-revalidate
3057# ignore-private
3058# ignore-auth
3059# refresh-ims
3060#
3061# override-expire enforces min age even if the server
3062# sent an explicit expiry time (e.g., with the
3063# Expires: header or Cache-Control: max-age). Doing this
3064# VIOLATES the HTTP standard. Enabling this feature
3065# could make you liable for problems which it causes.
3066#
3067# Note: override-expire does not enforce staleness - it only extends
3068# freshness / min. If the server returns a Expires time which
3069# is longer than your max time, Squid will still consider
3070# the object fresh for that period of time.
3071#
3072# override-lastmod enforces min age even on objects
3073# that were modified recently.
3074#
3075# reload-into-ims changes client no-cache or ``reload''
3076# to If-Modified-Since requests. Doing this VIOLATES the
3077# HTTP standard. Enabling this feature could make you
3078# liable for problems which it causes.
3079#
3080# ignore-reload ignores a client no-cache or ``reload''
3081# header. Doing this VIOLATES the HTTP standard. Enabling
3082# this feature could make you liable for problems which
3083# it causes.
3084#
3085# ignore-no-cache ignores any ``Pragma: no-cache'' and
3086# ``Cache-control: no-cache'' headers received from a server.
3087# The HTTP RFC never allows the use of this (Pragma) header
3088# from a server, only a client, though plenty of servers
3089# send it anyway.
3090#
3091# ignore-no-store ignores any ``Cache-control: no-store''
3092# headers received from a server. Doing this VIOLATES
3093# the HTTP standard. Enabling this feature could make you
3094# liable for problems which it causes.
3095#
3096# ignore-must-revalidate ignores any ``Cache-Control: must-revalidate``
3097# headers received from a server. Doing this VIOLATES
3098# the HTTP standard. Enabling this feature could make you
3099# liable for problems which it causes.
3100#
3101# ignore-private ignores any ``Cache-control: private''
3102# headers received from a server. Doing this VIOLATES
3103# the HTTP standard. Enabling this feature could make you
3104# liable for problems which it causes.
3105#
3106# ignore-auth caches responses to requests with authorization,
3107# as if the originserver had sent ``Cache-control: public''
3108# in the response header. Doing this VIOLATES the HTTP standard.
3109# Enabling this feature could make you liable for problems which
3110# it causes.
3111#
3112# refresh-ims causes squid to contact the origin server
3113# when a client issues an If-Modified-Since request. This
3114# ensures that the client will receive an updated version
3115# if one is available.
3116#
3117# Basically a cached object is:
3118#
3119# FRESH if expires < now, else STALE
3120# STALE if age > max
3121# FRESH if lm-factor < percent, else STALE
3122# FRESH if age < min
3123# else STALE
3124#
3125# The refresh_pattern lines are checked in the order listed here.
3126# The first entry which matches is used. If none of the entries
3127# match the default will be used.
3128#
3129# Note, you must uncomment all the default lines if you want
3130# to change one. The default setting is only active if none is
3131# used.
3132#
3133#
3134
3135# Add any of your own refresh_pattern entries above these.
3136refresh_pattern ^ftp: 1440 20% 10080
3137refresh_pattern ^gopher: 1440 0% 1440
3138refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
3139refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
3140# example lin deb packages
3141#refresh_pattern (\.deb|\.udeb)$ 129600 100% 129600
3142refresh_pattern . 0 20% 4320
3143
3144# TAG: quick_abort_min (KB)
3145#Default:
3146# quick_abort_min 16 KB
3147
3148# TAG: quick_abort_max (KB)
3149#Default:
3150# quick_abort_max 16 KB
3151
3152# TAG: quick_abort_pct (percent)
3153# The cache by default continues downloading aborted requests
3154# which are almost completed (less than 16 KB remaining). This
3155# may be undesirable on slow (e.g. SLIP) links and/or very busy
3156# caches. Impatient users may tie up file descriptors and
3157# bandwidth by repeatedly requesting and immediately aborting
3158# downloads.
3159#
3160# When the user aborts a request, Squid will check the
3161# quick_abort values to the amount of data transfered until
3162# then.
3163#
3164# If the transfer has less than 'quick_abort_min' KB remaining,
3165# it will finish the retrieval.
3166#
3167# If the transfer has more than 'quick_abort_max' KB remaining,
3168# it will abort the retrieval.
3169#
3170# If more than 'quick_abort_pct' of the transfer has completed,
3171# it will finish the retrieval.
3172#
3173# If you do not want any retrieval to continue after the client
3174# has aborted, set both 'quick_abort_min' and 'quick_abort_max'
3175# to '0 KB'.
3176#
3177# If you want retrievals to always continue if they are being
3178# cached set 'quick_abort_min' to '-1 KB'.
3179#Default:
3180# quick_abort_pct 95
3181
3182# TAG: read_ahead_gap buffer-size
3183# The amount of data the cache will buffer ahead of what has been
3184# sent to the client when retrieving an object from another server.
3185#Default:
3186# read_ahead_gap 16 KB
3187
3188# TAG: negative_ttl time-units
3189# Set the Default Time-to-Live (TTL) for failed requests.
3190# Certain types of failures (such as "connection refused" and
3191# "404 Not Found") are able to be negatively-cached for a short time.
3192# Modern web servers should provide Expires: header, however if they
3193# do not this can provide a minimum TTL.
3194# The default is not to cache errors with unknown expiry details.
3195#
3196# Note that this is different from negative caching of DNS lookups.
3197#
3198# WARNING: Doing this VIOLATES the HTTP standard. Enabling
3199# this feature could make you liable for problems which it
3200# causes.
3201#Default:
3202# negative_ttl 0 seconds
3203
3204# TAG: positive_dns_ttl time-units
3205# Upper limit on how long Squid will cache positive DNS responses.
3206# Default is 6 hours (360 minutes). This directive must be set
3207# larger than negative_dns_ttl.
3208#Default:
3209# positive_dns_ttl 6 hours
3210
3211# TAG: negative_dns_ttl time-units
3212# Time-to-Live (TTL) for negative caching of failed DNS lookups.
3213# This also sets the lower cache limit on positive lookups.
3214# Minimum value is 1 second, and it is not recommendable to go
3215# much below 10 seconds.
3216#Default:
3217# negative_dns_ttl 1 minutes
3218
3219# TAG: range_offset_limit (bytes)
3220# Sets a upper limit on how far into the the file a Range request
3221# may be to cause Squid to prefetch the whole file. If beyond this
3222# limit Squid forwards the Range request as it is and the result
3223# is NOT cached.
3224#
3225# This is to stop a far ahead range request (lets say start at 17MB)
3226# from making Squid fetch the whole object up to that point before
3227# sending anything to the client.
3228#
3229# A value of 0 causes Squid to never fetch more than the
3230# client requested. (default)
3231#
3232# A value of -1 causes Squid to always fetch the object from the
3233# beginning so it may cache the result. (2.0 style)
3234#
3235# NP: Using -1 here will override any quick_abort settings that may
3236# otherwise apply to the range request. The range request will
3237# be fully fetched from start to finish regardless of the client
3238# actions. This affects bandwidth usage.
3239#Default:
3240# range_offset_limit 0 KB
3241
3242# TAG: minimum_expiry_time (seconds)
3243# The minimum caching time according to (Expires - Date)
3244# Headers Squid honors if the object can't be revalidated
3245# defaults to 60 seconds. In reverse proxy environments it
3246# might be desirable to honor shorter object lifetimes. It
3247# is most likely better to make your server return a
3248# meaningful Last-Modified header however. In ESI environments
3249# where page fragments often have short lifetimes, this will
3250# often be best set to 0.
3251#Default:
3252# minimum_expiry_time 60 seconds
3253
3254# TAG: store_avg_object_size (kbytes)
3255# Average object size, used to estimate number of objects your
3256# cache can hold. The default is 13 KB.
3257#Default:
3258# store_avg_object_size 13 KB
3259
3260# TAG: store_objects_per_bucket
3261# Target number of objects per bucket in the store hash table.
3262# Lowering this value increases the total number of buckets and
3263# also the storage maintenance rate. The default is 20.
3264#Default:
3265# store_objects_per_bucket 20
3266
3267# HTTP OPTIONS
3268# -----------------------------------------------------------------------------
3269
3270# TAG: request_header_max_size (KB)
3271# This specifies the maximum size for HTTP headers in a request.
3272# Request headers are usually relatively small (about 512 bytes).
3273# Placing a limit on the request header size will catch certain
3274# bugs (for example with persistent connections) and possibly
3275# buffer-overflow or denial-of-service attacks.
3276#Default:
3277# request_header_max_size 64 KB
3278
3279# TAG: reply_header_max_size (KB)
3280# This specifies the maximum size for HTTP headers in a reply.
3281# Reply headers are usually relatively small (about 512 bytes).
3282# Placing a limit on the reply header size will catch certain
3283# bugs (for example with persistent connections) and possibly
3284# buffer-overflow or denial-of-service attacks.
3285#Default:
3286# reply_header_max_size 64 KB
3287
3288# TAG: request_body_max_size (bytes)
3289# This specifies the maximum size for an HTTP request body.
3290# In other words, the maximum size of a PUT/POST request.
3291# A user who attempts to send a request with a body larger
3292# than this limit receives an "Invalid Request" error message.
3293# If you set this parameter to a zero (the default), there will
3294# be no limit imposed.
3295#Default:
3296# request_body_max_size 0 KB
3297
3298# TAG: client_request_buffer_max_size (bytes)
3299# This specifies the maximum buffer size of a client request.
3300# It prevents squid eating too much memory when somebody uploads
3301# a large file.
3302#Default:
3303# client_request_buffer_max_size 512 KB
3304
3305# TAG: chunked_request_body_max_size (bytes)
3306# A broken or confused HTTP/1.1 client may send a chunked HTTP
3307# request to Squid. Squid does not have full support for that
3308# feature yet. To cope with such requests, Squid buffers the
3309# entire request and then dechunks request body to create a
3310# plain HTTP/1.0 request with a known content length. The plain
3311# request is then used by the rest of Squid code as usual.
3312#
3313# The option value specifies the maximum size of the buffer used
3314# to hold the request before the conversion. If the chunked
3315# request size exceeds the specified limit, the conversion
3316# fails, and the client receives an "unsupported request" error,
3317# as if dechunking was disabled.
3318#
3319# Dechunking is enabled by default. To disable conversion of
3320# chunked requests, set the maximum to zero.
3321#
3322# Request dechunking feature and this option in particular are a
3323# temporary hack. When chunking requests and responses are fully
3324# supported, there will be no need to buffer a chunked request.
3325#Default:
3326# chunked_request_body_max_size 64 KB
3327
3328# TAG: broken_posts
3329# A list of ACL elements which, if matched, causes Squid to send
3330# an extra CRLF pair after the body of a PUT/POST request.
3331#
3332# Some HTTP servers has broken implementations of PUT/POST,
3333# and rely on an extra CRLF pair sent by some WWW clients.
3334#
3335# Quote from RFC2616 section 4.1 on this matter:
3336#
3337# Note: certain buggy HTTP/1.0 client implementations generate an
3338# extra CRLF's after a POST request. To restate what is explicitly
3339# forbidden by the BNF, an HTTP/1.1 client must not preface or follow
3340# a request with an extra CRLF.
3341#
3342# This clause only supports fast acl types.
3343# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
3344#
3345#Example:
3346# acl buggy_server url_regex ^http://....
3347# broken_posts allow buggy_server
3348#Default:
3349# none
3350
3351# TAG: icap_uses_indirect_client on|off
3352# Controls whether the indirect client IP address (instead of the direct
3353# client IP address) is passed to adaptation services.
3354#
3355# See also: follow_x_forwarded_for adaptation_send_client_ip
3356#Default:
3357# icap_uses_indirect_client on
3358
3359# TAG: via on|off
3360# If set (default), Squid will include a Via header in requests and
3361# replies as required by RFC2616.
3362#Default:
3363# via on
3364
3365# TAG: ie_refresh on|off
3366# Microsoft Internet Explorer up until version 5.5 Service
3367# Pack 1 has an issue with transparent proxies, wherein it
3368# is impossible to force a refresh. Turning this on provides
3369# a partial fix to the problem, by causing all IMS-REFRESH
3370# requests from older IE versions to check the origin server
3371# for fresh content. This reduces hit ratio by some amount
3372# (~10% in my experience), but allows users to actually get
3373# fresh content when they want it. Note because Squid
3374# cannot tell if the user is using 5.5 or 5.5SP1, the behavior
3375# of 5.5 is unchanged from old versions of Squid (i.e. a
3376# forced refresh is impossible). Newer versions of IE will,
3377# hopefully, continue to have the new behavior and will be
3378# handled based on that assumption. This option defaults to
3379# the old Squid behavior, which is better for hit ratios but
3380# worse for clients using IE, if they need to be able to
3381# force fresh content.
3382#Default:
3383# ie_refresh off
3384
3385# TAG: vary_ignore_expire on|off
3386# Many HTTP servers supporting Vary gives such objects
3387# immediate expiry time with no cache-control header
3388# when requested by a HTTP/1.0 client. This option
3389# enables Squid to ignore such expiry times until
3390# HTTP/1.1 is fully implemented.
3391#
3392# WARNING: If turned on this may eventually cause some
3393# varying objects not intended for caching to get cached.
3394#Default:
3395# vary_ignore_expire off
3396
3397# TAG: request_entities
3398# Squid defaults to deny GET and HEAD requests with request entities,
3399# as the meaning of such requests are undefined in the HTTP standard
3400# even if not explicitly forbidden.
3401#
3402# Set this directive to on if you have clients which insists
3403# on sending request entities in GET or HEAD requests. But be warned
3404# that there is server software (both proxies and web servers) which
3405# can fail to properly process this kind of request which may make you
3406# vulnerable to cache pollution attacks if enabled.
3407#Default:
3408# request_entities off
3409
3410# TAG: request_header_access
3411# Usage: request_header_access header_name allow|deny [!]aclname ...
3412#
3413# WARNING: Doing this VIOLATES the HTTP standard. Enabling
3414# this feature could make you liable for problems which it
3415# causes.
3416#
3417# This option replaces the old 'anonymize_headers' and the
3418# older 'http_anonymizer' option with something that is much
3419# more configurable. This new method creates a list of ACLs
3420# for each header, allowing you very fine-tuned header
3421# mangling.
3422#
3423# This option only applies to request headers, i.e., from the
3424# client to the server.
3425#
3426# You can only specify known headers for the header name.
3427# Other headers are reclassified as 'Other'. You can also
3428# refer to all the headers with 'All'.
3429#
3430# For example, to achieve the same behavior as the old
3431# 'http_anonymizer standard' option, you should use:
3432#
3433# request_header_access From deny all
3434# request_header_access Referer deny all
3435# request_header_access Server deny all
3436# request_header_access User-Agent deny all
3437# request_header_access WWW-Authenticate deny all
3438# request_header_access Link deny all
3439#
3440# Or, to reproduce the old 'http_anonymizer paranoid' feature
3441# you should use:
3442#
3443# request_header_access Allow allow all
3444# request_header_access Authorization allow all
3445# request_header_access WWW-Authenticate allow all
3446# request_header_access Proxy-Authorization allow all
3447# request_header_access Proxy-Authenticate allow all
3448# request_header_access Cache-Control allow all
3449# request_header_access Content-Encoding allow all
3450# request_header_access Content-Length allow all
3451# request_header_access Content-Type allow all
3452# request_header_access Date allow all
3453# request_header_access Expires allow all
3454# request_header_access Host allow all
3455# request_header_access If-Modified-Since allow all
3456# request_header_access Last-Modified allow all
3457# request_header_access Location allow all
3458# request_header_access Pragma allow all
3459# request_header_access Accept allow all
3460# request_header_access Accept-Charset allow all
3461# request_header_access Accept-Encoding allow all
3462# request_header_access Accept-Language allow all
3463# request_header_access Content-Language allow all
3464# request_header_access Mime-Version allow all
3465# request_header_access Retry-After allow all
3466# request_header_access Title allow all
3467# request_header_access Connection allow all
3468# request_header_access All deny all
3469#
3470# although many of those are HTTP reply headers, and so should be
3471# controlled with the reply_header_access directive.
3472#
3473# By default, all headers are allowed (no anonymizing is
3474# performed).
3475#Default:
3476# none
3477
3478# TAG: reply_header_access
3479# Usage: reply_header_access header_name allow|deny [!]aclname ...
3480#
3481# WARNING: Doing this VIOLATES the HTTP standard. Enabling
3482# this feature could make you liable for problems which it
3483# causes.
3484#
3485# This option only applies to reply headers, i.e., from the
3486# server to the client.
3487#
3488# This is the same as request_header_access, but in the other
3489# direction.
3490#
3491# This option replaces the old 'anonymize_headers' and the
3492# older 'http_anonymizer' option with something that is much
3493# more configurable. This new method creates a list of ACLs
3494# for each header, allowing you very fine-tuned header
3495# mangling.
3496#
3497# You can only specify known headers for the header name.
3498# Other headers are reclassified as 'Other'. You can also
3499# refer to all the headers with 'All'.
3500#
3501# For example, to achieve the same behavior as the old
3502# 'http_anonymizer standard' option, you should use:
3503#
3504# reply_header_access From deny all
3505# reply_header_access Referer deny all
3506# reply_header_access Server deny all
3507# reply_header_access User-Agent deny all
3508# reply_header_access WWW-Authenticate deny all
3509# reply_header_access Link deny all
3510#
3511# Or, to reproduce the old 'http_anonymizer paranoid' feature
3512# you should use:
3513#
3514# reply_header_access Allow allow all
3515# reply_header_access Authorization allow all
3516# reply_header_access WWW-Authenticate allow all
3517# reply_header_access Proxy-Authorization allow all
3518# reply_header_access Proxy-Authenticate allow all
3519# reply_header_access Cache-Control allow all
3520# reply_header_access Content-Encoding allow all
3521# reply_header_access Content-Length allow all
3522# reply_header_access Content-Type allow all
3523# reply_header_access Date allow all
3524# reply_header_access Expires allow all
3525# reply_header_access Host allow all
3526# reply_header_access If-Modified-Since allow all
3527# reply_header_access Last-Modified allow all
3528# reply_header_access Location allow all
3529# reply_header_access Pragma allow all
3530# reply_header_access Accept allow all
3531# reply_header_access Accept-Charset allow all
3532# reply_header_access Accept-Encoding allow all
3533# reply_header_access Accept-Language allow all
3534# reply_header_access Content-Language allow all
3535# reply_header_access Mime-Version allow all
3536# reply_header_access Retry-After allow all
3537# reply_header_access Title allow all
3538# reply_header_access Connection allow all
3539# reply_header_access All deny all
3540#
3541# although the HTTP request headers won't be usefully controlled
3542# by this directive -- see request_header_access for details.
3543#
3544# By default, all headers are allowed (no anonymizing is
3545# performed).
3546#Default:
3547# none
3548
3549# TAG: request_header_replace
3550# Usage: request_header_replace header_name message
3551# Example: request_header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
3552#
3553# This option allows you to change the contents of headers
3554# denied with request_header_access above, by replacing them
3555# with some fixed string. This replaces the old fake_user_agent
3556# option.
3557#
3558# This only applies to request headers, not reply headers.
3559#
3560# By default, headers are removed if denied.
3561#Default:
3562# none
3563
3564# TAG: reply_header_replace
3565# Usage: reply_header_replace header_name message
3566# Example: reply_header_replace Server Foo/1.0
3567#
3568# This option allows you to change the contents of headers
3569# denied with reply_header_access above, by replacing them
3570# with some fixed string.
3571#
3572# This only applies to reply headers, not request headers.
3573#
3574# By default, headers are removed if denied.
3575#Default:
3576# none
3577
3578# TAG: relaxed_header_parser on|off|warn
3579# In the default "on" setting Squid accepts certain forms
3580# of non-compliant HTTP messages where it is unambiguous
3581# what the sending application intended even if the message
3582# is not correctly formatted. The messages is then normalized
3583# to the correct form when forwarded by Squid.
3584#
3585# If set to "warn" then a warning will be emitted in cache.log
3586# each time such HTTP error is encountered.
3587#
3588# If set to "off" then such HTTP errors will cause the request
3589# or response to be rejected.
3590#Default:
3591# relaxed_header_parser on
3592
3593# TAG: ignore_expect_100 on|off
3594# This option makes Squid ignore any Expect: 100-continue header present
3595# in the request. RFC 2616 requires that Squid being unable to satisfy
3596# the response expectation MUST return a 417 error.
3597#
3598# Note: Enabling this is a HTTP protocol violation, but some clients may
3599# not handle it well..
3600#Default:
3601# ignore_expect_100 off
3602
3603# TIMEOUTS
3604# -----------------------------------------------------------------------------
3605
3606# TAG: forward_timeout time-units
3607# This parameter specifies how long Squid should at most attempt in
3608# finding a forwarding path for the request before giving up.
3609#Default:
3610# forward_timeout 4 minutes
3611
3612# TAG: connect_timeout time-units
3613# This parameter specifies how long to wait for the TCP connect to
3614# the requested server or peer to complete before Squid should
3615# attempt to find another path where to forward the request.
3616#Default:
3617# connect_timeout 1 minute
3618
3619# TAG: peer_connect_timeout time-units
3620# This parameter specifies how long to wait for a pending TCP
3621# connection to a peer cache. The default is 30 seconds. You
3622# may also set different timeout values for individual neighbors
3623# with the 'connect-timeout' option on a 'cache_peer' line.
3624#Default:
3625# peer_connect_timeout 30 seconds
3626
3627# TAG: read_timeout time-units
3628# The read_timeout is applied on server-side connections. After
3629# each successful read(), the timeout will be extended by this
3630# amount. If no data is read again after this amount of time,
3631# the request is aborted and logged with ERR_READ_TIMEOUT. The
3632# default is 15 minutes.
3633#Default:
3634# read_timeout 15 minutes
3635
3636# TAG: request_timeout
3637# How long to wait for an HTTP request after initial
3638# connection establishment.
3639#Default:
3640# request_timeout 5 minutes
3641
3642# TAG: persistent_request_timeout
3643# How long to wait for the next HTTP request on a persistent
3644# connection after the previous request completes.
3645#Default:
3646# persistent_request_timeout 2 minutes
3647
3648# TAG: client_lifetime time-units
3649# The maximum amount of time a client (browser) is allowed to
3650# remain connected to the cache process. This protects the Cache
3651# from having a lot of sockets (and hence file descriptors) tied up
3652# in a CLOSE_WAIT state from remote clients that go away without
3653# properly shutting down (either because of a network failure or
3654# because of a poor client implementation). The default is one
3655# day, 1440 minutes.
3656#
3657# NOTE: The default value is intended to be much larger than any
3658# client would ever need to be connected to your cache. You
3659# should probably change client_lifetime only as a last resort.
3660# If you seem to have many client connections tying up
3661# filedescriptors, we recommend first tuning the read_timeout,
3662# request_timeout, persistent_request_timeout and quick_abort values.
3663#Default:
3664# client_lifetime 1 day
3665
3666# TAG: half_closed_clients
3667# Some clients may shutdown the sending side of their TCP
3668# connections, while leaving their receiving sides open. Sometimes,
3669# Squid can not tell the difference between a half-closed and a
3670# fully-closed TCP connection.
3671#
3672# By default, Squid will immediately close client connections when
3673# read(2) returns "no more data to read."
3674#
3675# Change this option to 'on' and Squid will keep open connections
3676# until a read(2) or write(2) on the socket returns an error.
3677# This may show some benefits for reverse proxies. But if not
3678# it is recommended to leave OFF.
3679#Default:
3680# half_closed_clients off
3681
3682# TAG: pconn_timeout
3683# Timeout for idle persistent connections to servers and other
3684# proxies.
3685#Default:
3686# pconn_timeout 1 minute
3687
3688# TAG: ident_timeout
3689# Maximum time to wait for IDENT lookups to complete.
3690#
3691# If this is too high, and you enabled IDENT lookups from untrusted
3692# users, you might be susceptible to denial-of-service by having
3693# many ident requests going at once.
3694#Default:
3695# ident_timeout 10 seconds
3696
3697# TAG: shutdown_lifetime time-units
3698# When SIGTERM or SIGHUP is received, the cache is put into
3699# "shutdown pending" mode until all active sockets are closed.
3700# This value is the lifetime to set for all open descriptors
3701# during shutdown mode. Any active clients after this many
3702# seconds will receive a 'timeout' message.
3703#Default:
3704# shutdown_lifetime 30 seconds
3705
3706# ADMINISTRATIVE PARAMETERS
3707# -----------------------------------------------------------------------------
3708
3709# TAG: cache_mgr
3710# Email-address of local cache manager who will receive
3711# mail if the cache dies. The default is "webmaster."
3712#Default:
3713# cache_mgr webmaster
3714
3715# TAG: mail_from
3716# From: email-address for mail sent when the cache dies.
3717# The default is to use 'appname@unique_hostname'.
3718# Default appname value is "squid", can be changed into
3719# src/globals.h before building squid.
3720#Default:
3721# none
3722
3723# TAG: mail_program
3724# Email program used to send mail if the cache dies.
3725# The default is "mail". The specified program must comply
3726# with the standard Unix mail syntax:
3727# mail-program recipient < mailfile
3728#
3729# Optional command line options can be specified.
3730#Default:
3731# mail_program mail
3732
3733# TAG: cache_effective_user
3734# If you start Squid as root, it will change its effective/real
3735# UID/GID to the user specified below. The default is to change
3736# to UID of proxy.
3737# see also; cache_effective_group
3738#Default:
3739# cache_effective_user proxy
3740
3741# TAG: cache_effective_group
3742# Squid sets the GID to the effective user's default group ID
3743# (taken from the password file) and supplementary group list
3744# from the groups membership.
3745#
3746# If you want Squid to run with a specific GID regardless of
3747# the group memberships of the effective user then set this
3748# to the group (or GID) you want Squid to run as. When set
3749# all other group privileges of the effective user are ignored
3750# and only this GID is effective. If Squid is not started as
3751# root the user starting Squid MUST be member of the specified
3752# group.
3753#
3754# This option is not recommended by the Squid Team.
3755# Our preference is for administrators to configure a secure
3756# user account for squid with UID/GID matching system policies.
3757#Default:
3758# none
3759
3760# TAG: httpd_suppress_version_string on|off
3761# Suppress Squid version string info in HTTP headers and HTML error pages.
3762#Default:
3763# httpd_suppress_version_string off
3764
3765# TAG: visible_hostname
3766# If you want to present a special hostname in error messages, etc,
3767# define this. Otherwise, the return value of gethostname()
3768# will be used. If you have multiple caches in a cluster and
3769# get errors about IP-forwarding you must set them to have individual
3770# names with this setting.
3771#Default:
3772# visible_hostname localhost
3773
3774# TAG: unique_hostname
3775# If you want to have multiple machines with the same
3776# 'visible_hostname' you must give each machine a different
3777# 'unique_hostname' so forwarding loops can be detected.
3778#Default:
3779# none
3780
3781# TAG: hostname_aliases
3782# A list of other DNS names your cache has.
3783#Default:
3784# none
3785
3786# TAG: umask
3787# Minimum umask which should be enforced while the proxy
3788# is running, in addition to the umask set at startup.
3789#
3790# For a traditional octal representation of umasks, start
3791# your value with 0.
3792#Default:
3793# umask 027
3794
3795# OPTIONS FOR THE CACHE REGISTRATION SERVICE
3796# -----------------------------------------------------------------------------
3797#
3798# This section contains parameters for the (optional) cache
3799# announcement service. This service is provided to help
3800# cache administrators locate one another in order to join or
3801# create cache hierarchies.
3802#
3803# An 'announcement' message is sent (via UDP) to the registration
3804# service by Squid. By default, the announcement message is NOT
3805# SENT unless you enable it with 'announce_period' below.
3806#
3807# The announcement message includes your hostname, plus the
3808# following information from this configuration file:
3809#
3810# http_port
3811# icp_port
3812# cache_mgr
3813#
3814# All current information is processed regularly and made
3815# available on the Web at http://www.ircache.net/Cache/Tracker/.
3816
3817# TAG: announce_period
3818# This is how frequently to send cache announcements. The
3819# default is `0' which disables sending the announcement
3820# messages.
3821#
3822# To enable announcing your cache, just set an announce period.
3823#
3824# Example:
3825# announce_period 1 day
3826#Default:
3827# announce_period 0
3828
3829# TAG: announce_host
3830#Default:
3831# announce_host tracker.ircache.net
3832
3833# TAG: announce_file
3834#Default:
3835# none
3836
3837# TAG: announce_port
3838# announce_host and announce_port set the hostname and port
3839# number where the registration message will be sent.
3840#
3841# Hostname will default to 'tracker.ircache.net' and port will
3842# default default to 3131. If the 'filename' argument is given,
3843# the contents of that file will be included in the announce
3844# message.
3845#Default:
3846# announce_port 3131
3847
3848# HTTPD-ACCELERATOR OPTIONS
3849# -----------------------------------------------------------------------------
3850
3851# TAG: httpd_accel_surrogate_id
3852# Surrogates (http://www.esi.org/architecture_spec_1.0.html)
3853# need an identification token to allow control targeting. Because
3854# a farm of surrogates may all perform the same tasks, they may share
3855# an identification token.
3856#Default:
3857# httpd_accel_surrogate_id unset-id
3858
3859# TAG: http_accel_surrogate_remote on|off
3860# Remote surrogates (such as those in a CDN) honour Surrogate-Control: no-store-remote.
3861# Set this to on to have squid behave as a remote surrogate.
3862#Default:
3863# http_accel_surrogate_remote off
3864
3865# TAG: esi_parser libxml2|expat|custom
3866# ESI markup is not strictly XML compatible. The custom ESI parser
3867# will give higher performance, but cannot handle non ASCII character
3868# encodings.
3869#Default:
3870# esi_parser custom
3871
3872# DELAY POOL PARAMETERS
3873# -----------------------------------------------------------------------------
3874
3875# TAG: delay_pools
3876# This represents the number of delay pools to be used. For example,
3877# if you have one class 2 delay pool and one class 3 delays pool, you
3878# have a total of 2 delay pools.
3879#Default:
3880# delay_pools 0
3881
3882# TAG: delay_class
3883# This defines the class of each delay pool. There must be exactly one
3884# delay_class line for each delay pool. For example, to define two
3885# delay pools, one of class 2 and one of class 3, the settings above
3886# and here would be:
3887#
3888# Example:
3889# delay_pools 4 # 4 delay pools
3890# delay_class 1 2 # pool 1 is a class 2 pool
3891# delay_class 2 3 # pool 2 is a class 3 pool
3892# delay_class 3 4 # pool 3 is a class 4 pool
3893# delay_class 4 5 # pool 4 is a class 5 pool
3894#
3895# The delay pool classes are:
3896#
3897# class 1 Everything is limited by a single aggregate
3898# bucket.
3899#
3900# class 2 Everything is limited by a single aggregate
3901# bucket as well as an "individual" bucket chosen
3902# from bits 25 through 32 of the IPv4 address.
3903#
3904# class 3 Everything is limited by a single aggregate
3905# bucket as well as a "network" bucket chosen
3906# from bits 17 through 24 of the IP address and a
3907# "individual" bucket chosen from bits 17 through
3908# 32 of the IPv4 address.
3909#
3910# class 4 Everything in a class 3 delay pool, with an
3911# additional limit on a per user basis. This
3912# only takes effect if the username is established
3913# in advance - by forcing authentication in your
3914# http_access rules.
3915#
3916# class 5 Requests are grouped according their tag (see
3917# external_acl's tag= reply).
3918#
3919#
3920# Each pool also requires a delay_parameters directive to configure the pool size
3921# and speed limits used whenever the pool is applied to a request. Along with
3922# a set of delay_access directives to determine when it is used.
3923#
3924# NOTE: If an IP address is a.b.c.d
3925# -> bits 25 through 32 are "d"
3926# -> bits 17 through 24 are "c"
3927# -> bits 17 through 32 are "c * 256 + d"
3928#
3929# NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to
3930# IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic.
3931#Default:
3932# none
3933
3934# TAG: delay_access
3935# This is used to determine which delay pool a request falls into.
3936#
3937# delay_access is sorted per pool and the matching starts with pool 1,
3938# then pool 2, ..., and finally pool N. The first delay pool where the
3939# request is allowed is selected for the request. If it does not allow
3940# the request to any pool then the request is not delayed (default).
3941#
3942# For example, if you want some_big_clients in delay
3943# pool 1 and lotsa_little_clients in delay pool 2:
3944#
3945#Example:
3946# delay_access 1 allow some_big_clients
3947# delay_access 1 deny all
3948# delay_access 2 allow lotsa_little_clients
3949# delay_access 2 deny all
3950# delay_access 3 allow authenticated_clients
3951#Default:
3952# none
3953
3954# TAG: delay_parameters
3955# This defines the parameters for a delay pool. Each delay pool has
3956# a number of "buckets" associated with it, as explained in the
3957# description of delay_class.
3958#
3959# For a class 1 delay pool, the syntax is:
3960# delay_pools pool 1
3961# delay_parameters pool aggregate
3962#
3963# For a class 2 delay pool:
3964# delay_pools pool 2
3965# delay_parameters pool aggregate individual
3966#
3967# For a class 3 delay pool:
3968# delay_pools pool 3
3969# delay_parameters pool aggregate network individual
3970#
3971# For a class 4 delay pool:
3972# delay_pools pool 4
3973# delay_parameters pool aggregate network individual user
3974#
3975# For a class 5 delay pool:
3976# delay_pools pool 5
3977# delay_parameters pool tagrate
3978#
3979# The option variables are:
3980#
3981# pool a pool number - ie, a number between 1 and the
3982# number specified in delay_pools as used in
3983# delay_class lines.
3984#
3985# aggregate the speed limit parameters for the aggregate bucket
3986# (class 1, 2, 3).
3987#
3988# individual the speed limit parameters for the individual
3989# buckets (class 2, 3).
3990#
3991# network the speed limit parameters for the network buckets
3992# (class 3).
3993#
3994# user the speed limit parameters for the user buckets
3995# (class 4).
3996#
3997# tagrate the speed limit parameters for the tag buckets
3998# (class 5).
3999#
4000# A pair of delay parameters is written restore/maximum, where restore is
4001# the number of bytes (not bits - modem and network speeds are usually
4002# quoted in bits) per second placed into the bucket, and maximum is the
4003# maximum number of bytes which can be in the bucket at any time.
4004#
4005# There must be one delay_parameters line for each delay pool.
4006#
4007#
4008# For example, if delay pool number 1 is a class 2 delay pool as in the
4009# above example, and is being used to strictly limit each host to 64Kbit/sec
4010# (plus overheads), with no overall limit, the line is:
4011#
4012# delay_parameters 1 -1/-1 8000/8000
4013#
4014# Note that 8 x 8000 KByte/sec -> 64Kbit/sec.
4015#
4016# Note that the figure -1 is used to represent "unlimited".
4017#
4018#
4019# And, if delay pool number 2 is a class 3 delay pool as in the above
4020# example, and you want to limit it to a total of 256Kbit/sec (strict limit)
4021# with each 8-bit network permitted 64Kbit/sec (strict limit) and each
4022# individual host permitted 4800bit/sec with a bucket maximum size of 64Kbits
4023# to permit a decent web page to be downloaded at a decent speed
4024# (if the network is not being limited due to overuse) but slow down
4025# large downloads more significantly:
4026#
4027# delay_parameters 2 32000/32000 8000/8000 600/8000
4028#
4029# Note that 8 x 32000 KByte/sec -> 256Kbit/sec.
4030# 8 x 8000 KByte/sec -> 64Kbit/sec.
4031# 8 x 600 Byte/sec -> 4800bit/sec.
4032#
4033#
4034# Finally, for a class 4 delay pool as in the example - each user will
4035# be limited to 128Kbits/sec no matter how many workstations they are logged into.:
4036#
4037# delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
4038#Default:
4039# none
4040
4041# TAG: delay_initial_bucket_level (percent, 0-100)
4042# The initial bucket percentage is used to determine how much is put
4043# in each bucket when squid starts, is reconfigured, or first notices
4044# a host accessing it (in class 2 and class 3, individual hosts and
4045# networks only have buckets associated with them once they have been
4046# "seen" by squid).
4047#Default:
4048# delay_initial_bucket_level 50
4049
4050# WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
4051# -----------------------------------------------------------------------------
4052
4053# TAG: wccp_router
4054# Use this option to define your WCCP ``home'' router for
4055# Squid.
4056#
4057# wccp_router supports a single WCCP(v1) router
4058#
4059# wccp2_router supports multiple WCCPv2 routers
4060#
4061# only one of the two may be used at the same time and defines
4062# which version of WCCP to use.
4063#Default:
4064# wccp_router any_addr
4065
4066# TAG: wccp2_router
4067# Use this option to define your WCCP ``home'' router for
4068# Squid.
4069#
4070# wccp_router supports a single WCCP(v1) router
4071#
4072# wccp2_router supports multiple WCCPv2 routers
4073#
4074# only one of the two may be used at the same time and defines
4075# which version of WCCP to use.
4076#Default:
4077# none
4078
4079# TAG: wccp_version
4080# This directive is only relevant if you need to set up WCCP(v1)
4081# to some very old and end-of-life Cisco routers. In all other
4082# setups it must be left unset or at the default setting.
4083# It defines an internal version in the WCCP(v1) protocol,
4084# with version 4 being the officially documented protocol.
4085#
4086# According to some users, Cisco IOS 11.2 and earlier only
4087# support WCCP version 3. If you're using that or an earlier
4088# version of IOS, you may need to change this value to 3, otherwise
4089# do not specify this parameter.
4090#Default:
4091# wccp_version 4
4092
4093# TAG: wccp2_rebuild_wait
4094# If this is enabled Squid will wait for the cache dir rebuild to finish
4095# before sending the first wccp2 HereIAm packet
4096#Default:
4097# wccp2_rebuild_wait on
4098
4099# TAG: wccp2_forwarding_method
4100# WCCP2 allows the setting of forwarding methods between the
4101# router/switch and the cache. Valid values are as follows:
4102#
4103# gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
4104# l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
4105#
4106# Currently (as of IOS 12.4) cisco routers only support GRE.
4107# Cisco switches only support the L2 redirect assignment method.
4108#Default:
4109# wccp2_forwarding_method gre
4110
4111# TAG: wccp2_return_method
4112# WCCP2 allows the setting of return methods between the
4113# router/switch and the cache for packets that the cache
4114# decides not to handle. Valid values are as follows:
4115#
4116# gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
4117# l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
4118#
4119# Currently (as of IOS 12.4) cisco routers only support GRE.
4120# Cisco switches only support the L2 redirect assignment.
4121#
4122# If the "ip wccp redirect exclude in" command has been
4123# enabled on the cache interface, then it is still safe for
4124# the proxy server to use a l2 redirect method even if this
4125# option is set to GRE.
4126#Default:
4127# wccp2_return_method gre
4128
4129# TAG: wccp2_assignment_method
4130# WCCP2 allows the setting of methods to assign the WCCP hash
4131# Valid values are as follows:
4132#
4133# hash - Hash assignment
4134# mask - Mask assignment
4135#
4136# As a general rule, cisco routers support the hash assignment method
4137# and cisco switches support the mask assignment method.
4138#Default:
4139# wccp2_assignment_method hash
4140
4141# TAG: wccp2_service
4142# WCCP2 allows for multiple traffic services. There are two
4143# types: "standard" and "dynamic". The standard type defines
4144# one service id - http (id 0). The dynamic service ids can be from
4145# 51 to 255 inclusive. In order to use a dynamic service id
4146# one must define the type of traffic to be redirected; this is done
4147# using the wccp2_service_info option.
4148#
4149# The "standard" type does not require a wccp2_service_info option,
4150# just specifying the service id will suffice.
4151#
4152# MD5 service authentication can be enabled by adding
4153# "password=<password>" to the end of this service declaration.
4154#
4155# Examples:
4156#
4157# wccp2_service standard 0 # for the 'web-cache' standard service
4158# wccp2_service dynamic 80 # a dynamic service type which will be
4159# # fleshed out with subsequent options.
4160# wccp2_service standard 0 password=foo
4161#Default:
4162# wccp2_service standard 0
4163
4164# TAG: wccp2_service_info
4165# Dynamic WCCPv2 services require further information to define the
4166# traffic you wish to have diverted.
4167#
4168# The format is:
4169#
4170# wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
4171# priority=<priority> ports=<port>,<port>..
4172#
4173# The relevant WCCPv2 flags:
4174# + src_ip_hash, dst_ip_hash
4175# + source_port_hash, dst_port_hash
4176# + src_ip_alt_hash, dst_ip_alt_hash
4177# + src_port_alt_hash, dst_port_alt_hash
4178# + ports_source
4179#
4180# The port list can be one to eight entries.
4181#
4182# Example:
4183#
4184# wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
4185# priority=240 ports=80
4186#
4187# Note: the service id must have been defined by a previous
4188# 'wccp2_service dynamic <id>' entry.
4189#Default:
4190# none
4191
4192# TAG: wccp2_weight
4193# Each cache server gets assigned a set of the destination
4194# hash proportional to their weight.
4195#Default:
4196# wccp2_weight 10000
4197
4198# TAG: wccp_address
4199#Default:
4200# wccp_address 0.0.0.0
4201
4202# TAG: wccp2_address
4203# Use this option if you require WCCP to use a specific
4204# interface address.
4205#
4206# The default behavior is to not bind to any specific address.
4207#Default:
4208# wccp2_address 0.0.0.0
4209
4210# PERSISTENT CONNECTION HANDLING
4211# -----------------------------------------------------------------------------
4212#
4213# Also see "pconn_timeout" in the TIMEOUTS section
4214
4215# TAG: client_persistent_connections
4216#Default:
4217# client_persistent_connections on
4218
4219# TAG: server_persistent_connections
4220# Persistent connection support for clients and servers. By
4221# default, Squid uses persistent connections (when allowed)
4222# with its clients and servers. You can use these options to
4223# disable persistent connections with clients and/or servers.
4224#Default:
4225# server_persistent_connections on
4226
4227# TAG: persistent_connection_after_error
4228# With this directive the use of persistent connections after
4229# HTTP errors can be disabled. Useful if you have clients
4230# who fail to handle errors on persistent connections proper.
4231#Default:
4232# persistent_connection_after_error on
4233
4234# TAG: detect_broken_pconn
4235# Some servers have been found to incorrectly signal the use
4236# of HTTP/1.0 persistent connections even on replies not
4237# compatible, causing significant delays. This server problem
4238# has mostly been seen on redirects.
4239#
4240# By enabling this directive Squid attempts to detect such
4241# broken replies and automatically assume the reply is finished
4242# after 10 seconds timeout.
4243#Default:
4244# detect_broken_pconn off
4245
4246# CACHE DIGEST OPTIONS
4247# -----------------------------------------------------------------------------
4248
4249# TAG: digest_generation
4250# This controls whether the server will generate a Cache Digest
4251# of its contents. By default, Cache Digest generation is
4252# enabled if Squid is compiled with --enable-cache-digests defined.
4253#Default:
4254# digest_generation on
4255
4256# TAG: digest_bits_per_entry
4257# This is the number of bits of the server's Cache Digest which
4258# will be associated with the Digest entry for a given HTTP
4259# Method and URL (public key) combination. The default is 5.
4260#Default:
4261# digest_bits_per_entry 5
4262
4263# TAG: digest_rebuild_period (seconds)
4264# This is the wait time between Cache Digest rebuilds.
4265#Default:
4266# digest_rebuild_period 1 hour
4267
4268# TAG: digest_rewrite_period (seconds)
4269# This is the wait time between Cache Digest writes to
4270# disk.
4271#Default:
4272# digest_rewrite_period 1 hour
4273
4274# TAG: digest_swapout_chunk_size (bytes)
4275# This is the number of bytes of the Cache Digest to write to
4276# disk at a time. It defaults to 4096 bytes (4KB), the Squid
4277# default swap page.
4278#Default:
4279# digest_swapout_chunk_size 4096 bytes
4280
4281# TAG: digest_rebuild_chunk_percentage (percent, 0-100)
4282# This is the percentage of the Cache Digest to be scanned at a
4283# time. By default it is set to 10% of the Cache Digest.
4284#Default:
4285# digest_rebuild_chunk_percentage 10
4286
4287# SNMP OPTIONS
4288# -----------------------------------------------------------------------------
4289
4290# TAG: snmp_port
4291# The port number where Squid listens for SNMP requests. To enable
4292# SNMP support set this to a suitable port number. Port number
4293# 3401 is often used for the Squid SNMP agent. By default it's
4294# set to "0" (disabled)
4295#
4296# Example:
4297# snmp_port 3401
4298#Default:
4299# snmp_port 0
4300
4301# TAG: snmp_access
4302# Allowing or denying access to the SNMP port.
4303#
4304# All access to the agent is denied by default.
4305# usage:
4306#
4307# snmp_access allow|deny [!]aclname ...
4308#
4309# This clause only supports fast acl types.
4310# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4311#Example:
4312# snmp_access allow snmppublic localhost
4313# snmp_access deny all
4314#Default:
4315# snmp_access deny all
4316
4317# TAG: snmp_incoming_address
4318#Default:
4319# snmp_incoming_address any_addr
4320
4321# TAG: snmp_outgoing_address
4322# Just like 'udp_incoming_address', but for the SNMP port.
4323#
4324# snmp_incoming_address is used for the SNMP socket receiving
4325# messages from SNMP agents.
4326# snmp_outgoing_address is used for SNMP packets returned to SNMP
4327# agents.
4328#
4329# The default snmp_incoming_address is to listen on all
4330# available network interfaces.
4331#
4332# If snmp_outgoing_address is not set it will use the same socket
4333# as snmp_incoming_address. Only change this if you want to have
4334# SNMP replies sent using another address than where this Squid
4335# listens for SNMP queries.
4336#
4337# NOTE, snmp_incoming_address and snmp_outgoing_address can not have
4338# the same value since they both use port 3401.
4339#Default:
4340# snmp_outgoing_address no_addr
4341
4342# ICP OPTIONS
4343# -----------------------------------------------------------------------------
4344
4345# TAG: icp_port
4346# The port number where Squid sends and receives ICP queries to
4347# and from neighbor caches. The standard UDP port for ICP is 3130.
4348# Default is disabled (0).
4349#
4350# Example:
4351# icp_port 3130
4352#Default:
4353# icp_port 0
4354
4355# TAG: htcp_port
4356# The port number where Squid sends and receives HTCP queries to
4357# and from neighbor caches. To turn it on you want to set it to
4358# 4827. By default it is set to "0" (disabled).
4359#
4360# Example:
4361# htcp_port 4827
4362#Default:
4363# htcp_port 0
4364
4365# TAG: log_icp_queries on|off
4366# If set, ICP queries are logged to access.log. You may wish
4367# do disable this if your ICP load is VERY high to speed things
4368# up or to simplify log analysis.
4369#Default:
4370# log_icp_queries on
4371
4372# TAG: udp_incoming_address
4373# udp_incoming_address is used for UDP packets received from other
4374# caches.
4375#
4376# The default behavior is to not bind to any specific address.
4377#
4378# Only change this if you want to have all UDP queries received on
4379# a specific interface/address.
4380#
4381# NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS
4382# modules. Altering it will affect all of them in the same manner.
4383#
4384# see also; udp_outgoing_address
4385#
4386# NOTE, udp_incoming_address and udp_outgoing_address can not
4387# have the same value since they both use the same port.
4388#Default:
4389# udp_incoming_address any_addr
4390
4391# TAG: udp_outgoing_address
4392# udp_outgoing_address is used for UDP packets sent out to other
4393# caches.
4394#
4395# The default behavior is to not bind to any specific address.
4396#
4397# Instead it will use the same socket as udp_incoming_address.
4398# Only change this if you want to have UDP queries sent using another
4399# address than where this Squid listens for UDP queries from other
4400# caches.
4401#
4402# NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS
4403# modules. Altering it will affect all of them in the same manner.
4404#
4405# see also; udp_incoming_address
4406#
4407# NOTE, udp_incoming_address and udp_outgoing_address can not
4408# have the same value since they both use the same port.
4409#Default:
4410# udp_outgoing_address no_addr
4411
4412# TAG: icp_hit_stale on|off
4413# If you want to return ICP_HIT for stale cache objects, set this
4414# option to 'on'. If you have sibling relationships with caches
4415# in other administrative domains, this should be 'off'. If you only
4416# have sibling relationships with caches under your control,
4417# it is probably okay to set this to 'on'.
4418# If set to 'on', your siblings should use the option "allow-miss"
4419# on their cache_peer lines for connecting to you.
4420#Default:
4421# icp_hit_stale off
4422
4423# TAG: minimum_direct_hops
4424# If using the ICMP pinging stuff, do direct fetches for sites
4425# which are no more than this many hops away.
4426#Default:
4427# minimum_direct_hops 4
4428
4429# TAG: minimum_direct_rtt
4430# If using the ICMP pinging stuff, do direct fetches for sites
4431# which are no more than this many rtt milliseconds away.
4432#Default:
4433# minimum_direct_rtt 400
4434
4435# TAG: netdb_low
4436#Default:
4437# netdb_low 900
4438
4439# TAG: netdb_high
4440# The low and high water marks for the ICMP measurement
4441# database. These are counts, not percents. The defaults are
4442# 900 and 1000. When the high water mark is reached, database
4443# entries will be deleted until the low mark is reached.
4444#Default:
4445# netdb_high 1000
4446
4447# TAG: netdb_ping_period
4448# The minimum period for measuring a site. There will be at
4449# least this much delay between successive pings to the same
4450# network. The default is five minutes.
4451#Default:
4452# netdb_ping_period 5 minutes
4453
4454# TAG: query_icmp on|off
4455# If you want to ask your peers to include ICMP data in their ICP
4456# replies, enable this option.
4457#
4458# If your peer has configured Squid (during compilation) with
4459# '--enable-icmp' that peer will send ICMP pings to origin server
4460# sites of the URLs it receives. If you enable this option the
4461# ICP replies from that peer will include the ICMP data (if available).
4462# Then, when choosing a parent cache, Squid will choose the parent with
4463# the minimal RTT to the origin server. When this happens, the
4464# hierarchy field of the access.log will be
4465# "CLOSEST_PARENT_MISS". This option is off by default.
4466#Default:
4467# query_icmp off
4468
4469# TAG: test_reachability on|off
4470# When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
4471# instead of ICP_MISS if the target host is NOT in the ICMP
4472# database, or has a zero RTT.
4473#Default:
4474# test_reachability off
4475
4476# TAG: icp_query_timeout (msec)
4477# Normally Squid will automatically determine an optimal ICP
4478# query timeout value based on the round-trip-time of recent ICP
4479# queries. If you want to override the value determined by
4480# Squid, set this 'icp_query_timeout' to a non-zero value. This
4481# value is specified in MILLISECONDS, so, to use a 2-second
4482# timeout (the old default), you would write:
4483#
4484# icp_query_timeout 2000
4485#Default:
4486# icp_query_timeout 0
4487
4488# TAG: maximum_icp_query_timeout (msec)
4489# Normally the ICP query timeout is determined dynamically. But
4490# sometimes it can lead to very large values (say 5 seconds).
4491# Use this option to put an upper limit on the dynamic timeout
4492# value. Do NOT use this option to always use a fixed (instead
4493# of a dynamic) timeout value. To set a fixed timeout see the
4494# 'icp_query_timeout' directive.
4495#Default:
4496# maximum_icp_query_timeout 2000
4497
4498# TAG: minimum_icp_query_timeout (msec)
4499# Normally the ICP query timeout is determined dynamically. But
4500# sometimes it can lead to very small timeouts, even lower than
4501# the normal latency variance on your link due to traffic.
4502# Use this option to put an lower limit on the dynamic timeout
4503# value. Do NOT use this option to always use a fixed (instead
4504# of a dynamic) timeout value. To set a fixed timeout see the
4505# 'icp_query_timeout' directive.
4506#Default:
4507# minimum_icp_query_timeout 5
4508
4509# TAG: background_ping_rate time-units
4510# Controls how often the ICP pings are sent to siblings that
4511# have background-ping set.
4512#Default:
4513# background_ping_rate 10 seconds
4514
4515# MULTICAST ICP OPTIONS
4516# -----------------------------------------------------------------------------
4517
4518# TAG: mcast_groups
4519# This tag specifies a list of multicast groups which your server
4520# should join to receive multicasted ICP queries.
4521#
4522# NOTE! Be very careful what you put here! Be sure you
4523# understand the difference between an ICP _query_ and an ICP
4524# _reply_. This option is to be set only if you want to RECEIVE
4525# multicast queries. Do NOT set this option to SEND multicast
4526# ICP (use cache_peer for that). ICP replies are always sent via
4527# unicast, so this option does not affect whether or not you will
4528# receive replies from multicast group members.
4529#
4530# You must be very careful to NOT use a multicast address which
4531# is already in use by another group of caches.
4532#
4533# If you are unsure about multicast, please read the Multicast
4534# chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
4535#
4536# Usage: mcast_groups 239.128.16.128 224.0.1.20
4537#
4538# By default, Squid doesn't listen on any multicast groups.
4539#Default:
4540# none
4541
4542# TAG: mcast_miss_addr
4543# Note: This option is only available if Squid is rebuilt with the
4544# -DMULTICAST_MISS_STREAM define
4545#
4546# If you enable this option, every "cache miss" URL will
4547# be sent out on the specified multicast address.
4548#
4549# Do not enable this option unless you are are absolutely
4550# certain you understand what you are doing.
4551#Default:
4552# mcast_miss_addr no_addr
4553
4554# TAG: mcast_miss_ttl
4555# Note: This option is only available if Squid is rebuilt with the
4556# -DMULTICAST_MISS_STREAM define
4557#
4558# This is the time-to-live value for packets multicasted
4559# when multicasting off cache miss URLs is enabled. By
4560# default this is set to 'site scope', i.e. 16.
4561#Default:
4562# mcast_miss_ttl 16
4563
4564# TAG: mcast_miss_port
4565# Note: This option is only available if Squid is rebuilt with the
4566# -DMULTICAST_MISS_STREAM define
4567#
4568# This is the port number to be used in conjunction with
4569# 'mcast_miss_addr'.
4570#Default:
4571# mcast_miss_port 3135
4572
4573# TAG: mcast_miss_encode_key
4574# Note: This option is only available if Squid is rebuilt with the
4575# -DMULTICAST_MISS_STREAM define
4576#
4577# The URLs that are sent in the multicast miss stream are
4578# encrypted. This is the encryption key.
4579#Default:
4580# mcast_miss_encode_key XXXXXXXXXXXXXXXX
4581
4582# TAG: mcast_icp_query_timeout (msec)
4583# For multicast peers, Squid regularly sends out ICP "probes" to
4584# count how many other peers are listening on the given multicast
4585# address. This value specifies how long Squid should wait to
4586# count all the replies. The default is 2000 msec, or 2
4587# seconds.
4588#Default:
4589# mcast_icp_query_timeout 2000
4590
4591# INTERNAL ICON OPTIONS
4592# -----------------------------------------------------------------------------
4593
4594# TAG: icon_directory
4595# Where the icons are stored. These are normally kept in
4596# /usr/share/squid3/icons
4597#Default:
4598# icon_directory /usr/share/squid3/icons
4599
4600# TAG: global_internal_static
4601# This directive controls is Squid should intercept all requests for
4602# /squid-internal-static/ no matter which host the URL is requesting
4603# (default on setting), or if nothing special should be done for
4604# such URLs (off setting). The purpose of this directive is to make
4605# icons etc work better in complex cache hierarchies where it may
4606# not always be possible for all corners in the cache mesh to reach
4607# the server generating a directory listing.
4608#Default:
4609# global_internal_static on
4610
4611# TAG: short_icon_urls
4612# If this is enabled Squid will use short URLs for icons.
4613# If disabled it will revert to the old behavior of including
4614# it's own name and port in the URL.
4615#
4616# If you run a complex cache hierarchy with a mix of Squid and
4617# other proxies you may need to disable this directive.
4618#Default:
4619# short_icon_urls on
4620
4621# ERROR PAGE OPTIONS
4622# -----------------------------------------------------------------------------
4623
4624# TAG: error_directory
4625# If you wish to create your own versions of the default
4626# error files to customize them to suit your company copy
4627# the error/template files to another directory and point
4628# this tag at them.
4629#
4630# WARNING: This option will disable multi-language support
4631# on error pages if used.
4632#
4633# The squid developers are interested in making squid available in
4634# a wide variety of languages. If you are making translations for a
4635# language that Squid does not currently provide please consider
4636# contributing your translation back to the project.
4637# http://wiki.squid-cache.org/Translations
4638#
4639# The squid developers working on translations are happy to supply drop-in
4640# translated error files in exchange for any new language contributions.
4641#Default:
4642# none
4643
4644# TAG: error_default_language
4645# Set the default language which squid will send error pages in
4646# if no existing translation matches the clients language
4647# preferences.
4648#
4649# If unset (default) generic English will be used.
4650#
4651# The squid developers are interested in making squid available in
4652# a wide variety of languages. If you are interested in making
4653# translations for any language see the squid wiki for details.
4654# http://wiki.squid-cache.org/Translations
4655#Default:
4656# none
4657
4658# TAG: error_log_languages
4659# Log to cache.log what languages users are attempting to
4660# auto-negotiate for translations.
4661#
4662# Successful negotiations are not logged. Only failures
4663# have meaning to indicate that Squid may need an upgrade
4664# of its error page translations.
4665#Default:
4666# error_log_languages on
4667
4668# TAG: err_page_stylesheet
4669# CSS Stylesheet to pattern the display of Squid default error pages.
4670#
4671# For information on CSS see http://www.w3.org/Style/CSS/
4672#Default:
4673# err_page_stylesheet /etc/squid3/errorpage.css
4674
4675# TAG: err_html_text
4676# HTML text to include in error messages. Make this a "mailto"
4677# URL to your admin address, or maybe just a link to your
4678# organizations Web page.
4679#
4680# To include this in your error messages, you must rewrite
4681# the error template files (found in the "errors" directory).
4682# Wherever you want the 'err_html_text' line to appear,
4683# insert a %L tag in the error template file.
4684#Default:
4685# none
4686
4687# TAG: email_err_data on|off
4688# If enabled, information about the occurred error will be
4689# included in the mailto links of the ERR pages (if %W is set)
4690# so that the email body contains the data.
4691# Syntax is <A HREF="mailto:%w%W">%w</A>
4692#Default:
4693# email_err_data on
4694
4695# TAG: deny_info
4696# Usage: deny_info err_page_name acl
4697# or deny_info http://... acl
4698# or deny_info TCP_RESET acl
4699#
4700# This can be used to return a ERR_ page for requests which
4701# do not pass the 'http_access' rules. Squid remembers the last
4702# acl it evaluated in http_access, and if a 'deny_info' line exists
4703# for that ACL Squid returns a corresponding error page.
4704#
4705# The acl is typically the last acl on the http_access deny line which
4706# denied access. The exceptions to this rule are:
4707# - When Squid needs to request authentication credentials. It's then
4708# the first authentication related acl encountered
4709# - When none of the http_access lines matches. It's then the last
4710# acl processed on the last http_access line.
4711#
4712# NP: If providing your own custom error pages with error_directory
4713# you may also specify them by your custom file name:
4714# Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
4715#
4716# Alternatively you can specify an error URL. The browsers will
4717# get redirected (302 or 307) to the specified URL. %s in the redirection
4718# URL will be replaced by the requested URL.
4719#
4720# Alternatively you can tell Squid to reset the TCP connection
4721# by specifying TCP_RESET.
4722#Default:
4723# none
4724
4725# OPTIONS INFLUENCING REQUEST FORWARDING
4726# -----------------------------------------------------------------------------
4727
4728# TAG: nonhierarchical_direct
4729# By default, Squid will send any non-hierarchical requests
4730# (matching hierarchy_stoplist or not cacheable request type) direct
4731# to origin servers.
4732#
4733# If you set this to off, Squid will prefer to send these
4734# requests to parents.
4735#
4736# Note that in most configurations, by turning this off you will only
4737# add latency to these request without any improvement in global hit
4738# ratio.
4739#
4740# If you are inside an firewall see never_direct instead of
4741# this directive.
4742#Default:
4743# nonhierarchical_direct on
4744
4745# TAG: prefer_direct
4746# Normally Squid tries to use parents for most requests. If you for some
4747# reason like it to first try going direct and only use a parent if
4748# going direct fails set this to on.
4749#
4750# By combining nonhierarchical_direct off and prefer_direct on you
4751# can set up Squid to use a parent as a backup path if going direct
4752# fails.
4753#
4754# Note: If you want Squid to use parents for all requests see
4755# the never_direct directive. prefer_direct only modifies how Squid
4756# acts on cacheable requests.
4757#Default:
4758# prefer_direct off
4759
4760# TAG: always_direct
4761# Usage: always_direct allow|deny [!]aclname ...
4762#
4763# Here you can use ACL elements to specify requests which should
4764# ALWAYS be forwarded by Squid to the origin servers without using
4765# any peers. For example, to always directly forward requests for
4766# local servers ignoring any parents or siblings you may have use
4767# something like:
4768#
4769# acl local-servers dstdomain my.domain.net
4770# always_direct allow local-servers
4771#
4772# To always forward FTP requests directly, use
4773#
4774# acl FTP proto FTP
4775# always_direct allow FTP
4776#
4777# NOTE: There is a similar, but opposite option named
4778# 'never_direct'. You need to be aware that "always_direct deny
4779# foo" is NOT the same thing as "never_direct allow foo". You
4780# may need to use a deny rule to exclude a more-specific case of
4781# some other rule. Example:
4782#
4783# acl local-external dstdomain external.foo.net
4784# acl local-servers dstdomain .foo.net
4785# always_direct deny local-external
4786# always_direct allow local-servers
4787#
4788# NOTE: If your goal is to make the client forward the request
4789# directly to the origin server bypassing Squid then this needs
4790# to be done in the client configuration. Squid configuration
4791# can only tell Squid how Squid should fetch the object.
4792#
4793# NOTE: This directive is not related to caching. The replies
4794# is cached as usual even if you use always_direct. To not cache
4795# the replies see the 'cache' directive.
4796#
4797# This clause supports both fast and slow acl types.
4798# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4799#Default:
4800# none
4801
4802# TAG: never_direct
4803# Usage: never_direct allow|deny [!]aclname ...
4804#
4805# never_direct is the opposite of always_direct. Please read
4806# the description for always_direct if you have not already.
4807#
4808# With 'never_direct' you can use ACL elements to specify
4809# requests which should NEVER be forwarded directly to origin
4810# servers. For example, to force the use of a proxy for all
4811# requests, except those in your local domain use something like:
4812#
4813# acl local-servers dstdomain .foo.net
4814# never_direct deny local-servers
4815# never_direct allow all
4816#
4817# or if Squid is inside a firewall and there are local intranet
4818# servers inside the firewall use something like:
4819#
4820# acl local-intranet dstdomain .foo.net
4821# acl local-external dstdomain external.foo.net
4822# always_direct deny local-external
4823# always_direct allow local-intranet
4824# never_direct allow all
4825#
4826# This clause supports both fast and slow acl types.
4827# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4828#Default:
4829# none
4830
4831# ADVANCED NETWORKING OPTIONS
4832# -----------------------------------------------------------------------------
4833
4834# TAG: incoming_icp_average
4835#Default:
4836# incoming_icp_average 6
4837
4838# TAG: incoming_http_average
4839#Default:
4840# incoming_http_average 4
4841
4842# TAG: incoming_dns_average
4843#Default:
4844# incoming_dns_average 4
4845
4846# TAG: min_icp_poll_cnt
4847#Default:
4848# min_icp_poll_cnt 8
4849
4850# TAG: min_dns_poll_cnt
4851#Default:
4852# min_dns_poll_cnt 8
4853
4854# TAG: min_http_poll_cnt
4855# Heavy voodoo here. I can't even believe you are reading this.
4856# Are you crazy? Don't even think about adjusting these unless
4857# you understand the algorithms in comm_select.c first!
4858#Default:
4859# min_http_poll_cnt 8
4860
4861# TAG: accept_filter
4862# FreeBSD:
4863#
4864# The name of an accept(2) filter to install on Squid's
4865# listen socket(s). This feature is perhaps specific to
4866# FreeBSD and requires support in the kernel.
4867#
4868# The 'httpready' filter delays delivering new connections
4869# to Squid until a full HTTP request has been received.
4870# See the accf_http(9) man page for details.
4871#
4872# The 'dataready' filter delays delivering new connections
4873# to Squid until there is some data to process.
4874# See the accf_dataready(9) man page for details.
4875#
4876# Linux:
4877#
4878# The 'data' filter delays delivering of new connections
4879# to Squid until there is some data to process by TCP_ACCEPT_DEFER.
4880# You may optionally specify a number of seconds to wait by
4881# 'data=N' where N is the number of seconds. Defaults to 30
4882# if not specified. See the tcp(7) man page for details.
4883#EXAMPLE:
4884## FreeBSD
4885#accept_filter httpready
4886## Linux
4887#accept_filter data
4888#Default:
4889# none
4890
4891# TAG: client_ip_max_connections
4892# Set an absolute limit on the number of connections a single
4893# client IP can use. Any more than this and Squid will begin to drop
4894# new connections from the client until it closes some links.
4895#
4896# Note that this is a global limit. It affects all HTTP, HTCP, Gopher and FTP
4897# connections from the client. For finer control use the ACL access controls.
4898#
4899# Requires client_db to be enabled (the default).
4900#
4901# WARNING: This may noticably slow down traffic received via external proxies
4902# or NAT devices and cause them to rebound error messages back to their clients.
4903#Default:
4904# client_ip_max_connections -1
4905
4906# TAG: tcp_recv_bufsize (bytes)
4907# Size of receive buffer to set for TCP sockets. Probably just
4908# as easy to change your kernel's default. Set to zero to use
4909# the default buffer size.
4910#Default:
4911# tcp_recv_bufsize 0 bytes
4912
4913# ICAP OPTIONS
4914# -----------------------------------------------------------------------------
4915
4916# TAG: icap_enable on|off
4917# If you want to enable the ICAP module support, set this to on.
4918#Default:
4919# icap_enable off
4920
4921# TAG: icap_connect_timeout
4922# This parameter specifies how long to wait for the TCP connect to
4923# the requested ICAP server to complete before giving up and either
4924# terminating the HTTP transaction or bypassing the failure.
4925#
4926# The default for optional services is peer_connect_timeout.
4927# The default for essential services is connect_timeout.
4928# If this option is explicitly set, its value applies to all services.
4929#Default:
4930# none
4931
4932# TAG: icap_io_timeout time-units
4933# This parameter specifies how long to wait for an I/O activity on
4934# an established, active ICAP connection before giving up and
4935# either terminating the HTTP transaction or bypassing the
4936# failure.
4937#
4938# The default is read_timeout.
4939#Default:
4940# none
4941
4942# TAG: icap_service_failure_limit
4943# The limit specifies the number of failures that Squid tolerates
4944# when establishing a new TCP connection with an ICAP service. If
4945# the number of failures exceeds the limit, the ICAP service is
4946# not used for new ICAP requests until it is time to refresh its
4947# OPTIONS. The per-service failure counter is reset to zero each
4948# time Squid fetches new service OPTIONS.
4949#
4950# A negative value disables the limit. Without the limit, an ICAP
4951# service will not be considered down due to connectivity failures
4952# between ICAP OPTIONS requests.
4953#Default:
4954# icap_service_failure_limit 10
4955
4956# TAG: icap_service_revival_delay
4957# The delay specifies the number of seconds to wait after an ICAP
4958# OPTIONS request failure before requesting the options again. The
4959# failed ICAP service is considered "down" until fresh OPTIONS are
4960# fetched.
4961#
4962# The actual delay cannot be smaller than the hardcoded minimum
4963# delay of 30 seconds.
4964#Default:
4965# icap_service_revival_delay 180
4966
4967# TAG: icap_preview_enable on|off
4968# The ICAP Preview feature allows the ICAP server to handle the
4969# HTTP message by looking only at the beginning of the message body
4970# or even without receiving the body at all. In some environments,
4971# previews greatly speedup ICAP processing.
4972#
4973# During an ICAP OPTIONS transaction, the server may tell Squid what
4974# HTTP messages should be previewed and how big the preview should be.
4975# Squid will not use Preview if the server did not request one.
4976#
4977# To disable ICAP Preview for all ICAP services, regardless of
4978# individual ICAP server OPTIONS responses, set this option to "off".
4979#Example:
4980#icap_preview_enable off
4981#Default:
4982# icap_preview_enable on
4983
4984# TAG: icap_preview_size
4985# The default size of preview data to be sent to the ICAP server.
4986# -1 means no preview. This value might be overwritten on a per server
4987# basis by OPTIONS requests.
4988#Default:
4989# icap_preview_size -1
4990
4991# TAG: icap_default_options_ttl
4992# The default TTL value for ICAP OPTIONS responses that don't have
4993# an Options-TTL header.
4994#Default:
4995# icap_default_options_ttl 60
4996
4997# TAG: icap_persistent_connections on|off
4998# Whether or not Squid should use persistent connections to
4999# an ICAP server.
5000#Default:
5001# icap_persistent_connections on
5002
5003# TAG: icap_send_client_ip on|off
5004# If enabled, Squid shares HTTP client IP information with adaptation
5005# services. For ICAP, Squid adds the X-Client-IP header to ICAP requests.
5006# For eCAP, Squid sets the libecap::metaClientIp transaction option.
5007#
5008# See also: adaptation_uses_indirect_client
5009#Default:
5010# icap_send_client_ip off
5011
5012# TAG: icap_send_client_username on|off
5013# This sends authenticated HTTP client username (if available) to
5014# the ICAP service. The username value is encoded based on the
5015# icap_client_username_encode option and is sent using the header
5016# specified by the icap_client_username_header option.
5017#Default:
5018# icap_send_client_username off
5019
5020# TAG: icap_client_username_header
5021# ICAP request header name to use for send_client_username.
5022#Default:
5023# icap_client_username_header X-Client-Username
5024
5025# TAG: icap_client_username_encode on|off
5026# Whether to base64 encode the authenticated client username.
5027#Default:
5028# icap_client_username_encode off
5029
5030# TAG: icap_service
5031# Defines a single ICAP service using the following format:
5032#
5033# icap_service service_name vectoring_point [options] service_url
5034#
5035# service_name: ID
5036# an opaque identifier which must be unique in squid.conf
5037#
5038# vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
5039# This specifies at which point of transaction processing the
5040# ICAP service should be activated. *_postcache vectoring points
5041# are not yet supported.
5042#
5043# service_url: icap://servername:port/servicepath
5044# ICAP server and service location.
5045#
5046# ICAP does not allow a single service to handle both REQMOD and RESPMOD
5047# transactions. Squid does not enforce that requirement. You can specify
5048# services with the same service_url and different vectoring_points. You
5049# can even specify multiple identical services as long as their
5050# service_names differ.
5051#
5052#
5053# Service options are separated by white space. ICAP services support
5054# the following name=value options:
5055#
5056# bypass=on|off|1|0
5057# If set to 'on' or '1', the ICAP service is treated as
5058# optional. If the service cannot be reached or malfunctions,
5059# Squid will try to ignore any errors and process the message as
5060# if the service was not enabled. No all ICAP errors can be
5061# bypassed. If set to 0, the ICAP service is treated as
5062# essential and all ICAP errors will result in an error page
5063# returned to the HTTP client.
5064#
5065# Bypass is off by default: services are treated as essential.
5066#
5067# routing=on|off|1|0
5068# If set to 'on' or '1', the ICAP service is allowed to
5069# dynamically change the current message adaptation plan by
5070# returning a chain of services to be used next. The services
5071# are specified using the X-Next-Services ICAP response header
5072# value, formatted as a comma-separated list of service names.
5073# Each named service should be configured in squid.conf and
5074# should have the same method and vectoring point as the current
5075# ICAP transaction. Services violating these rules are ignored.
5076# An empty X-Next-Services value results in an empty plan which
5077# ends the current adaptation.
5078#
5079# Routing is not allowed by default: the ICAP X-Next-Services
5080# response header is ignored.
5081#
5082# ipv6=on|off
5083# Only has effect on split-stack systems. The default on those systems
5084# is to use IPv4-only connections. When set to 'on' this option will
5085# make Squid use IPv6-only connections to contact this ICAP service.
5086#
5087# Older icap_service format without optional named parameters is
5088# deprecated but supported for backward compatibility.
5089#
5090#Example:
5091#icap_service svcBlocker reqmod_precache bypass=0 icap://icap1.mydomain.net:1344/reqmod
5092#icap_service svcLogger reqmod_precache routing=on icap://icap2.mydomain.net:1344/respmod
5093#Default:
5094# none
5095
5096# TAG: icap_class
5097# This deprecated option was documented to define an ICAP service
5098# chain, even though it actually defined a set of similar, redundant
5099# services, and the chains were not supported.
5100#
5101# To define a set of redundant services, please use the
5102# adaptation_service_set directive. For service chains, use
5103# adaptation_service_chain.
5104#Default:
5105# none
5106
5107# TAG: icap_access
5108# This option is deprecated. Please use adaptation_access, which
5109# has the same ICAP functionality, but comes with better
5110# documentation, and eCAP support.
5111#Default:
5112# none
5113
5114# eCAP OPTIONS
5115# -----------------------------------------------------------------------------
5116
5117# TAG: ecap_enable on|off
5118# Note: This option is only available if Squid is rebuilt with the
5119# --enable-ecap option
5120#
5121# Controls whether eCAP support is enabled.
5122#Default:
5123# ecap_enable off
5124
5125# TAG: ecap_service
5126# Note: This option is only available if Squid is rebuilt with the
5127# --enable-ecap option
5128#
5129# Defines a single eCAP service
5130#
5131# ecap_service servicename vectoring_point bypass service_url
5132#
5133# vectoring_point = reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
5134# This specifies at which point of transaction processing the
5135# eCAP service should be activated. *_postcache vectoring points
5136# are not yet supported.
5137# bypass = 1|0
5138# If set to 1, the eCAP service is treated as optional. If the
5139# service cannot be reached or malfunctions, Squid will try to
5140# ignore any errors and process the message as if the service
5141# was not enabled. No all eCAP errors can be bypassed.
5142# If set to 0, the eCAP service is treated as essential and all
5143# eCAP errors will result in an error page returned to the
5144# HTTP client.
5145# service_url = ecap://vendor/service_name?custom&cgi=style¶meters=optional
5146#
5147#Example:
5148#ecap_service service_1 reqmod_precache 0 ecap://filters-R-us/leakDetector?on_error=block
5149#ecap_service service_2 respmod_precache 1 icap://filters-R-us/virusFilter?config=/etc/vf.cfg
5150#Default:
5151# none
5152
5153# TAG: loadable_modules
5154# Instructs Squid to load the specified dynamic module(s) or activate
5155# preloaded module(s).
5156#Example:
5157#loadable_modules /usr/lib/MinimalAdapter.so
5158#Default:
5159# none
5160
5161# MESSAGE ADAPTATION OPTIONS
5162# -----------------------------------------------------------------------------
5163
5164# TAG: adaptation_service_set
5165#
5166# Configures an ordered set of similar, redundant services. This is
5167# useful when hot standby or backup adaptation servers are available.
5168#
5169# adaptation_service_set set_name service_name1 service_name2 ...
5170#
5171# The named services are used in the set declaration order. The first
5172# applicable adaptation service from the set is used first. The next
5173# applicable service is tried if and only if the transaction with the
5174# previous service fails and the message waiting to be adapted is still
5175# intact.
5176#
5177# When adaptation starts, broken services are ignored as if they were
5178# not a part of the set. A broken service is a down optional service.
5179#
5180# The services in a set must be attached to the same vectoring point
5181# (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
5182#
5183# If all services in a set are optional then adaptation failures are
5184# bypassable. If all services in the set are essential, then a
5185# transaction failure with one service may still be retried using
5186# another service from the set, but when all services fail, the master
5187# transaction fails as well.
5188#
5189# A set may contain a mix of optional and essential services, but that
5190# is likely to lead to surprising results because broken services become
5191# ignored (see above), making previously bypassable failures fatal.
5192# Technically, it is the bypassability of the last failed service that
5193# matters.
5194#
5195# See also: adaptation_access adaptation_service_chain
5196#
5197#Example:
5198#adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup
5199#adaptation service_set svcLogger loggerLocal loggerRemote
5200#Default:
5201# none
5202
5203# TAG: adaptation_service_chain
5204#
5205# Configures a list of complementary services that will be applied
5206# one-by-one, forming an adaptation chain or pipeline. This is useful
5207# when Squid must perform different adaptations on the same message.
5208#
5209# adaptation_service_chain chain_name service_name1 svc_name2 ...
5210#
5211# The named services are used in the chain declaration order. The first
5212# applicable adaptation service from the chain is used first. The next
5213# applicable service is applied to the successful adaptation results of
5214# the previous service in the chain.
5215#
5216# When adaptation starts, broken services are ignored as if they were
5217# not a part of the chain. A broken service is a down optional service.
5218#
5219# Request satisfaction terminates the adaptation chain because Squid
5220# does not currently allow declaration of RESPMOD services at the
5221# "reqmod_precache" vectoring point (see icap_service or ecap_service).
5222#
5223# The services in a chain must be attached to the same vectoring point
5224# (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
5225#
5226# A chain may contain a mix of optional and essential services. If an
5227# essential adaptation fails (or the failure cannot be bypassed for
5228# other reasons), the master transaction fails. Otherwise, the failure
5229# is bypassed as if the failed adaptation service was not in the chain.
5230#
5231# See also: adaptation_access adaptation_service_set
5232#
5233#Example:
5234#adaptation_service_chain svcRequest requestLogger urlFilter leakDetector
5235#Default:
5236# none
5237
5238# TAG: adaptation_access
5239# Sends an HTTP transaction to an ICAP or eCAP adaptation service.
5240#
5241# adaptation_access service_name allow|deny [!]aclname...
5242# adaptation_access set_name allow|deny [!]aclname...
5243#
5244# At each supported vectoring point, the adaptation_access
5245# statements are processed in the order they appear in this
5246# configuration file. Statements pointing to the following services
5247# are ignored (i.e., skipped without checking their ACL):
5248#
5249# - services serving different vectoring points
5250# - "broken-but-bypassable" services
5251# - "up" services configured to ignore such transactions
5252# (e.g., based on the ICAP Transfer-Ignore header).
5253#
5254# When a set_name is used, all services in the set are checked
5255# using the same rules, to find the first applicable one. See
5256# adaptation_service_set for details.
5257#
5258# If an access list is checked and there is a match, the
5259# processing stops: For an "allow" rule, the corresponding
5260# adaptation service is used for the transaction. For a "deny"
5261# rule, no adaptation service is activated.
5262#
5263# It is currently not possible to apply more than one adaptation
5264# service at the same vectoring point to the same HTTP transaction.
5265#
5266# See also: icap_service and ecap_service
5267#
5268#Example:
5269#adaptation_access service_1 allow all
5270#Default:
5271# none
5272
5273# TAG: adaptation_service_iteration_limit
5274# Limits the number of iterations allowed when applying adaptation
5275# services to a message. If your longest adaptation set or chain
5276# may have more than 16 services, increase the limit beyond its
5277# default value of 16. If detecting infinite iteration loops sooner
5278# is critical, make the iteration limit match the actual number
5279# of services in your longest adaptation set or chain.
5280#
5281# Infinite adaptation loops are most likely with routing services.
5282#
5283# See also: icap_service routing=1
5284#Default:
5285# adaptation_service_iteration_limit 16
5286
5287# TAG: adaptation_masterx_shared_names
5288# For each master transaction (i.e., the HTTP request and response
5289# sequence, including all related ICAP and eCAP exchanges), Squid
5290# maintains a table of metadata. The table entries are (name, value)
5291# pairs shared among eCAP and ICAP exchanges. The table is destroyed
5292# with the master transaction.
5293#
5294# This option specifies the table entry names that Squid must accept
5295# from and forward to the adaptation transactions.
5296#
5297# An ICAP REQMOD or RESPMOD transaction may set an entry in the
5298# shared table by returning an ICAP header field with a name
5299# specified in adaptation_masterx_shared_names. Squid will store
5300# and forward that ICAP header field to subsequent ICAP
5301# transactions within the same master transaction scope.
5302#
5303# Only one shared entry name is supported at this time.
5304#
5305#Example:
5306## share authentication information among ICAP services
5307#adaptation_masterx_shared_names X-Subscriber-ID
5308#Default:
5309# none
5310
5311# TAG: icap_retry
5312# This ACL determines which retriable ICAP transactions are
5313# retried. Transactions that received a complete ICAP response
5314# and did not have to consume or produce HTTP bodies to receive
5315# that response are usually retriable.
5316#
5317# icap_retry allow|deny [!]aclname ...
5318#
5319# Squid automatically retries some ICAP I/O timeouts and errors
5320# due to persistent connection race conditions.
5321#
5322# See also: icap_retry_limit
5323#Default:
5324# icap_retry deny all
5325
5326# TAG: icap_retry_limit
5327# Limits the number of retries allowed. When set to zero (default),
5328# no retries are allowed.
5329#
5330# Communication errors due to persistent connection race
5331# conditions are unavoidable, automatically retried, and do not
5332# count against this limit.
5333#
5334# See also: icap_retry
5335#Default:
5336# icap_retry_limit 0
5337
5338# DNS OPTIONS
5339# -----------------------------------------------------------------------------
5340
5341# TAG: check_hostnames
5342# For security and stability reasons Squid can check
5343# hostnames for Internet standard RFC compliance. If you want
5344# Squid to perform these checks turn this directive on.
5345#Default:
5346# check_hostnames off
5347
5348# TAG: allow_underscore
5349# Underscore characters is not strictly allowed in Internet hostnames
5350# but nevertheless used by many sites. Set this to off if you want
5351# Squid to be strict about the standard.
5352# This check is performed only when check_hostnames is set to on.
5353#Default:
5354# allow_underscore on
5355
5356# TAG: cache_dns_program
5357# Note: This option is only available if Squid is rebuilt with the
5358# --disable-internal-dns option
5359#
5360# Specify the location of the executable for dnslookup process.
5361#Default:
5362# cache_dns_program /usr/lib/squid3/dnsserver
5363
5364# TAG: dns_children
5365# Note: This option is only available if Squid is rebuilt with the
5366# --disable-internal-dns option
5367#
5368# The number of processes spawn to service DNS name lookups.
5369# For heavily loaded caches on large servers, you should
5370# probably increase this value to at least 10. The maximum
5371# is 32. The default is 5.
5372#
5373# You must have at least one dnsserver process.
5374#Default:
5375# dns_children 5
5376
5377# TAG: dns_retransmit_interval
5378# Initial retransmit interval for DNS queries. The interval is
5379# doubled each time all configured DNS servers have been tried.
5380#
5381#Default:
5382# dns_retransmit_interval 5 seconds
5383
5384# TAG: dns_timeout
5385# DNS Query timeout. If no response is received to a DNS query
5386# within this time all DNS servers for the queried domain
5387# are assumed to be unavailable.
5388#Default:
5389# dns_timeout 2 minutes
5390
5391# TAG: dns_defnames on|off
5392# Normally the RES_DEFNAMES resolver option is disabled
5393# (see res_init(3)). This prevents caches in a hierarchy
5394# from interpreting single-component hostnames locally. To allow
5395# Squid to handle single-component names, enable this option.
5396#Default:
5397# dns_defnames off
5398
5399# TAG: dns_nameservers
5400# Use this if you want to specify a list of DNS name servers
5401# (IP addresses) to use instead of those given in your
5402# /etc/resolv.conf file.
5403# On Windows platforms, if no value is specified here or in
5404# the /etc/resolv.conf file, the list of DNS name servers are
5405# taken from the Windows registry, both static and dynamic DHCP
5406# configurations are supported.
5407#
5408# Example: dns_nameservers 10.0.0.1 192.172.0.4
5409#Default:
5410# none
5411
5412# TAG: hosts_file
5413# Location of the host-local IP name-address associations
5414# database. Most Operating Systems have such a file on different
5415# default locations:
5416# - Un*X & Linux: /etc/hosts
5417# - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
5418# (%SystemRoot% value install default is c:\winnt)
5419# - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
5420# (%SystemRoot% value install default is c:\windows)
5421# - Windows 9x/Me: %windir%\hosts
5422# (%windir% value is usually c:\windows)
5423# - Cygwin: /etc/hosts
5424#
5425# The file contains newline-separated definitions, in the
5426# form ip_address_in_dotted_form name [name ...] names are
5427# whitespace-separated. Lines beginning with an hash (#)
5428# character are comments.
5429#
5430# The file is checked at startup and upon configuration.
5431# If set to 'none', it won't be checked.
5432# If append_domain is used, that domain will be added to
5433# domain-local (i.e. not containing any dot character) host
5434# definitions.
5435#Default:
5436# hosts_file /etc/hosts
5437
5438# TAG: append_domain
5439# Appends local domain name to hostnames without any dots in
5440# them. append_domain must begin with a period.
5441#
5442# Be warned there are now Internet names with no dots in
5443# them using only top-domain names, so setting this may
5444# cause some Internet sites to become unavailable.
5445#
5446#Example:
5447# append_domain .yourdomain.com
5448#Default:
5449# none
5450
5451# TAG: ignore_unknown_nameservers
5452# By default Squid checks that DNS responses are received
5453# from the same IP addresses they are sent to. If they
5454# don't match, Squid ignores the response and writes a warning
5455# message to cache.log. You can allow responses from unknown
5456# nameservers by setting this option to 'off'.
5457#Default:
5458# ignore_unknown_nameservers on
5459
5460# TAG: dns_v4_fallback
5461# Standard practice with DNS is to lookup either A or AAAA records
5462# and use the results if it succeeds. Only looking up the other if
5463# the first attempt fails or otherwise produces no results.
5464#
5465# That policy however will cause squid to produce error pages for some
5466# servers that advertise AAAA but are unreachable over IPv6.
5467#
5468# If this is ON squid will always lookup both AAAA and A, using both.
5469# If this is OFF squid will lookup AAAA and only try A if none found.
5470#
5471# WARNING: There are some possibly unwanted side-effects with this on:
5472# *) Doubles the load placed by squid on the DNS network.
5473# *) May negatively impact connection delay times.
5474#Default:
5475# dns_v4_fallback on
5476
5477# TAG: dns_v4_first
5478# With the IPv6 Internet being as fast or faster than IPv4 Internet
5479# for most networks Squid prefers to contact websites over IPv6.
5480#
5481# This option reverses the order of preference to make Squid contact
5482# dual-stack websites over IPv4 first. Squid will still perform both
5483# IPv6 and IPv4 DNS lookups before connecting.
5484#
5485# WARNING:
5486# This option will restrict the situations under which IPv6
5487# connectivity is used (and tested). Hiding network problems
5488# which would otherwise be detected and warned about.
5489#Default:
5490# dns_v4_first off
5491
5492# TAG: ipcache_size (number of entries)
5493#Default:
5494# ipcache_size 1024
5495
5496# TAG: ipcache_low (percent)
5497#Default:
5498# ipcache_low 90
5499
5500# TAG: ipcache_high (percent)
5501# The size, low-, and high-water marks for the IP cache.
5502#Default:
5503# ipcache_high 95
5504
5505# TAG: fqdncache_size (number of entries)
5506# Maximum number of FQDN cache entries.
5507#Default:
5508# fqdncache_size 1024
5509
5510# MISCELLANEOUS
5511# -----------------------------------------------------------------------------
5512
5513# TAG: memory_pools on|off
5514# If set, Squid will keep pools of allocated (but unused) memory
5515# available for future use. If memory is a premium on your
5516# system and you believe your malloc library outperforms Squid
5517# routines, disable this.
5518#Default:
5519# memory_pools on
5520
5521# TAG: memory_pools_limit (bytes)
5522# Used only with memory_pools on:
5523# memory_pools_limit 50 MB
5524#
5525# If set to a non-zero value, Squid will keep at most the specified
5526# limit of allocated (but unused) memory in memory pools. All free()
5527# requests that exceed this limit will be handled by your malloc
5528# library. Squid does not pre-allocate any memory, just safe-keeps
5529# objects that otherwise would be free()d. Thus, it is safe to set
5530# memory_pools_limit to a reasonably high value even if your
5531# configuration will use less memory.
5532#
5533# If set to none, Squid will keep all memory it can. That is, there
5534# will be no limit on the total amount of memory used for safe-keeping.
5535#
5536# To disable memory allocation optimization, do not set
5537# memory_pools_limit to 0 or none. Set memory_pools to "off" instead.
5538#
5539# An overhead for maintaining memory pools is not taken into account
5540# when the limit is checked. This overhead is close to four bytes per
5541# object kept. However, pools may actually _save_ memory because of
5542# reduced memory thrashing in your malloc library.
5543#Default:
5544# memory_pools_limit 5 MB
5545
5546# TAG: forwarded_for on|off|transparent|truncate|delete
5547# If set to "on", Squid will append your client's IP address
5548# in the HTTP requests it forwards. By default it looks like:
5549#
5550# X-Forwarded-For: 192.1.2.3
5551#
5552# If set to "off", it will appear as
5553#
5554# X-Forwarded-For: unknown
5555#
5556# If set to "transparent", Squid will not alter the
5557# X-Forwarded-For header in any way.
5558#
5559# If set to "delete", Squid will delete the entire
5560# X-Forwarded-For header.
5561#
5562# If set to "truncate", Squid will remove all existing
5563# X-Forwarded-For entries, and place itself as the sole entry.
5564#Default:
5565# forwarded_for on
5566
5567# TAG: cachemgr_passwd
5568# Specify passwords for cachemgr operations.
5569#
5570# Usage: cachemgr_passwd password action action ...
5571#
5572# Some valid actions are (see cache manager menu for a full list):
5573# 5min
5574# 60min
5575# asndb
5576# authenticator
5577# cbdata
5578# client_list
5579# comm_incoming
5580# config *
5581# counters
5582# delay
5583# digest_stats
5584# dns
5585# events
5586# filedescriptors
5587# fqdncache
5588# histograms
5589# http_headers
5590# info
5591# io
5592# ipcache
5593# mem
5594# menu
5595# netdb
5596# non_peers
5597# objects
5598# offline_toggle *
5599# pconn
5600# peer_select
5601# reconfigure *
5602# redirector
5603# refresh
5604# server_list
5605# shutdown *
5606# store_digest
5607# storedir
5608# utilization
5609# via_headers
5610# vm_objects
5611#
5612# * Indicates actions which will not be performed without a
5613# valid password, others can be performed if not listed here.
5614#
5615# To disable an action, set the password to "disable".
5616# To allow performing an action without a password, set the
5617# password to "none".
5618#
5619# Use the keyword "all" to set the same password for all actions.
5620#
5621#Example:
5622# cachemgr_passwd secret shutdown
5623# cachemgr_passwd lesssssssecret info stats/objects
5624# cachemgr_passwd disable all
5625#Default:
5626# none
5627
5628# TAG: client_db on|off
5629# If you want to disable collecting per-client statistics,
5630# turn off client_db here.
5631#Default:
5632# client_db on
5633
5634# TAG: refresh_all_ims on|off
5635# When you enable this option, squid will always check
5636# the origin server for an update when a client sends an
5637# If-Modified-Since request. Many browsers use IMS
5638# requests when the user requests a reload, and this
5639# ensures those clients receive the latest version.
5640#
5641# By default (off), squid may return a Not Modified response
5642# based on the age of the cached version.
5643#Default:
5644# refresh_all_ims off
5645
5646# TAG: reload_into_ims on|off
5647# When you enable this option, client no-cache or ``reload''
5648# requests will be changed to If-Modified-Since requests.
5649# Doing this VIOLATES the HTTP standard. Enabling this
5650# feature could make you liable for problems which it
5651# causes.
5652#
5653# see also refresh_pattern for a more selective approach.
5654#Default:
5655# reload_into_ims off
5656
5657# TAG: maximum_single_addr_tries
5658# This sets the maximum number of connection attempts for a
5659# host that only has one address (for multiple-address hosts,
5660# each address is tried once).
5661#
5662# The default value is one attempt, the (not recommended)
5663# maximum is 255 tries. A warning message will be generated
5664# if it is set to a value greater than ten.
5665#
5666# Note: This is in addition to the request re-forwarding which
5667# takes place if Squid fails to get a satisfying response.
5668#Default:
5669# maximum_single_addr_tries 1
5670
5671# TAG: retry_on_error
5672# If set to ON Squid will automatically retry requests when
5673# receiving an error response with status 403 (Forbidden),
5674# 500 (Internal Error), 501 or 503 (Service not available).
5675# Status 502 and 504 (Gateway errors) are always retried.
5676#
5677# This is mainly useful if you are in a complex cache hierarchy to
5678# work around access control errors.
5679#
5680# NOTE: This retry will attempt to find another working destination.
5681# Which is different from the server which just failed.
5682#Default:
5683# retry_on_error off
5684
5685# TAG: as_whois_server
5686# WHOIS server to query for AS numbers. NOTE: AS numbers are
5687# queried only when Squid starts up, not for every request.
5688#Default:
5689# as_whois_server whois.ra.net
5690
5691# TAG: offline_mode
5692# Enable this option and Squid will never try to validate cached
5693# objects.
5694#Default:
5695# offline_mode off
5696
5697# TAG: uri_whitespace
5698# What to do with requests that have whitespace characters in the
5699# URI. Options:
5700#
5701# strip: The whitespace characters are stripped out of the URL.
5702# This is the behavior recommended by RFC2396.
5703# deny: The request is denied. The user receives an "Invalid
5704# Request" message.
5705# allow: The request is allowed and the URI is not changed. The
5706# whitespace characters remain in the URI. Note the
5707# whitespace is passed to redirector processes if they
5708# are in use.
5709# encode: The request is allowed and the whitespace characters are
5710# encoded according to RFC1738. This could be considered
5711# a violation of the HTTP/1.1
5712# RFC because proxies are not allowed to rewrite URI's.
5713# chop: The request is allowed and the URI is chopped at the
5714# first whitespace. This might also be considered a
5715# violation.
5716#Default:
5717# uri_whitespace strip
5718
5719# TAG: chroot
5720# Specifies a directory where Squid should do a chroot() while
5721# initializing. This also causes Squid to fully drop root
5722# privileges after initializing. This means, for example, if you
5723# use a HTTP port less than 1024 and try to reconfigure, you may
5724# get an error saying that Squid can not open the port.
5725#Default:
5726# none
5727
5728# TAG: balance_on_multiple_ip
5729# Modern IP resolvers in squid sort lookup results by preferred access.
5730# By default squid will use these IP in order and only rotates to
5731# the next listed when the most preffered fails.
5732#
5733# Some load balancing servers based on round robin DNS have been
5734# found not to preserve user session state across requests
5735# to different IP addresses.
5736#
5737# Enabling this directive Squid rotates IP's per request.
5738#Default:
5739# balance_on_multiple_ip off
5740
5741# TAG: pipeline_prefetch
5742# To boost the performance of pipelined requests to closer
5743# match that of a non-proxied environment Squid can try to fetch
5744# up to two requests in parallel from a pipeline.
5745#
5746# Defaults to off for bandwidth management and access logging
5747# reasons.
5748#
5749# WARNING: pipelining breaks NTLM and Negotiate/Kerberos authentication.
5750#Default:
5751# pipeline_prefetch off
5752
5753# TAG: high_response_time_warning (msec)
5754# If the one-minute median response time exceeds this value,
5755# Squid prints a WARNING with debug level 0 to get the
5756# administrators attention. The value is in milliseconds.
5757#Default:
5758# high_response_time_warning 0
5759
5760# TAG: high_page_fault_warning
5761# If the one-minute average page fault rate exceeds this
5762# value, Squid prints a WARNING with debug level 0 to get
5763# the administrators attention. The value is in page faults
5764# per second.
5765#Default:
5766# high_page_fault_warning 0
5767
5768# TAG: high_memory_warning
5769# If the memory usage (as determined by mallinfo) exceeds
5770# this amount, Squid prints a WARNING with debug level 0 to get
5771# the administrators attention.
5772#Default:
5773# high_memory_warning 0 KB
5774
5775# TAG: sleep_after_fork (microseconds)
5776# When this is set to a non-zero value, the main Squid process
5777# sleeps the specified number of microseconds after a fork()
5778# system call. This sleep may help the situation where your
5779# system reports fork() failures due to lack of (virtual)
5780# memory. Note, however, if you have a lot of child
5781# processes, these sleep delays will add up and your
5782# Squid will not service requests for some amount of time
5783# until all the child processes have been started.
5784# On Windows value less then 1000 (1 milliseconds) are
5785# rounded to 1000.
5786#Default:
5787# sleep_after_fork 0
5788
5789# TAG: windows_ipaddrchangemonitor on|off
5790# On Windows Squid by default will monitor IP address changes and will
5791# reconfigure itself after any detected event. This is very useful for
5792# proxies connected to internet with dial-up interfaces.
5793# In some cases (a Proxy server acting as VPN gateway is one) it could be
5794# desiderable to disable this behaviour setting this to 'off'.
5795# Note: after changing this, Squid service must be restarted.
5796#Default:
5797# windows_ipaddrchangemonitor on
5798
5799# TAG: max_filedescriptors
5800# The maximum number of filedescriptors supported.
5801#
5802# The default "0" means Squid inherits the current ulimit setting.
5803#
5804# Note: Changing this requires a restart of Squid. Also
5805# not all comm loops supports large values.
5806#Default:
5807# max_filedescriptors 0