· 10 years ago · Aug 12, 2016, 09:34 AM
1# WELCOME TO SQUID 3.5.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# Values with byte units
37#
38# Squid accepts size units on some size related directives. All
39# such directives are documented with a default value displaying
40# a unit.
41#
42# Units accepted by Squid are:
43# bytes - byte
44# KB - Kilobyte (1024 bytes)
45# MB - Megabyte
46# GB - Gigabyte
47#
48# Values with spaces, quotes, and other special characters
49#
50# Squid supports directive parameters with spaces, quotes, and other
51# special characters. Surround such parameters with "double quotes". Use
52# the configuration_includes_quoted_values directive to enable or
53# disable that support.
54#
55# Squid supports reading configuration option parameters from external
56# files using the syntax:
57# parameters("/path/filename")
58# For example:
59# acl whitelist dstdomain parameters("/etc/squid/whitelist.txt")
60#
61# Conditional configuration
62#
63# If-statements can be used to make configuration directives
64# depend on conditions:
65#
66# if <CONDITION>
67# ... regular configuration directives ...
68# [else
69# ... regular configuration directives ...]
70# endif
71#
72# The else part is optional. The keywords "if", "else", and "endif"
73# must be typed on their own lines, as if they were regular
74# configuration directives.
75#
76# NOTE: An else-if condition is not supported.
77#
78# These individual conditions types are supported:
79#
80# true
81# Always evaluates to true.
82# false
83# Always evaluates to false.
84# <integer> = <integer>
85# Equality comparison of two integer numbers.
86#
87#
88# SMP-Related Macros
89#
90# The following SMP-related preprocessor macros can be used.
91#
92# ${process_name} expands to the current Squid process "name"
93# (e.g., squid1, squid2, or cache1).
94#
95# ${process_number} expands to the current Squid process
96# identifier, which is an integer number (e.g., 1, 2, 3) unique
97# across all Squid processes of the current service instance.
98#
99# ${service_name} expands into the current Squid service instance
100# name identifier which is provided by -n on the command line.
101#
102
103# TAG: broken_vary_encoding
104# This option is not yet supported by Squid-3.
105#Default:
106# none
107
108# TAG: cache_vary
109# This option is not yet supported by Squid-3.
110#Default:
111# none
112
113# TAG: error_map
114# This option is not yet supported by Squid-3.
115#Default:
116# none
117
118# TAG: external_refresh_check
119# This option is not yet supported by Squid-3.
120#Default:
121# none
122
123# TAG: location_rewrite_program
124# This option is not yet supported by Squid-3.
125#Default:
126# none
127
128# TAG: refresh_stale_hit
129# This option is not yet supported by Squid-3.
130#Default:
131# none
132
133# TAG: hierarchy_stoplist
134# Remove this line. Use always_direct or cache_peer_access ACLs instead if you need to prevent cache_peer use.
135#Default:
136# none
137
138# TAG: log_access
139# Remove this line. Use acls with access_log directives to control access logging
140#Default:
141# none
142
143# TAG: log_icap
144# Remove this line. Use acls with icap_log directives to control icap logging
145#Default:
146# none
147
148# TAG: ignore_ims_on_miss
149# Remove this line. The HTTP/1.1 feature is now configured by 'cache_miss_revalidate'.
150#Default:
151# none
152
153# TAG: chunked_request_body_max_size
154# Remove this line. Squid is now HTTP/1.1 compliant.
155#Default:
156# none
157
158# TAG: dns_v4_fallback
159# Remove this line. Squid performs a 'Happy Eyeballs' algorithm, the 'fallback' algorithm is no longer relevant.
160#Default:
161# none
162
163# TAG: emulate_httpd_log
164# Replace this with an access_log directive using the format 'common' or 'combined'.
165#Default:
166# none
167
168# TAG: forward_log
169# Use a regular access.log with ACL limiting it to MISS events.
170#Default:
171# none
172
173# TAG: ftp_list_width
174# Remove this line. Configure FTP page display using the CSS controls in errorpages.css instead.
175#Default:
176# none
177
178# TAG: ignore_expect_100
179# Remove this line. The HTTP/1.1 feature is now fully supported by default.
180#Default:
181# none
182
183# TAG: log_fqdn
184# Remove this option from your config. To log FQDN use %>A in the log format.
185#Default:
186# none
187
188# TAG: log_ip_on_direct
189# Remove this option from your config. To log server or peer names use %<A in the log format.
190#Default:
191# none
192
193# TAG: maximum_single_addr_tries
194# Replaced by connect_retries. The behaviour has changed, please read the documentation before altering.
195#Default:
196# none
197
198# TAG: referer_log
199# Replace this with an access_log directive using the format 'referrer'.
200#Default:
201# none
202
203# TAG: update_headers
204# Remove this line. The feature is supported by default in storage types where update is implemented.
205#Default:
206# none
207
208# TAG: url_rewrite_concurrency
209# Remove this line. Set the 'concurrency=' option of url_rewrite_children instead.
210#Default:
211# none
212
213# TAG: useragent_log
214# Replace this with an access_log directive using the format 'useragent'.
215#Default:
216# none
217
218# TAG: dns_testnames
219# Remove this line. DNS is no longer tested on startup.
220#Default:
221# none
222
223# TAG: extension_methods
224# Remove this line. All valid methods for HTTP are accepted by default.
225#Default:
226# none
227
228# TAG: zero_buffers
229#Default:
230# none
231
232# TAG: incoming_rate
233#Default:
234# none
235
236# TAG: server_http11
237# Remove this line. HTTP/1.1 is supported by default.
238#Default:
239# none
240
241# TAG: upgrade_http0.9
242# Remove this line. ICY/1.0 streaming protocol is supported by default.
243#Default:
244# none
245
246# TAG: zph_local
247# Alter these entries. Use the qos_flows directive instead.
248#Default:
249# none
250
251# TAG: header_access
252# Since squid-3.0 replace with request_header_access or reply_header_access
253# depending on whether you wish to match client requests or server replies.
254#Default:
255# none
256
257# TAG: httpd_accel_no_pmtu_disc
258# Since squid-3.0 use the 'disable-pmtu-discovery' flag on http_port instead.
259#Default:
260# none
261
262# TAG: wais_relay_host
263# Replace this line with 'cache_peer' configuration.
264#Default:
265# none
266
267# TAG: wais_relay_port
268# Replace this line with 'cache_peer' configuration.
269#Default:
270# none
271
272# OPTIONS FOR SMP
273# -----------------------------------------------------------------------------
274
275# TAG: workers
276# Number of main Squid processes or "workers" to fork and maintain.
277# 0: "no daemon" mode, like running "squid -N ..."
278# 1: "no SMP" mode, start one main Squid process daemon (default)
279# N: start N main Squid process daemons (i.e., SMP mode)
280#
281# In SMP mode, each worker does nearly all what a single Squid daemon
282# does (e.g., listen on http_port and forward HTTP requests).
283#Default:
284# SMP support disabled.
285
286# TAG: cpu_affinity_map
287# Usage: cpu_affinity_map process_numbers=P1,P2,... cores=C1,C2,...
288#
289# Sets 1:1 mapping between Squid processes and CPU cores. For example,
290#
291# cpu_affinity_map process_numbers=1,2,3,4 cores=1,3,5,7
292#
293# affects processes 1 through 4 only and places them on the first
294# four even cores, starting with core #1.
295#
296# CPU cores are numbered starting from 1. Requires support for
297# sched_getaffinity(2) and sched_setaffinity(2) system calls.
298#
299# Multiple cpu_affinity_map options are merged.
300#
301# See also: workers
302#Default:
303# Let operating system decide.
304
305# OPTIONS FOR AUTHENTICATION
306# -----------------------------------------------------------------------------
307
308# TAG: auth_param
309# This is used to define parameters for the various authentication
310# schemes supported by Squid.
311#
312# format: auth_param scheme parameter [setting]
313#
314# The order in which authentication schemes are presented to the client is
315# dependent on the order the scheme first appears in config file. IE
316# has a bug (it's not RFC 2617 compliant) in that it will use the basic
317# scheme if basic is the first entry presented, even if more secure
318# schemes are presented. For now use the order in the recommended
319# settings section below. If other browsers have difficulties (don't
320# recognize the schemes offered even if you are using basic) either
321# put basic first, or disable the other schemes (by commenting out their
322# program entry).
323#
324# Once an authentication scheme is fully configured, it can only be
325# shutdown by shutting squid down and restarting. Changes can be made on
326# the fly and activated with a reconfigure. I.E. You can change to a
327# different helper, but not unconfigure the helper completely.
328#
329# Please note that while this directive defines how Squid processes
330# authentication it does not automatically activate authentication.
331# To use authentication you must in addition make use of ACLs based
332# on login name i (proxy_auth, proxy_auth_regex or
333# external with %LOGIN used in the format tag). The browser will be
334# challenged for authentication on the first such acl encountered
335# in http_access processing and will also be re-challenged for new
336# login credentials if the request is being denied by a proxy_auth
337# type acl.
338#
339# WARNING: authentication can't be used in a transparently intercepting
340# proxy as the client then thinks it is talking to an origin server and
341# not the proxy. This is a limitation of bending the TCP/IP protocol to
342# transparently intercepting port 80, not a limitation in Squid.
343# Ports flagged 'transparent', 'intercept', or 'tproxy' have
344# authentication disabled.
345#
346# === Parameters common to all schemes. ===
347#
348# "program" cmdline
349# Specifies the command for the external authenticator.
350#
351# By default, each authentication scheme is not used unless a
352# program is specified.
353#
354# See http://wiki.squid-cache.org/Features/AddonHelpers for
355# more details on helper operations and creating your own.
356#
357# "key_extras" format
358# Specifies a string to be append to request line format for
359# the authentication helper. "Quoted" format values may contain
360# spaces and logformat %macros. In theory, any logformat %macro
361# can be used. In practice, a %macro expands as a dash (-) if
362# the helper request is sent before the required macro
363# information is available to Squid.
364#
365# By default, Squid uses request formats provided in
366# scheme-specific examples below (search for %credentials).
367#
368# The expanded key_extras value is added to the Squid credentials
369# cache and, hence, will affect authentication. It can be used to
370# autenticate different users with identical user names (e.g.,
371# when user authentication depends on http_port).
372#
373# Avoid adding frequently changing information to key_extras. For
374# example, if you add user source IP, and it changes frequently
375# in your environment, then max_user_ip ACL is going to treat
376# every user+IP combination as a unique "user", breaking the ACL
377# and wasting a lot of memory on those user records. It will also
378# force users to authenticate from scratch whenever their IP
379# changes.
380#
381# "realm" string
382# Specifies the protection scope (aka realm name) which is to be
383# reported to the client for the authentication scheme. It is
384# commonly part of the text the user will see when prompted for
385# their username and password.
386#
387# For Basic the default is "Squid proxy-caching web server".
388# For Digest there is no default, this parameter is mandatory.
389# For NTLM and Negotiate this parameter is ignored.
390#
391# "children" numberofchildren [startup=N] [idle=N] [concurrency=N]
392#
393# The maximum number of authenticator processes to spawn. If
394# you start too few Squid will have to wait for them to process
395# a backlog of credential verifications, slowing it down. When
396# password verifications are done via a (slow) network you are
397# likely to need lots of authenticator processes.
398#
399# The startup= and idle= options permit some skew in the exact
400# amount run. A minimum of startup=N will begin during startup
401# and reconfigure. Squid will start more in groups of up to
402# idle=N in an attempt to meet traffic needs and to keep idle=N
403# free above those traffic needs up to the maximum.
404#
405# The concurrency= option sets the number of concurrent requests
406# the helper can process. The default of 0 is used for helpers
407# who only supports one request at a time. Setting this to a
408# number greater than 0 changes the protocol used to include a
409# channel ID field first on the request/response line, allowing
410# multiple requests to be sent to the same helper in parallel
411# without waiting for the response.
412#
413# Concurrency must not be set unless it's known the helper
414# supports the input format with channel-ID fields.
415#
416# NOTE: NTLM and Negotiate schemes do not support concurrency
417# in the Squid code module even though some helpers can.
418#
419#
420#
421# === Example Configuration ===
422#
423# This configuration displays the recommended authentication scheme
424# order from most to least secure with recommended minimum configuration
425# settings for each scheme:
426#
427##auth_param negotiate program <uncomment and complete this line to activate>
428##auth_param negotiate children 20 startup=0 idle=1
429##auth_param negotiate keep_alive on
430##
431##auth_param digest program <uncomment and complete this line to activate>
432##auth_param digest children 20 startup=0 idle=1
433##auth_param digest realm Squid proxy-caching web server
434##auth_param digest nonce_garbage_interval 5 minutes
435##auth_param digest nonce_max_duration 30 minutes
436##auth_param digest nonce_max_count 50
437##
438##auth_param ntlm program <uncomment and complete this line to activate>
439##auth_param ntlm children 20 startup=0 idle=1
440##auth_param ntlm keep_alive on
441##
442##auth_param basic program <uncomment and complete this line>
443##auth_param basic children 5 startup=5 idle=1
444##auth_param basic realm Squid proxy-caching web server
445##auth_param basic credentialsttl 2 hours
446#Default:
447# none
448
449# TAG: authenticate_cache_garbage_interval
450# The time period between garbage collection across the username cache.
451# This is a trade-off between memory utilization (long intervals - say
452# 2 days) and CPU (short intervals - say 1 minute). Only change if you
453# have good reason to.
454#Default:
455# authenticate_cache_garbage_interval 1 hour
456
457# TAG: authenticate_ttl
458# The time a user & their credentials stay in the logged in
459# user cache since their last request. When the garbage
460# interval passes, all user credentials that have passed their
461# TTL are removed from memory.
462#Default:
463# authenticate_ttl 1 hour
464
465# TAG: authenticate_ip_ttl
466# If you use proxy authentication and the 'max_user_ip' ACL,
467# this directive controls how long Squid remembers the IP
468# addresses associated with each user. Use a small value
469# (e.g., 60 seconds) if your users might change addresses
470# quickly, as is the case with dialup. You might be safe
471# using a larger value (e.g., 2 hours) in a corporate LAN
472# environment with relatively static address assignments.
473#Default:
474# authenticate_ip_ttl 1 second
475
476# ACCESS CONTROLS
477# -----------------------------------------------------------------------------
478
479# TAG: external_acl_type
480# This option defines external acl classes using a helper program
481# to look up the status
482#
483# external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..]
484#
485# Options:
486#
487# ttl=n TTL in seconds for cached results (defaults to 3600
488# for 1 hour)
489#
490# negative_ttl=n
491# TTL for cached negative lookups (default same
492# as ttl)
493#
494# grace=n Percentage remaining of TTL where a refresh of a
495# cached entry should be initiated without needing to
496# wait for a new reply. (default is for no grace period)
497#
498# cache=n The maximum number of entries in the result cache. The
499# default limit is 262144 entries. Each cache entry usually
500# consumes at least 256 bytes. Squid currently does not remove
501# expired cache entries until the limit is reached, so a proxy
502# will sooner or later reach the limit. The expanded FORMAT
503# value is used as the cache key, so if the details in FORMAT
504# are highly variable, a larger cache may be needed to produce
505# reduction in helper load.
506#
507# children-max=n
508# Maximum number of acl helper processes spawned to service
509# external acl lookups of this type. (default 20)
510#
511# children-startup=n
512# Minimum number of acl helper processes to spawn during
513# startup and reconfigure to service external acl lookups
514# of this type. (default 0)
515#
516# children-idle=n
517# Number of acl helper processes to keep ahead of traffic
518# loads. Squid will spawn this many at once whenever load
519# rises above the capabilities of existing processes.
520# Up to the value of children-max. (default 1)
521#
522# concurrency=n concurrency level per process. Only used with helpers
523# capable of processing more than one query at a time.
524#
525# protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers.
526#
527# ipv4 / ipv6 IP protocol used to communicate with this helper.
528# The default is to auto-detect IPv6 and use it when available.
529#
530#
531# FORMAT specifications
532#
533# %LOGIN Authenticated user login name
534# %un A user name. Expands to the first available name
535# from the following list of information sources:
536# - authenticated user name, like %ul or %LOGIN
537# - user name sent by an external ACL, like %EXT_USER
538# - SSL client name, like %us in logformat
539# - ident user name, like %ui in logformat
540# %EXT_USER Username from previous external acl
541# %EXT_LOG Log details from previous external acl
542# %EXT_TAG Tag from previous external acl
543# %IDENT Ident user name
544# %SRC Client IP
545# %SRCPORT Client source port
546# %URI Requested URI
547# %DST Requested host
548# %PROTO Requested URL scheme
549# %PORT Requested port
550# %PATH Requested URL path
551# %METHOD Request method
552# %MYADDR Squid interface address
553# %MYPORT Squid http_port number
554# %PATH Requested URL-path (including query-string if any)
555# %USER_CERT SSL User certificate in PEM format
556# %USER_CERTCHAIN SSL User certificate chain in PEM format
557# %USER_CERT_xx SSL User certificate subject attribute xx
558# %USER_CA_CERT_xx SSL User certificate issuer attribute xx
559# %ssl::>sni SSL client SNI sent to Squid
560# %ssl::<cert_subject SSL server certificate DN
561# %ssl::<cert_issuer SSL server certificate issuer DN
562#
563# %>{Header} HTTP request header "Header"
564# %>{Hdr:member}
565# HTTP request header "Hdr" list member "member"
566# %>{Hdr:;member}
567# HTTP request header list member using ; as
568# list separator. ; can be any non-alphanumeric
569# character.
570#
571# %<{Header} HTTP reply header "Header"
572# %<{Hdr:member}
573# HTTP reply header "Hdr" list member "member"
574# %<{Hdr:;member}
575# HTTP reply header list member using ; as
576# list separator. ; can be any non-alphanumeric
577# character.
578#
579# %ACL The name of the ACL being tested.
580# %DATA The ACL arguments. If not used then any arguments
581# is automatically added at the end of the line
582# sent to the helper.
583# NOTE: this will encode the arguments as one token,
584# whereas the default will pass each separately.
585#
586# %% The percent sign. Useful for helpers which need
587# an unchanging input format.
588#
589#
590# General request syntax:
591#
592# [channel-ID] FORMAT-values [acl-values ...]
593#
594#
595# FORMAT-values consists of transaction details expanded with
596# whitespace separation per the config file FORMAT specification
597# using the FORMAT macros listed above.
598#
599# acl-values consists of any string specified in the referencing
600# config 'acl ... external' line. see the "acl external" directive.
601#
602# Request values sent to the helper are URL escaped to protect
603# each value in requests against whitespaces.
604#
605# If using protocol=2.5 then the request sent to the helper is not
606# URL escaped to protect against whitespace.
607#
608# NOTE: protocol=3.0 is deprecated as no longer necessary.
609#
610# When using the concurrency= option the protocol is changed by
611# introducing a query channel tag in front of the request/response.
612# The query channel tag is a number between 0 and concurrency-1.
613# This value must be echoed back unchanged to Squid as the first part
614# of the response relating to its request.
615#
616#
617# The helper receives lines expanded per the above format specification
618# and for each input line returns 1 line starting with OK/ERR/BH result
619# code and optionally followed by additional keywords with more details.
620#
621#
622# General result syntax:
623#
624# [channel-ID] result keyword=value ...
625#
626# Result consists of one of the codes:
627#
628# OK
629# the ACL test produced a match.
630#
631# ERR
632# the ACL test does not produce a match.
633#
634# BH
635# An internal error occurred in the helper, preventing
636# a result being identified.
637#
638# The meaning of 'a match' is determined by your squid.conf
639# access control configuration. See the Squid wiki for details.
640#
641# Defined keywords:
642#
643# user= The users name (login)
644#
645# password= The users password (for login= cache_peer option)
646#
647# message= Message describing the reason for this response.
648# Available as %o in error pages.
649# Useful on (ERR and BH results).
650#
651# tag= Apply a tag to a request. Only sets a tag once,
652# does not alter existing tags.
653#
654# log= String to be logged in access.log. Available as
655# %ea in logformat specifications.
656#
657# clt_conn_tag= Associates a TAG with the client TCP connection.
658# Please see url_rewrite_program related documentation
659# for this kv-pair.
660#
661# Any keywords may be sent on any response whether OK, ERR or BH.
662#
663# All response keyword values need to be a single token with URL
664# escaping, or enclosed in double quotes (") and escaped using \ on
665# any double quotes or \ characters within the value. The wrapping
666# double quotes are removed before the value is interpreted by Squid.
667# \r and \n are also replace by CR and LF.
668#
669# Some example key values:
670#
671# user=John%20Smith
672# user="John Smith"
673# user="J. \"Bob\" Smith"
674#Default:
675# none
676
677# TAG: acl
678# Defining an Access List
679#
680# Every access list definition must begin with an aclname and acltype,
681# followed by either type-specific arguments or a quoted filename that
682# they are read from.
683#
684# acl aclname acltype argument ...
685# acl aclname acltype "file" ...
686#
687# When using "file", the file should contain one item per line.
688#
689# Some acl types supports options which changes their default behaviour.
690# The available options are:
691#
692# -i,+i By default, regular expressions are CASE-SENSITIVE. To make them
693# case-insensitive, use the -i option. To return case-sensitive
694# use the +i option between patterns, or make a new ACL line
695# without -i.
696#
697# -n Disable lookups and address type conversions. If lookup or
698# conversion is required because the parameter type (IP or
699# domain name) does not match the message address type (domain
700# name or IP), then the ACL would immediately declare a mismatch
701# without any warnings or lookups.
702#
703# -- Used to stop processing all options, in the case the first acl
704# value has '-' character as first character (for example the '-'
705# is a valid domain name)
706#
707# Some acl types require suspending the current request in order
708# to access some external data source.
709# Those which do are marked with the tag [slow], those which
710# don't are marked as [fast].
711# See http://wiki.squid-cache.org/SquidFaq/SquidAcl
712# for further information
713#
714# ***** ACL TYPES AVAILABLE *****
715#
716# acl aclname src ip-address/mask ... # clients IP address [fast]
717# acl aclname src addr1-addr2/mask ... # range of addresses [fast]
718# acl aclname dst [-n] ip-address/mask ... # URL host's IP address [slow]
719# acl aclname localip ip-address/mask ... # IP address the client connected to [fast]
720#
721# acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation)
722# # [fast]
723# # The 'arp' ACL code is not portable to all operating systems.
724# # It works on Linux, Solaris, Windows, FreeBSD, and some other
725# # BSD variants.
726# #
727# # NOTE: Squid can only determine the MAC/EUI address for IPv4
728# # clients that are on the same subnet. If the client is on a
729# # different subnet, then Squid cannot find out its address.
730# #
731# # NOTE 2: IPv6 protocol does not contain ARP. MAC/EUI is either
732# # encoded directly in the IPv6 address or not available.
733#
734# acl aclname srcdomain .foo.com ...
735# # reverse lookup, from client IP [slow]
736# acl aclname dstdomain [-n] .foo.com ...
737# # Destination server from URL [fast]
738# acl aclname srcdom_regex [-i] \.foo\.com ...
739# # regex matching client name [slow]
740# acl aclname dstdom_regex [-n] [-i] \.foo\.com ...
741# # regex matching server [fast]
742# #
743# # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
744# # based URL is used and no match is found. The name "none" is used
745# # if the reverse lookup fails.
746#
747# acl aclname src_as number ...
748# acl aclname dst_as number ...
749# # [fast]
750# # Except for access control, AS numbers can be used for
751# # routing of requests to specific caches. Here's an
752# # example for routing all requests for AS#1241 and only
753# # those to mycache.mydomain.net:
754# # acl asexample dst_as 1241
755# # cache_peer_access mycache.mydomain.net allow asexample
756# # cache_peer_access mycache_mydomain.net deny all
757#
758# acl aclname peername myPeer ...
759# # [fast]
760# # match against a named cache_peer entry
761# # set unique name= on cache_peer lines for reliable use.
762#
763# acl aclname time [day-abbrevs] [h1:m1-h2:m2]
764# # [fast]
765# # day-abbrevs:
766# # S - Sunday
767# # M - Monday
768# # T - Tuesday
769# # W - Wednesday
770# # H - Thursday
771# # F - Friday
772# # A - Saturday
773# # h1:m1 must be less than h2:m2
774#
775# acl aclname url_regex [-i] ^http:// ...
776# # regex matching on whole URL [fast]
777# acl aclname urllogin [-i] [^a-zA-Z0-9] ...
778# # regex matching on URL login field
779# acl aclname urlpath_regex [-i] \.gif$ ...
780# # regex matching on URL path [fast]
781#
782# acl aclname port 80 70 21 0-1024... # destination TCP port [fast]
783# # ranges are alloed
784# acl aclname localport 3128 ... # TCP port the client connected to [fast]
785# # NP: for interception mode this is usually '80'
786#
787# acl aclname myportname 3128 ... # *_port name [fast]
788#
789# acl aclname proto HTTP FTP ... # request protocol [fast]
790#
791# acl aclname method GET POST ... # HTTP request method [fast]
792#
793# acl aclname http_status 200 301 500- 400-403 ...
794# # status code in reply [fast]
795#
796# acl aclname browser [-i] regexp ...
797# # pattern match on User-Agent header (see also req_header below) [fast]
798#
799# acl aclname referer_regex [-i] regexp ...
800# # pattern match on Referer header [fast]
801# # Referer is highly unreliable, so use with care
802#
803# acl aclname ident username ...
804# acl aclname ident_regex [-i] pattern ...
805# # string match on ident output [slow]
806# # use REQUIRED to accept any non-null ident.
807#
808# acl aclname proxy_auth [-i] username ...
809# acl aclname proxy_auth_regex [-i] pattern ...
810# # perform http authentication challenge to the client and match against
811# # supplied credentials [slow]
812# #
813# # takes a list of allowed usernames.
814# # use REQUIRED to accept any valid username.
815# #
816# # Will use proxy authentication in forward-proxy scenarios, and plain
817# # http authenticaiton in reverse-proxy scenarios
818# #
819# # NOTE: when a Proxy-Authentication header is sent but it is not
820# # needed during ACL checking the username is NOT logged
821# # in access.log.
822# #
823# # NOTE: proxy_auth requires a EXTERNAL authentication program
824# # to check username/password combinations (see
825# # auth_param directive).
826# #
827# # NOTE: proxy_auth can't be used in a transparent/intercepting proxy
828# # as the browser needs to be configured for using a proxy in order
829# # to respond to proxy authentication.
830#
831# acl aclname snmp_community string ...
832# # A community string to limit access to your SNMP Agent [fast]
833# # Example:
834# #
835# # acl snmppublic snmp_community public
836#
837# acl aclname maxconn number
838# # This will be matched when the client's IP address has
839# # more than <number> TCP connections established. [fast]
840# # NOTE: This only measures direct TCP links so X-Forwarded-For
841# # indirect clients are not counted.
842#
843# acl aclname max_user_ip [-s] number
844# # This will be matched when the user attempts to log in from more
845# # than <number> different ip addresses. The authenticate_ip_ttl
846# # parameter controls the timeout on the ip entries. [fast]
847# # If -s is specified the limit is strict, denying browsing
848# # from any further IP addresses until the ttl has expired. Without
849# # -s Squid will just annoy the user by "randomly" denying requests.
850# # (the counter is reset each time the limit is reached and a
851# # request is denied)
852# # NOTE: in acceleration mode or where there is mesh of child proxies,
853# # clients may appear to come from multiple addresses if they are
854# # going through proxy farms, so a limit of 1 may cause user problems.
855#
856# acl aclname random probability
857# # Pseudo-randomly match requests. Based on the probability given.
858# # Probability may be written as a decimal (0.333), fraction (1/3)
859# # or ratio of matches:non-matches (3:5).
860#
861# acl aclname req_mime_type [-i] mime-type ...
862# # regex match against the mime type of the request generated
863# # by the client. Can be used to detect file upload or some
864# # types HTTP tunneling requests [fast]
865# # NOTE: This does NOT match the reply. You cannot use this
866# # to match the returned file type.
867#
868# acl aclname req_header header-name [-i] any\.regex\.here
869# # regex match against any of the known request headers. May be
870# # thought of as a superset of "browser", "referer" and "mime-type"
871# # ACL [fast]
872#
873# acl aclname rep_mime_type [-i] mime-type ...
874# # regex match against the mime type of the reply received by
875# # squid. Can be used to detect file download or some
876# # types HTTP tunneling requests. [fast]
877# # NOTE: This has no effect in http_access rules. It only has
878# # effect in rules that affect the reply data stream such as
879# # http_reply_access.
880#
881# acl aclname rep_header header-name [-i] any\.regex\.here
882# # regex match against any of the known reply headers. May be
883# # thought of as a superset of "browser", "referer" and "mime-type"
884# # ACLs [fast]
885#
886# acl aclname external class_name [arguments...]
887# # external ACL lookup via a helper class defined by the
888# # external_acl_type directive [slow]
889#
890# acl aclname user_cert attribute values...
891# # match against attributes in a user SSL certificate
892# # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast]
893#
894# acl aclname ca_cert attribute values...
895# # match against attributes a users issuing CA SSL certificate
896# # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast]
897#
898# acl aclname ext_user username ...
899# acl aclname ext_user_regex [-i] pattern ...
900# # string match on username returned by external acl helper [slow]
901# # use REQUIRED to accept any non-null user name.
902#
903# acl aclname tag tagvalue ...
904# # string match on tag returned by external acl helper [fast]
905# # DEPRECATED. Only the first tag will match with this ACL.
906# # Use the 'note' ACL instead for handling multiple tag values.
907#
908# acl aclname hier_code codename ...
909# # string match against squid hierarchy code(s); [fast]
910# # e.g., DIRECT, PARENT_HIT, NONE, etc.
911# #
912# # NOTE: This has no effect in http_access rules. It only has
913# # effect in rules that affect the reply data stream such as
914# # http_reply_access.
915#
916# acl aclname note name [value ...]
917# # match transaction annotation [fast]
918# # Without values, matches any annotation with a given name.
919# # With value(s), matches any annotation with a given name that
920# # also has one of the given values.
921# # Names and values are compared using a string equality test.
922# # Annotation sources include note and adaptation_meta directives
923# # as well as helper and eCAP responses.
924#
925# acl aclname adaptation_service service ...
926# # Matches the name of any icap_service, ecap_service,
927# # adaptation_service_set, or adaptation_service_chain that Squid
928# # has used (or attempted to use) for the master transaction.
929# # This ACL must be defined after the corresponding adaptation
930# # service is named in squid.conf. This ACL is usable with
931# # adaptation_meta because it starts matching immediately after
932# # the service has been selected for adaptation.
933#
934# acl aclname any-of acl1 acl2 ...
935# # match any one of the acls [fast or slow]
936# # The first matching ACL stops further ACL evaluation.
937# #
938# # ACLs from multiple any-of lines with the same name are ORed.
939# # For example, A = (a1 or a2) or (a3 or a4) can be written as
940# # acl A any-of a1 a2
941# # acl A any-of a3 a4
942# #
943# # This group ACL is fast if all evaluated ACLs in the group are fast
944# # and slow otherwise.
945#
946# acl aclname all-of acl1 acl2 ...
947# # match all of the acls [fast or slow]
948# # The first mismatching ACL stops further ACL evaluation.
949# #
950# # ACLs from multiple all-of lines with the same name are ORed.
951# # For example, B = (b1 and b2) or (b3 and b4) can be written as
952# # acl B all-of b1 b2
953# # acl B all-of b3 b4
954# #
955# # This group ACL is fast if all evaluated ACLs in the group are fast
956# # and slow otherwise.
957#
958# Examples:
959# acl macaddress arp 09:00:2b:23:45:67
960# acl myexample dst_as 1241
961# acl password proxy_auth REQUIRED
962# acl fileupload req_mime_type -i ^multipart/form-data$
963# acl javascript rep_mime_type -i ^application/x-javascript$
964#
965#Default:
966# ACLs all, manager, localhost, and to_localhost are predefined.
967#
968#
969# Recommended minimum configuration:
970#
971
972# Example rule allowing access from your local networks.
973# Adapt to list your (internal) IP networks from where browsing
974# should be allowed
975#acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
976#acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
977#acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
978#acl localnet src fc00::/7 # RFC 4193 local private network range
979#acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
980
981acl SSL_ports port 443
982acl Safe_ports port 80 # http
983acl Safe_ports port 21 # ftp
984acl Safe_ports port 443 # https
985acl Safe_ports port 70 # gopher
986acl Safe_ports port 210 # wais
987acl Safe_ports port 1025-65535 # unregistered ports
988acl Safe_ports port 280 # http-mgmt
989acl Safe_ports port 488 # gss-http
990acl Safe_ports port 591 # filemaker
991acl Safe_ports port 777 # multiling http
992acl CONNECT method CONNECT
993
994# TAG: proxy_protocol_access
995# Determine which client proxies can be trusted to provide correct
996# information regarding real client IP address using PROXY protocol.
997#
998# Requests may pass through a chain of several other proxies
999# before reaching us. The original source details may by sent in:
1000# * HTTP message Forwarded header, or
1001# * HTTP message X-Forwarded-For header, or
1002# * PROXY protocol connection header.
1003#
1004# This directive is solely for validating new PROXY protocol
1005# connections received from a port flagged with require-proxy-header.
1006# It is checked only once after TCP connection setup.
1007#
1008# A deny match results in TCP connection closure.
1009#
1010# An allow match is required for Squid to permit the corresponding
1011# TCP connection, before Squid even looks for HTTP request headers.
1012# If there is an allow match, Squid starts using PROXY header information
1013# to determine the source address of the connection for all future ACL
1014# checks, logging, etc.
1015#
1016# SECURITY CONSIDERATIONS:
1017#
1018# Any host from which we accept client IP details can place
1019# incorrect information in the relevant header, and Squid
1020# will use the incorrect information as if it were the
1021# source address of the request. This may enable remote
1022# hosts to bypass any access control restrictions that are
1023# based on the client's source addresses.
1024#
1025# This clause only supports fast acl types.
1026# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1027#Default:
1028# all TCP connections to ports with require-proxy-header will be denied
1029
1030# TAG: follow_x_forwarded_for
1031# Determine which client proxies can be trusted to provide correct
1032# information regarding real client IP address.
1033#
1034# Requests may pass through a chain of several other proxies
1035# before reaching us. The original source details may by sent in:
1036# * HTTP message Forwarded header, or
1037# * HTTP message X-Forwarded-For header, or
1038# * PROXY protocol connection header.
1039#
1040# PROXY protocol connections are controlled by the proxy_protocol_access
1041# directive which is checked before this.
1042#
1043# If a request reaches us from a source that is allowed by this
1044# directive, then we trust the information it provides regarding
1045# the IP of the client it received from (if any).
1046#
1047# For the purpose of ACLs used in this directive the src ACL type always
1048# matches the address we are testing and srcdomain matches its rDNS.
1049#
1050# On each HTTP request Squid checks for X-Forwarded-For header fields.
1051# If found the header values are iterated in reverse order and an allow
1052# match is required for Squid to continue on to the next value.
1053# The verification ends when a value receives a deny match, cannot be
1054# tested, or there are no more values to test.
1055# NOTE: Squid does not yet follow the Forwarded HTTP header.
1056#
1057# The end result of this process is an IP address that we will
1058# refer to as the indirect client address. This address may
1059# be treated as the client address for access control, ICAP, delay
1060# pools and logging, depending on the acl_uses_indirect_client,
1061# icap_uses_indirect_client, delay_pool_uses_indirect_client,
1062# log_uses_indirect_client and tproxy_uses_indirect_client options.
1063#
1064# This clause only supports fast acl types.
1065# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1066#
1067# SECURITY CONSIDERATIONS:
1068#
1069# Any host from which we accept client IP details can place
1070# incorrect information in the relevant header, and Squid
1071# will use the incorrect information as if it were the
1072# source address of the request. This may enable remote
1073# hosts to bypass any access control restrictions that are
1074# based on the client's source addresses.
1075#
1076# For example:
1077#
1078# acl localhost src 127.0.0.1
1079# acl my_other_proxy srcdomain .proxy.example.com
1080# follow_x_forwarded_for allow localhost
1081# follow_x_forwarded_for allow my_other_proxy
1082#Default:
1083# X-Forwarded-For header will be ignored.
1084
1085# TAG: acl_uses_indirect_client on|off
1086# Controls whether the indirect client address
1087# (see follow_x_forwarded_for) is used instead of the
1088# direct client address in acl matching.
1089#
1090# NOTE: maxconn ACL considers direct TCP links and indirect
1091# clients will always have zero. So no match.
1092#Default:
1093# acl_uses_indirect_client on
1094
1095# TAG: delay_pool_uses_indirect_client on|off
1096# Controls whether the indirect client address
1097# (see follow_x_forwarded_for) is used instead of the
1098# direct client address in delay pools.
1099#Default:
1100# delay_pool_uses_indirect_client on
1101
1102# TAG: log_uses_indirect_client on|off
1103# Controls whether the indirect client address
1104# (see follow_x_forwarded_for) is used instead of the
1105# direct client address in the access log.
1106#Default:
1107# log_uses_indirect_client on
1108
1109# TAG: tproxy_uses_indirect_client on|off
1110# Controls whether the indirect client address
1111# (see follow_x_forwarded_for) is used instead of the
1112# direct client address when spoofing the outgoing client.
1113#
1114# This has no effect on requests arriving in non-tproxy
1115# mode ports.
1116#
1117# SECURITY WARNING: Usage of this option is dangerous
1118# and should not be used trivially. Correct configuration
1119# of follow_x_forwarded_for with a limited set of trusted
1120# sources is required to prevent abuse of your proxy.
1121#Default:
1122# tproxy_uses_indirect_client off
1123
1124# TAG: spoof_client_ip
1125# Control client IP address spoofing of TPROXY traffic based on
1126# defined access lists.
1127#
1128# spoof_client_ip allow|deny [!]aclname ...
1129#
1130# If there are no "spoof_client_ip" lines present, the default
1131# is to "allow" spoofing of any suitable request.
1132#
1133# Note that the cache_peer "no-tproxy" option overrides this ACL.
1134#
1135# This clause supports fast acl types.
1136# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1137#Default:
1138# Allow spoofing on all TPROXY traffic.
1139
1140# TAG: http_access
1141# Allowing or Denying access based on defined access lists
1142#
1143# To allow or deny a message received on an HTTP, HTTPS, or FTP port:
1144# http_access allow|deny [!]aclname ...
1145#
1146# NOTE on default values:
1147#
1148# If there are no "access" lines present, the default is to deny
1149# the request.
1150#
1151# If none of the "access" lines cause a match, the default is the
1152# opposite of the last line in the list. If the last line was
1153# deny, the default is allow. Conversely, if the last line
1154# is allow, the default will be deny. For these reasons, it is a
1155# good idea to have an "deny all" entry at the end of your access
1156# lists to avoid potential confusion.
1157#
1158# This clause supports both fast and slow acl types.
1159# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1160#
1161#Default:
1162# Deny, unless rules exist in squid.conf.
1163#
1164
1165#
1166# Recommended minimum Access Permission configuration:
1167#
1168# Deny requests to certain unsafe ports
1169http_access deny !Safe_ports
1170
1171# Deny CONNECT to other than secure SSL ports
1172http_access deny CONNECT !SSL_ports
1173
1174# Only allow cachemgr access from localhost
1175http_access allow localhost manager
1176http_access deny manager
1177
1178# We strongly recommend the following be uncommented to protect innocent
1179# web applications running on the proxy server who think the only
1180# one who can access services on "localhost" is a local user
1181#http_access deny to_localhost
1182
1183#
1184# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
1185#
1186
1187# Example rule allowing access from your local networks.
1188# Adapt localnet in the ACL section to list your (internal) IP networks
1189# from where browsing should be allowed
1190#http_access allow localnet
1191http_access allow localhost
1192
1193# And finally deny all other access to this proxy
1194http_access deny all
1195
1196# TAG: adapted_http_access
1197# Allowing or Denying access based on defined access lists
1198#
1199# Essentially identical to http_access, but runs after redirectors
1200# and ICAP/eCAP adaptation. Allowing access control based on their
1201# output.
1202#
1203# If not set then only http_access is used.
1204#Default:
1205# Allow, unless rules exist in squid.conf.
1206
1207# TAG: http_reply_access
1208# Allow replies to client requests. This is complementary to http_access.
1209#
1210# http_reply_access allow|deny [!] aclname ...
1211#
1212# NOTE: if there are no access lines present, the default is to allow
1213# all replies.
1214#
1215# If none of the access lines cause a match the opposite of the
1216# last line will apply. Thus it is good practice to end the rules
1217# with an "allow all" or "deny all" entry.
1218#
1219# This clause supports both fast and slow acl types.
1220# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1221#Default:
1222# Allow, unless rules exist in squid.conf.
1223
1224# TAG: icp_access
1225# Allowing or Denying access to the ICP port based on defined
1226# access lists
1227#
1228# icp_access allow|deny [!]aclname ...
1229#
1230# NOTE: The default if no icp_access lines are present is to
1231# deny all traffic. This default may cause problems with peers
1232# using ICP.
1233#
1234# This clause only supports fast acl types.
1235# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1236#
1237## Allow ICP queries from local networks only
1238##icp_access allow localnet
1239##icp_access deny all
1240#Default:
1241# Deny, unless rules exist in squid.conf.
1242
1243# TAG: htcp_access
1244# Allowing or Denying access to the HTCP port based on defined
1245# access lists
1246#
1247# htcp_access allow|deny [!]aclname ...
1248#
1249# See also htcp_clr_access for details on access control for
1250# cache purge (CLR) HTCP messages.
1251#
1252# NOTE: The default if no htcp_access lines are present is to
1253# deny all traffic. This default may cause problems with peers
1254# using the htcp option.
1255#
1256# This clause only supports fast acl types.
1257# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1258#
1259## Allow HTCP queries from local networks only
1260##htcp_access allow localnet
1261##htcp_access deny all
1262#Default:
1263# Deny, unless rules exist in squid.conf.
1264
1265# TAG: htcp_clr_access
1266# Allowing or Denying access to purge content using HTCP based
1267# on defined access lists.
1268# See htcp_access for details on general HTCP access control.
1269#
1270# htcp_clr_access allow|deny [!]aclname ...
1271#
1272# This clause only supports fast acl types.
1273# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1274#
1275## Allow HTCP CLR requests from trusted peers
1276#acl htcp_clr_peer src 192.0.2.2 2001:DB8::2
1277#htcp_clr_access allow htcp_clr_peer
1278#htcp_clr_access deny all
1279#Default:
1280# Deny, unless rules exist in squid.conf.
1281
1282# TAG: miss_access
1283# Determines whether network access is permitted when satisfying a request.
1284#
1285# For example;
1286# to force your neighbors to use you as a sibling instead of
1287# a parent.
1288#
1289# acl localclients src 192.0.2.0/24 2001:DB8::a:0/64
1290# miss_access deny !localclients
1291# miss_access allow all
1292#
1293# This means only your local clients are allowed to fetch relayed/MISS
1294# replies from the network and all other clients can only fetch cached
1295# objects (HITs).
1296#
1297# The default for this setting allows all clients who passed the
1298# http_access rules to relay via this proxy.
1299#
1300# This clause only supports fast acl types.
1301# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1302#Default:
1303# Allow, unless rules exist in squid.conf.
1304
1305# TAG: ident_lookup_access
1306# A list of ACL elements which, if matched, cause an ident
1307# (RFC 931) lookup to be performed for this request. For
1308# example, you might choose to always perform ident lookups
1309# for your main multi-user Unix boxes, but not for your Macs
1310# and PCs. By default, ident lookups are not performed for
1311# any requests.
1312#
1313# To enable ident lookups for specific client addresses, you
1314# can follow this example:
1315#
1316# acl ident_aware_hosts src 198.168.1.0/24
1317# ident_lookup_access allow ident_aware_hosts
1318# ident_lookup_access deny all
1319#
1320# Only src type ACL checks are fully supported. A srcdomain
1321# ACL might work at times, but it will not always provide
1322# the correct result.
1323#
1324# This clause only supports fast acl types.
1325# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1326#Default:
1327# Unless rules exist in squid.conf, IDENT is not fetched.
1328
1329# TAG: reply_body_max_size size [acl acl...]
1330# This option specifies the maximum size of a reply body. It can be
1331# used to prevent users from downloading very large files, such as
1332# MP3's and movies. When the reply headers are received, the
1333# reply_body_max_size lines are processed, and the first line where
1334# all (if any) listed ACLs are true is used as the maximum body size
1335# for this reply.
1336#
1337# This size is checked twice. First when we get the reply headers,
1338# we check the content-length value. If the content length value exists
1339# and is larger than the allowed size, the request is denied and the
1340# user receives an error message that says "the request or reply
1341# is too large." If there is no content-length, and the reply
1342# size exceeds this limit, the client's connection is just closed
1343# and they will receive a partial reply.
1344#
1345# WARNING: downstream caches probably can not detect a partial reply
1346# if there is no content-length header, so they will cache
1347# partial responses and give them out as hits. You should NOT
1348# use this option if you have downstream caches.
1349#
1350# WARNING: A maximum size smaller than the size of squid's error messages
1351# will cause an infinite loop and crash squid. Ensure that the smallest
1352# non-zero value you use is greater that the maximum header size plus
1353# the size of your largest error page.
1354#
1355# If you set this parameter none (the default), there will be
1356# no limit imposed.
1357#
1358# Configuration Format is:
1359# reply_body_max_size SIZE UNITS [acl ...]
1360# ie.
1361# reply_body_max_size 10 MB
1362#
1363#Default:
1364# No limit is applied.
1365
1366# NETWORK OPTIONS
1367# -----------------------------------------------------------------------------
1368
1369# TAG: http_port
1370# Usage: port [mode] [options]
1371# hostname:port [mode] [options]
1372# 1.2.3.4:port [mode] [options]
1373#
1374# The socket addresses where Squid will listen for HTTP client
1375# requests. You may specify multiple socket addresses.
1376# There are three forms: port alone, hostname with port, and
1377# IP address with port. If you specify a hostname or IP
1378# address, Squid binds the socket to that specific
1379# address. Most likely, you do not need to bind to a specific
1380# address, so you can use the port number alone.
1381#
1382# If you are running Squid in accelerator mode, you
1383# probably want to listen on port 80 also, or instead.
1384#
1385# The -a command line option may be used to specify additional
1386# port(s) where Squid listens for proxy request. Such ports will
1387# be plain proxy ports with no options.
1388#
1389# You may specify multiple socket addresses on multiple lines.
1390#
1391# Modes:
1392#
1393# intercept Support for IP-Layer NAT interception delivering
1394# traffic to this Squid port.
1395# NP: disables authentication on the port.
1396#
1397# tproxy Support Linux TPROXY (or BSD divert-to) with spoofing
1398# of outgoing connections using the client IP address.
1399# NP: disables authentication on the port.
1400#
1401# accel Accelerator / reverse proxy mode
1402#
1403# ssl-bump For each CONNECT request allowed by ssl_bump ACLs,
1404# establish secure connection with the client and with
1405# the server, decrypt HTTPS messages as they pass through
1406# Squid, and treat them as unencrypted HTTP messages,
1407# becoming the man-in-the-middle.
1408#
1409# The ssl_bump option is required to fully enable
1410# bumping of CONNECT requests.
1411#
1412# Omitting the mode flag causes default forward proxy mode to be used.
1413#
1414#
1415# Accelerator Mode Options:
1416#
1417# defaultsite=domainname
1418# What to use for the Host: header if it is not present
1419# in a request. Determines what site (not origin server)
1420# accelerators should consider the default.
1421#
1422# no-vhost Disable using HTTP/1.1 Host header for virtual domain support.
1423#
1424# protocol= Protocol to reconstruct accelerated and intercepted
1425# requests with. Defaults to HTTP/1.1 for http_port and
1426# HTTPS/1.1 for https_port.
1427# When an unsupported value is configured Squid will
1428# produce a FATAL error.
1429# Values: HTTP or HTTP/1.1, HTTPS or HTTPS/1.1
1430#
1431# vport Virtual host port support. Using the http_port number
1432# instead of the port passed on Host: headers.
1433#
1434# vport=NN Virtual host port support. Using the specified port
1435# number instead of the port passed on Host: headers.
1436#
1437# act-as-origin
1438# Act as if this Squid is the origin server.
1439# This currently means generate new Date: and Expires:
1440# headers on HIT instead of adding Age:.
1441#
1442# ignore-cc Ignore request Cache-Control headers.
1443#
1444# WARNING: This option violates HTTP specifications if
1445# used in non-accelerator setups.
1446#
1447# allow-direct Allow direct forwarding in accelerator mode. Normally
1448# accelerated requests are denied direct forwarding as if
1449# never_direct was used.
1450#
1451# WARNING: this option opens accelerator mode to security
1452# vulnerabilities usually only affecting in interception
1453# mode. Make sure to protect forwarding with suitable
1454# http_access rules when using this.
1455#
1456#
1457# SSL Bump Mode Options:
1458# In addition to these options ssl-bump requires TLS/SSL options.
1459#
1460# generate-host-certificates[=<on|off>]
1461# Dynamically create SSL server certificates for the
1462# destination hosts of bumped CONNECT requests.When
1463# enabled, the cert and key options are used to sign
1464# generated certificates. Otherwise generated
1465# certificate will be selfsigned.
1466# If there is a CA certificate lifetime of the generated
1467# certificate equals lifetime of the CA certificate. If
1468# generated certificate is selfsigned lifetime is three
1469# years.
1470# This option is enabled by default when ssl-bump is used.
1471# See the ssl-bump option above for more information.
1472#
1473# dynamic_cert_mem_cache_size=SIZE
1474# Approximate total RAM size spent on cached generated
1475# certificates. If set to zero, caching is disabled. The
1476# default value is 4MB.
1477#
1478# TLS / SSL Options:
1479#
1480# cert= Path to SSL certificate (PEM format).
1481#
1482# key= Path to SSL private key file (PEM format)
1483# if not specified, the certificate file is
1484# assumed to be a combined certificate and
1485# key file.
1486#
1487# version= The version of SSL/TLS supported
1488# 1 automatic (default)
1489# 2 SSLv2 only
1490# 3 SSLv3 only
1491# 4 TLSv1.0 only
1492# 5 TLSv1.1 only
1493# 6 TLSv1.2 only
1494#
1495# cipher= Colon separated list of supported ciphers.
1496# NOTE: some ciphers such as EDH ciphers depend on
1497# additional settings. If those settings are
1498# omitted the ciphers may be silently ignored
1499# by the OpenSSL library.
1500#
1501# options= Various SSL implementation options. The most important
1502# being:
1503# NO_SSLv2 Disallow the use of SSLv2
1504# NO_SSLv3 Disallow the use of SSLv3
1505# NO_TLSv1 Disallow the use of TLSv1.0
1506# NO_TLSv1_1 Disallow the use of TLSv1.1
1507# NO_TLSv1_2 Disallow the use of TLSv1.2
1508# SINGLE_DH_USE Always create a new key when using
1509# temporary/ephemeral DH key exchanges
1510# NO_TICKET Disables TLS tickets extension
1511#
1512# SINGLE_ECDH_USE
1513# Enable ephemeral ECDH key exchange.
1514# The adopted curve should be specified
1515# using the tls-dh option.
1516#
1517# ALL Enable various bug workarounds
1518# suggested as "harmless" by OpenSSL
1519# Be warned that this reduces SSL/TLS
1520# strength to some attacks.
1521# See OpenSSL SSL_CTX_set_options documentation for a
1522# complete list of options.
1523#
1524# clientca= File containing the list of CAs to use when
1525# requesting a client certificate.
1526#
1527# cafile= File containing additional CA certificates to
1528# use when verifying client certificates. If unset
1529# clientca will be used.
1530#
1531# capath= Directory containing additional CA certificates
1532# and CRL lists to use when verifying client certificates.
1533#
1534# crlfile= File of additional CRL lists to use when verifying
1535# the client certificate, in addition to CRLs stored in
1536# the capath. Implies VERIFY_CRL flag below.
1537#
1538# tls-dh=[curve:]file
1539# File containing DH parameters for temporary/ephemeral DH key
1540# exchanges, optionally prefixed by a curve for ephemeral ECDH
1541# key exchanges.
1542# See OpenSSL documentation for details on how to create the
1543# DH parameter file. Supported curves for ECDH can be listed
1544# using the "openssl ecparam -list_curves" command.
1545# WARNING: EDH and EECDH ciphers will be silently disabled if
1546# this option is not set.
1547#
1548# sslflags= Various flags modifying the use of SSL:
1549# DELAYED_AUTH
1550# Don't request client certificates
1551# immediately, but wait until acl processing
1552# requires a certificate (not yet implemented).
1553# NO_DEFAULT_CA
1554# Don't use the default CA lists built in
1555# to OpenSSL.
1556# NO_SESSION_REUSE
1557# Don't allow for session reuse. Each connection
1558# will result in a new SSL session.
1559# VERIFY_CRL
1560# Verify CRL lists when accepting client
1561# certificates.
1562# VERIFY_CRL_ALL
1563# Verify CRL lists for all certificates in the
1564# client certificate chain.
1565#
1566# sslcontext= SSL session ID context identifier.
1567#
1568# Other Options:
1569#
1570# connection-auth[=on|off]
1571# use connection-auth=off to tell Squid to prevent
1572# forwarding Microsoft connection oriented authentication
1573# (NTLM, Negotiate and Kerberos)
1574#
1575# disable-pmtu-discovery=
1576# Control Path-MTU discovery usage:
1577# off lets OS decide on what to do (default).
1578# transparent disable PMTU discovery when transparent
1579# support is enabled.
1580# always disable always PMTU discovery.
1581#
1582# In many setups of transparently intercepting proxies
1583# Path-MTU discovery can not work on traffic towards the
1584# clients. This is the case when the intercepting device
1585# does not fully track connections and fails to forward
1586# ICMP must fragment messages to the cache server. If you
1587# have such setup and experience that certain clients
1588# sporadically hang or never complete requests set
1589# disable-pmtu-discovery option to 'transparent'.
1590#
1591# name= Specifies a internal name for the port. Defaults to
1592# the port specification (port or addr:port)
1593#
1594# tcpkeepalive[=idle,interval,timeout]
1595# Enable TCP keepalive probes of idle connections.
1596# In seconds; idle is the initial time before TCP starts
1597# probing the connection, interval how often to probe, and
1598# timeout the time before giving up.
1599#
1600# require-proxy-header
1601# Require PROXY protocol version 1 or 2 connections.
1602# The proxy_protocol_access is required to whitelist
1603# downstream proxies which can be trusted.
1604#
1605# If you run Squid on a dual-homed machine with an internal
1606# and an external interface we recommend you to specify the
1607# internal address:port in http_port. This way Squid will only be
1608# visible on the internal address.
1609#
1610#
1611
1612# Squid normally listens to port 3128
1613http_port 3128
1614
1615# TAG: https_port
1616# Note: This option is only available if Squid is rebuilt with the
1617# --with-openssl
1618#
1619# Usage: [ip:]port cert=certificate.pem [key=key.pem] [mode] [options...]
1620#
1621# The socket address where Squid will listen for client requests made
1622# over TLS or SSL connections. Commonly referred to as HTTPS.
1623#
1624# This is most useful for situations where you are running squid in
1625# accelerator mode and you want to do the SSL work at the accelerator level.
1626#
1627# You may specify multiple socket addresses on multiple lines,
1628# each with their own SSL certificate and/or options.
1629#
1630# Modes:
1631#
1632# accel Accelerator / reverse proxy mode
1633#
1634# intercept Support for IP-Layer interception of
1635# outgoing requests without browser settings.
1636# NP: disables authentication and IPv6 on the port.
1637#
1638# tproxy Support Linux TPROXY for spoofing outgoing
1639# connections using the client IP address.
1640# NP: disables authentication and maybe IPv6 on the port.
1641#
1642# ssl-bump For each intercepted connection allowed by ssl_bump
1643# ACLs, establish a secure connection with the client and with
1644# the server, decrypt HTTPS messages as they pass through
1645# Squid, and treat them as unencrypted HTTP messages,
1646# becoming the man-in-the-middle.
1647#
1648# An "ssl_bump server-first" match is required to
1649# fully enable bumping of intercepted SSL connections.
1650#
1651# Requires tproxy or intercept.
1652#
1653# Omitting the mode flag causes default forward proxy mode to be used.
1654#
1655#
1656# See http_port for a list of generic options
1657#
1658#
1659# SSL Options:
1660#
1661# cert= Path to SSL certificate (PEM format).
1662#
1663# key= Path to SSL private key file (PEM format)
1664# if not specified, the certificate file is
1665# assumed to be a combined certificate and
1666# key file.
1667#
1668# version= The version of SSL/TLS supported
1669# 1 automatic (default)
1670# 2 SSLv2 only
1671# 3 SSLv3 only
1672# 4 TLSv1 only
1673#
1674# cipher= Colon separated list of supported ciphers.
1675#
1676# options= Various SSL engine options. The most important
1677# being:
1678# NO_SSLv2 Disallow the use of SSLv2
1679# NO_SSLv3 Disallow the use of SSLv3
1680# NO_TLSv1 Disallow the use of TLSv1
1681#
1682# SINGLE_DH_USE Always create a new key when using
1683# temporary/ephemeral DH key exchanges
1684#
1685# SINGLE_ECDH_USE
1686# Enable ephemeral ECDH key exchange.
1687# The adopted curve should be specified
1688# using the tls-dh option.
1689#
1690# See src/ssl_support.c or OpenSSL SSL_CTX_set_options
1691# documentation for a complete list of options.
1692#
1693# clientca= File containing the list of CAs to use when
1694# requesting a client certificate.
1695#
1696# cafile= File containing additional CA certificates to
1697# use when verifying client certificates. If unset
1698# clientca will be used.
1699#
1700# capath= Directory containing additional CA certificates
1701# and CRL lists to use when verifying client certificates.
1702#
1703# crlfile= File of additional CRL lists to use when verifying
1704# the client certificate, in addition to CRLs stored in
1705# the capath. Implies VERIFY_CRL flag below.
1706#
1707# tls-dh=[curve:]file
1708# File containing DH parameters for temporary/ephemeral DH key
1709# exchanges, optionally prefixed by a curve for ephemeral ECDH
1710# key exchanges.
1711#
1712# sslflags= Various flags modifying the use of SSL:
1713# DELAYED_AUTH
1714# Don't request client certificates
1715# immediately, but wait until acl processing
1716# requires a certificate (not yet implemented).
1717# NO_DEFAULT_CA
1718# Don't use the default CA lists built in
1719# to OpenSSL.
1720# NO_SESSION_REUSE
1721# Don't allow for session reuse. Each connection
1722# will result in a new SSL session.
1723# VERIFY_CRL
1724# Verify CRL lists when accepting client
1725# certificates.
1726# VERIFY_CRL_ALL
1727# Verify CRL lists for all certificates in the
1728# client certificate chain.
1729#
1730# sslcontext= SSL session ID context identifier.
1731#
1732# generate-host-certificates[=<on|off>]
1733# Dynamically create SSL server certificates for the
1734# destination hosts of bumped SSL requests.When
1735# enabled, the cert and key options are used to sign
1736# generated certificates. Otherwise generated
1737# certificate will be selfsigned.
1738# If there is CA certificate life time of generated
1739# certificate equals lifetime of CA certificate. If
1740# generated certificate is selfsigned lifetime is three
1741# years.
1742# This option is enabled by default when SslBump is used.
1743# See the sslBump option above for more information.
1744#
1745# dynamic_cert_mem_cache_size=SIZE
1746# Approximate total RAM size spent on cached generated
1747# certificates. If set to zero, caching is disabled. The
1748# default value is 4MB.
1749#
1750# See http_port for a list of available options.
1751#Default:
1752# none
1753
1754# TAG: ftp_port
1755# Enables Native FTP proxy by specifying the socket address where Squid
1756# listens for FTP client requests. See http_port directive for various
1757# ways to specify the listening address and mode.
1758#
1759# Usage: ftp_port address [mode] [options]
1760#
1761# WARNING: This is a new, experimental, complex feature that has seen
1762# limited production exposure. Some Squid modules (e.g., caching) do not
1763# currently work with native FTP proxying, and many features have not
1764# even been tested for compatibility. Test well before deploying!
1765#
1766# Native FTP proxying differs substantially from proxying HTTP requests
1767# with ftp:// URIs because Squid works as an FTP server and receives
1768# actual FTP commands (rather than HTTP requests with FTP URLs).
1769#
1770# Native FTP commands accepted at ftp_port are internally converted or
1771# wrapped into HTTP-like messages. The same happens to Native FTP
1772# responses received from FTP origin servers. Those HTTP-like messages
1773# are shoveled through regular access control and adaptation layers
1774# between the FTP client and the FTP origin server. This allows Squid to
1775# examine, adapt, block, and log FTP exchanges. Squid reuses most HTTP
1776# mechanisms when shoveling wrapped FTP messages. For example,
1777# http_access and adaptation_access directives are used.
1778#
1779# Modes:
1780#
1781# intercept Same as http_port intercept. The FTP origin address is
1782# determined based on the intended destination of the
1783# intercepted connection.
1784#
1785# tproxy Support Linux TPROXY for spoofing outgoing
1786# connections using the client IP address.
1787# NP: disables authentication and maybe IPv6 on the port.
1788#
1789# By default (i.e., without an explicit mode option), Squid extracts the
1790# FTP origin address from the login@origin parameter of the FTP USER
1791# command. Many popular FTP clients support such native FTP proxying.
1792#
1793# Options:
1794#
1795# name=token Specifies an internal name for the port. Defaults to
1796# the port address. Usable with myportname ACL.
1797#
1798# ftp-track-dirs
1799# Enables tracking of FTP directories by injecting extra
1800# PWD commands and adjusting Request-URI (in wrapping
1801# HTTP requests) to reflect the current FTP server
1802# directory. Tracking is disabled by default.
1803#
1804# protocol=FTP Protocol to reconstruct accelerated and intercepted
1805# requests with. Defaults to FTP. No other accepted
1806# values have been tested with. An unsupported value
1807# results in a FATAL error. Accepted values are FTP,
1808# HTTP (or HTTP/1.1), and HTTPS (or HTTPS/1.1).
1809#
1810# Other http_port modes and options that are not specific to HTTP and
1811# HTTPS may also work.
1812#Default:
1813# none
1814
1815# TAG: tcp_outgoing_tos
1816# Allows you to select a TOS/Diffserv value for packets outgoing
1817# on the server side, based on an ACL.
1818#
1819# tcp_outgoing_tos ds-field [!]aclname ...
1820#
1821# Example where normal_service_net uses the TOS value 0x00
1822# and good_service_net uses 0x20
1823#
1824# acl normal_service_net src 10.0.0.0/24
1825# acl good_service_net src 10.0.1.0/24
1826# tcp_outgoing_tos 0x00 normal_service_net
1827# tcp_outgoing_tos 0x20 good_service_net
1828#
1829# TOS/DSCP values really only have local significance - so you should
1830# know what you're specifying. For more information, see RFC2474,
1831# RFC2475, and RFC3260.
1832#
1833# The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
1834# "default" to use whatever default your host has.
1835# Note that only multiples of 4 are usable as the two rightmost bits have
1836# been redefined for use by ECN (RFC 3168 section 23.1).
1837# The squid parser will enforce this by masking away the ECN bits.
1838#
1839# Processing proceeds in the order specified, and stops at first fully
1840# matching line.
1841#
1842# Only fast ACLs are supported.
1843#Default:
1844# none
1845
1846# TAG: clientside_tos
1847# Allows you to select a TOS/DSCP value for packets being transmitted
1848# on the client-side, based on an ACL.
1849#
1850# clientside_tos ds-field [!]aclname ...
1851#
1852# Example where normal_service_net uses the TOS value 0x00
1853# and good_service_net uses 0x20
1854#
1855# acl normal_service_net src 10.0.0.0/24
1856# acl good_service_net src 10.0.1.0/24
1857# clientside_tos 0x00 normal_service_net
1858# clientside_tos 0x20 good_service_net
1859#
1860# Note: This feature is incompatible with qos_flows. Any TOS values set here
1861# will be overwritten by TOS values in qos_flows.
1862#
1863# The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
1864# "default" to use whatever default your host has.
1865# Note that only multiples of 4 are usable as the two rightmost bits have
1866# been redefined for use by ECN (RFC 3168 section 23.1).
1867# The squid parser will enforce this by masking away the ECN bits.
1868#
1869#Default:
1870# none
1871
1872# TAG: tcp_outgoing_mark
1873# Note: This option is only available if Squid is rebuilt with the
1874# Packet MARK (Linux)
1875#
1876# Allows you to apply a Netfilter mark value to outgoing packets
1877# on the server side, based on an ACL.
1878#
1879# tcp_outgoing_mark mark-value [!]aclname ...
1880#
1881# Example where normal_service_net uses the mark value 0x00
1882# and good_service_net uses 0x20
1883#
1884# acl normal_service_net src 10.0.0.0/24
1885# acl good_service_net src 10.0.1.0/24
1886# tcp_outgoing_mark 0x00 normal_service_net
1887# tcp_outgoing_mark 0x20 good_service_net
1888#
1889# Only fast ACLs are supported.
1890#Default:
1891# none
1892
1893# TAG: clientside_mark
1894# Note: This option is only available if Squid is rebuilt with the
1895# Packet MARK (Linux)
1896#
1897# Allows you to apply a Netfilter mark value to packets being transmitted
1898# on the client-side, based on an ACL.
1899#
1900# clientside_mark mark-value [!]aclname ...
1901#
1902# Example where normal_service_net uses the mark value 0x00
1903# and good_service_net uses 0x20
1904#
1905# acl normal_service_net src 10.0.0.0/24
1906# acl good_service_net src 10.0.1.0/24
1907# clientside_mark 0x00 normal_service_net
1908# clientside_mark 0x20 good_service_net
1909#
1910# Note: This feature is incompatible with qos_flows. Any mark values set here
1911# will be overwritten by mark values in qos_flows.
1912#Default:
1913# none
1914
1915# TAG: qos_flows
1916# Allows you to select a TOS/DSCP value to mark outgoing
1917# connections to the client, based on where the reply was sourced.
1918# For platforms using netfilter, allows you to set a netfilter mark
1919# value instead of, or in addition to, a TOS value.
1920#
1921# By default this functionality is disabled. To enable it with the default
1922# settings simply use "qos_flows mark" or "qos_flows tos". Default
1923# settings will result in the netfilter mark or TOS value being copied
1924# from the upstream connection to the client. Note that it is the connection
1925# CONNMARK value not the packet MARK value that is copied.
1926#
1927# It is not currently possible to copy the mark or TOS value from the
1928# client to the upstream connection request.
1929#
1930# TOS values really only have local significance - so you should
1931# know what you're specifying. For more information, see RFC2474,
1932# RFC2475, and RFC3260.
1933#
1934# The TOS/DSCP byte must be exactly that - a octet value 0 - 255.
1935# Note that only multiples of 4 are usable as the two rightmost bits have
1936# been redefined for use by ECN (RFC 3168 section 23.1).
1937# The squid parser will enforce this by masking away the ECN bits.
1938#
1939# Mark values can be any unsigned 32-bit integer value.
1940#
1941# This setting is configured by setting the following values:
1942#
1943# tos|mark Whether to set TOS or netfilter mark values
1944#
1945# local-hit=0xFF Value to mark local cache hits.
1946#
1947# sibling-hit=0xFF Value to mark hits from sibling peers.
1948#
1949# parent-hit=0xFF Value to mark hits from parent peers.
1950#
1951# miss=0xFF[/mask] Value to mark cache misses. Takes precedence
1952# over the preserve-miss feature (see below), unless
1953# mask is specified, in which case only the bits
1954# specified in the mask are written.
1955#
1956# The TOS variant of the following features are only possible on Linux
1957# and require your kernel to be patched with the TOS preserving ZPH
1958# patch, available from http://zph.bratcheda.org
1959# No patch is needed to preserve the netfilter mark, which will work
1960# with all variants of netfilter.
1961#
1962# disable-preserve-miss
1963# This option disables the preservation of the TOS or netfilter
1964# mark. By default, the existing TOS or netfilter mark value of
1965# the response coming from the remote server will be retained
1966# and masked with miss-mark.
1967# NOTE: in the case of a netfilter mark, the mark must be set on
1968# the connection (using the CONNMARK target) not on the packet
1969# (MARK target).
1970#
1971# miss-mask=0xFF
1972# Allows you to mask certain bits in the TOS or mark value
1973# received from the remote server, before copying the value to
1974# the TOS sent towards clients.
1975# Default for tos: 0xFF (TOS from server is not changed).
1976# Default for mark: 0xFFFFFFFF (mark from server is not changed).
1977#
1978# All of these features require the --enable-zph-qos compilation flag
1979# (enabled by default). Netfilter marking also requires the
1980# libnetfilter_conntrack libraries (--with-netfilter-conntrack) and
1981# libcap 2.09+ (--with-libcap).
1982#
1983#Default:
1984# none
1985
1986# TAG: tcp_outgoing_address
1987# Allows you to map requests to different outgoing IP addresses
1988# based on the username or source address of the user making
1989# the request.
1990#
1991# tcp_outgoing_address ipaddr [[!]aclname] ...
1992#
1993# For example;
1994# Forwarding clients with dedicated IPs for certain subnets.
1995#
1996# acl normal_service_net src 10.0.0.0/24
1997# acl good_service_net src 10.0.2.0/24
1998#
1999# tcp_outgoing_address 2001:db8::c001 good_service_net
2000# tcp_outgoing_address 10.1.0.2 good_service_net
2001#
2002# tcp_outgoing_address 2001:db8::beef normal_service_net
2003# tcp_outgoing_address 10.1.0.1 normal_service_net
2004#
2005# tcp_outgoing_address 2001:db8::1
2006# tcp_outgoing_address 10.1.0.3
2007#
2008# Processing proceeds in the order specified, and stops at first fully
2009# matching line.
2010#
2011# Squid will add an implicit IP version test to each line.
2012# Requests going to IPv4 websites will use the outgoing 10.1.0.* addresses.
2013# Requests going to IPv6 websites will use the outgoing 2001:db8:* addresses.
2014#
2015#
2016# NOTE: The use of this directive using client dependent ACLs is
2017# incompatible with the use of server side persistent connections. To
2018# ensure correct results it is best to set server_persistent_connections
2019# to off when using this directive in such configurations.
2020#
2021# NOTE: The use of this directive to set a local IP on outgoing TCP links
2022# is incompatible with using TPROXY to set client IP out outbound TCP links.
2023# When needing to contact peers use the no-tproxy cache_peer option and the
2024# client_dst_passthru directive re-enable normal forwarding such as this.
2025#
2026#Default:
2027# Address selection is performed by the operating system.
2028
2029# TAG: host_verify_strict
2030# Regardless of this option setting, when dealing with intercepted
2031# traffic, Squid always verifies that the destination IP address matches
2032# the Host header domain or IP (called 'authority form URL').
2033#
2034# This enforcement is performed to satisfy a MUST-level requirement in
2035# RFC 2616 section 14.23: "The Host field value MUST represent the naming
2036# authority of the origin server or gateway given by the original URL".
2037#
2038# When set to ON:
2039# Squid always responds with an HTTP 409 (Conflict) error
2040# page and logs a security warning if there is no match.
2041#
2042# Squid verifies that the destination IP address matches
2043# the Host header for forward-proxy and reverse-proxy traffic
2044# as well. For those traffic types, Squid also enables the
2045# following checks, comparing the corresponding Host header
2046# and Request-URI components:
2047#
2048# * The host names (domain or IP) must be identical,
2049# but valueless or missing Host header disables all checks.
2050# For the two host names to match, both must be either IP
2051# or FQDN.
2052#
2053# * Port numbers must be identical, but if a port is missing
2054# the scheme-default port is assumed.
2055#
2056#
2057# When set to OFF (the default):
2058# Squid allows suspicious requests to continue but logs a
2059# security warning and blocks caching of the response.
2060#
2061# * Forward-proxy traffic is not checked at all.
2062#
2063# * Reverse-proxy traffic is not checked at all.
2064#
2065# * Intercepted traffic which passes verification is handled
2066# according to client_dst_passthru.
2067#
2068# * Intercepted requests which fail verification are sent
2069# to the client original destination instead of DIRECT.
2070# This overrides 'client_dst_passthru off'.
2071#
2072# For now suspicious intercepted CONNECT requests are always
2073# responded to with an HTTP 409 (Conflict) error page.
2074#
2075#
2076# SECURITY NOTE:
2077#
2078# As described in CVE-2009-0801 when the Host: header alone is used
2079# to determine the destination of a request it becomes trivial for
2080# malicious scripts on remote websites to bypass browser same-origin
2081# security policy and sandboxing protections.
2082#
2083# The cause of this is that such applets are allowed to perform their
2084# own HTTP stack, in which case the same-origin policy of the browser
2085# sandbox only verifies that the applet tries to contact the same IP
2086# as from where it was loaded at the IP level. The Host: header may
2087# be different from the connected IP and approved origin.
2088#
2089#Default:
2090# host_verify_strict off
2091
2092# TAG: client_dst_passthru
2093# With NAT or TPROXY intercepted traffic Squid may pass the request
2094# directly to the original client destination IP or seek a faster
2095# source using the HTTP Host header.
2096#
2097# Using Host to locate alternative servers can provide faster
2098# connectivity with a range of failure recovery options.
2099# But can also lead to connectivity trouble when the client and
2100# server are attempting stateful interactions unaware of the proxy.
2101#
2102# This option (on by default) prevents alternative DNS entries being
2103# located to send intercepted traffic DIRECT to an origin server.
2104# The clients original destination IP and port will be used instead.
2105#
2106# Regardless of this option setting, when dealing with intercepted
2107# traffic Squid will verify the Host: header and any traffic which
2108# fails Host verification will be treated as if this option were ON.
2109#
2110# see host_verify_strict for details on the verification process.
2111#Default:
2112# client_dst_passthru on
2113
2114# SSL OPTIONS
2115# -----------------------------------------------------------------------------
2116
2117# TAG: ssl_unclean_shutdown
2118# Note: This option is only available if Squid is rebuilt with the
2119# --with-openssl
2120#
2121# Some browsers (especially MSIE) bugs out on SSL shutdown
2122# messages.
2123#Default:
2124# ssl_unclean_shutdown off
2125
2126# TAG: ssl_engine
2127# Note: This option is only available if Squid is rebuilt with the
2128# --with-openssl
2129#
2130# The OpenSSL engine to use. You will need to set this if you
2131# would like to use hardware SSL acceleration for example.
2132#Default:
2133# none
2134
2135# TAG: sslproxy_client_certificate
2136# Note: This option is only available if Squid is rebuilt with the
2137# --with-openssl
2138#
2139# Client SSL Certificate to use when proxying https:// URLs
2140#Default:
2141# none
2142
2143# TAG: sslproxy_client_key
2144# Note: This option is only available if Squid is rebuilt with the
2145# --with-openssl
2146#
2147# Client SSL Key to use when proxying https:// URLs
2148#Default:
2149# none
2150
2151# TAG: sslproxy_version
2152# Note: This option is only available if Squid is rebuilt with the
2153# --with-openssl
2154#
2155# SSL version level to use when proxying https:// URLs
2156#
2157# The versions of SSL/TLS supported:
2158#
2159# 1 automatic (default)
2160# 2 SSLv2 only
2161# 3 SSLv3 only
2162# 4 TLSv1.0 only
2163# 5 TLSv1.1 only
2164# 6 TLSv1.2 only
2165#Default:
2166# automatic SSL/TLS version negotiation
2167
2168# TAG: sslproxy_options
2169# Note: This option is only available if Squid is rebuilt with the
2170# --with-openssl
2171#
2172# Colon (:) or comma (,) separated list of SSL implementation options
2173# to use when proxying https:// URLs
2174#
2175# The most important being:
2176#
2177# NO_SSLv2 Disallow the use of SSLv2
2178# NO_SSLv3 Disallow the use of SSLv3
2179# NO_TLSv1 Disallow the use of TLSv1.0
2180# NO_TLSv1_1 Disallow the use of TLSv1.1
2181# NO_TLSv1_2 Disallow the use of TLSv1.2
2182#
2183# SINGLE_DH_USE
2184# Always create a new key when using temporary/ephemeral
2185# DH key exchanges
2186#
2187# NO_TICKET
2188# Disable use of RFC5077 session tickets. Some servers
2189# may have problems understanding the TLS extension due
2190# to ambiguous specification in RFC4507.
2191#
2192# ALL Enable various bug workarounds suggested as "harmless"
2193# by OpenSSL. Be warned that this may reduce SSL/TLS
2194# strength to some attacks.
2195#
2196# See the OpenSSL SSL_CTX_set_options documentation for a
2197# complete list of possible options.
2198#
2199# WARNING: This directive takes a single token. If a space is used
2200# the value(s) after that space are SILENTLY IGNORED.
2201#Default:
2202# none
2203
2204# TAG: sslproxy_cipher
2205# Note: This option is only available if Squid is rebuilt with the
2206# --with-openssl
2207#
2208# SSL cipher list to use when proxying https:// URLs
2209#
2210# Colon separated list of supported ciphers.
2211#Default:
2212# none
2213
2214# TAG: sslproxy_cafile
2215# Note: This option is only available if Squid is rebuilt with the
2216# --with-openssl
2217#
2218# file containing CA certificates to use when verifying server
2219# certificates while proxying https:// URLs
2220#Default:
2221# none
2222
2223# TAG: sslproxy_capath
2224# Note: This option is only available if Squid is rebuilt with the
2225# --with-openssl
2226#
2227# directory containing CA certificates to use when verifying
2228# server certificates while proxying https:// URLs
2229#Default:
2230# none
2231
2232# TAG: sslproxy_session_ttl
2233# Note: This option is only available if Squid is rebuilt with the
2234# --with-openssl
2235#
2236# Sets the timeout value for SSL sessions
2237#Default:
2238# sslproxy_session_ttl 300
2239
2240# TAG: sslproxy_session_cache_size
2241# Note: This option is only available if Squid is rebuilt with the
2242# --with-openssl
2243#
2244# Sets the cache size to use for ssl session
2245#Default:
2246# sslproxy_session_cache_size 2 MB
2247
2248# TAG: sslproxy_foreign_intermediate_certs
2249# Note: This option is only available if Squid is rebuilt with the
2250# --with-openssl
2251#
2252# Many origin servers fail to send their full server certificate
2253# chain for verification, assuming the client already has or can
2254# easily locate any missing intermediate certificates.
2255#
2256# Squid uses the certificates from the specified file to fill in
2257# these missing chains when trying to validate origin server
2258# certificate chains.
2259#
2260# The file is expected to contain zero or more PEM-encoded
2261# intermediate certificates. These certificates are not treated
2262# as trusted root certificates, and any self-signed certificate in
2263# this file will be ignored.
2264#Default:
2265# none
2266
2267# TAG: sslproxy_cert_sign_hash
2268# Note: This option is only available if Squid is rebuilt with the
2269# --with-openssl
2270#
2271# Sets the hashing algorithm to use when signing generated certificates.
2272# Valid algorithm names depend on the OpenSSL library used. The following
2273# names are usually available: sha1, sha256, sha512, and md5. Please see
2274# your OpenSSL library manual for the available hashes. By default, Squids
2275# that support this option use sha256 hashes.
2276#
2277# Squid does not forcefully purge cached certificates that were generated
2278# with an algorithm other than the currently configured one. They remain
2279# in the cache, subject to the regular cache eviction policy, and become
2280# useful if the algorithm changes again.
2281#Default:
2282# none
2283
2284# TAG: ssl_bump
2285# Note: This option is only available if Squid is rebuilt with the
2286# --with-openssl
2287#
2288# This option is consulted when a CONNECT request is received on
2289# an http_port (or a new connection is intercepted at an
2290# https_port), provided that port was configured with an ssl-bump
2291# flag. The subsequent data on the connection is either treated as
2292# HTTPS and decrypted OR tunneled at TCP level without decryption,
2293# depending on the first matching bumping "action".
2294#
2295# ssl_bump <action> [!]acl ...
2296#
2297# The following bumping actions are currently supported:
2298#
2299# splice
2300# Become a TCP tunnel without decrypting proxied traffic.
2301# This is the default action.
2302#
2303# bump
2304# Establish a secure connection with the server and, using a
2305# mimicked server certificate, with the client.
2306#
2307# peek
2308# Receive client (step SslBump1) or server (step SslBump2)
2309# certificate while preserving the possibility of splicing the
2310# connection. Peeking at the server certificate (during step 2)
2311# usually precludes bumping of the connection at step 3.
2312#
2313# stare
2314# Receive client (step SslBump1) or server (step SslBump2)
2315# certificate while preserving the possibility of bumping the
2316# connection. Staring at the server certificate (during step 2)
2317# usually precludes splicing of the connection at step 3.
2318#
2319# terminate
2320# Close client and server connections.
2321#
2322# Backward compatibility actions available at step SslBump1:
2323#
2324# client-first
2325# Bump the connection. Establish a secure connection with the
2326# client first, then connect to the server. This old mode does
2327# not allow Squid to mimic server SSL certificate and does not
2328# work with intercepted SSL connections.
2329#
2330# server-first
2331# Bump the connection. Establish a secure connection with the
2332# server first, then establish a secure connection with the
2333# client, using a mimicked server certificate. Works with both
2334# CONNECT requests and intercepted SSL connections, but does
2335# not allow to make decisions based on SSL handshake info.
2336#
2337# peek-and-splice
2338# Decide whether to bump or splice the connection based on
2339# client-to-squid and server-to-squid SSL hello messages.
2340# XXX: Remove.
2341#
2342# none
2343# Same as the "splice" action.
2344#
2345# All ssl_bump rules are evaluated at each of the supported bumping
2346# steps. Rules with actions that are impossible at the current step are
2347# ignored. The first matching ssl_bump action wins and is applied at the
2348# end of the current step. If no rules match, the splice action is used.
2349# See the at_step ACL for a list of the supported SslBump steps.
2350#
2351# This clause supports both fast and slow acl types.
2352# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2353#
2354# See also: http_port ssl-bump, https_port ssl-bump, and acl at_step.
2355#
2356#
2357# # Example: Bump all TLS connections except those originating from
2358# # localhost or those going to example.com.
2359#
2360# acl broken_sites ssl::server_name .example.com
2361# ssl_bump splice localhost
2362# ssl_bump splice broken_sites
2363# ssl_bump bump all
2364#Default:
2365# Become a TCP tunnel without decrypting proxied traffic.
2366
2367# TAG: sslproxy_flags
2368# Note: This option is only available if Squid is rebuilt with the
2369# --with-openssl
2370#
2371# Various flags modifying the use of SSL while proxying https:// URLs:
2372# DONT_VERIFY_PEER Accept certificates that fail verification.
2373# For refined control, see sslproxy_cert_error.
2374# NO_DEFAULT_CA Don't use the default CA list built in
2375# to OpenSSL.
2376#Default:
2377# none
2378
2379# TAG: sslproxy_cert_error
2380# Note: This option is only available if Squid is rebuilt with the
2381# --with-openssl
2382#
2383# Use this ACL to bypass server certificate validation errors.
2384#
2385# For example, the following lines will bypass all validation errors
2386# when talking to servers for example.com. All other
2387# validation errors will result in ERR_SECURE_CONNECT_FAIL error.
2388#
2389# acl BrokenButTrustedServers dstdomain example.com
2390# sslproxy_cert_error allow BrokenButTrustedServers
2391# sslproxy_cert_error deny all
2392#
2393# This clause only supports fast acl types.
2394# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2395# Using slow acl types may result in server crashes
2396#
2397# Without this option, all server certificate validation errors
2398# terminate the transaction to protect Squid and the client.
2399#
2400# SQUID_X509_V_ERR_INFINITE_VALIDATION error cannot be bypassed
2401# but should not happen unless your OpenSSL library is buggy.
2402#
2403# SECURITY WARNING:
2404# Bypassing validation errors is dangerous because an
2405# error usually implies that the server cannot be trusted
2406# and the connection may be insecure.
2407#
2408# See also: sslproxy_flags and DONT_VERIFY_PEER.
2409#Default:
2410# Server certificate errors terminate the transaction.
2411
2412# TAG: sslproxy_cert_sign
2413# Note: This option is only available if Squid is rebuilt with the
2414# --with-openssl
2415#
2416#
2417# sslproxy_cert_sign <signing algorithm> acl ...
2418#
2419# The following certificate signing algorithms are supported:
2420#
2421# signTrusted
2422# Sign using the configured CA certificate which is usually
2423# placed in and trusted by end-user browsers. This is the
2424# default for trusted origin server certificates.
2425#
2426# signUntrusted
2427# Sign to guarantee an X509_V_ERR_CERT_UNTRUSTED browser error.
2428# This is the default for untrusted origin server certificates
2429# that are not self-signed (see ssl::certUntrusted).
2430#
2431# signSelf
2432# Sign using a self-signed certificate with the right CN to
2433# generate a X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT error in the
2434# browser. This is the default for self-signed origin server
2435# certificates (see ssl::certSelfSigned).
2436#
2437# This clause only supports fast acl types.
2438#
2439# When sslproxy_cert_sign acl(s) match, Squid uses the corresponding
2440# signing algorithm to generate the certificate and ignores all
2441# subsequent sslproxy_cert_sign options (the first match wins). If no
2442# acl(s) match, the default signing algorithm is determined by errors
2443# detected when obtaining and validating the origin server certificate.
2444#
2445# WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can
2446# be used with sslproxy_cert_adapt, but if and only if Squid is bumping a
2447# CONNECT request that carries a domain name. In all other cases (CONNECT
2448# to an IP address or an intercepted SSL connection), Squid cannot detect
2449# the domain mismatch at certificate generation time when
2450# bump-server-first is used.
2451#Default:
2452# none
2453
2454# TAG: sslproxy_cert_adapt
2455# Note: This option is only available if Squid is rebuilt with the
2456# --with-openssl
2457#
2458#
2459# sslproxy_cert_adapt <adaptation algorithm> acl ...
2460#
2461# The following certificate adaptation algorithms are supported:
2462#
2463# setValidAfter
2464# Sets the "Not After" property to the "Not After" property of
2465# the CA certificate used to sign generated certificates.
2466#
2467# setValidBefore
2468# Sets the "Not Before" property to the "Not Before" property of
2469# the CA certificate used to sign generated certificates.
2470#
2471# setCommonName or setCommonName{CN}
2472# Sets Subject.CN property to the host name specified as a
2473# CN parameter or, if no explicit CN parameter was specified,
2474# extracted from the CONNECT request. It is a misconfiguration
2475# to use setCommonName without an explicit parameter for
2476# intercepted or tproxied SSL connections.
2477#
2478# This clause only supports fast acl types.
2479#
2480# Squid first groups sslproxy_cert_adapt options by adaptation algorithm.
2481# Within a group, when sslproxy_cert_adapt acl(s) match, Squid uses the
2482# corresponding adaptation algorithm to generate the certificate and
2483# ignores all subsequent sslproxy_cert_adapt options in that algorithm's
2484# group (i.e., the first match wins within each algorithm group). If no
2485# acl(s) match, the default mimicking action takes place.
2486#
2487# WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can
2488# be used with sslproxy_cert_adapt, but if and only if Squid is bumping a
2489# CONNECT request that carries a domain name. In all other cases (CONNECT
2490# to an IP address or an intercepted SSL connection), Squid cannot detect
2491# the domain mismatch at certificate generation time when
2492# bump-server-first is used.
2493#Default:
2494# none
2495
2496# TAG: sslpassword_program
2497# Note: This option is only available if Squid is rebuilt with the
2498# --with-openssl
2499#
2500# Specify a program used for entering SSL key passphrases
2501# when using encrypted SSL certificate keys. If not specified
2502# keys must either be unencrypted, or Squid started with the -N
2503# option to allow it to query interactively for the passphrase.
2504#
2505# The key file name is given as argument to the program allowing
2506# selection of the right password if you have multiple encrypted
2507# keys.
2508#Default:
2509# none
2510
2511# OPTIONS RELATING TO EXTERNAL SSL_CRTD
2512# -----------------------------------------------------------------------------
2513
2514# TAG: sslcrtd_program
2515# Note: This option is only available if Squid is rebuilt with the
2516# --enable-ssl-crtd
2517#
2518# Specify the location and options of the executable for ssl_crtd process.
2519# /usr/lib/squid/ssl_crtd program requires -s and -M parameters
2520# For more information use:
2521# /usr/lib/squid/ssl_crtd -h
2522#Default:
2523# sslcrtd_program /usr/lib/squid/ssl_crtd -s /var/lib/ssl_db -M 4MB
2524
2525# TAG: sslcrtd_children
2526# Note: This option is only available if Squid is rebuilt with the
2527# --enable-ssl-crtd
2528#
2529# The maximum number of processes spawn to service ssl server.
2530# The maximum this may be safely set to is 32.
2531#
2532# The startup= and idle= options allow some measure of skew in your
2533# tuning.
2534#
2535# startup=N
2536#
2537# Sets the minimum number of processes to spawn when Squid
2538# starts or reconfigures. When set to zero the first request will
2539# cause spawning of the first child process to handle it.
2540#
2541# Starting too few children temporary slows Squid under load while it
2542# tries to spawn enough additional processes to cope with traffic.
2543#
2544# idle=N
2545#
2546# Sets a minimum of how many processes Squid is to try and keep available
2547# at all times. When traffic begins to rise above what the existing
2548# processes can handle this many more will be spawned up to the maximum
2549# configured. A minimum setting of 1 is required.
2550#
2551# You must have at least one ssl_crtd process.
2552#Default:
2553# sslcrtd_children 32 startup=5 idle=1
2554
2555# TAG: sslcrtvalidator_program
2556# Note: This option is only available if Squid is rebuilt with the
2557# --with-openssl
2558#
2559# Specify the location and options of the executable for ssl_crt_validator
2560# process.
2561#
2562# Usage: sslcrtvalidator_program [ttl=n] [cache=n] path ...
2563#
2564# Options:
2565# ttl=n TTL in seconds for cached results. The default is 60 secs
2566# cache=n limit the result cache size. The default value is 2048
2567#Default:
2568# none
2569
2570# TAG: sslcrtvalidator_children
2571# Note: This option is only available if Squid is rebuilt with the
2572# --with-openssl
2573#
2574# The maximum number of processes spawn to service SSL server.
2575# The maximum this may be safely set to is 32.
2576#
2577# The startup= and idle= options allow some measure of skew in your
2578# tuning.
2579#
2580# startup=N
2581#
2582# Sets the minimum number of processes to spawn when Squid
2583# starts or reconfigures. When set to zero the first request will
2584# cause spawning of the first child process to handle it.
2585#
2586# Starting too few children temporary slows Squid under load while it
2587# tries to spawn enough additional processes to cope with traffic.
2588#
2589# idle=N
2590#
2591# Sets a minimum of how many processes Squid is to try and keep available
2592# at all times. When traffic begins to rise above what the existing
2593# processes can handle this many more will be spawned up to the maximum
2594# configured. A minimum setting of 1 is required.
2595#
2596# concurrency=
2597#
2598# The number of requests each certificate validator helper can handle in
2599# parallel. A value of 0 indicates the certficate validator does not
2600# support concurrency. Defaults to 1.
2601#
2602# When this directive is set to a value >= 1 then the protocol
2603# used to communicate with the helper is modified to include
2604# a request ID in front of the request/response. The request
2605# ID from the request must be echoed back with the response
2606# to that request.
2607#
2608# You must have at least one ssl_crt_validator process.
2609#Default:
2610# sslcrtvalidator_children 32 startup=5 idle=1 concurrency=1
2611
2612# OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
2613# -----------------------------------------------------------------------------
2614
2615# TAG: cache_peer
2616# To specify other caches in a hierarchy, use the format:
2617#
2618# cache_peer hostname type http-port icp-port [options]
2619#
2620# For example,
2621#
2622# # proxy icp
2623# # hostname type port port options
2624# # -------------------- -------- ----- ----- -----------
2625# cache_peer parent.foo.net parent 3128 3130 default
2626# cache_peer sib1.foo.net sibling 3128 3130 proxy-only
2627# cache_peer sib2.foo.net sibling 3128 3130 proxy-only
2628# cache_peer example.com parent 80 0 default
2629# cache_peer cdn.example.com sibling 3128 0
2630#
2631# type: either 'parent', 'sibling', or 'multicast'.
2632#
2633# proxy-port: The port number where the peer accept HTTP requests.
2634# For other Squid proxies this is usually 3128
2635# For web servers this is usually 80
2636#
2637# icp-port: Used for querying neighbor caches about objects.
2638# Set to 0 if the peer does not support ICP or HTCP.
2639# See ICP and HTCP options below for additional details.
2640#
2641#
2642# ==== ICP OPTIONS ====
2643#
2644# You MUST also set icp_port and icp_access explicitly when using these options.
2645# The defaults will prevent peer traffic using ICP.
2646#
2647#
2648# no-query Disable ICP queries to this neighbor.
2649#
2650# multicast-responder
2651# Indicates the named peer is a member of a multicast group.
2652# ICP queries will not be sent directly to the peer, but ICP
2653# replies will be accepted from it.
2654#
2655# closest-only Indicates that, for ICP_OP_MISS replies, we'll only forward
2656# CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes.
2657#
2658# background-ping
2659# To only send ICP queries to this neighbor infrequently.
2660# This is used to keep the neighbor round trip time updated
2661# and is usually used in conjunction with weighted-round-robin.
2662#
2663#
2664# ==== HTCP OPTIONS ====
2665#
2666# You MUST also set htcp_port and htcp_access explicitly when using these options.
2667# The defaults will prevent peer traffic using HTCP.
2668#
2669#
2670# htcp Send HTCP, instead of ICP, queries to the neighbor.
2671# You probably also want to set the "icp-port" to 4827
2672# instead of 3130. This directive accepts a comma separated
2673# list of options described below.
2674#
2675# htcp=oldsquid Send HTCP to old Squid versions (2.5 or earlier).
2676#
2677# htcp=no-clr Send HTCP to the neighbor but without
2678# sending any CLR requests. This cannot be used with
2679# only-clr.
2680#
2681# htcp=only-clr Send HTCP to the neighbor but ONLY CLR requests.
2682# This cannot be used with no-clr.
2683#
2684# htcp=no-purge-clr
2685# Send HTCP to the neighbor including CLRs but only when
2686# they do not result from PURGE requests.
2687#
2688# htcp=forward-clr
2689# Forward any HTCP CLR requests this proxy receives to the peer.
2690#
2691#
2692# ==== PEER SELECTION METHODS ====
2693#
2694# The default peer selection method is ICP, with the first responding peer
2695# being used as source. These options can be used for better load balancing.
2696#
2697#
2698# default This is a parent cache which can be used as a "last-resort"
2699# if a peer cannot be located by any of the peer-selection methods.
2700# If specified more than once, only the first is used.
2701#
2702# round-robin Load-Balance parents which should be used in a round-robin
2703# fashion in the absence of any ICP queries.
2704# weight=N can be used to add bias.
2705#
2706# weighted-round-robin
2707# Load-Balance parents which should be used in a round-robin
2708# fashion with the frequency of each parent being based on the
2709# round trip time. Closer parents are used more often.
2710# Usually used for background-ping parents.
2711# weight=N can be used to add bias.
2712#
2713# carp Load-Balance parents which should be used as a CARP array.
2714# The requests will be distributed among the parents based on the
2715# CARP load balancing hash function based on their weight.
2716#
2717# userhash Load-balance parents based on the client proxy_auth or ident username.
2718#
2719# sourcehash Load-balance parents based on the client source IP.
2720#
2721# multicast-siblings
2722# To be used only for cache peers of type "multicast".
2723# ALL members of this multicast group have "sibling"
2724# relationship with it, not "parent". This is to a multicast
2725# group when the requested object would be fetched only from
2726# a "parent" cache, anyway. It's useful, e.g., when
2727# configuring a pool of redundant Squid proxies, being
2728# members of the same multicast group.
2729#
2730#
2731# ==== PEER SELECTION OPTIONS ====
2732#
2733# weight=N use to affect the selection of a peer during any weighted
2734# peer-selection mechanisms.
2735# The weight must be an integer; default is 1,
2736# larger weights are favored more.
2737# This option does not affect parent selection if a peering
2738# protocol is not in use.
2739#
2740# basetime=N Specify a base amount to be subtracted from round trip
2741# times of parents.
2742# It is subtracted before division by weight in calculating
2743# which parent to fectch from. If the rtt is less than the
2744# base time the rtt is set to a minimal value.
2745#
2746# ttl=N Specify a TTL to use when sending multicast ICP queries
2747# to this address.
2748# Only useful when sending to a multicast group.
2749# Because we don't accept ICP replies from random
2750# hosts, you must configure other group members as
2751# peers with the 'multicast-responder' option.
2752#
2753# no-delay To prevent access to this neighbor from influencing the
2754# delay pools.
2755#
2756# digest-url=URL Tell Squid to fetch the cache digest (if digests are
2757# enabled) for this host from the specified URL rather
2758# than the Squid default location.
2759#
2760#
2761# ==== CARP OPTIONS ====
2762#
2763# carp-key=key-specification
2764# use a different key than the full URL to hash against the peer.
2765# the key-specification is a comma-separated list of the keywords
2766# scheme, host, port, path, params
2767# Order is not important.
2768#
2769# ==== ACCELERATOR / REVERSE-PROXY OPTIONS ====
2770#
2771# originserver Causes this parent to be contacted as an origin server.
2772# Meant to be used in accelerator setups when the peer
2773# is a web server.
2774#
2775# forceddomain=name
2776# Set the Host header of requests forwarded to this peer.
2777# Useful in accelerator setups where the server (peer)
2778# expects a certain domain name but clients may request
2779# others. ie example.com or www.example.com
2780#
2781# no-digest Disable request of cache digests.
2782#
2783# no-netdb-exchange
2784# Disables requesting ICMP RTT database (NetDB).
2785#
2786#
2787# ==== AUTHENTICATION OPTIONS ====
2788#
2789# login=user:password
2790# If this is a personal/workgroup proxy and your parent
2791# requires proxy authentication.
2792#
2793# Note: The string can include URL escapes (i.e. %20 for
2794# spaces). This also means % must be written as %%.
2795#
2796# login=PASSTHRU
2797# Send login details received from client to this peer.
2798# Both Proxy- and WWW-Authorization headers are passed
2799# without alteration to the peer.
2800# Authentication is not required by Squid for this to work.
2801#
2802# Note: This will pass any form of authentication but
2803# only Basic auth will work through a proxy unless the
2804# connection-auth options are also used.
2805#
2806# login=PASS Send login details received from client to this peer.
2807# Authentication is not required by this option.
2808#
2809# If there are no client-provided authentication headers
2810# to pass on, but username and password are available
2811# from an external ACL user= and password= result tags
2812# they may be sent instead.
2813#
2814# Note: To combine this with proxy_auth both proxies must
2815# share the same user database as HTTP only allows for
2816# a single login (one for proxy, one for origin server).
2817# Also be warned this will expose your users proxy
2818# password to the peer. USE WITH CAUTION
2819#
2820# login=*:password
2821# Send the username to the upstream cache, but with a
2822# fixed password. This is meant to be used when the peer
2823# is in another administrative domain, but it is still
2824# needed to identify each user.
2825# The star can optionally be followed by some extra
2826# information which is added to the username. This can
2827# be used to identify this proxy to the peer, similar to
2828# the login=username:password option above.
2829#
2830# login=NEGOTIATE
2831# If this is a personal/workgroup proxy and your parent
2832# requires a secure proxy authentication.
2833# The first principal from the default keytab or defined by
2834# the environment variable KRB5_KTNAME will be used.
2835#
2836# WARNING: The connection may transmit requests from multiple
2837# clients. Negotiate often assumes end-to-end authentication
2838# and a single-client. Which is not strictly true here.
2839#
2840# login=NEGOTIATE:principal_name
2841# If this is a personal/workgroup proxy and your parent
2842# requires a secure proxy authentication.
2843# The principal principal_name from the default keytab or
2844# defined by the environment variable KRB5_KTNAME will be
2845# used.
2846#
2847# WARNING: The connection may transmit requests from multiple
2848# clients. Negotiate often assumes end-to-end authentication
2849# and a single-client. Which is not strictly true here.
2850#
2851# connection-auth=on|off
2852# Tell Squid that this peer does or not support Microsoft
2853# connection oriented authentication, and any such
2854# challenges received from there should be ignored.
2855# Default is auto to automatically determine the status
2856# of the peer.
2857#
2858#
2859# ==== SSL / HTTPS / TLS OPTIONS ====
2860#
2861# ssl Encrypt connections to this peer with SSL/TLS.
2862#
2863# sslcert=/path/to/ssl/certificate
2864# A client SSL certificate to use when connecting to
2865# this peer.
2866#
2867# sslkey=/path/to/ssl/key
2868# The private SSL key corresponding to sslcert above.
2869# If 'sslkey' is not specified 'sslcert' is assumed to
2870# reference a combined file containing both the
2871# certificate and the key.
2872#
2873# sslversion=1|2|3|4|5|6
2874# The SSL version to use when connecting to this peer
2875# 1 = automatic (default)
2876# 2 = SSL v2 only
2877# 3 = SSL v3 only
2878# 4 = TLS v1.0 only
2879# 5 = TLS v1.1 only
2880# 6 = TLS v1.2 only
2881#
2882# sslcipher=... The list of valid SSL ciphers to use when connecting
2883# to this peer.
2884#
2885# ssloptions=... Specify various SSL implementation options:
2886#
2887# NO_SSLv2 Disallow the use of SSLv2
2888# NO_SSLv3 Disallow the use of SSLv3
2889# NO_TLSv1 Disallow the use of TLSv1.0
2890# NO_TLSv1_1 Disallow the use of TLSv1.1
2891# NO_TLSv1_2 Disallow the use of TLSv1.2
2892#
2893# SINGLE_DH_USE
2894# Always create a new key when using
2895# temporary/ephemeral DH key exchanges
2896#
2897# NO_TICKET
2898# Disable use of RFC5077 session tickets. Some servers
2899# may have problems understanding the TLS extension due
2900# to ambiguous specification in RFC4507.
2901#
2902# ALL Enable various bug workarounds
2903# suggested as "harmless" by OpenSSL
2904# Be warned that this reduces SSL/TLS
2905# strength to some attacks.
2906#
2907# See the OpenSSL SSL_CTX_set_options documentation for a
2908# more complete list.
2909#
2910# sslcafile=... A file containing additional CA certificates to use
2911# when verifying the peer certificate.
2912#
2913# sslcapath=... A directory containing additional CA certificates to
2914# use when verifying the peer certificate.
2915#
2916# sslcrlfile=... A certificate revocation list file to use when
2917# verifying the peer certificate.
2918#
2919# sslflags=... Specify various flags modifying the SSL implementation:
2920#
2921# DONT_VERIFY_PEER
2922# Accept certificates even if they fail to
2923# verify.
2924# NO_DEFAULT_CA
2925# Don't use the default CA list built in
2926# to OpenSSL.
2927# DONT_VERIFY_DOMAIN
2928# Don't verify the peer certificate
2929# matches the server name
2930#
2931# ssldomain= The peer name as advertised in it's certificate.
2932# Used for verifying the correctness of the received peer
2933# certificate. If not specified the peer hostname will be
2934# used.
2935#
2936# front-end-https
2937# Enable the "Front-End-Https: On" header needed when
2938# using Squid as a SSL frontend in front of Microsoft OWA.
2939# See MS KB document Q307347 for details on this header.
2940# If set to auto the header will only be added if the
2941# request is forwarded as a https:// URL.
2942#
2943#
2944# ==== GENERAL OPTIONS ====
2945#
2946# connect-timeout=N
2947# A peer-specific connect timeout.
2948# Also see the peer_connect_timeout directive.
2949#
2950# connect-fail-limit=N
2951# How many times connecting to a peer must fail before
2952# it is marked as down. Standby connection failures
2953# count towards this limit. Default is 10.
2954#
2955# allow-miss Disable Squid's use of only-if-cached when forwarding
2956# requests to siblings. This is primarily useful when
2957# icp_hit_stale is used by the sibling. Excessive use
2958# of this option may result in forwarding loops. One way
2959# to prevent peering loops when using this option, is to
2960# deny cache peer usage on requests from a peer:
2961# acl fromPeer ...
2962# cache_peer_access peerName deny fromPeer
2963#
2964# max-conn=N Limit the number of concurrent connections the Squid
2965# may open to this peer, including already opened idle
2966# and standby connections. There is no peer-specific
2967# connection limit by default.
2968#
2969# A peer exceeding the limit is not used for new
2970# requests unless a standby connection is available.
2971#
2972# max-conn currently works poorly with idle persistent
2973# connections: When a peer reaches its max-conn limit,
2974# and there are idle persistent connections to the peer,
2975# the peer may not be selected because the limiting code
2976# does not know whether Squid can reuse those idle
2977# connections.
2978#
2979# standby=N Maintain a pool of N "hot standby" connections to an
2980# UP peer, available for requests when no idle
2981# persistent connection is available (or safe) to use.
2982# By default and with zero N, no such pool is maintained.
2983# N must not exceed the max-conn limit (if any).
2984#
2985# At start or after reconfiguration, Squid opens new TCP
2986# standby connections until there are N connections
2987# available and then replenishes the standby pool as
2988# opened connections are used up for requests. A used
2989# connection never goes back to the standby pool, but
2990# may go to the regular idle persistent connection pool
2991# shared by all peers and origin servers.
2992#
2993# Squid never opens multiple new standby connections
2994# concurrently. This one-at-a-time approach minimizes
2995# flooding-like effect on peers. Furthermore, just a few
2996# standby connections should be sufficient in most cases
2997# to supply most new requests with a ready-to-use
2998# connection.
2999#
3000# Standby connections obey server_idle_pconn_timeout.
3001# For the feature to work as intended, the peer must be
3002# configured to accept and keep them open longer than
3003# the idle timeout at the connecting Squid, to minimize
3004# race conditions typical to idle used persistent
3005# connections. Default request_timeout and
3006# server_idle_pconn_timeout values ensure such a
3007# configuration.
3008#
3009# name=xxx Unique name for the peer.
3010# Required if you have multiple peers on the same host
3011# but different ports.
3012# This name can be used in cache_peer_access and similar
3013# directives to identify the peer.
3014# Can be used by outgoing access controls through the
3015# peername ACL type.
3016#
3017# no-tproxy Do not use the client-spoof TPROXY support when forwarding
3018# requests to this peer. Use normal address selection instead.
3019# This overrides the spoof_client_ip ACL.
3020#
3021# proxy-only objects fetched from the peer will not be stored locally.
3022#
3023#Default:
3024# none
3025
3026# TAG: cache_peer_domain
3027# Use to limit the domains for which a neighbor cache will be
3028# queried.
3029#
3030# Usage:
3031# cache_peer_domain cache-host domain [domain ...]
3032# cache_peer_domain cache-host !domain
3033#
3034# For example, specifying
3035#
3036# cache_peer_domain parent.foo.net .edu
3037#
3038# has the effect such that UDP query packets are sent to
3039# 'bigserver' only when the requested object exists on a
3040# server in the .edu domain. Prefixing the domainname
3041# with '!' means the cache will be queried for objects
3042# NOT in that domain.
3043#
3044# NOTE: * Any number of domains may be given for a cache-host,
3045# either on the same or separate lines.
3046# * When multiple domains are given for a particular
3047# cache-host, the first matched domain is applied.
3048# * Cache hosts with no domain restrictions are queried
3049# for all requests.
3050# * There are no defaults.
3051# * There is also a 'cache_peer_access' tag in the ACL
3052# section.
3053#Default:
3054# none
3055
3056# TAG: cache_peer_access
3057# Restricts usage of cache_peer proxies.
3058#
3059# Usage:
3060# cache_peer_access peer-name allow|deny [!]aclname ...
3061#
3062# For the required peer-name parameter, use either the value of the
3063# cache_peer name=value parameter or, if name=value is missing, the
3064# cache_peer hostname parameter.
3065#
3066# This directive narrows down the selection of peering candidates, but
3067# does not determine the order in which the selected candidates are
3068# contacted. That order is determined by the peer selection algorithms
3069# (see PEER SELECTION sections in the cache_peer documentation).
3070#
3071# If a deny rule matches, the corresponding peer will not be contacted
3072# for the current transaction -- Squid will not send ICP queries and
3073# will not forward HTTP requests to that peer. An allow match leaves
3074# the corresponding peer in the selection. The first match for a given
3075# peer wins for that peer.
3076#
3077# The relative order of cache_peer_access directives for the same peer
3078# matters. The relative order of any two cache_peer_access directives
3079# for different peers does not matter. To ease interpretation, it is a
3080# good idea to group cache_peer_access directives for the same peer
3081# together.
3082#
3083# A single cache_peer_access directive may be evaluated multiple times
3084# for a given transaction because individual peer selection algorithms
3085# may check it independently from each other. These redundant checks
3086# may be optimized away in future Squid versions.
3087#
3088# This clause only supports fast acl types.
3089# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
3090#Default:
3091# No peer usage restrictions.
3092
3093# TAG: neighbor_type_domain
3094# Modify the cache_peer neighbor type when passing requests
3095# about specific domains to the peer.
3096#
3097# Usage:
3098# neighbor_type_domain neighbor parent|sibling domain domain ...
3099#
3100# For example:
3101# cache_peer foo.example.com parent 3128 3130
3102# neighbor_type_domain foo.example.com sibling .au .de
3103#
3104# The above configuration treats all requests to foo.example.com as a
3105# parent proxy unless the request is for a .au or .de ccTLD domain name.
3106#Default:
3107# The peer type from cache_peer directive is used for all requests to that peer.
3108
3109# TAG: dead_peer_timeout (seconds)
3110# This controls how long Squid waits to declare a peer cache
3111# as "dead." If there are no ICP replies received in this
3112# amount of time, Squid will declare the peer dead and not
3113# expect to receive any further ICP replies. However, it
3114# continues to send ICP queries, and will mark the peer as
3115# alive upon receipt of the first subsequent ICP reply.
3116#
3117# This timeout also affects when Squid expects to receive ICP
3118# replies from peers. If more than 'dead_peer' seconds have
3119# passed since the last ICP reply was received, Squid will not
3120# expect to receive an ICP reply on the next query. Thus, if
3121# your time between requests is greater than this timeout, you
3122# will see a lot of requests sent DIRECT to origin servers
3123# instead of to your parents.
3124#Default:
3125# dead_peer_timeout 10 seconds
3126
3127# TAG: forward_max_tries
3128# Controls how many different forward paths Squid will try
3129# before giving up. See also forward_timeout.
3130#
3131# NOTE: connect_retries (default: none) can make each of these
3132# possible forwarding paths be tried multiple times.
3133#Default:
3134# forward_max_tries 25
3135
3136# MEMORY CACHE OPTIONS
3137# -----------------------------------------------------------------------------
3138
3139# TAG: cache_mem (bytes)
3140# NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
3141# IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
3142# USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
3143# THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
3144#
3145# 'cache_mem' specifies the ideal amount of memory to be used
3146# for:
3147# * In-Transit objects
3148# * Hot Objects
3149# * Negative-Cached objects
3150#
3151# Data for these objects are stored in 4 KB blocks. This
3152# parameter specifies the ideal upper limit on the total size of
3153# 4 KB blocks allocated. In-Transit objects take the highest
3154# priority.
3155#
3156# In-transit objects have priority over the others. When
3157# additional space is needed for incoming data, negative-cached
3158# and hot objects will be released. In other words, the
3159# negative-cached and hot objects will fill up any unused space
3160# not needed for in-transit objects.
3161#
3162# If circumstances require, this limit will be exceeded.
3163# Specifically, if your incoming request rate requires more than
3164# 'cache_mem' of memory to hold in-transit objects, Squid will
3165# exceed this limit to satisfy the new requests. When the load
3166# decreases, blocks will be freed until the high-water mark is
3167# reached. Thereafter, blocks will be used to store hot
3168# objects.
3169#
3170# If shared memory caching is enabled, Squid does not use the shared
3171# cache space for in-transit objects, but they still consume as much
3172# local memory as they need. For more details about the shared memory
3173# cache, see memory_cache_shared.
3174#Default:
3175# cache_mem 256 MB
3176
3177# TAG: maximum_object_size_in_memory (bytes)
3178# Objects greater than this size will not be attempted to kept in
3179# the memory cache. This should be set high enough to keep objects
3180# accessed frequently in memory to improve performance whilst low
3181# enough to keep larger objects from hoarding cache_mem.
3182#Default:
3183# maximum_object_size_in_memory 512 KB
3184
3185# TAG: memory_cache_shared on|off
3186# Controls whether the memory cache is shared among SMP workers.
3187#
3188# The shared memory cache is meant to occupy cache_mem bytes and replace
3189# the non-shared memory cache, although some entities may still be
3190# cached locally by workers for now (e.g., internal and in-transit
3191# objects may be served from a local memory cache even if shared memory
3192# caching is enabled).
3193#
3194# By default, the memory cache is shared if and only if all of the
3195# following conditions are satisfied: Squid runs in SMP mode with
3196# multiple workers, cache_mem is positive, and Squid environment
3197# supports required IPC primitives (e.g., POSIX shared memory segments
3198# and GCC-style atomic operations).
3199#
3200# To avoid blocking locks, shared memory uses opportunistic algorithms
3201# that do not guarantee that every cachable entity that could have been
3202# shared among SMP workers will actually be shared.
3203#Default:
3204# "on" where supported if doing memory caching with multiple SMP workers.
3205
3206# TAG: memory_cache_mode
3207# Controls which objects to keep in the memory cache (cache_mem)
3208#
3209# always Keep most recently fetched objects in memory (default)
3210#
3211# disk Only disk cache hits are kept in memory, which means
3212# an object must first be cached on disk and then hit
3213# a second time before cached in memory.
3214#
3215# network Only objects fetched from network is kept in memory
3216#Default:
3217# Keep the most recently fetched objects in memory
3218
3219# TAG: memory_replacement_policy
3220# The memory replacement policy parameter determines which
3221# objects are purged from memory when memory space is needed.
3222#
3223# See cache_replacement_policy for details on algorithms.
3224#Default:
3225# memory_replacement_policy lru
3226
3227# DISK CACHE OPTIONS
3228# -----------------------------------------------------------------------------
3229
3230# TAG: cache_replacement_policy
3231# The cache replacement policy parameter determines which
3232# objects are evicted (replaced) when disk space is needed.
3233#
3234# lru : Squid's original list based LRU policy
3235# heap GDSF : Greedy-Dual Size Frequency
3236# heap LFUDA: Least Frequently Used with Dynamic Aging
3237# heap LRU : LRU policy implemented using a heap
3238#
3239# Applies to any cache_dir lines listed below this directive.
3240#
3241# The LRU policies keeps recently referenced objects.
3242#
3243# The heap GDSF policy optimizes object hit rate by keeping smaller
3244# popular objects in cache so it has a better chance of getting a
3245# hit. It achieves a lower byte hit rate than LFUDA though since
3246# it evicts larger (possibly popular) objects.
3247#
3248# The heap LFUDA policy keeps popular objects in cache regardless of
3249# their size and thus optimizes byte hit rate at the expense of
3250# hit rate since one large, popular object will prevent many
3251# smaller, slightly less popular objects from being cached.
3252#
3253# Both policies utilize a dynamic aging mechanism that prevents
3254# cache pollution that can otherwise occur with frequency-based
3255# replacement policies.
3256#
3257# NOTE: if using the LFUDA replacement policy you should increase
3258# the value of maximum_object_size above its default of 4 MB to
3259# to maximize the potential byte hit rate improvement of LFUDA.
3260#
3261# For more information about the GDSF and LFUDA cache replacement
3262# policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
3263# and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
3264#Default:
3265# cache_replacement_policy lru
3266
3267# TAG: minimum_object_size (bytes)
3268# Objects smaller than this size will NOT be saved on disk. The
3269# value is specified in bytes, and the default is 0 KB, which
3270# means all responses can be stored.
3271#Default:
3272# no limit
3273
3274# TAG: maximum_object_size (bytes)
3275# Set the default value for max-size parameter on any cache_dir.
3276# The value is specified in bytes, and the default is 4 MB.
3277#
3278# If you wish to get a high BYTES hit ratio, you should probably
3279# increase this (one 32 MB object hit counts for 3200 10KB
3280# hits).
3281#
3282# If you wish to increase hit ratio more than you want to
3283# save bandwidth you should leave this low.
3284#
3285# NOTE: if using the LFUDA replacement policy you should increase
3286# this value to maximize the byte hit rate improvement of LFUDA!
3287# See cache_replacement_policy for a discussion of this policy.
3288#Default:
3289# maximum_object_size 4 MB
3290
3291# TAG: cache_dir
3292# Format:
3293# cache_dir Type Directory-Name Fs-specific-data [options]
3294#
3295# You can specify multiple cache_dir lines to spread the
3296# cache among different disk partitions.
3297#
3298# Type specifies the kind of storage system to use. Only "ufs"
3299# is built by default. To enable any of the other storage systems
3300# see the --enable-storeio configure option.
3301#
3302# 'Directory' is a top-level directory where cache swap
3303# files will be stored. If you want to use an entire disk
3304# for caching, this can be the mount-point directory.
3305# The directory must exist and be writable by the Squid
3306# process. Squid will NOT create this directory for you.
3307#
3308# In SMP configurations, cache_dir must not precede the workers option
3309# and should use configuration macros or conditionals to give each
3310# worker interested in disk caching a dedicated cache directory.
3311#
3312#
3313# ==== The ufs store type ====
3314#
3315# "ufs" is the old well-known Squid storage format that has always
3316# been there.
3317#
3318# Usage:
3319# cache_dir ufs Directory-Name Mbytes L1 L2 [options]
3320#
3321# 'Mbytes' is the amount of disk space (MB) to use under this
3322# directory. The default is 100 MB. Change this to suit your
3323# configuration. Do NOT put the size of your disk drive here.
3324# Instead, if you want Squid to use the entire disk drive,
3325# subtract 20% and use that value.
3326#
3327# 'L1' is the number of first-level subdirectories which
3328# will be created under the 'Directory'. The default is 16.
3329#
3330# 'L2' is the number of second-level subdirectories which
3331# will be created under each first-level directory. The default
3332# is 256.
3333#
3334#
3335# ==== The aufs store type ====
3336#
3337# "aufs" uses the same storage format as "ufs", utilizing
3338# POSIX-threads to avoid blocking the main Squid process on
3339# disk-I/O. This was formerly known in Squid as async-io.
3340#
3341# Usage:
3342# cache_dir aufs Directory-Name Mbytes L1 L2 [options]
3343#
3344# see argument descriptions under ufs above
3345#
3346#
3347# ==== The diskd store type ====
3348#
3349# "diskd" uses the same storage format as "ufs", utilizing a
3350# separate process to avoid blocking the main Squid process on
3351# disk-I/O.
3352#
3353# Usage:
3354# cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
3355#
3356# see argument descriptions under ufs above
3357#
3358# Q1 specifies the number of unacknowledged I/O requests when Squid
3359# stops opening new files. If this many messages are in the queues,
3360# Squid won't open new files. Default is 64
3361#
3362# Q2 specifies the number of unacknowledged messages when Squid
3363# starts blocking. If this many messages are in the queues,
3364# Squid blocks until it receives some replies. Default is 72
3365#
3366# When Q1 < Q2 (the default), the cache directory is optimized
3367# for lower response time at the expense of a decrease in hit
3368# ratio. If Q1 > Q2, the cache directory is optimized for
3369# higher hit ratio at the expense of an increase in response
3370# time.
3371#
3372#
3373# ==== The rock store type ====
3374#
3375# Usage:
3376# cache_dir rock Directory-Name Mbytes [options]
3377#
3378# The Rock Store type is a database-style storage. All cached
3379# entries are stored in a "database" file, using fixed-size slots.
3380# A single entry occupies one or more slots.
3381#
3382# If possible, Squid using Rock Store creates a dedicated kid
3383# process called "disker" to avoid blocking Squid worker(s) on disk
3384# I/O. One disker kid is created for each rock cache_dir. Diskers
3385# are created only when Squid, running in daemon mode, has support
3386# for the IpcIo disk I/O module.
3387#
3388# swap-timeout=msec: Squid will not start writing a miss to or
3389# reading a hit from disk if it estimates that the swap operation
3390# will take more than the specified number of milliseconds. By
3391# default and when set to zero, disables the disk I/O time limit
3392# enforcement. Ignored when using blocking I/O module because
3393# blocking synchronous I/O does not allow Squid to estimate the
3394# expected swap wait time.
3395#
3396# max-swap-rate=swaps/sec: Artificially limits disk access using
3397# the specified I/O rate limit. Swap out requests that
3398# would cause the average I/O rate to exceed the limit are
3399# delayed. Individual swap in requests (i.e., hits or reads) are
3400# not delayed, but they do contribute to measured swap rate and
3401# since they are placed in the same FIFO queue as swap out
3402# requests, they may wait longer if max-swap-rate is smaller.
3403# This is necessary on file systems that buffer "too
3404# many" writes and then start blocking Squid and other processes
3405# while committing those writes to disk. Usually used together
3406# with swap-timeout to avoid excessive delays and queue overflows
3407# when disk demand exceeds available disk "bandwidth". By default
3408# and when set to zero, disables the disk I/O rate limit
3409# enforcement. Currently supported by IpcIo module only.
3410#
3411# slot-size=bytes: The size of a database "record" used for
3412# storing cached responses. A cached response occupies at least
3413# one slot and all database I/O is done using individual slots so
3414# increasing this parameter leads to more disk space waste while
3415# decreasing it leads to more disk I/O overheads. Should be a
3416# multiple of your operating system I/O page size. Defaults to
3417# 16KBytes. A housekeeping header is stored with each slot and
3418# smaller slot-sizes will be rejected. The header is smaller than
3419# 100 bytes.
3420#
3421#
3422# ==== COMMON OPTIONS ====
3423#
3424# no-store no new objects should be stored to this cache_dir.
3425#
3426# min-size=n the minimum object size in bytes this cache_dir
3427# will accept. It's used to restrict a cache_dir
3428# to only store large objects (e.g. AUFS) while
3429# other stores are optimized for smaller objects
3430# (e.g. Rock).
3431# Defaults to 0.
3432#
3433# max-size=n the maximum object size in bytes this cache_dir
3434# supports.
3435# The value in maximum_object_size directive sets
3436# the default unless more specific details are
3437# available (ie a small store capacity).
3438#
3439# Note: To make optimal use of the max-size limits you should order
3440# the cache_dir lines with the smallest max-size value first.
3441#
3442#Default:
3443# No disk cache. Store cache ojects only in memory.
3444#
3445
3446# Uncomment and adjust the following to add a disk cache directory.
3447#cache_dir ufs /var/spool/squid 100 16 256
3448
3449# TAG: store_dir_select_algorithm
3450# How Squid selects which cache_dir to use when the response
3451# object will fit into more than one.
3452#
3453# Regardless of which algorithm is used the cache_dir min-size
3454# and max-size parameters are obeyed. As such they can affect
3455# the selection algorithm by limiting the set of considered
3456# cache_dir.
3457#
3458# Algorithms:
3459#
3460# least-load
3461#
3462# This algorithm is suited to caches with similar cache_dir
3463# sizes and disk speeds.
3464#
3465# The disk with the least I/O pending is selected.
3466# When there are multiple disks with the same I/O load ranking
3467# the cache_dir with most available capacity is selected.
3468#
3469# When a mix of cache_dir sizes are configured the faster disks
3470# have a naturally lower I/O loading and larger disks have more
3471# capacity. So space used to store objects and data throughput
3472# may be very unbalanced towards larger disks.
3473#
3474#
3475# round-robin
3476#
3477# This algorithm is suited to caches with unequal cache_dir
3478# disk sizes.
3479#
3480# Each cache_dir is selected in a rotation. The next suitable
3481# cache_dir is used.
3482#
3483# Available cache_dir capacity is only considered in relation
3484# to whether the object will fit and meets the min-size and
3485# max-size parameters.
3486#
3487# Disk I/O loading is only considered to prevent overload on slow
3488# disks. This algorithm does not spread objects by size, so any
3489# I/O loading per-disk may appear very unbalanced and volatile.
3490#
3491# If several cache_dirs use similar min-size, max-size, or other
3492# limits to to reject certain responses, then do not group such
3493# cache_dir lines together, to avoid round-robin selection bias
3494# towards the first cache_dir after the group. Instead, interleave
3495# cache_dir lines from different groups. For example:
3496#
3497# store_dir_select_algorithm round-robin
3498# cache_dir rock /hdd1 ... min-size=100000
3499# cache_dir rock /ssd1 ... max-size=99999
3500# cache_dir rock /hdd2 ... min-size=100000
3501# cache_dir rock /ssd2 ... max-size=99999
3502# cache_dir rock /hdd3 ... min-size=100000
3503# cache_dir rock /ssd3 ... max-size=99999
3504#Default:
3505# store_dir_select_algorithm least-load
3506
3507# TAG: max_open_disk_fds
3508# To avoid having disk as the I/O bottleneck Squid can optionally
3509# bypass the on-disk cache if more than this amount of disk file
3510# descriptors are open.
3511#
3512# A value of 0 indicates no limit.
3513#Default:
3514# no limit
3515
3516# TAG: cache_swap_low (percent, 0-100)
3517# The low-water mark for AUFS/UFS/diskd cache object eviction by
3518# the cache_replacement_policy algorithm.
3519#
3520# Removal begins when the swap (disk) usage of a cache_dir is
3521# above this low-water mark and attempts to maintain utilization
3522# near the low-water mark.
3523#
3524# As swap utilization increases towards the high-water mark set
3525# by cache_swap_high object eviction becomes more agressive.
3526#
3527# The value difference in percentages between low- and high-water
3528# marks represent an eviction rate of 300 objects per second and
3529# the rate continues to scale in agressiveness by multiples of
3530# this above the high-water mark.
3531#
3532# Defaults are 90% and 95%. If you have a large cache, 5% could be
3533# hundreds of MB. If this is the case you may wish to set these
3534# numbers closer together.
3535#
3536# See also cache_swap_high and cache_replacement_policy
3537#Default:
3538# cache_swap_low 90
3539
3540# TAG: cache_swap_high (percent, 0-100)
3541# The high-water mark for AUFS/UFS/diskd cache object eviction by
3542# the cache_replacement_policy algorithm.
3543#
3544# Removal begins when the swap (disk) usage of a cache_dir is
3545# above the low-water mark set by cache_swap_low and attempts to
3546# maintain utilization near the low-water mark.
3547#
3548# As swap utilization increases towards this high-water mark object
3549# eviction becomes more agressive.
3550#
3551# The value difference in percentages between low- and high-water
3552# marks represent an eviction rate of 300 objects per second and
3553# the rate continues to scale in agressiveness by multiples of
3554# this above the high-water mark.
3555#
3556# Defaults are 90% and 95%. If you have a large cache, 5% could be
3557# hundreds of MB. If this is the case you may wish to set these
3558# numbers closer together.
3559#
3560# See also cache_swap_low and cache_replacement_policy
3561#Default:
3562# cache_swap_high 95
3563
3564# LOGFILE OPTIONS
3565# -----------------------------------------------------------------------------
3566
3567# TAG: logformat
3568# Usage:
3569#
3570# logformat <name> <format specification>
3571#
3572# Defines an access log format.
3573#
3574# The <format specification> is a string with embedded % format codes
3575#
3576# % format codes all follow the same basic structure where all but
3577# the formatcode is optional. Output strings are automatically escaped
3578# as required according to their context and the output format
3579# modifiers are usually not needed, but can be specified if an explicit
3580# output format is desired.
3581#
3582# % ["|[|'|#] [-] [[0]width] [{argument}] formatcode
3583#
3584# " output in quoted string format
3585# [ output in squid text log format as used by log_mime_hdrs
3586# # output in URL quoted format
3587# ' output as-is
3588#
3589# - left aligned
3590#
3591# width minimum and/or maximum field width:
3592# [width_min][.width_max]
3593# When minimum starts with 0, the field is zero-padded.
3594# String values exceeding maximum width are truncated.
3595#
3596# {arg} argument such as header name etc
3597#
3598# Format codes:
3599#
3600# % a literal % character
3601# sn Unique sequence number per log line entry
3602# err_code The ID of an error response served by Squid or
3603# a similar internal error identifier.
3604# err_detail Additional err_code-dependent error information.
3605# note The annotation specified by the argument. Also
3606# logs the adaptation meta headers set by the
3607# adaptation_meta configuration parameter.
3608# If no argument given all annotations logged.
3609# The argument may include a separator to use with
3610# annotation values:
3611# name[:separator]
3612# By default, multiple note values are separated with ","
3613# and multiple notes are separated with "\r\n".
3614# When logging named notes with %{name}note, the
3615# explicitly configured separator is used between note
3616# values. When logging all notes with %note, the
3617# explicitly configured separator is used between
3618# individual notes. There is currently no way to
3619# specify both value and notes separators when logging
3620# all notes with %note.
3621#
3622# Connection related format codes:
3623#
3624# >a Client source IP address
3625# >A Client FQDN
3626# >p Client source port
3627# >eui Client source EUI (MAC address, EUI-48 or EUI-64 identifier)
3628# >la Local IP address the client connected to
3629# >lp Local port number the client connected to
3630# >qos Client connection TOS/DSCP value set by Squid
3631# >nfmark Client connection netfilter mark set by Squid
3632#
3633# la Local listening IP address the client connection was connected to.
3634# lp Local listening port number the client connection was connected to.
3635#
3636# <a Server IP address of the last server or peer connection
3637# <A Server FQDN or peer name
3638# <p Server port number of the last server or peer connection
3639# <la Local IP address of the last server or peer connection
3640# <lp Local port number of the last server or peer connection
3641# <qos Server connection TOS/DSCP value set by Squid
3642# <nfmark Server connection netfilter mark set by Squid
3643#
3644# Time related format codes:
3645#
3646# ts Seconds since epoch
3647# tu subsecond time (milliseconds)
3648# tl Local time. Optional strftime format argument
3649# default %d/%b/%Y:%H:%M:%S %z
3650# tg GMT time. Optional strftime format argument
3651# default %d/%b/%Y:%H:%M:%S %z
3652# tr Response time (milliseconds)
3653# dt Total time spent making DNS lookups (milliseconds)
3654# tS Approximate master transaction start time in
3655# <full seconds since epoch>.<fractional seconds> format.
3656# Currently, Squid considers the master transaction
3657# started when a complete HTTP request header initiating
3658# the transaction is received from the client. This is
3659# the same value that Squid uses to calculate transaction
3660# response time when logging %tr to access.log. Currently,
3661# Squid uses millisecond resolution for %tS values,
3662# similar to the default access.log "current time" field
3663# (%ts.%03tu).
3664#
3665# Access Control related format codes:
3666#
3667# et Tag returned by external acl
3668# ea Log string returned by external acl
3669# un User name (any available)
3670# ul User name from authentication
3671# ue User name from external acl helper
3672# ui User name from ident
3673# un A user name. Expands to the first available name
3674# from the following list of information sources:
3675# - authenticated user name, like %ul
3676# - user name supplied by an external ACL, like %ue
3677# - SSL client name, like %us
3678# - ident user name, like %ui
3679# credentials Client credentials. The exact meaning depends on
3680# the authentication scheme: For Basic authentication,
3681# it is the password; for Digest, the realm sent by the
3682# client; for NTLM and Negotiate, the client challenge
3683# or client credentials prefixed with "YR " or "KK ".
3684#
3685# HTTP related format codes:
3686#
3687# REQUEST
3688#
3689# [http::]rm Request method (GET/POST etc)
3690# [http::]>rm Request method from client
3691# [http::]<rm Request method sent to server or peer
3692# [http::]ru Request URL from client (historic, filtered for logging)
3693# [http::]>ru Request URL from client
3694# [http::]<ru Request URL sent to server or peer
3695# [http::]>rs Request URL scheme from client
3696# [http::]<rs Request URL scheme sent to server or peer
3697# [http::]>rd Request URL domain from client
3698# [http::]<rd Request URL domain sent to server or peer
3699# [http::]>rP Request URL port from client
3700# [http::]<rP Request URL port sent to server or peer
3701# [http::]rp Request URL path excluding hostname
3702# [http::]>rp Request URL path excluding hostname from client
3703# [http::]<rp Request URL path excluding hostname sent to server or peer
3704# [http::]rv Request protocol version
3705# [http::]>rv Request protocol version from client
3706# [http::]<rv Request protocol version sent to server or peer
3707#
3708# [http::]>h Original received request header.
3709# Usually differs from the request header sent by
3710# Squid, although most fields are often preserved.
3711# Accepts optional header field name/value filter
3712# argument using name[:[separator]element] format.
3713# [http::]>ha Received request header after adaptation and
3714# redirection (pre-cache REQMOD vectoring point).
3715# Usually differs from the request header sent by
3716# Squid, although most fields are often preserved.
3717# Optional header name argument as for >h
3718#
3719#
3720# RESPONSE
3721#
3722# [http::]<Hs HTTP status code received from the next hop
3723# [http::]>Hs HTTP status code sent to the client
3724#
3725# [http::]<h Reply header. Optional header name argument
3726# as for >h
3727#
3728# [http::]mt MIME content type
3729#
3730#
3731# SIZE COUNTERS
3732#
3733# [http::]st Total size of request + reply traffic with client
3734# [http::]>st Total size of request received from client.
3735# Excluding chunked encoding bytes.
3736# [http::]<st Total size of reply sent to client (after adaptation)
3737#
3738# [http::]>sh Size of request headers received from client
3739# [http::]<sh Size of reply headers sent to client (after adaptation)
3740#
3741# [http::]<sH Reply high offset sent
3742# [http::]<sS Upstream object size
3743#
3744# [http::]<bs Number of HTTP-equivalent message body bytes
3745# received from the next hop, excluding chunked
3746# transfer encoding and control messages.
3747# Generated FTP/Gopher listings are treated as
3748# received bodies.
3749#
3750#
3751# TIMING
3752#
3753# [http::]<pt Peer response time in milliseconds. The timer starts
3754# when the last request byte is sent to the next hop
3755# and stops when the last response byte is received.
3756# [http::]<tt Total time in milliseconds. The timer
3757# starts with the first connect request (or write I/O)
3758# sent to the first selected peer. The timer stops
3759# with the last I/O with the last peer.
3760#
3761# Squid handling related format codes:
3762#
3763# Ss Squid request status (TCP_MISS etc)
3764# Sh Squid hierarchy status (DEFAULT_PARENT etc)
3765#
3766# SSL-related format codes:
3767#
3768# ssl::bump_mode SslBump decision for the transaction:
3769#
3770# For CONNECT requests that initiated bumping of
3771# a connection and for any request received on
3772# an already bumped connection, Squid logs the
3773# corresponding SslBump mode ("server-first" or
3774# "client-first"). See the ssl_bump option for
3775# more information about these modes.
3776#
3777# A "none" token is logged for requests that
3778# triggered "ssl_bump" ACL evaluation matching
3779# either a "none" rule or no rules at all.
3780#
3781# In all other cases, a single dash ("-") is
3782# logged.
3783#
3784# ssl::>sni SSL client SNI sent to Squid. Available only
3785# after the peek, stare, or splice SSL bumping
3786# actions.
3787#
3788# If ICAP is enabled, the following code becomes available (as
3789# well as ICAP log codes documented with the icap_log option):
3790#
3791# icap::tt Total ICAP processing time for the HTTP
3792# transaction. The timer ticks when ICAP
3793# ACLs are checked and when ICAP
3794# transaction is in progress.
3795#
3796# If adaptation is enabled the following three codes become available:
3797#
3798# adapt::<last_h The header of the last ICAP response or
3799# meta-information from the last eCAP
3800# transaction related to the HTTP transaction.
3801# Like <h, accepts an optional header name
3802# argument.
3803#
3804# adapt::sum_trs Summed adaptation transaction response
3805# times recorded as a comma-separated list in
3806# the order of transaction start time. Each time
3807# value is recorded as an integer number,
3808# representing response time of one or more
3809# adaptation (ICAP or eCAP) transaction in
3810# milliseconds. When a failed transaction is
3811# being retried or repeated, its time is not
3812# logged individually but added to the
3813# replacement (next) transaction. See also:
3814# adapt::all_trs.
3815#
3816# adapt::all_trs All adaptation transaction response times.
3817# Same as adaptation_strs but response times of
3818# individual transactions are never added
3819# together. Instead, all transaction response
3820# times are recorded individually.
3821#
3822# You can prefix adapt::*_trs format codes with adaptation
3823# service name in curly braces to record response time(s) specific
3824# to that service. For example: %{my_service}adapt::sum_trs
3825#
3826# If SSL is enabled, the following formating codes become available:
3827#
3828# %ssl::>cert_subject The Subject field of the received client
3829# SSL certificate or a dash ('-') if Squid has
3830# received an invalid/malformed certificate or
3831# no certificate at all. Consider encoding the
3832# logged value because Subject often has spaces.
3833#
3834# %ssl::>cert_issuer The Issuer field of the received client
3835# SSL certificate or a dash ('-') if Squid has
3836# received an invalid/malformed certificate or
3837# no certificate at all. Consider encoding the
3838# logged value because Issuer often has spaces.
3839#
3840# The default formats available (which do not need re-defining) are:
3841#
3842#logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
3843#logformat common %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh
3844#logformat combined %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
3845#logformat referrer %ts.%03tu %>a %{Referer}>h %ru
3846#logformat useragent %>a [%tl] "%{User-Agent}>h"
3847#
3848# NOTE: When the log_mime_hdrs directive is set to ON.
3849# The squid, common and combined formats have a safely encoded copy
3850# of the mime headers appended to each line within a pair of brackets.
3851#
3852# NOTE: The common and combined formats are not quite true to the Apache definition.
3853# The logs from Squid contain an extra status and hierarchy code appended.
3854#
3855#Default:
3856# The format definitions squid, common, combined, referrer, useragent are built in.
3857
3858# TAG: access_log
3859# Configures whether and how Squid logs HTTP and ICP transactions.
3860# If access logging is enabled, a single line is logged for every
3861# matching HTTP or ICP request. The recommended directive formats are:
3862#
3863# access_log <module>:<place> [option ...] [acl acl ...]
3864# access_log none [acl acl ...]
3865#
3866# The following directive format is accepted but may be deprecated:
3867# access_log <module>:<place> [<logformat name> [acl acl ...]]
3868#
3869# In most cases, the first ACL name must not contain the '=' character
3870# and should not be equal to an existing logformat name. You can always
3871# start with an 'all' ACL to work around those restrictions.
3872#
3873# Will log to the specified module:place using the specified format (which
3874# must be defined in a logformat directive) those entries which match
3875# ALL the acl's specified (which must be defined in acl clauses).
3876# If no acl is specified, all requests will be logged to this destination.
3877#
3878# ===== Available options for the recommended directive format =====
3879#
3880# logformat=name Names log line format (either built-in or
3881# defined by a logformat directive). Defaults
3882# to 'squid'.
3883#
3884# buffer-size=64KB Defines approximate buffering limit for log
3885# records (see buffered_logs). Squid should not
3886# keep more than the specified size and, hence,
3887# should flush records before the buffer becomes
3888# full to avoid overflows under normal
3889# conditions (the exact flushing algorithm is
3890# module-dependent though). The on-error option
3891# controls overflow handling.
3892#
3893# on-error=die|drop Defines action on unrecoverable errors. The
3894# 'drop' action ignores (i.e., does not log)
3895# affected log records. The default 'die' action
3896# kills the affected worker. The drop action
3897# support has not been tested for modules other
3898# than tcp.
3899#
3900# ===== Modules Currently available =====
3901#
3902# none Do not log any requests matching these ACL.
3903# Do not specify Place or logformat name.
3904#
3905# stdio Write each log line to disk immediately at the completion of
3906# each request.
3907# Place: the filename and path to be written.
3908#
3909# daemon Very similar to stdio. But instead of writing to disk the log
3910# line is passed to a daemon helper for asychronous handling instead.
3911# Place: varies depending on the daemon.
3912#
3913# log_file_daemon Place: the file name and path to be written.
3914#
3915# syslog To log each request via syslog facility.
3916# Place: The syslog facility and priority level for these entries.
3917# Place Format: facility.priority
3918#
3919# where facility could be any of:
3920# authpriv, daemon, local0 ... local7 or user.
3921#
3922# And priority could be any of:
3923# err, warning, notice, info, debug.
3924#
3925# udp To send each log line as text data to a UDP receiver.
3926# Place: The destination host name or IP and port.
3927# Place Format: //host:port
3928#
3929# tcp To send each log line as text data to a TCP receiver.
3930# Lines may be accumulated before sending (see buffered_logs).
3931# Place: The destination host name or IP and port.
3932# Place Format: //host:port
3933#
3934# Default:
3935# access_log daemon:/var/log/squid/access.log squid
3936#Default:
3937# access_log daemon:/var/log/squid/access.log squid
3938
3939# TAG: icap_log
3940# ICAP log files record ICAP transaction summaries, one line per
3941# transaction.
3942#
3943# The icap_log option format is:
3944# icap_log <filepath> [<logformat name> [acl acl ...]]
3945# icap_log none [acl acl ...]]
3946#
3947# Please see access_log option documentation for details. The two
3948# kinds of logs share the overall configuration approach and many
3949# features.
3950#
3951# ICAP processing of a single HTTP message or transaction may
3952# require multiple ICAP transactions. In such cases, multiple
3953# ICAP transaction log lines will correspond to a single access
3954# log line.
3955#
3956# ICAP log uses logformat codes that make sense for an ICAP
3957# transaction. Header-related codes are applied to the HTTP header
3958# embedded in an ICAP server response, with the following caveats:
3959# For REQMOD, there is no HTTP response header unless the ICAP
3960# server performed request satisfaction. For RESPMOD, the HTTP
3961# request header is the header sent to the ICAP server. For
3962# OPTIONS, there are no HTTP headers.
3963#
3964# The following format codes are also available for ICAP logs:
3965#
3966# icap::<A ICAP server IP address. Similar to <A.
3967#
3968# icap::<service_name ICAP service name from the icap_service
3969# option in Squid configuration file.
3970#
3971# icap::ru ICAP Request-URI. Similar to ru.
3972#
3973# icap::rm ICAP request method (REQMOD, RESPMOD, or
3974# OPTIONS). Similar to existing rm.
3975#
3976# icap::>st Bytes sent to the ICAP server (TCP payload
3977# only; i.e., what Squid writes to the socket).
3978#
3979# icap::<st Bytes received from the ICAP server (TCP
3980# payload only; i.e., what Squid reads from
3981# the socket).
3982#
3983# icap::<bs Number of message body bytes received from the
3984# ICAP server. ICAP message body, if any, usually
3985# includes encapsulated HTTP message headers and
3986# possibly encapsulated HTTP message body. The
3987# HTTP body part is dechunked before its size is
3988# computed.
3989#
3990# icap::tr Transaction response time (in
3991# milliseconds). The timer starts when
3992# the ICAP transaction is created and
3993# stops when the transaction is completed.
3994# Similar to tr.
3995#
3996# icap::tio Transaction I/O time (in milliseconds). The
3997# timer starts when the first ICAP request
3998# byte is scheduled for sending. The timers
3999# stops when the last byte of the ICAP response
4000# is received.
4001#
4002# icap::to Transaction outcome: ICAP_ERR* for all
4003# transaction errors, ICAP_OPT for OPTION
4004# transactions, ICAP_ECHO for 204
4005# responses, ICAP_MOD for message
4006# modification, and ICAP_SAT for request
4007# satisfaction. Similar to Ss.
4008#
4009# icap::Hs ICAP response status code. Similar to Hs.
4010#
4011# icap::>h ICAP request header(s). Similar to >h.
4012#
4013# icap::<h ICAP response header(s). Similar to <h.
4014#
4015# The default ICAP log format, which can be used without an explicit
4016# definition, is called icap_squid:
4017#
4018#logformat icap_squid %ts.%03tu %6icap::tr %>a %icap::to/%03icap::Hs %icap::<size %icap::rm %icap::ru% %un -/%icap::<A -
4019#
4020# See also: logformat, log_icap, and %adapt::<last_h
4021#Default:
4022# none
4023
4024# TAG: logfile_daemon
4025# Specify the path to the logfile-writing daemon. This daemon is
4026# used to write the access and store logs, if configured.
4027#
4028# Squid sends a number of commands to the log daemon:
4029# L<data>\n - logfile data
4030# R\n - rotate file
4031# T\n - truncate file
4032# O\n - reopen file
4033# F\n - flush file
4034# r<n>\n - set rotate count to <n>
4035# b<n>\n - 1 = buffer output, 0 = don't buffer output
4036#
4037# No responses is expected.
4038#Default:
4039# logfile_daemon /usr/lib/squid/log_file_daemon
4040
4041# TAG: stats_collection allow|deny acl acl...
4042# This options allows you to control which requests gets accounted
4043# in performance counters.
4044#
4045# This clause only supports fast acl types.
4046# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4047#Default:
4048# Allow logging for all transactions.
4049
4050# TAG: cache_store_log
4051# Logs the activities of the storage manager. Shows which
4052# objects are ejected from the cache, and which objects are
4053# saved and for how long.
4054# There are not really utilities to analyze this data, so you can safely
4055# disable it (the default).
4056#
4057# Store log uses modular logging outputs. See access_log for the list
4058# of modules supported.
4059#
4060# Example:
4061# cache_store_log stdio:/var/log/squid/store.log
4062# cache_store_log daemon:/var/log/squid/store.log
4063#Default:
4064# none
4065
4066# TAG: cache_swap_state
4067# Location for the cache "swap.state" file. This index file holds
4068# the metadata of objects saved on disk. It is used to rebuild
4069# the cache during startup. Normally this file resides in each
4070# 'cache_dir' directory, but you may specify an alternate
4071# pathname here. Note you must give a full filename, not just
4072# a directory. Since this is the index for the whole object
4073# list you CANNOT periodically rotate it!
4074#
4075# If %s can be used in the file name it will be replaced with a
4076# a representation of the cache_dir name where each / is replaced
4077# with '.'. This is needed to allow adding/removing cache_dir
4078# lines when cache_swap_log is being used.
4079#
4080# If have more than one 'cache_dir', and %s is not used in the name
4081# these swap logs will have names such as:
4082#
4083# cache_swap_log.00
4084# cache_swap_log.01
4085# cache_swap_log.02
4086#
4087# The numbered extension (which is added automatically)
4088# corresponds to the order of the 'cache_dir' lines in this
4089# configuration file. If you change the order of the 'cache_dir'
4090# lines in this file, these index files will NOT correspond to
4091# the correct 'cache_dir' entry (unless you manually rename
4092# them). We recommend you do NOT use this option. It is
4093# better to keep these index files in each 'cache_dir' directory.
4094#Default:
4095# Store the journal inside its cache_dir
4096
4097# TAG: logfile_rotate
4098# Specifies the number of logfile rotations to make when you
4099# type 'squid -k rotate'. The default is 10, which will rotate
4100# with extensions 0 through 9. Setting logfile_rotate to 0 will
4101# disable the file name rotation, but the logfiles are still closed
4102# and re-opened. This will enable you to rename the logfiles
4103# yourself just before sending the rotate signal.
4104#
4105# Note, the 'squid -k rotate' command normally sends a USR1
4106# signal to the running squid process. In certain situations
4107# (e.g. on Linux with Async I/O), USR1 is used for other
4108# purposes, so -k rotate uses another signal. It is best to get
4109# in the habit of using 'squid -k rotate' instead of 'kill -USR1
4110# <pid>'.
4111#
4112# Note, from Squid-3.1 this option is only a default for cache.log,
4113# that log can be rotated separately by using debug_options.
4114#
4115# Note2, for Debian/Linux the default of logfile_rotate is
4116# zero, since it includes external logfile-rotation methods.
4117#Default:
4118# logfile_rotate 0
4119
4120# TAG: mime_table
4121# Path to Squid's icon configuration file.
4122#
4123# You shouldn't need to change this, but the default file contains
4124# examples and formatting information if you do.
4125#Default:
4126# mime_table /usr/share/squid/mime.conf
4127
4128# TAG: log_mime_hdrs on|off
4129# The Cache can record both the request and the response MIME
4130# headers for each HTTP transaction. The headers are encoded
4131# safely and will appear as two bracketed fields at the end of
4132# the access log (for either the native or httpd-emulated log
4133# formats). To enable this logging set log_mime_hdrs to 'on'.
4134#Default:
4135# log_mime_hdrs off
4136
4137# TAG: pid_filename
4138# A filename to write the process-id to. To disable, enter "none".
4139#Default:
4140# pid_filename /var/run/squid.pid
4141
4142# TAG: client_netmask
4143# A netmask for client addresses in logfiles and cachemgr output.
4144# Change this to protect the privacy of your cache clients.
4145# A netmask of 255.255.255.0 will log all IP's in that range with
4146# the last digit set to '0'.
4147#Default:
4148# Log full client IP address
4149
4150# TAG: strip_query_terms
4151# By default, Squid strips query terms from requested URLs before
4152# logging. This protects your user's privacy and reduces log size.
4153#
4154# When investigating HIT/MISS or other caching behaviour you
4155# will need to disable this to see the full URL used by Squid.
4156#Default:
4157# strip_query_terms on
4158
4159# TAG: buffered_logs on|off
4160# Whether to write/send access_log records ASAP or accumulate them and
4161# then write/send them in larger chunks. Buffering may improve
4162# performance because it decreases the number of I/Os. However,
4163# buffering increases the delay before log records become available to
4164# the final recipient (e.g., a disk file or logging daemon) and,
4165# hence, increases the risk of log records loss.
4166#
4167# Note that even when buffered_logs are off, Squid may have to buffer
4168# records if it cannot write/send them immediately due to pending I/Os
4169# (e.g., the I/O writing the previous log record) or connectivity loss.
4170#
4171# Currently honored by 'daemon' and 'tcp' access_log modules only.
4172#Default:
4173# buffered_logs off
4174
4175# TAG: netdb_filename
4176# Where Squid stores it's netdb journal.
4177# When enabled this journal preserves netdb state between restarts.
4178#
4179# To disable, enter "none".
4180#Default:
4181# netdb_filename stdio:/var/log/squid/netdb.state
4182
4183# OPTIONS FOR TROUBLESHOOTING
4184# -----------------------------------------------------------------------------
4185
4186# TAG: cache_log
4187# Squid administrative logging file.
4188#
4189# This is where general information about Squid behavior goes. You can
4190# increase the amount of data logged to this file and how often it is
4191# rotated with "debug_options"
4192#Default:
4193# cache_log /var/log/squid/cache.log
4194
4195# TAG: debug_options
4196# Logging options are set as section,level where each source file
4197# is assigned a unique section. Lower levels result in less
4198# output, Full debugging (level 9) can result in a very large
4199# log file, so be careful.
4200#
4201# The magic word "ALL" sets debugging levels for all sections.
4202# The default is to run with "ALL,1" to record important warnings.
4203#
4204# The rotate=N option can be used to keep more or less of these logs
4205# than would otherwise be kept by logfile_rotate.
4206# For most uses a single log should be enough to monitor current
4207# events affecting Squid.
4208#Default:
4209# Log all critical and important messages.
4210
4211# TAG: coredump_dir
4212# By default Squid leaves core files in the directory from where
4213# it was started. If you set 'coredump_dir' to a directory
4214# that exists, Squid will chdir() to that directory at startup
4215# and coredump files will be left there.
4216#
4217#Default:
4218# Use the directory from where Squid was started.
4219#
4220
4221# Leave coredumps in the first cache dir
4222coredump_dir /var/spool/squid
4223
4224# OPTIONS FOR FTP GATEWAYING
4225# -----------------------------------------------------------------------------
4226
4227# TAG: ftp_user
4228# If you want the anonymous login password to be more informative
4229# (and enable the use of picky FTP servers), set this to something
4230# reasonable for your domain, like wwwuser@somewhere.net
4231#
4232# The reason why this is domainless by default is the
4233# request can be made on the behalf of a user in any domain,
4234# depending on how the cache is used.
4235# Some FTP server also validate the email address is valid
4236# (for example perl.com).
4237#Default:
4238# ftp_user Squid@
4239
4240# TAG: ftp_passive
4241# If your firewall does not allow Squid to use passive
4242# connections, turn off this option.
4243#
4244# Use of ftp_epsv_all option requires this to be ON.
4245#Default:
4246# ftp_passive on
4247
4248# TAG: ftp_epsv_all
4249# FTP Protocol extensions permit the use of a special "EPSV ALL" command.
4250#
4251# NATs may be able to put the connection on a "fast path" through the
4252# translator, as the EPRT command will never be used and therefore,
4253# translation of the data portion of the segments will never be needed.
4254#
4255# When a client only expects to do two-way FTP transfers this may be
4256# useful.
4257# If squid finds that it must do a three-way FTP transfer after issuing
4258# an EPSV ALL command, the FTP session will fail.
4259#
4260# If you have any doubts about this option do not use it.
4261# Squid will nicely attempt all other connection methods.
4262#
4263# Requires ftp_passive to be ON (default) for any effect.
4264#Default:
4265# ftp_epsv_all off
4266
4267# TAG: ftp_epsv
4268# FTP Protocol extensions permit the use of a special "EPSV" command.
4269#
4270# NATs may be able to put the connection on a "fast path" through the
4271# translator using EPSV, as the EPRT command will never be used
4272# and therefore, translation of the data portion of the segments
4273# will never be needed.
4274#
4275# EPSV is often required to interoperate with FTP servers on IPv6
4276# networks. On the other hand, it may break some IPv4 servers.
4277#
4278# By default, EPSV may try EPSV with any FTP server. To fine tune
4279# that decision, you may restrict EPSV to certain clients or servers
4280# using ACLs:
4281#
4282# ftp_epsv allow|deny al1 acl2 ...
4283#
4284# WARNING: Disabling EPSV may cause problems with external NAT and IPv6.
4285#
4286# Only fast ACLs are supported.
4287# Requires ftp_passive to be ON (default) for any effect.
4288#Default:
4289# none
4290
4291# TAG: ftp_eprt
4292# FTP Protocol extensions permit the use of a special "EPRT" command.
4293#
4294# This extension provides a protocol neutral alternative to the
4295# IPv4-only PORT command. When supported it enables active FTP data
4296# channels over IPv6 and efficient NAT handling.
4297#
4298# Turning this OFF will prevent EPRT being attempted and will skip
4299# straight to using PORT for IPv4 servers.
4300#
4301# Some devices are known to not handle this extension correctly and
4302# may result in crashes. Devices which suport EPRT enough to fail
4303# cleanly will result in Squid attempting PORT anyway. This directive
4304# should only be disabled when EPRT results in device failures.
4305#
4306# WARNING: Doing so will convert Squid back to the old behavior with all
4307# the related problems with external NAT devices/layers and IPv4-only FTP.
4308#Default:
4309# ftp_eprt on
4310
4311# TAG: ftp_sanitycheck
4312# For security and data integrity reasons Squid by default performs
4313# sanity checks of the addresses of FTP data connections ensure the
4314# data connection is to the requested server. If you need to allow
4315# FTP connections to servers using another IP address for the data
4316# connection turn this off.
4317#Default:
4318# ftp_sanitycheck on
4319
4320# TAG: ftp_telnet_protocol
4321# The FTP protocol is officially defined to use the telnet protocol
4322# as transport channel for the control connection. However, many
4323# implementations are broken and does not respect this aspect of
4324# the FTP protocol.
4325#
4326# If you have trouble accessing files with ASCII code 255 in the
4327# path or similar problems involving this ASCII code you can
4328# try setting this directive to off. If that helps, report to the
4329# operator of the FTP server in question that their FTP server
4330# is broken and does not follow the FTP standard.
4331#Default:
4332# ftp_telnet_protocol on
4333
4334# OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
4335# -----------------------------------------------------------------------------
4336
4337# TAG: diskd_program
4338# Specify the location of the diskd executable.
4339# Note this is only useful if you have compiled in
4340# diskd as one of the store io modules.
4341#Default:
4342# diskd_program /usr/lib/squid/diskd
4343
4344# TAG: unlinkd_program
4345# Specify the location of the executable for file deletion process.
4346#Default:
4347# unlinkd_program /usr/lib/squid/unlinkd
4348
4349# TAG: pinger_program
4350# Specify the location of the executable for the pinger process.
4351#Default:
4352# pinger_program /usr/lib/squid/pinger
4353
4354# TAG: pinger_enable
4355# Control whether the pinger is active at run-time.
4356# Enables turning ICMP pinger on and off with a simple
4357# squid -k reconfigure.
4358#Default:
4359# pinger_enable on
4360
4361# OPTIONS FOR URL REWRITING
4362# -----------------------------------------------------------------------------
4363
4364# TAG: url_rewrite_program
4365# Specify the location of the executable URL rewriter to use.
4366# Since they can perform almost any function there isn't one included.
4367#
4368# For each requested URL, the rewriter will receive on line with the format
4369#
4370# [channel-ID <SP>] URL [<SP> extras]<NL>
4371#
4372# See url_rewrite_extras on how to send "extras" with optional values to
4373# the helper.
4374# After processing the request the helper must reply using the following format:
4375#
4376# [channel-ID <SP>] result [<SP> kv-pairs]
4377#
4378# The result code can be:
4379#
4380# OK status=30N url="..."
4381# Redirect the URL to the one supplied in 'url='.
4382# 'status=' is optional and contains the status code to send
4383# the client in Squids HTTP response. It must be one of the
4384# HTTP redirect status codes: 301, 302, 303, 307, 308.
4385# When no status is given Squid will use 302.
4386#
4387# OK rewrite-url="..."
4388# Rewrite the URL to the one supplied in 'rewrite-url='.
4389# The new URL is fetched directly by Squid and returned to
4390# the client as the response to its request.
4391#
4392# OK
4393# When neither of url= and rewrite-url= are sent Squid does
4394# not change the URL.
4395#
4396# ERR
4397# Do not change the URL.
4398#
4399# BH
4400# An internal error occurred in the helper, preventing
4401# a result being identified. The 'message=' key name is
4402# reserved for delivering a log message.
4403#
4404#
4405# In addition to the above kv-pairs Squid also understands the following
4406# optional kv-pairs received from URL rewriters:
4407# clt_conn_tag=TAG
4408# Associates a TAG with the client TCP connection.
4409# The TAG is treated as a regular annotation but persists across
4410# future requests on the client connection rather than just the
4411# current request. A helper may update the TAG during subsequent
4412# requests be returning a new kv-pair.
4413#
4414# When using the concurrency= option the protocol is changed by
4415# introducing a query channel tag in front of the request/response.
4416# The query channel tag is a number between 0 and concurrency-1.
4417# This value must be echoed back unchanged to Squid as the first part
4418# of the response relating to its request.
4419#
4420# WARNING: URL re-writing ability should be avoided whenever possible.
4421# Use the URL redirect form of response instead.
4422#
4423# Re-write creates a difference in the state held by the client
4424# and server. Possibly causing confusion when the server response
4425# contains snippets of its view state. Embeded URLs, response
4426# and content Location headers, etc. are not re-written by this
4427# interface.
4428#
4429# By default, a URL rewriter is not used.
4430#Default:
4431# none
4432
4433# TAG: url_rewrite_children
4434# The maximum number of redirector processes to spawn. If you limit
4435# it too few Squid will have to wait for them to process a backlog of
4436# URLs, slowing it down. If you allow too many they will use RAM
4437# and other system resources noticably.
4438#
4439# The startup= and idle= options allow some measure of skew in your
4440# tuning.
4441#
4442# startup=
4443#
4444# Sets a minimum of how many processes are to be spawned when Squid
4445# starts or reconfigures. When set to zero the first request will
4446# cause spawning of the first child process to handle it.
4447#
4448# Starting too few will cause an initial slowdown in traffic as Squid
4449# attempts to simultaneously spawn enough processes to cope.
4450#
4451# idle=
4452#
4453# Sets a minimum of how many processes Squid is to try and keep available
4454# at all times. When traffic begins to rise above what the existing
4455# processes can handle this many more will be spawned up to the maximum
4456# configured. A minimum setting of 1 is required.
4457#
4458# concurrency=
4459#
4460# The number of requests each redirector helper can handle in
4461# parallel. Defaults to 0 which indicates the redirector
4462# is a old-style single threaded redirector.
4463#
4464# When this directive is set to a value >= 1 then the protocol
4465# used to communicate with the helper is modified to include
4466# an ID in front of the request/response. The ID from the request
4467# must be echoed back with the response to that request.
4468#Default:
4469# url_rewrite_children 20 startup=0 idle=1 concurrency=0
4470
4471# TAG: url_rewrite_host_header
4472# To preserve same-origin security policies in browsers and
4473# prevent Host: header forgery by redirectors Squid rewrites
4474# any Host: header in redirected requests.
4475#
4476# If you are running an accelerator this may not be a wanted
4477# effect of a redirector. This directive enables you disable
4478# Host: alteration in reverse-proxy traffic.
4479#
4480# WARNING: Entries are cached on the result of the URL rewriting
4481# process, so be careful if you have domain-virtual hosts.
4482#
4483# WARNING: Squid and other software verifies the URL and Host
4484# are matching, so be careful not to relay through other proxies
4485# or inspecting firewalls with this disabled.
4486#Default:
4487# url_rewrite_host_header on
4488
4489# TAG: url_rewrite_access
4490# If defined, this access list specifies which requests are
4491# sent to the redirector processes.
4492#
4493# This clause supports both fast and slow acl types.
4494# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4495#Default:
4496# Allow, unless rules exist in squid.conf.
4497
4498# TAG: url_rewrite_bypass
4499# When this is 'on', a request will not go through the
4500# redirector if all the helpers are busy. If this is 'off'
4501# and the redirector queue grows too large, Squid will exit
4502# with a FATAL error and ask you to increase the number of
4503# redirectors. You should only enable this if the redirectors
4504# are not critical to your caching system. If you use
4505# redirectors for access control, and you enable this option,
4506# users may have access to pages they should not
4507# be allowed to request.
4508#Default:
4509# url_rewrite_bypass off
4510
4511# TAG: url_rewrite_extras
4512# Specifies a string to be append to request line format for the
4513# rewriter helper. "Quoted" format values may contain spaces and
4514# logformat %macros. In theory, any logformat %macro can be used.
4515# In practice, a %macro expands as a dash (-) if the helper request is
4516# sent before the required macro information is available to Squid.
4517#Default:
4518# url_rewrite_extras "%>a/%>A %un %>rm myip=%la myport=%lp"
4519
4520# OPTIONS FOR STORE ID
4521# -----------------------------------------------------------------------------
4522
4523# TAG: store_id_program
4524# Specify the location of the executable StoreID helper to use.
4525# Since they can perform almost any function there isn't one included.
4526#
4527# For each requested URL, the helper will receive one line with the format
4528#
4529# [channel-ID <SP>] URL [<SP> extras]<NL>
4530#
4531#
4532# After processing the request the helper must reply using the following format:
4533#
4534# [channel-ID <SP>] result [<SP> kv-pairs]
4535#
4536# The result code can be:
4537#
4538# OK store-id="..."
4539# Use the StoreID supplied in 'store-id='.
4540#
4541# ERR
4542# The default is to use HTTP request URL as the store ID.
4543#
4544# BH
4545# An internal error occured in the helper, preventing
4546# a result being identified.
4547#
4548# In addition to the above kv-pairs Squid also understands the following
4549# optional kv-pairs received from URL rewriters:
4550# clt_conn_tag=TAG
4551# Associates a TAG with the client TCP connection.
4552# Please see url_rewrite_program related documentation for this
4553# kv-pair
4554#
4555# Helper programs should be prepared to receive and possibly ignore
4556# additional whitespace-separated tokens on each input line.
4557#
4558# When using the concurrency= option the protocol is changed by
4559# introducing a query channel tag in front of the request/response.
4560# The query channel tag is a number between 0 and concurrency-1.
4561# This value must be echoed back unchanged to Squid as the first part
4562# of the response relating to its request.
4563#
4564# NOTE: when using StoreID refresh_pattern will apply to the StoreID
4565# returned from the helper and not the URL.
4566#
4567# WARNING: Wrong StoreID value returned by a careless helper may result
4568# in the wrong cached response returned to the user.
4569#
4570# By default, a StoreID helper is not used.
4571#Default:
4572# none
4573
4574# TAG: store_id_extras
4575# Specifies a string to be append to request line format for the
4576# StoreId helper. "Quoted" format values may contain spaces and
4577# logformat %macros. In theory, any logformat %macro can be used.
4578# In practice, a %macro expands as a dash (-) if the helper request is
4579# sent before the required macro information is available to Squid.
4580#Default:
4581# store_id_extras "%>a/%>A %un %>rm myip=%la myport=%lp"
4582
4583# TAG: store_id_children
4584# The maximum number of StoreID helper processes to spawn. If you limit
4585# it too few Squid will have to wait for them to process a backlog of
4586# requests, slowing it down. If you allow too many they will use RAM
4587# and other system resources noticably.
4588#
4589# The startup= and idle= options allow some measure of skew in your
4590# tuning.
4591#
4592# startup=
4593#
4594# Sets a minimum of how many processes are to be spawned when Squid
4595# starts or reconfigures. When set to zero the first request will
4596# cause spawning of the first child process to handle it.
4597#
4598# Starting too few will cause an initial slowdown in traffic as Squid
4599# attempts to simultaneously spawn enough processes to cope.
4600#
4601# idle=
4602#
4603# Sets a minimum of how many processes Squid is to try and keep available
4604# at all times. When traffic begins to rise above what the existing
4605# processes can handle this many more will be spawned up to the maximum
4606# configured. A minimum setting of 1 is required.
4607#
4608# concurrency=
4609#
4610# The number of requests each storeID helper can handle in
4611# parallel. Defaults to 0 which indicates the helper
4612# is a old-style single threaded program.
4613#
4614# When this directive is set to a value >= 1 then the protocol
4615# used to communicate with the helper is modified to include
4616# an ID in front of the request/response. The ID from the request
4617# must be echoed back with the response to that request.
4618#Default:
4619# store_id_children 20 startup=0 idle=1 concurrency=0
4620
4621# TAG: store_id_access
4622# If defined, this access list specifies which requests are
4623# sent to the StoreID processes. By default all requests
4624# are sent.
4625#
4626# This clause supports both fast and slow acl types.
4627# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4628#Default:
4629# Allow, unless rules exist in squid.conf.
4630
4631# TAG: store_id_bypass
4632# When this is 'on', a request will not go through the
4633# helper if all helpers are busy. If this is 'off'
4634# and the helper queue grows too large, Squid will exit
4635# with a FATAL error and ask you to increase the number of
4636# helpers. You should only enable this if the helperss
4637# are not critical to your caching system. If you use
4638# helpers for critical caching components, and you enable this
4639# option, users may not get objects from cache.
4640#Default:
4641# store_id_bypass on
4642
4643# OPTIONS FOR TUNING THE CACHE
4644# -----------------------------------------------------------------------------
4645
4646# TAG: cache
4647# Requests denied by this directive will not be served from the cache
4648# and their responses will not be stored in the cache. This directive
4649# has no effect on other transactions and on already cached responses.
4650#
4651# This clause supports both fast and slow acl types.
4652# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4653#
4654# This and the two other similar caching directives listed below are
4655# checked at different transaction processing stages, have different
4656# access to response information, affect different cache operations,
4657# and differ in slow ACLs support:
4658#
4659# * cache: Checked before Squid makes a hit/miss determination.
4660# No access to reply information!
4661# Denies both serving a hit and storing a miss.
4662# Supports both fast and slow ACLs.
4663# * send_hit: Checked after a hit was detected.
4664# Has access to reply (hit) information.
4665# Denies serving a hit only.
4666# Supports fast ACLs only.
4667# * store_miss: Checked before storing a cachable miss.
4668# Has access to reply (miss) information.
4669# Denies storing a miss only.
4670# Supports fast ACLs only.
4671#
4672# If you are not sure which of the three directives to use, apply the
4673# following decision logic:
4674#
4675# * If your ACL(s) are of slow type _and_ need response info, redesign.
4676# Squid does not support that particular combination at this time.
4677# Otherwise:
4678# * If your directive ACL(s) are of slow type, use "cache"; and/or
4679# * if your directive ACL(s) need no response info, use "cache".
4680# Otherwise:
4681# * If you do not want the response cached, use store_miss; and/or
4682# * if you do not want a hit on a cached response, use send_hit.
4683#Default:
4684# By default, this directive is unused and has no effect.
4685
4686# TAG: send_hit
4687# Responses denied by this directive will not be served from the cache
4688# (but may still be cached, see store_miss). This directive has no
4689# effect on the responses it allows and on the cached objects.
4690#
4691# Please see the "cache" directive for a summary of differences among
4692# store_miss, send_hit, and cache directives.
4693#
4694# Unlike the "cache" directive, send_hit only supports fast acl
4695# types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4696#
4697# For example:
4698#
4699# # apply custom Store ID mapping to some URLs
4700# acl MapMe dstdomain .c.example.com
4701# store_id_program ...
4702# store_id_access allow MapMe
4703#
4704# # but prevent caching of special responses
4705# # such as 302 redirects that cause StoreID loops
4706# acl Ordinary http_status 200-299
4707# store_miss deny MapMe !Ordinary
4708#
4709# # and do not serve any previously stored special responses
4710# # from the cache (in case they were already cached before
4711# # the above store_miss rule was in effect).
4712# send_hit deny MapMe !Ordinary
4713#Default:
4714# By default, this directive is unused and has no effect.
4715
4716# TAG: store_miss
4717# Responses denied by this directive will not be cached (but may still
4718# be served from the cache, see send_hit). This directive has no
4719# effect on the responses it allows and on the already cached responses.
4720#
4721# Please see the "cache" directive for a summary of differences among
4722# store_miss, send_hit, and cache directives. See the
4723# send_hit directive for a usage example.
4724#
4725# Unlike the "cache" directive, store_miss only supports fast acl
4726# types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4727#Default:
4728# By default, this directive is unused and has no effect.
4729
4730# TAG: max_stale time-units
4731# This option puts an upper limit on how stale content Squid
4732# will serve from the cache if cache validation fails.
4733# Can be overriden by the refresh_pattern max-stale option.
4734#Default:
4735# max_stale 1 week
4736
4737# TAG: refresh_pattern
4738# usage: refresh_pattern [-i] regex min percent max [options]
4739#
4740# By default, regular expressions are CASE-SENSITIVE. To make
4741# them case-insensitive, use the -i option.
4742#
4743# 'Min' is the time (in minutes) an object without an explicit
4744# expiry time should be considered fresh. The recommended
4745# value is 0, any higher values may cause dynamic applications
4746# to be erroneously cached unless the application designer
4747# has taken the appropriate actions.
4748#
4749# 'Percent' is a percentage of the objects age (time since last
4750# modification age) an object without explicit expiry time
4751# will be considered fresh.
4752#
4753# 'Max' is an upper limit on how long objects without an explicit
4754# expiry time will be considered fresh.
4755#
4756# options: override-expire
4757# override-lastmod
4758# reload-into-ims
4759# ignore-reload
4760# ignore-no-store
4761# ignore-must-revalidate
4762# ignore-private
4763# ignore-auth
4764# max-stale=NN
4765# refresh-ims
4766# store-stale
4767#
4768# override-expire enforces min age even if the server
4769# sent an explicit expiry time (e.g., with the
4770# Expires: header or Cache-Control: max-age). Doing this
4771# VIOLATES the HTTP standard. Enabling this feature
4772# could make you liable for problems which it causes.
4773#
4774# Note: override-expire does not enforce staleness - it only extends
4775# freshness / min. If the server returns a Expires time which
4776# is longer than your max time, Squid will still consider
4777# the object fresh for that period of time.
4778#
4779# override-lastmod enforces min age even on objects
4780# that were modified recently.
4781#
4782# reload-into-ims changes a client no-cache or ``reload''
4783# request for a cached entry into a conditional request using
4784# If-Modified-Since and/or If-None-Match headers, provided the
4785# cached entry has a Last-Modified and/or a strong ETag header.
4786# Doing this VIOLATES the HTTP standard. Enabling this feature
4787# could make you liable for problems which it causes.
4788#
4789# ignore-reload ignores a client no-cache or ``reload''
4790# header. Doing this VIOLATES the HTTP standard. Enabling
4791# this feature could make you liable for problems which
4792# it causes.
4793#
4794# ignore-no-store ignores any ``Cache-control: no-store''
4795# headers received from a server. Doing this VIOLATES
4796# the HTTP standard. Enabling this feature could make you
4797# liable for problems which it causes.
4798#
4799# ignore-must-revalidate ignores any ``Cache-Control: must-revalidate``
4800# headers received from a server. Doing this VIOLATES
4801# the HTTP standard. Enabling this feature could make you
4802# liable for problems which it causes.
4803#
4804# ignore-private ignores any ``Cache-control: private''
4805# headers received from a server. Doing this VIOLATES
4806# the HTTP standard. Enabling this feature could make you
4807# liable for problems which it causes.
4808#
4809# ignore-auth caches responses to requests with authorization,
4810# as if the originserver had sent ``Cache-control: public''
4811# in the response header. Doing this VIOLATES the HTTP standard.
4812# Enabling this feature could make you liable for problems which
4813# it causes.
4814#
4815# refresh-ims causes squid to contact the origin server
4816# when a client issues an If-Modified-Since request. This
4817# ensures that the client will receive an updated version
4818# if one is available.
4819#
4820# store-stale stores responses even if they don't have explicit
4821# freshness or a validator (i.e., Last-Modified or an ETag)
4822# present, or if they're already stale. By default, Squid will
4823# not cache such responses because they usually can't be
4824# reused. Note that such responses will be stale by default.
4825#
4826# max-stale=NN provide a maximum staleness factor. Squid won't
4827# serve objects more stale than this even if it failed to
4828# validate the object. Default: use the max_stale global limit.
4829#
4830# Basically a cached object is:
4831#
4832# FRESH if expire > now, else STALE
4833# STALE if age > max
4834# FRESH if lm-factor < percent, else STALE
4835# FRESH if age < min
4836# else STALE
4837#
4838# The refresh_pattern lines are checked in the order listed here.
4839# The first entry which matches is used. If none of the entries
4840# match the default will be used.
4841#
4842# Note, you must uncomment all the default lines if you want
4843# to change one. The default setting is only active if none is
4844# used.
4845#
4846#
4847
4848#
4849# Add any of your own refresh_pattern entries above these.
4850#
4851refresh_pattern ^ftp: 1440 20% 10080
4852refresh_pattern ^gopher: 1440 0% 1440
4853refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
4854refresh_pattern . 0 20% 4320
4855
4856# TAG: quick_abort_min (KB)
4857#Default:
4858# quick_abort_min 16 KB
4859
4860# TAG: quick_abort_max (KB)
4861#Default:
4862# quick_abort_max 16 KB
4863
4864# TAG: quick_abort_pct (percent)
4865# The cache by default continues downloading aborted requests
4866# which are almost completed (less than 16 KB remaining). This
4867# may be undesirable on slow (e.g. SLIP) links and/or very busy
4868# caches. Impatient users may tie up file descriptors and
4869# bandwidth by repeatedly requesting and immediately aborting
4870# downloads.
4871#
4872# When the user aborts a request, Squid will check the
4873# quick_abort values to the amount of data transferred until
4874# then.
4875#
4876# If the transfer has less than 'quick_abort_min' KB remaining,
4877# it will finish the retrieval.
4878#
4879# If the transfer has more than 'quick_abort_max' KB remaining,
4880# it will abort the retrieval.
4881#
4882# If more than 'quick_abort_pct' of the transfer has completed,
4883# it will finish the retrieval.
4884#
4885# If you do not want any retrieval to continue after the client
4886# has aborted, set both 'quick_abort_min' and 'quick_abort_max'
4887# to '0 KB'.
4888#
4889# If you want retrievals to always continue if they are being
4890# cached set 'quick_abort_min' to '-1 KB'.
4891#Default:
4892# quick_abort_pct 95
4893
4894# TAG: read_ahead_gap buffer-size
4895# The amount of data the cache will buffer ahead of what has been
4896# sent to the client when retrieving an object from another server.
4897#Default:
4898# read_ahead_gap 16 KB
4899
4900# TAG: negative_ttl time-units
4901# Set the Default Time-to-Live (TTL) for failed requests.
4902# Certain types of failures (such as "connection refused" and
4903# "404 Not Found") are able to be negatively-cached for a short time.
4904# Modern web servers should provide Expires: header, however if they
4905# do not this can provide a minimum TTL.
4906# The default is not to cache errors with unknown expiry details.
4907#
4908# Note that this is different from negative caching of DNS lookups.
4909#
4910# WARNING: Doing this VIOLATES the HTTP standard. Enabling
4911# this feature could make you liable for problems which it
4912# causes.
4913#Default:
4914# negative_ttl 0 seconds
4915
4916# TAG: positive_dns_ttl time-units
4917# Upper limit on how long Squid will cache positive DNS responses.
4918# Default is 6 hours (360 minutes). This directive must be set
4919# larger than negative_dns_ttl.
4920#Default:
4921# positive_dns_ttl 6 hours
4922
4923# TAG: negative_dns_ttl time-units
4924# Time-to-Live (TTL) for negative caching of failed DNS lookups.
4925# This also sets the lower cache limit on positive lookups.
4926# Minimum value is 1 second, and it is not recommendable to go
4927# much below 10 seconds.
4928#Default:
4929# negative_dns_ttl 1 minutes
4930
4931# TAG: range_offset_limit size [acl acl...]
4932# usage: (size) [units] [[!]aclname]
4933#
4934# Sets an upper limit on how far (number of bytes) into the file
4935# a Range request may be to cause Squid to prefetch the whole file.
4936# If beyond this limit, Squid forwards the Range request as it is and
4937# the result is NOT cached.
4938#
4939# This is to stop a far ahead range request (lets say start at 17MB)
4940# from making Squid fetch the whole object up to that point before
4941# sending anything to the client.
4942#
4943# Multiple range_offset_limit lines may be specified, and they will
4944# be searched from top to bottom on each request until a match is found.
4945# The first match found will be used. If no line matches a request, the
4946# default limit of 0 bytes will be used.
4947#
4948# 'size' is the limit specified as a number of units.
4949#
4950# 'units' specifies whether to use bytes, KB, MB, etc.
4951# If no units are specified bytes are assumed.
4952#
4953# A size of 0 causes Squid to never fetch more than the
4954# client requested. (default)
4955#
4956# A size of 'none' causes Squid to always fetch the object from the
4957# beginning so it may cache the result. (2.0 style)
4958#
4959# 'aclname' is the name of a defined ACL.
4960#
4961# NP: Using 'none' as the byte value here will override any quick_abort settings
4962# that may otherwise apply to the range request. The range request will
4963# be fully fetched from start to finish regardless of the client
4964# actions. This affects bandwidth usage.
4965#Default:
4966# none
4967
4968# TAG: minimum_expiry_time (seconds)
4969# The minimum caching time according to (Expires - Date)
4970# headers Squid honors if the object can't be revalidated.
4971# The default is 60 seconds.
4972#
4973# In reverse proxy environments it might be desirable to honor
4974# shorter object lifetimes. It is most likely better to make
4975# your server return a meaningful Last-Modified header however.
4976#
4977# In ESI environments where page fragments often have short
4978# lifetimes, this will often be best set to 0.
4979#Default:
4980# minimum_expiry_time 60 seconds
4981
4982# TAG: store_avg_object_size (bytes)
4983# Average object size, used to estimate number of objects your
4984# cache can hold. The default is 13 KB.
4985#
4986# This is used to pre-seed the cache index memory allocation to
4987# reduce expensive reallocate operations while handling clients
4988# traffic. Too-large values may result in memory allocation during
4989# peak traffic, too-small values will result in wasted memory.
4990#
4991# Check the cache manager 'info' report metrics for the real
4992# object sizes seen by your Squid before tuning this.
4993#Default:
4994# store_avg_object_size 13 KB
4995
4996# TAG: store_objects_per_bucket
4997# Target number of objects per bucket in the store hash table.
4998# Lowering this value increases the total number of buckets and
4999# also the storage maintenance rate. The default is 20.
5000#Default:
5001# store_objects_per_bucket 20
5002
5003# HTTP OPTIONS
5004# -----------------------------------------------------------------------------
5005
5006# TAG: request_header_max_size (KB)
5007# This specifies the maximum size for HTTP headers in a request.
5008# Request headers are usually relatively small (about 512 bytes).
5009# Placing a limit on the request header size will catch certain
5010# bugs (for example with persistent connections) and possibly
5011# buffer-overflow or denial-of-service attacks.
5012#Default:
5013# request_header_max_size 64 KB
5014
5015# TAG: reply_header_max_size (KB)
5016# This specifies the maximum size for HTTP headers in a reply.
5017# Reply headers are usually relatively small (about 512 bytes).
5018# Placing a limit on the reply header size will catch certain
5019# bugs (for example with persistent connections) and possibly
5020# buffer-overflow or denial-of-service attacks.
5021#Default:
5022# reply_header_max_size 64 KB
5023
5024# TAG: request_body_max_size (bytes)
5025# This specifies the maximum size for an HTTP request body.
5026# In other words, the maximum size of a PUT/POST request.
5027# A user who attempts to send a request with a body larger
5028# than this limit receives an "Invalid Request" error message.
5029# If you set this parameter to a zero (the default), there will
5030# be no limit imposed.
5031#
5032# See also client_request_buffer_max_size for an alternative
5033# limitation on client uploads which can be configured.
5034#Default:
5035# No limit.
5036
5037# TAG: client_request_buffer_max_size (bytes)
5038# This specifies the maximum buffer size of a client request.
5039# It prevents squid eating too much memory when somebody uploads
5040# a large file.
5041#Default:
5042# client_request_buffer_max_size 512 KB
5043
5044# TAG: broken_posts
5045# A list of ACL elements which, if matched, causes Squid to send
5046# an extra CRLF pair after the body of a PUT/POST request.
5047#
5048# Some HTTP servers has broken implementations of PUT/POST,
5049# and rely on an extra CRLF pair sent by some WWW clients.
5050#
5051# Quote from RFC2616 section 4.1 on this matter:
5052#
5053# Note: certain buggy HTTP/1.0 client implementations generate an
5054# extra CRLF's after a POST request. To restate what is explicitly
5055# forbidden by the BNF, an HTTP/1.1 client must not preface or follow
5056# a request with an extra CRLF.
5057#
5058# This clause only supports fast acl types.
5059# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5060#
5061#Example:
5062# acl buggy_server url_regex ^http://....
5063# broken_posts allow buggy_server
5064#Default:
5065# Obey RFC 2616.
5066
5067# TAG: adaptation_uses_indirect_client on|off
5068# Controls whether the indirect client IP address (instead of the direct
5069# client IP address) is passed to adaptation services.
5070#
5071# See also: follow_x_forwarded_for adaptation_send_client_ip
5072#Default:
5073# adaptation_uses_indirect_client on
5074
5075# TAG: via on|off
5076# If set (default), Squid will include a Via header in requests and
5077# replies as required by RFC2616.
5078#Default:
5079# via on
5080
5081# TAG: ie_refresh on|off
5082# Microsoft Internet Explorer up until version 5.5 Service
5083# Pack 1 has an issue with transparent proxies, wherein it
5084# is impossible to force a refresh. Turning this on provides
5085# a partial fix to the problem, by causing all IMS-REFRESH
5086# requests from older IE versions to check the origin server
5087# for fresh content. This reduces hit ratio by some amount
5088# (~10% in my experience), but allows users to actually get
5089# fresh content when they want it. Note because Squid
5090# cannot tell if the user is using 5.5 or 5.5SP1, the behavior
5091# of 5.5 is unchanged from old versions of Squid (i.e. a
5092# forced refresh is impossible). Newer versions of IE will,
5093# hopefully, continue to have the new behavior and will be
5094# handled based on that assumption. This option defaults to
5095# the old Squid behavior, which is better for hit ratios but
5096# worse for clients using IE, if they need to be able to
5097# force fresh content.
5098#Default:
5099# ie_refresh off
5100
5101# TAG: vary_ignore_expire on|off
5102# Many HTTP servers supporting Vary gives such objects
5103# immediate expiry time with no cache-control header
5104# when requested by a HTTP/1.0 client. This option
5105# enables Squid to ignore such expiry times until
5106# HTTP/1.1 is fully implemented.
5107#
5108# WARNING: If turned on this may eventually cause some
5109# varying objects not intended for caching to get cached.
5110#Default:
5111# vary_ignore_expire off
5112
5113# TAG: request_entities
5114# Squid defaults to deny GET and HEAD requests with request entities,
5115# as the meaning of such requests are undefined in the HTTP standard
5116# even if not explicitly forbidden.
5117#
5118# Set this directive to on if you have clients which insists
5119# on sending request entities in GET or HEAD requests. But be warned
5120# that there is server software (both proxies and web servers) which
5121# can fail to properly process this kind of request which may make you
5122# vulnerable to cache pollution attacks if enabled.
5123#Default:
5124# request_entities off
5125
5126# TAG: request_header_access
5127# Usage: request_header_access header_name allow|deny [!]aclname ...
5128#
5129# WARNING: Doing this VIOLATES the HTTP standard. Enabling
5130# this feature could make you liable for problems which it
5131# causes.
5132#
5133# This option replaces the old 'anonymize_headers' and the
5134# older 'http_anonymizer' option with something that is much
5135# more configurable. A list of ACLs for each header name allows
5136# removal of specific header fields under specific conditions.
5137#
5138# This option only applies to outgoing HTTP request headers (i.e.,
5139# headers sent by Squid to the next HTTP hop such as a cache peer
5140# or an origin server). The option has no effect during cache hit
5141# detection. The equivalent adaptation vectoring point in ICAP
5142# terminology is post-cache REQMOD.
5143#
5144# The option is applied to individual outgoing request header
5145# fields. For each request header field F, Squid uses the first
5146# qualifying sets of request_header_access rules:
5147#
5148# 1. Rules with header_name equal to F's name.
5149# 2. Rules with header_name 'Other', provided F's name is not
5150# on the hard-coded list of commonly used HTTP header names.
5151# 3. Rules with header_name 'All'.
5152#
5153# Within that qualifying rule set, rule ACLs are checked as usual.
5154# If ACLs of an "allow" rule match, the header field is allowed to
5155# go through as is. If ACLs of a "deny" rule match, the header is
5156# removed and request_header_replace is then checked to identify
5157# if the removed header has a replacement. If no rules within the
5158# set have matching ACLs, the header field is left as is.
5159#
5160# For example, to achieve the same behavior as the old
5161# 'http_anonymizer standard' option, you should use:
5162#
5163# request_header_access From deny all
5164# request_header_access Referer deny all
5165# request_header_access User-Agent deny all
5166#
5167# Or, to reproduce the old 'http_anonymizer paranoid' feature
5168# you should use:
5169#
5170# request_header_access Authorization allow all
5171# request_header_access Proxy-Authorization allow all
5172# request_header_access Cache-Control allow all
5173# request_header_access Content-Length allow all
5174# request_header_access Content-Type allow all
5175# request_header_access Date allow all
5176# request_header_access Host allow all
5177# request_header_access If-Modified-Since allow all
5178# request_header_access Pragma allow all
5179# request_header_access Accept allow all
5180# request_header_access Accept-Charset allow all
5181# request_header_access Accept-Encoding allow all
5182# request_header_access Accept-Language allow all
5183# request_header_access Connection allow all
5184# request_header_access All deny all
5185#
5186# HTTP reply headers are controlled with the reply_header_access directive.
5187#
5188# By default, all headers are allowed (no anonymizing is performed).
5189#Default:
5190# No limits.
5191
5192# TAG: reply_header_access
5193# Usage: reply_header_access header_name allow|deny [!]aclname ...
5194#
5195# WARNING: Doing this VIOLATES the HTTP standard. Enabling
5196# this feature could make you liable for problems which it
5197# causes.
5198#
5199# This option only applies to reply headers, i.e., from the
5200# server to the client.
5201#
5202# This is the same as request_header_access, but in the other
5203# direction. Please see request_header_access for detailed
5204# documentation.
5205#
5206# For example, to achieve the same behavior as the old
5207# 'http_anonymizer standard' option, you should use:
5208#
5209# reply_header_access Server deny all
5210# reply_header_access WWW-Authenticate deny all
5211# reply_header_access Link deny all
5212#
5213# Or, to reproduce the old 'http_anonymizer paranoid' feature
5214# you should use:
5215#
5216# reply_header_access Allow allow all
5217# reply_header_access WWW-Authenticate allow all
5218# reply_header_access Proxy-Authenticate allow all
5219# reply_header_access Cache-Control allow all
5220# reply_header_access Content-Encoding allow all
5221# reply_header_access Content-Length allow all
5222# reply_header_access Content-Type allow all
5223# reply_header_access Date allow all
5224# reply_header_access Expires allow all
5225# reply_header_access Last-Modified allow all
5226# reply_header_access Location allow all
5227# reply_header_access Pragma allow all
5228# reply_header_access Content-Language allow all
5229# reply_header_access Retry-After allow all
5230# reply_header_access Title allow all
5231# reply_header_access Content-Disposition allow all
5232# reply_header_access Connection allow all
5233# reply_header_access All deny all
5234#
5235# HTTP request headers are controlled with the request_header_access directive.
5236#
5237# By default, all headers are allowed (no anonymizing is
5238# performed).
5239#Default:
5240# No limits.
5241
5242# TAG: request_header_replace
5243# Usage: request_header_replace header_name message
5244# Example: request_header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
5245#
5246# This option allows you to change the contents of headers
5247# denied with request_header_access above, by replacing them
5248# with some fixed string.
5249#
5250# This only applies to request headers, not reply headers.
5251#
5252# By default, headers are removed if denied.
5253#Default:
5254# none
5255
5256# TAG: reply_header_replace
5257# Usage: reply_header_replace header_name message
5258# Example: reply_header_replace Server Foo/1.0
5259#
5260# This option allows you to change the contents of headers
5261# denied with reply_header_access above, by replacing them
5262# with some fixed string.
5263#
5264# This only applies to reply headers, not request headers.
5265#
5266# By default, headers are removed if denied.
5267#Default:
5268# none
5269
5270# TAG: request_header_add
5271# Usage: request_header_add field-name field-value acl1 [acl2] ...
5272# Example: request_header_add X-Client-CA "CA=%ssl::>cert_issuer" all
5273#
5274# This option adds header fields to outgoing HTTP requests (i.e.,
5275# request headers sent by Squid to the next HTTP hop such as a
5276# cache peer or an origin server). The option has no effect during
5277# cache hit detection. The equivalent adaptation vectoring point
5278# in ICAP terminology is post-cache REQMOD.
5279#
5280# Field-name is a token specifying an HTTP header name. If a
5281# standard HTTP header name is used, Squid does not check whether
5282# the new header conflicts with any existing headers or violates
5283# HTTP rules. If the request to be modified already contains a
5284# field with the same name, the old field is preserved but the
5285# header field values are not merged.
5286#
5287# Field-value is either a token or a quoted string. If quoted
5288# string format is used, then the surrounding quotes are removed
5289# while escape sequences and %macros are processed.
5290#
5291# In theory, all of the logformat codes can be used as %macros.
5292# However, unlike logging (which happens at the very end of
5293# transaction lifetime), the transaction may not yet have enough
5294# information to expand a macro when the new header value is needed.
5295# And some information may already be available to Squid but not yet
5296# committed where the macro expansion code can access it (report
5297# such instances!). The macro will be expanded into a single dash
5298# ('-') in such cases. Not all macros have been tested.
5299#
5300# One or more Squid ACLs may be specified to restrict header
5301# injection to matching requests. As always in squid.conf, all
5302# ACLs in an option ACL list must be satisfied for the insertion
5303# to happen. The request_header_add option supports fast ACLs
5304# only.
5305#Default:
5306# none
5307
5308# TAG: note
5309# This option used to log custom information about the master
5310# transaction. For example, an admin may configure Squid to log
5311# which "user group" the transaction belongs to, where "user group"
5312# will be determined based on a set of ACLs and not [just]
5313# authentication information.
5314# Values of key/value pairs can be logged using %{key}note macros:
5315#
5316# note key value acl ...
5317# logformat myFormat ... %{key}note ...
5318#Default:
5319# none
5320
5321# TAG: relaxed_header_parser on|off|warn
5322# In the default "on" setting Squid accepts certain forms
5323# of non-compliant HTTP messages where it is unambiguous
5324# what the sending application intended even if the message
5325# is not correctly formatted. The messages is then normalized
5326# to the correct form when forwarded by Squid.
5327#
5328# If set to "warn" then a warning will be emitted in cache.log
5329# each time such HTTP error is encountered.
5330#
5331# If set to "off" then such HTTP errors will cause the request
5332# or response to be rejected.
5333#Default:
5334# relaxed_header_parser on
5335
5336# TAG: collapsed_forwarding (on|off)
5337# This option controls whether Squid is allowed to merge multiple
5338# potentially cachable requests for the same URI before Squid knows
5339# whether the response is going to be cachable.
5340#
5341# This feature is disabled by default: Enabling collapsed forwarding
5342# needlessly delays forwarding requests that look cachable (when they are
5343# collapsed) but then need to be forwarded individually anyway because
5344# they end up being for uncachable content. However, in some cases, such
5345# as accelleration of highly cachable content with periodic or groupped
5346# expiration times, the gains from collapsing [large volumes of
5347# simultenous refresh requests] outweigh losses from such delays.
5348#Default:
5349# collapsed_forwarding off
5350
5351# TIMEOUTS
5352# -----------------------------------------------------------------------------
5353
5354# TAG: forward_timeout time-units
5355# This parameter specifies how long Squid should at most attempt in
5356# finding a forwarding path for the request before giving up.
5357#Default:
5358# forward_timeout 4 minutes
5359
5360# TAG: connect_timeout time-units
5361# This parameter specifies how long to wait for the TCP connect to
5362# the requested server or peer to complete before Squid should
5363# attempt to find another path where to forward the request.
5364#Default:
5365# connect_timeout 1 minute
5366
5367# TAG: peer_connect_timeout time-units
5368# This parameter specifies how long to wait for a pending TCP
5369# connection to a peer cache. The default is 30 seconds. You
5370# may also set different timeout values for individual neighbors
5371# with the 'connect-timeout' option on a 'cache_peer' line.
5372#Default:
5373# peer_connect_timeout 30 seconds
5374
5375# TAG: read_timeout time-units
5376# Applied on peer server connections.
5377#
5378# After each successful read(), the timeout will be extended by this
5379# amount. If no data is read again after this amount of time,
5380# the request is aborted and logged with ERR_READ_TIMEOUT.
5381#
5382# The default is 15 minutes.
5383#Default:
5384# read_timeout 15 minutes
5385
5386# TAG: write_timeout time-units
5387# This timeout is tracked for all connections that have data
5388# available for writing and are waiting for the socket to become
5389# ready. After each successful write, the timeout is extended by
5390# the configured amount. If Squid has data to write but the
5391# connection is not ready for the configured duration, the
5392# transaction associated with the connection is terminated. The
5393# default is 15 minutes.
5394#Default:
5395# write_timeout 15 minutes
5396
5397# TAG: request_timeout
5398# How long to wait for complete HTTP request headers after initial
5399# connection establishment.
5400#Default:
5401# request_timeout 5 minutes
5402
5403# TAG: client_idle_pconn_timeout
5404# How long to wait for the next HTTP request on a persistent
5405# client connection after the previous request completes.
5406#Default:
5407# client_idle_pconn_timeout 2 minutes
5408
5409# TAG: ftp_client_idle_timeout
5410# How long to wait for an FTP request on a connection to Squid ftp_port.
5411# Many FTP clients do not deal with idle connection closures well,
5412# necessitating a longer default timeout than client_idle_pconn_timeout
5413# used for incoming HTTP requests.
5414#Default:
5415# ftp_client_idle_timeout 30 minutes
5416
5417# TAG: client_lifetime time-units
5418# The maximum amount of time a client (browser) is allowed to
5419# remain connected to the cache process. This protects the Cache
5420# from having a lot of sockets (and hence file descriptors) tied up
5421# in a CLOSE_WAIT state from remote clients that go away without
5422# properly shutting down (either because of a network failure or
5423# because of a poor client implementation). The default is one
5424# day, 1440 minutes.
5425#
5426# NOTE: The default value is intended to be much larger than any
5427# client would ever need to be connected to your cache. You
5428# should probably change client_lifetime only as a last resort.
5429# If you seem to have many client connections tying up
5430# filedescriptors, we recommend first tuning the read_timeout,
5431# request_timeout, persistent_request_timeout and quick_abort values.
5432#Default:
5433# client_lifetime 1 day
5434
5435# TAG: half_closed_clients
5436# Some clients may shutdown the sending side of their TCP
5437# connections, while leaving their receiving sides open. Sometimes,
5438# Squid can not tell the difference between a half-closed and a
5439# fully-closed TCP connection.
5440#
5441# By default, Squid will immediately close client connections when
5442# read(2) returns "no more data to read."
5443#
5444# Change this option to 'on' and Squid will keep open connections
5445# until a read(2) or write(2) on the socket returns an error.
5446# This may show some benefits for reverse proxies. But if not
5447# it is recommended to leave OFF.
5448#Default:
5449# half_closed_clients off
5450
5451# TAG: server_idle_pconn_timeout
5452# Timeout for idle persistent connections to servers and other
5453# proxies.
5454#Default:
5455# server_idle_pconn_timeout 1 minute
5456
5457# TAG: ident_timeout
5458# Maximum time to wait for IDENT lookups to complete.
5459#
5460# If this is too high, and you enabled IDENT lookups from untrusted
5461# users, you might be susceptible to denial-of-service by having
5462# many ident requests going at once.
5463#Default:
5464# ident_timeout 10 seconds
5465
5466# TAG: shutdown_lifetime time-units
5467# When SIGTERM or SIGHUP is received, the cache is put into
5468# "shutdown pending" mode until all active sockets are closed.
5469# This value is the lifetime to set for all open descriptors
5470# during shutdown mode. Any active clients after this many
5471# seconds will receive a 'timeout' message.
5472#Default:
5473# shutdown_lifetime 30 seconds
5474
5475# ADMINISTRATIVE PARAMETERS
5476# -----------------------------------------------------------------------------
5477
5478# TAG: cache_mgr
5479# Email-address of local cache manager who will receive
5480# mail if the cache dies. The default is "webmaster".
5481#Default:
5482# cache_mgr webmaster
5483
5484# TAG: mail_from
5485# From: email-address for mail sent when the cache dies.
5486# The default is to use 'squid@unique_hostname'.
5487#
5488# See also: unique_hostname directive.
5489#Default:
5490# none
5491
5492# TAG: mail_program
5493# Email program used to send mail if the cache dies.
5494# The default is "mail". The specified program must comply
5495# with the standard Unix mail syntax:
5496# mail-program recipient < mailfile
5497#
5498# Optional command line options can be specified.
5499#Default:
5500# mail_program mail
5501
5502# TAG: cache_effective_user
5503# If you start Squid as root, it will change its effective/real
5504# UID/GID to the user specified below. The default is to change
5505# to UID of proxy.
5506# see also; cache_effective_group
5507#Default:
5508# cache_effective_user proxy
5509
5510# TAG: cache_effective_group
5511# Squid sets the GID to the effective user's default group ID
5512# (taken from the password file) and supplementary group list
5513# from the groups membership.
5514#
5515# If you want Squid to run with a specific GID regardless of
5516# the group memberships of the effective user then set this
5517# to the group (or GID) you want Squid to run as. When set
5518# all other group privileges of the effective user are ignored
5519# and only this GID is effective. If Squid is not started as
5520# root the user starting Squid MUST be member of the specified
5521# group.
5522#
5523# This option is not recommended by the Squid Team.
5524# Our preference is for administrators to configure a secure
5525# user account for squid with UID/GID matching system policies.
5526#Default:
5527# Use system group memberships of the cache_effective_user account
5528
5529# TAG: httpd_suppress_version_string on|off
5530# Suppress Squid version string info in HTTP headers and HTML error pages.
5531#Default:
5532# httpd_suppress_version_string off
5533
5534# TAG: visible_hostname
5535# If you want to present a special hostname in error messages, etc,
5536# define this. Otherwise, the return value of gethostname()
5537# will be used. If you have multiple caches in a cluster and
5538# get errors about IP-forwarding you must set them to have individual
5539# names with this setting.
5540#Default:
5541# Automatically detect the system host name
5542
5543# TAG: unique_hostname
5544# If you want to have multiple machines with the same
5545# 'visible_hostname' you must give each machine a different
5546# 'unique_hostname' so forwarding loops can be detected.
5547#Default:
5548# Copy the value from visible_hostname
5549
5550# TAG: hostname_aliases
5551# A list of other DNS names your cache has.
5552#Default:
5553# none
5554
5555# TAG: umask
5556# Minimum umask which should be enforced while the proxy
5557# is running, in addition to the umask set at startup.
5558#
5559# For a traditional octal representation of umasks, start
5560# your value with 0.
5561#Default:
5562# umask 027
5563
5564# OPTIONS FOR THE CACHE REGISTRATION SERVICE
5565# -----------------------------------------------------------------------------
5566#
5567# This section contains parameters for the (optional) cache
5568# announcement service. This service is provided to help
5569# cache administrators locate one another in order to join or
5570# create cache hierarchies.
5571#
5572# An 'announcement' message is sent (via UDP) to the registration
5573# service by Squid. By default, the announcement message is NOT
5574# SENT unless you enable it with 'announce_period' below.
5575#
5576# The announcement message includes your hostname, plus the
5577# following information from this configuration file:
5578#
5579# http_port
5580# icp_port
5581# cache_mgr
5582#
5583# All current information is processed regularly and made
5584# available on the Web at http://www.ircache.net/Cache/Tracker/.
5585
5586# TAG: announce_period
5587# This is how frequently to send cache announcements.
5588#
5589# To enable announcing your cache, just set an announce period.
5590#
5591# Example:
5592# announce_period 1 day
5593#Default:
5594# Announcement messages disabled.
5595
5596# TAG: announce_host
5597# Set the hostname where announce registration messages will be sent.
5598#
5599# See also announce_port and announce_file
5600#Default:
5601# announce_host tracker.ircache.net
5602
5603# TAG: announce_file
5604# The contents of this file will be included in the announce
5605# registration messages.
5606#Default:
5607# none
5608
5609# TAG: announce_port
5610# Set the port where announce registration messages will be sent.
5611#
5612# See also announce_host and announce_file
5613#Default:
5614# announce_port 3131
5615
5616# HTTPD-ACCELERATOR OPTIONS
5617# -----------------------------------------------------------------------------
5618
5619# TAG: httpd_accel_surrogate_id
5620# Surrogates (http://www.esi.org/architecture_spec_1.0.html)
5621# need an identification token to allow control targeting. Because
5622# a farm of surrogates may all perform the same tasks, they may share
5623# an identification token.
5624#Default:
5625# visible_hostname is used if no specific ID is set.
5626
5627# TAG: http_accel_surrogate_remote on|off
5628# Remote surrogates (such as those in a CDN) honour the header
5629# "Surrogate-Control: no-store-remote".
5630#
5631# Set this to on to have squid behave as a remote surrogate.
5632#Default:
5633# http_accel_surrogate_remote off
5634
5635# TAG: esi_parser libxml2|expat|custom
5636# ESI markup is not strictly XML compatible. The custom ESI parser
5637# will give higher performance, but cannot handle non ASCII character
5638# encodings.
5639#Default:
5640# esi_parser custom
5641
5642# DELAY POOL PARAMETERS
5643# -----------------------------------------------------------------------------
5644
5645# TAG: delay_pools
5646# This represents the number of delay pools to be used. For example,
5647# if you have one class 2 delay pool and one class 3 delays pool, you
5648# have a total of 2 delay pools.
5649#
5650# See also delay_parameters, delay_class, delay_access for pool
5651# configuration details.
5652#Default:
5653# delay_pools 0
5654
5655# TAG: delay_class
5656# This defines the class of each delay pool. There must be exactly one
5657# delay_class line for each delay pool. For example, to define two
5658# delay pools, one of class 2 and one of class 3, the settings above
5659# and here would be:
5660#
5661# Example:
5662# delay_pools 4 # 4 delay pools
5663# delay_class 1 2 # pool 1 is a class 2 pool
5664# delay_class 2 3 # pool 2 is a class 3 pool
5665# delay_class 3 4 # pool 3 is a class 4 pool
5666# delay_class 4 5 # pool 4 is a class 5 pool
5667#
5668# The delay pool classes are:
5669#
5670# class 1 Everything is limited by a single aggregate
5671# bucket.
5672#
5673# class 2 Everything is limited by a single aggregate
5674# bucket as well as an "individual" bucket chosen
5675# from bits 25 through 32 of the IPv4 address.
5676#
5677# class 3 Everything is limited by a single aggregate
5678# bucket as well as a "network" bucket chosen
5679# from bits 17 through 24 of the IP address and a
5680# "individual" bucket chosen from bits 17 through
5681# 32 of the IPv4 address.
5682#
5683# class 4 Everything in a class 3 delay pool, with an
5684# additional limit on a per user basis. This
5685# only takes effect if the username is established
5686# in advance - by forcing authentication in your
5687# http_access rules.
5688#
5689# class 5 Requests are grouped according their tag (see
5690# external_acl's tag= reply).
5691#
5692#
5693# Each pool also requires a delay_parameters directive to configure the pool size
5694# and speed limits used whenever the pool is applied to a request. Along with
5695# a set of delay_access directives to determine when it is used.
5696#
5697# NOTE: If an IP address is a.b.c.d
5698# -> bits 25 through 32 are "d"
5699# -> bits 17 through 24 are "c"
5700# -> bits 17 through 32 are "c * 256 + d"
5701#
5702# NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to
5703# IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic.
5704#
5705# This clause only supports fast acl types.
5706# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5707#
5708# See also delay_parameters and delay_access.
5709#Default:
5710# none
5711
5712# TAG: delay_access
5713# This is used to determine which delay pool a request falls into.
5714#
5715# delay_access is sorted per pool and the matching starts with pool 1,
5716# then pool 2, ..., and finally pool N. The first delay pool where the
5717# request is allowed is selected for the request. If it does not allow
5718# the request to any pool then the request is not delayed (default).
5719#
5720# For example, if you want some_big_clients in delay
5721# pool 1 and lotsa_little_clients in delay pool 2:
5722#
5723# delay_access 1 allow some_big_clients
5724# delay_access 1 deny all
5725# delay_access 2 allow lotsa_little_clients
5726# delay_access 2 deny all
5727# delay_access 3 allow authenticated_clients
5728#
5729# See also delay_parameters and delay_class.
5730#
5731#Default:
5732# Deny using the pool, unless allow rules exist in squid.conf for the pool.
5733
5734# TAG: delay_parameters
5735# This defines the parameters for a delay pool. Each delay pool has
5736# a number of "buckets" associated with it, as explained in the
5737# description of delay_class.
5738#
5739# For a class 1 delay pool, the syntax is:
5740# delay_class pool 1
5741# delay_parameters pool aggregate
5742#
5743# For a class 2 delay pool:
5744# delay_class pool 2
5745# delay_parameters pool aggregate individual
5746#
5747# For a class 3 delay pool:
5748# delay_class pool 3
5749# delay_parameters pool aggregate network individual
5750#
5751# For a class 4 delay pool:
5752# delay_class pool 4
5753# delay_parameters pool aggregate network individual user
5754#
5755# For a class 5 delay pool:
5756# delay_class pool 5
5757# delay_parameters pool tagrate
5758#
5759# The option variables are:
5760#
5761# pool a pool number - ie, a number between 1 and the
5762# number specified in delay_pools as used in
5763# delay_class lines.
5764#
5765# aggregate the speed limit parameters for the aggregate bucket
5766# (class 1, 2, 3).
5767#
5768# individual the speed limit parameters for the individual
5769# buckets (class 2, 3).
5770#
5771# network the speed limit parameters for the network buckets
5772# (class 3).
5773#
5774# user the speed limit parameters for the user buckets
5775# (class 4).
5776#
5777# tagrate the speed limit parameters for the tag buckets
5778# (class 5).
5779#
5780# A pair of delay parameters is written restore/maximum, where restore is
5781# the number of bytes (not bits - modem and network speeds are usually
5782# quoted in bits) per second placed into the bucket, and maximum is the
5783# maximum number of bytes which can be in the bucket at any time.
5784#
5785# There must be one delay_parameters line for each delay pool.
5786#
5787#
5788# For example, if delay pool number 1 is a class 2 delay pool as in the
5789# above example, and is being used to strictly limit each host to 64Kbit/sec
5790# (plus overheads), with no overall limit, the line is:
5791#
5792# delay_parameters 1 none 8000/8000
5793#
5794# Note that 8 x 8K Byte/sec -> 64K bit/sec.
5795#
5796# Note that the word 'none' is used to represent no limit.
5797#
5798#
5799# And, if delay pool number 2 is a class 3 delay pool as in the above
5800# example, and you want to limit it to a total of 256Kbit/sec (strict limit)
5801# with each 8-bit network permitted 64Kbit/sec (strict limit) and each
5802# individual host permitted 4800bit/sec with a bucket maximum size of 64Kbits
5803# to permit a decent web page to be downloaded at a decent speed
5804# (if the network is not being limited due to overuse) but slow down
5805# large downloads more significantly:
5806#
5807# delay_parameters 2 32000/32000 8000/8000 600/8000
5808#
5809# Note that 8 x 32K Byte/sec -> 256K bit/sec.
5810# 8 x 8K Byte/sec -> 64K bit/sec.
5811# 8 x 600 Byte/sec -> 4800 bit/sec.
5812#
5813#
5814# Finally, for a class 4 delay pool as in the example - each user will
5815# be limited to 128Kbits/sec no matter how many workstations they are logged into.:
5816#
5817# delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
5818#
5819#
5820# See also delay_class and delay_access.
5821#
5822#Default:
5823# none
5824
5825# TAG: delay_initial_bucket_level (percent, 0-100)
5826# The initial bucket percentage is used to determine how much is put
5827# in each bucket when squid starts, is reconfigured, or first notices
5828# a host accessing it (in class 2 and class 3, individual hosts and
5829# networks only have buckets associated with them once they have been
5830# "seen" by squid).
5831#Default:
5832# delay_initial_bucket_level 50
5833
5834# CLIENT DELAY POOL PARAMETERS
5835# -----------------------------------------------------------------------------
5836
5837# TAG: client_delay_pools
5838# This option specifies the number of client delay pools used. It must
5839# preceed other client_delay_* options.
5840#
5841# Example:
5842# client_delay_pools 2
5843#
5844# See also client_delay_parameters and client_delay_access.
5845#Default:
5846# client_delay_pools 0
5847
5848# TAG: client_delay_initial_bucket_level (percent, 0-no_limit)
5849# This option determines the initial bucket size as a percentage of
5850# max_bucket_size from client_delay_parameters. Buckets are created
5851# at the time of the "first" connection from the matching IP. Idle
5852# buckets are periodically deleted up.
5853#
5854# You can specify more than 100 percent but note that such "oversized"
5855# buckets are not refilled until their size goes down to max_bucket_size
5856# from client_delay_parameters.
5857#
5858# Example:
5859# client_delay_initial_bucket_level 50
5860#Default:
5861# client_delay_initial_bucket_level 50
5862
5863# TAG: client_delay_parameters
5864#
5865# This option configures client-side bandwidth limits using the
5866# following format:
5867#
5868# client_delay_parameters pool speed_limit max_bucket_size
5869#
5870# pool is an integer ID used for client_delay_access matching.
5871#
5872# speed_limit is bytes added to the bucket per second.
5873#
5874# max_bucket_size is the maximum size of a bucket, enforced after any
5875# speed_limit additions.
5876#
5877# Please see the delay_parameters option for more information and
5878# examples.
5879#
5880# Example:
5881# client_delay_parameters 1 1024 2048
5882# client_delay_parameters 2 51200 16384
5883#
5884# See also client_delay_access.
5885#
5886#Default:
5887# none
5888
5889# TAG: client_delay_access
5890# This option determines the client-side delay pool for the
5891# request:
5892#
5893# client_delay_access pool_ID allow|deny acl_name
5894#
5895# All client_delay_access options are checked in their pool ID
5896# order, starting with pool 1. The first checked pool with allowed
5897# request is selected for the request. If no ACL matches or there
5898# are no client_delay_access options, the request bandwidth is not
5899# limited.
5900#
5901# The ACL-selected pool is then used to find the
5902# client_delay_parameters for the request. Client-side pools are
5903# not used to aggregate clients. Clients are always aggregated
5904# based on their source IP addresses (one bucket per source IP).
5905#
5906# This clause only supports fast acl types.
5907# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5908# Additionally, only the client TCP connection details are available.
5909# ACLs testing HTTP properties will not work.
5910#
5911# Please see delay_access for more examples.
5912#
5913# Example:
5914# client_delay_access 1 allow low_rate_network
5915# client_delay_access 2 allow vips_network
5916#
5917#
5918# See also client_delay_parameters and client_delay_pools.
5919#Default:
5920# Deny use of the pool, unless allow rules exist in squid.conf for the pool.
5921
5922# WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
5923# -----------------------------------------------------------------------------
5924
5925# TAG: wccp_router
5926# Use this option to define your WCCP ``home'' router for
5927# Squid.
5928#
5929# wccp_router supports a single WCCP(v1) router
5930#
5931# wccp2_router supports multiple WCCPv2 routers
5932#
5933# only one of the two may be used at the same time and defines
5934# which version of WCCP to use.
5935#Default:
5936# WCCP disabled.
5937
5938# TAG: wccp2_router
5939# Use this option to define your WCCP ``home'' router for
5940# Squid.
5941#
5942# wccp_router supports a single WCCP(v1) router
5943#
5944# wccp2_router supports multiple WCCPv2 routers
5945#
5946# only one of the two may be used at the same time and defines
5947# which version of WCCP to use.
5948#Default:
5949# WCCPv2 disabled.
5950
5951# TAG: wccp_version
5952# This directive is only relevant if you need to set up WCCP(v1)
5953# to some very old and end-of-life Cisco routers. In all other
5954# setups it must be left unset or at the default setting.
5955# It defines an internal version in the WCCP(v1) protocol,
5956# with version 4 being the officially documented protocol.
5957#
5958# According to some users, Cisco IOS 11.2 and earlier only
5959# support WCCP version 3. If you're using that or an earlier
5960# version of IOS, you may need to change this value to 3, otherwise
5961# do not specify this parameter.
5962#Default:
5963# wccp_version 4
5964
5965# TAG: wccp2_rebuild_wait
5966# If this is enabled Squid will wait for the cache dir rebuild to finish
5967# before sending the first wccp2 HereIAm packet
5968#Default:
5969# wccp2_rebuild_wait on
5970
5971# TAG: wccp2_forwarding_method
5972# WCCP2 allows the setting of forwarding methods between the
5973# router/switch and the cache. Valid values are as follows:
5974#
5975# gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
5976# l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
5977#
5978# Currently (as of IOS 12.4) cisco routers only support GRE.
5979# Cisco switches only support the L2 redirect assignment method.
5980#Default:
5981# wccp2_forwarding_method gre
5982
5983# TAG: wccp2_return_method
5984# WCCP2 allows the setting of return methods between the
5985# router/switch and the cache for packets that the cache
5986# decides not to handle. Valid values are as follows:
5987#
5988# gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
5989# l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
5990#
5991# Currently (as of IOS 12.4) cisco routers only support GRE.
5992# Cisco switches only support the L2 redirect assignment.
5993#
5994# If the "ip wccp redirect exclude in" command has been
5995# enabled on the cache interface, then it is still safe for
5996# the proxy server to use a l2 redirect method even if this
5997# option is set to GRE.
5998#Default:
5999# wccp2_return_method gre
6000
6001# TAG: wccp2_assignment_method
6002# WCCP2 allows the setting of methods to assign the WCCP hash
6003# Valid values are as follows:
6004#
6005# hash - Hash assignment
6006# mask - Mask assignment
6007#
6008# As a general rule, cisco routers support the hash assignment method
6009# and cisco switches support the mask assignment method.
6010#Default:
6011# wccp2_assignment_method hash
6012
6013# TAG: wccp2_service
6014# WCCP2 allows for multiple traffic services. There are two
6015# types: "standard" and "dynamic". The standard type defines
6016# one service id - http (id 0). The dynamic service ids can be from
6017# 51 to 255 inclusive. In order to use a dynamic service id
6018# one must define the type of traffic to be redirected; this is done
6019# using the wccp2_service_info option.
6020#
6021# The "standard" type does not require a wccp2_service_info option,
6022# just specifying the service id will suffice.
6023#
6024# MD5 service authentication can be enabled by adding
6025# "password=<password>" to the end of this service declaration.
6026#
6027# Examples:
6028#
6029# wccp2_service standard 0 # for the 'web-cache' standard service
6030# wccp2_service dynamic 80 # a dynamic service type which will be
6031# # fleshed out with subsequent options.
6032# wccp2_service standard 0 password=foo
6033#Default:
6034# Use the 'web-cache' standard service.
6035
6036# TAG: wccp2_service_info
6037# Dynamic WCCPv2 services require further information to define the
6038# traffic you wish to have diverted.
6039#
6040# The format is:
6041#
6042# wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
6043# priority=<priority> ports=<port>,<port>..
6044#
6045# The relevant WCCPv2 flags:
6046# + src_ip_hash, dst_ip_hash
6047# + source_port_hash, dst_port_hash
6048# + src_ip_alt_hash, dst_ip_alt_hash
6049# + src_port_alt_hash, dst_port_alt_hash
6050# + ports_source
6051#
6052# The port list can be one to eight entries.
6053#
6054# Example:
6055#
6056# wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
6057# priority=240 ports=80
6058#
6059# Note: the service id must have been defined by a previous
6060# 'wccp2_service dynamic <id>' entry.
6061#Default:
6062# none
6063
6064# TAG: wccp2_weight
6065# Each cache server gets assigned a set of the destination
6066# hash proportional to their weight.
6067#Default:
6068# wccp2_weight 10000
6069
6070# TAG: wccp_address
6071# Use this option if you require WCCPv2 to use a specific
6072# interface address.
6073#
6074# The default behavior is to not bind to any specific address.
6075#Default:
6076# Address selected by the operating system.
6077
6078# TAG: wccp2_address
6079# Use this option if you require WCCP to use a specific
6080# interface address.
6081#
6082# The default behavior is to not bind to any specific address.
6083#Default:
6084# Address selected by the operating system.
6085
6086# PERSISTENT CONNECTION HANDLING
6087# -----------------------------------------------------------------------------
6088#
6089# Also see "pconn_timeout" in the TIMEOUTS section
6090
6091# TAG: client_persistent_connections
6092# Persistent connection support for clients.
6093# Squid uses persistent connections (when allowed). You can use
6094# this option to disable persistent connections with clients.
6095#Default:
6096# client_persistent_connections on
6097
6098# TAG: server_persistent_connections
6099# Persistent connection support for servers.
6100# Squid uses persistent connections (when allowed). You can use
6101# this option to disable persistent connections with servers.
6102#Default:
6103# server_persistent_connections on
6104
6105# TAG: persistent_connection_after_error
6106# With this directive the use of persistent connections after
6107# HTTP errors can be disabled. Useful if you have clients
6108# who fail to handle errors on persistent connections proper.
6109#Default:
6110# persistent_connection_after_error on
6111
6112# TAG: detect_broken_pconn
6113# Some servers have been found to incorrectly signal the use
6114# of HTTP/1.0 persistent connections even on replies not
6115# compatible, causing significant delays. This server problem
6116# has mostly been seen on redirects.
6117#
6118# By enabling this directive Squid attempts to detect such
6119# broken replies and automatically assume the reply is finished
6120# after 10 seconds timeout.
6121#Default:
6122# detect_broken_pconn off
6123
6124# CACHE DIGEST OPTIONS
6125# -----------------------------------------------------------------------------
6126
6127# TAG: digest_generation
6128# This controls whether the server will generate a Cache Digest
6129# of its contents. By default, Cache Digest generation is
6130# enabled if Squid is compiled with --enable-cache-digests defined.
6131#Default:
6132# digest_generation on
6133
6134# TAG: digest_bits_per_entry
6135# This is the number of bits of the server's Cache Digest which
6136# will be associated with the Digest entry for a given HTTP
6137# Method and URL (public key) combination. The default is 5.
6138#Default:
6139# digest_bits_per_entry 5
6140
6141# TAG: digest_rebuild_period (seconds)
6142# This is the wait time between Cache Digest rebuilds.
6143#Default:
6144# digest_rebuild_period 1 hour
6145
6146# TAG: digest_rewrite_period (seconds)
6147# This is the wait time between Cache Digest writes to
6148# disk.
6149#Default:
6150# digest_rewrite_period 1 hour
6151
6152# TAG: digest_swapout_chunk_size (bytes)
6153# This is the number of bytes of the Cache Digest to write to
6154# disk at a time. It defaults to 4096 bytes (4KB), the Squid
6155# default swap page.
6156#Default:
6157# digest_swapout_chunk_size 4096 bytes
6158
6159# TAG: digest_rebuild_chunk_percentage (percent, 0-100)
6160# This is the percentage of the Cache Digest to be scanned at a
6161# time. By default it is set to 10% of the Cache Digest.
6162#Default:
6163# digest_rebuild_chunk_percentage 10
6164
6165# SNMP OPTIONS
6166# -----------------------------------------------------------------------------
6167
6168# TAG: snmp_port
6169# The port number where Squid listens for SNMP requests. To enable
6170# SNMP support set this to a suitable port number. Port number
6171# 3401 is often used for the Squid SNMP agent. By default it's
6172# set to "0" (disabled)
6173#
6174# Example:
6175# snmp_port 3401
6176#Default:
6177# SNMP disabled.
6178
6179# TAG: snmp_access
6180# Allowing or denying access to the SNMP port.
6181#
6182# All access to the agent is denied by default.
6183# usage:
6184#
6185# snmp_access allow|deny [!]aclname ...
6186#
6187# This clause only supports fast acl types.
6188# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6189#
6190#Example:
6191# snmp_access allow snmppublic localhost
6192# snmp_access deny all
6193#Default:
6194# Deny, unless rules exist in squid.conf.
6195
6196# TAG: snmp_incoming_address
6197# Just like 'udp_incoming_address', but for the SNMP port.
6198#
6199# snmp_incoming_address is used for the SNMP socket receiving
6200# messages from SNMP agents.
6201#
6202# The default snmp_incoming_address is to listen on all
6203# available network interfaces.
6204#Default:
6205# Accept SNMP packets from all machine interfaces.
6206
6207# TAG: snmp_outgoing_address
6208# Just like 'udp_outgoing_address', but for the SNMP port.
6209#
6210# snmp_outgoing_address is used for SNMP packets returned to SNMP
6211# agents.
6212#
6213# If snmp_outgoing_address is not set it will use the same socket
6214# as snmp_incoming_address. Only change this if you want to have
6215# SNMP replies sent using another address than where this Squid
6216# listens for SNMP queries.
6217#
6218# NOTE, snmp_incoming_address and snmp_outgoing_address can not have
6219# the same value since they both use the same port.
6220#Default:
6221# Use snmp_incoming_address or an address selected by the operating system.
6222
6223# ICP OPTIONS
6224# -----------------------------------------------------------------------------
6225
6226# TAG: icp_port
6227# The port number where Squid sends and receives ICP queries to
6228# and from neighbor caches. The standard UDP port for ICP is 3130.
6229#
6230# Example:
6231# icp_port 3130
6232#Default:
6233# ICP disabled.
6234
6235# TAG: htcp_port
6236# The port number where Squid sends and receives HTCP queries to
6237# and from neighbor caches. To turn it on you want to set it to
6238# 4827.
6239#
6240# Example:
6241# htcp_port 4827
6242#Default:
6243# HTCP disabled.
6244
6245# TAG: log_icp_queries on|off
6246# If set, ICP queries are logged to access.log. You may wish
6247# do disable this if your ICP load is VERY high to speed things
6248# up or to simplify log analysis.
6249#Default:
6250# log_icp_queries on
6251
6252# TAG: udp_incoming_address
6253# udp_incoming_address is used for UDP packets received from other
6254# caches.
6255#
6256# The default behavior is to not bind to any specific address.
6257#
6258# Only change this if you want to have all UDP queries received on
6259# a specific interface/address.
6260#
6261# NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS
6262# modules. Altering it will affect all of them in the same manner.
6263#
6264# see also; udp_outgoing_address
6265#
6266# NOTE, udp_incoming_address and udp_outgoing_address can not
6267# have the same value since they both use the same port.
6268#Default:
6269# Accept packets from all machine interfaces.
6270
6271# TAG: udp_outgoing_address
6272# udp_outgoing_address is used for UDP packets sent out to other
6273# caches.
6274#
6275# The default behavior is to not bind to any specific address.
6276#
6277# Instead it will use the same socket as udp_incoming_address.
6278# Only change this if you want to have UDP queries sent using another
6279# address than where this Squid listens for UDP queries from other
6280# caches.
6281#
6282# NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS
6283# modules. Altering it will affect all of them in the same manner.
6284#
6285# see also; udp_incoming_address
6286#
6287# NOTE, udp_incoming_address and udp_outgoing_address can not
6288# have the same value since they both use the same port.
6289#Default:
6290# Use udp_incoming_address or an address selected by the operating system.
6291
6292# TAG: icp_hit_stale on|off
6293# If you want to return ICP_HIT for stale cache objects, set this
6294# option to 'on'. If you have sibling relationships with caches
6295# in other administrative domains, this should be 'off'. If you only
6296# have sibling relationships with caches under your control,
6297# it is probably okay to set this to 'on'.
6298# If set to 'on', your siblings should use the option "allow-miss"
6299# on their cache_peer lines for connecting to you.
6300#Default:
6301# icp_hit_stale off
6302
6303# TAG: minimum_direct_hops
6304# If using the ICMP pinging stuff, do direct fetches for sites
6305# which are no more than this many hops away.
6306#Default:
6307# minimum_direct_hops 4
6308
6309# TAG: minimum_direct_rtt (msec)
6310# If using the ICMP pinging stuff, do direct fetches for sites
6311# which are no more than this many rtt milliseconds away.
6312#Default:
6313# minimum_direct_rtt 400
6314
6315# TAG: netdb_low
6316# The low water mark for the ICMP measurement database.
6317#
6318# Note: high watermark controlled by netdb_high directive.
6319#
6320# These watermarks are counts, not percents. The defaults are
6321# (low) 900 and (high) 1000. When the high water mark is
6322# reached, database entries will be deleted until the low
6323# mark is reached.
6324#Default:
6325# netdb_low 900
6326
6327# TAG: netdb_high
6328# The high water mark for the ICMP measurement database.
6329#
6330# Note: low watermark controlled by netdb_low directive.
6331#
6332# These watermarks are counts, not percents. The defaults are
6333# (low) 900 and (high) 1000. When the high water mark is
6334# reached, database entries will be deleted until the low
6335# mark is reached.
6336#Default:
6337# netdb_high 1000
6338
6339# TAG: netdb_ping_period
6340# The minimum period for measuring a site. There will be at
6341# least this much delay between successive pings to the same
6342# network. The default is five minutes.
6343#Default:
6344# netdb_ping_period 5 minutes
6345
6346# TAG: query_icmp on|off
6347# If you want to ask your peers to include ICMP data in their ICP
6348# replies, enable this option.
6349#
6350# If your peer has configured Squid (during compilation) with
6351# '--enable-icmp' that peer will send ICMP pings to origin server
6352# sites of the URLs it receives. If you enable this option the
6353# ICP replies from that peer will include the ICMP data (if available).
6354# Then, when choosing a parent cache, Squid will choose the parent with
6355# the minimal RTT to the origin server. When this happens, the
6356# hierarchy field of the access.log will be
6357# "CLOSEST_PARENT_MISS". This option is off by default.
6358#Default:
6359# query_icmp off
6360
6361# TAG: test_reachability on|off
6362# When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
6363# instead of ICP_MISS if the target host is NOT in the ICMP
6364# database, or has a zero RTT.
6365#Default:
6366# test_reachability off
6367
6368# TAG: icp_query_timeout (msec)
6369# Normally Squid will automatically determine an optimal ICP
6370# query timeout value based on the round-trip-time of recent ICP
6371# queries. If you want to override the value determined by
6372# Squid, set this 'icp_query_timeout' to a non-zero value. This
6373# value is specified in MILLISECONDS, so, to use a 2-second
6374# timeout (the old default), you would write:
6375#
6376# icp_query_timeout 2000
6377#Default:
6378# Dynamic detection.
6379
6380# TAG: maximum_icp_query_timeout (msec)
6381# Normally the ICP query timeout is determined dynamically. But
6382# sometimes it can lead to very large values (say 5 seconds).
6383# Use this option to put an upper limit on the dynamic timeout
6384# value. Do NOT use this option to always use a fixed (instead
6385# of a dynamic) timeout value. To set a fixed timeout see the
6386# 'icp_query_timeout' directive.
6387#Default:
6388# maximum_icp_query_timeout 2000
6389
6390# TAG: minimum_icp_query_timeout (msec)
6391# Normally the ICP query timeout is determined dynamically. But
6392# sometimes it can lead to very small timeouts, even lower than
6393# the normal latency variance on your link due to traffic.
6394# Use this option to put an lower limit on the dynamic timeout
6395# value. Do NOT use this option to always use a fixed (instead
6396# of a dynamic) timeout value. To set a fixed timeout see the
6397# 'icp_query_timeout' directive.
6398#Default:
6399# minimum_icp_query_timeout 5
6400
6401# TAG: background_ping_rate time-units
6402# Controls how often the ICP pings are sent to siblings that
6403# have background-ping set.
6404#Default:
6405# background_ping_rate 10 seconds
6406
6407# MULTICAST ICP OPTIONS
6408# -----------------------------------------------------------------------------
6409
6410# TAG: mcast_groups
6411# This tag specifies a list of multicast groups which your server
6412# should join to receive multicasted ICP queries.
6413#
6414# NOTE! Be very careful what you put here! Be sure you
6415# understand the difference between an ICP _query_ and an ICP
6416# _reply_. This option is to be set only if you want to RECEIVE
6417# multicast queries. Do NOT set this option to SEND multicast
6418# ICP (use cache_peer for that). ICP replies are always sent via
6419# unicast, so this option does not affect whether or not you will
6420# receive replies from multicast group members.
6421#
6422# You must be very careful to NOT use a multicast address which
6423# is already in use by another group of caches.
6424#
6425# If you are unsure about multicast, please read the Multicast
6426# chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
6427#
6428# Usage: mcast_groups 239.128.16.128 224.0.1.20
6429#
6430# By default, Squid doesn't listen on any multicast groups.
6431#Default:
6432# none
6433
6434# TAG: mcast_miss_addr
6435# Note: This option is only available if Squid is rebuilt with the
6436# -DMULTICAST_MISS_STREAM define
6437#
6438# If you enable this option, every "cache miss" URL will
6439# be sent out on the specified multicast address.
6440#
6441# Do not enable this option unless you are are absolutely
6442# certain you understand what you are doing.
6443#Default:
6444# disabled.
6445
6446# TAG: mcast_miss_ttl
6447# Note: This option is only available if Squid is rebuilt with the
6448# -DMULTICAST_MISS_STREAM define
6449#
6450# This is the time-to-live value for packets multicasted
6451# when multicasting off cache miss URLs is enabled. By
6452# default this is set to 'site scope', i.e. 16.
6453#Default:
6454# mcast_miss_ttl 16
6455
6456# TAG: mcast_miss_port
6457# Note: This option is only available if Squid is rebuilt with the
6458# -DMULTICAST_MISS_STREAM define
6459#
6460# This is the port number to be used in conjunction with
6461# 'mcast_miss_addr'.
6462#Default:
6463# mcast_miss_port 3135
6464
6465# TAG: mcast_miss_encode_key
6466# Note: This option is only available if Squid is rebuilt with the
6467# -DMULTICAST_MISS_STREAM define
6468#
6469# The URLs that are sent in the multicast miss stream are
6470# encrypted. This is the encryption key.
6471#Default:
6472# mcast_miss_encode_key XXXXXXXXXXXXXXXX
6473
6474# TAG: mcast_icp_query_timeout (msec)
6475# For multicast peers, Squid regularly sends out ICP "probes" to
6476# count how many other peers are listening on the given multicast
6477# address. This value specifies how long Squid should wait to
6478# count all the replies. The default is 2000 msec, or 2
6479# seconds.
6480#Default:
6481# mcast_icp_query_timeout 2000
6482
6483# INTERNAL ICON OPTIONS
6484# -----------------------------------------------------------------------------
6485
6486# TAG: icon_directory
6487# Where the icons are stored. These are normally kept in
6488# /usr/share/squid/icons
6489#Default:
6490# icon_directory /usr/share/squid/icons
6491
6492# TAG: global_internal_static
6493# This directive controls is Squid should intercept all requests for
6494# /squid-internal-static/ no matter which host the URL is requesting
6495# (default on setting), or if nothing special should be done for
6496# such URLs (off setting). The purpose of this directive is to make
6497# icons etc work better in complex cache hierarchies where it may
6498# not always be possible for all corners in the cache mesh to reach
6499# the server generating a directory listing.
6500#Default:
6501# global_internal_static on
6502
6503# TAG: short_icon_urls
6504# If this is enabled Squid will use short URLs for icons.
6505# If disabled it will revert to the old behavior of including
6506# it's own name and port in the URL.
6507#
6508# If you run a complex cache hierarchy with a mix of Squid and
6509# other proxies you may need to disable this directive.
6510#Default:
6511# short_icon_urls on
6512
6513# ERROR PAGE OPTIONS
6514# -----------------------------------------------------------------------------
6515
6516# TAG: error_directory
6517# If you wish to create your own versions of the default
6518# error files to customize them to suit your company copy
6519# the error/template files to another directory and point
6520# this tag at them.
6521#
6522# WARNING: This option will disable multi-language support
6523# on error pages if used.
6524#
6525# The squid developers are interested in making squid available in
6526# a wide variety of languages. If you are making translations for a
6527# language that Squid does not currently provide please consider
6528# contributing your translation back to the project.
6529# http://wiki.squid-cache.org/Translations
6530#
6531# The squid developers working on translations are happy to supply drop-in
6532# translated error files in exchange for any new language contributions.
6533#Default:
6534# Send error pages in the clients preferred language
6535
6536# TAG: error_default_language
6537# Set the default language which squid will send error pages in
6538# if no existing translation matches the clients language
6539# preferences.
6540#
6541# If unset (default) generic English will be used.
6542#
6543# The squid developers are interested in making squid available in
6544# a wide variety of languages. If you are interested in making
6545# translations for any language see the squid wiki for details.
6546# http://wiki.squid-cache.org/Translations
6547#Default:
6548# Generate English language pages.
6549
6550# TAG: error_log_languages
6551# Log to cache.log what languages users are attempting to
6552# auto-negotiate for translations.
6553#
6554# Successful negotiations are not logged. Only failures
6555# have meaning to indicate that Squid may need an upgrade
6556# of its error page translations.
6557#Default:
6558# error_log_languages on
6559
6560# TAG: err_page_stylesheet
6561# CSS Stylesheet to pattern the display of Squid default error pages.
6562#
6563# For information on CSS see http://www.w3.org/Style/CSS/
6564#Default:
6565# err_page_stylesheet /etc/squid/errorpage.css
6566
6567# TAG: err_html_text
6568# HTML text to include in error messages. Make this a "mailto"
6569# URL to your admin address, or maybe just a link to your
6570# organizations Web page.
6571#
6572# To include this in your error messages, you must rewrite
6573# the error template files (found in the "errors" directory).
6574# Wherever you want the 'err_html_text' line to appear,
6575# insert a %L tag in the error template file.
6576#Default:
6577# none
6578
6579# TAG: email_err_data on|off
6580# If enabled, information about the occurred error will be
6581# included in the mailto links of the ERR pages (if %W is set)
6582# so that the email body contains the data.
6583# Syntax is <A HREF="mailto:%w%W">%w</A>
6584#Default:
6585# email_err_data on
6586
6587# TAG: deny_info
6588# Usage: deny_info err_page_name acl
6589# or deny_info http://... acl
6590# or deny_info TCP_RESET acl
6591#
6592# This can be used to return a ERR_ page for requests which
6593# do not pass the 'http_access' rules. Squid remembers the last
6594# acl it evaluated in http_access, and if a 'deny_info' line exists
6595# for that ACL Squid returns a corresponding error page.
6596#
6597# The acl is typically the last acl on the http_access deny line which
6598# denied access. The exceptions to this rule are:
6599# - When Squid needs to request authentication credentials. It's then
6600# the first authentication related acl encountered
6601# - When none of the http_access lines matches. It's then the last
6602# acl processed on the last http_access line.
6603# - When the decision to deny access was made by an adaptation service,
6604# the acl name is the corresponding eCAP or ICAP service_name.
6605#
6606# NP: If providing your own custom error pages with error_directory
6607# you may also specify them by your custom file name:
6608# Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
6609#
6610# By defaut Squid will send "403 Forbidden". A different 4xx or 5xx
6611# may be specified by prefixing the file name with the code and a colon.
6612# e.g. 404:ERR_CUSTOM_ACCESS_DENIED
6613#
6614# Alternatively you can tell Squid to reset the TCP connection
6615# by specifying TCP_RESET.
6616#
6617# Or you can specify an error URL or URL pattern. The browsers will
6618# get redirected to the specified URL after formatting tags have
6619# been replaced. Redirect will be done with 302 or 307 according to
6620# HTTP/1.1 specs. A different 3xx code may be specified by prefixing
6621# the URL. e.g. 303:http://example.com/
6622#
6623# URL FORMAT TAGS:
6624# %a - username (if available. Password NOT included)
6625# %B - FTP path URL
6626# %e - Error number
6627# %E - Error description
6628# %h - Squid hostname
6629# %H - Request domain name
6630# %i - Client IP Address
6631# %M - Request Method
6632# %o - Message result from external ACL helper
6633# %p - Request Port number
6634# %P - Request Protocol name
6635# %R - Request URL path
6636# %T - Timestamp in RFC 1123 format
6637# %U - Full canonical URL from client
6638# (HTTPS URLs terminate with *)
6639# %u - Full canonical URL from client
6640# %w - Admin email from squid.conf
6641# %x - Error name
6642# %% - Literal percent (%) code
6643#
6644#Default:
6645# none
6646
6647# OPTIONS INFLUENCING REQUEST FORWARDING
6648# -----------------------------------------------------------------------------
6649
6650# TAG: nonhierarchical_direct
6651# By default, Squid will send any non-hierarchical requests
6652# (not cacheable request type) direct to origin servers.
6653#
6654# When this is set to "off", Squid will prefer to send these
6655# requests to parents.
6656#
6657# Note that in most configurations, by turning this off you will only
6658# add latency to these request without any improvement in global hit
6659# ratio.
6660#
6661# This option only sets a preference. If the parent is unavailable a
6662# direct connection to the origin server may still be attempted. To
6663# completely prevent direct connections use never_direct.
6664#Default:
6665# nonhierarchical_direct on
6666
6667# TAG: prefer_direct
6668# Normally Squid tries to use parents for most requests. If you for some
6669# reason like it to first try going direct and only use a parent if
6670# going direct fails set this to on.
6671#
6672# By combining nonhierarchical_direct off and prefer_direct on you
6673# can set up Squid to use a parent as a backup path if going direct
6674# fails.
6675#
6676# Note: If you want Squid to use parents for all requests see
6677# the never_direct directive. prefer_direct only modifies how Squid
6678# acts on cacheable requests.
6679#Default:
6680# prefer_direct off
6681
6682# TAG: cache_miss_revalidate on|off
6683# RFC 7232 defines a conditional request mechanism to prevent
6684# response objects being unnecessarily transferred over the network.
6685# If that mechanism is used by the client and a cache MISS occurs
6686# it can prevent new cache entries being created.
6687#
6688# This option determines whether Squid on cache MISS will pass the
6689# client revalidation request to the server or tries to fetch new
6690# content for caching. It can be useful while the cache is mostly
6691# empty to more quickly have the cache populated by generating
6692# non-conditional GETs.
6693#
6694# When set to 'on' (default), Squid will pass all client If-* headers
6695# to the server. This permits server responses without a cacheable
6696# payload to be delivered and on MISS no new cache entry is created.
6697#
6698# When set to 'off' and if the request is cacheable, Squid will
6699# remove the clients If-Modified-Since and If-None-Match headers from
6700# the request sent to the server. This requests a 200 status response
6701# from the server to create a new cache entry with.
6702#Default:
6703# cache_miss_revalidate on
6704
6705# TAG: always_direct
6706# Usage: always_direct allow|deny [!]aclname ...
6707#
6708# Here you can use ACL elements to specify requests which should
6709# ALWAYS be forwarded by Squid to the origin servers without using
6710# any peers. For example, to always directly forward requests for
6711# local servers ignoring any parents or siblings you may have use
6712# something like:
6713#
6714# acl local-servers dstdomain my.domain.net
6715# always_direct allow local-servers
6716#
6717# To always forward FTP requests directly, use
6718#
6719# acl FTP proto FTP
6720# always_direct allow FTP
6721#
6722# NOTE: There is a similar, but opposite option named
6723# 'never_direct'. You need to be aware that "always_direct deny
6724# foo" is NOT the same thing as "never_direct allow foo". You
6725# may need to use a deny rule to exclude a more-specific case of
6726# some other rule. Example:
6727#
6728# acl local-external dstdomain external.foo.net
6729# acl local-servers dstdomain .foo.net
6730# always_direct deny local-external
6731# always_direct allow local-servers
6732#
6733# NOTE: If your goal is to make the client forward the request
6734# directly to the origin server bypassing Squid then this needs
6735# to be done in the client configuration. Squid configuration
6736# can only tell Squid how Squid should fetch the object.
6737#
6738# NOTE: This directive is not related to caching. The replies
6739# is cached as usual even if you use always_direct. To not cache
6740# the replies see the 'cache' directive.
6741#
6742# This clause supports both fast and slow acl types.
6743# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6744#Default:
6745# Prevent any cache_peer being used for this request.
6746
6747# TAG: never_direct
6748# Usage: never_direct allow|deny [!]aclname ...
6749#
6750# never_direct is the opposite of always_direct. Please read
6751# the description for always_direct if you have not already.
6752#
6753# With 'never_direct' you can use ACL elements to specify
6754# requests which should NEVER be forwarded directly to origin
6755# servers. For example, to force the use of a proxy for all
6756# requests, except those in your local domain use something like:
6757#
6758# acl local-servers dstdomain .foo.net
6759# never_direct deny local-servers
6760# never_direct allow all
6761#
6762# or if Squid is inside a firewall and there are local intranet
6763# servers inside the firewall use something like:
6764#
6765# acl local-intranet dstdomain .foo.net
6766# acl local-external dstdomain external.foo.net
6767# always_direct deny local-external
6768# always_direct allow local-intranet
6769# never_direct allow all
6770#
6771# This clause supports both fast and slow acl types.
6772# See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6773#Default:
6774# Allow DNS results to be used for this request.
6775
6776# ADVANCED NETWORKING OPTIONS
6777# -----------------------------------------------------------------------------
6778
6779# TAG: incoming_udp_average
6780# Heavy voodoo here. I can't even believe you are reading this.
6781# Are you crazy? Don't even think about adjusting these unless
6782# you understand the algorithms in comm_select.c first!
6783#Default:
6784# incoming_udp_average 6
6785
6786# TAG: incoming_tcp_average
6787# Heavy voodoo here. I can't even believe you are reading this.
6788# Are you crazy? Don't even think about adjusting these unless
6789# you understand the algorithms in comm_select.c first!
6790#Default:
6791# incoming_tcp_average 4
6792
6793# TAG: incoming_dns_average
6794# Heavy voodoo here. I can't even believe you are reading this.
6795# Are you crazy? Don't even think about adjusting these unless
6796# you understand the algorithms in comm_select.c first!
6797#Default:
6798# incoming_dns_average 4
6799
6800# TAG: min_udp_poll_cnt
6801# Heavy voodoo here. I can't even believe you are reading this.
6802# Are you crazy? Don't even think about adjusting these unless
6803# you understand the algorithms in comm_select.c first!
6804#Default:
6805# min_udp_poll_cnt 8
6806
6807# TAG: min_dns_poll_cnt
6808# Heavy voodoo here. I can't even believe you are reading this.
6809# Are you crazy? Don't even think about adjusting these unless
6810# you understand the algorithms in comm_select.c first!
6811#Default:
6812# min_dns_poll_cnt 8
6813
6814# TAG: min_tcp_poll_cnt
6815# Heavy voodoo here. I can't even believe you are reading this.
6816# Are you crazy? Don't even think about adjusting these unless
6817# you understand the algorithms in comm_select.c first!
6818#Default:
6819# min_tcp_poll_cnt 8
6820
6821# TAG: accept_filter
6822# FreeBSD:
6823#
6824# The name of an accept(2) filter to install on Squid's
6825# listen socket(s). This feature is perhaps specific to
6826# FreeBSD and requires support in the kernel.
6827#
6828# The 'httpready' filter delays delivering new connections
6829# to Squid until a full HTTP request has been received.
6830# See the accf_http(9) man page for details.
6831#
6832# The 'dataready' filter delays delivering new connections
6833# to Squid until there is some data to process.
6834# See the accf_dataready(9) man page for details.
6835#
6836# Linux:
6837#
6838# The 'data' filter delays delivering of new connections
6839# to Squid until there is some data to process by TCP_ACCEPT_DEFER.
6840# You may optionally specify a number of seconds to wait by
6841# 'data=N' where N is the number of seconds. Defaults to 30
6842# if not specified. See the tcp(7) man page for details.
6843#EXAMPLE:
6844## FreeBSD
6845#accept_filter httpready
6846## Linux
6847#accept_filter data
6848#Default:
6849# none
6850
6851# TAG: client_ip_max_connections
6852# Set an absolute limit on the number of connections a single
6853# client IP can use. Any more than this and Squid will begin to drop
6854# new connections from the client until it closes some links.
6855#
6856# Note that this is a global limit. It affects all HTTP, HTCP, Gopher and FTP
6857# connections from the client. For finer control use the ACL access controls.
6858#
6859# Requires client_db to be enabled (the default).
6860#
6861# WARNING: This may noticably slow down traffic received via external proxies
6862# or NAT devices and cause them to rebound error messages back to their clients.
6863#Default:
6864# No limit.
6865
6866# TAG: tcp_recv_bufsize (bytes)
6867# Size of receive buffer to set for TCP sockets. Probably just
6868# as easy to change your kernel's default.
6869# Omit from squid.conf to use the default buffer size.
6870#Default:
6871# Use operating system TCP defaults.
6872
6873# ICAP OPTIONS
6874# -----------------------------------------------------------------------------
6875
6876# TAG: icap_enable on|off
6877# If you want to enable the ICAP module support, set this to on.
6878#Default:
6879# icap_enable off
6880
6881# TAG: icap_connect_timeout
6882# This parameter specifies how long to wait for the TCP connect to
6883# the requested ICAP server to complete before giving up and either
6884# terminating the HTTP transaction or bypassing the failure.
6885#
6886# The default for optional services is peer_connect_timeout.
6887# The default for essential services is connect_timeout.
6888# If this option is explicitly set, its value applies to all services.
6889#Default:
6890# none
6891
6892# TAG: icap_io_timeout time-units
6893# This parameter specifies how long to wait for an I/O activity on
6894# an established, active ICAP connection before giving up and
6895# either terminating the HTTP transaction or bypassing the
6896# failure.
6897#Default:
6898# Use read_timeout.
6899
6900# TAG: icap_service_failure_limit limit [in memory-depth time-units]
6901# The limit specifies the number of failures that Squid tolerates
6902# when establishing a new TCP connection with an ICAP service. If
6903# the number of failures exceeds the limit, the ICAP service is
6904# not used for new ICAP requests until it is time to refresh its
6905# OPTIONS.
6906#
6907# A negative value disables the limit. Without the limit, an ICAP
6908# service will not be considered down due to connectivity failures
6909# between ICAP OPTIONS requests.
6910#
6911# Squid forgets ICAP service failures older than the specified
6912# value of memory-depth. The memory fading algorithm
6913# is approximate because Squid does not remember individual
6914# errors but groups them instead, splitting the option
6915# value into ten time slots of equal length.
6916#
6917# When memory-depth is 0 and by default this option has no
6918# effect on service failure expiration.
6919#
6920# Squid always forgets failures when updating service settings
6921# using an ICAP OPTIONS transaction, regardless of this option
6922# setting.
6923#
6924# For example,
6925# # suspend service usage after 10 failures in 5 seconds:
6926# icap_service_failure_limit 10 in 5 seconds
6927#Default:
6928# icap_service_failure_limit 10
6929
6930# TAG: icap_service_revival_delay
6931# The delay specifies the number of seconds to wait after an ICAP
6932# OPTIONS request failure before requesting the options again. The
6933# failed ICAP service is considered "down" until fresh OPTIONS are
6934# fetched.
6935#
6936# The actual delay cannot be smaller than the hardcoded minimum
6937# delay of 30 seconds.
6938#Default:
6939# icap_service_revival_delay 180
6940
6941# TAG: icap_preview_enable on|off
6942# The ICAP Preview feature allows the ICAP server to handle the
6943# HTTP message by looking only at the beginning of the message body
6944# or even without receiving the body at all. In some environments,
6945# previews greatly speedup ICAP processing.
6946#
6947# During an ICAP OPTIONS transaction, the server may tell Squid what
6948# HTTP messages should be previewed and how big the preview should be.
6949# Squid will not use Preview if the server did not request one.
6950#
6951# To disable ICAP Preview for all ICAP services, regardless of
6952# individual ICAP server OPTIONS responses, set this option to "off".
6953#Example:
6954#icap_preview_enable off
6955#Default:
6956# icap_preview_enable on
6957
6958# TAG: icap_preview_size
6959# The default size of preview data to be sent to the ICAP server.
6960# This value might be overwritten on a per server basis by OPTIONS requests.
6961#Default:
6962# No preview sent.
6963
6964# TAG: icap_206_enable on|off
6965# 206 (Partial Content) responses is an ICAP extension that allows the
6966# ICAP agents to optionally combine adapted and original HTTP message
6967# content. The decision to combine is postponed until the end of the
6968# ICAP response. Squid supports Partial Content extension by default.
6969#
6970# Activation of the Partial Content extension is negotiated with each
6971# ICAP service during OPTIONS exchange. Most ICAP servers should handle
6972# negotation correctly even if they do not support the extension, but
6973# some might fail. To disable Partial Content support for all ICAP
6974# services and to avoid any negotiation, set this option to "off".
6975#
6976# Example:
6977# icap_206_enable off
6978#Default:
6979# icap_206_enable on
6980
6981# TAG: icap_default_options_ttl
6982# The default TTL value for ICAP OPTIONS responses that don't have
6983# an Options-TTL header.
6984#Default:
6985# icap_default_options_ttl 60
6986
6987# TAG: icap_persistent_connections on|off
6988# Whether or not Squid should use persistent connections to
6989# an ICAP server.
6990#Default:
6991# icap_persistent_connections on
6992
6993# TAG: adaptation_send_client_ip on|off
6994# If enabled, Squid shares HTTP client IP information with adaptation
6995# services. For ICAP, Squid adds the X-Client-IP header to ICAP requests.
6996# For eCAP, Squid sets the libecap::metaClientIp transaction option.
6997#
6998# See also: adaptation_uses_indirect_client
6999#Default:
7000# adaptation_send_client_ip off
7001
7002# TAG: adaptation_send_username on|off
7003# This sends authenticated HTTP client username (if available) to
7004# the adaptation service.
7005#
7006# For ICAP, the username value is encoded based on the
7007# icap_client_username_encode option and is sent using the header
7008# specified by the icap_client_username_header option.
7009#Default:
7010# adaptation_send_username off
7011
7012# TAG: icap_client_username_header
7013# ICAP request header name to use for adaptation_send_username.
7014#Default:
7015# icap_client_username_header X-Client-Username
7016
7017# TAG: icap_client_username_encode on|off
7018# Whether to base64 encode the authenticated client username.
7019#Default:
7020# icap_client_username_encode off
7021
7022# TAG: icap_service
7023# Defines a single ICAP service using the following format:
7024#
7025# icap_service id vectoring_point uri [option ...]
7026#
7027# id: ID
7028# an opaque identifier or name which is used to direct traffic to
7029# this specific service. Must be unique among all adaptation
7030# services in squid.conf.
7031#
7032# vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
7033# This specifies at which point of transaction processing the
7034# ICAP service should be activated. *_postcache vectoring points
7035# are not yet supported.
7036#
7037# uri: icap://servername:port/servicepath
7038# ICAP server and service location.
7039#
7040# ICAP does not allow a single service to handle both REQMOD and RESPMOD
7041# transactions. Squid does not enforce that requirement. You can specify
7042# services with the same service_url and different vectoring_points. You
7043# can even specify multiple identical services as long as their
7044# service_names differ.
7045#
7046# To activate a service, use the adaptation_access directive. To group
7047# services, use adaptation_service_chain and adaptation_service_set.
7048#
7049# Service options are separated by white space. ICAP services support
7050# the following name=value options:
7051#
7052# bypass=on|off|1|0
7053# If set to 'on' or '1', the ICAP service is treated as
7054# optional. If the service cannot be reached or malfunctions,
7055# Squid will try to ignore any errors and process the message as
7056# if the service was not enabled. No all ICAP errors can be
7057# bypassed. If set to 0, the ICAP service is treated as
7058# essential and all ICAP errors will result in an error page
7059# returned to the HTTP client.
7060#
7061# Bypass is off by default: services are treated as essential.
7062#
7063# routing=on|off|1|0
7064# If set to 'on' or '1', the ICAP service is allowed to
7065# dynamically change the current message adaptation plan by
7066# returning a chain of services to be used next. The services
7067# are specified using the X-Next-Services ICAP response header
7068# value, formatted as a comma-separated list of service names.
7069# Each named service should be configured in squid.conf. Other
7070# services are ignored. An empty X-Next-Services value results
7071# in an empty plan which ends the current adaptation.
7072#
7073# Dynamic adaptation plan may cross or cover multiple supported
7074# vectoring points in their natural processing order.
7075#
7076# Routing is not allowed by default: the ICAP X-Next-Services
7077# response header is ignored.
7078#
7079# ipv6=on|off
7080# Only has effect on split-stack systems. The default on those systems
7081# is to use IPv4-only connections. When set to 'on' this option will
7082# make Squid use IPv6-only connections to contact this ICAP service.
7083#
7084# on-overload=block|bypass|wait|force
7085# If the service Max-Connections limit has been reached, do
7086# one of the following for each new ICAP transaction:
7087# * block: send an HTTP error response to the client
7088# * bypass: ignore the "over-connected" ICAP service
7089# * wait: wait (in a FIFO queue) for an ICAP connection slot
7090# * force: proceed, ignoring the Max-Connections limit
7091#
7092# In SMP mode with N workers, each worker assumes the service
7093# connection limit is Max-Connections/N, even though not all
7094# workers may use a given service.
7095#
7096# The default value is "bypass" if service is bypassable,
7097# otherwise it is set to "wait".
7098#
7099#
7100# max-conn=number
7101# Use the given number as the Max-Connections limit, regardless
7102# of the Max-Connections value given by the service, if any.
7103#
7104# Older icap_service format without optional named parameters is
7105# deprecated but supported for backward compatibility.
7106#
7107#Example:
7108#icap_service svcBlocker reqmod_precache icap://icap1.mydomain.net:1344/reqmod bypass=0
7109#icap_service svcLogger reqmod_precache icap://icap2.mydomain.net:1344/respmod routing=on
7110#Default:
7111# none
7112
7113# TAG: icap_class
7114# This deprecated option was documented to define an ICAP service
7115# chain, even though it actually defined a set of similar, redundant
7116# services, and the chains were not supported.
7117#
7118# To define a set of redundant services, please use the
7119# adaptation_service_set directive. For service chains, use
7120# adaptation_service_chain.
7121#Default:
7122# none
7123
7124# TAG: icap_access
7125# This option is deprecated. Please use adaptation_access, which
7126# has the same ICAP functionality, but comes with better
7127# documentation, and eCAP support.
7128#Default:
7129# none
7130
7131# eCAP OPTIONS
7132# -----------------------------------------------------------------------------
7133
7134# TAG: ecap_enable on|off
7135# Controls whether eCAP support is enabled.
7136#Default:
7137# ecap_enable off
7138
7139# TAG: ecap_service
7140# Defines a single eCAP service
7141#
7142# ecap_service id vectoring_point uri [option ...]
7143#
7144# id: ID
7145# an opaque identifier or name which is used to direct traffic to
7146# this specific service. Must be unique among all adaptation
7147# services in squid.conf.
7148#
7149# vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
7150# This specifies at which point of transaction processing the
7151# eCAP service should be activated. *_postcache vectoring points
7152# are not yet supported.
7153#
7154# uri: ecap://vendor/service_name?custom&cgi=style¶meters=optional
7155# Squid uses the eCAP service URI to match this configuration
7156# line with one of the dynamically loaded services. Each loaded
7157# eCAP service must have a unique URI. Obtain the right URI from
7158# the service provider.
7159#
7160# To activate a service, use the adaptation_access directive. To group
7161# services, use adaptation_service_chain and adaptation_service_set.
7162#
7163# Service options are separated by white space. eCAP services support
7164# the following name=value options:
7165#
7166# bypass=on|off|1|0
7167# If set to 'on' or '1', the eCAP service is treated as optional.
7168# If the service cannot be reached or malfunctions, Squid will try
7169# to ignore any errors and process the message as if the service
7170# was not enabled. No all eCAP errors can be bypassed.
7171# If set to 'off' or '0', the eCAP service is treated as essential
7172# and all eCAP errors will result in an error page returned to the
7173# HTTP client.
7174#
7175# Bypass is off by default: services are treated as essential.
7176#
7177# routing=on|off|1|0
7178# If set to 'on' or '1', the eCAP service is allowed to
7179# dynamically change the current message adaptation plan by
7180# returning a chain of services to be used next.
7181#
7182# Dynamic adaptation plan may cross or cover multiple supported
7183# vectoring points in their natural processing order.
7184#
7185# Routing is not allowed by default.
7186#
7187# Older ecap_service format without optional named parameters is
7188# deprecated but supported for backward compatibility.
7189#
7190#
7191#Example:
7192#ecap_service s1 reqmod_precache ecap://filters.R.us/leakDetector?on_error=block bypass=off
7193#ecap_service s2 respmod_precache ecap://filters.R.us/virusFilter config=/etc/vf.cfg bypass=on
7194#Default:
7195# none
7196
7197# TAG: loadable_modules
7198# Instructs Squid to load the specified dynamic module(s) or activate
7199# preloaded module(s).
7200#Example:
7201#loadable_modules /usr/lib/MinimalAdapter.so
7202#Default:
7203# none
7204
7205# MESSAGE ADAPTATION OPTIONS
7206# -----------------------------------------------------------------------------
7207
7208# TAG: adaptation_service_set
7209#
7210# Configures an ordered set of similar, redundant services. This is
7211# useful when hot standby or backup adaptation servers are available.
7212#
7213# adaptation_service_set set_name service_name1 service_name2 ...
7214#
7215# The named services are used in the set declaration order. The first
7216# applicable adaptation service from the set is used first. The next
7217# applicable service is tried if and only if the transaction with the
7218# previous service fails and the message waiting to be adapted is still
7219# intact.
7220#
7221# When adaptation starts, broken services are ignored as if they were
7222# not a part of the set. A broken service is a down optional service.
7223#
7224# The services in a set must be attached to the same vectoring point
7225# (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
7226#
7227# If all services in a set are optional then adaptation failures are
7228# bypassable. If all services in the set are essential, then a
7229# transaction failure with one service may still be retried using
7230# another service from the set, but when all services fail, the master
7231# transaction fails as well.
7232#
7233# A set may contain a mix of optional and essential services, but that
7234# is likely to lead to surprising results because broken services become
7235# ignored (see above), making previously bypassable failures fatal.
7236# Technically, it is the bypassability of the last failed service that
7237# matters.
7238#
7239# See also: adaptation_access adaptation_service_chain
7240#
7241#Example:
7242#adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup
7243#adaptation service_set svcLogger loggerLocal loggerRemote
7244#Default:
7245# none
7246
7247# TAG: adaptation_service_chain
7248#
7249# Configures a list of complementary services that will be applied
7250# one-by-one, forming an adaptation chain or pipeline. This is useful
7251# when Squid must perform different adaptations on the same message.
7252#
7253# adaptation_service_chain chain_name service_name1 svc_name2 ...
7254#
7255# The named services are used in the chain declaration order. The first
7256# applicable adaptation service from the chain is used first. The next
7257# applicable service is applied to the successful adaptation results of
7258# the previous service in the chain.
7259#
7260# When adaptation starts, broken services are ignored as if they were
7261# not a part of the chain. A broken service is a down optional service.
7262#
7263# Request satisfaction terminates the adaptation chain because Squid
7264# does not currently allow declaration of RESPMOD services at the
7265# "reqmod_precache" vectoring point (see icap_service or ecap_service).
7266#
7267# The services in a chain must be attached to the same vectoring point
7268# (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
7269#
7270# A chain may contain a mix of optional and essential services. If an
7271# essential adaptation fails (or the failure cannot be bypassed for
7272# other reasons), the master transaction fails. Otherwise, the failure
7273# is bypassed as if the failed adaptation service was not in the chain.
7274#
7275# See also: adaptation_access adaptation_service_set
7276#
7277#Example:
7278#adaptation_service_chain svcRequest requestLogger urlFilter leakDetector
7279#Default:
7280# none
7281
7282# TAG: adaptation_access
7283# Sends an HTTP transaction to an ICAP or eCAP adaptation service.
7284#
7285# adaptation_access service_name allow|deny [!]aclname...
7286# adaptation_access set_name allow|deny [!]aclname...
7287#
7288# At each supported vectoring point, the adaptation_access
7289# statements are processed in the order they appear in this
7290# configuration file. Statements pointing to the following services
7291# are ignored (i.e., skipped without checking their ACL):
7292#
7293# - services serving different vectoring points
7294# - "broken-but-bypassable" services
7295# - "up" services configured to ignore such transactions
7296# (e.g., based on the ICAP Transfer-Ignore header).
7297#
7298# When a set_name is used, all services in the set are checked
7299# using the same rules, to find the first applicable one. See
7300# adaptation_service_set for details.
7301#
7302# If an access list is checked and there is a match, the
7303# processing stops: For an "allow" rule, the corresponding
7304# adaptation service is used for the transaction. For a "deny"
7305# rule, no adaptation service is activated.
7306#
7307# It is currently not possible to apply more than one adaptation
7308# service at the same vectoring point to the same HTTP transaction.
7309#
7310# See also: icap_service and ecap_service
7311#
7312#Example:
7313#adaptation_access service_1 allow all
7314#Default:
7315# Allow, unless rules exist in squid.conf.
7316
7317# TAG: adaptation_service_iteration_limit
7318# Limits the number of iterations allowed when applying adaptation
7319# services to a message. If your longest adaptation set or chain
7320# may have more than 16 services, increase the limit beyond its
7321# default value of 16. If detecting infinite iteration loops sooner
7322# is critical, make the iteration limit match the actual number
7323# of services in your longest adaptation set or chain.
7324#
7325# Infinite adaptation loops are most likely with routing services.
7326#
7327# See also: icap_service routing=1
7328#Default:
7329# adaptation_service_iteration_limit 16
7330
7331# TAG: adaptation_masterx_shared_names
7332# For each master transaction (i.e., the HTTP request and response
7333# sequence, including all related ICAP and eCAP exchanges), Squid
7334# maintains a table of metadata. The table entries are (name, value)
7335# pairs shared among eCAP and ICAP exchanges. The table is destroyed
7336# with the master transaction.
7337#
7338# This option specifies the table entry names that Squid must accept
7339# from and forward to the adaptation transactions.
7340#
7341# An ICAP REQMOD or RESPMOD transaction may set an entry in the
7342# shared table by returning an ICAP header field with a name
7343# specified in adaptation_masterx_shared_names.
7344#
7345# An eCAP REQMOD or RESPMOD transaction may set an entry in the
7346# shared table by implementing the libecap::visitEachOption() API
7347# to provide an option with a name specified in
7348# adaptation_masterx_shared_names.
7349#
7350# Squid will store and forward the set entry to subsequent adaptation
7351# transactions within the same master transaction scope.
7352#
7353# Only one shared entry name is supported at this time.
7354#
7355#Example:
7356## share authentication information among ICAP services
7357#adaptation_masterx_shared_names X-Subscriber-ID
7358#Default:
7359# none
7360
7361# TAG: adaptation_meta
7362# This option allows Squid administrator to add custom ICAP request
7363# headers or eCAP options to Squid ICAP requests or eCAP transactions.
7364# Use it to pass custom authentication tokens and other
7365# transaction-state related meta information to an ICAP/eCAP service.
7366#
7367# The addition of a meta header is ACL-driven:
7368# adaptation_meta name value [!]aclname ...
7369#
7370# Processing for a given header name stops after the first ACL list match.
7371# Thus, it is impossible to add two headers with the same name. If no ACL
7372# lists match for a given header name, no such header is added. For
7373# example:
7374#
7375# # do not debug transactions except for those that need debugging
7376# adaptation_meta X-Debug 1 needs_debugging
7377#
7378# # log all transactions except for those that must remain secret
7379# adaptation_meta X-Log 1 !keep_secret
7380#
7381# # mark transactions from users in the "G 1" group
7382# adaptation_meta X-Authenticated-Groups "G 1" authed_as_G1
7383#
7384# The "value" parameter may be a regular squid.conf token or a "double
7385# quoted string". Within the quoted string, use backslash (\) to escape
7386# any character, which is currently only useful for escaping backslashes
7387# and double quotes. For example,
7388# "this string has one backslash (\\) and two \"quotes\""
7389#
7390# Used adaptation_meta header values may be logged via %note
7391# logformat code. If multiple adaptation_meta headers with the same name
7392# are used during master transaction lifetime, the header values are
7393# logged in the order they were used and duplicate values are ignored
7394# (only the first repeated value will be logged).
7395#Default:
7396# none
7397
7398# TAG: icap_retry
7399# This ACL determines which retriable ICAP transactions are
7400# retried. Transactions that received a complete ICAP response
7401# and did not have to consume or produce HTTP bodies to receive
7402# that response are usually retriable.
7403#
7404# icap_retry allow|deny [!]aclname ...
7405#
7406# Squid automatically retries some ICAP I/O timeouts and errors
7407# due to persistent connection race conditions.
7408#
7409# See also: icap_retry_limit
7410#Default:
7411# icap_retry deny all
7412
7413# TAG: icap_retry_limit
7414# Limits the number of retries allowed.
7415#
7416# Communication errors due to persistent connection race
7417# conditions are unavoidable, automatically retried, and do not
7418# count against this limit.
7419#
7420# See also: icap_retry
7421#Default:
7422# No retries are allowed.
7423
7424# DNS OPTIONS
7425# -----------------------------------------------------------------------------
7426
7427# TAG: check_hostnames
7428# For security and stability reasons Squid can check
7429# hostnames for Internet standard RFC compliance. If you want
7430# Squid to perform these checks turn this directive on.
7431#Default:
7432# check_hostnames off
7433
7434# TAG: allow_underscore
7435# Underscore characters is not strictly allowed in Internet hostnames
7436# but nevertheless used by many sites. Set this to off if you want
7437# Squid to be strict about the standard.
7438# This check is performed only when check_hostnames is set to on.
7439#Default:
7440# allow_underscore on
7441
7442# TAG: dns_retransmit_interval
7443# Initial retransmit interval for DNS queries. The interval is
7444# doubled each time all configured DNS servers have been tried.
7445#Default:
7446# dns_retransmit_interval 5 seconds
7447
7448# TAG: dns_timeout
7449# DNS Query timeout. If no response is received to a DNS query
7450# within this time all DNS servers for the queried domain
7451# are assumed to be unavailable.
7452#Default:
7453# dns_timeout 30 seconds
7454
7455# TAG: dns_packet_max
7456# Maximum number of bytes packet size to advertise via EDNS.
7457# Set to "none" to disable EDNS large packet support.
7458#
7459# For legacy reasons DNS UDP replies will default to 512 bytes which
7460# is too small for many responses. EDNS provides a means for Squid to
7461# negotiate receiving larger responses back immediately without having
7462# to failover with repeat requests. Responses larger than this limit
7463# will retain the old behaviour of failover to TCP DNS.
7464#
7465# Squid has no real fixed limit internally, but allowing packet sizes
7466# over 1500 bytes requires network jumbogram support and is usually not
7467# necessary.
7468#
7469# WARNING: The RFC also indicates that some older resolvers will reply
7470# with failure of the whole request if the extension is added. Some
7471# resolvers have already been identified which will reply with mangled
7472# EDNS response on occasion. Usually in response to many-KB jumbogram
7473# sizes being advertised by Squid.
7474# Squid will currently treat these both as an unable-to-resolve domain
7475# even if it would be resolvable without EDNS.
7476#Default:
7477# EDNS disabled
7478
7479# TAG: dns_defnames on|off
7480# Normally the RES_DEFNAMES resolver option is disabled
7481# (see res_init(3)). This prevents caches in a hierarchy
7482# from interpreting single-component hostnames locally. To allow
7483# Squid to handle single-component names, enable this option.
7484#Default:
7485# Search for single-label domain names is disabled.
7486
7487# TAG: dns_multicast_local on|off
7488# When set to on, Squid sends multicast DNS lookups on the local
7489# network for domains ending in .local and .arpa.
7490# This enables local servers and devices to be contacted in an
7491# ad-hoc or zero-configuration network environment.
7492#Default:
7493# Search for .local and .arpa names is disabled.
7494
7495# TAG: dns_nameservers
7496# Use this if you want to specify a list of DNS name servers
7497# (IP addresses) to use instead of those given in your
7498# /etc/resolv.conf file.
7499#
7500# On Windows platforms, if no value is specified here or in
7501# the /etc/resolv.conf file, the list of DNS name servers are
7502# taken from the Windows registry, both static and dynamic DHCP
7503# configurations are supported.
7504#
7505# Example: dns_nameservers 10.0.0.1 192.172.0.4
7506#Default:
7507# Use operating system definitions
7508
7509# TAG: hosts_file
7510# Location of the host-local IP name-address associations
7511# database. Most Operating Systems have such a file on different
7512# default locations:
7513# - Un*X & Linux: /etc/hosts
7514# - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
7515# (%SystemRoot% value install default is c:\winnt)
7516# - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
7517# (%SystemRoot% value install default is c:\windows)
7518# - Windows 9x/Me: %windir%\hosts
7519# (%windir% value is usually c:\windows)
7520# - Cygwin: /etc/hosts
7521#
7522# The file contains newline-separated definitions, in the
7523# form ip_address_in_dotted_form name [name ...] names are
7524# whitespace-separated. Lines beginning with an hash (#)
7525# character are comments.
7526#
7527# The file is checked at startup and upon configuration.
7528# If set to 'none', it won't be checked.
7529# If append_domain is used, that domain will be added to
7530# domain-local (i.e. not containing any dot character) host
7531# definitions.
7532#Default:
7533# hosts_file /etc/hosts
7534
7535# TAG: append_domain
7536# Appends local domain name to hostnames without any dots in
7537# them. append_domain must begin with a period.
7538#
7539# Be warned there are now Internet names with no dots in
7540# them using only top-domain names, so setting this may
7541# cause some Internet sites to become unavailable.
7542#
7543#Example:
7544# append_domain .yourdomain.com
7545#Default:
7546# Use operating system definitions
7547
7548# TAG: ignore_unknown_nameservers
7549# By default Squid checks that DNS responses are received
7550# from the same IP addresses they are sent to. If they
7551# don't match, Squid ignores the response and writes a warning
7552# message to cache.log. You can allow responses from unknown
7553# nameservers by setting this option to 'off'.
7554#Default:
7555# ignore_unknown_nameservers on
7556
7557# TAG: dns_v4_first
7558# With the IPv6 Internet being as fast or faster than IPv4 Internet
7559# for most networks Squid prefers to contact websites over IPv6.
7560#
7561# This option reverses the order of preference to make Squid contact
7562# dual-stack websites over IPv4 first. Squid will still perform both
7563# IPv6 and IPv4 DNS lookups before connecting.
7564#
7565# WARNING:
7566# This option will restrict the situations under which IPv6
7567# connectivity is used (and tested), potentially hiding network
7568# problems which would otherwise be detected and warned about.
7569#Default:
7570# dns_v4_first off
7571
7572# TAG: ipcache_size (number of entries)
7573# Maximum number of DNS IP cache entries.
7574#Default:
7575# ipcache_size 1024
7576
7577# TAG: ipcache_low (percent)
7578#Default:
7579# ipcache_low 90
7580
7581# TAG: ipcache_high (percent)
7582# The size, low-, and high-water marks for the IP cache.
7583#Default:
7584# ipcache_high 95
7585
7586# TAG: fqdncache_size (number of entries)
7587# Maximum number of FQDN cache entries.
7588#Default:
7589# fqdncache_size 1024
7590
7591# MISCELLANEOUS
7592# -----------------------------------------------------------------------------
7593
7594# TAG: configuration_includes_quoted_values on|off
7595# If set, Squid will recognize each "quoted string" after a configuration
7596# directive as a single parameter. The quotes are stripped before the
7597# parameter value is interpreted or used.
7598# See "Values with spaces, quotes, and other special characters"
7599# section for more details.
7600#Default:
7601# configuration_includes_quoted_values off
7602
7603# TAG: memory_pools on|off
7604# If set, Squid will keep pools of allocated (but unused) memory
7605# available for future use. If memory is a premium on your
7606# system and you believe your malloc library outperforms Squid
7607# routines, disable this.
7608#Default:
7609# memory_pools on
7610
7611# TAG: memory_pools_limit (bytes)
7612# Used only with memory_pools on:
7613# memory_pools_limit 50 MB
7614#
7615# If set to a non-zero value, Squid will keep at most the specified
7616# limit of allocated (but unused) memory in memory pools. All free()
7617# requests that exceed this limit will be handled by your malloc
7618# library. Squid does not pre-allocate any memory, just safe-keeps
7619# objects that otherwise would be free()d. Thus, it is safe to set
7620# memory_pools_limit to a reasonably high value even if your
7621# configuration will use less memory.
7622#
7623# If set to none, Squid will keep all memory it can. That is, there
7624# will be no limit on the total amount of memory used for safe-keeping.
7625#
7626# To disable memory allocation optimization, do not set
7627# memory_pools_limit to 0 or none. Set memory_pools to "off" instead.
7628#
7629# An overhead for maintaining memory pools is not taken into account
7630# when the limit is checked. This overhead is close to four bytes per
7631# object kept. However, pools may actually _save_ memory because of
7632# reduced memory thrashing in your malloc library.
7633#Default:
7634# memory_pools_limit 5 MB
7635
7636# TAG: forwarded_for on|off|transparent|truncate|delete
7637# If set to "on", Squid will append your client's IP address
7638# in the HTTP requests it forwards. By default it looks like:
7639#
7640# X-Forwarded-For: 192.1.2.3
7641#
7642# If set to "off", it will appear as
7643#
7644# X-Forwarded-For: unknown
7645#
7646# If set to "transparent", Squid will not alter the
7647# X-Forwarded-For header in any way.
7648#
7649# If set to "delete", Squid will delete the entire
7650# X-Forwarded-For header.
7651#
7652# If set to "truncate", Squid will remove all existing
7653# X-Forwarded-For entries, and place the client IP as the sole entry.
7654#Default:
7655# forwarded_for on
7656
7657# TAG: cachemgr_passwd
7658# Specify passwords for cachemgr operations.
7659#
7660# Usage: cachemgr_passwd password action action ...
7661#
7662# Some valid actions are (see cache manager menu for a full list):
7663# 5min
7664# 60min
7665# asndb
7666# authenticator
7667# cbdata
7668# client_list
7669# comm_incoming
7670# config *
7671# counters
7672# delay
7673# digest_stats
7674# dns
7675# events
7676# filedescriptors
7677# fqdncache
7678# histograms
7679# http_headers
7680# info
7681# io
7682# ipcache
7683# mem
7684# menu
7685# netdb
7686# non_peers
7687# objects
7688# offline_toggle *
7689# pconn
7690# peer_select
7691# reconfigure *
7692# redirector
7693# refresh
7694# server_list
7695# shutdown *
7696# store_digest
7697# storedir
7698# utilization
7699# via_headers
7700# vm_objects
7701#
7702# * Indicates actions which will not be performed without a
7703# valid password, others can be performed if not listed here.
7704#
7705# To disable an action, set the password to "disable".
7706# To allow performing an action without a password, set the
7707# password to "none".
7708#
7709# Use the keyword "all" to set the same password for all actions.
7710#
7711#Example:
7712# cachemgr_passwd secret shutdown
7713# cachemgr_passwd lesssssssecret info stats/objects
7714# cachemgr_passwd disable all
7715#Default:
7716# No password. Actions which require password are denied.
7717
7718# TAG: client_db on|off
7719# If you want to disable collecting per-client statistics,
7720# turn off client_db here.
7721#Default:
7722# client_db on
7723
7724# TAG: refresh_all_ims on|off
7725# When you enable this option, squid will always check
7726# the origin server for an update when a client sends an
7727# If-Modified-Since request. Many browsers use IMS
7728# requests when the user requests a reload, and this
7729# ensures those clients receive the latest version.
7730#
7731# By default (off), squid may return a Not Modified response
7732# based on the age of the cached version.
7733#Default:
7734# refresh_all_ims off
7735
7736# TAG: reload_into_ims on|off
7737# When you enable this option, client no-cache or ``reload''
7738# requests will be changed to If-Modified-Since requests.
7739# Doing this VIOLATES the HTTP standard. Enabling this
7740# feature could make you liable for problems which it
7741# causes.
7742#
7743# see also refresh_pattern for a more selective approach.
7744#Default:
7745# reload_into_ims off
7746
7747# TAG: connect_retries
7748# This sets the maximum number of connection attempts made for each
7749# TCP connection. The connect_retries attempts must all still
7750# complete within the connection timeout period.
7751#
7752# The default is not to re-try if the first connection attempt fails.
7753# The (not recommended) maximum is 10 tries.
7754#
7755# A warning message will be generated if it is set to a too-high
7756# value and the configured value will be over-ridden.
7757#
7758# Note: These re-tries are in addition to forward_max_tries
7759# which limit how many different addresses may be tried to find
7760# a useful server.
7761#Default:
7762# Do not retry failed connections.
7763
7764# TAG: retry_on_error
7765# If set to ON Squid will automatically retry requests when
7766# receiving an error response with status 403 (Forbidden),
7767# 500 (Internal Error), 501 or 503 (Service not available).
7768# Status 502 and 504 (Gateway errors) are always retried.
7769#
7770# This is mainly useful if you are in a complex cache hierarchy to
7771# work around access control errors.
7772#
7773# NOTE: This retry will attempt to find another working destination.
7774# Which is different from the server which just failed.
7775#Default:
7776# retry_on_error off
7777
7778# TAG: as_whois_server
7779# WHOIS server to query for AS numbers. NOTE: AS numbers are
7780# queried only when Squid starts up, not for every request.
7781#Default:
7782# as_whois_server whois.ra.net
7783
7784# TAG: offline_mode
7785# Enable this option and Squid will never try to validate cached
7786# objects.
7787#Default:
7788# offline_mode off
7789
7790# TAG: uri_whitespace
7791# What to do with requests that have whitespace characters in the
7792# URI. Options:
7793#
7794# strip: The whitespace characters are stripped out of the URL.
7795# This is the behavior recommended by RFC2396 and RFC3986
7796# for tolerant handling of generic URI.
7797# NOTE: This is one difference between generic URI and HTTP URLs.
7798#
7799# deny: The request is denied. The user receives an "Invalid
7800# Request" message.
7801# This is the behaviour recommended by RFC2616 for safe
7802# handling of HTTP request URL.
7803#
7804# allow: The request is allowed and the URI is not changed. The
7805# whitespace characters remain in the URI. Note the
7806# whitespace is passed to redirector processes if they
7807# are in use.
7808# Note this may be considered a violation of RFC2616
7809# request parsing where whitespace is prohibited in the
7810# URL field.
7811#
7812# encode: The request is allowed and the whitespace characters are
7813# encoded according to RFC1738.
7814#
7815# chop: The request is allowed and the URI is chopped at the
7816# first whitespace.
7817#
7818#
7819# NOTE the current Squid implementation of encode and chop violates
7820# RFC2616 by not using a 301 redirect after altering the URL.
7821#Default:
7822# uri_whitespace strip
7823
7824# TAG: chroot
7825# Specifies a directory where Squid should do a chroot() while
7826# initializing. This also causes Squid to fully drop root
7827# privileges after initializing. This means, for example, if you
7828# use a HTTP port less than 1024 and try to reconfigure, you may
7829# get an error saying that Squid can not open the port.
7830#Default:
7831# none
7832
7833# TAG: balance_on_multiple_ip
7834# Modern IP resolvers in squid sort lookup results by preferred access.
7835# By default squid will use these IP in order and only rotates to
7836# the next listed when the most preffered fails.
7837#
7838# Some load balancing servers based on round robin DNS have been
7839# found not to preserve user session state across requests
7840# to different IP addresses.
7841#
7842# Enabling this directive Squid rotates IP's per request.
7843#Default:
7844# balance_on_multiple_ip off
7845
7846# TAG: pipeline_prefetch
7847# HTTP clients may send a pipeline of 1+N requests to Squid using a
7848# single connection, without waiting for Squid to respond to the first
7849# of those requests. This option limits the number of concurrent
7850# requests Squid will try to handle in parallel. If set to N, Squid
7851# will try to receive and process up to 1+N requests on the same
7852# connection concurrently.
7853#
7854# Defaults to 0 (off) for bandwidth management and access logging
7855# reasons.
7856#
7857# NOTE: pipelining requires persistent connections to clients.
7858#
7859# WARNING: pipelining breaks NTLM and Negotiate/Kerberos authentication.
7860#Default:
7861# Do not pre-parse pipelined requests.
7862
7863# TAG: high_response_time_warning (msec)
7864# If the one-minute median response time exceeds this value,
7865# Squid prints a WARNING with debug level 0 to get the
7866# administrators attention. The value is in milliseconds.
7867#Default:
7868# disabled.
7869
7870# TAG: high_page_fault_warning
7871# If the one-minute average page fault rate exceeds this
7872# value, Squid prints a WARNING with debug level 0 to get
7873# the administrators attention. The value is in page faults
7874# per second.
7875#Default:
7876# disabled.
7877
7878# TAG: high_memory_warning
7879# Note: This option is only available if Squid is rebuilt with the
7880# GNU Malloc with mstats()
7881#
7882# If the memory usage (as determined by gnumalloc, if available and used)
7883# exceeds this amount, Squid prints a WARNING with debug level 0 to get
7884# the administrators attention.
7885#Default:
7886# disabled.
7887
7888# TAG: sleep_after_fork (microseconds)
7889# When this is set to a non-zero value, the main Squid process
7890# sleeps the specified number of microseconds after a fork()
7891# system call. This sleep may help the situation where your
7892# system reports fork() failures due to lack of (virtual)
7893# memory. Note, however, if you have a lot of child
7894# processes, these sleep delays will add up and your
7895# Squid will not service requests for some amount of time
7896# until all the child processes have been started.
7897# On Windows value less then 1000 (1 milliseconds) are
7898# rounded to 1000.
7899#Default:
7900# sleep_after_fork 0
7901
7902# TAG: windows_ipaddrchangemonitor on|off
7903# Note: This option is only available if Squid is rebuilt with the
7904# MS Windows
7905#
7906# On Windows Squid by default will monitor IP address changes and will
7907# reconfigure itself after any detected event. This is very useful for
7908# proxies connected to internet with dial-up interfaces.
7909# In some cases (a Proxy server acting as VPN gateway is one) it could be
7910# desiderable to disable this behaviour setting this to 'off'.
7911# Note: after changing this, Squid service must be restarted.
7912#Default:
7913# windows_ipaddrchangemonitor on
7914
7915# TAG: eui_lookup
7916# Whether to lookup the EUI or MAC address of a connected client.
7917#Default:
7918# eui_lookup on
7919
7920# TAG: max_filedescriptors
7921# Reduce the maximum number of filedescriptors supported below
7922# the usual operating system defaults.
7923#
7924# Remove from squid.conf to inherit the current ulimit setting.
7925#
7926# Note: Changing this requires a restart of Squid. Also
7927# not all I/O types supports large values (eg on Windows).
7928#Default:
7929# Use operating system limits set by ulimit.