4164e2d01bd70026ffe3362c2429c4cd56cb8c20
[cacert-puppet.git] / sitemodules / profiles / templates / squid / squid.conf.epp
1 <%- | Array[String] $acls = [],
2 Array[String] $http_access = [],
3 |-%>
4 # THIS FILE IS MANAGED BY PUPPET, MANUAL CHANGES WILL BE OVERWRITTEN AT THE
5 # NEXT PUPPET RUN.
6 #
7 # WELCOME TO SQUID 3.5.23
8 # ----------------------------
9 #
10 # This is the documentation for the Squid configuration file.
11 # This documentation can also be found online at:
12 # http://www.squid-cache.org/Doc/config/
13 #
14 # You may wish to look at the Squid home page and wiki for the
15 # FAQ and other documentation:
16 # http://www.squid-cache.org/
17 # http://wiki.squid-cache.org/SquidFaq
18 # http://wiki.squid-cache.org/ConfigExamples
19 #
20 # This documentation shows what the defaults for various directives
21 # happen to be. If you don't need to change the default, you should
22 # leave the line out of your squid.conf in most cases.
23 #
24 # In some cases "none" refers to no default setting at all,
25 # while in other cases it refers to the value of the option
26 # - the comments for that keyword indicate if this is the case.
27 #
28
29 # Configuration options can be included using the "include" directive.
30 # Include takes a list of files to include. Quoting and wildcards are
31 # supported.
32 #
33 # For example,
34 #
35 # include /path/to/included/file/squid.acl.config
36 #
37 # Includes can be nested up to a hard-coded depth of 16 levels.
38 # This arbitrary restriction is to prevent recursive include references
39 # from causing Squid entering an infinite loop whilst trying to load
40 # configuration files.
41 #
42 # Values with byte units
43 #
44 # Squid accepts size units on some size related directives. All
45 # such directives are documented with a default value displaying
46 # a unit.
47 #
48 # Units accepted by Squid are:
49 # bytes - byte
50 # KB - Kilobyte (1024 bytes)
51 # MB - Megabyte
52 # GB - Gigabyte
53 #
54 # Values with spaces, quotes, and other special characters
55 #
56 # Squid supports directive parameters with spaces, quotes, and other
57 # special characters. Surround such parameters with "double quotes". Use
58 # the configuration_includes_quoted_values directive to enable or
59 # disable that support.
60 #
61 # Squid supports reading configuration option parameters from external
62 # files using the syntax:
63 # parameters("/path/filename")
64 # For example:
65 # acl whitelist dstdomain parameters("/etc/squid/whitelist.txt")
66 #
67 # Conditional configuration
68 #
69 # If-statements can be used to make configuration directives
70 # depend on conditions:
71 #
72 # if <CONDITION>
73 # ... regular configuration directives ...
74 # [else
75 # ... regular configuration directives ...]
76 # endif
77 #
78 # The else part is optional. The keywords "if", "else", and "endif"
79 # must be typed on their own lines, as if they were regular
80 # configuration directives.
81 #
82 # NOTE: An else-if condition is not supported.
83 #
84 # These individual conditions types are supported:
85 #
86 # true
87 # Always evaluates to true.
88 # false
89 # Always evaluates to false.
90 # <integer> = <integer>
91 # Equality comparison of two integer numbers.
92 #
93 #
94 # SMP-Related Macros
95 #
96 # The following SMP-related preprocessor macros can be used.
97 #
98 # ${process_name} expands to the current Squid process "name"
99 # (e.g., squid1, squid2, or cache1).
100 #
101 # ${process_number} expands to the current Squid process
102 # identifier, which is an integer number (e.g., 1, 2, 3) unique
103 # across all Squid processes of the current service instance.
104 #
105 # ${service_name} expands into the current Squid service instance
106 # name identifier which is provided by -n on the command line.
107 #
108
109 # TAG: broken_vary_encoding
110 # This option is not yet supported by Squid-3.
111 #Default:
112 # none
113
114 # TAG: cache_vary
115 # This option is not yet supported by Squid-3.
116 #Default:
117 # none
118
119 # TAG: error_map
120 # This option is not yet supported by Squid-3.
121 #Default:
122 # none
123
124 # TAG: external_refresh_check
125 # This option is not yet supported by Squid-3.
126 #Default:
127 # none
128
129 # TAG: location_rewrite_program
130 # This option is not yet supported by Squid-3.
131 #Default:
132 # none
133
134 # TAG: refresh_stale_hit
135 # This option is not yet supported by Squid-3.
136 #Default:
137 # none
138
139 # TAG: hierarchy_stoplist
140 # Remove this line. Use always_direct or cache_peer_access ACLs instead if you need to prevent cache_peer use.
141 #Default:
142 # none
143
144 # TAG: log_access
145 # Remove this line. Use acls with access_log directives to control access logging
146 #Default:
147 # none
148
149 # TAG: log_icap
150 # Remove this line. Use acls with icap_log directives to control icap logging
151 #Default:
152 # none
153
154 # TAG: ignore_ims_on_miss
155 # Remove this line. The HTTP/1.1 feature is now configured by 'cache_miss_revalidate'.
156 #Default:
157 # none
158
159 # TAG: chunked_request_body_max_size
160 # Remove this line. Squid is now HTTP/1.1 compliant.
161 #Default:
162 # none
163
164 # TAG: dns_v4_fallback
165 # Remove this line. Squid performs a 'Happy Eyeballs' algorithm, the 'fallback' algorithm is no longer relevant.
166 #Default:
167 # none
168
169 # TAG: emulate_httpd_log
170 # Replace this with an access_log directive using the format 'common' or 'combined'.
171 #Default:
172 # none
173
174 # TAG: forward_log
175 # Use a regular access.log with ACL limiting it to MISS events.
176 #Default:
177 # none
178
179 # TAG: ftp_list_width
180 # Remove this line. Configure FTP page display using the CSS controls in errorpages.css instead.
181 #Default:
182 # none
183
184 # TAG: ignore_expect_100
185 # Remove this line. The HTTP/1.1 feature is now fully supported by default.
186 #Default:
187 # none
188
189 # TAG: log_fqdn
190 # Remove this option from your config. To log FQDN use %>A in the log format.
191 #Default:
192 # none
193
194 # TAG: log_ip_on_direct
195 # Remove this option from your config. To log server or peer names use %<A in the log format.
196 #Default:
197 # none
198
199 # TAG: maximum_single_addr_tries
200 # Replaced by connect_retries. The behaviour has changed, please read the documentation before altering.
201 #Default:
202 # none
203
204 # TAG: referer_log
205 # Replace this with an access_log directive using the format 'referrer'.
206 #Default:
207 # none
208
209 # TAG: update_headers
210 # Remove this line. The feature is supported by default in storage types where update is implemented.
211 #Default:
212 # none
213
214 # TAG: url_rewrite_concurrency
215 # Remove this line. Set the 'concurrency=' option of url_rewrite_children instead.
216 #Default:
217 # none
218
219 # TAG: useragent_log
220 # Replace this with an access_log directive using the format 'useragent'.
221 #Default:
222 # none
223
224 # TAG: dns_testnames
225 # Remove this line. DNS is no longer tested on startup.
226 #Default:
227 # none
228
229 # TAG: extension_methods
230 # Remove this line. All valid methods for HTTP are accepted by default.
231 #Default:
232 # none
233
234 # TAG: zero_buffers
235 #Default:
236 # none
237
238 # TAG: incoming_rate
239 #Default:
240 # none
241
242 # TAG: server_http11
243 # Remove this line. HTTP/1.1 is supported by default.
244 #Default:
245 # none
246
247 # TAG: upgrade_http0.9
248 # Remove this line. ICY/1.0 streaming protocol is supported by default.
249 #Default:
250 # none
251
252 # TAG: zph_local
253 # Alter these entries. Use the qos_flows directive instead.
254 #Default:
255 # none
256
257 # TAG: header_access
258 # Since squid-3.0 replace with request_header_access or reply_header_access
259 # depending on whether you wish to match client requests or server replies.
260 #Default:
261 # none
262
263 # TAG: httpd_accel_no_pmtu_disc
264 # Since squid-3.0 use the 'disable-pmtu-discovery' flag on http_port instead.
265 #Default:
266 # none
267
268 # TAG: wais_relay_host
269 # Replace this line with 'cache_peer' configuration.
270 #Default:
271 # none
272
273 # TAG: wais_relay_port
274 # Replace this line with 'cache_peer' configuration.
275 #Default:
276 # none
277
278 # OPTIONS FOR SMP
279 # -----------------------------------------------------------------------------
280
281 # TAG: workers
282 # Number of main Squid processes or "workers" to fork and maintain.
283 # 0: "no daemon" mode, like running "squid -N ..."
284 # 1: "no SMP" mode, start one main Squid process daemon (default)
285 # N: start N main Squid process daemons (i.e., SMP mode)
286 #
287 # In SMP mode, each worker does nearly all what a single Squid daemon
288 # does (e.g., listen on http_port and forward HTTP requests).
289 #Default:
290 # SMP support disabled.
291
292 # TAG: cpu_affinity_map
293 # Usage: cpu_affinity_map process_numbers=P1,P2,... cores=C1,C2,...
294 #
295 # Sets 1:1 mapping between Squid processes and CPU cores. For example,
296 #
297 # cpu_affinity_map process_numbers=1,2,3,4 cores=1,3,5,7
298 #
299 # affects processes 1 through 4 only and places them on the first
300 # four even cores, starting with core #1.
301 #
302 # CPU cores are numbered starting from 1. Requires support for
303 # sched_getaffinity(2) and sched_setaffinity(2) system calls.
304 #
305 # Multiple cpu_affinity_map options are merged.
306 #
307 # See also: workers
308 #Default:
309 # Let operating system decide.
310
311 # OPTIONS FOR AUTHENTICATION
312 # -----------------------------------------------------------------------------
313
314 # TAG: auth_param
315 # This is used to define parameters for the various authentication
316 # schemes supported by Squid.
317 #
318 # format: auth_param scheme parameter [setting]
319 #
320 # The order in which authentication schemes are presented to the client is
321 # dependent on the order the scheme first appears in config file. IE
322 # has a bug (it's not RFC 2617 compliant) in that it will use the basic
323 # scheme if basic is the first entry presented, even if more secure
324 # schemes are presented. For now use the order in the recommended
325 # settings section below. If other browsers have difficulties (don't
326 # recognize the schemes offered even if you are using basic) either
327 # put basic first, or disable the other schemes (by commenting out their
328 # program entry).
329 #
330 # Once an authentication scheme is fully configured, it can only be
331 # shutdown by shutting squid down and restarting. Changes can be made on
332 # the fly and activated with a reconfigure. I.E. You can change to a
333 # different helper, but not unconfigure the helper completely.
334 #
335 # Please note that while this directive defines how Squid processes
336 # authentication it does not automatically activate authentication.
337 # To use authentication you must in addition make use of ACLs based
338 # on login name in http_access (proxy_auth, proxy_auth_regex or
339 # external with %LOGIN used in the format tag). The browser will be
340 # challenged for authentication on the first such acl encountered
341 # in http_access processing and will also be re-challenged for new
342 # login credentials if the request is being denied by a proxy_auth
343 # type acl.
344 #
345 # WARNING: authentication can't be used in a transparently intercepting
346 # proxy as the client then thinks it is talking to an origin server and
347 # not the proxy. This is a limitation of bending the TCP/IP protocol to
348 # transparently intercepting port 80, not a limitation in Squid.
349 # Ports flagged 'transparent', 'intercept', or 'tproxy' have
350 # authentication disabled.
351 #
352 # === Parameters common to all schemes. ===
353 #
354 # "program" cmdline
355 # Specifies the command for the external authenticator.
356 #
357 # By default, each authentication scheme is not used unless a
358 # program is specified.
359 #
360 # See http://wiki.squid-cache.org/Features/AddonHelpers for
361 # more details on helper operations and creating your own.
362 #
363 # "key_extras" format
364 # Specifies a string to be append to request line format for
365 # the authentication helper. "Quoted" format values may contain
366 # spaces and logformat %macros. In theory, any logformat %macro
367 # can be used. In practice, a %macro expands as a dash (-) if
368 # the helper request is sent before the required macro
369 # information is available to Squid.
370 #
371 # By default, Squid uses request formats provided in
372 # scheme-specific examples below (search for %credentials).
373 #
374 # The expanded key_extras value is added to the Squid credentials
375 # cache and, hence, will affect authentication. It can be used to
376 # autenticate different users with identical user names (e.g.,
377 # when user authentication depends on http_port).
378 #
379 # Avoid adding frequently changing information to key_extras. For
380 # example, if you add user source IP, and it changes frequently
381 # in your environment, then max_user_ip ACL is going to treat
382 # every user+IP combination as a unique "user", breaking the ACL
383 # and wasting a lot of memory on those user records. It will also
384 # force users to authenticate from scratch whenever their IP
385 # changes.
386 #
387 # "realm" string
388 # Specifies the protection scope (aka realm name) which is to be
389 # reported to the client for the authentication scheme. It is
390 # commonly part of the text the user will see when prompted for
391 # their username and password.
392 #
393 # For Basic the default is "Squid proxy-caching web server".
394 # For Digest there is no default, this parameter is mandatory.
395 # For NTLM and Negotiate this parameter is ignored.
396 #
397 # "children" numberofchildren [startup=N] [idle=N] [concurrency=N]
398 #
399 # The maximum number of authenticator processes to spawn. If
400 # you start too few Squid will have to wait for them to process
401 # a backlog of credential verifications, slowing it down. When
402 # password verifications are done via a (slow) network you are
403 # likely to need lots of authenticator processes.
404 #
405 # The startup= and idle= options permit some skew in the exact
406 # amount run. A minimum of startup=N will begin during startup
407 # and reconfigure. Squid will start more in groups of up to
408 # idle=N in an attempt to meet traffic needs and to keep idle=N
409 # free above those traffic needs up to the maximum.
410 #
411 # The concurrency= option sets the number of concurrent requests
412 # the helper can process. The default of 0 is used for helpers
413 # 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
416 # multiple requests to be sent to the same helper in parallel
417 # without waiting for the response.
418 #
419 # Concurrency must not be set unless it's known the helper
420 # supports the input format with channel-ID fields.
421 #
422 # NOTE: NTLM and Negotiate schemes do not support concurrency
423 # in the Squid code module even though some helpers can.
424 #
425 #
426 #
427 # === Example Configuration ===
428 #
429 # This configuration displays the recommended authentication scheme
430 # order from most to least secure with recommended minimum configuration
431 # settings for each scheme:
432 #
433 ##auth_param negotiate program <uncomment and complete this line to activate>
434 ##auth_param negotiate children 20 startup=0 idle=1
435 ##auth_param negotiate keep_alive on
436 ##
437 ##auth_param digest program <uncomment and complete this line to activate>
438 ##auth_param digest children 20 startup=0 idle=1
439 ##auth_param digest realm Squid proxy-caching web server
440 ##auth_param digest nonce_garbage_interval 5 minutes
441 ##auth_param digest nonce_max_duration 30 minutes
442 ##auth_param digest nonce_max_count 50
443 ##
444 ##auth_param ntlm program <uncomment and complete this line to activate>
445 ##auth_param ntlm children 20 startup=0 idle=1
446 ##auth_param ntlm keep_alive on
447 ##
448 ##auth_param basic program <uncomment and complete this line>
449 ##auth_param basic children 5 startup=5 idle=1
450 ##auth_param basic realm Squid proxy-caching web server
451 ##auth_param basic credentialsttl 2 hours
452 #Default:
453 # none
454
455 # TAG: authenticate_cache_garbage_interval
456 # The time period between garbage collection across the username cache.
457 # This is a trade-off between memory utilization (long intervals - say
458 # 2 days) and CPU (short intervals - say 1 minute). Only change if you
459 # have good reason to.
460 #Default:
461 # authenticate_cache_garbage_interval 1 hour
462
463 # TAG: authenticate_ttl
464 # The time a user & their credentials stay in the logged in
465 # user cache since their last request. When the garbage
466 # interval passes, all user credentials that have passed their
467 # TTL are removed from memory.
468 #Default:
469 # authenticate_ttl 1 hour
470
471 # TAG: authenticate_ip_ttl
472 # If you use proxy authentication and the 'max_user_ip' ACL,
473 # this directive controls how long Squid remembers the IP
474 # addresses associated with each user. Use a small value
475 # (e.g., 60 seconds) if your users might change addresses
476 # quickly, as is the case with dialup. You might be safe
477 # using a larger value (e.g., 2 hours) in a corporate LAN
478 # environment with relatively static address assignments.
479 #Default:
480 # authenticate_ip_ttl 1 second
481
482 # ACCESS CONTROLS
483 # -----------------------------------------------------------------------------
484
485 # TAG: external_acl_type
486 # This option defines external acl classes using a helper program
487 # to look up the status
488 #
489 # external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..]
490 #
491 # Options:
492 #
493 # ttl=n TTL in seconds for cached results (defaults to 3600
494 # for 1 hour)
495 #
496 # negative_ttl=n
497 # TTL for cached negative lookups (default same
498 # as ttl)
499 #
500 # grace=n Percentage remaining of TTL where a refresh of a
501 # cached entry should be initiated without needing to
502 # wait for a new reply. (default is for no grace period)
503 #
504 # cache=n The maximum number of entries in the result cache. The
505 # default limit is 262144 entries. Each cache entry usually
506 # consumes at least 256 bytes. Squid currently does not remove
507 # expired cache entries until the limit is reached, so a proxy
508 # will sooner or later reach the limit. The expanded FORMAT
509 # value is used as the cache key, so if the details in FORMAT
510 # are highly variable, a larger cache may be needed to produce
511 # reduction in helper load.
512 #
513 # children-max=n
514 # Maximum number of acl helper processes spawned to service
515 # external acl lookups of this type. (default 5)
516 #
517 # children-startup=n
518 # Minimum number of acl helper processes to spawn during
519 # startup and reconfigure to service external acl lookups
520 # of this type. (default 0)
521 #
522 # children-idle=n
523 # Number of acl helper processes to keep ahead of traffic
524 # loads. Squid will spawn this many at once whenever load
525 # rises above the capabilities of existing processes.
526 # Up to the value of children-max. (default 1)
527 #
528 # concurrency=n concurrency level per process. Only used with helpers
529 # capable of processing more than one query at a time.
530 #
531 # protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers.
532 #
533 # ipv4 / ipv6 IP protocol used to communicate with this helper.
534 # The default is to auto-detect IPv6 and use it when available.
535 #
536 #
537 # FORMAT specifications
538 #
539 # %LOGIN Authenticated user login name
540 # %un A user name. Expands to the first available name
541 # from the following list of information sources:
542 # - authenticated user name, like %ul or %LOGIN
543 # - user name sent by an external ACL, like %EXT_USER
544 # - SSL client name, like %us in logformat
545 # - ident user name, like %ui in logformat
546 # %EXT_USER Username from previous external acl
547 # %EXT_LOG Log details from previous external acl
548 # %EXT_TAG Tag from previous external acl
549 # %IDENT Ident user name
550 # %SRC Client IP
551 # %SRCPORT Client source port
552 # %URI Requested URI
553 # %DST Requested host
554 # %PROTO Requested URL scheme
555 # %PORT Requested port
556 # %PATH Requested URL path
557 # %METHOD Request method
558 # %MYADDR Squid interface address
559 # %MYPORT Squid http_port number
560 # %PATH Requested URL-path (including query-string if any)
561 # %USER_CERT SSL User certificate in PEM format
562 # %USER_CERTCHAIN SSL User certificate chain in PEM format
563 # %USER_CERT_xx SSL User certificate subject attribute xx
564 # %USER_CA_CERT_xx SSL User certificate issuer attribute xx
565 # %ssl::>sni SSL client SNI sent to Squid
566 # %ssl::<cert_subject SSL server certificate DN
567 # %ssl::<cert_issuer SSL server certificate issuer DN
568 #
569 # %>{Header} HTTP request header "Header"
570 # %>{Hdr:member}
571 # HTTP request header "Hdr" list member "member"
572 # %>{Hdr:;member}
573 # HTTP request header list member using ; as
574 # list separator. ; can be any non-alphanumeric
575 # character.
576 #
577 # %<{Header} HTTP reply header "Header"
578 # %<{Hdr:member}
579 # HTTP reply header "Hdr" list member "member"
580 # %<{Hdr:;member}
581 # HTTP reply header list member using ; as
582 # list separator. ; can be any non-alphanumeric
583 # character.
584 #
585 # %ACL The name of the ACL being tested.
586 # %DATA The ACL arguments. If not used then any arguments
587 # is automatically added at the end of the line
588 # sent to the helper.
589 # NOTE: this will encode the arguments as one token,
590 # whereas the default will pass each separately.
591 #
592 # %% The percent sign. Useful for helpers which need
593 # an unchanging input format.
594 #
595 #
596 # General request syntax:
597 #
598 # [channel-ID] FORMAT-values [acl-values ...]
599 #
600 #
601 # FORMAT-values consists of transaction details expanded with
602 # whitespace separation per the config file FORMAT specification
603 # using the FORMAT macros listed above.
604 #
605 # acl-values consists of any string specified in the referencing
606 # config 'acl ... external' line. see the "acl external" directive.
607 #
608 # Request values sent to the helper are URL escaped to protect
609 # each value in requests against whitespaces.
610 #
611 # If using protocol=2.5 then the request sent to the helper is not
612 # URL escaped to protect against whitespace.
613 #
614 # NOTE: protocol=3.0 is deprecated as no longer necessary.
615 #
616 # When using the concurrency= option the protocol is changed by
617 # introducing a query channel tag in front of the request/response.
618 # The query channel tag is a number between 0 and concurrency-1.
619 # This value must be echoed back unchanged to Squid as the first part
620 # of the response relating to its request.
621 #
622 #
623 # The helper receives lines expanded per the above format specification
624 # and for each input line returns 1 line starting with OK/ERR/BH result
625 # code and optionally followed by additional keywords with more details.
626 #
627 #
628 # General result syntax:
629 #
630 # [channel-ID] result keyword=value ...
631 #
632 # Result consists of one of the codes:
633 #
634 # OK
635 # the ACL test produced a match.
636 #
637 # ERR
638 # the ACL test does not produce a match.
639 #
640 # BH
641 # An internal error occurred in the helper, preventing
642 # a result being identified.
643 #
644 # The meaning of 'a match' is determined by your squid.conf
645 # access control configuration. See the Squid wiki for details.
646 #
647 # Defined keywords:
648 #
649 # user= The users name (login)
650 #
651 # password= The users password (for login= cache_peer option)
652 #
653 # message= Message describing the reason for this response.
654 # Available as %o in error pages.
655 # Useful on (ERR and BH results).
656 #
657 # tag= Apply a tag to a request. Only sets a tag once,
658 # does not alter existing tags.
659 #
660 # log= String to be logged in access.log. Available as
661 # %ea in logformat specifications.
662 #
663 # clt_conn_tag= Associates a TAG with the client TCP connection.
664 # Please see url_rewrite_program related documentation
665 # for this kv-pair.
666 #
667 # Any keywords may be sent on any response whether OK, ERR or BH.
668 #
669 # All response keyword values need to be a single token with URL
670 # escaping, or enclosed in double quotes (") and escaped using \ on
671 # any double quotes or \ characters within the value. The wrapping
672 # double quotes are removed before the value is interpreted by Squid.
673 # \r and \n are also replace by CR and LF.
674 #
675 # Some example key values:
676 #
677 # user=John%20Smith
678 # user="John Smith"
679 # user="J. \"Bob\" Smith"
680 #Default:
681 # none
682
683 # TAG: acl
684 # Defining an Access List
685 #
686 # Every access list definition must begin with an aclname and acltype,
687 # followed by either type-specific arguments or a quoted filename that
688 # they are read from.
689 #
690 # acl aclname acltype argument ...
691 # acl aclname acltype "file" ...
692 #
693 # When using "file", the file should contain one item per line.
694 #
695 # Some acl types supports options which changes their default behaviour.
696 # The available options are:
697 #
698 # -i,+i By default, regular expressions are CASE-SENSITIVE. To make them
699 # case-insensitive, use the -i option. To return case-sensitive
700 # use the +i option between patterns, or make a new ACL line
701 # without -i.
702 #
703 # -n Disable lookups and address type conversions. If lookup or
704 # conversion is required because the parameter type (IP or
705 # domain name) does not match the message address type (domain
706 # name or IP), then the ACL would immediately declare a mismatch
707 # without any warnings or lookups.
708 #
709 # -- Used to stop processing all options, in the case the first acl
710 # value has '-' character as first character (for example the '-'
711 # is a valid domain name)
712 #
713 # Some acl types require suspending the current request in order
714 # to access some external data source.
715 # Those which do are marked with the tag [slow], those which
716 # don't are marked as [fast].
717 # See http://wiki.squid-cache.org/SquidFaq/SquidAcl
718 # for further information
719 #
720 # ***** ACL TYPES AVAILABLE *****
721 #
722 # acl aclname src ip-address/mask ... # clients IP address [fast]
723 # acl aclname src addr1-addr2/mask ... # range of addresses [fast]
724 # acl aclname dst [-n] ip-address/mask ... # URL host's IP address [slow]
725 # acl aclname localip ip-address/mask ... # IP address the client connected to [fast]
726 #
727 # acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation)
728 # # [fast]
729 # # The 'arp' ACL code is not portable to all operating systems.
730 # # It works on Linux, Solaris, Windows, FreeBSD, and some other
731 # # BSD variants.
732 # #
733 # # NOTE: Squid can only determine the MAC/EUI address for IPv4
734 # # clients that are on the same subnet. If the client is on a
735 # # different subnet, then Squid cannot find out its address.
736 # #
737 # # NOTE 2: IPv6 protocol does not contain ARP. MAC/EUI is either
738 # # encoded directly in the IPv6 address or not available.
739 #
740 # acl aclname srcdomain .foo.com ...
741 # # reverse lookup, from client IP [slow]
742 # acl aclname dstdomain [-n] .foo.com ...
743 # # Destination server from URL [fast]
744 # acl aclname srcdom_regex [-i] \.foo\.com ...
745 # # regex matching client name [slow]
746 # acl aclname dstdom_regex [-n] [-i] \.foo\.com ...
747 # # regex matching server [fast]
748 # #
749 # # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
750 # # based URL is used and no match is found. The name "none" is used
751 # # if the reverse lookup fails.
752 #
753 # acl aclname src_as number ...
754 # acl aclname dst_as number ...
755 # # [fast]
756 # # Except for access control, AS numbers can be used for
757 # # routing of requests to specific caches. Here's an
758 # # example for routing all requests for AS#1241 and only
759 # # those to mycache.mydomain.net:
760 # # acl asexample dst_as 1241
761 # # cache_peer_access mycache.mydomain.net allow asexample
762 # # cache_peer_access mycache_mydomain.net deny all
763 #
764 # acl aclname peername myPeer ...
765 # # [fast]
766 # # match against a named cache_peer entry
767 # # set unique name= on cache_peer lines for reliable use.
768 #
769 # acl aclname time [day-abbrevs] [h1:m1-h2:m2]
770 # # [fast]
771 # # day-abbrevs:
772 # # S - Sunday
773 # # M - Monday
774 # # T - Tuesday
775 # # W - Wednesday
776 # # H - Thursday
777 # # F - Friday
778 # # A - Saturday
779 # # h1:m1 must be less than h2:m2
780 #
781 # acl aclname url_regex [-i] ^http:// ...
782 # # regex matching on whole URL [fast]
783 # acl aclname urllogin [-i] [^a-zA-Z0-9] ...
784 # # regex matching on URL login field
785 # acl aclname urlpath_regex [-i] \.gif$ ...
786 # # regex matching on URL path [fast]
787 #
788 # acl aclname port 80 70 21 0-1024... # destination TCP port [fast]
789 # # ranges are alloed
790 # acl aclname localport 3128 ... # TCP port the client connected to [fast]
791 # # NP: for interception mode this is usually '80'
792 #
793 # acl aclname myportname 3128 ... # *_port name [fast]
794 #
795 # acl aclname proto HTTP FTP ... # request protocol [fast]
796 #
797 # acl aclname method GET POST ... # HTTP request method [fast]
798 #
799 # acl aclname http_status 200 301 500- 400-403 ...
800 # # status code in reply [fast]
801 #
802 # acl aclname browser [-i] regexp ...
803 # # pattern match on User-Agent header (see also req_header below) [fast]
804 #
805 # acl aclname referer_regex [-i] regexp ...
806 # # pattern match on Referer header [fast]
807 # # Referer is highly unreliable, so use with care
808 #
809 # acl aclname ident username ...
810 # acl aclname ident_regex [-i] pattern ...
811 # # string match on ident output [slow]
812 # # use REQUIRED to accept any non-null ident.
813 #
814 # acl aclname proxy_auth [-i] username ...
815 # acl aclname proxy_auth_regex [-i] pattern ...
816 # # perform http authentication challenge to the client and match against
817 # # supplied credentials [slow]
818 # #
819 # # takes a list of allowed usernames.
820 # # use REQUIRED to accept any valid username.
821 # #
822 # # Will use proxy authentication in forward-proxy scenarios, and plain
823 # # http authenticaiton in reverse-proxy scenarios
824 # #
825 # # NOTE: when a Proxy-Authentication header is sent but it is not
826 # # needed during ACL checking the username is NOT logged
827 # # in access.log.
828 # #
829 # # NOTE: proxy_auth requires a EXTERNAL authentication program
830 # # to check username/password combinations (see
831 # # auth_param directive).
832 # #
833 # # NOTE: proxy_auth can't be used in a transparent/intercepting proxy
834 # # as the browser needs to be configured for using a proxy in order
835 # # to respond to proxy authentication.
836 #
837 # acl aclname snmp_community string ...
838 # # A community string to limit access to your SNMP Agent [fast]
839 # # Example:
840 # #
841 # # acl snmppublic snmp_community public
842 #
843 # acl aclname maxconn number
844 # # This will be matched when the client's IP address has
845 # # more than <number> TCP connections established. [fast]
846 # # NOTE: This only measures direct TCP links so X-Forwarded-For
847 # # indirect clients are not counted.
848 #
849 # acl aclname max_user_ip [-s] number
850 # # This will be matched when the user attempts to log in from more
851 # # than <number> different ip addresses. The authenticate_ip_ttl
852 # # parameter controls the timeout on the ip entries. [fast]
853 # # If -s is specified the limit is strict, denying browsing
854 # # from any further IP addresses until the ttl has expired. Without
855 # # -s Squid will just annoy the user by "randomly" denying requests.
856 # # (the counter is reset each time the limit is reached and a
857 # # request is denied)
858 # # NOTE: in acceleration mode or where there is mesh of child proxies,
859 # # clients may appear to come from multiple addresses if they are
860 # # going through proxy farms, so a limit of 1 may cause user problems.
861 #
862 # acl aclname random probability
863 # # Pseudo-randomly match requests. Based on the probability given.
864 # # Probability may be written as a decimal (0.333), fraction (1/3)
865 # # or ratio of matches:non-matches (3:5).
866 #
867 # acl aclname req_mime_type [-i] mime-type ...
868 # # regex match against the mime type of the request generated
869 # # by the client. Can be used to detect file upload or some
870 # # types HTTP tunneling requests [fast]
871 # # NOTE: This does NOT match the reply. You cannot use this
872 # # to match the returned file type.
873 #
874 # acl aclname req_header header-name [-i] any\.regex\.here
875 # # regex match against any of the known request headers. May be
876 # # thought of as a superset of "browser", "referer" and "mime-type"
877 # # ACL [fast]
878 #
879 # acl aclname rep_mime_type [-i] mime-type ...
880 # # regex match against the mime type of the reply received by
881 # # squid. Can be used to detect file download or some
882 # # types HTTP tunneling requests. [fast]
883 # # NOTE: This has no effect in http_access rules. It only has
884 # # effect in rules that affect the reply data stream such as
885 # # http_reply_access.
886 #
887 # acl aclname rep_header header-name [-i] any\.regex\.here
888 # # regex match against any of the known reply headers. May be
889 # # thought of as a superset of "browser", "referer" and "mime-type"
890 # # ACLs [fast]
891 #
892 # acl aclname external class_name [arguments...]
893 # # external ACL lookup via a helper class defined by the
894 # # external_acl_type directive [slow]
895 #
896 # acl aclname user_cert attribute values...
897 # # match against attributes in a user SSL certificate
898 # # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast]
899 #
900 # acl aclname ca_cert attribute values...
901 # # match against attributes a users issuing CA SSL certificate
902 # # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast]
903 #
904 # acl aclname ext_user username ...
905 # acl aclname ext_user_regex [-i] pattern ...
906 # # string match on username returned by external acl helper [slow]
907 # # use REQUIRED to accept any non-null user name.
908 #
909 # acl aclname tag tagvalue ...
910 # # string match on tag returned by external acl helper [fast]
911 # # DEPRECATED. Only the first tag will match with this ACL.
912 # # Use the 'note' ACL instead for handling multiple tag values.
913 #
914 # acl aclname hier_code codename ...
915 # # string match against squid hierarchy code(s); [fast]
916 # # e.g., DIRECT, PARENT_HIT, NONE, etc.
917 # #
918 # # NOTE: This has no effect in http_access rules. It only has
919 # # effect in rules that affect the reply data stream such as
920 # # http_reply_access.
921 #
922 # acl aclname note name [value ...]
923 # # match transaction annotation [fast]
924 # # Without values, matches any annotation with a given name.
925 # # With value(s), matches any annotation with a given name that
926 # # also has one of the given values.
927 # # Names and values are compared using a string equality test.
928 # # Annotation sources include note and adaptation_meta directives
929 # # as well as helper and eCAP responses.
930 #
931 # acl aclname adaptation_service service ...
932 # # Matches the name of any icap_service, ecap_service,
933 # # adaptation_service_set, or adaptation_service_chain that Squid
934 # # has used (or attempted to use) for the master transaction.
935 # # This ACL must be defined after the corresponding adaptation
936 # # service is named in squid.conf. This ACL is usable with
937 # # adaptation_meta because it starts matching immediately after
938 # # the service has been selected for adaptation.
939 #
940 # acl aclname any-of acl1 acl2 ...
941 # # match any one of the acls [fast or slow]
942 # # The first matching ACL stops further ACL evaluation.
943 # #
944 # # ACLs from multiple any-of lines with the same name are ORed.
945 # # For example, A = (a1 or a2) or (a3 or a4) can be written as
946 # # acl A any-of a1 a2
947 # # acl A any-of a3 a4
948 # #
949 # # This group ACL is fast if all evaluated ACLs in the group are fast
950 # # and slow otherwise.
951 #
952 # acl aclname all-of acl1 acl2 ...
953 # # match all of the acls [fast or slow]
954 # # The first mismatching ACL stops further ACL evaluation.
955 # #
956 # # ACLs from multiple all-of lines with the same name are ORed.
957 # # For example, B = (b1 and b2) or (b3 and b4) can be written as
958 # # acl B all-of b1 b2
959 # # acl B all-of b3 b4
960 # #
961 # # This group ACL is fast if all evaluated ACLs in the group are fast
962 # # and slow otherwise.
963 #
964 # Examples:
965 # acl macaddress arp 09:00:2b:23:45:67
966 # acl myexample dst_as 1241
967 # acl password proxy_auth REQUIRED
968 # acl fileupload req_mime_type -i ^multipart/form-data$
969 # acl javascript rep_mime_type -i ^application/x-javascript$
970 #
971 #Default:
972 # ACLs all, manager, localhost, and to_localhost are predefined.
973 #
974 #
975 # Recommended minimum configuration:
976 #
977
978 # Example rule allowing access from your local networks.
979 # Adapt to list your (internal) IP networks from where browsing
980 # should be allowed
981 #acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
982 #acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
983 #acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
984 #acl localnet src fc00::/7 # RFC 4193 local private network range
985 #acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
986
987 <%- $acls.each |$acl| { %>
988 acl <%= $acl -%>
989 <% } %>
990
991 acl SSL_ports port 443
992 acl Safe_ports port 80 # http
993 acl Safe_ports port 21 # ftp
994 acl Safe_ports port 443 # https
995 acl Safe_ports port 70 # gopher
996 acl Safe_ports port 210 # wais
997 acl Safe_ports port 1025-65535 # unregistered ports
998 acl Safe_ports port 280 # http-mgmt
999 acl Safe_ports port 488 # gss-http
1000 acl Safe_ports port 591 # filemaker
1001 acl Safe_ports port 777 # multiling http
1002 acl CONNECT method CONNECT
1003
1004 # TAG: proxy_protocol_access
1005 # Determine which client proxies can be trusted to provide correct
1006 # information regarding real client IP address using PROXY protocol.
1007 #
1008 # Requests may pass through a chain of several other proxies
1009 # before reaching us. The original source details may by sent in:
1010 # * HTTP message Forwarded header, or
1011 # * HTTP message X-Forwarded-For header, or
1012 # * PROXY protocol connection header.
1013 #
1014 # This directive is solely for validating new PROXY protocol
1015 # connections received from a port flagged with require-proxy-header.
1016 # It is checked only once after TCP connection setup.
1017 #
1018 # A deny match results in TCP connection closure.
1019 #
1020 # An allow match is required for Squid to permit the corresponding
1021 # TCP connection, before Squid even looks for HTTP request headers.
1022 # If there is an allow match, Squid starts using PROXY header information
1023 # to determine the source address of the connection for all future ACL
1024 # checks, logging, etc.
1025 #
1026 # SECURITY CONSIDERATIONS:
1027 #
1028 # Any host from which we accept client IP details can place
1029 # incorrect information in the relevant header, and Squid
1030 # will use the incorrect information as if it were the
1031 # source address of the request. This may enable remote
1032 # hosts to bypass any access control restrictions that are
1033 # based on the client's source addresses.
1034 #
1035 # This clause only supports fast acl types.
1036 # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1037 #Default:
1038 # all TCP connections to ports with require-proxy-header will be denied
1039
1040 # TAG: follow_x_forwarded_for
1041 # Determine which client proxies can be trusted to provide correct
1042 # information regarding real client IP address.
1043 #
1044 # Requests may pass through a chain of several other proxies
1045 # before reaching us. The original source details may by sent in:
1046 # * HTTP message Forwarded header, or
1047 # * HTTP message X-Forwarded-For header, or
1048 # * PROXY protocol connection header.
1049 #
1050 # PROXY protocol connections are controlled by the proxy_protocol_access
1051 # directive which is checked before this.
1052 #
1053 # If a request reaches us from a source that is allowed by this
1054 # directive, then we trust the information it provides regarding
1055 # the IP of the client it received from (if any).
1056 #
1057 # For the purpose of ACLs used in this directive the src ACL type always
1058 # matches the address we are testing and srcdomain matches its rDNS.
1059 #
1060 # On each HTTP request Squid checks for X-Forwarded-For header fields.
1061 # If found the header values are iterated in reverse order and an allow
1062 # match is required for Squid to continue on to the next value.
1063 # The verification ends when a value receives a deny match, cannot be
1064 # tested, or there are no more values to test.
1065 # NOTE: Squid does not yet follow the Forwarded HTTP header.
1066 #
1067 # The end result of this process is an IP address that we will
1068 # refer to as the indirect client address. This address may
1069 # be treated as the client address for access control, ICAP, delay
1070 # pools and logging, depending on the acl_uses_indirect_client,
1071 # icap_uses_indirect_client, delay_pool_uses_indirect_client,
1072 # log_uses_indirect_client and tproxy_uses_indirect_client options.
1073 #
1074 # This clause only supports fast acl types.
1075 # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1076 #
1077 # SECURITY CONSIDERATIONS:
1078 #
1079 # Any host from which we accept client IP details can place
1080 # incorrect information in the relevant header, and Squid
1081 # will use the incorrect information as if it were the
1082 # source address of the request. This may enable remote
1083 # hosts to bypass any access control restrictions that are
1084 # based on the client's source addresses.
1085 #
1086 # For example:
1087 #
1088 # acl localhost src 127.0.0.1
1089 # acl my_other_proxy srcdomain .proxy.example.com
1090 # follow_x_forwarded_for allow localhost
1091 # follow_x_forwarded_for allow my_other_proxy
1092 #Default:
1093 # X-Forwarded-For header will be ignored.
1094
1095 # TAG: acl_uses_indirect_client on|off
1096 # Controls whether the indirect client address
1097 # (see follow_x_forwarded_for) is used instead of the
1098 # direct client address in acl matching.
1099 #
1100 # NOTE: maxconn ACL considers direct TCP links and indirect
1101 # clients will always have zero. So no match.
1102 #Default:
1103 # acl_uses_indirect_client on
1104
1105 # TAG: delay_pool_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 in delay pools.
1109 #Default:
1110 # delay_pool_uses_indirect_client on
1111
1112 # TAG: log_uses_indirect_client on|off
1113 # Controls whether the indirect client address
1114 # (see follow_x_forwarded_for) is used instead of the
1115 # direct client address in the access log.
1116 #Default:
1117 # log_uses_indirect_client on
1118
1119 # TAG: tproxy_uses_indirect_client on|off
1120 # Controls whether the indirect client address
1121 # (see follow_x_forwarded_for) is used instead of the
1122 # direct client address when spoofing the outgoing client.
1123 #
1124 # This has no effect on requests arriving in non-tproxy
1125 # mode ports.
1126 #
1127 # SECURITY WARNING: Usage of this option is dangerous
1128 # and should not be used trivially. Correct configuration
1129 # of follow_x_forwarded_for with a limited set of trusted
1130 # sources is required to prevent abuse of your proxy.
1131 #Default:
1132 # tproxy_uses_indirect_client off
1133
1134 # TAG: spoof_client_ip
1135 # Control client IP address spoofing of TPROXY traffic based on
1136 # defined access lists.
1137 #
1138 # spoof_client_ip allow|deny [!]aclname ...
1139 #
1140 # If there are no "spoof_client_ip" lines present, the default
1141 # is to "allow" spoofing of any suitable request.
1142 #
1143 # Note that the cache_peer "no-tproxy" option overrides this ACL.
1144 #
1145 # This clause supports fast acl types.
1146 # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1147 #Default:
1148 # Allow spoofing on all TPROXY traffic.
1149
1150 # TAG: http_access
1151 # Allowing or Denying access based on defined access lists
1152 #
1153 # To allow or deny a message received on an HTTP, HTTPS, or FTP port:
1154 # http_access allow|deny [!]aclname ...
1155 #
1156 # NOTE on default values:
1157 #
1158 # If there are no "access" lines present, the default is to deny
1159 # the request.
1160 #
1161 # If none of the "access" lines cause a match, the default is the
1162 # opposite of the last line in the list. If the last line was
1163 # deny, the default is allow. Conversely, if the last line
1164 # is allow, the default will be deny. For these reasons, it is a
1165 # good idea to have an "deny all" entry at the end of your access
1166 # lists to avoid potential confusion.
1167 #
1168 # This clause supports both fast and slow acl types.
1169 # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1170 #
1171 #Default:
1172 # Deny, unless rules exist in squid.conf.
1173 #
1174
1175 #
1176 # Recommended minimum Access Permission configuration:
1177 #
1178 # Deny requests to certain unsafe ports
1179 http_access deny !Safe_ports
1180
1181 # Deny CONNECT to other than secure SSL ports
1182 http_access deny CONNECT !SSL_ports
1183
1184 # Only allow cachemgr access from localhost
1185 http_access allow localhost manager
1186 http_access deny manager
1187
1188 # We strongly recommend the following be uncommented to protect innocent
1189 # web applications running on the proxy server who think the only
1190 # one who can access services on "localhost" is a local user
1191 http_access deny to_localhost
1192
1193 #
1194 # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
1195 #
1196
1197 # Example rule allowing access from your local networks.
1198 # Adapt localnet in the ACL section to list your (internal) IP networks
1199 # from where browsing should be allowed
1200 #http_access allow localnet
1201 http_access allow localhost
1202 <%- $http_access.each |$access_rule| { %>
1203 http_access <%= $access_rule -%>
1204 <% } %>
1205
1206 # And finally deny all other access to this proxy
1207 http_access deny all
1208
1209 # TAG: adapted_http_access
1210 # Allowing or Denying access based on defined access lists
1211 #
1212 # Essentially identical to http_access, but runs after redirectors
1213 # and ICAP/eCAP adaptation. Allowing access control based on their
1214 # output.
1215 #
1216 # If not set then only http_access is used.
1217 #Default:
1218 # Allow, unless rules exist in squid.conf.
1219
1220 # TAG: http_reply_access
1221 # Allow replies to client requests. This is complementary to http_access.
1222 #
1223 # http_reply_access allow|deny [!] aclname ...
1224 #
1225 # NOTE: if there are no access lines present, the default is to allow
1226 # all replies.
1227 #
1228 # If none of the access lines cause a match the opposite of the
1229 # last line will apply. Thus it is good practice to end the rules
1230 # with an "allow all" or "deny all" entry.
1231 #
1232 # This clause supports both fast and slow acl types.
1233 # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1234 #Default:
1235 # Allow, unless rules exist in squid.conf.
1236
1237 # TAG: icp_access
1238 # Allowing or Denying access to the ICP port based on defined
1239 # access lists
1240 #
1241 # icp_access allow|deny [!]aclname ...
1242 #
1243 # NOTE: The default if no icp_access lines are present is to
1244 # deny all traffic. This default may cause problems with peers
1245 # using ICP.
1246 #
1247 # This clause only supports fast acl types.
1248 # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1249 #
1250 ## Allow ICP queries from local networks only
1251 ##icp_access allow localnet
1252 ##icp_access deny all
1253 #Default:
1254 # Deny, unless rules exist in squid.conf.
1255
1256 # TAG: htcp_access
1257 # Allowing or Denying access to the HTCP port based on defined
1258 # access lists
1259 #
1260 # htcp_access allow|deny [!]aclname ...
1261 #
1262 # See also htcp_clr_access for details on access control for
1263 # cache purge (CLR) HTCP messages.
1264 #
1265 # NOTE: The default if no htcp_access lines are present is to
1266 # deny all traffic. This default may cause problems with peers
1267 # using the htcp option.
1268 #
1269 # This clause only supports fast acl types.
1270 # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1271 #
1272 ## Allow HTCP queries from local networks only
1273 ##htcp_access allow localnet
1274 ##htcp_access deny all
1275 #Default:
1276 # Deny, unless rules exist in squid.conf.
1277
1278 # TAG: htcp_clr_access
1279 # Allowing or Denying access to purge content using HTCP based
1280 # on defined access lists.
1281 # See htcp_access for details on general HTCP access control.
1282 #
1283 # htcp_clr_access allow|deny [!]aclname ...
1284 #
1285 # This clause only supports fast acl types.
1286 # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1287 #
1288 ## Allow HTCP CLR requests from trusted peers
1289 #acl htcp_clr_peer src 192.0.2.2 2001:DB8::2
1290 #htcp_clr_access allow htcp_clr_peer
1291 #htcp_clr_access deny all
1292 #Default:
1293 # Deny, unless rules exist in squid.conf.
1294
1295 # TAG: miss_access
1296 # Determines whether network access is permitted when satisfying a request.
1297 #
1298 # For example;
1299 # to force your neighbors to use you as a sibling instead of
1300 # a parent.
1301 #
1302 # acl localclients src 192.0.2.0/24 2001:DB8::a:0/64
1303 # miss_access deny !localclients
1304 # miss_access allow all
1305 #
1306 # This means only your local clients are allowed to fetch relayed/MISS
1307 # replies from the network and all other clients can only fetch cached
1308 # objects (HITs).
1309 #
1310 # The default for this setting allows all clients who passed the
1311 # http_access rules to relay via this proxy.
1312 #
1313 # This clause only supports fast acl types.
1314 # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1315 #Default:
1316 # Allow, unless rules exist in squid.conf.
1317
1318 # TAG: ident_lookup_access
1319 # A list of ACL elements which, if matched, cause an ident
1320 # (RFC 931) lookup to be performed for this request. For
1321 # example, you might choose to always perform ident lookups
1322 # for your main multi-user Unix boxes, but not for your Macs
1323 # and PCs. By default, ident lookups are not performed for
1324 # any requests.
1325 #
1326 # To enable ident lookups for specific client addresses, you
1327 # can follow this example:
1328 #
1329 # acl ident_aware_hosts src 198.168.1.0/24
1330 # ident_lookup_access allow ident_aware_hosts
1331 # ident_lookup_access deny all
1332 #
1333 # Only src type ACL checks are fully supported. A srcdomain
1334 # ACL might work at times, but it will not always provide
1335 # the correct result.
1336 #
1337 # This clause only supports fast acl types.
1338 # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1339 #Default:
1340 # Unless rules exist in squid.conf, IDENT is not fetched.
1341
1342 # TAG: reply_body_max_size size [acl acl...]
1343 # This option specifies the maximum size of a reply body. It can be
1344 # used to prevent users from downloading very large files, such as
1345 # MP3's and movies. When the reply headers are received, the
1346 # reply_body_max_size lines are processed, and the first line where
1347 # all (if any) listed ACLs are true is used as the maximum body size
1348 # for this reply.
1349 #
1350 # This size is checked twice. First when we get the reply headers,
1351 # we check the content-length value. If the content length value exists
1352 # and is larger than the allowed size, the request is denied and the
1353 # user receives an error message that says "the request or reply
1354 # is too large." If there is no content-length, and the reply
1355 # size exceeds this limit, the client's connection is just closed
1356 # and they will receive a partial reply.
1357 #
1358 # WARNING: downstream caches probably can not detect a partial reply
1359 # if there is no content-length header, so they will cache
1360 # partial responses and give them out as hits. You should NOT
1361 # use this option if you have downstream caches.
1362 #
1363 # WARNING: A maximum size smaller than the size of squid's error messages
1364 # will cause an infinite loop and crash squid. Ensure that the smallest
1365 # non-zero value you use is greater that the maximum header size plus
1366 # the size of your largest error page.
1367 #
1368 # If you set this parameter none (the default), there will be
1369 # no limit imposed.
1370 #
1371 # Configuration Format is:
1372 # reply_body_max_size SIZE UNITS [acl ...]
1373 # ie.
1374 # reply_body_max_size 10 MB
1375 #
1376 #Default:
1377 # No limit is applied.
1378
1379 # NETWORK OPTIONS
1380 # -----------------------------------------------------------------------------
1381
1382 # TAG: http_port
1383 # Usage: port [mode] [options]
1384 # hostname:port [mode] [options]
1385 # 1.2.3.4:port [mode] [options]
1386 #
1387 # The socket addresses where Squid will listen for HTTP client
1388 # requests. You may specify multiple socket addresses.
1389 # There are three forms: port alone, hostname with port, and
1390 # IP address with port. If you specify a hostname or IP
1391 # address, Squid binds the socket to that specific
1392 # address. Most likely, you do not need to bind to a specific
1393 # address, so you can use the port number alone.
1394 #
1395 # If you are running Squid in accelerator mode, you
1396 # probably want to listen on port 80 also, or instead.
1397 #
1398 # The -a command line option may be used to specify additional
1399 # port(s) where Squid listens for proxy request. Such ports will
1400 # be plain proxy ports with no options.
1401 #
1402 # You may specify multiple socket addresses on multiple lines.
1403 #
1404 # Modes:
1405 #
1406 # intercept Support for IP-Layer NAT interception delivering
1407 # traffic to this Squid port.
1408 # NP: disables authentication on the port.
1409 #
1410 # tproxy Support Linux TPROXY (or BSD divert-to) with spoofing
1411 # of outgoing connections using the client IP address.
1412 # NP: disables authentication on the port.
1413 #
1414 # accel Accelerator / reverse proxy mode
1415 #
1416 # ssl-bump For each CONNECT request allowed by ssl_bump ACLs,
1417 # establish secure connection with the client and with
1418 # the server, decrypt HTTPS messages as they pass through
1419 # Squid, and treat them as unencrypted HTTP messages,
1420 # becoming the man-in-the-middle.
1421 #
1422 # The ssl_bump option is required to fully enable
1423 # bumping of CONNECT requests.
1424 #
1425 # Omitting the mode flag causes default forward proxy mode to be used.
1426 #
1427 #
1428 # Accelerator Mode Options:
1429 #
1430 # defaultsite=domainname
1431 # What to use for the Host: header if it is not present
1432 # in a request. Determines what site (not origin server)
1433 # accelerators should consider the default.
1434 #
1435 # no-vhost Disable using HTTP/1.1 Host header for virtual domain support.
1436 #
1437 # protocol= Protocol to reconstruct accelerated and intercepted
1438 # requests with. Defaults to HTTP/1.1 for http_port and
1439 # HTTPS/1.1 for https_port.
1440 # When an unsupported value is configured Squid will
1441 # produce a FATAL error.
1442 # Values: HTTP or HTTP/1.1, HTTPS or HTTPS/1.1
1443 #
1444 # vport Virtual host port support. Using the http_port number
1445 # instead of the port passed on Host: headers.
1446 #
1447 # vport=NN Virtual host port support. Using the specified port
1448 # number instead of the port passed on Host: headers.
1449 #
1450 # act-as-origin
1451 # Act as if this Squid is the origin server.
1452 # This currently means generate new Date: and Expires:
1453 # headers on HIT instead of adding Age:.
1454 #
1455 # ignore-cc Ignore request Cache-Control headers.
1456 #
1457 # WARNING: This option violates HTTP specifications if
1458 # used in non-accelerator setups.
1459 #
1460 # allow-direct Allow direct forwarding in accelerator mode. Normally
1461 # accelerated requests are denied direct forwarding as if
1462 # never_direct was used.
1463 #
1464 # WARNING: this option opens accelerator mode to security
1465 # vulnerabilities usually only affecting in interception
1466 # mode. Make sure to protect forwarding with suitable
1467 # http_access rules when using this.
1468 #
1469 #
1470 # SSL Bump Mode Options:
1471 # In addition to these options ssl-bump requires TLS/SSL options.
1472 #
1473 # generate-host-certificates[=<on|off>]
1474 # Dynamically create SSL server certificates for the
1475 # destination hosts of bumped CONNECT requests.When
1476 # enabled, the cert and key options are used to sign
1477 # generated certificates. Otherwise generated
1478 # certificate will be selfsigned.
1479 # If there is a CA certificate lifetime of the generated
1480 # certificate equals lifetime of the CA certificate. If
1481 # generated certificate is selfsigned lifetime is three
1482 # years.
1483 # This option is disabled by default. See the ssl-bump
1484 # option above for more information.
1485 #
1486 # dynamic_cert_mem_cache_size=SIZE
1487 # Approximate total RAM size spent on cached generated
1488 # certificates. If set to zero, caching is disabled.
1489 #
1490 # TLS / SSL Options:
1491 #
1492 # cert= Path to SSL certificate (PEM format).
1493 #
1494 # key= Path to SSL private key file (PEM format)
1495 # if not specified, the certificate file is
1496 # assumed to be a combined certificate and
1497 # key file.
1498 #
1499 # version= The version of SSL/TLS supported
1500 # 1 automatic (default)
1501 # 2 SSLv2 only
1502 # 3 SSLv3 only
1503 # 4 TLSv1.0 only
1504 # 5 TLSv1.1 only
1505 # 6 TLSv1.2 only
1506 #
1507 # cipher= Colon separated list of supported ciphers.
1508 # NOTE: some ciphers such as EDH ciphers depend on
1509 # additional settings. If those settings are
1510 # omitted the ciphers may be silently ignored
1511 # by the OpenSSL library.
1512 #
1513 # options= Various SSL implementation options. The most important
1514 # being:
1515 # NO_SSLv2 Disallow the use of SSLv2
1516 # NO_SSLv3 Disallow the use of SSLv3
1517 # NO_TLSv1 Disallow the use of TLSv1.0
1518 # NO_TLSv1_1 Disallow the use of TLSv1.1
1519 # NO_TLSv1_2 Disallow the use of TLSv1.2
1520 # SINGLE_DH_USE Always create a new key when using
1521 # temporary/ephemeral DH key exchanges
1522 # NO_TICKET Disables TLS tickets extension
1523 #
1524 # SINGLE_ECDH_USE
1525 # Enable ephemeral ECDH key exchange.
1526 # The adopted curve should be specified
1527 # using the tls-dh option.
1528 #
1529 # ALL Enable various bug workarounds
1530 # suggested as "harmless" by OpenSSL
1531 # Be warned that this reduces SSL/TLS
1532 # strength to some attacks.
1533 # See OpenSSL SSL_CTX_set_options documentation for a
1534 # complete list of options.
1535 #
1536 # clientca= File containing the list of CAs to use when
1537 # requesting a client certificate.
1538 #
1539 # cafile= File containing additional CA certificates to
1540 # use when verifying client certificates. If unset
1541 # clientca will be used.
1542 #
1543 # capath= Directory containing additional CA certificates
1544 # and CRL lists to use when verifying client certificates.
1545 #
1546 # crlfile= File of additional CRL lists to use when verifying
1547 # the client certificate, in addition to CRLs stored in
1548 # the capath. Implies VERIFY_CRL flag below.
1549 #
1550 # tls-dh=[curve:]file
1551 # File containing DH parameters for temporary/ephemeral DH key
1552 # exchanges, optionally prefixed by a curve for ephemeral ECDH
1553 # key exchanges.
1554 # See OpenSSL documentation for details on how to create the
1555 # DH parameter file. Supported curves for ECDH can be listed
1556 # using the "openssl ecparam -list_curves" command.
1557 # WARNING: EDH and EECDH ciphers will be silently disabled if
1558 # this option is not set.
1559 #
1560 # sslflags= Various flags modifying the use of SSL:
1561 # DELAYED_AUTH
1562 # Don't request client certificates
1563 # immediately, but wait until acl processing
1564 # requires a certificate (not yet implemented).
1565 # NO_DEFAULT_CA
1566 # Don't use the default CA lists built in
1567 # to OpenSSL.
1568 # NO_SESSION_REUSE
1569 # Don't allow for session reuse. Each connection
1570 # will result in a new SSL session.
1571 # VERIFY_CRL
1572 # Verify CRL lists when accepting client
1573 # certificates.
1574 # VERIFY_CRL_ALL
1575 # Verify CRL lists for all certificates in the
1576 # client certificate chain.
1577 #
1578 # sslcontext= SSL session ID context identifier.
1579 #
1580 # Other Options:
1581 #
1582 # connection-auth[=on|off]
1583 # use connection-auth=off to tell Squid to prevent
1584 # forwarding Microsoft connection oriented authentication
1585 # (NTLM, Negotiate and Kerberos)
1586 #
1587 # disable-pmtu-discovery=
1588 # Control Path-MTU discovery usage:
1589 # off lets OS decide on what to do (default).
1590 # transparent disable PMTU discovery when transparent
1591 # support is enabled.
1592 # always disable always PMTU discovery.
1593 #
1594 # In many setups of transparently intercepting proxies
1595 # Path-MTU discovery can not work on traffic towards the
1596 # clients. This is the case when the intercepting device
1597 # does not fully track connections and fails to forward
1598 # ICMP must fragment messages to the cache server. If you
1599 # have such setup and experience that certain clients
1600 # sporadically hang or never complete requests set
1601 # disable-pmtu-discovery option to 'transparent'.
1602 #
1603 # name= Specifies a internal name for the port. Defaults to
1604 # the port specification (port or addr:port)
1605 #
1606 # tcpkeepalive[=idle,interval,timeout]
1607 # Enable TCP keepalive probes of idle connections.
1608 # In seconds; idle is the initial time before TCP starts
1609 # probing the connection, interval how often to probe, and
1610 # timeout the time before giving up.
1611 #
1612 # require-proxy-header
1613 # Require PROXY protocol version 1 or 2 connections.
1614 # The proxy_protocol_access is required to whitelist
1615 # downstream proxies which can be trusted.
1616 #
1617 # If you run Squid on a dual-homed machine with an internal
1618 # and an external interface we recommend you to specify the
1619 # internal address:port in http_port. This way Squid will only be
1620 # visible on the internal address.
1621 #
1622 #
1623
1624 # Squid normally listens to port 3128
1625 http_port 3128
1626
1627 # TAG: https_port
1628 # Note: This option is only available if Squid is rebuilt with the
1629 # --with-openssl
1630 #
1631 # Usage: [ip:]port cert=certificate.pem [key=key.pem] [mode] [options...]
1632 #
1633 # The socket address where Squid will listen for client requests made
1634 # over TLS or SSL connections. Commonly referred to as HTTPS.
1635 #
1636 # This is most useful for situations where you are running squid in
1637 # accelerator mode and you want to do the SSL work at the accelerator level.
1638 #
1639 # You may specify multiple socket addresses on multiple lines,
1640 # each with their own SSL certificate and/or options.
1641 #
1642 # Modes:
1643 #
1644 # accel Accelerator / reverse proxy mode
1645 #
1646 # intercept Support for IP-Layer interception of
1647 # outgoing requests without browser settings.
1648 # NP: disables authentication and IPv6 on the port.
1649 #
1650 # tproxy Support Linux TPROXY for spoofing outgoing
1651 # connections using the client IP address.
1652 # NP: disables authentication and maybe IPv6 on the port.
1653 #
1654 # ssl-bump For each intercepted connection allowed by ssl_bump
1655 # ACLs, establish a secure connection with the client and with
1656 # the server, decrypt HTTPS messages as they pass through
1657 # Squid, and treat them as unencrypted HTTP messages,
1658 # becoming the man-in-the-middle.
1659 #
1660 # An "ssl_bump server-first" match is required to
1661 # fully enable bumping of intercepted SSL connections.
1662 #
1663 # Requires tproxy or intercept.
1664 #
1665 # Omitting the mode flag causes default forward proxy mode to be used.
1666 #
1667 #
1668 # See http_port for a list of generic options
1669 #
1670 #
1671 # SSL Options:
1672 #
1673 # cert= Path to SSL certificate (PEM format).
1674 #
1675 # key= Path to SSL private key file (PEM format)
1676 # if not specified, the certificate file is
1677 # assumed to be a combined certificate and
1678 # key file.
1679 #
1680 # version= The version of SSL/TLS supported
1681 # 1 automatic (default)
1682 # 2 SSLv2 only
1683 # 3 SSLv3 only
1684 # 4 TLSv1 only
1685 #
1686 # cipher= Colon separated list of supported ciphers.
1687 #
1688 # options= Various SSL engine options. The most important
1689 # being:
1690 # NO_SSLv2 Disallow the use of SSLv2
1691 # NO_SSLv3 Disallow the use of SSLv3
1692 # NO_TLSv1 Disallow the use of TLSv1
1693 #
1694 # SINGLE_DH_USE Always create a new key when using
1695 # temporary/ephemeral DH key exchanges
1696 #
1697 # SINGLE_ECDH_USE
1698 # Enable ephemeral ECDH key exchange.
1699 # The adopted curve should be specified
1700 # using the tls-dh option.
1701 #
1702 # See src/ssl_support.c or OpenSSL SSL_CTX_set_options
1703 # documentation for a complete list of options.
1704 #
1705 # clientca= File containing the list of CAs to use when
1706 # requesting a client certificate.
1707 #
1708 # cafile= File containing additional CA certificates to
1709 # use when verifying client certificates. If unset
1710 # clientca will be used.
1711 #
1712 # capath= Directory containing additional CA certificates
1713 # and CRL lists to use when verifying client certificates.
1714 #
1715 # crlfile= File of additional CRL lists to use when verifying
1716 # the client certificate, in addition to CRLs stored in
1717 # the capath. Implies VERIFY_CRL flag below.
1718 #
1719 # tls-dh=[curve:]file
1720 # File containing DH parameters for temporary/ephemeral DH key
1721 # exchanges, optionally prefixed by a curve for ephemeral ECDH
1722 # key exchanges.
1723 #
1724 # sslflags= Various flags modifying the use of SSL:
1725 # DELAYED_AUTH
1726 # Don't request client certificates
1727 # immediately, but wait until acl processing
1728 # requires a certificate (not yet implemented).
1729 # NO_DEFAULT_CA
1730 # Don't use the default CA lists built in
1731 # to OpenSSL.
1732 # NO_SESSION_REUSE
1733 # Don't allow for session reuse. Each connection
1734 # will result in a new SSL session.
1735 # VERIFY_CRL
1736 # Verify CRL lists when accepting client
1737 # certificates.
1738 # VERIFY_CRL_ALL
1739 # Verify CRL lists for all certificates in the
1740 # client certificate chain.
1741 #
1742 # sslcontext= SSL session ID context identifier.
1743 #
1744 # generate-host-certificates[=<on|off>]
1745 # Dynamically create SSL server certificates for the
1746 # destination hosts of bumped SSL requests.When
1747 # enabled, the cert and key options are used to sign
1748 # generated certificates. Otherwise generated
1749 # certificate will be selfsigned.
1750 # If there is CA certificate life time of generated
1751 # certificate equals lifetime of CA certificate. If
1752 # generated certificate is selfsigned lifetime is three
1753 # years.
1754 # This option is disabled by default. See the ssl-bump
1755 # option above for more information.
1756 #
1757 # dynamic_cert_mem_cache_size=SIZE
1758 # Approximate total RAM size spent on cached generated
1759 # certificates. If set to zero, caching is disabled.
1760 #
1761 # See http_port for a list of available options.
1762 #Default:
1763 # none
1764
1765 # TAG: ftp_port
1766 # Enables Native FTP proxy by specifying the socket address where Squid
1767 # listens for FTP client requests. See http_port directive for various
1768 # ways to specify the listening address and mode.
1769 #
1770 # Usage: ftp_port address [mode] [options]
1771 #
1772 # WARNING: This is a new, experimental, complex feature that has seen
1773 # limited production exposure. Some Squid modules (e.g., caching) do not
1774 # currently work with native FTP proxying, and many features have not
1775 # even been tested for compatibility. Test well before deploying!
1776 #
1777 # Native FTP proxying differs substantially from proxying HTTP requests
1778 # with ftp:// URIs because Squid works as an FTP server and receives
1779 # actual FTP commands (rather than HTTP requests with FTP URLs).
1780 #
1781 # Native FTP commands accepted at ftp_port are internally converted or
1782 # wrapped into HTTP-like messages. The same happens to Native FTP
1783 # responses received from FTP origin servers. Those HTTP-like messages
1784 # are shoveled through regular access control and adaptation layers
1785 # between the FTP client and the FTP origin server. This allows Squid to
1786 # examine, adapt, block, and log FTP exchanges. Squid reuses most HTTP
1787 # mechanisms when shoveling wrapped FTP messages. For example,
1788 # http_access and adaptation_access directives are used.
1789 #
1790 # Modes:
1791 #
1792 # intercept Same as http_port intercept. The FTP origin address is
1793 # determined based on the intended destination of the
1794 # intercepted connection.
1795 #
1796 # tproxy Support Linux TPROXY for spoofing outgoing
1797 # connections using the client IP address.
1798 # NP: disables authentication and maybe IPv6 on the port.
1799 #
1800 # By default (i.e., without an explicit mode option), Squid extracts the
1801 # FTP origin address from the login@origin parameter of the FTP USER
1802 # command. Many popular FTP clients support such native FTP proxying.
1803 #
1804 # Options:
1805 #
1806 # name=token Specifies an internal name for the port. Defaults to
1807 # the port address. Usable with myportname ACL.
1808 #
1809 # ftp-track-dirs
1810 # Enables tracking of FTP directories by injecting extra
1811 # PWD commands and adjusting Request-URI (in wrapping
1812 # HTTP requests) to reflect the current FTP server
1813 # directory. Tracking is disabled by default.
1814 #
1815 # protocol=FTP Protocol to reconstruct accelerated and intercepted
1816 # requests with. Defaults to FTP. No other accepted
1817 # values have been tested with. An unsupported value
1818 # results in a FATAL error. Accepted values are FTP,
1819 # HTTP (or HTTP/1.1), and HTTPS (or HTTPS/1.1).
1820 #
1821 # Other http_port modes and options that are not specific to HTTP and
1822 # HTTPS may also work.
1823 #Default:
1824 # none
1825
1826 # TAG: tcp_outgoing_tos
1827 # Allows you to select a TOS/Diffserv value for packets outgoing
1828 # on the server side, based on an ACL.
1829 #
1830 # tcp_outgoing_tos ds-field [!]aclname ...
1831 #
1832 # Example where normal_service_net uses the TOS value 0x00
1833 # and good_service_net uses 0x20
1834 #
1835 # acl normal_service_net src 10.0.0.0/24
1836 # acl good_service_net src 10.0.1.0/24
1837 # tcp_outgoing_tos 0x00 normal_service_net
1838 # tcp_outgoing_tos 0x20 good_service_net
1839 #
1840 # TOS/DSCP values really only have local significance - so you should
1841 # know what you're specifying. For more information, see RFC2474,
1842 # RFC2475, and RFC3260.
1843 #
1844 # The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
1845 # "default" to use whatever default your host has.
1846 # Note that only multiples of 4 are usable as the two rightmost bits have
1847 # been redefined for use by ECN (RFC 3168 section 23.1).
1848 # The squid parser will enforce this by masking away the ECN bits.
1849 #
1850 # Processing proceeds in the order specified, and stops at first fully
1851 # matching line.
1852 #
1853 # Only fast ACLs are supported.
1854 #Default:
1855 # none
1856
1857 # TAG: clientside_tos
1858 # Allows you to select a TOS/DSCP value for packets being transmitted
1859 # on the client-side, based on an ACL.
1860 #
1861 # clientside_tos ds-field [!]aclname ...
1862 #
1863 # Example where normal_service_net uses the TOS value 0x00
1864 # and good_service_net uses 0x20
1865 #
1866 # acl normal_service_net src 10.0.0.0/24
1867 # acl good_service_net src 10.0.1.0/24
1868 # clientside_tos 0x00 normal_service_net
1869 # clientside_tos 0x20 good_service_net
1870 #
1871 # Note: This feature is incompatible with qos_flows. Any TOS values set here
1872 # will be overwritten by TOS values in qos_flows.
1873 #
1874 # The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
1875 # "default" to use whatever default your host has.
1876 # Note that only multiples of 4 are usable as the two rightmost bits have
1877 # been redefined for use by ECN (RFC 3168 section 23.1).
1878 # The squid parser will enforce this by masking away the ECN bits.
1879 #
1880 #Default:
1881 # none
1882
1883 # TAG: tcp_outgoing_mark
1884 # Note: This option is only available if Squid is rebuilt with the
1885 # Packet MARK (Linux)
1886 #
1887 # Allows you to apply a Netfilter mark value to outgoing packets
1888 # on the server side, based on an ACL.
1889 #
1890 # tcp_outgoing_mark mark-value [!]aclname ...
1891 #
1892 # Example where normal_service_net uses the mark value 0x00
1893 # and good_service_net uses 0x20
1894 #
1895 # acl normal_service_net src 10.0.0.0/24
1896 # acl good_service_net src 10.0.1.0/24
1897 # tcp_outgoing_mark 0x00 normal_service_net
1898 # tcp_outgoing_mark 0x20 good_service_net
1899 #
1900 # Only fast ACLs are supported.
1901 #Default:
1902 # none
1903
1904 # TAG: clientside_mark
1905 # Note: This option is only available if Squid is rebuilt with the
1906 # Packet MARK (Linux)
1907 #
1908 # Allows you to apply a Netfilter mark value to packets being transmitted
1909 # on the client-side, based on an ACL.
1910 #
1911 # clientside_mark mark-value [!]aclname ...
1912 #
1913 # Example where normal_service_net uses the mark value 0x00
1914 # and good_service_net uses 0x20
1915 #
1916 # acl normal_service_net src 10.0.0.0/24
1917 # acl good_service_net src 10.0.1.0/24
1918 # clientside_mark 0x00 normal_service_net
1919 # clientside_mark 0x20 good_service_net
1920 #
1921 # Note: This feature is incompatible with qos_flows. Any mark values set here
1922 # will be overwritten by mark values in qos_flows.
1923 #Default:
1924 # none
1925
1926 # TAG: qos_flows
1927 # Allows you to select a TOS/DSCP value to mark outgoing
1928 # connections to the client, based on where the reply was sourced.
1929 # For platforms using netfilter, allows you to set a netfilter mark
1930 # value instead of, or in addition to, a TOS value.
1931 #
1932 # By default this functionality is disabled. To enable it with the default
1933 # settings simply use "qos_flows mark" or "qos_flows tos". Default
1934 # settings will result in the netfilter mark or TOS value being copied
1935 # from the upstream connection to the client. Note that it is the connection
1936 # CONNMARK value not the packet MARK value that is copied.
1937 #
1938 # It is not currently possible to copy the mark or TOS value from the
1939 # client to the upstream connection request.
1940 #
1941 # TOS values really only have local significance - so you should
1942 # know what you're specifying. For more information, see RFC2474,
1943 # RFC2475, and RFC3260.
1944 #
1945 # The TOS/DSCP byte must be exactly that - a octet value 0 - 255.
1946 # Note that only multiples of 4 are usable as the two rightmost bits have
1947 # been redefined for use by ECN (RFC 3168 section 23.1).
1948 # The squid parser will enforce this by masking away the ECN bits.
1949 #
1950 # Mark values can be any unsigned 32-bit integer value.
1951 #
1952 # This setting is configured by setting the following values:
1953 #
1954 # tos|mark Whether to set TOS or netfilter mark values
1955 #
1956 # local-hit=0xFF Value to mark local cache hits.
1957 #
1958 # sibling-hit=0xFF Value to mark hits from sibling peers.
1959 #
1960 # parent-hit=0xFF Value to mark hits from parent peers.
1961 #
1962 # miss=0xFF[/mask] Value to mark cache misses. Takes precedence
1963 # over the preserve-miss feature (see below), unless
1964 # mask is specified, in which case only the bits
1965 # specified in the mask are written.
1966 #
1967 # The TOS variant of the following features are only possible on Linux
1968 # and require your kernel to be patched with the TOS preserving ZPH
1969 # patch, available from http://zph.bratcheda.org
1970 # No patch is needed to preserve the netfilter mark, which will work
1971 # with all variants of netfilter.
1972 #
1973 # disable-preserve-miss
1974 # This option disables the preservation of the TOS or netfilter
1975 # mark. By default, the existing TOS or netfilter mark value of
1976 # the response coming from the remote server will be retained
1977 # and masked with miss-mark.
1978 # NOTE: in the case of a netfilter mark, the mark must be set on
1979 # the connection (using the CONNMARK target) not on the packet
1980 # (MARK target).
1981 #
1982 # miss-mask=0xFF
1983 # Allows you to mask certain bits in the TOS or mark value
1984 # received from the remote server, before copying the value to
1985 # the TOS sent towards clients.
1986 # Default for tos: 0xFF (TOS from server is not changed).
1987 # Default for mark: 0xFFFFFFFF (mark from server is not changed).
1988 #
1989 # All of these features require the --enable-zph-qos compilation flag
1990 # (enabled by default). Netfilter marking also requires the
1991 # libnetfilter_conntrack libraries (--with-netfilter-conntrack) and
1992 # libcap 2.09+ (--with-libcap).
1993 #
1994 #Default:
1995 # none
1996
1997 # TAG: tcp_outgoing_address
1998 # Allows you to map requests to different outgoing IP addresses
1999 # based on the username or source address of the user making
2000 # the request.
2001 #
2002 # tcp_outgoing_address ipaddr [[!]aclname] ...
2003 #
2004 # For example;
2005 # Forwarding clients with dedicated IPs for certain subnets.
2006 #
2007 # acl normal_service_net src 10.0.0.0/24
2008 # acl good_service_net src 10.0.2.0/24
2009 #
2010 # tcp_outgoing_address 2001:db8::c001 good_service_net
2011 # tcp_outgoing_address 10.1.0.2 good_service_net
2012 #
2013 # tcp_outgoing_address 2001:db8::beef normal_service_net
2014 # tcp_outgoing_address 10.1.0.1 normal_service_net
2015 #
2016 # tcp_outgoing_address 2001:db8::1
2017 # tcp_outgoing_address 10.1.0.3
2018 #
2019 # Processing proceeds in the order specified, and stops at first fully
2020 # matching line.
2021 #
2022 # Squid will add an implicit IP version test to each line.
2023 # Requests going to IPv4 websites will use the outgoing 10.1.0.* addresses.
2024 # Requests going to IPv6 websites will use the outgoing 2001:db8:* addresses.
2025 #
2026 #
2027 # NOTE: The use of this directive using client dependent ACLs is
2028 # incompatible with the use of server side persistent connections. To
2029 # ensure correct results it is best to set server_persistent_connections
2030 # to off when using this directive in such configurations.
2031 #
2032 # NOTE: The use of this directive to set a local IP on outgoing TCP links
2033 # is incompatible with using TPROXY to set client IP out outbound TCP links.
2034 # When needing to contact peers use the no-tproxy cache_peer option and the
2035 # client_dst_passthru directive re-enable normal forwarding such as this.
2036 #
2037 #Default:
2038 # Address selection is performed by the operating system.
2039
2040 # TAG: host_verify_strict
2041 # Regardless of this option setting, when dealing with intercepted
2042 # traffic, Squid always verifies that the destination IP address matches
2043 # the Host header domain or IP (called 'authority form URL').
2044 #
2045 # This enforcement is performed to satisfy a MUST-level requirement in
2046 # RFC 2616 section 14.23: "The Host field value MUST represent the naming
2047 # authority of the origin server or gateway given by the original URL".
2048 #
2049 # When set to ON:
2050 # Squid always responds with an HTTP 409 (Conflict) error
2051 # page and logs a security warning if there is no match.
2052 #
2053 # Squid verifies that the destination IP address matches
2054 # the Host header for forward-proxy and reverse-proxy traffic
2055 # as well. For those traffic types, Squid also enables the
2056 # following checks, comparing the corresponding Host header
2057 # and Request-URI components:
2058 #
2059 # * The host names (domain or IP) must be identical,
2060 # but valueless or missing Host header disables all checks.
2061 # For the two host names to match, both must be either IP
2062 # or FQDN.
2063 #
2064 # * Port numbers must be identical, but if a port is missing
2065 # the scheme-default port is assumed.
2066 #
2067 #
2068 # When set to OFF (the default):
2069 # Squid allows suspicious requests to continue but logs a
2070 # security warning and blocks caching of the response.
2071 #
2072 # * Forward-proxy traffic is not checked at all.
2073 #
2074 # * Reverse-proxy traffic is not checked at all.
2075 #
2076 # * Intercepted traffic which passes verification is handled
2077 # according to client_dst_passthru.
2078 #
2079 # * Intercepted requests which fail verification are sent
2080 # to the client original destination instead of DIRECT.
2081 # This overrides 'client_dst_passthru off'.
2082 #
2083 # For now suspicious intercepted CONNECT requests are always
2084 # responded to with an HTTP 409 (Conflict) error page.
2085 #
2086 #
2087 # SECURITY NOTE:
2088 #
2089 # As described in CVE-2009-0801 when the Host: header alone is used
2090 # to determine the destination of a request it becomes trivial for
2091 # malicious scripts on remote websites to bypass browser same-origin
2092 # security policy and sandboxing protections.
2093 #
2094 # The cause of this is that such applets are allowed to perform their
2095 # own HTTP stack, in which case the same-origin policy of the browser
2096 # sandbox only verifies that the applet tries to contact the same IP
2097 # as from where it was loaded at the IP level. The Host: header may
2098 # be different from the connected IP and approved origin.
2099 #
2100 #Default:
2101 # host_verify_strict off
2102
2103 # TAG: client_dst_passthru
2104 # With NAT or TPROXY intercepted traffic Squid may pass the request
2105 # directly to the original client destination IP or seek a faster
2106 # source using the HTTP Host header.
2107 #
2108 # Using Host to locate alternative servers can provide faster
2109 # connectivity with a range of failure recovery options.
2110 # But can also lead to connectivity trouble when the client and
2111 # server are attempting stateful interactions unaware of the proxy.
2112 #
2113 # This option (on by default) prevents alternative DNS entries being
2114 # located to send intercepted traffic DIRECT to an origin server.
2115 # The clients original destination IP and port will be used instead.
2116 #
2117 # Regardless of this option setting, when dealing with intercepted
2118 # traffic Squid will verify the Host: header and any traffic which
2119 # fails Host verification will be treated as if this option were ON.
2120 #
2121 # see host_verify_strict for details on the verification process.
2122 #Default:
2123 # client_dst_passthru on
2124
2125 # SSL OPTIONS
2126 # -----------------------------------------------------------------------------
2127
2128 # TAG: ssl_unclean_shutdown
2129 # Note: This option is only available if Squid is rebuilt with the
2130 # --with-openssl
2131 #
2132 # Some browsers (especially MSIE) bugs out on SSL shutdown
2133 # messages.
2134 #Default:
2135 # ssl_unclean_shutdown off
2136
2137 # TAG: ssl_engine
2138 # Note: This option is only available if Squid is rebuilt with the
2139 # --with-openssl
2140 #
2141 # The OpenSSL engine to use. You will need to set this if you
2142 # would like to use hardware SSL acceleration for example.
2143 #Default:
2144 # none
2145
2146 # TAG: sslproxy_client_certificate
2147 # Note: This option is only available if Squid is rebuilt with the
2148 # --with-openssl
2149 #
2150 # Client SSL Certificate to use when proxying https:// URLs
2151 #Default:
2152 # none
2153
2154 # TAG: sslproxy_client_key
2155 # Note: This option is only available if Squid is rebuilt with the
2156 # --with-openssl
2157 #
2158 # Client SSL Key to use when proxying https:// URLs
2159 #Default:
2160 # none
2161
2162 # TAG: sslproxy_version
2163 # Note: This option is only available if Squid is rebuilt with the
2164 # --with-openssl
2165 #
2166 # SSL version level to use when proxying https:// URLs
2167 #
2168 # The versions of SSL/TLS supported:
2169 #
2170 # 1 automatic (default)
2171 # 2 SSLv2 only
2172 # 3 SSLv3 only
2173 # 4 TLSv1.0 only
2174 # 5 TLSv1.1 only
2175 # 6 TLSv1.2 only
2176 #Default:
2177 # automatic SSL/TLS version negotiation
2178
2179 # TAG: sslproxy_options
2180 # Note: This option is only available if Squid is rebuilt with the
2181 # --with-openssl
2182 #
2183 # Colon (:) or comma (,) separated list of SSL implementation options
2184 # to use when proxying https:// URLs
2185 #
2186 # The most important being:
2187 #
2188 # NO_SSLv2 Disallow the use of SSLv2
2189 # NO_SSLv3 Disallow the use of SSLv3
2190 # NO_TLSv1 Disallow the use of TLSv1.0
2191 # NO_TLSv1_1 Disallow the use of TLSv1.1
2192 # NO_TLSv1_2 Disallow the use of TLSv1.2
2193 #
2194 # SINGLE_DH_USE
2195 # Always create a new key when using temporary/ephemeral
2196 # DH key exchanges
2197 #
2198 # NO_TICKET
2199 # Disable use of RFC5077 session tickets. Some servers
2200 # may have problems understanding the TLS extension due
2201 # to ambiguous specification in RFC4507.
2202 #
2203 # ALL Enable various bug workarounds suggested as "harmless"
2204 # by OpenSSL. Be warned that this may reduce SSL/TLS
2205 # strength to some attacks.
2206 #
2207 # See the OpenSSL SSL_CTX_set_options documentation for a
2208 # complete list of possible options.
2209 #
2210 # WARNING: This directive takes a single token. If a space is used
2211 # the value(s) after that space are SILENTLY IGNORED.
2212 #Default:
2213 # none
2214
2215 # TAG: sslproxy_cipher
2216 # Note: This option is only available if Squid is rebuilt with the
2217 # --with-openssl
2218 #
2219 # SSL cipher list to use when proxying https:// URLs
2220 #
2221 # Colon separated list of supported ciphers.
2222 #Default:
2223 # none
2224
2225 # TAG: sslproxy_cafile
2226 # Note: This option is only available if Squid is rebuilt with the
2227 # --with-openssl
2228 #
2229 # file containing CA certificates to use when verifying server
2230 # certificates while proxying https:// URLs
2231 #Default:
2232 # none
2233
2234 # TAG: sslproxy_capath
2235 # Note: This option is only available if Squid is rebuilt with the
2236 # --with-openssl
2237 #
2238 # directory containing CA certificates to use when verifying
2239 # server certificates while proxying https:// URLs
2240 #Default:
2241 # none
2242
2243 # TAG: sslproxy_session_ttl
2244 # Note: This option is only available if Squid is rebuilt with the
2245 # --with-openssl
2246 #
2247 # Sets the timeout value for SSL sessions
2248 #Default:
2249 # sslproxy_session_ttl 300
2250
2251 # TAG: sslproxy_session_cache_size
2252 # Note: This option is only available if Squid is rebuilt with the
2253 # --with-openssl
2254 #
2255 # Sets the cache size to use for ssl session
2256 #Default:
2257 # sslproxy_session_cache_size 2 MB
2258
2259 # TAG: sslproxy_foreign_intermediate_certs
2260 # Note: This option is only available if Squid is rebuilt with the
2261 # --with-openssl
2262 #
2263 # Many origin servers fail to send their full server certificate
2264 # chain for verification, assuming the client already has or can
2265 # easily locate any missing intermediate certificates.
2266 #
2267 # Squid uses the certificates from the specified file to fill in
2268 # these missing chains when trying to validate origin server
2269 # certificate chains.
2270 #
2271 # The file is expected to contain zero or more PEM-encoded
2272 # intermediate certificates. These certificates are not treated
2273 # as trusted root certificates, and any self-signed certificate in
2274 # this file will be ignored.
2275 #Default:
2276 # none
2277
2278 # TAG: sslproxy_cert_sign_hash
2279 # Note: This option is only available if Squid is rebuilt with the
2280 # --with-openssl
2281 #
2282 # Sets the hashing algorithm to use when signing generated certificates.
2283 # Valid algorithm names depend on the OpenSSL library used. The following
2284 # names are usually available: sha1, sha256, sha512, and md5. Please see
2285 # your OpenSSL library manual for the available hashes. By default, Squids
2286 # that support this option use sha256 hashes.
2287 #
2288 # Squid does not forcefully purge cached certificates that were generated
2289 # with an algorithm other than the currently configured one. They remain
2290 # in the cache, subject to the regular cache eviction policy, and become
2291 # useful if the algorithm changes again.
2292 #Default:
2293 # none
2294
2295 # TAG: ssl_bump
2296 # Note: This option is only available if Squid is rebuilt with the
2297 # --with-openssl
2298 #
2299 # This option is consulted when a CONNECT request is received on
2300 # an http_port (or a new connection is intercepted at an
2301 # https_port), provided that port was configured with an ssl-bump
2302 # flag. The subsequent data on the connection is either treated as
2303 # HTTPS and decrypted OR tunneled at TCP level without decryption,
2304 # depending on the first matching bumping "action".
2305 #
2306 # ssl_bump <action> [!]acl ...
2307 #
2308 # The following bumping actions are currently supported:
2309 #
2310 # splice
2311 # Become a TCP tunnel without decrypting proxied traffic.
2312 # This is the default action.
2313 #
2314 # bump
2315 # Establish a secure connection with the server and, using a
2316 # mimicked server certificate, with the client.
2317 #
2318 # peek
2319 # Receive client (step SslBump1) or server (step SslBump2)
2320 # certificate while preserving the possibility of splicing the
2321 # connection. Peeking at the server certificate (during step 2)
2322 # usually precludes bumping of the connection at step 3.
2323 #
2324 # stare
2325 # Receive client (step SslBump1) or server (step SslBump2)
2326 # certificate while preserving the possibility of bumping the
2327 # connection. Staring at the server certificate (during step 2)
2328 # usually precludes splicing of the connection at step 3.
2329 #
2330 # terminate
2331 # Close client and server connections.
2332 #
2333 # Backward compatibility actions available at step SslBump1:
2334 #
2335 # client-first
2336 # Bump the connection. Establish a secure connection with the
2337 # client first, then connect to the server. This old mode does
2338 # not allow Squid to mimic server SSL certificate and does not
2339 # work with intercepted SSL connections.
2340 #
2341 # server-first
2342 # Bump the connection. Establish a secure connection with the
2343 # server first, then establish a secure connection with the
2344 # client, using a mimicked server certificate. Works with both
2345 # CONNECT requests and intercepted SSL connections, but does
2346 # not allow to make decisions based on SSL handshake info.
2347 #
2348 # peek-and-splice
2349 # Decide whether to bump or splice the connection based on
2350 # client-to-squid and server-to-squid SSL hello messages.
2351 # XXX: Remove.
2352 #
2353 # none
2354 # Same as the "splice" action.
2355 #
2356 # All ssl_bump rules are evaluated at each of the supported bumping
2357 # steps. Rules with actions that are impossible at the current step are
2358 # ignored. The first matching ssl_bump action wins and is applied at the
2359 # end of the current step. If no rules match, the splice action is used.
2360 # See the at_step ACL for a list of the supported SslBump steps.
2361 #
2362 # This clause supports both fast and slow acl types.
2363 # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2364 #
2365 # See also: http_port ssl-bump, https_port ssl-bump, and acl at_step.
2366 #
2367 #
2368 # # Example: Bump all TLS connections except those originating from
2369 # # localhost or those going to example.com.
2370 #
2371 # acl broken_sites ssl::server_name .example.com
2372 # ssl_bump splice localhost
2373 # ssl_bump splice broken_sites
2374 # ssl_bump bump all
2375 #Default:
2376 # Become a TCP tunnel without decrypting proxied traffic.
2377
2378 # TAG: sslproxy_flags
2379 # Note: This option is only available if Squid is rebuilt with the
2380 # --with-openssl
2381 #
2382 # Various flags modifying the use of SSL while proxying https:// URLs:
2383 # DONT_VERIFY_PEER Accept certificates that fail verification.
2384 # For refined control, see sslproxy_cert_error.
2385 # NO_DEFAULT_CA Don't use the default CA list built in
2386 # to OpenSSL.
2387 #Default:
2388 # none
2389
2390 # TAG: sslproxy_cert_error
2391 # Note: This option is only available if Squid is rebuilt with the
2392 # --with-openssl
2393 #
2394 # Use this ACL to bypass server certificate validation errors.
2395 #
2396 # For example, the following lines will bypass all validation errors
2397 # when talking to servers for example.com. All other
2398 # validation errors will result in ERR_SECURE_CONNECT_FAIL error.
2399 #
2400 # acl BrokenButTrustedServers dstdomain example.com
2401 # sslproxy_cert_error allow BrokenButTrustedServers
2402 # sslproxy_cert_error deny all
2403 #
2404 # This clause only supports fast acl types.
2405 # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2406 # Using slow acl types may result in server crashes
2407 #
2408 # Without this option, all server certificate validation errors
2409 # terminate the transaction to protect Squid and the client.
2410 #
2411 # SQUID_X509_V_ERR_INFINITE_VALIDATION error cannot be bypassed
2412 # but should not happen unless your OpenSSL library is buggy.
2413 #
2414 # SECURITY WARNING:
2415 # Bypassing validation errors is dangerous because an
2416 # error usually implies that the server cannot be trusted
2417 # and the connection may be insecure.
2418 #
2419 # See also: sslproxy_flags and DONT_VERIFY_PEER.
2420 #Default:
2421 # Server certificate errors terminate the transaction.
2422
2423 # TAG: sslproxy_cert_sign
2424 # Note: This option is only available if Squid is rebuilt with the
2425 # --with-openssl
2426 #
2427 #
2428 # sslproxy_cert_sign <signing algorithm> acl ...
2429 #
2430 # The following certificate signing algorithms are supported:
2431 #
2432 # signTrusted
2433 # Sign using the configured CA certificate which is usually
2434 # placed in and trusted by end-user browsers. This is the
2435 # default for trusted origin server certificates.
2436 #
2437 # signUntrusted
2438 # Sign to guarantee an X509_V_ERR_CERT_UNTRUSTED browser error.
2439 # This is the default for untrusted origin server certificates
2440 # that are not self-signed (see ssl::certUntrusted).
2441 #
2442 # signSelf
2443 # Sign using a self-signed certificate with the right CN to
2444 # generate a X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT error in the
2445 # browser. This is the default for self-signed origin server
2446 # certificates (see ssl::certSelfSigned).
2447 #
2448 # This clause only supports fast acl types.
2449 #
2450 # When sslproxy_cert_sign acl(s) match, Squid uses the corresponding
2451 # signing algorithm to generate the certificate and ignores all
2452 # subsequent sslproxy_cert_sign options (the first match wins). If no
2453 # acl(s) match, the default signing algorithm is determined by errors
2454 # detected when obtaining and validating the origin server certificate.
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: sslproxy_cert_adapt
2466 # Note: This option is only available if Squid is rebuilt with the
2467 # --with-openssl
2468 #
2469 #
2470 # sslproxy_cert_adapt <adaptation algorithm> acl ...
2471 #
2472 # The following certificate adaptation algorithms are supported:
2473 #
2474 # setValidAfter
2475 # Sets the "Not After" property to the "Not After" property of
2476 # the CA certificate used to sign generated certificates.
2477 #
2478 # setValidBefore
2479 # Sets the "Not Before" property to the "Not Before" property of
2480 # the CA certificate used to sign generated certificates.
2481 #
2482 # setCommonName or setCommonName{CN}
2483 # Sets Subject.CN property to the host name specified as a
2484 # CN parameter or, if no explicit CN parameter was specified,
2485 # extracted from the CONNECT request. It is a misconfiguration
2486 # to use setCommonName without an explicit parameter for
2487 # intercepted or tproxied SSL connections.
2488 #
2489 # This clause only supports fast acl types.
2490 #
2491 # Squid first groups sslproxy_cert_adapt options by adaptation algorithm.
2492 # Within a group, when sslproxy_cert_adapt acl(s) match, Squid uses the
2493 # corresponding adaptation algorithm to generate the certificate and
2494 # ignores all subsequent sslproxy_cert_adapt options in that algorithm's
2495 # group (i.e., the first match wins within each algorithm group). If no
2496 # acl(s) match, the default mimicking action takes place.
2497 #
2498 # WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can
2499 # be used with sslproxy_cert_adapt, but if and only if Squid is bumping a
2500 # CONNECT request that carries a domain name. In all other cases (CONNECT
2501 # to an IP address or an intercepted SSL connection), Squid cannot detect
2502 # the domain mismatch at certificate generation time when
2503 # bump-server-first is used.
2504 #Default:
2505 # none
2506
2507 # TAG: sslpassword_program
2508 # Note: This option is only available if Squid is rebuilt with the
2509 # --with-openssl
2510 #
2511 # Specify a program used for entering SSL key passphrases
2512 # when using encrypted SSL certificate keys. If not specified
2513 # keys must either be unencrypted, or Squid started with the -N
2514 # option to allow it to query interactively for the passphrase.
2515 #
2516 # The key file name is given as argument to the program allowing
2517 # selection of the right password if you have multiple encrypted
2518 # keys.
2519 #Default:
2520 # none
2521
2522 # OPTIONS RELATING TO EXTERNAL SSL_CRTD
2523 # -----------------------------------------------------------------------------
2524
2525 # TAG: sslcrtd_program
2526 # Note: This option is only available if Squid is rebuilt with the
2527 # --enable-ssl-crtd
2528 #
2529 # Specify the location and options of the executable for ssl_crtd process.
2530 # /usr/lib/squid/ssl_crtd program requires -s and -M parameters
2531 # For more information use:
2532 # /usr/lib/squid/ssl_crtd -h
2533 #Default:
2534 # sslcrtd_program /usr/lib/squid/ssl_crtd -s /var/lib/ssl_db -M 4MB
2535
2536 # TAG: sslcrtd_children
2537 # Note: This option is only available if Squid is rebuilt with the
2538 # --enable-ssl-crtd
2539 #
2540 # The maximum number of processes spawn to service ssl server.
2541 # The maximum this may be safely set to is 32.
2542 #
2543 # The startup= and idle= options allow some measure of skew in your
2544 # tuning.
2545 #
2546 # startup=N
2547 #
2548 # Sets the minimum number of processes to spawn when Squid
2549 # starts or reconfigures. When set to zero the first request will
2550 # cause spawning of the first child process to handle it.
2551 #
2552 # Starting too few children temporary slows Squid under load while it
2553 # tries to spawn enough additional processes to cope with traffic.
2554 #
2555 # idle=N
2556 #
2557 # Sets a minimum of how many processes Squid is to try and keep available
2558 # at all times. When traffic begins to rise above what the existing
2559 # processes can handle this many more will be spawned up to the maximum
2560 # configured. A minimum setting of 1 is required.
2561 #
2562 # You must have at least one ssl_crtd process.
2563 #Default:
2564 # sslcrtd_children 32 startup=5 idle=1
2565
2566 # TAG: sslcrtvalidator_program
2567 # Note: This option is only available if Squid is rebuilt with the
2568 # --with-openssl
2569 #
2570 # Specify the location and options of the executable for ssl_crt_validator
2571 # process.
2572 #
2573 # Usage: sslcrtvalidator_program [ttl=n] [cache=n] path ...
2574 #
2575 # Options:
2576 # ttl=n TTL in seconds for cached results. The default is 60 secs
2577 # cache=n limit the result cache size. The default value is 2048
2578 #Default:
2579 # none
2580
2581 # TAG: sslcrtvalidator_children
2582 # Note: This option is only available if Squid is rebuilt with the
2583 # --with-openssl
2584 #
2585 # The maximum number of processes spawn to service SSL server.
2586 # The maximum this may be safely set to is 32.
2587 #
2588 # The startup= and idle= options allow some measure of skew in your
2589 # tuning.
2590 #
2591 # startup=N
2592 #
2593 # Sets the minimum number of processes to spawn when Squid
2594 # starts or reconfigures. When set to zero the first request will
2595 # cause spawning of the first child process to handle it.
2596 #
2597 # Starting too few children temporary slows Squid under load while it
2598 # tries to spawn enough additional processes to cope with traffic.
2599 #
2600 # idle=N
2601 #
2602 # Sets a minimum of how many processes Squid is to try and keep available
2603 # at all times. When traffic begins to rise above what the existing
2604 # processes can handle this many more will be spawned up to the maximum
2605 # configured. A minimum setting of 1 is required.
2606 #
2607 # concurrency=
2608 #
2609 # The number of requests each certificate validator helper can handle in
2610 # parallel. A value of 0 indicates the certficate validator does not
2611 # support concurrency. Defaults to 1.
2612 #
2613 # When this directive is set to a value >= 1 then the protocol
2614 # used to communicate with the helper is modified to include
2615 # a request ID in front of the request/response. The request
2616 # ID from the request must be echoed back with the response
2617 # to that request.
2618 #
2619 # You must have at least one ssl_crt_validator process.
2620 #Default:
2621 # sslcrtvalidator_children 32 startup=5 idle=1 concurrency=1
2622
2623 # OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
2624 # -----------------------------------------------------------------------------
2625
2626 # TAG: cache_peer
2627 # To specify other caches in a hierarchy, use the format:
2628 #
2629 # cache_peer hostname type http-port icp-port [options]
2630 #
2631 # For example,
2632 #
2633 # # proxy icp
2634 # # hostname type port port options
2635 # # -------------------- -------- ----- ----- -----------
2636 # cache_peer parent.foo.net parent 3128 3130 default
2637 # cache_peer sib1.foo.net sibling 3128 3130 proxy-only
2638 # cache_peer sib2.foo.net sibling 3128 3130 proxy-only
2639 # cache_peer example.com parent 80 0 default
2640 # cache_peer cdn.example.com sibling 3128 0
2641 #
2642 # type: either 'parent', 'sibling', or 'multicast'.
2643 #
2644 # proxy-port: The port number where the peer accept HTTP requests.
2645 # For other Squid proxies this is usually 3128
2646 # For web servers this is usually 80
2647 #
2648 # icp-port: Used for querying neighbor caches about objects.
2649 # Set to 0 if the peer does not support ICP or HTCP.
2650 # See ICP and HTCP options below for additional details.
2651 #
2652 #
2653 # ==== ICP OPTIONS ====
2654 #
2655 # You MUST also set icp_port and icp_access explicitly when using these options.
2656 # The defaults will prevent peer traffic using ICP.
2657 #
2658 #
2659 # no-query Disable ICP queries to this neighbor.
2660 #
2661 # multicast-responder
2662 # Indicates the named peer is a member of a multicast group.
2663 # ICP queries will not be sent directly to the peer, but ICP
2664 # replies will be accepted from it.
2665 #
2666 # closest-only Indicates that, for ICP_OP_MISS replies, we'll only forward
2667 # CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes.
2668 #
2669 # background-ping
2670 # To only send ICP queries to this neighbor infrequently.
2671 # This is used to keep the neighbor round trip time updated
2672 # and is usually used in conjunction with weighted-round-robin.
2673 #
2674 #
2675 # ==== HTCP OPTIONS ====
2676 #
2677 # You MUST also set htcp_port and htcp_access explicitly when using these options.
2678 # The defaults will prevent peer traffic using HTCP.
2679 #
2680 #
2681 # htcp Send HTCP, instead of ICP, queries to the neighbor.
2682 # You probably also want to set the "icp-port" to 4827
2683 # instead of 3130. This directive accepts a comma separated
2684 # list of options described below.
2685 #
2686 # htcp=oldsquid Send HTCP to old Squid versions (2.5 or earlier).
2687 #
2688 # htcp=no-clr Send HTCP to the neighbor but without
2689 # sending any CLR requests. This cannot be used with
2690 # only-clr.
2691 #
2692 # htcp=only-clr Send HTCP to the neighbor but ONLY CLR requests.
2693 # This cannot be used with no-clr.
2694 #
2695 # htcp=no-purge-clr
2696 # Send HTCP to the neighbor including CLRs but only when
2697 # they do not result from PURGE requests.
2698 #
2699 # htcp=forward-clr
2700 # Forward any HTCP CLR requests this proxy receives to the peer.
2701 #
2702 #
2703 # ==== PEER SELECTION METHODS ====
2704 #
2705 # The default peer selection method is ICP, with the first responding peer
2706 # being used as source. These options can be used for better load balancing.
2707 #
2708 #
2709 # default This is a parent cache which can be used as a "last-resort"
2710 # if a peer cannot be located by any of the peer-selection methods.
2711 # If specified more than once, only the first is used.
2712 #
2713 # round-robin Load-Balance parents which should be used in a round-robin
2714 # fashion in the absence of any ICP queries.
2715 # weight=N can be used to add bias.
2716 #
2717 # weighted-round-robin
2718 # Load-Balance parents which should be used in a round-robin
2719 # fashion with the frequency of each parent being based on the
2720 # round trip time. Closer parents are used more often.
2721 # Usually used for background-ping parents.
2722 # weight=N can be used to add bias.
2723 #
2724 # carp Load-Balance parents which should be used as a CARP array.
2725 # The requests will be distributed among the parents based on the
2726 # CARP load balancing hash function based on their weight.
2727 #
2728 # userhash Load-balance parents based on the client proxy_auth or ident username.
2729 #
2730 # sourcehash Load-balance parents based on the client source IP.
2731 #
2732 # multicast-siblings
2733 # To be used only for cache peers of type "multicast".
2734 # ALL members of this multicast group have "sibling"
2735 # relationship with it, not "parent". This is to a multicast
2736 # group when the requested object would be fetched only from
2737 # a "parent" cache, anyway. It's useful, e.g., when
2738 # configuring a pool of redundant Squid proxies, being
2739 # members of the same multicast group.
2740 #
2741 #
2742 # ==== PEER SELECTION OPTIONS ====
2743 #
2744 # weight=N use to affect the selection of a peer during any weighted
2745 # peer-selection mechanisms.
2746 # The weight must be an integer; default is 1,
2747 # larger weights are favored more.
2748 # This option does not affect parent selection if a peering
2749 # protocol is not in use.
2750 #
2751 # basetime=N Specify a base amount to be subtracted from round trip
2752 # times of parents.
2753 # It is subtracted before division by weight in calculating
2754 # which parent to fectch from. If the rtt is less than the
2755 # base time the rtt is set to a minimal value.
2756 #
2757 # ttl=N Specify a TTL to use when sending multicast ICP queries
2758 # to this address.
2759 # Only useful when sending to a multicast group.
2760 # Because we don't accept ICP replies from random
2761 # hosts, you must configure other group members as
2762 # peers with the 'multicast-responder' option.
2763 #
2764 # no-delay To prevent access to this neighbor from influencing the
2765 # delay pools.
2766 #
2767 # digest-url=URL Tell Squid to fetch the cache digest (if digests are
2768 # enabled) for this host from the specified URL rather
2769 # than the Squid default location.
2770 #
2771 #
2772 # ==== CARP OPTIONS ====
2773 #
2774 # carp-key=key-specification
2775 # use a different key than the full URL to hash against the peer.
2776 # the key-specification is a comma-separated list of the keywords
2777 # scheme, host, port, path, params
2778 # Order is not important.
2779 #
2780 # ==== ACCELERATOR / REVERSE-PROXY OPTIONS ====
2781 #
2782 # originserver Causes this parent to be contacted as an origin server.
2783 # Meant to be used in accelerator setups when the peer
2784 # is a web server.
2785 #
2786 # forceddomain=name
2787 # Set the Host header of requests forwarded to this peer.
2788 # Useful in accelerator setups where the server (peer)
2789 # expects a certain domain name but clients may request
2790 # others. ie example.com or www.example.com
2791 #
2792 # no-digest Disable request of cache digests.
2793 #
2794 # no-netdb-exchange
2795 # Disables requesting ICMP RTT database (NetDB).
2796 #
2797 #
2798 # ==== AUTHENTICATION OPTIONS ====
2799 #
2800 # login=user:password
2801 # If this is a personal/workgroup proxy and your parent
2802 # requires proxy authentication.
2803 #
2804 # Note: The string can include URL escapes (i.e. %20 for
2805 # spaces). This also means % must be written as %%.
2806 #
2807 # login=PASSTHRU
2808 # Send login details received from client to this peer.
2809 # Both Proxy- and WWW-Authorization headers are passed
2810 # without alteration to the peer.
2811 # Authentication is not required by Squid for this to work.
2812 #
2813 # Note: This will pass any form of authentication but
2814 # only Basic auth will work through a proxy unless the
2815 # connection-auth options are also used.
2816 #
2817 # login=PASS Send login details received from client to this peer.
2818 # Authentication is not required by this option.
2819 #
2820 # If there are no client-provided authentication headers
2821 # to pass on, but username and password are available
2822 # from an external ACL user= and password= result tags
2823 # they may be sent instead.
2824 #
2825 # Note: To combine this with proxy_auth both proxies must
2826 # share the same user database as HTTP only allows for
2827 # a single login (one for proxy, one for origin server).
2828 # Also be warned this will expose your users proxy
2829 # password to the peer. USE WITH CAUTION
2830 #
2831 # login=*:password
2832 # Send the username to the upstream cache, but with a
2833 # fixed password. This is meant to be used when the peer
2834 # is in another administrative domain, but it is still
2835 # needed to identify each user.
2836 # The star can optionally be followed by some extra
2837 # information which is added to the username. This can
2838 # be used to identify this proxy to the peer, similar to
2839 # the login=username:password option above.
2840 #
2841 # login=NEGOTIATE
2842 # If this is a personal/workgroup proxy and your parent
2843 # requires a secure proxy authentication.
2844 # The first principal from the default keytab or defined by
2845 # the environment variable KRB5_KTNAME will be used.
2846 #
2847 # WARNING: The connection may transmit requests from multiple
2848 # clients. Negotiate often assumes end-to-end authentication
2849 # and a single-client. Which is not strictly true here.
2850 #
2851 # login=NEGOTIATE:principal_name
2852 # If this is a personal/workgroup proxy and your parent
2853 # requires a secure proxy authentication.
2854 # The principal principal_name from the default keytab or
2855 # defined by the environment variable KRB5_KTNAME will be
2856 # used.
2857 #
2858 # WARNING: The connection may transmit requests from multiple
2859 # clients. Negotiate often assumes end-to-end authentication
2860 # and a single-client. Which is not strictly true here.
2861 #
2862 # connection-auth=on|off
2863 # Tell Squid that this peer does or not support Microsoft
2864 # connection oriented authentication, and any such
2865 # challenges received from there should be ignored.
2866 # Default is auto to automatically determine the status
2867 # of the peer.
2868 #
2869 #
2870 # ==== SSL / HTTPS / TLS OPTIONS ====
2871 #
2872 # ssl Encrypt connections to this peer with SSL/TLS.
2873 #
2874 # sslcert=/path/to/ssl/certificate
2875 # A client SSL certificate to use when connecting to
2876 # this peer.
2877 #
2878 # sslkey=/path/to/ssl/key
2879 # The private SSL key corresponding to sslcert above.
2880 # If 'sslkey' is not specified 'sslcert' is assumed to
2881 # reference a combined file containing both the
2882 # certificate and the key.
2883 #
2884 # sslversion=1|2|3|4|5|6
2885 # The SSL version to use when connecting to this peer
2886 # 1 = automatic (default)
2887 # 2 = SSL v2 only
2888 # 3 = SSL v3 only
2889 # 4 = TLS v1.0 only
2890 # 5 = TLS v1.1 only
2891 # 6 = TLS v1.2 only
2892 #
2893 # sslcipher=... The list of valid SSL ciphers to use when connecting
2894 # to this peer.
2895 #
2896 # ssloptions=... Specify various SSL implementation options:
2897 #
2898 # NO_SSLv2 Disallow the use of SSLv2
2899 # NO_SSLv3 Disallow the use of SSLv3
2900 # NO_TLSv1 Disallow the use of TLSv1.0
2901 # NO_TLSv1_1 Disallow the use of TLSv1.1
2902 # NO_TLSv1_2 Disallow the use of TLSv1.2
2903 #
2904 # SINGLE_DH_USE
2905 # Always create a new key when using
2906 # temporary/ephemeral DH key exchanges
2907 #
2908 # NO_TICKET
2909 # Disable use of RFC5077 session tickets. Some servers
2910 # may have problems understanding the TLS extension due
2911 # to ambiguous specification in RFC4507.
2912 #
2913 # ALL Enable various bug workarounds
2914 # suggested as "harmless" by OpenSSL
2915 # Be warned that this reduces SSL/TLS
2916 # strength to some attacks.
2917 #
2918 # See the OpenSSL SSL_CTX_set_options documentation for a
2919 # more complete list.
2920 #
2921 # sslcafile=... A file containing additional CA certificates to use
2922 # when verifying the peer certificate.
2923 #
2924 # sslcapath=... A directory containing additional CA certificates to
2925 # use when verifying the peer certificate.
2926 #
2927 # sslcrlfile=... A certificate revocation list file to use when
2928 # verifying the peer certificate.
2929 #
2930 # sslflags=... Specify various flags modifying the SSL implementation:
2931 #
2932 # DONT_VERIFY_PEER
2933 # Accept certificates even if they fail to
2934 # verify.
2935 # NO_DEFAULT_CA
2936 # Don't use the default CA list built in
2937 # to OpenSSL.
2938 # DONT_VERIFY_DOMAIN
2939 # Don't verify the peer certificate
2940 # matches the server name
2941 #
2942 # ssldomain= The peer name as advertised in it's certificate.
2943 # Used for verifying the correctness of the received peer
2944 # certificate. If not specified the peer hostname will be
2945 # used.
2946 #
2947 # front-end-https
2948 # Enable the "Front-End-Https: On" header needed when
2949 # using Squid as a SSL frontend in front of Microsoft OWA.
2950 # See MS KB document Q307347 for details on this header.
2951 # If set to auto the header will only be added if the
2952 # request is forwarded as a https:// URL.
2953 #
2954 #
2955 # ==== GENERAL OPTIONS ====
2956 #
2957 # connect-timeout=N
2958 # A peer-specific connect timeout.
2959 # Also see the peer_connect_timeout directive.
2960 #
2961 # connect-fail-limit=N
2962 # How many times connecting to a peer must fail before
2963 # it is marked as down. Standby connection failures
2964 # count towards this limit. Default is 10.
2965 #
2966 # allow-miss Disable Squid's use of only-if-cached when forwarding
2967 # requests to siblings. This is primarily useful when
2968 # icp_hit_stale is used by the sibling. Excessive use
2969 # of this option may result in forwarding loops. One way
2970 # to prevent peering loops when using this option, is to
2971 # deny cache peer usage on requests from a peer:
2972 # acl fromPeer ...
2973 # cache_peer_access peerName deny fromPeer
2974 #
2975 # max-conn=N Limit the number of concurrent connections the Squid
2976 # may open to this peer, including already opened idle
2977 # and standby connections. There is no peer-specific
2978 # connection limit by default.
2979 #
2980 # A peer exceeding the limit is not used for new
2981 # requests unless a standby connection is available.
2982 #
2983 # max-conn currently works poorly with idle persistent
2984 # connections: When a peer reaches its max-conn limit,
2985 # and there are idle persistent connections to the peer,
2986 # the peer may not be selected because the limiting code
2987 # does not know whether Squid can reuse those idle
2988 # connections.
2989 #
2990 # standby=N Maintain a pool of N "hot standby" connections to an
2991 # UP peer, available for requests when no idle
2992 # persistent connection is available (or safe) to use.
2993 # By default and with zero N, no such pool is maintained.
2994 # N must not exceed the max-conn limit (if any).
2995 #
2996 # At start or after reconfiguration, Squid opens new TCP
2997 # standby connections until there are N connections
2998 # available and then replenishes the standby pool as
2999 # opened connections are used up for requests. A used
3000 # connection never goes back to the standby pool, but
3001 # may go to the regular idle persistent connection pool
3002 # shared by all peers and origin servers.
3003 #
3004 # Squid never opens multiple new standby connections
3005 # concurrently. This one-at-a-time approach minimizes
3006 # flooding-like effect on peers. Furthermore, just a few
3007 # standby connections should be sufficient in most cases
3008 # to supply most new requests with a ready-to-use
3009 # connection.
3010 #
3011 # Standby connections obey server_idle_pconn_timeout.
3012 # For the feature to work as intended, the peer must be
3013 # configured to accept and keep them open longer than
3014 # the idle timeout at the connecting Squid, to minimize
3015 # race conditions typical to idle used persistent
3016 # connections. Default request_timeout and
3017 # server_idle_pconn_timeout values ensure such a
3018 # configuration.
3019 #
3020 # name=xxx Unique name for the peer.
3021 # Required if you have multiple peers on the same host
3022 # but different ports.
3023 # This name can be used in cache_peer_access and similar
3024 # directives to identify the peer.
3025 # Can be used by outgoing access controls through the
3026 # peername ACL type.
3027 #
3028 # no-tproxy Do not use the client-spoof TPROXY support when forwarding
3029 # requests to this peer. Use normal address selection instead.
3030 # This overrides the spoof_client_ip ACL.
3031 #
3032 # proxy-only objects fetched from the peer will not be stored locally.
3033 #
3034 #Default:
3035 # none
3036
3037 # TAG: cache_peer_domain
3038 # Use to limit the domains for which a neighbor cache will be
3039 # queried.
3040 #
3041 # Usage:
3042 # cache_peer_domain cache-host domain [domain ...]
3043 # cache_peer_domain cache-host !domain
3044 #
3045 # For example, specifying
3046 #
3047 # cache_peer_domain parent.foo.net .edu
3048 #
3049 # has the effect such that UDP query packets are sent to
3050 # 'bigserver' only when the requested object exists on a
3051 # server in the .edu domain. Prefixing the domainname
3052 # with '!' means the cache will be queried for objects
3053 # NOT in that domain.
3054 #
3055 # NOTE: * Any number of domains may be given for a cache-host,
3056 # either on the same or separate lines.
3057 # * When multiple domains are given for a particular
3058 # cache-host, the first matched domain is applied.
3059 # * Cache hosts with no domain restrictions are queried
3060 # for all requests.
3061 # * There are no defaults.
3062 # * There is also a 'cache_peer_access' tag in the ACL
3063 # section.
3064 #Default:
3065 # none
3066
3067 # TAG: cache_peer_access
3068 # Restricts usage of cache_peer proxies.
3069 #
3070 # Usage:
3071 # cache_peer_access peer-name allow|deny [!]aclname ...
3072 #
3073 # For the required peer-name parameter, use either the value of the
3074 # cache_peer name=value parameter or, if name=value is missing, the
3075 # cache_peer hostname parameter.
3076 #
3077 # This directive narrows down the selection of peering candidates, but
3078 # does not determine the order in which the selected candidates are
3079 # contacted. That order is determined by the peer selection algorithms
3080 # (see PEER SELECTION sections in the cache_peer documentation).
3081 #
3082 # If a deny rule matches, the corresponding peer will not be contacted
3083 # for the current transaction -- Squid will not send ICP queries and
3084 # will not forward HTTP requests to that peer. An allow match leaves
3085 # the corresponding peer in the selection. The first match for a given
3086 # peer wins for that peer.
3087 #
3088 # The relative order of cache_peer_access directives for the same peer
3089 # matters. The relative order of any two cache_peer_access directives
3090 # for different peers does not matter. To ease interpretation, it is a
3091 # good idea to group cache_peer_access directives for the same peer
3092 # together.
3093 #
3094 # A single cache_peer_access directive may be evaluated multiple times
3095 # for a given transaction because individual peer selection algorithms
3096 # may check it independently from each other. These redundant checks
3097 # may be optimized away in future Squid versions.
3098 #
3099 # This clause only supports fast acl types.
3100 # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
3101 #Default:
3102 # No peer usage restrictions.
3103
3104 # TAG: neighbor_type_domain
3105 # Modify the cache_peer neighbor type when passing requests
3106 # about specific domains to the peer.
3107 #
3108 # Usage:
3109 # neighbor_type_domain neighbor parent|sibling domain domain ...
3110 #
3111 # For example:
3112 # cache_peer foo.example.com parent 3128 3130
3113 # neighbor_type_domain foo.example.com sibling .au .de
3114 #
3115 # The above configuration treats all requests to foo.example.com as a
3116 # parent proxy unless the request is for a .au or .de ccTLD domain name.
3117 #Default:
3118 # The peer type from cache_peer directive is used for all requests to that peer.
3119
3120 # TAG: dead_peer_timeout (seconds)
3121 # This controls how long Squid waits to declare a peer cache
3122 # as "dead." If there are no ICP replies received in this
3123 # amount of time, Squid will declare the peer dead and not
3124 # expect to receive any further ICP replies. However, it
3125 # continues to send ICP queries, and will mark the peer as
3126 # alive upon receipt of the first subsequent ICP reply.
3127 #
3128 # This timeout also affects when Squid expects to receive ICP
3129 # replies from peers. If more than 'dead_peer' seconds have
3130 # passed since the last ICP reply was received, Squid will not
3131 # expect to receive an ICP reply on the next query. Thus, if
3132 # your time between requests is greater than this timeout, you
3133 # will see a lot of requests sent DIRECT to origin servers
3134 # instead of to your parents.
3135 #Default:
3136 # dead_peer_timeout 10 seconds
3137
3138 # TAG: forward_max_tries
3139 # Controls how many different forward paths Squid will try
3140 # before giving up. See also forward_timeout.
3141 #
3142 # NOTE: connect_retries (default: none) can make each of these
3143 # possible forwarding paths be tried multiple times.
3144 #Default:
3145 # forward_max_tries 25
3146
3147 # MEMORY CACHE OPTIONS
3148 # -----------------------------------------------------------------------------
3149
3150 # TAG: cache_mem (bytes)
3151 # NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
3152 # IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
3153 # USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
3154 # THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
3155 #
3156 # 'cache_mem' specifies the ideal amount of memory to be used
3157 # for:
3158 # * In-Transit objects
3159 # * Hot Objects
3160 # * Negative-Cached objects
3161 #
3162 # Data for these objects are stored in 4 KB blocks. This
3163 # parameter specifies the ideal upper limit on the total size of
3164 # 4 KB blocks allocated. In-Transit objects take the highest
3165 # priority.
3166 #
3167 # In-transit objects have priority over the others. When
3168 # additional space is needed for incoming data, negative-cached
3169 # and hot objects will be released. In other words, the
3170 # negative-cached and hot objects will fill up any unused space
3171 # not needed for in-transit objects.
3172 #
3173 # If circumstances require, this limit will be exceeded.
3174 # Specifically, if your incoming request rate requires more than
3175 # 'cache_mem' of memory to hold in-transit objects, Squid will
3176 # exceed this limit to satisfy the new requests. When the load
3177 # decreases, blocks will be freed until the high-water mark is
3178 # reached. Thereafter, blocks will be used to store hot
3179 # objects.
3180 #
3181 # If shared memory caching is enabled, Squid does not use the shared
3182 # cache space for in-transit objects, but they still consume as much
3183 # local memory as they need. For more details about the shared memory
3184 # cache, see memory_cache_shared.
3185 #Default:
3186 # cache_mem 256 MB
3187
3188 # TAG: maximum_object_size_in_memory (bytes)
3189 # Objects greater than this size will not be attempted to kept in
3190 # the memory cache. This should be set high enough to keep objects
3191 # accessed frequently in memory to improve performance whilst low
3192 # enough to keep larger objects from hoarding cache_mem.
3193 #Default:
3194 # maximum_object_size_in_memory 512 KB
3195
3196 # TAG: memory_cache_shared on|off
3197 # Controls whether the memory cache is shared among SMP workers.
3198 #
3199 # The shared memory cache is meant to occupy cache_mem bytes and replace
3200 # the non-shared memory cache, although some entities may still be
3201 # cached locally by workers for now (e.g., internal and in-transit
3202 # objects may be served from a local memory cache even if shared memory
3203 # caching is enabled).
3204 #
3205 # By default, the memory cache is shared if and only if all of the
3206 # following conditions are satisfied: Squid runs in SMP mode with
3207 # multiple workers, cache_mem is positive, and Squid environment
3208 # supports required IPC primitives (e.g., POSIX shared memory segments
3209 # and GCC-style atomic operations).
3210 #
3211 # To avoid blocking locks, shared memory uses opportunistic algorithms
3212 # that do not guarantee that every cachable entity that could have been
3213 # shared among SMP workers will actually be shared.
3214 #Default:
3215 # "on" where supported if doing memory caching with multiple SMP workers.
3216
3217 # TAG: memory_cache_mode
3218 # Controls which objects to keep in the memory cache (cache_mem)
3219 #
3220 # always Keep most recently fetched objects in memory (default)
3221 #
3222 # disk Only disk cache hits are kept in memory, which means
3223 # an object must first be cached on disk and then hit
3224 # a second time before cached in memory.
3225 #
3226 # network Only objects fetched from network is kept in memory
3227 #Default:
3228 # Keep the most recently fetched objects in memory
3229
3230 # TAG: memory_replacement_policy
3231 # The memory replacement policy parameter determines which
3232 # objects are purged from memory when memory space is needed.
3233 #
3234 # See cache_replacement_policy for details on algorithms.
3235 #Default:
3236 # memory_replacement_policy lru
3237
3238 # DISK CACHE OPTIONS
3239 # -----------------------------------------------------------------------------
3240
3241 # TAG: cache_replacement_policy
3242 # The cache replacement policy parameter determines which
3243 # objects are evicted (replaced) when disk space is needed.
3244 #
3245 # lru : Squid's original list based LRU policy
3246 # heap GDSF : Greedy-Dual Size Frequency
3247 # heap LFUDA: Least Frequently Used with Dynamic Aging
3248 # heap LRU : LRU policy implemented using a heap
3249 #
3250 # Applies to any cache_dir lines listed below this directive.
3251 #
3252 # The LRU policies keeps recently referenced objects.
3253 #
3254 # The heap GDSF policy optimizes object hit rate by keeping smaller
3255 # popular objects in cache so it has a better chance of getting a
3256 # hit. It achieves a lower byte hit rate than LFUDA though since
3257 # it evicts larger (possibly popular) objects.
3258 #
3259 # The heap LFUDA policy keeps popular objects in cache regardless of
3260 # their size and thus optimizes byte hit rate at the expense of
3261 # hit rate since one large, popular object will prevent many
3262 # smaller, slightly less popular objects from being cached.
3263 #
3264 # Both policies utilize a dynamic aging mechanism that prevents
3265 # cache pollution that can otherwise occur with frequency-based
3266 # replacement policies.
3267 #
3268 # NOTE: if using the LFUDA replacement policy you should increase
3269 # the value of maximum_object_size above its default of 4 MB to
3270 # to maximize the potential byte hit rate improvement of LFUDA.
3271 #
3272 # For more information about the GDSF and LFUDA cache replacement
3273 # policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
3274 # and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
3275 #Default:
3276 # cache_replacement_policy lru
3277
3278 # TAG: minimum_object_size (bytes)
3279 # Objects smaller than this size will NOT be saved on disk. The
3280 # value is specified in bytes, and the default is 0 KB, which
3281 # means all responses can be stored.
3282 #Default:
3283 # no limit
3284
3285 # TAG: maximum_object_size (bytes)
3286 # Set the default value for max-size parameter on any cache_dir.
3287 # The value is specified in bytes, and the default is 4 MB.
3288 #
3289 # If you wish to get a high BYTES hit ratio, you should probably
3290 # increase this (one 32 MB object hit counts for 3200 10KB
3291 # hits).
3292 #
3293 # If you wish to increase hit ratio more than you want to
3294 # save bandwidth you should leave this low.
3295 #
3296 # NOTE: if using the LFUDA replacement policy you should increase
3297 # this value to maximize the byte hit rate improvement of LFUDA!
3298 # See cache_replacement_policy for a discussion of this policy.
3299 #Default:
3300 # maximum_object_size 4 MB
3301
3302 # TAG: cache_dir
3303 # Format:
3304 # cache_dir Type Directory-Name Fs-specific-data [options]
3305 #
3306 # You can specify multiple cache_dir lines to spread the
3307 # cache among different disk partitions.
3308 #
3309 # Type specifies the kind of storage system to use. Only "ufs"
3310 # is built by default. To enable any of the other storage systems
3311 # see the --enable-storeio configure option.
3312 #
3313 # 'Directory' is a top-level directory where cache swap
3314 # files will be stored. If you want to use an entire disk
3315 # for caching, this can be the mount-point directory.
3316 # The directory must exist and be writable by the Squid
3317 # process. Squid will NOT create this directory for you.
3318 #
3319 # In SMP configurations, cache_dir must not precede the workers option
3320 # and should use configuration macros or conditionals to give each
3321 # worker interested in disk caching a dedicated cache directory.
3322 #
3323 #
3324 # ==== The ufs store type ====
3325 #
3326 # "ufs" is the old well-known Squid storage format that has always
3327 # been there.
3328 #
3329 # Usage:
3330 # cache_dir ufs Directory-Name Mbytes L1 L2 [options]
3331 #
3332 # 'Mbytes' is the amount of disk space (MB) to use under this
3333 # directory. The default is 100 MB. Change this to suit your
3334 # configuration. Do NOT put the size of your disk drive here.
3335 # Instead, if you want Squid to use the entire disk drive,
3336 # subtract 20% and use that value.
3337 #
3338 # 'L1' is the number of first-level subdirectories which
3339 # will be created under the 'Directory'. The default is 16.
3340 #
3341 # 'L2' is the number of second-level subdirectories which
3342 # will be created under each first-level directory. The default
3343 # is 256.
3344 #
3345 #
3346 # ==== The aufs store type ====
3347 #
3348 # "aufs" uses the same storage format as "ufs", utilizing
3349 # POSIX-threads to avoid blocking the main Squid process on
3350 # disk-I/O. This was formerly known in Squid as async-io.
3351 #
3352 # Usage:
3353 # cache_dir aufs Directory-Name Mbytes L1 L2 [options]
3354 #
3355 # see argument descriptions under ufs above
3356 #
3357 #
3358 # ==== The diskd store type ====
3359 #
3360 # "diskd" uses the same storage format as "ufs", utilizing a
3361 # separate process to avoid blocking the main Squid process on
3362 # disk-I/O.
3363 #
3364 # Usage:
3365 # cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
3366 #
3367 # see argument descriptions under ufs above
3368 #
3369 # Q1 specifies the number of unacknowledged I/O requests when Squid
3370 # stops opening new files. If this many messages are in the queues,
3371 # Squid won't open new files. Default is 64
3372 #
3373 # Q2 specifies the number of unacknowledged messages when Squid
3374 # starts blocking. If this many messages are in the queues,
3375 # Squid blocks until it receives some replies. Default is 72
3376 #
3377 # When Q1 < Q2 (the default), the cache directory is optimized
3378 # for lower response time at the expense of a decrease in hit
3379 # ratio. If Q1 > Q2, the cache directory is optimized for
3380 # higher hit ratio at the expense of an increase in response
3381 # time.
3382 #
3383 #
3384 # ==== The rock store type ====
3385 #
3386 # Usage:
3387 # cache_dir rock Directory-Name Mbytes [options]
3388 #
3389 # The Rock Store type is a database-style storage. All cached
3390 # entries are stored in a "database" file, using fixed-size slots.
3391 # A single entry occupies one or more slots.
3392 #
3393 # If possible, Squid using Rock Store creates a dedicated kid
3394 # process called "disker" to avoid blocking Squid worker(s) on disk
3395 # I/O. One disker kid is created for each rock cache_dir. Diskers
3396 # are created only when Squid, running in daemon mode, has support
3397 # for the IpcIo disk I/O module.
3398 #
3399 # swap-timeout=msec: Squid will not start writing a miss to or
3400 # reading a hit from disk if it estimates that the swap operation
3401 # will take more than the specified number of milliseconds. By
3402 # default and when set to zero, disables the disk I/O time limit
3403 # enforcement. Ignored when using blocking I/O module because
3404 # blocking synchronous I/O does not allow Squid to estimate the
3405 # expected swap wait time.
3406 #
3407 # max-swap-rate=swaps/sec: Artificially limits disk access using
3408 # the specified I/O rate limit. Swap out requests that
3409 # would cause the average I/O rate to exceed the limit are
3410 # delayed. Individual swap in requests (i.e., hits or reads) are
3411 # not delayed, but they do contribute to measured swap rate and
3412 # since they are placed in the same FIFO queue as swap out
3413 # requests, they may wait longer if max-swap-rate is smaller.
3414 # This is necessary on file systems that buffer "too
3415 # many" writes and then start blocking Squid and other processes
3416 # while committing those writes to disk. Usually used together
3417 # with swap-timeout to avoid excessive delays and queue overflows
3418 # when disk demand exceeds available disk "bandwidth". By default
3419 # and when set to zero, disables the disk I/O rate limit
3420 # enforcement. Currently supported by IpcIo module only.
3421 #
3422 # slot-size=bytes: The size of a database "record" used for
3423 # storing cached responses. A cached response occupies at least
3424 # one slot and all database I/O is done using individual slots so
3425 # increasing this parameter leads to more disk space waste while
3426 # decreasing it leads to more disk I/O overheads. Should be a
3427 # multiple of your operating system I/O page size. Defaults to
3428 # 16KBytes. A housekeeping header is stored with each slot and
3429 # smaller slot-sizes will be rejected. The header is smaller than
3430 # 100 bytes.
3431 #
3432 #
3433 # ==== COMMON OPTIONS ====
3434 #
3435 # no-store no new objects should be stored to this cache_dir.
3436 #
3437 # min-size=n the minimum object size in bytes this cache_dir
3438 # will accept. It's used to restrict a cache_dir
3439 # to only store large objects (e.g. AUFS) while
3440 # other stores are optimized for smaller objects
3441 # (e.g. Rock).
3442 # Defaults to 0.
3443 #
3444 # max-size=n the maximum object size in bytes this cache_dir
3445 # supports.
3446 # The value in maximum_object_size directive sets
3447 # the default unless more specific details are
3448 # available (ie a small store capacity).
3449 #
3450 # Note: To make optimal use of the max-size limits you should order
3451 # the cache_dir lines with the smallest max-size value first.
3452 #
3453 #Default:
3454 # No disk cache. Store cache ojects only in memory.
3455 #
3456
3457 # Uncomment and adjust the following to add a disk cache directory.
3458 #cache_dir ufs /var/spool/squid 100 16 256
3459
3460 # TAG: store_dir_select_algorithm
3461 # How Squid selects which cache_dir to use when the response
3462 # object will fit into more than one.
3463 #
3464 # Regardless of which algorithm is used the cache_dir min-size
3465 # and max-size parameters are obeyed. As such they can affect
3466 # the selection algorithm by limiting the set of considered
3467 # cache_dir.
3468 #
3469 # Algorithms:
3470 #
3471 # least-load
3472 #
3473 # This algorithm is suited to caches with similar cache_dir
3474 # sizes and disk speeds.
3475 #
3476 # The disk with the least I/O pending is selected.
3477 # When there are multiple disks with the same I/O load ranking
3478 # the cache_dir with most available capacity is selected.
3479 #
3480 # When a mix of cache_dir sizes are configured the faster disks
3481 # have a naturally lower I/O loading and larger disks have more
3482 # capacity. So space used to store objects and data throughput
3483 # may be very unbalanced towards larger disks.
3484 #
3485 #
3486 # round-robin
3487 #
3488 # This algorithm is suited to caches with unequal cache_dir
3489 # disk sizes.
3490 #
3491 # Each cache_dir is selected in a rotation. The next suitable
3492 # cache_dir is used.
3493 #
3494 # Available cache_dir capacity is only considered in relation
3495 # to whether the object will fit and meets the min-size and
3496 # max-size parameters.
3497 #
3498 # Disk I/O loading is only considered to prevent overload on slow
3499 # disks. This algorithm does not spread objects by size, so any
3500 # I/O loading per-disk may appear very unbalanced and volatile.
3501 #
3502 # If several cache_dirs use similar min-size, max-size, or other
3503 # limits to to reject certain responses, then do not group such
3504 # cache_dir lines together, to avoid round-robin selection bias
3505 # towards the first cache_dir after the group. Instead, interleave
3506 # cache_dir lines from different groups. For example:
3507 #
3508 # store_dir_select_algorithm round-robin
3509 # cache_dir rock /hdd1 ... min-size=100000
3510 # cache_dir rock /ssd1 ... max-size=99999
3511 # cache_dir rock /hdd2 ... min-size=100000
3512 # cache_dir rock /ssd2 ... max-size=99999
3513 # cache_dir rock /hdd3 ... min-size=100000
3514 # cache_dir rock /ssd3 ... max-size=99999
3515 #Default:
3516 # store_dir_select_algorithm least-load
3517
3518 # TAG: max_open_disk_fds
3519 # To avoid having disk as the I/O bottleneck Squid can optionally
3520 # bypass the on-disk cache if more than this amount of disk file
3521 # descriptors are open.
3522 #
3523 # A value of 0 indicates no limit.
3524 #Default:
3525 # no limit
3526
3527 # TAG: cache_swap_low (percent, 0-100)
3528 # The low-water mark for AUFS/UFS/diskd cache object eviction by
3529 # the cache_replacement_policy algorithm.
3530 #
3531 # Removal begins when the swap (disk) usage of a cache_dir is
3532 # above this low-water mark and attempts to maintain utilization
3533 # near the low-water mark.
3534 #
3535 # As swap utilization increases towards the high-water mark set
3536 # by cache_swap_high object eviction becomes more agressive.
3537 #
3538 # The value difference in percentages between low- and high-water
3539 # marks represent an eviction rate of 300 objects per second and
3540 # the rate continues to scale in agressiveness by multiples of
3541 # this above the high-water mark.
3542 #
3543 # Defaults are 90% and 95%. If you have a large cache, 5% could be
3544 # hundreds of MB. If this is the case you may wish to set these
3545 # numbers closer together.
3546 #
3547 # See also cache_swap_high and cache_replacement_policy
3548 #Default:
3549 # cache_swap_low 90
3550
3551 # TAG: cache_swap_high (percent, 0-100)
3552 # The high-water mark for AUFS/UFS/diskd cache object eviction by
3553 # the cache_replacement_policy algorithm.
3554 #
3555 # Removal begins when the swap (disk) usage of a cache_dir is
3556 # above the low-water mark set by cache_swap_low and attempts to
3557 # maintain utilization near the low-water mark.
3558 #
3559 # As swap utilization increases towards this high-water mark object
3560 # eviction becomes more agressive.
3561 #
3562 # The value difference in percentages between low- and high-water
3563 # marks represent an eviction rate of 300 objects per second and
3564 # the rate continues to scale in agressiveness by multiples of
3565 # this above the high-water mark.
3566 #
3567 # Defaults are 90% and 95%. If you have a large cache, 5% could be
3568 # hundreds of MB. If this is the case you may wish to set these
3569 # numbers closer together.
3570 #
3571 # See also cache_swap_low and cache_replacement_policy
3572 #Default:
3573 # cache_swap_high 95
3574
3575 # LOGFILE OPTIONS
3576 # -----------------------------------------------------------------------------
3577
3578 # TAG: logformat
3579 # Usage:
3580 #
3581 # logformat <name> <format specification>
3582 #
3583 # Defines an access log format.
3584 #
3585 # The <format specification> is a string with embedded % format codes
3586 #
3587 # % format codes all follow the same basic structure where all but
3588 # the formatcode is optional. Output strings are automatically escaped
3589 # as required according to their context and the output format
3590 # modifiers are usually not needed, but can be specified if an explicit
3591 # output format is desired.
3592 #
3593 # % ["|[|'|#] [-] [[0]width] [{argument}] formatcode
3594 #
3595 # " output in quoted string format
3596 # [ output in squid text log format as used by log_mime_hdrs
3597 # # output in URL quoted format
3598 # ' output as-is
3599 #
3600 # - left aligned
3601 #
3602 # width minimum and/or maximum field width:
3603 # [width_min][.width_max]
3604 # When minimum starts with 0, the field is zero-padded.
3605 # String values exceeding maximum width are truncated.
3606 #
3607 # {arg} argument such as header name etc
3608 #
3609 # Format codes:
3610 #
3611 # % a literal % character
3612 # sn Unique sequence number per log line entry
3613 # err_code The ID of an error response served by Squid or
3614 # a similar internal error identifier.
3615 # err_detail Additional err_code-dependent error information.
3616 # note The annotation specified by the argument. Also
3617 # logs the adaptation meta headers set by the
3618 # adaptation_meta configuration parameter.
3619 # If no argument given all annotations logged.
3620 # The argument may include a separator to use with
3621 # annotation values:
3622 # name[:separator]
3623 # By default, multiple note values are separated with ","
3624 # and multiple notes are separated with "\r\n".
3625 # When logging named notes with %{name}note, the
3626 # explicitly configured separator is used between note
3627 # values. When logging all notes with %note, the
3628 # explicitly configured separator is used between
3629 # individual notes. There is currently no way to
3630 # specify both value and notes separators when logging
3631 # all notes with %note.
3632 #
3633 # Connection related format codes:
3634 #
3635 # >a Client source IP address
3636 # >A Client FQDN
3637 # >p Client source port
3638 # >eui Client source EUI (MAC address, EUI-48 or EUI-64 identifier)
3639 # >la Local IP address the client connected to
3640 # >lp Local port number the client connected to
3641 # >qos Client connection TOS/DSCP value set by Squid
3642 # >nfmark Client connection netfilter mark set by Squid
3643 #
3644 # la Local listening IP address the client connection was connected to.
3645 # lp Local listening port number the client connection was connected to.
3646 #
3647 # <a Server IP address of the last server or peer connection
3648 # <A Server FQDN or peer name
3649 # <p Server port number of the last server or peer connection
3650 # <la Local IP address of the last server or peer connection
3651 # <lp Local port number of the last server or peer connection
3652 # <qos Server connection TOS/DSCP value set by Squid
3653 # <nfmark Server connection netfilter mark set by Squid
3654 #
3655 # Time related format codes:
3656 #
3657 # ts Seconds since epoch
3658 # tu subsecond time (milliseconds)
3659 # tl Local time. Optional strftime format argument
3660 # default %d/%b/%Y:%H:%M:%S %z
3661 # tg GMT time. Optional strftime format argument
3662 # default %d/%b/%Y:%H:%M:%S %z
3663 # tr Response time (milliseconds)
3664 # dt Total time spent making DNS lookups (milliseconds)
3665 # tS Approximate master transaction start time in
3666 # <full seconds since epoch>.<fractional seconds> format.
3667 # Currently, Squid considers the master transaction
3668 # started when a complete HTTP request header initiating
3669 # the transaction is received from the client. This is
3670 # the same value that Squid uses to calculate transaction
3671 # response time when logging %tr to access.log. Currently,
3672 # Squid uses millisecond resolution for %tS values,
3673 # similar to the default access.log "current time" field
3674 # (%ts.%03tu).
3675 #
3676 # Access Control related format codes:
3677 #
3678 # et Tag returned by external acl
3679 # ea Log string returned by external acl
3680 # un User name (any available)
3681 # ul User name from authentication
3682 # ue User name from external acl helper
3683 # ui User name from ident
3684 # un A user name. Expands to the first available name
3685 # from the following list of information sources:
3686 # - authenticated user name, like %ul
3687 # - user name supplied by an external ACL, like %ue
3688 # - SSL client name, like %us
3689 # - ident user name, like %ui
3690 # credentials Client credentials. The exact meaning depends on
3691 # the authentication scheme: For Basic authentication,
3692 # it is the password; for Digest, the realm sent by the
3693 # client; for NTLM and Negotiate, the client challenge
3694 # or client credentials prefixed with "YR " or "KK ".
3695 #
3696 # HTTP related format codes:
3697 #
3698 # REQUEST
3699 #
3700 # [http::]rm Request method (GET/POST etc)
3701 # [http::]>rm Request method from client
3702 # [http::]<rm Request method sent to server or peer
3703 # [http::]ru Request URL from client (historic, filtered for logging)
3704 # [http::]>ru Request URL from client
3705 # [http::]<ru Request URL sent to server or peer
3706 # [http::]>rs Request URL scheme from client
3707 # [http::]<rs Request URL scheme sent to server or peer
3708 # [http::]>rd Request URL domain from client
3709 # [http::]<rd Request URL domain sent to server or peer
3710 # [http::]>rP Request URL port from client
3711 # [http::]<rP Request URL port sent to server or peer
3712 # [http::]rp Request URL path excluding hostname
3713 # [http::]>rp Request URL path excluding hostname from client
3714 # [http::]<rp Request URL path excluding hostname sent to server or peer
3715 # [http::]rv Request protocol version
3716 # [http::]>rv Request protocol version from client
3717 # [http::]<rv Request protocol version sent to server or peer
3718 #
3719 # [http::]>h Original received request header.
3720 # Usually differs from the request header sent by
3721 # Squid, although most fields are often preserved.
3722 # Accepts optional header field name/value filter
3723 # argument using name[:[separator]element] format.
3724 # [http::]>ha Received request header after adaptation and
3725 # redirection (pre-cache REQMOD vectoring point).
3726 # Usually differs from the request header sent by
3727 # Squid, although most fields are often preserved.
3728 # Optional header name argument as for >h
3729 #
3730 #
3731 # RESPONSE
3732 #
3733 # [http::]<Hs HTTP status code received from the next hop
3734 # [http::]>Hs HTTP status code sent to the client
3735 #
3736 # [http::]<h Reply header. Optional header name argument
3737 # as for >h
3738 #
3739 # [http::]mt MIME content type
3740 #
3741 #
3742 # SIZE COUNTERS
3743 #
3744 # [http::]st Total size of request + reply traffic with client
3745 # [http::]>st Total size of request received from client.
3746 # Excluding chunked encoding bytes.
3747 # [http::]<st Total size of reply sent to client (after adaptation)
3748 #
3749 # [http::]>sh Size of request headers received from client
3750 # [http::]<sh Size of reply headers sent to client (after adaptation)
3751 #
3752 # [http::]<sH Reply high offset sent
3753 # [http::]<sS Upstream object size
3754 #
3755 # [http::]<bs Number of HTTP-equivalent message body bytes
3756 # received from the next hop, excluding chunked
3757 # transfer encoding and control messages.
3758 # Generated FTP/Gopher listings are treated as
3759 # received bodies.
3760 #
3761 #
3762 # TIMING
3763 #
3764 # [http::]<pt Peer response time in milliseconds. The timer starts
3765 # when the last request byte is sent to the next hop
3766 # and stops when the last response byte is received.
3767 # [http::]<tt Total time in milliseconds. The timer
3768 # starts with the first connect request (or write I/O)
3769 # sent to the first selected peer. The timer stops
3770 # with the last I/O with the last peer.
3771 #
3772 # Squid handling related format codes:
3773 #
3774 # Ss Squid request status (TCP_MISS etc)
3775 # Sh Squid hierarchy status (DEFAULT_PARENT etc)
3776 #
3777 # SSL-related format codes:
3778 #
3779 # ssl::bump_mode SslBump decision for the transaction:
3780 #
3781 # For CONNECT requests that initiated bumping of
3782 # a connection and for any request received on
3783 # an already bumped connection, Squid logs the
3784 # corresponding SslBump mode ("server-first" or
3785 # "client-first"). See the ssl_bump option for
3786 # more information about these modes.
3787 #
3788 # A "none" token is logged for requests that
3789 # triggered "ssl_bump" ACL evaluation matching
3790 # either a "none" rule or no rules at all.
3791 #
3792 # In all other cases, a single dash ("-") is
3793 # logged.
3794 #
3795 # ssl::>sni SSL client SNI sent to Squid. Available only
3796 # after the peek, stare, or splice SSL bumping
3797 # actions.
3798 #
3799 # If ICAP is enabled, the following code becomes available (as
3800 # well as ICAP log codes documented with the icap_log option):
3801 #
3802 # icap::tt Total ICAP processing time for the HTTP
3803 # transaction. The timer ticks when ICAP
3804 # ACLs are checked and when ICAP
3805 # transaction is in progress.
3806 #
3807 # If adaptation is enabled the following three codes become available:
3808 #
3809 # adapt::<last_h The header of the last ICAP response or
3810 # meta-information from the last eCAP
3811 # transaction related to the HTTP transaction.
3812 # Like <h, accepts an optional header name
3813 # argument.
3814 #
3815 # adapt::sum_trs Summed adaptation transaction response
3816 # times recorded as a comma-separated list in
3817 # the order of transaction start time. Each time
3818 # value is recorded as an integer number,
3819 # representing response time of one or more
3820 # adaptation (ICAP or eCAP) transaction in
3821 # milliseconds. When a failed transaction is
3822 # being retried or repeated, its time is not
3823 # logged individually but added to the
3824 # replacement (next) transaction. See also:
3825 # adapt::all_trs.
3826 #
3827 # adapt::all_trs All adaptation transaction response times.
3828 # Same as adaptation_strs but response times of
3829 # individual transactions are never added
3830 # together. Instead, all transaction response
3831 # times are recorded individually.
3832 #
3833 # You can prefix adapt::*_trs format codes with adaptation
3834 # service name in curly braces to record response time(s) specific
3835 # to that service. For example: %{my_service}adapt::sum_trs
3836 #
3837 # If SSL is enabled, the following formating codes become available:
3838 #
3839 # %ssl::>cert_subject The Subject field of the received client
3840 # SSL certificate or a dash ('-') if Squid has
3841 # received an invalid/malformed certificate or
3842 # no certificate at all. Consider encoding the
3843 # logged value because Subject often has spaces.
3844 #
3845 # %ssl::>cert_issuer The Issuer field of the received client
3846 # SSL certificate or a dash ('-') if Squid has
3847 # received an invalid/malformed certificate or
3848 # no certificate at all. Consider encoding the
3849 # logged value because Issuer often has spaces.
3850 #
3851 # The default formats available (which do not need re-defining) are:
3852 #
3853 #logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
3854 #logformat common %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh
3855 #logformat combined %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
3856 #logformat referrer %ts.%03tu %>a %{Referer}>h %ru
3857 #logformat useragent %>a [%tl] "%{User-Agent}>h"
3858 #
3859 # NOTE: When the log_mime_hdrs directive is set to ON.
3860 # The squid, common and combined formats have a safely encoded copy
3861 # of the mime headers appended to each line within a pair of brackets.
3862 #
3863 # NOTE: The common and combined formats are not quite true to the Apache definition.
3864 # The logs from Squid contain an extra status and hierarchy code appended.
3865 #
3866 #Default:
3867 # The format definitions squid, common, combined, referrer, useragent are built in.
3868
3869 # TAG: access_log
3870 # Configures whether and how Squid logs HTTP and ICP transactions.
3871 # If access logging is enabled, a single line is logged for every
3872 # matching HTTP or ICP request. The recommended directive formats are:
3873 #
3874 # access_log <module>:<place> [option ...] [acl acl ...]
3875 # access_log none [acl acl ...]
3876 #
3877 # The following directive format is accepted but may be deprecated:
3878 # access_log <module>:<place> [<logformat name> [acl acl ...]]
3879 #
3880 # In most cases, the first ACL name must not contain the '=' character
3881 # and should not be equal to an existing logformat name. You can always
3882 # start with an 'all' ACL to work around those restrictions.
3883 #
3884 # Will log to the specified module:place using the specified format (which
3885 # must be defined in a logformat directive) those entries which match
3886 # ALL the acl's specified (which must be defined in acl clauses).
3887 # If no acl is specified, all requests will be logged to this destination.
3888 #
3889 # ===== Available options for the recommended directive format =====
3890 #
3891 # logformat=name Names log line format (either built-in or
3892 # defined by a logformat directive). Defaults
3893 # to 'squid'.
3894 #
3895 # buffer-size=64KB Defines approximate buffering limit for log
3896 # records (see buffered_logs). Squid should not
3897 # keep more than the specified size and, hence,
3898 # should flush records before the buffer becomes
3899 # full to avoid overflows under normal
3900 # conditions (the exact flushing algorithm is
3901 # module-dependent though). The on-error option
3902 # controls overflow handling.
3903 #
3904 # on-error=die|drop Defines action on unrecoverable errors. The
3905 # 'drop' action ignores (i.e., does not log)
3906 # affected log records. The default 'die' action
3907 # kills the affected worker. The drop action
3908 # support has not been tested for modules other
3909 # than tcp.
3910 #
3911 # ===== Modules Currently available =====
3912 #
3913 # none Do not log any requests matching these ACL.
3914 # Do not specify Place or logformat name.
3915 #
3916 # stdio Write each log line to disk immediately at the completion of
3917 # each request.
3918 # Place: the filename and path to be written.
3919 #
3920 # daemon Very similar to stdio. But instead of writing to disk the log
3921 # line is passed to a daemon helper for asychronous handling instead.
3922 # Place: varies depending on the daemon.
3923 #
3924 # log_file_daemon Place: the file name and path to be written.
3925 #
3926 # syslog To log each request via syslog facility.
3927 # Place: The syslog facility and priority level for these entries.
3928 # Place Format: facility.priority
3929 #
3930 # where facility could be any of:
3931 # authpriv, daemon, local0 ... local7 or user.
3932 #
3933 # And priority could be any of:
3934 # err, warning, notice, info, debug.
3935 #
3936 # udp To send each log line as text data to a UDP receiver.
3937 # Place: The destination host name or IP and port.
3938 # Place Format: //host:port
3939 #
3940 # tcp To send each log line as text data to a TCP receiver.
3941 # Lines may be accumulated before sending (see buffered_logs).
3942 # Place: The destination host name or IP and port.
3943 # Place Format: //host:port
3944 #
3945 # Default:
3946 # access_log daemon:/var/log/squid/access.log squid
3947 #Default:
3948 # access_log daemon:/var/log/squid/access.log squid
3949
3950 # TAG: icap_log
3951 # ICAP log files record ICAP transaction summaries, one line per
3952 # transaction.
3953 #
3954 # The icap_log option format is:
3955 # icap_log <filepath> [<logformat name> [acl acl ...]]
3956 # icap_log none [acl acl ...]]
3957 #
3958 # Please see access_log option documentation for details. The two
3959 # kinds of logs share the overall configuration approach and many
3960 # features.
3961 #
3962 # ICAP processing of a single HTTP message or transaction may
3963 # require multiple ICAP transactions. In such cases, multiple
3964 # ICAP transaction log lines will correspond to a single access
3965 # log line.
3966 #
3967 # ICAP log supports many access.log logformat %codes. In ICAP context,
3968 # HTTP message-related %codes are applied to the HTTP message embedded
3969 # in an ICAP message. Logformat "%http::>..." codes are used for HTTP
3970 # messages embedded in ICAP requests while "%http::<..." codes are used
3971 # for HTTP messages embedded in ICAP responses. For example:
3972 #
3973 # http::>h To-be-adapted HTTP message headers sent by Squid to
3974 # the ICAP service. For REQMOD transactions, these are
3975 # HTTP request headers. For RESPMOD, these are HTTP
3976 # response headers, but Squid currently cannot log them
3977 # (i.e., %http::>h will expand to "-" for RESPMOD).
3978 #
3979 # http::<h Adapted HTTP message headers sent by the ICAP
3980 # service to Squid (i.e., HTTP request headers in regular
3981 # REQMOD; HTTP response headers in RESPMOD and during
3982 # request satisfaction in REQMOD).
3983 #
3984 # ICAP OPTIONS transactions do not embed HTTP messages.
3985 #
3986 # Several logformat codes below deal with ICAP message bodies. An ICAP
3987 # message body, if any, typically includes a complete HTTP message
3988 # (required HTTP headers plus optional HTTP message body). When
3989 # computing HTTP message body size for these logformat codes, Squid
3990 # either includes or excludes chunked encoding overheads; see
3991 # code-specific documentation for details.
3992 #
3993 # For Secure ICAP services, all size-related information is currently
3994 # computed before/after TLS encryption/decryption, as if TLS was not
3995 # in use at all.
3996 #
3997 # The following format codes are also available for ICAP logs:
3998 #
3999 # icap::<A ICAP server IP address. Similar to <A.
4000 #
4001 # icap::<service_name ICAP service name from the icap_service
4002 # option in Squid configuration file.
4003 #
4004 # icap::ru ICAP Request-URI. Similar to ru.
4005 #
4006 # icap::rm ICAP request method (REQMOD, RESPMOD, or
4007 # OPTIONS). Similar to existing rm.
4008 #
4009 # icap::>st The total size of the ICAP request sent to the ICAP
4010 # server (ICAP headers + ICAP body), including chunking
4011 # metadata (if any).
4012 #
4013 # icap::<st The total size of the ICAP response received from the
4014 # ICAP server (ICAP headers + ICAP body), including
4015 # chunking metadata (if any).
4016 #
4017 # icap::<bs The size of the ICAP response body received from the
4018 # ICAP server, excluding chunking metadata (if any).
4019 #
4020 # icap::tr Transaction response time (in
4021 # milliseconds). The timer starts when
4022 # the ICAP transaction is created and
4023 # stops when the transaction is completed.
4024 # Similar to tr.
4025 #
4026 # icap::tio Transaction I/O time (in milliseconds). The
4027 # timer starts when the first ICAP request
4028 # byte is scheduled for sending. The timers
4029 # stops when the last byte of the ICAP response
4030 # is received.
4031 #
4032 # icap::to Transaction outcome: ICAP_ERR* for all
4033 # transaction errors, ICAP_OPT for OPTION
4034 # transactions, ICAP_ECHO for 204
4035 # responses, ICAP_MOD for message
4036 # modification, and ICAP_SAT for request
4037 # satisfaction. Similar to Ss.
4038 #
4039 # icap::Hs ICAP response status code. Similar to Hs.
4040 #
4041 # icap::>h ICAP request header(s). Similar to >h.
4042 #
4043 # icap::<h ICAP response header(s). Similar to <h.
4044 #
4045 # The default ICAP log format, which can be used without an explicit
4046 # definition, is called icap_squid:
4047 #
4048 #logformat icap_squid %ts.%03tu %6icap::tr %>A %icap::to/%03icap::Hs %icap::<st %icap::rm %icap::ru %un -/%icap::<A -
4049 #
4050 # See also: logformat and %adapt::<last_h
4051 #Default:
4052 # none
4053
4054 # TAG: logfile_daemon
4055 # Specify the path to the logfile-writing daemon. This daemon is
4056 # used to write the access and store logs, if configured.
4057 #
4058 # Squid sends a number of commands to the log daemon:
4059 # L<data>\n - logfile data
4060 # R\n - rotate file
4061 # T\n - truncate file
4062 # O\n - reopen file
4063 # F\n - flush file
4064 # r<n>\n - set rotate count to <n>
4065 # b<n>\n - 1 = buffer output, 0 = don't buffer output
4066 #
4067 # No responses is expected.
4068 #Default:
4069 # logfile_daemon /usr/lib/squid/log_file_daemon
4070
4071 # TAG: stats_collection allow|deny acl acl...
4072 # This options allows you to control which requests gets accounted
4073 # in performance counters.
4074 #
4075 # This clause only supports fast acl types.
4076 # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4077 #Default:
4078 # Allow logging for all transactions.
4079
4080 # TAG: cache_store_log
4081 # Logs the activities of the storage manager. Shows which
4082 # objects are ejected from the cache, and which objects are
4083 # saved and for how long.
4084 # There are not really utilities to analyze this data, so you can safely
4085 # disable it (the default).
4086 #
4087 # Store log uses modular logging outputs. See access_log for the list
4088 # of modules supported.
4089 #
4090 # Example:
4091 # cache_store_log stdio:/var/log/squid/store.log
4092 # cache_store_log daemon:/var/log/squid/store.log
4093 #Default:
4094 # none
4095
4096 # TAG: cache_swap_state
4097 # Location for the cache "swap.state" file. This index file holds
4098 # the metadata of objects saved on disk. It is used to rebuild
4099 # the cache during startup. Normally this file resides in each
4100 # 'cache_dir' directory, but you may specify an alternate
4101 # pathname here. Note you must give a full filename, not just
4102 # a directory. Since this is the index for the whole object
4103 # list you CANNOT periodically rotate it!
4104 #
4105 # If %s can be used in the file name it will be replaced with a
4106 # a representation of the cache_dir name where each / is replaced
4107 # with '.'. This is needed to allow adding/removing cache_dir
4108 # lines when cache_swap_log is being used.
4109 #
4110 # If have more than one 'cache_dir', and %s is not used in the name
4111 # these swap logs will have names such as:
4112 #
4113 # cache_swap_log.00
4114 # cache_swap_log.01
4115 # cache_swap_log.02
4116 #
4117 # The numbered extension (which is added automatically)
4118 # corresponds to the order of the 'cache_dir' lines in this
4119 # configuration file. If you change the order of the 'cache_dir'
4120 # lines in this file, these index files will NOT correspond to
4121 # the correct 'cache_dir' entry (unless you manually rename
4122 # them). We recommend you do NOT use this option. It is
4123 # better to keep these index files in each 'cache_dir' directory.
4124 #Default:
4125 # Store the journal inside its cache_dir
4126
4127 # TAG: logfile_rotate
4128 # Specifies the number of logfile rotations to make when you
4129 # type 'squid -k rotate'. The default is 10, which will rotate
4130 # with extensions 0 through 9. Setting logfile_rotate to 0 will
4131 # disable the file name rotation, but the logfiles are still closed
4132 # and re-opened. This will enable you to rename the logfiles
4133 # yourself just before sending the rotate signal.
4134 #
4135 # Note, the 'squid -k rotate' command normally sends a USR1
4136 # signal to the running squid process. In certain situations
4137 # (e.g. on Linux with Async I/O), USR1 is used for other
4138 # purposes, so -k rotate uses another signal. It is best to get
4139 # in the habit of using 'squid -k rotate' instead of 'kill -USR1
4140 # <pid>'.
4141 #
4142 # Note, from Squid-3.1 this option is only a default for cache.log,
4143 # that log can be rotated separately by using debug_options.
4144 #
4145 # Note2, for Debian/Linux the default of logfile_rotate is
4146 # zero, since it includes external logfile-rotation methods.
4147 #Default:
4148 # logfile_rotate 0
4149
4150 # TAG: mime_table
4151 # Path to Squid's icon configuration file.
4152 #
4153 # You shouldn't need to change this, but the default file contains
4154 # examples and formatting information if you do.
4155 #Default:
4156 # mime_table /usr/share/squid/mime.conf
4157
4158 # TAG: log_mime_hdrs on|off
4159 # The Cache can record both the request and the response MIME
4160 # headers for each HTTP transaction. The headers are encoded
4161 # safely and will appear as two bracketed fields at the end of