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