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