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