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