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