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