]> git.ipfire.org Git - thirdparty/squid.git/blame_incremental - src/cf.data.pre
CI: update target FreeBSD version to 14.3 (#2271)
[thirdparty/squid.git] / src / cf.data.pre
... / ...
CommitLineData
1## Copyright (C) 1996-2025 The Squid Software Foundation and contributors
2##
3## Squid software is distributed under GPLv2+ license and includes
4## contributions from numerous individuals and organizations.
5## Please see the COPYING and CONTRIBUTORS files for details.
6##
7
8COMMENT_START
9 WELCOME TO @SQUID@
10 ----------------------------
11
12 This is the documentation for the Squid configuration file.
13 This documentation can also be found online at:
14 http://www.squid-cache.org/Doc/config/
15
16 You may wish to look at the Squid home page and wiki for the
17 FAQ and other documentation:
18 http://www.squid-cache.org/
19 https://wiki.squid-cache.org/SquidFaq
20 https://wiki.squid-cache.org/ConfigExamples
21
22 This documentation shows what the defaults for various directives
23 happen to be. If you don't need to change the default, you should
24 leave the line out of your squid.conf in most cases.
25
26 In some cases "none" refers to no default setting at all,
27 while in other cases it refers to the value of the option
28 - the comments for that keyword indicate if this is the case.
29
30COMMENT_END
31
32COMMENT_START
33 Configuration options can be included using the "include" directive.
34 Include takes a list of files to include. Quoting and wildcards are
35 supported.
36
37 For example,
38
39 include /path/to/included/file/squid.acl.config
40
41 Includes can be nested up to a hard-coded depth of 16 levels.
42 This arbitrary restriction is to prevent recursive include references
43 from causing Squid entering an infinite loop whilst trying to load
44 configuration files.
45
46 Values with byte units
47
48 Squid accepts size units on some size related directives. All
49 such directives are documented with a default value displaying
50 a unit.
51
52 Units accepted by Squid are:
53 bytes - byte
54 KB - Kilobyte (2^10, 1'024 bytes)
55 MB - Megabyte (2^20, 1'048'576 bytes)
56 GB - Gigabyte (2^30, 1'073'741'824 bytes)
57 Squid does not yet support KiB, MiB, and GiB unit names.
58
59 Values with time units
60
61 Time-related directives marked with either "time-units" or
62 "time-units-small" accept a time unit. The supported time units are:
63
64 nanosecond (time-units-small only)
65 microsecond (time-units-small only)
66 millisecond
67 second
68 minute
69 hour
70 day
71 week
72 fortnight
73 month - 30 days
74 year - 31557790080 milliseconds (just over 365 days)
75 decade
76
77 Values with spaces, quotes, and other special characters
78
79 Squid supports directive parameters with spaces, quotes, and other
80 special characters. Surround such parameters with "double quotes". Use
81 the configuration_includes_quoted_values directive to enable or
82 disable that support.
83
84 Squid supports reading configuration option parameters from external
85 files using the syntax:
86 parameters("/path/filename")
87 For example:
88 acl allowlist dstdomain parameters("/etc/squid/allowlist.txt")
89
90 Conditional configuration
91
92 If-statements can be used to make configuration directives
93 depend on conditions:
94
95 if <CONDITION>
96 ... regular configuration directives ...
97 [else
98 ... regular configuration directives ...]
99 endif
100
101 The else part is optional. The keywords "if", "else", and "endif"
102 must be typed on their own lines, as if they were regular
103 configuration directives.
104
105 NOTE: An else-if condition is not supported.
106
107 These individual conditions types are supported:
108
109 true
110 Always evaluates to true.
111 false
112 Always evaluates to false.
113 <integer> = <integer>
114 Equality comparison of two integer numbers.
115
116
117 SMP-Related Macros
118
119 The following SMP-related preprocessor macros can be used.
120
121 ${process_name} expands to the current Squid process "name"
122 (e.g., squid1, squid2, or cache1).
123
124 ${process_number} expands to the current Squid process
125 identifier, which is an integer number (e.g., 1, 2, 3) unique
126 across all Squid processes of the current service instance.
127
128 ${service_name} expands into the current Squid service instance
129 name identifier which is provided by -n on the command line.
130
131 Logformat Macros
132
133 Logformat macros can be used in many places outside of the logformat
134 directive. In theory, all of the logformat codes can be used as %macros,
135 where they are supported. In practice, a %macro expands as a dash (-) when
136 the transaction does not yet have enough information and a value is needed.
137
138 There is no definitive list of what tokens are available at the various
139 stages of the transaction.
140
141 And some information may already be available to Squid but not yet
142 committed where the macro expansion code can access it (report
143 such instances!). The macro will be expanded into a single dash
144 ('-') in such cases. Not all macros have been tested.
145
146COMMENT_END
147
148# options still not yet ported from 2.7 to 3.x
149NAME: broken_vary_encoding
150TYPE: obsolete
151DOC_START
152 This option is not yet supported by Squid-3.
153DOC_END
154
155NAME: cache_vary
156TYPE: obsolete
157DOC_START
158 This option is not yet supported by Squid-3.
159DOC_END
160
161NAME: error_map
162TYPE: obsolete
163DOC_START
164 This option is not yet supported by Squid-3.
165DOC_END
166
167NAME: external_refresh_check
168TYPE: obsolete
169DOC_START
170 This option is not yet supported by Squid-3.
171DOC_END
172
173NAME: location_rewrite_program location_rewrite_access location_rewrite_children location_rewrite_concurrency
174TYPE: obsolete
175DOC_START
176 This option is not yet supported by Squid-3.
177DOC_END
178
179NAME: refresh_stale_hit
180TYPE: obsolete
181DOC_START
182 This option is not yet supported by Squid-3.
183DOC_END
184
185# Options removed in 7.x
186NAME: esi_parser
187TYPE: obsolete
188DOC_START
189 Remove this line. Squid no longer supports this feature.
190DOC_END
191
192
193# Options removed in 6.x
194NAME: announce_file
195TYPE: obsolete
196DOC_START
197 Remove this line. Squid no longer supports this feature.
198DOC_END
199
200NAME: announce_host
201TYPE: obsolete
202DOC_START
203 Remove this line. Squid no longer supports this feature.
204DOC_END
205
206NAME: announce_period
207TYPE: obsolete
208DOC_START
209 Remove this line. Squid no longer supports this feature.
210DOC_END
211
212NAME: announce_port
213TYPE: obsolete
214DOC_START
215 Remove this line. Squid no longer supports this feature.
216DOC_END
217
218NAME: request_entities
219TYPE: obsolete
220DOC_START
221 Remove this line. Squid now accepts HTTP/1.1 requests with bodies.
222 To simplify UI and code, Squid rejects certain HTTP/1.0 requests with bodies.
223DOC_END
224
225# Options removed in 5.x
226NAME: dns_v4_first
227TYPE: obsolete
228DOC_START
229 Remove this line. Squid no longer supports preferential treatment of DNS A records.
230DOC_END
231
232# Options removed in 4.x
233NAME: cache_peer_domain cache_host_domain
234TYPE: obsolete
235DOC_START
236 Replace with dstdomain ACLs and cache_peer_access.
237DOC_END
238
239NAME: ie_refresh
240TYPE: obsolete
241DOC_START
242 Remove this line. The behaviour enabled by this is no longer needed.
243DOC_END
244
245NAME: sslproxy_cafile
246TYPE: obsolete
247DOC_START
248 Remove this line. Use tls_outgoing_options cafile= instead.
249DOC_END
250
251NAME: sslproxy_capath
252TYPE: obsolete
253DOC_START
254 Remove this line. Use tls_outgoing_options capath= instead.
255DOC_END
256
257NAME: sslproxy_cipher
258TYPE: obsolete
259DOC_START
260 Remove this line. Use tls_outgoing_options cipher= instead.
261DOC_END
262
263NAME: sslproxy_client_certificate
264TYPE: obsolete
265DOC_START
266 Remove this line. Use tls_outgoing_options cert= instead.
267DOC_END
268
269NAME: sslproxy_client_key
270TYPE: obsolete
271DOC_START
272 Remove this line. Use tls_outgoing_options key= instead.
273DOC_END
274
275NAME: sslproxy_flags
276TYPE: obsolete
277DOC_START
278 Remove this line. Use tls_outgoing_options flags= instead.
279DOC_END
280
281NAME: sslproxy_options
282TYPE: obsolete
283DOC_START
284 Remove this line. Use tls_outgoing_options options= instead.
285DOC_END
286
287NAME: sslproxy_version
288TYPE: obsolete
289DOC_START
290 Remove this line. Use tls_outgoing_options options= instead.
291DOC_END
292
293# Options removed in 3.5
294NAME: hierarchy_stoplist
295TYPE: obsolete
296DOC_START
297 Remove this line. Use always_direct or cache_peer_access ACLs instead if you need to prevent cache_peer use.
298DOC_END
299
300# Options removed in 3.4
301NAME: log_access
302TYPE: obsolete
303DOC_START
304 Remove this line. Use acls with access_log directives to control access logging
305DOC_END
306
307NAME: log_icap
308TYPE: obsolete
309DOC_START
310 Remove this line. Use acls with icap_log directives to control icap logging
311DOC_END
312
313# Options Removed in 3.3
314NAME: ignore_ims_on_miss
315TYPE: obsolete
316DOC_START
317 Remove this line. The HTTP/1.1 feature is now configured by 'cache_miss_revalidate'.
318DOC_END
319
320# Options Removed in 3.2
321NAME: balance_on_multiple_ip
322TYPE: obsolete
323DOC_START
324 Remove this line. Squid performs a 'Happy Eyeballs' algorithm, this multiple-IP algorithm is not longer relevant.
325DOC_END
326
327NAME: chunked_request_body_max_size
328TYPE: obsolete
329DOC_START
330 Remove this line. Squid is now HTTP/1.1 compliant.
331DOC_END
332
333NAME: dns_v4_fallback
334TYPE: obsolete
335DOC_START
336 Remove this line. Squid performs a 'Happy Eyeballs' algorithm, the 'fallback' algorithm is no longer relevant.
337DOC_END
338
339NAME: emulate_httpd_log
340TYPE: obsolete
341DOC_START
342 Replace this with an access_log directive using the format 'common' or 'combined'.
343DOC_END
344
345NAME: forward_log
346TYPE: obsolete
347DOC_START
348 Use a regular access.log with ACL limiting it to MISS events.
349DOC_END
350
351NAME: ftp_list_width
352TYPE: obsolete
353DOC_START
354 Remove this line. Configure FTP page display using the CSS controls in errorpages.css instead.
355DOC_END
356
357NAME: ignore_expect_100
358TYPE: obsolete
359DOC_START
360 Remove this line. The HTTP/1.1 feature is now fully supported by default.
361DOC_END
362
363NAME: log_fqdn
364TYPE: obsolete
365DOC_START
366 Remove this option from your config. To log FQDN use %>A in the log format.
367DOC_END
368
369NAME: log_ip_on_direct
370TYPE: obsolete
371DOC_START
372 Remove this option from your config. To log server or peer names use %<A in the log format.
373DOC_END
374
375NAME: maximum_single_addr_tries
376TYPE: obsolete
377DOC_START
378 Replaced by connect_retries. The behaviour has changed, please read the documentation before altering.
379DOC_END
380
381NAME: referer_log referrer_log
382TYPE: obsolete
383DOC_START
384 Replace this with an access_log directive using the format 'referrer'.
385DOC_END
386
387NAME: update_headers
388TYPE: obsolete
389DOC_START
390 Remove this line. The feature is supported by default in storage types where update is implemented.
391DOC_END
392
393NAME: url_rewrite_concurrency
394TYPE: obsolete
395DOC_START
396 Remove this line. Set the 'concurrency=' option of url_rewrite_children instead.
397DOC_END
398
399NAME: useragent_log
400TYPE: obsolete
401DOC_START
402 Replace this with an access_log directive using the format 'useragent'.
403DOC_END
404
405# Options Removed in 3.1
406NAME: dns_testnames
407TYPE: obsolete
408DOC_START
409 Remove this line. DNS is no longer tested on startup.
410DOC_END
411
412NAME: extension_methods
413TYPE: obsolete
414DOC_START
415 Remove this line. All valid methods for HTTP are accepted by default.
416DOC_END
417
418# 2.7 Options Removed/Replaced in 3.2
419NAME: zero_buffers
420TYPE: obsolete
421DOC_NONE
422
423# 2.7 Options Removed/Replaced in 3.1
424NAME: incoming_rate
425TYPE: obsolete
426DOC_NONE
427
428NAME: server_http11
429TYPE: obsolete
430DOC_START
431 Remove this line. HTTP/1.1 is supported by default.
432DOC_END
433
434NAME: upgrade_http0.9
435TYPE: obsolete
436DOC_START
437 Remove this line. ICY/1.0 streaming protocol is supported by default.
438DOC_END
439
440NAME: zph_local zph_mode zph_option zph_parent zph_sibling
441TYPE: obsolete
442DOC_START
443 Alter these entries. Use the qos_flows directive instead.
444DOC_END
445
446# Options Removed in 3.0
447NAME: header_access
448TYPE: obsolete
449DOC_START
450 Since squid-3.0 replace with request_header_access or reply_header_access
451 depending on whether you wish to match client requests or server replies.
452DOC_END
453
454NAME: httpd_accel_no_pmtu_disc
455TYPE: obsolete
456DOC_START
457 Since squid-3.0 use the 'disable-pmtu-discovery' flag on http_port instead.
458DOC_END
459
460NAME: wais_relay_host
461TYPE: obsolete
462DOC_START
463 Replace this line with 'cache_peer' configuration.
464DOC_END
465
466NAME: wais_relay_port
467TYPE: obsolete
468DOC_START
469 Replace this line with 'cache_peer' configuration.
470DOC_END
471
472COMMENT_START
473 OPTIONS FOR SMP
474 -----------------------------------------------------------------------------
475COMMENT_END
476
477NAME: workers
478TYPE: int
479LOC: Config.workers
480DEFAULT: 1
481DEFAULT_DOC: SMP support disabled.
482DOC_START
483 Number of main Squid processes or "workers" to fork and maintain.
484 0: "no daemon" mode, like running "squid -N ..."
485 1: "no SMP" mode, start one main Squid process daemon (default)
486 N: start N main Squid process daemons (i.e., SMP mode)
487
488 In SMP mode, each worker does nearly all what a single Squid daemon
489 does (e.g., listen on http_port and forward HTTP requests).
490
491 Changing the number of workers requires a restart: Squid warns about but
492 otherwise ignores attempts to change this setting via reconfiguration.
493DOC_END
494
495NAME: cpu_affinity_map
496TYPE: CpuAffinityMap
497LOC: Config.cpuAffinityMap
498DEFAULT: none
499DEFAULT_DOC: Let operating system decide.
500DOC_START
501 Usage: cpu_affinity_map process_numbers=P1,P2,... cores=C1,C2,...
502
503 Sets 1:1 mapping between Squid processes and CPU cores. For example,
504
505 cpu_affinity_map process_numbers=1,2,3,4 cores=1,3,5,7
506
507 affects processes 1 through 4 only and places them on the first
508 four even cores, starting with core #1.
509
510 CPU cores are numbered starting from 1. Requires support for
511 sched_getaffinity(2) and sched_setaffinity(2) system calls.
512
513 Multiple cpu_affinity_map options are merged.
514
515 See also: workers
516DOC_END
517
518NAME: shared_memory_locking
519TYPE: YesNoNone
520COMMENT: on|off
521LOC: Config.shmLocking
522DEFAULT: off
523DOC_START
524 Whether to ensure that all required shared memory is available by
525 "locking" that shared memory into RAM when Squid starts. The
526 alternative is faster startup time followed by slightly slower
527 performance and, if not enough RAM is actually available during
528 runtime, mysterious crashes.
529
530 SMP Squid uses many shared memory segments. These segments are
531 brought into Squid memory space using an mmap(2) system call. During
532 Squid startup, the mmap() call often succeeds regardless of whether
533 the system has enough RAM. In general, Squid cannot tell whether the
534 kernel applies this "optimistic" memory allocation policy (but
535 popular modern kernels usually use it).
536
537 Later, if Squid attempts to actually access the mapped memory
538 regions beyond what the kernel is willing to allocate, the
539 "optimistic" kernel simply kills Squid kid with a SIGBUS signal.
540 Some of the memory limits enforced by the kernel are currently
541 poorly understood: We do not know how to detect and check them. This
542 option ensures that the mapped memory will be available.
543
544 This option may have a positive performance side-effect: Locking
545 memory at start avoids runtime paging I/O. Paging slows Squid down.
546
547 Locking memory may require a large enough RLIMIT_MEMLOCK OS limit,
548 CAP_IPC_LOCK capability, or equivalent.
549DOC_END
550
551NAME: hopeless_kid_revival_delay
552COMMENT: time-units
553TYPE: time_t
554LOC: Config.hopelessKidRevivalDelay
555DEFAULT: 1 hour
556DOC_START
557 Normally, when a kid process dies, Squid immediately restarts the
558 kid. A kid experiencing frequent deaths is marked as "hopeless" for
559 the duration specified by this directive. Hopeless kids are not
560 automatically restarted.
561
562 Currently, zero values are not supported because they result in
563 misconfigured SMP Squid instances running forever, endlessly
564 restarting each dying kid. To effectively disable hopeless kids
565 revival, set the delay to a huge value (e.g., 1 year).
566
567 Reconfiguration also clears all hopeless kids designations, allowing
568 for manual revival of hopeless kids.
569DOC_END
570
571COMMENT_START
572 OPTIONS FOR AUTHENTICATION
573 -----------------------------------------------------------------------------
574COMMENT_END
575
576NAME: auth_param
577TYPE: authparam
578IFDEF: USE_AUTH
579LOC: Auth::TheConfig.schemes
580DEFAULT: none
581DOC_START
582 This is used to define parameters for the various authentication
583 schemes supported by Squid.
584
585 format: auth_param scheme parameter [setting]
586
587 The order in which authentication schemes are presented to the client is
588 dependent on the order the scheme first appears in config file. IE
589 has a bug (it's not RFC 2617 compliant) in that it will use the basic
590 scheme if basic is the first entry presented, even if more secure
591 schemes are presented. For now use the order in the recommended
592 settings section below. If other browsers have difficulties (don't
593 recognize the schemes offered even if you are using basic) either
594 put basic first, or disable the other schemes (by commenting out their
595 program entry).
596
597 Once an authentication scheme is fully configured, it can only be
598 shutdown by shutting squid down and restarting. Changes can be made on
599 the fly and activated with a reconfigure. I.E. You can change to a
600 different helper, but not unconfigure the helper completely.
601
602 Please note that while this directive defines how Squid processes
603 authentication it does not automatically activate authentication. For a
604 given transaction, (re)authentication is requested in two primary cases
605 detailed below: initial authentication and re-authentication.
606
607 A client without credentials is requested to authenticate if one of the
608 following ACLs is evaluated by an http_access or adapted_http_access rule:
609
610 * proxy_auth ACL
611 * proxy_auth_regex ACL
612 * max_user_ip ACL
613 * external ACL with %ul logformat %code used in FORMAT parameters
614 * external ACL with %LOGIN macro used in FORMAT parameters;
615 this legacy macro currently behaves the same as %ul logformat %code
616
617 A client with credentials is requested to re-authenticate if http_access
618 or adapted_http_access denies its request _and_ the last evaluated ACL was
619 either proxy_auth, proxy_auth_regex, or an external
620 ACL with %ul or %LOGIN parameter (regardless of whether that last
621 evaluated ACL matched the denied request). Note that a max_user_ip ACL
622 does not have this effect: Requests denied after evaluating max_user_ip
623 trigger an HTTP 403 (Forbidden) response rather than re-authentication.
624
625 In both initial authentication and re-authentication cases, client access
626 is denied, typically with an HTTP 407 (Proxy Authentication Required) or
627 an HTTP 401 (Unauthorized) response.
628
629 WARNING: authentication can't be used in a transparently intercepting
630 proxy as the client then thinks it is talking to an origin server and
631 not the proxy. This is a limitation of bending the TCP/IP protocol to
632 transparently intercepting port 80, not a limitation in Squid.
633 Ports flagged 'transparent', 'intercept', or 'tproxy' have
634 authentication disabled.
635
636 === Parameters common to all schemes. ===
637
638 "program" cmdline
639 Specifies the command for the external authenticator.
640
641 By default, each authentication scheme is not used unless a
642 program is specified.
643
644 See https://wiki.squid-cache.org/Features/AddonHelpers for
645 more details on helper operations and creating your own.
646
647 "key_extras" format
648 Specifies a string to be append to request line format for
649 the authentication helper. "Quoted" format values may contain
650 spaces and logformat %macros. In theory, any logformat %macro
651 can be used. In practice, a %macro expands as a dash (-) if
652 the helper request is sent before the required macro
653 information is available to Squid.
654
655 By default, Squid uses request formats provided in
656 scheme-specific examples below (search for %credentials).
657
658 The expanded key_extras value is added to the Squid credentials
659 cache and, hence, will affect authentication. It can be used to
660 authenticate different users with identical user names (e.g.,
661 when user authentication depends on http_port).
662
663 Avoid adding frequently changing information to key_extras. For
664 example, if you add user source IP, and it changes frequently
665 in your environment, then max_user_ip ACL is going to treat
666 every user+IP combination as a unique "user", breaking the ACL
667 and wasting a lot of memory on those user records. It will also
668 force users to authenticate from scratch whenever their IP
669 changes.
670
671 "realm" string
672 Specifies the protection scope (aka realm name) which is to be
673 reported to the client for the authentication scheme. It is
674 commonly part of the text the user will see when prompted for
675 their username and password.
676
677 For Basic the default is "Squid proxy-caching web server".
678 For Digest there is no default, this parameter is mandatory.
679 For NTLM and Negotiate this parameter is ignored.
680
681 "children" numberofchildren [startup=N] [idle=N] [concurrency=N]
682 [queue-size=N] [on-persistent-overload=action]
683 [reservation-timeout=seconds]
684
685 The maximum number of authenticator processes to spawn. If
686 you start too few Squid will have to wait for them to process
687 a backlog of credential verifications, slowing it down. When
688 password verifications are done via a (slow) network you are
689 likely to need lots of authenticator processes.
690
691 The startup= and idle= options permit some skew in the exact
692 amount run. A minimum of startup=N will begin during startup
693 and reconfigure. Squid will start more in groups of up to
694 idle=N in an attempt to meet traffic needs and to keep idle=N
695 free above those traffic needs up to the maximum.
696
697 The concurrency= option sets the number of concurrent requests
698 the helper can process. The default of 0 is used for helpers
699 who only supports one request at a time. Setting this to a
700 number greater than 0 changes the protocol used to include a
701 channel ID field first on the request/response line, allowing
702 multiple requests to be sent to the same helper in parallel
703 without waiting for the response.
704
705 Concurrency must not be set unless it's known the helper
706 supports the input format with channel-ID fields.
707
708 The queue-size option sets the maximum number of queued
709 requests. A request is queued when no existing child can
710 accept it due to concurrency limit and no new child can be
711 started due to numberofchildren limit. The default maximum is
712 2*numberofchildren. Squid is allowed to temporarily exceed the
713 configured maximum, marking the affected helper as
714 "overloaded". If the helper overload lasts more than 3
715 minutes, the action prescribed by the on-persistent-overload
716 option applies.
717
718 The on-persistent-overload=action option specifies Squid
719 reaction to a new helper request arriving when the helper
720 has been overloaded for more that 3 minutes already. The number
721 of queued requests determines whether the helper is overloaded
722 (see the queue-size option).
723
724 Two actions are supported:
725
726 die Squid worker quits. This is the default behavior.
727
728 ERR Squid treats the helper request as if it was
729 immediately submitted, and the helper immediately
730 replied with an ERR response. This action has no effect
731 on the already queued and in-progress helper requests.
732
733 NOTE: NTLM and Negotiate schemes do not support concurrency
734 in the Squid code module even though some helpers can.
735
736 The reservation-timeout=seconds option allows NTLM and Negotiate
737 helpers to forget about clients that abandon their in-progress
738 connection authentication without closing the connection. The
739 timeout is measured since the last helper response received by
740 Squid for the client. Fractional seconds are not supported.
741
742 After the timeout, the helper will be used for other clients if
743 there are no unreserved helpers available. In the latter case,
744 the old client attempt to resume authentication will not be
745 forwarded to the helper (and the client should open a new HTTP
746 connection and retry authentication from scratch).
747
748 By default, reservations do not expire and clients that keep
749 their connections open without completing authentication may
750 exhaust all NTLM and Negotiate helpers.
751
752 "keep_alive" on|off
753 If you experience problems with PUT/POST requests when using
754 the NTLM or Negotiate schemes then you can try setting this
755 to off. This will cause Squid to forcibly close the connection
756 on the initial request where the browser asks which schemes
757 are supported by the proxy.
758
759 For Basic and Digest this parameter is ignored.
760
761 "utf8" on|off
762 Useful for sending credentials to authentication backends that
763 expect UTF-8 encoding (e.g., LDAP).
764
765 When this option is enabled, Squid uses HTTP Accept-Language
766 request header to guess the received credentials encoding
767 (ISO-Latin-1, CP1251, or UTF-8) and then converts the first
768 two encodings into UTF-8.
769
770 When this option is disabled and by default, Squid sends
771 credentials in their original (i.e. received) encoding.
772
773 This parameter is only honored for Basic and Digest schemes.
774 For Basic, the entire username:password credentials are
775 checked and, if necessary, re-encoded. For Digest -- just the
776 username component. For NTLM and Negotiate schemes, this
777 parameter is ignored.
778
779IF HAVE_AUTH_MODULE_BASIC
780 === Basic authentication parameters ===
781
782 "credentialsttl" timetolive
783 Specifies how long squid assumes an externally validated
784 username:password pair is valid for - in other words how
785 often the helper program is called for that user. Set this
786 low to force revalidation with short lived passwords.
787
788 NOTE: setting this high does not impact your susceptibility
789 to replay attacks unless you are using an one-time password
790 system (such as SecureID). If you are using such a system,
791 you will be vulnerable to replay attacks unless you also
792 use the max_user_ip ACL in an http_access rule.
793
794 "casesensitive" on|off
795 Specifies whether upper case letters in client-sent usernames are
796 preserved. By default and when explicitly set to "off", a username
797 extracted from Proxy-Authorization or Authorization request header is
798 forced to lower case before user credentials are checked or stored.
799
800 Most user databases are case insensitive, allowing the same username to be
801 spelled using both lower and upper case letters. For such databases,
802 either setting should work, but forcing usernames to lower case may
803 still make a big difference for Squid internal caches like those used by
804 an external ACL with %un logformat code in FORMAT and a user_max_ip ACL.
805
806 When working with a case sensitive database, set casesensitive to "on".
807
808 Squid ACLs like proxy_auth are case-sensitive by default. An ACL using
809 upper case letters in user names (e.g., `acl badGuys proxy_auth Bob`)
810 will not match any user with Basic Authentication credentials unless
811 casesensitive is explicitly turned "on" (to preserve "Bob" username
812 instead of converting it to "bob" before the ACL is checked).
813
814ENDIF
815IF HAVE_AUTH_MODULE_DIGEST
816 === Digest authentication parameters ===
817
818 "nonce_garbage_interval" timeinterval
819 Specifies the interval that nonces that have been issued
820 to client_agent's are checked for validity.
821
822 "nonce_max_duration" timeinterval
823 Specifies the maximum length of time a given nonce will be
824 valid for.
825
826 "nonce_max_count" number
827 Specifies the maximum number of times a given nonce can be
828 used.
829
830 "nonce_strictness" on|off
831 Determines if squid requires strict increment-by-1 behavior
832 for nonce counts, or just incrementing (off - for use when
833 user agents generate nonce counts that occasionally miss 1
834 (ie, 1,2,4,6)). Default off.
835
836 "check_nonce_count" on|off
837 This directive if set to off can disable the nonce count check
838 completely to work around buggy digest qop implementations in
839 certain mainstream browser versions. Default on to check the
840 nonce count to protect from authentication replay attacks.
841
842 "post_workaround" on|off
843 This is a workaround to certain buggy browsers who send an
844 incorrect request digest in POST requests when reusing the
845 same nonce as acquired earlier on a GET request.
846
847ENDIF
848
849 === Example Configuration ===
850
851 This configuration displays the recommended authentication scheme
852 order from most to least secure with recommended minimum configuration
853 settings for each scheme:
854
855#auth_param negotiate program <uncomment and complete this line to activate>
856#auth_param negotiate children 20 startup=0 idle=1
857#
858#auth_param digest program <uncomment and complete this line to activate>
859#auth_param digest children 20 startup=0 idle=1
860#auth_param digest realm Squid proxy-caching web server
861#auth_param digest nonce_garbage_interval 5 minutes
862#auth_param digest nonce_max_duration 30 minutes
863#auth_param digest nonce_max_count 50
864#
865#auth_param ntlm program <uncomment and complete this line to activate>
866#auth_param ntlm children 20 startup=0 idle=1
867#
868#auth_param basic program <uncomment and complete this line>
869#auth_param basic children 5 startup=5 idle=1
870#auth_param basic credentialsttl 2 hours
871DOC_END
872
873NAME: authenticate_cache_garbage_interval
874IFDEF: USE_AUTH
875TYPE: time_t
876DEFAULT: 1 hour
877LOC: Auth::TheConfig.garbageCollectInterval
878DOC_START
879 The time period between garbage collection across the username cache.
880 This is a trade-off between memory utilization (long intervals - say
881 2 days) and CPU (short intervals - say 1 minute). Only change if you
882 have good reason to.
883DOC_END
884
885NAME: authenticate_ttl
886IFDEF: USE_AUTH
887TYPE: time_t
888DEFAULT: 1 hour
889LOC: Auth::TheConfig.credentialsTtl
890DOC_START
891 The time a user & their credentials stay in the logged in
892 user cache since their last request. When the garbage
893 interval passes, all user credentials that have passed their
894 TTL are removed from memory.
895DOC_END
896
897NAME: authenticate_ip_ttl
898IFDEF: USE_AUTH
899TYPE: time_t
900LOC: Auth::TheConfig.ipTtl
901DEFAULT: 1 second
902DOC_START
903 If you use proxy authentication and the 'max_user_ip' ACL,
904 this directive controls how long Squid remembers the IP
905 addresses associated with each user. Use a small value
906 (e.g., 60 seconds) if your users might change addresses
907 quickly, as is the case with dialup. You might be safe
908 using a larger value (e.g., 2 hours) in a corporate LAN
909 environment with relatively static address assignments.
910DOC_END
911
912COMMENT_START
913 ACCESS CONTROLS
914 -----------------------------------------------------------------------------
915COMMENT_END
916
917NAME: external_acl_type
918TYPE: externalAclHelper
919LOC: Config.externalAclHelperList
920DEFAULT: none
921DOC_START
922 This option defines external acl classes using a helper program
923 to look up the status
924
925 external_acl_type name [options] FORMAT /path/to/helper [helper arguments]
926
927 Options:
928
929 ttl=n TTL in seconds for cached results (defaults to 3600
930 for 1 hour)
931
932 negative_ttl=n
933 TTL for cached negative lookups (default same
934 as ttl)
935
936 grace=n Percentage remaining of TTL where a refresh of a
937 cached entry should be initiated without needing to
938 wait for a new reply. (default is for no grace period)
939
940 cache=n The maximum number of entries in the result cache. The
941 default limit is 262144 entries. Each cache entry usually
942 consumes at least 256 bytes. Squid currently does not remove
943 expired cache entries until the limit is reached, so a proxy
944 will sooner or later reach the limit. The expanded FORMAT
945 value is used as the cache key, so if the details in FORMAT
946 are highly variable, a larger cache may be needed to produce
947 reduction in helper load.
948
949 children-max=n
950 Maximum number of acl helper processes spawned to service
951 external acl lookups of this type. (default 5)
952
953 children-startup=n
954 Minimum number of acl helper processes to spawn during
955 startup and reconfigure to service external acl lookups
956 of this type. (default 0)
957
958 children-idle=n
959 Number of acl helper processes to keep ahead of traffic
960 loads. Squid will spawn this many at once whenever load
961 rises above the capabilities of existing processes.
962 Up to the value of children-max. (default 1)
963
964 concurrency=n concurrency level per process. Only used with helpers
965 capable of processing more than one query at a time.
966
967 queue-size=N The queue-size option sets the maximum number of
968 queued requests. A request is queued when no existing
969 helper can accept it due to concurrency limit and no
970 new helper can be started due to children-max limit.
971 If the queued requests exceed queue size, the acl is
972 ignored. The default value is set to 2*children-max.
973
974 protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers.
975
976 ipv4 / ipv6 IP protocol used to communicate with this helper.
977 The default is to auto-detect IPv6 and use it when available.
978
979
980 FORMAT is a series of %macro codes. See logformat directive for a full list
981 of the accepted codes. Although note that at the time of any external ACL
982 being tested data may not be available and thus some %macro expand to '-'.
983
984 In addition to the logformat codes; when processing external ACLs these
985 additional macros are made available:
986
987 %ACL The name of the ACL being tested.
988
989 %DATA The ACL arguments specified in the referencing config
990 'acl ... external' line, separated by spaces (an
991 "argument string"). see acl external.
992
993 If there are no ACL arguments %DATA expands to '-'.
994
995 If you do not specify a DATA macro inside FORMAT,
996 Squid automatically appends %DATA to your FORMAT.
997 Note that Squid-3.x may expand %DATA to whitespace
998 or nothing in this case.
999
1000 By default, Squid applies URL-encoding to each ACL
1001 argument inside the argument string. If an explicit
1002 encoding modifier is used (e.g., %#DATA), then Squid
1003 encodes the whole argument string as a single token
1004 (e.g., with %#DATA, spaces between arguments become
1005 %20).
1006
1007 If SSL is enabled, the following formatting codes become available:
1008
1009 %USER_CERT SSL User certificate in PEM format
1010 %USER_CERTCHAIN SSL User certificate chain in PEM format
1011 %USER_CERT_xx SSL User certificate subject attribute xx
1012 %USER_CA_CERT_xx SSL User certificate issuer attribute xx
1013
1014
1015 NOTE: all other format codes accepted by older Squid versions
1016 are deprecated.
1017
1018
1019 General request syntax:
1020
1021 [channel-ID] FORMAT-values
1022
1023
1024 FORMAT-values consists of transaction details expanded with
1025 whitespace separation per the config file FORMAT specification
1026 using the FORMAT macros listed above.
1027
1028 Request values sent to the helper are URL escaped to protect
1029 each value in requests against whitespaces.
1030
1031 If using protocol=2.5 then the request sent to the helper is not
1032 URL escaped to protect against whitespace.
1033
1034 NOTE: protocol=3.0 is deprecated as no longer necessary.
1035
1036 When using the concurrency= option the protocol is changed by
1037 introducing a query channel tag in front of the request/response.
1038 The query channel tag is a number between 0 and concurrency-1.
1039 This value must be echoed back unchanged to Squid as the first part
1040 of the response relating to its request.
1041
1042
1043 The helper receives lines expanded per the above format specification
1044 and for each input line returns 1 line starting with OK/ERR/BH result
1045 code and optionally followed by additional keywords with more details.
1046
1047
1048 General result syntax:
1049
1050 [channel-ID] result keyword=value ...
1051
1052 Result consists of one of the codes:
1053
1054 OK
1055 the ACL test produced a match.
1056
1057 ERR
1058 the ACL test does not produce a match.
1059
1060 BH
1061 An internal error occurred in the helper, preventing
1062 a result being identified.
1063
1064 The meaning of 'a match' is determined by your squid.conf
1065 access control configuration. See the Squid wiki for details.
1066
1067 Defined keywords:
1068
1069 user= The users name (login)
1070
1071 password= The users password (for login= cache_peer option)
1072
1073 message= Message describing the reason for this response.
1074 Available as %o in error pages.
1075 Useful on (ERR and BH results).
1076
1077 tag= Apply a tag to a request. Only sets a tag once,
1078 does not alter existing tags.
1079
1080 log= String to be logged in access.log. Available as
1081 %ea in logformat specifications.
1082
1083 clt_conn_tag= Associates a TAG with the client TCP connection.
1084 Please see url_rewrite_program related documentation
1085 for this kv-pair.
1086
1087 Any keywords may be sent on any response whether OK, ERR or BH.
1088
1089 All response keyword values need to be a single token with URL
1090 escaping, or enclosed in double quotes (") and escaped using \ on
1091 any double quotes or \ characters within the value. The wrapping
1092 double quotes are removed before the value is interpreted by Squid.
1093 \r and \n are also replace by CR and LF.
1094
1095 Some example key values:
1096
1097 user=John%20Smith
1098 user="John Smith"
1099 user="J. \"Bob\" Smith"
1100DOC_END
1101
1102NAME: acl
1103TYPE: acl
1104LOC: Config.namedAcls
1105IF USE_OPENSSL
1106DEFAULT: ssl::certHasExpired ssl_error X509_V_ERR_CERT_HAS_EXPIRED
1107DEFAULT: ssl::certNotYetValid ssl_error X509_V_ERR_CERT_NOT_YET_VALID
1108DEFAULT: ssl::certDomainMismatch ssl_error SQUID_X509_V_ERR_DOMAIN_MISMATCH
1109DEFAULT: ssl::certUntrusted ssl_error X509_V_ERR_INVALID_CA X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY X509_V_ERR_CERT_UNTRUSTED
1110DEFAULT: ssl::certSelfSigned ssl_error X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT
1111ENDIF
1112DEFAULT: all src all
1113DEFAULT: manager url_regex +i ^[^:]+://[^/]+/squid-internal-mgr/
1114DEFAULT: localhost src 127.0.0.1/32 ::1
1115DEFAULT: to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1/128 ::/128
1116DEFAULT: to_linklocal dst 169.254.0.0/16 fe80::/10
1117DEFAULT: CONNECT method CONNECT
1118DEFAULT_DOC: ACLs all, manager, localhost, to_localhost, to_linklocal, and CONNECT are predefined.
1119DOC_START
1120 Defining an Access List
1121
1122 Every access list definition must begin with an aclname and acltype,
1123 followed by either type-specific arguments or a quoted filename that
1124 they are read from.
1125
1126 acl aclname acltype argument ...
1127 acl aclname acltype "file" ...
1128
1129 When using "file", the file should contain one item per line.
1130
1131
1132 ACL Options
1133
1134 Some acl types supports options which changes their default behaviour:
1135
1136 -i,+i By default, regular expressions are CASE-SENSITIVE. To make them
1137 case-insensitive, use the -i option. To return case-sensitive
1138 use the +i option between patterns, or make a new ACL line
1139 without -i.
1140
1141 -n Disable lookups and address type conversions. If lookup or
1142 conversion is required because the parameter type (IP or
1143 domain name) does not match the message address type (domain
1144 name or IP), then the ACL would immediately declare a mismatch
1145 without any warnings or lookups.
1146
1147 -m[=delimiters]
1148 Perform a list membership test, interpreting values as
1149 comma-separated token lists and matching against individual
1150 tokens instead of whole values.
1151 The optional "delimiters" parameter specifies one or more
1152 alternative non-alphanumeric delimiter characters.
1153 non-alphanumeric delimiter characters.
1154
1155 -- Used to stop processing all options, in the case the first acl
1156 value has '-' character as first character (for example the '-'
1157 is a valid domain name)
1158
1159 Some acl types require suspending the current request in order
1160 to access some external data source.
1161 Those which do are marked with the tag [slow], those which
1162 don't are marked as [fast].
1163 See https://wiki.squid-cache.org/SquidFaq/SquidAcl
1164 for further information
1165
1166 ***** ACL TYPES AVAILABLE *****
1167
1168 acl aclname src ip-address/mask ... # clients IP address [fast]
1169 acl aclname src addr1-addr2/mask ... # range of addresses [fast]
1170 acl aclname dst [-n] ip-address/mask ... # URL host's IP address [slow]
1171 acl aclname localip ip-address/mask ... # IP address the client connected to [fast]
1172
1173IF USE_SQUID_EUI
1174 acl aclname arp mac-address ...
1175 acl aclname eui64 eui64-address ...
1176 # [fast]
1177 # MAC (EUI-48) and EUI-64 addresses use xx:xx:xx:xx:xx:xx notation.
1178 #
1179 # The 'arp' ACL code is not portable to all operating systems.
1180 # It works on Linux, Solaris, Windows, FreeBSD, and some other
1181 # BSD variants.
1182 #
1183 # The eui_lookup directive is required to be 'on' (the default)
1184 # and Squid built with --enable-eui for MAC/EUI addresses to be
1185 # available for this ACL.
1186 #
1187 # Squid can only determine the MAC/EUI address for IPv4
1188 # clients that are on the same subnet. If the client is on a
1189 # different subnet, then Squid cannot find out its address.
1190 #
1191 # IPv6 protocol does not contain ARP. MAC/EUI is either
1192 # encoded directly in the IPv6 address or not available.
1193ENDIF
1194 acl aclname clientside_mark mark[/mask] ...
1195 # matches CONNMARK of an accepted connection [fast]
1196 # DEPRECATED. Use the 'client_connection_mark' instead.
1197
1198 acl aclname client_connection_mark mark[/mask] ...
1199 # matches CONNMARK of an accepted connection [fast]
1200 #
1201 # mark and mask are unsigned integers (hex, octal, or decimal).
1202 # If multiple marks are given, then the ACL matches if at least
1203 # one mark matches.
1204 #
1205 # Uses netfilter-conntrack library.
1206 # Requires building Squid with --enable-linux-netfilter.
1207 #
1208 # The client, various intermediaries, and Squid itself may set
1209 # CONNMARK at various times. The last CONNMARK set wins. This ACL
1210 # checks the mark present on an accepted connection or set by
1211 # Squid afterwards, depending on the ACL check timing. This ACL
1212 # effectively ignores any mark set by other agents after Squid has
1213 # accepted the connection.
1214
1215 acl aclname srcdomain .foo.com ...
1216 # reverse lookup, from client IP [slow]
1217 acl aclname dstdomain [-n] .foo.com ...
1218 # Destination server from URL [fast]
1219 acl aclname srcdom_regex [-i] \.foo\.com ...
1220 # POSIX extended regex matching client name [slow]
1221 acl aclname dstdom_regex [-n] [-i] \.foo\.com ...
1222 # POSIX extended regex matching server [fast]
1223 #
1224 # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
1225 # based URL is used and no match is found. The name "none" is used
1226 # if the reverse lookup fails.
1227
1228 acl aclname peername myPeer ...
1229 acl aclname peername_regex [-i] regex-pattern ...
1230 # [fast]
1231 # match against a named cache_peer entry
1232 # set unique name= on cache_peer lines for reliable use.
1233
1234 acl aclname time [day-abbrevs] [h1:m1-h2:m2]
1235 # [fast]
1236 # day-abbrevs:
1237 # S - Sunday
1238 # M - Monday
1239 # T - Tuesday
1240 # W - Wednesday
1241 # H - Thursday
1242 # F - Friday
1243 # A - Saturday
1244 # h1:m1 must be less than h2:m2
1245
1246 acl aclname url_regex [-i] ^http:// ...
1247 # POSIX extended regex matching on whole URL [fast]
1248 acl aclname urllogin [-i] [^a-zA-Z0-9] ...
1249 # POSIX extended regex matching on URL login field
1250 acl aclname urlpath_regex [-i] \.gif$ ...
1251 # POSIX extended regex matching on URL path [fast]
1252
1253 acl aclname port 80 70 21 0-1024 ...
1254 # destination TCP port (or port range) of the request [fast]
1255 #
1256 # Port 0 matches requests that have no explicit and no default destination
1257 # ports (e.g., HTTP requests with URN targets)
1258
1259 acl aclname localport 3128 ... # TCP port the client connected to [fast]
1260 # NP: for interception mode this is usually '80'
1261
1262 acl aclname myportname 3128 ... # *_port name [fast]
1263
1264 acl aclname proto HTTP FTP ... # request protocol [fast]
1265
1266 acl aclname method GET POST ... # HTTP request method [fast]
1267
1268 acl aclname http_status 200 301 500- 400-403 ...
1269 # status code in reply [fast]
1270
1271 acl aclname browser [-i] regex ...
1272 # POSIX extended regex match on User-Agent header
1273 # (see also req_header below) [fast]
1274
1275 acl aclname referer_regex [-i] regex ...
1276 # POSIX extended regex match on Referer header [fast]
1277 # Referer is highly unreliable, so use with care
1278
1279 acl aclname proxy_auth [-i] username ...
1280 # perform http authentication challenge to the client and match against
1281 # supplied credentials [slow]
1282 #
1283 # takes a list of allowed usernames.
1284 # use REQUIRED to accept any valid username.
1285 #
1286 # See proxy_auth_regex for more information. The two ACLs differ only in
1287 # their parameter syntax and username matching algorithm.
1288
1289 acl aclname proxy_auth_regex [-i] username_pattern ...
1290 # perform http authentication challenge to the client and
1291 # POSIX extended regex match on supplied username [slow]
1292 #
1293 # Will use proxy authentication in forward-proxy scenarios, and plain
1294 # http authentication in reverse-proxy scenarios
1295 #
1296 # NOTE: when a Proxy-Authentication header is sent but it is not
1297 # needed during ACL checking the username is NOT logged
1298 # in access.log.
1299 #
1300 # NOTE: proxy_auth requires a EXTERNAL authentication program
1301 # to check username/password combinations (see
1302 # auth_param directive).
1303 #
1304 # NOTE: proxy_auth can't be used in a transparent/intercepting proxy
1305 # as the browser needs to be configured for using a proxy in order
1306 # to respond to proxy authentication.
1307
1308 acl aclname snmp_community string ...
1309 # A community string to limit access to your SNMP Agent [fast]
1310 # Example:
1311 #
1312 # acl snmppublic snmp_community public
1313
1314 acl aclname maxconn number
1315 # This will be matched when the client's IP address has
1316 # more than <number> TCP connections established. [fast]
1317 # NOTE: This only measures direct TCP links so X-Forwarded-For
1318 # indirect clients are not counted.
1319
1320 acl aclname max_user_ip [-s] number
1321 # This will be matched when the user attempts to log in from more
1322 # than <number> different ip addresses. The authenticate_ip_ttl
1323 # parameter controls the timeout on the ip entries. [fast]
1324 # If -s is specified the limit is strict, denying browsing
1325 # from any further IP addresses until the ttl has expired. Without
1326 # -s Squid will just annoy the user by "randomly" denying requests.
1327 # (the counter is reset each time the limit is reached and a
1328 # request is denied)
1329 # NOTE: in acceleration mode or where there is mesh of child proxies,
1330 # clients may appear to come from multiple addresses if they are
1331 # going through proxy farms, so a limit of 1 may cause user problems.
1332
1333 acl aclname random probability
1334 # Pseudo-randomly match requests. Based on the probability given.
1335 # Probability may be written as a decimal (0.333), fraction (1/3)
1336 # or ratio of matches:non-matches (3:5).
1337
1338 acl aclname req_mime_type [-i] mime-type ...
1339 # POSIX extended regex match against the mime type of the request generated
1340 # by the client. Can be used to detect file upload or some
1341 # types HTTP tunneling requests [fast]
1342 # NOTE: This does NOT match the reply. You cannot use this
1343 # to match the returned file type.
1344
1345 acl aclname req_header header-name [-i] any\.regex\.here
1346 # POSIX extended regex match against any of the known request headers. May be
1347 # thought of as a superset of "browser", "referer" and "mime-type"
1348 # ACL [fast]
1349
1350 acl aclname rep_mime_type [-i] mime-type ...
1351 # POSIX extended regex match against the mime type of the reply received by
1352 # squid. Can be used to detect file download or some
1353 # types HTTP tunneling requests. [fast]
1354 # NOTE: This has no effect in http_access rules. It only has
1355 # effect in rules that affect the reply data stream such as
1356 # http_reply_access.
1357
1358 acl aclname rep_header header-name [-i] any\.regex\.here
1359 # POSIX extended regex match against any of the known reply headers. May be
1360 # thought of as a superset of "browser", "referer" and "mime-type"
1361 # ACLs [fast]
1362
1363 acl aclname external class_name [arguments...]
1364 # external ACL lookup via a helper class defined by the
1365 # external_acl_type directive [slow]
1366
1367 acl aclname user_cert attribute values...
1368 # match against attributes in a user SSL certificate
1369 # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast]
1370
1371 acl aclname ca_cert attribute values...
1372 # match against attributes a users issuing CA SSL certificate
1373 # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast]
1374
1375 acl aclname ext_user [-i] username ...
1376 # string match on username returned by external acl helper [slow]
1377 # use REQUIRED to accept any non-null user name.
1378 #
1379 # See also: ext_user_regex. The two ACLs differ only in their parameter
1380 # syntax and username matching algorithm.
1381
1382 acl aclname ext_user_regex [-i] username_pattern ...
1383 # POSIX extended regex match on username returned by external acl helper [slow]
1384
1385 acl aclname tag tagvalue ...
1386 # string match on tag returned by external acl helper [fast]
1387 # DEPRECATED. Only the first tag will match with this ACL.
1388 # Use the 'note' ACL instead for handling multiple tag values.
1389
1390 acl aclname hier_code codename ...
1391 # string match against squid hierarchy code(s); [fast]
1392 # e.g., DIRECT, PARENT_HIT, NONE, etc.
1393 #
1394 # NOTE: This has no effect in http_access rules. It only has
1395 # effect in rules that affect the reply data stream such as
1396 # http_reply_access.
1397
1398 acl aclname note [-m[=delimiters]] name [value ...]
1399 # match transaction annotation [fast]
1400 # Without values, matches any annotation with a given name.
1401 # With value(s), matches any annotation with a given name that
1402 # also has one of the given values.
1403 # If the -m flag is used, then the value of the named
1404 # annotation is interpreted as a list of tokens, and the ACL
1405 # matches individual name=token pairs rather than whole
1406 # name=value pairs. See "ACL Options" above for more info.
1407 # Annotation sources include note and adaptation_meta directives
1408 # as well as helper and eCAP responses.
1409
1410 acl aclname annotate_transaction [-m[=delimiters]] key=value ...
1411 acl aclname annotate_transaction [-m[=delimiters]] key+=value ...
1412 # Always matches. [fast]
1413 # Used for its side effect: This ACL immediately adds a
1414 # key=value annotation to the current master transaction.
1415 # The added annotation can then be tested using note ACL and
1416 # logged (or sent to helpers) using %note format code.
1417 #
1418 # Annotations can be specified using replacement and addition
1419 # formats. The key=value form replaces old same-key annotation
1420 # value(s). The key+=value form appends a new value to the old
1421 # same-key annotation. Both forms create a new key=value
1422 # annotation if no same-key annotation exists already. If
1423 # -m flag is used, then the value is interpreted as a list
1424 # and the annotation will contain key=token pair(s) instead of the
1425 # whole key=value pair.
1426 #
1427 # This ACL is especially useful for recording complex multi-step
1428 # ACL-driven decisions. For example, the following configuration
1429 # avoids logging transactions accepted after aclX matched:
1430 #
1431 # # First, mark transactions accepted after aclX matched
1432 # acl markSpecial annotate_transaction special=true
1433 # http_access allow acl001
1434 # ...
1435 # http_access deny acl100
1436 # http_access allow aclX markSpecial
1437 #
1438 # # Second, do not log marked transactions:
1439 # acl markedSpecial note special true
1440 # access_log ... deny markedSpecial
1441 #
1442 # # Note that the following would not have worked because aclX
1443 # # alone does not determine whether the transaction was allowed:
1444 # access_log ... deny aclX # Wrong!
1445 #
1446 # Warning: This ACL annotates the transaction even when negated
1447 # and even if subsequent ACLs fail to match. For example, the
1448 # following three rules will have exactly the same effect as far
1449 # as annotations set by the "mark" ACL are concerned:
1450 #
1451 # some_directive acl1 ... mark # rule matches if mark is reached
1452 # some_directive acl1 ... !mark # rule never matches
1453 # some_directive acl1 ... mark !all # rule never matches
1454
1455 acl aclname annotate_client [-m[=delimiters]] key=value ...
1456 acl aclname annotate_client [-m[=delimiters]] key+=value ...
1457 #
1458 # Always matches. [fast]
1459 # Used for its side effect: This ACL immediately adds a
1460 # key=value annotation to the current client-to-Squid
1461 # connection. Connection annotations are propagated to the current
1462 # and all future master transactions on the annotated connection.
1463 # See the annotate_transaction ACL for details.
1464 #
1465 # For example, the following configuration avoids rewriting URLs
1466 # of transactions bumped by SslBump:
1467 #
1468 # # First, mark bumped connections:
1469 # acl markBumped annotate_client bumped=true
1470 # ssl_bump peek acl1
1471 # ssl_bump stare acl2
1472 # ssl_bump bump acl3 markBumped
1473 # ssl_bump splice all
1474 #
1475 # # Second, do not send marked transactions to the redirector:
1476 # acl markedBumped note bumped true
1477 # url_rewrite_access deny markedBumped
1478 #
1479 # # Note that the following would not have worked because acl3 alone
1480 # # does not determine whether the connection is going to be bumped:
1481 # url_rewrite_access deny acl3 # Wrong!
1482
1483 acl aclname adaptation_service service ...
1484 # Matches the name of any icap_service, ecap_service,
1485 # adaptation_service_set, or adaptation_service_chain that Squid
1486 # has used (or attempted to use) for the master transaction.
1487 # This ACL must be defined after the corresponding adaptation
1488 # service is named in squid.conf. This ACL is usable with
1489 # adaptation_meta because it starts matching immediately after
1490 # the service has been selected for adaptation.
1491
1492 acl aclname transaction_initiator initiator ...
1493 # Matches transaction's initiator [fast]
1494 #
1495 # Supported initiators are:
1496 # certificate-fetching: matches transactions fetching
1497 # a missing intermediate TLS certificate
1498 # cache-digest: matches transactions fetching Cache Digests
1499 # from a cache_peer
1500 # htcp: matches HTCP requests from peers
1501 # icp: matches ICP requests to peers
1502 # icmp: matches ICMP RTT database (NetDB) requests to peers
1503 # internal: matches any of the above
1504 # client: matches transactions containing an HTTP or FTP
1505 # client request received at a Squid *_port
1506 # all: matches any transaction, including internal transactions
1507 # without a configurable initiator and hopefully rare
1508 # transactions without a known-to-Squid initiator
1509 #
1510 # Multiple initiators are ORed.
1511
1512 acl aclname has component
1513 # matches a transaction "component" [fast]
1514 #
1515 # Supported transaction components are:
1516 # request: transaction has a request header (at least)
1517 # response: transaction has a response header (at least)
1518 # ALE: transaction has an internally-generated Access Log Entry
1519 # structure; bugs notwithstanding, all transaction have it
1520 #
1521 # For example, the following configuration helps when dealing with HTTP
1522 # clients that close connections without sending a request header:
1523 #
1524 # acl hasRequest has request
1525 # acl logMe note important_transaction
1526 # # avoid "logMe ACL is used in context without an HTTP request" warnings
1527 # access_log ... logformat=detailed hasRequest logMe
1528 # # log request-less transactions, instead of ignoring them
1529 # access_log ... logformat=brief !hasRequest
1530 #
1531 # Multiple components are not supported for one "acl" rule, but
1532 # can be specified (and are ORed) using multiple same-name rules:
1533 #
1534 # # OK, this strange logging daemon needs request or response,
1535 # # but can work without either a request or a response:
1536 # acl hasWhatMyLoggingDaemonNeeds has request
1537 # acl hasWhatMyLoggingDaemonNeeds has response
1538
1539 acl aclname at_step step
1540 # match against the current request processing step [fast]
1541 # Valid steps are:
1542 # GeneratingCONNECT: Generating HTTP CONNECT request headers
1543IF USE_OPENSSL
1544 # The following ssl_bump processing steps are recognized:
1545 # SslBump1: After getting TCP-level and HTTP CONNECT info.
1546 # SslBump2: After getting SSL Client Hello info.
1547 # SslBump3: After getting SSL Server Hello info.
1548ENDIF
1549
1550IF USE_OPENSSL
1551 acl aclname ssl_error errorname
1552 # match against SSL certificate validation error [fast]
1553 #
1554 # When used with sslproxy_cert_error, this ACL tests a single
1555 # certificate validation error currently being evaluated by that
1556 # directive. When used with slproxy_cert_sign or sslproxy_cert_adapt,
1557 # the ACL tests all past certificate validation errors associated with
1558 # the current Squid-to-server connection (attempt). This ACL is not yet
1559 # supported for use with other directives.
1560 #
1561 # For valid error names see in @DEFAULT_ERROR_DIR@/templates/error-details.txt
1562 # template file.
1563 #
1564 # The following can be used as shortcuts for certificate properties:
1565 # [ssl::]certHasExpired: the "not after" field is in the past
1566 # [ssl::]certNotYetValid: the "not before" field is in the future
1567 # [ssl::]certUntrusted: The certificate issuer is not to be trusted.
1568 # [ssl::]certSelfSigned: The certificate is self signed.
1569 # [ssl::]certDomainMismatch: The certificate CN domain does not
1570 # match the name the name of the host we are connecting to.
1571 #
1572 # The ssl::certHasExpired, ssl::certNotYetValid, ssl::certDomainMismatch,
1573 # ssl::certUntrusted, and ssl::certSelfSigned can also be used as
1574 # predefined ACLs, just like the 'all' ACL.
1575
1576 acl aclname server_cert_fingerprint fingerprint
1577 # match against server SSL certificate fingerprint [fast]
1578 #
1579 # The fingerprint is the digest of the DER encoded version
1580 # of the whole certificate. The user should use the form: XX:XX:...
1581 # The SHA1 digest algorithm is the default and is currently
1582 # the only algorithm supported.
1583
1584 acl aclname ssl::server_name [option] .foo.com ...
1585 # matches server name obtained from various sources [fast]
1586 #
1587 # The ACL computes server name(s) using such information sources as
1588 # CONNECT request URI, TLS client SNI, and TLS server certificate
1589 # subject (CN and SubjectAltName). The computed server name(s) usually
1590 # change with each SslBump step, as more info becomes available:
1591 # * SNI is used as the server name instead of the request URI,
1592 # * subject name(s) from the server certificate (CN and
1593 # SubjectAltName) are used as the server names instead of SNI.
1594 #
1595 # When the ACL computes multiple server names, matching any single
1596 # computed name is sufficient for the ACL to match.
1597 #
1598 # The "none" name can be used to match transactions where the ACL
1599 # could not compute the server name using any information source
1600 # that was both available and allowed to be used by the ACL options at
1601 # the ACL evaluation time.
1602 #
1603 # Unlike dstdomain, this ACL does not perform DNS lookups.
1604 #
1605 # A server name may be an IP address. For example, subject alternative
1606 # names (a.k.a. SANs) in some real server certificates include IPv4 and
1607 # IPv6 entries. Internally, Squid uses inet_ntop(3) to prep IP names for
1608 # matching. When using IPv6 names, use "::" notation (if applicable).
1609 # Do not use brackets. For example: 1080::8:800:200c:417a.
1610 #
1611 # An ACL option below may be used to restrict what information
1612 # sources are used to extract the server names from:
1613 #
1614 # --client-requested
1615 # The server name is SNI regardless of what the server says.
1616 # --server-provided
1617 # The server name(s) are the certificate subject name(s), regardless
1618 # of what the client has requested. If the server certificate is
1619 # unavailable, then the name is "none".
1620 # --consensus
1621 # The server name is either SNI (if SNI matches at least one of the
1622 # certificate subject names) or "none" (otherwise). When the server
1623 # certificate is unavailable, the consensus server name is SNI.
1624 #
1625 # Combining multiple options in one ACL is a fatal configuration
1626 # error.
1627 #
1628 # For all options: If no SNI is available, then the CONNECT request
1629 # target (a.k.a. URI) is used instead of SNI (for an intercepted
1630 # connection, this target is the destination IP address).
1631
1632 acl aclname ssl::server_name_regex [-i] \.foo\.com ...
1633 # POSIX extended regex matches server name obtained from various sources [fast]
1634 #
1635 # See ssl::server_name for details, including IPv6 address formatting
1636 # caveats. Use case-insensitive matching (i.e. -i option) to reduce
1637 # dependency on how Squid formats or sanitizes server names.
1638
1639 acl aclname connections_encrypted
1640 # matches transactions with all HTTP messages received over TLS
1641 # transport connections. [fast]
1642 #
1643 # The master transaction deals with HTTP messages received from
1644 # various sources. All sources used by the master transaction in the
1645 # past are considered by the ACL. The following rules define whether
1646 # a given message source taints the entire master transaction,
1647 # resulting in ACL mismatches:
1648 #
1649 # * The HTTP client transport connection is not TLS.
1650 # * An adaptation service connection-encryption flag is off.
1651 # * The peer or origin server transport connection is not TLS.
1652 #
1653 # Caching currently does not affect these rules. This cache ignorance
1654 # implies that only the current HTTP client transport and REQMOD
1655 # services status determine whether this ACL matches a from-cache
1656 # transaction. The source of the cached response does not have any
1657 # effect on future transaction that use the cached response without
1658 # revalidation. This may change.
1659 #
1660 # DNS, ICP, and HTCP exchanges during the master transaction do not
1661 # affect these rules.
1662ENDIF
1663 acl aclname any-of acl1 acl2 ...
1664 # match any one of the acls [fast or slow]
1665 # The first matching ACL stops further ACL evaluation.
1666 #
1667 # ACLs from multiple any-of lines with the same name are ORed.
1668 # For example, A = (a1 or a2) or (a3 or a4) can be written as
1669 # acl A any-of a1 a2
1670 # acl A any-of a3 a4
1671 #
1672 # This group ACL is fast if all evaluated ACLs in the group are fast
1673 # and slow otherwise.
1674
1675 acl aclname all-of acl1 acl2 ...
1676 # match all of the acls [fast or slow]
1677 # The first mismatching ACL stops further ACL evaluation.
1678 #
1679 # ACLs from multiple all-of lines with the same name are ORed.
1680 # For example, B = (b1 and b2) or (b3 and b4) can be written as
1681 # acl B all-of b1 b2
1682 # acl B all-of b3 b4
1683 #
1684 # This group ACL is fast if all evaluated ACLs in the group are fast
1685 # and slow otherwise.
1686
1687 Examples:
1688 acl macaddress arp 09:00:2b:23:45:67
1689 acl password proxy_auth REQUIRED
1690 acl fileupload req_mime_type -i ^multipart/form-data$
1691 acl javascript rep_mime_type -i ^application/x-javascript$
1692
1693CONFIG_START
1694#
1695# Recommended minimum configuration:
1696#
1697
1698# Example rule allowing access from your local networks.
1699# Adapt to list your (internal) IP networks from where browsing
1700# should be allowed
1701acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
1702acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)
1703acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN)
1704acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines
1705acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN)
1706acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN)
1707acl localnet src fc00::/7 # RFC 4193 local private network range
1708acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
1709
1710acl SSL_ports port 443
1711acl Safe_ports port 80 # http
1712acl Safe_ports port 21 # ftp
1713acl Safe_ports port 443 # https
1714acl Safe_ports port 70 # gopher
1715acl Safe_ports port 210 # wais
1716acl Safe_ports port 1025-65535 # unregistered ports
1717acl Safe_ports port 280 # http-mgmt
1718acl Safe_ports port 488 # gss-http
1719acl Safe_ports port 591 # filemaker
1720acl Safe_ports port 777 # multiling http
1721CONFIG_END
1722DOC_END
1723
1724NAME: proxy_protocol_access
1725TYPE: acl_access
1726LOC: Config.accessList.proxyProtocol
1727DEFAULT: none
1728DEFAULT_DOC: all TCP connections to ports with require-proxy-header will be denied
1729DOC_START
1730 Determine which client proxies can be trusted to provide correct
1731 information regarding real client IP address using PROXY protocol.
1732
1733 Requests may pass through a chain of several other proxies
1734 before reaching us. The original source details may by sent in:
1735 * HTTP message Forwarded header, or
1736 * HTTP message X-Forwarded-For header, or
1737 * PROXY protocol connection header.
1738
1739 This directive is solely for validating new PROXY protocol
1740 connections received from a port flagged with require-proxy-header.
1741 It is checked only once after TCP connection setup.
1742
1743 A deny match results in TCP connection closure.
1744
1745 An allow match is required for Squid to permit the corresponding
1746 TCP connection, before Squid even looks for HTTP request headers.
1747 If there is an allow match, Squid starts using PROXY header information
1748 to determine the source address of the connection for all future ACL
1749 checks, logging, etc.
1750
1751 SECURITY CONSIDERATIONS:
1752
1753 Any host from which we accept client IP details can place
1754 incorrect information in the relevant header, and Squid
1755 will use the incorrect information as if it were the
1756 source address of the request. This may enable remote
1757 hosts to bypass any access control restrictions that are
1758 based on the client's source addresses.
1759
1760 This clause only supports fast acl types.
1761 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1762DOC_END
1763
1764NAME: follow_x_forwarded_for
1765TYPE: acl_access
1766IFDEF: FOLLOW_X_FORWARDED_FOR
1767LOC: Config.accessList.followXFF
1768DEFAULT_IF_NONE: deny all
1769DEFAULT_DOC: X-Forwarded-For header will be ignored.
1770DOC_START
1771 Determine which client proxies can be trusted to provide correct
1772 information regarding real client IP address.
1773
1774 Requests may pass through a chain of several other proxies
1775 before reaching us. The original source details may by sent in:
1776 * HTTP message Forwarded header, or
1777 * HTTP message X-Forwarded-For header, or
1778 * PROXY protocol connection header.
1779
1780 PROXY protocol connections are controlled by the proxy_protocol_access
1781 directive which is checked before this.
1782
1783 If a request reaches us from a source that is allowed by this
1784 directive, then we trust the information it provides regarding
1785 the IP of the client it received from (if any).
1786
1787 For the purpose of ACLs used in this directive the src ACL type always
1788 matches the address we are testing and srcdomain matches its rDNS.
1789
1790 On each HTTP request Squid checks for X-Forwarded-For header fields.
1791 If found the header values are iterated in reverse order and an allow
1792 match is required for Squid to continue on to the next value.
1793 The verification ends when a value receives a deny match, cannot be
1794 tested, or there are no more values to test.
1795 NOTE: Squid does not yet follow the Forwarded HTTP header.
1796
1797 The end result of this process is an IP address that we will
1798 refer to as the indirect client address. This address may
1799 be treated as the client address for access control, ICAP, delay
1800 pools and logging, depending on the acl_uses_indirect_client,
1801 icap_uses_indirect_client, delay_pool_uses_indirect_client,
1802 log_uses_indirect_client and tproxy_uses_indirect_client options.
1803
1804 This clause only supports fast acl types.
1805 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1806
1807 SECURITY CONSIDERATIONS:
1808
1809 Any host from which we accept client IP details can place
1810 incorrect information in the relevant header, and Squid
1811 will use the incorrect information as if it were the
1812 source address of the request. This may enable remote
1813 hosts to bypass any access control restrictions that are
1814 based on the client's source addresses.
1815
1816 For example:
1817
1818 acl localhost src 127.0.0.1
1819 acl my_other_proxy srcdomain .proxy.example.com
1820 follow_x_forwarded_for allow localhost
1821 follow_x_forwarded_for allow my_other_proxy
1822DOC_END
1823
1824NAME: acl_uses_indirect_client
1825COMMENT: on|off
1826TYPE: onoff
1827IFDEF: FOLLOW_X_FORWARDED_FOR
1828DEFAULT: on
1829LOC: Config.onoff.acl_uses_indirect_client
1830DOC_START
1831 Controls whether the indirect client address
1832 (see follow_x_forwarded_for) is used instead of the
1833 direct client address in acl matching.
1834
1835 NOTE: maxconn ACL considers direct TCP links and indirect
1836 clients will always have zero. So no match.
1837DOC_END
1838
1839NAME: delay_pool_uses_indirect_client
1840COMMENT: on|off
1841TYPE: onoff
1842IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_DELAY_POOLS
1843DEFAULT: on
1844LOC: Config.onoff.delay_pool_uses_indirect_client
1845DOC_START
1846 Controls whether the indirect client address
1847 (see follow_x_forwarded_for) is used instead of the
1848 direct client address in delay pools.
1849DOC_END
1850
1851NAME: log_uses_indirect_client
1852COMMENT: on|off
1853TYPE: onoff
1854IFDEF: FOLLOW_X_FORWARDED_FOR
1855DEFAULT: on
1856LOC: Config.onoff.log_uses_indirect_client
1857DOC_START
1858 Controls whether the indirect client address
1859 (see follow_x_forwarded_for) is used instead of the
1860 direct client address in the access log.
1861DOC_END
1862
1863NAME: tproxy_uses_indirect_client
1864COMMENT: on|off
1865TYPE: onoff
1866IFDEF: FOLLOW_X_FORWARDED_FOR&&LINUX_NETFILTER
1867DEFAULT: off
1868LOC: Config.onoff.tproxy_uses_indirect_client
1869DOC_START
1870 Controls whether the indirect client address
1871 (see follow_x_forwarded_for) is used instead of the
1872 direct client address when spoofing the outgoing client.
1873
1874 This has no effect on requests arriving in non-tproxy
1875 mode ports.
1876
1877 SECURITY WARNING: Usage of this option is dangerous
1878 and should not be used trivially. Correct configuration
1879 of follow_x_forwarded_for with a limited set of trusted
1880 sources is required to prevent abuse of your proxy.
1881DOC_END
1882
1883NAME: spoof_client_ip
1884TYPE: acl_access
1885LOC: Config.accessList.spoof_client_ip
1886DEFAULT: none
1887DEFAULT_DOC: Allow spoofing on all TPROXY traffic.
1888DOC_START
1889 Control client IP address spoofing of TPROXY traffic based on
1890 defined access lists.
1891
1892 spoof_client_ip allow|deny [!]aclname ...
1893
1894 If there are no "spoof_client_ip" lines present, the default
1895 is to "allow" spoofing of any suitable request.
1896
1897 Note that the cache_peer "no-tproxy" option overrides this ACL.
1898
1899 This clause supports fast acl types.
1900 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1901DOC_END
1902
1903NAME: http_access
1904TYPE: acl_access
1905LOC: Config.accessList.http
1906DEFAULT_IF_NONE: deny all
1907DEFAULT_DOC: Deny, unless rules exist in squid.conf.
1908DOC_START
1909 Allowing or Denying access based on defined access lists
1910
1911 To allow or deny a message received on an HTTP, HTTPS, or FTP port:
1912 http_access allow|deny [!]aclname ...
1913
1914 NOTE on default values:
1915
1916 If there are no "access" lines present, the default is to deny
1917 the request.
1918
1919 If none of the "access" lines cause a match, the default is the
1920 opposite of the last line in the list. If the last line was
1921 deny, the default is allow. Conversely, if the last line
1922 is allow, the default will be deny. For these reasons, it is a
1923 good idea to have an "deny all" entry at the end of your access
1924 lists to avoid potential confusion.
1925
1926 This clause supports both fast and slow acl types.
1927 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1928
1929CONFIG_START
1930
1931#
1932# Recommended minimum Access Permission configuration:
1933#
1934# Deny requests to certain unsafe ports
1935http_access deny !Safe_ports
1936
1937# Deny CONNECT to other than secure SSL ports
1938http_access deny CONNECT !SSL_ports
1939
1940# Only allow cachemgr access from localhost
1941http_access allow localhost manager
1942http_access deny manager
1943
1944# This default configuration only allows localhost requests because a more
1945# permissive Squid installation could introduce new attack vectors into the
1946# network by proxying external TCP connections to unprotected services.
1947http_access allow localhost
1948
1949# The two deny rules below are unnecessary in this default configuration
1950# because they are followed by a "deny all" rule. However, they may become
1951# critically important when you start allowing external requests below them.
1952
1953# Protect web applications running on the same server as Squid. They often
1954# assume that only local users can access them at "localhost" ports.
1955http_access deny to_localhost
1956
1957# Protect cloud servers that provide local users with sensitive info about
1958# their server via certain well-known link-local (a.k.a. APIPA) addresses.
1959http_access deny to_linklocal
1960
1961#
1962# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
1963#
1964
1965# For example, to allow access from your local networks, you may uncomment the
1966# following rule (and/or add rules that match your definition of "local"):
1967# http_access allow localnet
1968
1969# And finally deny all other access to this proxy
1970http_access deny all
1971CONFIG_END
1972DOC_END
1973
1974NAME: adapted_http_access http_access2
1975TYPE: acl_access
1976LOC: Config.accessList.adapted_http
1977DEFAULT: none
1978DEFAULT_DOC: Allow, unless rules exist in squid.conf.
1979DOC_START
1980 Allowing or Denying access based on defined access lists
1981
1982 Essentially identical to http_access, but runs after redirectors
1983 and ICAP/eCAP adaptation. Allowing access control based on their
1984 output.
1985
1986 If not set then only http_access is used.
1987DOC_END
1988
1989NAME: http_reply_access
1990TYPE: acl_access
1991LOC: Config.accessList.reply
1992DEFAULT: none
1993DEFAULT_DOC: Allow, unless rules exist in squid.conf.
1994DOC_START
1995 Allow replies to client requests. This is complementary to http_access.
1996
1997 http_reply_access allow|deny [!] aclname ...
1998
1999 NOTE: if there are no access lines present, the default is to allow
2000 all replies.
2001
2002 If none of the access lines cause a match the opposite of the
2003 last line will apply. Thus it is good practice to end the rules
2004 with an "allow all" or "deny all" entry.
2005
2006 This clause supports both fast and slow acl types.
2007 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2008DOC_END
2009
2010NAME: icp_access
2011TYPE: acl_access
2012LOC: Config.accessList.icp
2013DEFAULT: none
2014DEFAULT_DOC: Deny, unless rules exist in squid.conf.
2015DOC_START
2016 Allowing or Denying access to the ICP port based on defined
2017 access lists
2018
2019 icp_access allow|deny [!]aclname ...
2020
2021 NOTE: The default if no icp_access lines are present is to
2022 deny all traffic. This default may cause problems with peers
2023 using ICP.
2024
2025 This clause only supports fast acl types.
2026 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2027
2028# Allow ICP queries from local networks only
2029#icp_access allow localnet
2030#icp_access deny all
2031DOC_END
2032
2033NAME: htcp_access
2034IFDEF: USE_HTCP
2035TYPE: acl_access
2036LOC: Config.accessList.htcp
2037DEFAULT: none
2038DEFAULT_DOC: Deny, unless rules exist in squid.conf.
2039DOC_START
2040 Controls whether HTCP TST requests received on htcp_port are allowed.
2041
2042 htcp_access allow|deny [!]aclname ...
2043
2044 This directive does not control whether HTCP CLR requests are allowed.
2045 Use htcp_clr_access directive for that.
2046
2047 This directive does not control whether HTCP requests with other opcodes
2048 are allowed (e.g., NOP, MON, and SET). Squid ignores those HTCP requests.
2049
2050 NOTE: The default if no htcp_access lines are present is to
2051 deny all HTCP TST traffic. This default may cause problems with peers
2052 using the htcp option.
2053
2054 This clause only supports fast acl types.
2055 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2056
2057# Allow HTCP TST queries from local networks only
2058#htcp_access allow localnet
2059#htcp_access deny all
2060DOC_END
2061
2062NAME: htcp_clr_access
2063IFDEF: USE_HTCP
2064TYPE: acl_access
2065LOC: Config.accessList.htcp_clr
2066DEFAULT: none
2067DEFAULT_DOC: Deny, unless rules exist in squid.conf.
2068DOC_START
2069 Controls whether HTCP CLR requests received on htcp_port are allowed.
2070 See htcp_access for controlling other HTCP messages.
2071
2072 htcp_clr_access allow|deny [!]aclname ...
2073
2074 HTCP CLR requests purge matching cached entries. They may be forwarded to
2075 specially marked cache_peers (see cache_peer HTCP options for details).
2076
2077 This clause only supports fast acl types.
2078 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2079
2080# Allow HTCP CLR requests from trusted peers
2081acl htcp_clr_peer src 192.0.2.2 2001:DB8::2
2082htcp_clr_access allow htcp_clr_peer
2083htcp_clr_access deny all
2084DOC_END
2085
2086NAME: miss_access
2087TYPE: acl_access
2088LOC: Config.accessList.miss
2089DEFAULT: none
2090DEFAULT_DOC: Allow, unless rules exist in squid.conf.
2091DOC_START
2092 Determines whether network access is permitted when satisfying a request.
2093
2094 For example;
2095 to force your neighbors to use you as a sibling instead of
2096 a parent.
2097
2098 acl localclients src 192.0.2.0/24 2001:DB8::a:0/64
2099 miss_access deny !localclients
2100 miss_access allow all
2101
2102 This means only your local clients are allowed to fetch relayed/MISS
2103 replies from the network and all other clients can only fetch cached
2104 objects (HITs).
2105
2106 The default for this setting allows all clients who passed the
2107 http_access rules to relay via this proxy.
2108
2109 This clause only supports fast acl types.
2110 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2111DOC_END
2112
2113NAME: reply_body_max_size
2114COMMENT: size [acl acl...]
2115TYPE: acl_b_size_t
2116DEFAULT: none
2117DEFAULT_DOC: No limit is applied.
2118LOC: Config.ReplyBodySize
2119DOC_START
2120 This option specifies the maximum size of a reply body. It can be
2121 used to prevent users from downloading very large files, such as
2122 MP3's and movies. When the reply headers are received, the
2123 reply_body_max_size lines are processed, and the first line where
2124 all (if any) listed ACLs are true is used as the maximum body size
2125 for this reply.
2126
2127 This size is checked twice. First when we get the reply headers,
2128 we check the content-length value. If the content length value exists
2129 and is larger than the allowed size, the request is denied and the
2130 user receives an error message that says "the request or reply
2131 is too large." If there is no content-length, and the reply
2132 size exceeds this limit, the client's connection is just closed
2133 and they will receive a partial reply.
2134
2135 WARNING: downstream caches probably can not detect a partial reply
2136 if there is no content-length header, so they will cache
2137 partial responses and give them out as hits. You should NOT
2138 use this option if you have downstream caches.
2139
2140 WARNING: A maximum size smaller than the size of squid's error messages
2141 will cause an infinite loop and crash squid. Ensure that the smallest
2142 non-zero value you use is greater that the maximum header size plus
2143 the size of your largest error page.
2144
2145 If you set this parameter none (the default), there will be
2146 no limit imposed.
2147
2148 Configuration Format is:
2149 reply_body_max_size SIZE UNITS [acl ...]
2150 ie.
2151 reply_body_max_size 10 MB
2152
2153DOC_END
2154
2155NAME: on_unsupported_protocol
2156TYPE: on_unsupported_protocol
2157LOC: Config.accessList.on_unsupported_protocol
2158DEFAULT: none
2159DEFAULT_DOC: Respond with an error message to unidentifiable traffic
2160DOC_START
2161 Determines Squid behavior when encountering strange requests at the
2162 beginning of an accepted TCP connection or the beginning of a bumped
2163 CONNECT tunnel. Controlling Squid reaction to unexpected traffic is
2164 especially useful in interception environments where Squid is likely
2165 to see connections for unsupported protocols that Squid should either
2166 terminate or tunnel at TCP level.
2167
2168 on_unsupported_protocol <action> [!]acl ...
2169
2170 The first matching action wins. Only fast ACLs are supported.
2171
2172 Supported actions are:
2173
2174 tunnel: Establish a TCP connection with the intended server and
2175 blindly shovel TCP packets between the client and server.
2176
2177 respond: Respond with an error message, using the transfer protocol
2178 for the Squid port that received the request (e.g., HTTP
2179 for connections intercepted at the http_port). This is the
2180 default.
2181
2182 Squid expects the following traffic patterns:
2183
2184 http_port: a plain HTTP request
2185 https_port: SSL/TLS handshake followed by an [encrypted] HTTP request
2186 ftp_port: a plain FTP command (no on_unsupported_protocol support yet!)
2187 CONNECT tunnel on http_port: same as https_port
2188 CONNECT tunnel on https_port: same as https_port
2189
2190 Currently, this directive has effect on intercepted connections and
2191 bumped tunnels only. Other cases are not supported because Squid
2192 cannot know the intended destination of other traffic.
2193
2194 For example:
2195 # define what Squid errors indicate receiving non-HTTP traffic:
2196 acl foreignProtocol squid_error ERR_PROTOCOL_UNKNOWN ERR_TOO_BIG
2197 # define what Squid errors indicate receiving nothing:
2198 acl serverTalksFirstProtocol squid_error ERR_REQUEST_START_TIMEOUT
2199 # tunnel everything that does not look like HTTP:
2200 on_unsupported_protocol tunnel foreignProtocol
2201 # tunnel if we think the client waits for the server to talk first:
2202 on_unsupported_protocol tunnel serverTalksFirstProtocol
2203 # in all other error cases, just send an HTTP "error page" response:
2204 on_unsupported_protocol respond all
2205
2206 See also: squid_error ACL
2207DOC_END
2208
2209NAME: auth_schemes
2210TYPE: AuthSchemes
2211IFDEF: USE_AUTH
2212LOC: Auth::TheConfig.schemeAccess
2213DEFAULT: none
2214DEFAULT_DOC: use all auth_param schemes in their configuration order
2215DOC_START
2216 Use this directive to customize authentication schemes presence and
2217 order in Squid's Unauthorized and Authentication Required responses.
2218
2219 auth_schemes scheme1,scheme2,... [!]aclname ...
2220
2221 where schemeN is the name of one of the authentication schemes
2222 configured using auth_param directives. At least one scheme name is
2223 required. Multiple scheme names are separated by commas. Either
2224 avoid whitespace or quote the entire schemes list.
2225
2226 A special "ALL" scheme name expands to all auth_param-configured
2227 schemes in their configuration order. This directive cannot be used
2228 to configure Squid to offer no authentication schemes at all.
2229
2230 The first matching auth_schemes rule determines the schemes order
2231 for the current Authentication Required transaction. Note that the
2232 future response is not yet available during auth_schemes evaluation.
2233
2234 If this directive is not used or none of its rules match, then Squid
2235 responds with all configured authentication schemes in the order of
2236 auth_param directives in the configuration file.
2237
2238 This directive does not determine when authentication is used or
2239 how each authentication scheme authenticates clients.
2240
2241 The following example sends basic and negotiate authentication
2242 schemes, in that order, when requesting authentication of HTTP
2243 requests matching the isIE ACL (not shown) while sending all
2244 auth_param schemes in their configuration order to other clients:
2245
2246 auth_schemes basic,negotiate isIE
2247 auth_schemes ALL all # explicit default
2248
2249 This directive supports fast ACLs only.
2250
2251 See also: auth_param.
2252DOC_END
2253
2254COMMENT_START
2255 NETWORK OPTIONS
2256 -----------------------------------------------------------------------------
2257COMMENT_END
2258
2259NAME: http_port ascii_port
2260TYPE: PortCfg
2261DEFAULT: none
2262LOC: HttpPortList
2263DOC_START
2264 Usage: port [mode] [options]
2265 hostname:port [mode] [options]
2266 1.2.3.4:port [mode] [options]
2267
2268 The socket addresses where Squid will listen for HTTP client
2269 requests. You may specify multiple socket addresses.
2270 There are three forms: port alone, hostname with port, and
2271 IP address with port. If you specify a hostname or IP
2272 address, Squid binds the socket to that specific
2273 address. Most likely, you do not need to bind to a specific
2274 address, so you can use the port number alone.
2275
2276 If you are running Squid in accelerator mode, you
2277 probably want to listen on port 80 also, or instead.
2278
2279 The -a command line option may be used to specify additional
2280 port(s) where Squid listens for proxy request. Such ports will
2281 be plain proxy ports with no options.
2282
2283 You may specify multiple socket addresses on multiple lines.
2284
2285 Modes:
2286
2287 intercept Support for IP-Layer NAT interception delivering
2288 traffic to this Squid port.
2289 NP: disables authentication on the port.
2290
2291 tproxy Support Linux TPROXY (or BSD divert-to) with spoofing
2292 of outgoing connections using the client IP address.
2293 NP: disables authentication on the port.
2294
2295 accel Accelerator / reverse proxy mode
2296
2297 ssl-bump For each CONNECT request allowed by ssl_bump ACLs,
2298 establish secure connection with the client and with
2299 the server, decrypt HTTPS messages as they pass through
2300 Squid, and treat them as unencrypted HTTP messages,
2301 becoming the man-in-the-middle.
2302
2303 The ssl_bump option is required to fully enable
2304 bumping of CONNECT requests.
2305
2306 Omitting the mode flag causes default forward proxy mode to be used.
2307
2308
2309 Accelerator Mode Options:
2310
2311 defaultsite=domainname
2312 What to use for the Host: header if it is not present
2313 in a request. Determines what site (not origin server)
2314 accelerators should consider the default.
2315
2316 no-vhost Disable using HTTP/1.1 Host header for virtual domain support.
2317
2318 protocol= Protocol to reconstruct accelerated and intercepted
2319 requests with. Defaults to HTTP/1.1 for http_port and
2320 HTTPS/1.1 for https_port.
2321 When an unsupported value is configured Squid will
2322 produce a FATAL error.
2323 Values: HTTP or HTTP/1.1, HTTPS or HTTPS/1.1
2324
2325 vport Virtual host port support. Using the http_port number
2326 instead of the port passed on Host: headers.
2327
2328 vport=NN Virtual host port support. Using the specified port
2329 number instead of the port passed on Host: headers.
2330
2331 act-as-origin
2332 Act as if this Squid is the origin server.
2333 This currently means generate new Date: and Expires:
2334 headers on HIT instead of adding Age:.
2335
2336 ignore-cc Ignore request Cache-Control headers.
2337
2338 WARNING: This option violates HTTP specifications if
2339 used in non-accelerator setups.
2340
2341 allow-direct Allow direct forwarding in accelerator mode. Normally
2342 accelerated requests are denied direct forwarding as if
2343 never_direct was used.
2344
2345 WARNING: this option opens accelerator mode to security
2346 vulnerabilities usually only affecting in interception
2347 mode. Make sure to protect forwarding with suitable
2348 http_access rules when using this.
2349
2350
2351 SSL Bump Mode Options:
2352 In addition to these options ssl-bump requires TLS/SSL options.
2353
2354 generate-host-certificates[=<on|off>]
2355 Dynamically create SSL server certificates for the
2356 destination hosts of bumped CONNECT requests.When
2357 enabled, the cert and key options are used to sign
2358 generated certificates. Otherwise generated
2359 certificate will be selfsigned.
2360 If there is a CA certificate lifetime of the generated
2361 certificate equals lifetime of the CA certificate. If
2362 generated certificate is selfsigned lifetime is three
2363 years.
2364 This option is enabled by default when ssl-bump is used.
2365 See the ssl-bump option above for more information.
2366
2367 dynamic_cert_mem_cache_size=SIZE
2368 Approximate total RAM size spent on cached generated
2369 certificates. If set to zero, caching is disabled. The
2370 default value is 4MB.
2371
2372 TLS / SSL Options:
2373
2374 tls-cert= Path to file containing an X.509 certificate (PEM format)
2375 to be used in the TLS handshake ServerHello.
2376
2377 If this certificate is constrained by KeyUsage TLS
2378 feature it must allow HTTP server usage, along with
2379 any additional restrictions imposed by your choice
2380 of options= settings.
2381
2382 When OpenSSL is used this file may also contain a
2383 chain of intermediate CA certificates to send in the
2384 TLS handshake.
2385
2386 When GnuTLS is used this option (and any paired
2387 tls-key= option) may be repeated to load multiple
2388 certificates for different domains.
2389
2390 Also, when generate-host-certificates=on is configured
2391 the first tls-cert= option must be a CA certificate
2392 capable of signing the automatically generated
2393 certificates.
2394
2395 tls-key= Path to a file containing private key file (PEM format)
2396 for the previous tls-cert= option.
2397
2398 If tls-key= is not specified tls-cert= is assumed to
2399 reference a PEM file containing both the certificate
2400 and private key.
2401
2402 cipher= Colon separated list of supported ciphers.
2403 NOTE: some ciphers such as EDH ciphers depend on
2404 additional settings. If those settings are
2405 omitted the ciphers may be silently ignored
2406 by the OpenSSL library.
2407
2408 options= Various SSL implementation options. The most important
2409 being:
2410
2411 NO_SSLv3 Disallow the use of SSLv3
2412
2413 NO_TLSv1 Disallow the use of TLSv1.0
2414
2415 NO_TLSv1_1 Disallow the use of TLSv1.1
2416
2417 NO_TLSv1_2 Disallow the use of TLSv1.2
2418
2419 SINGLE_DH_USE
2420 Always create a new key when using
2421 temporary/ephemeral DH key exchanges
2422
2423 SINGLE_ECDH_USE
2424 Enable ephemeral ECDH key exchange.
2425 The adopted curve should be specified
2426 using the tls-dh option.
2427
2428 NO_TICKET
2429 Disable use of RFC5077 session tickets.
2430 Some servers may have problems
2431 understanding the TLS extension due
2432 to ambiguous specification in RFC4507.
2433
2434 ALL Enable various bug workarounds
2435 suggested as "harmless" by OpenSSL
2436 Be warned that this reduces SSL/TLS
2437 strength to some attacks.
2438
2439 See the OpenSSL SSL_CTX_set_options documentation for a
2440 more complete list.
2441
2442 clientca= File containing the list of CAs to use when
2443 requesting a client certificate.
2444
2445 tls-cafile= PEM file containing CA certificates to use when verifying
2446 client certificates. If not configured clientca will be
2447 used. May be repeated to load multiple files.
2448
2449 capath= Directory containing additional CA certificates
2450 and CRL lists to use when verifying client certificates.
2451 Requires OpenSSL or LibreSSL.
2452
2453 crlfile= File of additional CRL lists to use when verifying
2454 the client certificate, in addition to CRLs stored in
2455 the capath. Implies VERIFY_CRL flag below.
2456
2457 tls-dh=[curve:]file
2458 File containing DH parameters for temporary/ephemeral DH key
2459 exchanges, optionally prefixed by a curve for ephemeral ECDH
2460 key exchanges.
2461 See OpenSSL documentation for details on how to create the
2462 DH parameter file. Supported curves for ECDH can be listed
2463 using the "openssl ecparam -list_curves" command.
2464 WARNING: EDH and EECDH ciphers will be silently disabled if
2465 this option is not set.
2466
2467 sslflags= Various flags modifying the use of SSL:
2468 DELAYED_AUTH
2469 Don't request client certificates
2470 immediately, but wait until acl processing
2471 requires a certificate (not yet implemented).
2472 CONDITIONAL_AUTH
2473 Request a client certificate during the TLS
2474 handshake, but ignore certificate absence in
2475 the TLS client Hello. If the client does
2476 supply a certificate, it is validated.
2477 NO_SESSION_REUSE
2478 Don't allow for session reuse. Each connection
2479 will result in a new SSL session.
2480 VERIFY_CRL
2481 Verify CRL lists when accepting client
2482 certificates.
2483 VERIFY_CRL_ALL
2484 Verify CRL lists for all certificates in the
2485 client certificate chain.
2486
2487 tls-default-ca[=off]
2488 Whether to use the system Trusted CAs. Default is OFF.
2489
2490 tls-no-npn Do not use the TLS NPN extension to advertise HTTP/1.1.
2491
2492 sslcontext= SSL session ID context identifier.
2493
2494 Other Options:
2495
2496 connection-auth[=on|off]
2497 use connection-auth=off to tell Squid to prevent
2498 forwarding Microsoft connection oriented authentication
2499 (NTLM, Negotiate and Kerberos)
2500
2501 disable-pmtu-discovery=
2502 Control Path-MTU discovery usage:
2503 off lets OS decide on what to do (default).
2504 transparent disable PMTU discovery when transparent
2505 support is enabled.
2506 always disable always PMTU discovery.
2507
2508 In many setups of transparently intercepting proxies
2509 Path-MTU discovery can not work on traffic towards the
2510 clients. This is the case when the intercepting device
2511 does not fully track connections and fails to forward
2512 ICMP must fragment messages to the cache server. If you
2513 have such setup and experience that certain clients
2514 sporadically hang or never complete requests set
2515 disable-pmtu-discovery option to 'transparent'.
2516
2517 name= Specifies a internal name for the port. Defaults to
2518 the port specification (port or addr:port)
2519
2520 tcpkeepalive[=idle,interval,timeout]
2521 Enable TCP keepalive probes of idle connections.
2522 In seconds; idle is the initial time before TCP starts
2523 probing the connection, interval how often to probe, and
2524 timeout the time before giving up.
2525
2526 require-proxy-header
2527 Require PROXY protocol version 1 or 2 connections.
2528 The proxy_protocol_access is required to permit
2529 downstream proxies which can be trusted.
2530
2531 worker-queues
2532 Ask TCP stack to maintain a dedicated listening queue
2533 for each worker accepting requests at this port.
2534 Requires TCP stack that supports the SO_REUSEPORT socket
2535 option.
2536
2537 SECURITY WARNING: Enabling worker-specific queues
2538 allows any process running as Squid's effective user to
2539 easily accept requests destined to this port.
2540
2541 If you run Squid on a dual-homed machine with an internal
2542 and an external interface we recommend you to specify the
2543 internal address:port in http_port. This way Squid will only be
2544 visible on the internal address.
2545
2546CONFIG_START
2547
2548# Squid normally listens to port 3128
2549http_port @DEFAULT_HTTP_PORT@
2550CONFIG_END
2551DOC_END
2552
2553NAME: https_port
2554IFDEF: HAVE_LIBGNUTLS||USE_OPENSSL
2555TYPE: PortCfg
2556DEFAULT: none
2557LOC: HttpPortList
2558DOC_START
2559 Usage: [ip:]port [mode] tls-cert=certificate.pem [options]
2560
2561 The socket address where Squid will listen for client requests made
2562 over TLS or SSL connections. Commonly referred to as HTTPS.
2563
2564 This is most useful for situations where you are running squid in
2565 accelerator mode and you want to do the TLS work at the accelerator
2566 level.
2567
2568 You may specify multiple socket addresses on multiple lines,
2569 each with their own certificate and/or options.
2570
2571 The tls-cert= option is mandatory on HTTPS ports.
2572
2573 See http_port for a list of modes and options.
2574 Not all http_port options are available for https_port.
2575 Among the unavalable options:
2576 - require-proxy-header
2577DOC_END
2578
2579NAME: ftp_port
2580TYPE: PortCfg
2581DEFAULT: none
2582LOC: FtpPortList
2583DOC_START
2584 Enables Native FTP proxy by specifying the socket address where Squid
2585 listens for FTP client requests. See http_port directive for various
2586 ways to specify the listening address and mode.
2587
2588 Usage: ftp_port address [mode] [options]
2589
2590 WARNING: This is a new, experimental, complex feature that has seen
2591 limited production exposure. Some Squid modules (e.g., caching) do not
2592 currently work with native FTP proxying, and many features have not
2593 even been tested for compatibility. Test well before deploying!
2594
2595 Native FTP proxying differs substantially from proxying HTTP requests
2596 with ftp:// URIs because Squid works as an FTP server and receives
2597 actual FTP commands (rather than HTTP requests with FTP URLs).
2598
2599 Native FTP commands accepted at ftp_port are internally converted or
2600 wrapped into HTTP-like messages. The same happens to Native FTP
2601 responses received from FTP origin servers. Those HTTP-like messages
2602 are shoveled through regular access control and adaptation layers
2603 between the FTP client and the FTP origin server. This allows Squid to
2604 examine, adapt, block, and log FTP exchanges. Squid reuses most HTTP
2605 mechanisms when shoveling wrapped FTP messages. For example,
2606 http_access and adaptation_access directives are used.
2607
2608 Modes:
2609
2610 intercept Same as http_port intercept. The FTP origin address is
2611 determined based on the intended destination of the
2612 intercepted connection.
2613
2614 tproxy Support Linux TPROXY for spoofing outgoing
2615 connections using the client IP address.
2616 NP: disables authentication and maybe IPv6 on the port.
2617
2618 By default (i.e., without an explicit mode option), Squid extracts the
2619 FTP origin address from the login@origin parameter of the FTP USER
2620 command. Many popular FTP clients support such native FTP proxying.
2621
2622 Options:
2623
2624 name=token Specifies an internal name for the port. Defaults to
2625 the port address. Usable with myportname ACL.
2626
2627 ftp-track-dirs
2628 Enables tracking of FTP directories by injecting extra
2629 PWD commands and adjusting Request-URI (in wrapping
2630 HTTP requests) to reflect the current FTP server
2631 directory. Tracking is disabled by default.
2632
2633 protocol=FTP Protocol to reconstruct accelerated and intercepted
2634 requests with. Defaults to FTP. No other accepted
2635 values have been tested with. An unsupported value
2636 results in a FATAL error. Accepted values are FTP,
2637 HTTP (or HTTP/1.1), and HTTPS (or HTTPS/1.1).
2638
2639 Other http_port modes and options that are not specific to HTTP and
2640 HTTPS may also work.
2641 Among the options that are not available for ftp_port:
2642 - require-proxy-header
2643 - ssl-bump
2644DOC_END
2645
2646NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp
2647TYPE: acl_tos
2648DEFAULT: none
2649LOC: Ip::Qos::TheConfig.tosToServer
2650DOC_START
2651 Allows you to select a TOS/Diffserv value for packets outgoing
2652 on the server side, based on an ACL.
2653
2654 tcp_outgoing_tos ds-field [!]aclname ...
2655
2656 Example where normal_service_net uses the TOS value 0x00
2657 and good_service_net uses 0x20
2658
2659 acl normal_service_net src 10.0.0.0/24
2660 acl good_service_net src 10.0.1.0/24
2661 tcp_outgoing_tos 0x00 normal_service_net
2662 tcp_outgoing_tos 0x20 good_service_net
2663
2664 TOS/DSCP values really only have local significance - so you should
2665 know what you're specifying. For more information, see RFC2474,
2666 RFC2475, and RFC3260.
2667
2668 The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
2669 "default" to use whatever default your host has.
2670 Note that only multiples of 4 are usable as the two rightmost bits have
2671 been redefined for use by ECN (RFC 3168 section 23.1).
2672 The squid parser will enforce this by masking away the ECN bits.
2673
2674 Processing proceeds in the order specified, and stops at first fully
2675 matching line.
2676
2677 Only fast ACLs are supported.
2678DOC_END
2679
2680NAME: clientside_tos
2681TYPE: acl_tos
2682DEFAULT: none
2683LOC: Ip::Qos::TheConfig.tosToClient
2684DOC_START
2685 Allows you to select a TOS/DSCP value for packets being transmitted
2686 on the client-side, based on an ACL.
2687
2688 clientside_tos ds-field [!]aclname ...
2689
2690 Example where normal_service_net uses the TOS value 0x00
2691 and good_service_net uses 0x20
2692
2693 acl normal_service_net src 10.0.0.0/24
2694 acl good_service_net src 10.0.1.0/24
2695 clientside_tos 0x00 normal_service_net
2696 clientside_tos 0x20 good_service_net
2697
2698 Note: This feature is incompatible with qos_flows. Any TOS values set here
2699 will be overwritten by TOS values in qos_flows.
2700
2701 The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
2702 "default" to use whatever default your host has.
2703 Note that only multiples of 4 are usable as the two rightmost bits have
2704 been redefined for use by ECN (RFC 3168 section 23.1).
2705 The squid parser will enforce this by masking away the ECN bits.
2706
2707 This clause only supports fast acl types.
2708 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2709DOC_END
2710
2711NAME: tcp_outgoing_mark
2712TYPE: acl_nfmark
2713IFDEF: HAVE_LIBCAP&&SO_MARK
2714DEFAULT: none
2715LOC: Ip::Qos::TheConfig.nfmarkToServer
2716DOC_START
2717 Allows you to apply a Netfilter mark value to outgoing packets
2718 on the server side, based on an ACL.
2719
2720 tcp_outgoing_mark mark-value [!]aclname ...
2721
2722 Example where normal_service_net uses the mark value 0x00
2723 and good_service_net uses 0x20
2724
2725 acl normal_service_net src 10.0.0.0/24
2726 acl good_service_net src 10.0.1.0/24
2727 tcp_outgoing_mark 0x00 normal_service_net
2728 tcp_outgoing_mark 0x20 good_service_net
2729
2730 Only fast ACLs are supported.
2731DOC_END
2732
2733NAME: mark_client_packet clientside_mark
2734TYPE: acl_nfmark
2735IFDEF: HAVE_LIBCAP&&SO_MARK
2736DEFAULT: none
2737LOC: Ip::Qos::TheConfig.nfmarkToClient
2738DOC_START
2739 Allows you to apply a Netfilter MARK value to packets being transmitted
2740 on the client-side, based on an ACL.
2741
2742 mark_client_packet mark-value [!]aclname ...
2743
2744 Example where normal_service_net uses the MARK value 0x00
2745 and good_service_net uses 0x20
2746
2747 acl normal_service_net src 10.0.0.0/24
2748 acl good_service_net src 10.0.1.0/24
2749 mark_client_packet 0x00 normal_service_net
2750 mark_client_packet 0x20 good_service_net
2751
2752 Note: This feature is incompatible with qos_flows. Any mark values set here
2753 will be overwritten by mark values in qos_flows.
2754
2755 This clause only supports fast acl types.
2756 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2757DOC_END
2758
2759NAME: mark_client_connection
2760TYPE: acl_nfmark
2761IFDEF: HAVE_LIBCAP&&SO_MARK
2762DEFAULT: none
2763LOC: Ip::Qos::TheConfig.nfConnmarkToClient
2764DOC_START
2765 Allows you to apply a Netfilter CONNMARK value to a connection
2766 on the client-side, based on an ACL.
2767
2768 mark_client_connection mark-value[/mask] [!]aclname ...
2769
2770 The mark-value and mask are unsigned integers (hex, octal, or decimal).
2771 The mask may be used to preserve marking previously set by other agents
2772 (e.g., iptables).
2773
2774 A matching rule replaces the CONNMARK value. If a mask is also
2775 specified, then the masked bits of the original value are zeroed, and
2776 the configured mark-value is ORed with that adjusted value.
2777 For example, applying a mark-value 0xAB/0xF to 0x5F CONNMARK, results
2778 in a 0xFB marking (rather than a 0xAB or 0x5B).
2779
2780 This directive semantics is similar to iptables --set-mark rather than
2781 --set-xmark functionality.
2782
2783 The directive does not interfere with qos_flows (which uses packet MARKs,
2784 not CONNMARKs).
2785
2786 Example where squid marks intercepted FTP connections:
2787
2788 acl proto_ftp proto FTP
2789 mark_client_connection 0x200/0xff00 proto_ftp
2790
2791 This clause only supports fast acl types.
2792 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2793DOC_END
2794
2795NAME: qos_flows
2796TYPE: QosConfig
2797IFDEF: USE_QOS_TOS
2798DEFAULT: none
2799LOC: Ip::Qos::TheConfig
2800DOC_START
2801 Allows you to select a TOS/DSCP value to mark outgoing
2802 connections to the client, based on where the reply was sourced.
2803 For platforms using netfilter, allows you to set a netfilter mark
2804 value instead of, or in addition to, a TOS value.
2805
2806 By default this functionality is disabled. To enable it with the default
2807 settings simply use "qos_flows mark" or "qos_flows tos". Default
2808 settings will result in the netfilter mark or TOS value being copied
2809 from the upstream connection to the client. Note that it is the connection
2810 CONNMARK value not the packet MARK value that is copied.
2811
2812 It is not currently possible to copy the mark or TOS value from the
2813 client to the upstream connection request.
2814
2815 TOS values really only have local significance - so you should
2816 know what you're specifying. For more information, see RFC2474,
2817 RFC2475, and RFC3260.
2818
2819 The TOS/DSCP byte must be exactly that - a octet value 0 - 255.
2820 Note that only multiples of 4 are usable as the two rightmost bits have
2821 been redefined for use by ECN (RFC 3168 section 23.1).
2822 The squid parser will enforce this by masking away the ECN bits.
2823
2824 Mark values can be any unsigned 32-bit integer value.
2825
2826 This setting is configured by setting the following values:
2827
2828 tos|mark Whether to set TOS or netfilter mark values
2829
2830 local-hit=0xFF Value to mark local cache hits.
2831
2832 sibling-hit=0xFF Value to mark hits from sibling peers.
2833
2834 parent-hit=0xFF Value to mark hits from parent peers.
2835
2836 miss=0xFF[/mask] Value to mark cache misses. Takes precedence
2837 over the preserve-miss feature (see below), unless
2838 mask is specified, in which case only the bits
2839 specified in the mask are written.
2840
2841 The TOS variant of the following features are only possible on Linux
2842 and require your kernel to be patched with the TOS preserving ZPH
2843 patch, available from http://zph.bratcheda.org
2844 No patch is needed to preserve the netfilter mark, which will work
2845 with all variants of netfilter.
2846
2847 disable-preserve-miss
2848 This option disables the preservation of the TOS or netfilter
2849 mark. By default, the existing TOS or netfilter mark value of
2850 the response coming from the remote server will be retained
2851 and masked with miss-mark.
2852 NOTE: in the case of a netfilter mark, the mark must be set on
2853 the connection (using the CONNMARK target) not on the packet
2854 (MARK target).
2855
2856 miss-mask=0xFF
2857 Allows you to mask certain bits in the TOS or mark value
2858 received from the remote server, before copying the value to
2859 the TOS sent towards clients.
2860 Default for tos: 0xFF (TOS from server is not changed).
2861 Default for mark: 0xFFFFFFFF (mark from server is not changed).
2862
2863 All of these features require the --enable-zph-qos compilation flag
2864 (enabled by default). Netfilter marking also requires the
2865 libnetfilter_conntrack libraries (--with-netfilter-conntrack) and
2866 libcap 2.09+ (--with-libcap).
2867
2868DOC_END
2869
2870NAME: tcp_outgoing_address
2871TYPE: acl_address
2872DEFAULT: none
2873DEFAULT_DOC: Address selection is performed by the operating system.
2874LOC: Config.accessList.outgoing_address
2875DOC_START
2876 Allows you to map requests to different outgoing IP addresses
2877 based on the username or source address of the user making
2878 the request.
2879
2880 tcp_outgoing_address ipaddr [[!]aclname] ...
2881
2882 For example;
2883 Forwarding clients with dedicated IPs for certain subnets.
2884
2885 acl normal_service_net src 10.0.0.0/24
2886 acl good_service_net src 10.0.2.0/24
2887
2888 tcp_outgoing_address 2001:db8::c001 good_service_net
2889 tcp_outgoing_address 10.1.0.2 good_service_net
2890
2891 tcp_outgoing_address 2001:db8::beef normal_service_net
2892 tcp_outgoing_address 10.1.0.1 normal_service_net
2893
2894 tcp_outgoing_address 2001:db8::1
2895 tcp_outgoing_address 10.1.0.3
2896
2897 Processing proceeds in the order specified, and stops at first fully
2898 matching line.
2899
2900 Squid will add an implicit IP version test to each line.
2901 Requests going to IPv4 websites will use the outgoing 10.1.0.* addresses.
2902 Requests going to IPv6 websites will use the outgoing 2001:db8:* addresses.
2903
2904
2905 NOTE: The use of this directive using client dependent ACLs is
2906 incompatible with the use of server side persistent connections. To
2907 ensure correct results it is best to set server_persistent_connections
2908 to off when using this directive in such configurations.
2909
2910 NOTE: The use of this directive to set a local IP on outgoing TCP links
2911 is incompatible with using TPROXY to set client IP out outbound TCP links.
2912 When needing to contact peers use the no-tproxy cache_peer option and the
2913 client_dst_passthru directive re-enable normal forwarding such as this.
2914
2915 This clause only supports fast acl types.
2916 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2917DOC_END
2918
2919NAME: host_verify_strict
2920TYPE: onoff
2921DEFAULT: off
2922LOC: Config.onoff.hostStrictVerify
2923DOC_START
2924 Regardless of this option setting, when dealing with intercepted
2925 traffic, Squid always verifies that the destination IP address matches
2926 the Host header domain or IP (called 'authority form URL').
2927
2928 This enforcement is performed to satisfy a MUST-level requirement in
2929 RFC 2616 section 14.23: "The Host field value MUST represent the naming
2930 authority of the origin server or gateway given by the original URL".
2931
2932 When set to ON:
2933 Squid always responds with an HTTP 409 (Conflict) error
2934 page and logs a security warning if there is no match.
2935
2936 Squid verifies that the destination IP address matches
2937 the Host header for forward-proxy and reverse-proxy traffic
2938 as well. For those traffic types, Squid also enables the
2939 following checks, comparing the corresponding Host header
2940 and Request-URI components:
2941
2942 * The host names (domain or IP) must be identical,
2943 but valueless or missing Host header disables all checks.
2944 For the two host names to match, both must be either IP
2945 or FQDN.
2946
2947 * Port numbers must be identical, but if a port is missing
2948 the scheme-default port is assumed.
2949
2950
2951 When set to OFF (the default):
2952 Squid allows suspicious requests to continue but logs a
2953 security warning and blocks caching of the response.
2954
2955 * Forward-proxy traffic is not checked at all.
2956
2957 * Reverse-proxy traffic is not checked at all.
2958
2959 * Intercepted traffic which passes verification is handled
2960 according to client_dst_passthru.
2961
2962 * Intercepted requests which fail verification are sent
2963 to the client original destination instead of DIRECT.
2964 This overrides 'client_dst_passthru off'.
2965
2966 For now suspicious intercepted CONNECT requests are always
2967 responded to with an HTTP 409 (Conflict) error page.
2968
2969
2970 SECURITY NOTE:
2971
2972 As described in CVE-2009-0801 when the Host: header alone is used
2973 to determine the destination of a request it becomes trivial for
2974 malicious scripts on remote websites to bypass browser same-origin
2975 security policy and sandboxing protections.
2976
2977 The cause of this is that such applets are allowed to perform their
2978 own HTTP stack, in which case the same-origin policy of the browser
2979 sandbox only verifies that the applet tries to contact the same IP
2980 as from where it was loaded at the IP level. The Host: header may
2981 be different from the connected IP and approved origin.
2982
2983DOC_END
2984
2985NAME: client_dst_passthru
2986TYPE: onoff
2987DEFAULT: on
2988LOC: Config.onoff.client_dst_passthru
2989DOC_START
2990 With NAT or TPROXY intercepted traffic Squid may pass the request
2991 directly to the original client destination IP or seek a faster
2992 source using the HTTP Host header.
2993
2994 Using Host to locate alternative servers can provide faster
2995 connectivity with a range of failure recovery options.
2996 But can also lead to connectivity trouble when the client and
2997 server are attempting stateful interactions unaware of the proxy.
2998
2999 This option (on by default) prevents alternative DNS entries being
3000 located to send intercepted traffic DIRECT to an origin server.
3001 The clients original destination IP and port will be used instead.
3002
3003 Regardless of this option setting, when dealing with intercepted
3004 traffic Squid will verify the Host: header and any traffic which
3005 fails Host verification will be treated as if this option were ON.
3006
3007 see host_verify_strict for details on the verification process.
3008DOC_END
3009
3010COMMENT_START
3011 TLS OPTIONS
3012 -----------------------------------------------------------------------------
3013COMMENT_END
3014
3015NAME: tls_outgoing_options
3016IFDEF: HAVE_LIBGNUTLS||USE_OPENSSL
3017TYPE: securePeerOptions
3018DEFAULT: min-version=1.0
3019LOC: Security::ProxyOutgoingConfig()
3020DOC_START
3021 disable Do not support https:// URLs.
3022
3023 cert=/path/to/client/certificate
3024 A client X.509 certificate to use when connecting.
3025
3026 key=/path/to/client/private_key
3027 The private key corresponding to the cert= above.
3028
3029 If key= is not specified cert= is assumed to
3030 reference a PEM file containing both the certificate
3031 and private key.
3032
3033 cipher=... The list of valid TLS ciphers to use.
3034
3035 min-version=1.N
3036 The minimum TLS protocol version to permit.
3037 To control SSLv3 use the options= parameter.
3038 Supported Values: 1.0 (default), 1.1, 1.2, 1.3
3039
3040 options=... Specify various TLS/SSL implementation options.
3041
3042 OpenSSL options most important are:
3043
3044 NO_SSLv3 Disallow the use of SSLv3
3045
3046 SINGLE_DH_USE
3047 Always create a new key when using
3048 temporary/ephemeral DH key exchanges
3049
3050 NO_TICKET
3051 Disable use of RFC5077 session tickets.
3052 Some servers may have problems
3053 understanding the TLS extension due
3054 to ambiguous specification in RFC4507.
3055
3056 ALL Enable various bug workarounds
3057 suggested as "harmless" by OpenSSL
3058 Be warned that this reduces SSL/TLS
3059 strength to some attacks.
3060
3061 See the OpenSSL SSL_CTX_set_options documentation
3062 for a more complete list.
3063
3064 GnuTLS options most important are:
3065
3066 %NO_TICKETS
3067 Disable use of RFC5077 session tickets.
3068 Some servers may have problems
3069 understanding the TLS extension due
3070 to ambiguous specification in RFC4507.
3071
3072 See the GnuTLS Priority Strings documentation
3073 for a more complete list.
3074 http://www.gnutls.org/manual/gnutls.html#Priority-Strings
3075
3076
3077 cafile= PEM file containing CA certificates to use when verifying
3078 the peer certificate. May be repeated to load multiple files.
3079
3080 capath= A directory containing additional CA certificates to
3081 use when verifying the peer certificate.
3082 Requires OpenSSL or LibreSSL.
3083
3084 crlfile=... A certificate revocation list file to use when
3085 verifying the peer certificate.
3086
3087 flags=... Specify various flags modifying the TLS implementation:
3088
3089 DONT_VERIFY_PEER
3090 Accept certificates even if they fail to
3091 verify.
3092 DONT_VERIFY_DOMAIN
3093 Don't verify the peer certificate
3094 matches the server name
3095
3096 default-ca[=off]
3097 Whether to use the system Trusted CAs. Default is ON.
3098
3099 domain= The peer name as advertised in its certificate.
3100 Used for verifying the correctness of the received peer
3101 certificate. If not specified the peer hostname will be
3102 used.
3103DOC_END
3104
3105COMMENT_START
3106 SSL OPTIONS
3107 -----------------------------------------------------------------------------
3108COMMENT_END
3109
3110NAME: ssl_unclean_shutdown
3111IFDEF: USE_OPENSSL
3112TYPE: onoff
3113DEFAULT: off
3114LOC: Config.SSL.unclean_shutdown
3115DOC_START
3116 Some browsers (especially MSIE) bugs out on SSL shutdown
3117 messages.
3118DOC_END
3119
3120NAME: ssl_engine
3121IFDEF: USE_OPENSSL
3122TYPE: string
3123LOC: Config.SSL.ssl_engine
3124DEFAULT: none
3125DOC_START
3126 The OpenSSL engine to use. You will need to set this if you
3127 would like to use hardware SSL acceleration for example.
3128
3129 Not supported in builds with OpenSSL 3.0 or newer.
3130DOC_END
3131
3132NAME: sslproxy_session_ttl
3133IFDEF: USE_OPENSSL
3134DEFAULT: 300
3135LOC: Config.SSL.session_ttl
3136TYPE: int
3137DOC_START
3138 Sets the timeout value for SSL sessions
3139DOC_END
3140
3141NAME: sslproxy_session_cache_size
3142IFDEF: USE_OPENSSL
3143DEFAULT: 2 MB
3144LOC: Config.SSL.sessionCacheSize
3145TYPE: b_size_t
3146DOC_START
3147 Sets the cache size to use for ssl session
3148DOC_END
3149
3150NAME: sslproxy_foreign_intermediate_certs
3151IFDEF: USE_OPENSSL
3152DEFAULT: none
3153LOC: Config.ssl_client.foreignIntermediateCertsPath
3154TYPE: string
3155DOC_START
3156 Many origin servers fail to send their full server certificate
3157 chain for verification, assuming the client already has or can
3158 easily locate any missing intermediate certificates.
3159
3160 Squid uses the certificates from the specified file to fill in
3161 these missing chains when trying to validate origin server
3162 certificate chains.
3163
3164 The file is expected to contain zero or more PEM-encoded
3165 intermediate certificates. These certificates are not treated
3166 as trusted root certificates, and any self-signed certificate in
3167 this file will be ignored.
3168DOC_END
3169
3170NAME: sslproxy_cert_sign_hash
3171IFDEF: USE_OPENSSL
3172DEFAULT: none
3173LOC: Config.SSL.certSignHash
3174TYPE: string
3175DOC_START
3176 Sets the hashing algorithm to use when signing generated certificates.
3177 Valid algorithm names depend on the OpenSSL library used. The following
3178 names are usually available: sha1, sha256, sha512, and md5. Please see
3179 your OpenSSL library manual for the available hashes. By default, Squids
3180 that support this option use sha256 hashes.
3181
3182 Squid does not forcefully purge cached certificates that were generated
3183 with an algorithm other than the currently configured one. They remain
3184 in the cache, subject to the regular cache eviction policy, and become
3185 useful if the algorithm changes again.
3186DOC_END
3187
3188NAME: ssl_bump
3189IFDEF: USE_OPENSSL
3190TYPE: sslproxy_ssl_bump
3191LOC: Config.accessList.ssl_bump
3192DEFAULT_DOC: Become a TCP tunnel without decrypting proxied traffic.
3193DEFAULT: none
3194DOC_START
3195 This option is consulted when a CONNECT request is received on
3196 an http_port (or a new connection is intercepted at an
3197 https_port), provided that port was configured with an ssl-bump
3198 flag. The subsequent data on the connection is either treated as
3199 HTTPS and decrypted OR tunneled at TCP level without decryption,
3200 depending on the first matching bumping "action".
3201
3202 ssl_bump <action> [!]acl ...
3203
3204 The following bumping actions are currently supported:
3205
3206 splice
3207 Become a TCP tunnel without decrypting proxied traffic.
3208 This is the default action.
3209
3210 bump
3211 When used on step SslBump1, establishes a secure connection
3212 with the client first, then connect to the server.
3213 When used on step SslBump2 or SslBump3, establishes a secure
3214 connection with the server and, using a mimicked server
3215 certificate, with the client.
3216
3217 peek
3218 Receive client (step SslBump1) or server (step SslBump2)
3219 certificate while preserving the possibility of splicing the
3220 connection. Peeking at the server certificate (during step 2)
3221 usually precludes bumping of the connection at step 3.
3222
3223 stare
3224 Receive client (step SslBump1) or server (step SslBump2)
3225 certificate while preserving the possibility of bumping the
3226 connection. Staring at the server certificate (during step 2)
3227 usually precludes splicing of the connection at step 3.
3228
3229 terminate
3230 Close client and server connections.
3231
3232 Backward compatibility actions available at step SslBump1:
3233
3234 client-first
3235 Bump the connection. Establish a secure connection with the
3236 client first, then connect to the server. This old mode does
3237 not allow Squid to mimic server SSL certificate and does not
3238 work with intercepted SSL connections.
3239
3240 server-first
3241 Bump the connection. Establish a secure connection with the
3242 server first, then establish a secure connection with the
3243 client, using a mimicked server certificate. Works with both
3244 CONNECT requests and intercepted SSL connections, but does
3245 not allow to make decisions based on SSL handshake info.
3246
3247 peek-and-splice
3248 Decide whether to bump or splice the connection based on
3249 client-to-squid and server-to-squid SSL hello messages.
3250 XXX: Remove.
3251
3252 none
3253 Same as the "splice" action.
3254
3255 All ssl_bump rules are evaluated at each of the supported bumping
3256 steps. Rules with actions that are impossible at the current step are
3257 ignored. The first matching ssl_bump action wins and is applied at the
3258 end of the current step. If no rules match, the splice action is used.
3259 See the at_step ACL for a list of the supported SslBump steps.
3260
3261 This clause supports both fast and slow acl types.
3262 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
3263
3264 See also: http_port ssl-bump, https_port ssl-bump, and acl at_step.
3265
3266
3267 # Example: Bump all TLS connections except those originating from
3268 # localhost or those going to example.com.
3269
3270 acl broken_sites ssl::server_name .example.com
3271 ssl_bump splice localhost
3272 ssl_bump splice broken_sites
3273 ssl_bump bump all
3274DOC_END
3275
3276NAME: sslproxy_cert_error
3277IFDEF: USE_OPENSSL
3278DEFAULT: none
3279DEFAULT_DOC: Server certificate errors terminate the transaction.
3280LOC: Config.ssl_client.cert_error
3281TYPE: acl_access
3282DOC_START
3283 Use this ACL to bypass server certificate validation errors.
3284
3285 For example, the following lines will bypass all validation errors
3286 when talking to servers for example.com. All other
3287 validation errors will result in ERR_SECURE_CONNECT_FAIL error.
3288
3289 acl BrokenButTrustedServers dstdomain example.com
3290 sslproxy_cert_error allow BrokenButTrustedServers
3291 sslproxy_cert_error deny all
3292
3293 This clause only supports fast acl types.
3294 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
3295 Using slow acl types may result in server crashes
3296
3297 Without this option, all server certificate validation errors
3298 terminate the transaction to protect Squid and the client.
3299
3300 SQUID_X509_V_ERR_INFINITE_VALIDATION error cannot be bypassed
3301 but should not happen unless your OpenSSL library is buggy.
3302
3303 SECURITY WARNING:
3304 Bypassing validation errors is dangerous because an
3305 error usually implies that the server cannot be trusted
3306 and the connection may be insecure.
3307
3308 See also: sslproxy_flags and DONT_VERIFY_PEER.
3309DOC_END
3310
3311NAME: sslproxy_cert_sign
3312IFDEF: USE_OPENSSL
3313DEFAULT: none
3314POSTSCRIPTUM: signUntrusted ssl::certUntrusted
3315POSTSCRIPTUM: signSelf ssl::certSelfSigned
3316POSTSCRIPTUM: signTrusted all
3317TYPE: sslproxy_cert_sign
3318LOC: Config.ssl_client.cert_sign
3319DOC_START
3320
3321 sslproxy_cert_sign <signing algorithm> acl ...
3322
3323 The following certificate signing algorithms are supported:
3324
3325 signTrusted
3326 Sign using the configured CA certificate which is usually
3327 placed in and trusted by end-user browsers. This is the
3328 default for trusted origin server certificates.
3329
3330 signUntrusted
3331 Sign to guarantee an X509_V_ERR_CERT_UNTRUSTED browser error.
3332 This is the default for untrusted origin server certificates
3333 that are not self-signed (see ssl::certUntrusted).
3334
3335 signSelf
3336 Sign using a self-signed certificate with the right CN to
3337 generate a X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT error in the
3338 browser. This is the default for self-signed origin server
3339 certificates (see ssl::certSelfSigned).
3340
3341 This clause only supports fast acl types.
3342
3343 When sslproxy_cert_sign acl(s) match, Squid uses the corresponding
3344 signing algorithm to generate the certificate and ignores all
3345 subsequent sslproxy_cert_sign options (the first match wins). If no
3346 acl(s) match, the default signing algorithm is determined by errors
3347 detected when obtaining and validating the origin server certificate.
3348
3349 WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can
3350 be used with sslproxy_cert_adapt, but if and only if Squid is bumping a
3351 CONNECT request that carries a domain name. In all other cases (CONNECT
3352 to an IP address or an intercepted SSL connection), Squid cannot detect
3353 the domain mismatch at certificate generation time when
3354 bump-server-first is used.
3355DOC_END
3356
3357NAME: sslproxy_cert_adapt
3358IFDEF: USE_OPENSSL
3359DEFAULT: none
3360TYPE: sslproxy_cert_adapt
3361LOC: Config.ssl_client.cert_adapt
3362DOC_START
3363
3364 sslproxy_cert_adapt <adaptation algorithm> acl ...
3365
3366 The following certificate adaptation algorithms are supported:
3367
3368 setValidAfter
3369 Sets the "Not After" property to the "Not After" property of
3370 the CA certificate used to sign generated certificates.
3371
3372 setValidBefore
3373 Sets the "Not Before" property to the "Not Before" property of
3374 the CA certificate used to sign generated certificates.
3375
3376 setCommonName or setCommonName{CN}
3377 Sets Subject.CN property to the host name specified as a
3378 CN parameter or, if no explicit CN parameter was specified,
3379 extracted from the CONNECT request. It is a misconfiguration
3380 to use setCommonName without an explicit parameter for
3381 intercepted or tproxied SSL connections.
3382
3383 This clause only supports fast acl types.
3384
3385 Squid first groups sslproxy_cert_adapt options by adaptation algorithm.
3386 Within a group, when sslproxy_cert_adapt acl(s) match, Squid uses the
3387 corresponding adaptation algorithm to generate the certificate and
3388 ignores all subsequent sslproxy_cert_adapt options in that algorithm's
3389 group (i.e., the first match wins within each algorithm group). If no
3390 acl(s) match, the default mimicking action takes place.
3391
3392 WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can
3393 be used with sslproxy_cert_adapt, but if and only if Squid is bumping a
3394 CONNECT request that carries a domain name. In all other cases (CONNECT
3395 to an IP address or an intercepted SSL connection), Squid cannot detect
3396 the domain mismatch at certificate generation time when
3397 bump-server-first is used.
3398DOC_END
3399
3400NAME: sslpassword_program
3401IFDEF: USE_OPENSSL
3402DEFAULT: none
3403LOC: Config.Program.ssl_password
3404TYPE: string
3405DOC_START
3406 Specify a program used for entering SSL key passphrases
3407 when using encrypted SSL certificate keys. If not specified
3408 keys must either be unencrypted, or Squid started with the -N
3409 option to allow it to query interactively for the passphrase.
3410
3411 The key file name is given as argument to the program allowing
3412 selection of the right password if you have multiple encrypted
3413 keys.
3414DOC_END
3415
3416COMMENT_START
3417 OPTIONS RELATING TO EXTERNAL SSL_CRTD
3418 -----------------------------------------------------------------------------
3419COMMENT_END
3420
3421NAME: sslcrtd_program
3422TYPE: eol
3423IFDEF: USE_SSL_CRTD
3424DEFAULT: @DEFAULT_SSL_CRTD@ -s @DEFAULT_SSL_DB_DIR@ -M 4MB
3425LOC: Ssl::TheConfig.ssl_crtd
3426DOC_START
3427 Specify the location and options of the executable for certificate
3428 generator.
3429
3430 @DEFAULT_SSL_CRTD@ program can use a disk cache to improve response
3431 times on repeated requests. To enable caching, specify -s and -M
3432 parameters. If those parameters are not given, the program generates
3433 a new certificate on every request.
3434
3435 For more information use:
3436 @DEFAULT_SSL_CRTD@ -h
3437DOC_END
3438
3439NAME: sslcrtd_children
3440TYPE: HelperChildConfig
3441IFDEF: USE_SSL_CRTD
3442DEFAULT: 32 startup=5 idle=1
3443LOC: Ssl::TheConfig.ssl_crtdChildren
3444DOC_START
3445 Specifies the maximum number of certificate generation processes that
3446 Squid may spawn (numberofchildren) and several related options. Using
3447 too few of these helper processes (a.k.a. "helpers") creates request
3448 queues. Using too many helpers wastes your system resources. Squid
3449 does not support spawning more than 32 helpers.
3450
3451 Usage: numberofchildren [option]...
3452
3453 The startup= and idle= options allow some measure of skew in your
3454 tuning.
3455
3456 startup=N
3457
3458 Sets the minimum number of processes to spawn when Squid
3459 starts or reconfigures. When set to zero the first request will
3460 cause spawning of the first child process to handle it.
3461
3462 Starting too few children temporary slows Squid under load while it
3463 tries to spawn enough additional processes to cope with traffic.
3464
3465 idle=N
3466
3467 Sets a minimum of how many processes Squid is to try and keep available
3468 at all times. When traffic begins to rise above what the existing
3469 processes can handle this many more will be spawned up to the maximum
3470 configured. A minimum setting of 1 is required.
3471
3472 queue-size=N
3473
3474 Sets the maximum number of queued requests. A request is queued when
3475 no existing child is idle and no new child can be started due to
3476 numberofchildren limit. If the queued requests exceed queue size for
3477 more than 3 minutes squid aborts its operation. The default value is
3478 set to 2*numberofchildren.
3479
3480 You must have at least one ssl_crtd process.
3481DOC_END
3482
3483NAME: sslcrtvalidator_program
3484TYPE: eol
3485IFDEF: USE_OPENSSL
3486DEFAULT: none
3487LOC: Ssl::TheConfig.ssl_crt_validator
3488DOC_START
3489 Specify the location and options of the executable for ssl_crt_validator
3490 process.
3491
3492 Usage: sslcrtvalidator_program [ttl=...] [cache=n] path ...
3493
3494 Options:
3495
3496 cache=bytes
3497 Limits how much memory Squid can use for caching validator
3498 responses. The default is 67108864 (i.e. 64 MB).
3499 Reconfiguration purges any excess entries. To disable caching,
3500 use cache=0. Currently, cache entry sizes are seriously
3501 underestimated. Even with that bug, a typical estimate for a
3502 single cache entry size would be at least a few kilobytes (the
3503 size of the PEM certificates sent to the validator).
3504
3505 ttl=<seconds|"infinity">
3506 Approximately how long Squid may reuse the validator results
3507 for. The default is 3600 (i.e. 1 hour). Using ttl=infinity
3508 disables TTL checks. Reconfiguration does not affect TTLs of
3509 the already cached entries. To disable caching, use zero cache
3510 size, not zero TTL -- zero TTL allows reuse for the remainder
3511 of the second when the result was cached.
3512DOC_END
3513
3514NAME: sslcrtvalidator_children
3515TYPE: HelperChildConfig
3516IFDEF: USE_OPENSSL
3517DEFAULT: 32 startup=5 idle=1 concurrency=1
3518LOC: Ssl::TheConfig.ssl_crt_validator_Children
3519DOC_START
3520 Specifies the maximum number of certificate validation processes that
3521 Squid may spawn (numberofchildren) and several related options. Using
3522 too few of these helper processes (a.k.a. "helpers") creates request
3523 queues. Using too many helpers wastes your system resources. Squid
3524 does not support spawning more than 32 helpers.
3525
3526 Usage: numberofchildren [option]...
3527
3528 The startup= and idle= options allow some measure of skew in your
3529 tuning.
3530
3531 startup=N
3532
3533 Sets the minimum number of processes to spawn when Squid
3534 starts or reconfigures. When set to zero the first request will
3535 cause spawning of the first child process to handle it.
3536
3537 Starting too few children temporary slows Squid under load while it
3538 tries to spawn enough additional processes to cope with traffic.
3539
3540 idle=N
3541
3542 Sets a minimum of how many processes Squid is to try and keep available
3543 at all times. When traffic begins to rise above what the existing
3544 processes can handle this many more will be spawned up to the maximum
3545 configured. A minimum setting of 1 is required.
3546
3547 concurrency=
3548
3549 The number of requests each certificate validator helper can handle in
3550 parallel. A value of 0 indicates the certificate validator does not
3551 support concurrency. Defaults to 1.
3552
3553 When this directive is set to a value >= 1 then the protocol
3554 used to communicate with the helper is modified to include
3555 a request ID in front of the request/response. The request
3556 ID from the request must be echoed back with the response
3557 to that request.
3558
3559 queue-size=N
3560
3561 Sets the maximum number of queued requests. A request is queued when
3562 no existing child can accept it due to concurrency limit and no new
3563 child can be started due to numberofchildren limit. If the queued
3564 requests exceed queue size for more than 3 minutes squid aborts its
3565 operation. The default value is set to 2*numberofchildren.
3566
3567 You must have at least one ssl_crt_validator process.
3568DOC_END
3569
3570COMMENT_START
3571 OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
3572 -----------------------------------------------------------------------------
3573COMMENT_END
3574
3575NAME: cache_peer
3576TYPE: peer
3577DEFAULT: none
3578LOC: Config.peers
3579DOC_START
3580 To specify other caches in a hierarchy, use the format:
3581
3582 cache_peer hostname type http-port icp-port [options]
3583
3584 For example,
3585
3586 # proxy icp
3587 # hostname type port port options
3588 # -------------------- -------- ----- ----- -----------
3589 cache_peer parent.foo.net parent 3128 3130 default
3590 cache_peer sib1.foo.net sibling 3128 3130 proxy-only
3591 cache_peer sib2.foo.net sibling 3128 3130 proxy-only
3592 cache_peer example.com parent 80 0 default
3593 cache_peer cdn.example.com sibling 3128 0
3594
3595 type: either 'parent', 'sibling', or 'multicast'.
3596
3597 proxy-port: The port number where the peer accept HTTP requests.
3598 For other Squid proxies this is usually 3128
3599 For web servers this is usually 80
3600
3601 icp-port: Used for querying neighbor caches about objects.
3602 Set to 0 if the peer does not support ICP or HTCP.
3603 See ICP and HTCP options below for additional details.
3604
3605
3606 ==== ICP OPTIONS ====
3607
3608 You MUST also set icp_port and icp_access explicitly when using these options.
3609 The defaults will prevent peer traffic using ICP.
3610
3611
3612 no-query Disable ICP queries to this neighbor.
3613
3614 multicast-responder
3615 Indicates the named peer is a member of a multicast group.
3616 ICP queries will not be sent directly to the peer, but ICP
3617 replies will be accepted from it.
3618
3619 closest-only Indicates that, for ICP_OP_MISS replies, we'll only forward
3620 CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes.
3621
3622 background-ping
3623 To only send ICP queries to this neighbor infrequently.
3624 This is used to keep the neighbor round trip time updated
3625 and is usually used in conjunction with weighted-round-robin.
3626
3627
3628 ==== HTCP OPTIONS ====
3629
3630 You MUST also set htcp_port and htcp_access explicitly when using these options.
3631 The defaults will prevent peer traffic using HTCP.
3632
3633
3634 htcp Send HTCP, instead of ICP, queries to the neighbor.
3635 You probably also want to set the "icp-port" to 4827
3636 instead of 3130. This directive accepts a comma separated
3637 list of options described below.
3638
3639 htcp=oldsquid Send HTCP to old Squid versions (2.5 or earlier).
3640
3641 htcp=no-clr Send HTCP to the neighbor but without
3642 sending any CLR requests. This cannot be used with
3643 only-clr.
3644
3645 htcp=only-clr Send HTCP to the neighbor but ONLY CLR requests.
3646 This cannot be used with no-clr.
3647
3648 htcp=no-purge-clr
3649 Send HTCP to the neighbor including CLRs but only when
3650 they do not result from PURGE requests.
3651
3652 htcp=forward-clr
3653 Forward any HTCP CLR requests this proxy receives to the peer.
3654
3655
3656 ==== PEER SELECTION METHODS ====
3657
3658 The default peer selection method is ICP, with the first responding peer
3659 being used as source. These options can be used for better load balancing.
3660
3661
3662 default This is a parent cache which can be used as a "last-resort"
3663 if a peer cannot be located by any of the peer-selection methods.
3664 If specified more than once, only the first is used.
3665
3666 round-robin Load-Balance parents which should be used in a round-robin
3667 fashion in the absence of any ICP queries.
3668 weight=N can be used to add bias.
3669
3670 weighted-round-robin
3671 Load-Balance parents which should be used in a round-robin
3672 fashion with the frequency of each parent being based on the
3673 round trip time. Closer parents are used more often.
3674 Usually used for background-ping parents.
3675 weight=N can be used to add bias.
3676
3677 carp Load-Balance parents which should be used as a CARP array.
3678 The requests will be distributed among the parents based on the
3679 CARP load balancing hash function based on their weight.
3680
3681 userhash Load-balance parents based on the client proxy_auth username.
3682
3683 sourcehash Load-balance parents based on the client source IP.
3684
3685 multicast-siblings
3686 To be used only for cache peers of type "multicast".
3687 ALL members of this multicast group have "sibling"
3688 relationship with it, not "parent". This is to a multicast
3689 group when the requested object would be fetched only from
3690 a "parent" cache, anyway. It's useful, e.g., when
3691 configuring a pool of redundant Squid proxies, being
3692 members of the same multicast group.
3693
3694
3695 ==== PEER SELECTION OPTIONS ====
3696
3697 weight=N use to affect the selection of a peer during any weighted
3698 peer-selection mechanisms.
3699 The weight must be an integer; default is 1,
3700 larger weights are favored more.
3701 This option does not affect parent selection if a peering
3702 protocol is not in use.
3703
3704 basetime=N Specify a base amount to be subtracted from round trip
3705 times of parents.
3706 It is subtracted before division by weight in calculating
3707 which parent to fectch from. If the rtt is less than the
3708 base time the rtt is set to a minimal value.
3709
3710 ttl=N Specify a TTL to use when sending multicast ICP queries
3711 to this address.
3712 Only useful when sending to a multicast group.
3713 Because we don't accept ICP replies from random
3714 hosts, you must configure other group members as
3715 peers with the 'multicast-responder' option.
3716
3717 no-delay To prevent access to this neighbor from influencing the
3718 delay pools.
3719
3720 digest-url=URL Tell Squid to fetch the cache digest (if digests are
3721 enabled) for this host from the specified URL rather
3722 than the Squid default location.
3723
3724
3725 ==== CARP OPTIONS ====
3726
3727 carp-key=key-specification
3728 use a different key than the full URL to hash against the peer.
3729 the key-specification is a comma-separated list of the keywords
3730 scheme, host, port, path, params
3731 Order is not important.
3732
3733 ==== ACCELERATOR / REVERSE-PROXY OPTIONS ====
3734
3735 originserver Causes this parent to be contacted as an origin server.
3736 Meant to be used in accelerator setups when the peer
3737 is a web server.
3738
3739 forceddomain=name
3740 Set the Host header of requests forwarded to this peer.
3741 Useful in accelerator setups where the server (peer)
3742 expects a certain domain name but clients may request
3743 others. ie example.com or www.example.com
3744
3745 no-digest Disable request of cache digests.
3746
3747 no-netdb-exchange
3748 Disables requesting ICMP RTT database (NetDB).
3749
3750
3751 ==== AUTHENTICATION OPTIONS ====
3752
3753 login=user:password
3754 If this is a personal/workgroup proxy and your parent
3755 requires proxy authentication.
3756
3757 Note: The string can include URL escapes (i.e. %20 for
3758 spaces). This also means % must be written as %%.
3759
3760 login=PASSTHRU
3761 Send login details received from client to this peer.
3762 Both Proxy- and WWW-Authorization headers are passed
3763 without alteration to the peer.
3764 Authentication is not required by Squid for this to work.
3765
3766 Note: This will pass any form of authentication but
3767 only Basic auth will work through a proxy unless the
3768 connection-auth options are also used.
3769
3770 login=PASS Send login details received from client to this peer.
3771 Authentication is not required by this option.
3772
3773 If there are no client-provided authentication headers
3774 to pass on, but username and password are available
3775 from an external ACL user= and password= result tags
3776 they may be sent instead.
3777
3778 Note: To combine this with proxy_auth both proxies must
3779 share the same user database as HTTP only allows for
3780 a single login (one for proxy, one for origin server).
3781 Also be warned this will expose your users proxy
3782 password to the peer. USE WITH CAUTION
3783
3784 login=*:password
3785 Send the username to the upstream cache, but with a
3786 fixed password. This is meant to be used when the peer
3787 is in another administrative domain, but it is still
3788 needed to identify each user.
3789 The star can optionally be followed by some extra
3790 information which is added to the username. This can
3791 be used to identify this proxy to the peer, similar to
3792 the login=username:password option above.
3793
3794 login=NEGOTIATE
3795 If this is a personal/workgroup proxy and your parent
3796 requires a secure proxy authentication.
3797 The first principal from the default keytab or defined by
3798 the environment variable KRB5_KTNAME will be used.
3799
3800 WARNING: The connection may transmit requests from multiple
3801 clients. Negotiate often assumes end-to-end authentication
3802 and a single-client. Which is not strictly true here.
3803
3804 login=NEGOTIATE:principal_name
3805 If this is a personal/workgroup proxy and your parent
3806 requires a secure proxy authentication.
3807 The principal principal_name from the default keytab or
3808 defined by the environment variable KRB5_KTNAME will be
3809 used.
3810
3811 WARNING: The connection may transmit requests from multiple
3812 clients. Negotiate often assumes end-to-end authentication
3813 and a single-client. Which is not strictly true here.
3814
3815 connection-auth=on|off
3816 Tell Squid that this peer does or not support Microsoft
3817 connection oriented authentication, and any such
3818 challenges received from there should be ignored.
3819 Default is auto to automatically determine the status
3820 of the peer.
3821
3822 auth-no-keytab
3823 Do not use a keytab to authenticate to a peer when
3824 login=NEGOTIATE is specified. Let the GSSAPI
3825 implementation determine which already existing
3826 credentials cache to use instead.
3827
3828
3829 ==== SSL / HTTPS / TLS OPTIONS ====
3830
3831 tls Encrypt connections to this peer with TLS.
3832
3833 sslcert=/path/to/ssl/certificate
3834 A client X.509 certificate to use when connecting to
3835 this peer.
3836
3837 sslkey=/path/to/ssl/key
3838 The private key corresponding to sslcert above.
3839
3840 If sslkey= is not specified sslcert= is assumed to
3841 reference a PEM file containing both the certificate
3842 and private key.
3843
3844 sslcipher=... The list of valid SSL ciphers to use when connecting
3845 to this peer.
3846
3847 tls-min-version=1.N
3848 The minimum TLS protocol version to permit. To control
3849 SSLv3 use the tls-options= parameter.
3850 Supported Values: 1.0 (default), 1.1, 1.2
3851
3852 tls-options=... Specify various TLS implementation options.
3853
3854 OpenSSL options most important are:
3855
3856 NO_SSLv3 Disallow the use of SSLv3
3857
3858 SINGLE_DH_USE
3859 Always create a new key when using
3860 temporary/ephemeral DH key exchanges
3861
3862 NO_TICKET
3863 Disable use of RFC5077 session tickets.
3864 Some servers may have problems
3865 understanding the TLS extension due
3866 to ambiguous specification in RFC4507.
3867
3868 ALL Enable various bug workarounds
3869 suggested as "harmless" by OpenSSL
3870 Be warned that this reduces SSL/TLS
3871 strength to some attacks.
3872
3873 See the OpenSSL SSL_CTX_set_options documentation for a
3874 more complete list.
3875
3876 GnuTLS options most important are:
3877
3878 %NO_TICKETS
3879 Disable use of RFC5077 session tickets.
3880 Some servers may have problems
3881 understanding the TLS extension due
3882 to ambiguous specification in RFC4507.
3883
3884 See the GnuTLS Priority Strings documentation
3885 for a more complete list.
3886 http://www.gnutls.org/manual/gnutls.html#Priority-Strings
3887
3888 tls-cafile= PEM file containing CA certificates to use when verifying
3889 the peer certificate. May be repeated to load multiple files.
3890
3891 sslcapath=... A directory containing additional CA certificates to
3892 use when verifying the peer certificate.
3893 Requires OpenSSL or LibreSSL.
3894
3895 sslcrlfile=... A certificate revocation list file to use when
3896 verifying the peer certificate.
3897
3898 sslflags=... Specify various flags modifying the SSL implementation:
3899
3900 DONT_VERIFY_PEER
3901 Accept certificates even if they fail to
3902 verify.
3903
3904 DONT_VERIFY_DOMAIN
3905 Don't verify the peer certificate
3906 matches the server name
3907
3908 ssldomain= The peer name as advertised in it's certificate.
3909 Used for verifying the correctness of the received peer
3910 certificate. If not specified the peer hostname will be
3911 used.
3912
3913 front-end-https[=off|on|auto]
3914 Enable the "Front-End-Https: On" header needed when
3915 using Squid as a SSL frontend in front of Microsoft OWA.
3916 See MS KB document Q307347 for details on this header.
3917 If set to auto the header will only be added if the
3918 request is forwarded as a https:// URL.
3919
3920 tls-default-ca[=off]
3921 Whether to use the system Trusted CAs. Default is ON.
3922
3923 tls-no-npn Do not use the TLS NPN extension to advertise HTTP/1.1.
3924
3925 ==== GENERAL OPTIONS ====
3926
3927 connect-timeout=N
3928 A peer-specific connect timeout.
3929 Also see the peer_connect_timeout directive.
3930
3931 connect-fail-limit=N
3932 How many times connecting to a peer must fail before
3933 it is marked as down. Standby connection failures
3934 count towards this limit. Default is 10.
3935
3936 allow-miss Disable Squid's use of only-if-cached when forwarding
3937 requests to siblings. This is primarily useful when
3938 icp_hit_stale is used by the sibling. Excessive use
3939 of this option may result in forwarding loops. One way
3940 to prevent peering loops when using this option, is to
3941 deny cache peer usage on requests from a peer:
3942 acl fromPeer ...
3943 cache_peer_access peerName deny fromPeer
3944
3945 max-conn=N Limit the number of concurrent connections the Squid
3946 may open to this peer, including already opened idle
3947 and standby connections. There is no peer-specific
3948 connection limit by default.
3949
3950 A peer exceeding the limit is not used for new
3951 requests unless a standby connection is available.
3952
3953 max-conn currently works poorly with idle persistent
3954 connections: When a peer reaches its max-conn limit,
3955 and there are idle persistent connections to the peer,
3956 the peer may not be selected because the limiting code
3957 does not know whether Squid can reuse those idle
3958 connections.
3959
3960 standby=N Maintain a pool of N "hot standby" connections to an
3961 UP peer, available for requests when no idle
3962 persistent connection is available (or safe) to use.
3963 By default and with zero N, no such pool is maintained.
3964 N must not exceed the max-conn limit (if any).
3965
3966 At start or after reconfiguration, Squid opens new TCP
3967 standby connections until there are N connections
3968 available and then replenishes the standby pool as
3969 opened connections are used up for requests. A used
3970 connection never goes back to the standby pool, but
3971 may go to the regular idle persistent connection pool
3972 shared by all peers and origin servers.
3973
3974 Squid never opens multiple new standby connections
3975 concurrently. This one-at-a-time approach minimizes
3976 flooding-like effect on peers. Furthermore, just a few
3977 standby connections should be sufficient in most cases
3978 to supply most new requests with a ready-to-use
3979 connection.
3980
3981 Standby connections obey server_idle_pconn_timeout.
3982 For the feature to work as intended, the peer must be
3983 configured to accept and keep them open longer than
3984 the idle timeout at the connecting Squid, to minimize
3985 race conditions typical to idle used persistent
3986 connections. Default request_timeout and
3987 server_idle_pconn_timeout values ensure such a
3988 configuration.
3989
3990 name=xxx Unique name for the peer.
3991 Required if you have multiple cache_peers with the same hostname.
3992 Defaults to cache_peer hostname when not explicitly specified.
3993
3994 Other directives (e.g., cache_peer_access), cache manager reports,
3995 and cache.log messages use this name to refer to this cache_peer.
3996
3997 The cache_peer name value affects hashing-based peer selection
3998 methods (e.g., carp and sourcehash).
3999
4000 Can be used by outgoing access controls through the
4001 peername ACL type.
4002
4003 The name value preserves configured spelling, but name uniqueness
4004 checks and name-based search are case-insensitive.
4005
4006 no-tproxy Do not use the client-spoof TPROXY support when forwarding
4007 requests to this peer. Use normal address selection instead.
4008 This overrides the spoof_client_ip ACL.
4009
4010 proxy-only objects fetched from the peer will not be stored locally.
4011
4012DOC_END
4013
4014NAME: cache_peer_access
4015TYPE: peer_access
4016DEFAULT: none
4017DEFAULT_DOC: No peer usage restrictions.
4018LOC: none
4019DOC_START
4020 Restricts usage of cache_peer proxies.
4021
4022 Usage:
4023 cache_peer_access peer-name allow|deny [!]aclname ...
4024
4025 For the required peer-name parameter, use either the value of the
4026 cache_peer name=value parameter or, if name=value is missing, the
4027 cache_peer hostname parameter.
4028
4029 This directive narrows down the selection of peering candidates, but
4030 does not determine the order in which the selected candidates are
4031 contacted. That order is determined by the peer selection algorithms
4032 (see PEER SELECTION sections in the cache_peer documentation).
4033
4034 If a deny rule matches, the corresponding peer will not be contacted
4035 for the current transaction -- Squid will not send ICP queries and
4036 will not forward HTTP requests to that peer. An allow match leaves
4037 the corresponding peer in the selection. The first match for a given
4038 peer wins for that peer.
4039
4040 The relative order of cache_peer_access directives for the same peer
4041 matters. The relative order of any two cache_peer_access directives
4042 for different peers does not matter. To ease interpretation, it is a
4043 good idea to group cache_peer_access directives for the same peer
4044 together.
4045
4046 A single cache_peer_access directive may be evaluated multiple times
4047 for a given transaction because individual peer selection algorithms
4048 may check it independently from each other. These redundant checks
4049 may be optimized away in future Squid versions.
4050
4051 This clause only supports fast acl types.
4052 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4053
4054DOC_END
4055
4056NAME: neighbor_type_domain
4057TYPE: hostdomaintype
4058DEFAULT: none
4059DEFAULT_DOC: The peer type from cache_peer directive is used for all requests to that peer.
4060LOC: none
4061DOC_START
4062 Modify the cache_peer neighbor type when passing requests
4063 about specific domains to the peer.
4064
4065 Usage:
4066 neighbor_type_domain peer-name parent|sibling domain...
4067
4068 For the required peer-name parameter, use either the value of the
4069 cache_peer name=value parameter or, if name=value is missing, the
4070 cache_peer hostname parameter.
4071
4072 For example:
4073 cache_peer foo.example.com parent 3128 3130
4074 neighbor_type_domain foo.example.com sibling .au .de
4075
4076 The above configuration treats all requests to foo.example.com as a
4077 parent proxy unless the request is for a .au or .de ccTLD domain name.
4078DOC_END
4079
4080NAME: dead_peer_timeout
4081COMMENT: (seconds)
4082DEFAULT: 10 seconds
4083TYPE: time_t
4084LOC: Config.Timeout.deadPeer
4085DOC_START
4086 This controls how long Squid waits to declare a peer cache
4087 as "dead." If there are no ICP replies received in this
4088 amount of time, Squid will declare the peer dead and not
4089 expect to receive any further ICP replies. However, it
4090 continues to send ICP queries, and will mark the peer as
4091 alive upon receipt of the first subsequent ICP reply.
4092
4093 This timeout also affects when Squid expects to receive ICP
4094 replies from peers. If more than 'dead_peer' seconds have
4095 passed since the last ICP reply was received, Squid will not
4096 expect to receive an ICP reply on the next query. Thus, if
4097 your time between requests is greater than this timeout, you
4098 will see a lot of requests sent DIRECT to origin servers
4099 instead of to your parents.
4100DOC_END
4101
4102NAME: forward_max_tries
4103DEFAULT: 25
4104TYPE: int
4105LOC: Config.forward_max_tries
4106DOC_START
4107 Limits the number of attempts to forward the request.
4108
4109 For the purpose of this limit, Squid counts all high-level request
4110 forwarding attempts, including any same-destination retries after
4111 certain persistent connection failures and any attempts to use a
4112 different peer. However, these low-level attempts are not counted:
4113 * connection reopening attempts (enabled using connect_retries)
4114 * unfinished Happy Eyeballs connection attempts (prevented by setting
4115 happy_eyeballs_connect_limit to 0)
4116
4117 See also: forward_timeout, connect_retries, and %request_attempts.
4118DOC_END
4119
4120COMMENT_START
4121 MEMORY CACHE OPTIONS
4122 -----------------------------------------------------------------------------
4123COMMENT_END
4124
4125NAME: cache_mem
4126COMMENT: (bytes)
4127TYPE: b_size_t
4128DEFAULT: 256 MB
4129LOC: Config.memMaxSize
4130DOC_START
4131 NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
4132 IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
4133 USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
4134 THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
4135
4136 'cache_mem' specifies the ideal amount of memory to be used
4137 for:
4138 * In-Transit objects
4139 * Hot Objects
4140 * Negative-Cached objects
4141
4142 Data for these objects are stored in 4 KB blocks. This
4143 parameter specifies the ideal upper limit on the total size of
4144 4 KB blocks allocated. In-Transit objects take the highest
4145 priority.
4146
4147 In-transit objects have priority over the others. When
4148 additional space is needed for incoming data, negative-cached
4149 and hot objects will be released. In other words, the
4150 negative-cached and hot objects will fill up any unused space
4151 not needed for in-transit objects.
4152
4153 If circumstances require, this limit will be exceeded.
4154 Specifically, if your incoming request rate requires more than
4155 'cache_mem' of memory to hold in-transit objects, Squid will
4156 exceed this limit to satisfy the new requests. When the load
4157 decreases, blocks will be freed until the high-water mark is
4158 reached. Thereafter, blocks will be used to store hot
4159 objects.
4160
4161 If shared memory caching is enabled, Squid does not use the shared
4162 cache space for in-transit objects, but they still consume as much
4163 local memory as they need. For more details about the shared memory
4164 cache, see memory_cache_shared.
4165DOC_END
4166
4167NAME: maximum_object_size_in_memory
4168COMMENT: (bytes)
4169TYPE: b_size_t
4170DEFAULT: 512 KB
4171LOC: Config.Store.maxInMemObjSize
4172DOC_START
4173 Objects greater than this size will not be attempted to kept in
4174 the memory cache. This should be set high enough to keep objects
4175 accessed frequently in memory to improve performance whilst low
4176 enough to keep larger objects from hoarding cache_mem.
4177DOC_END
4178
4179NAME: memory_cache_shared
4180COMMENT: on|off
4181TYPE: YesNoNone
4182LOC: Config.memShared
4183DEFAULT: none
4184DEFAULT_DOC: "on" where supported if doing memory caching with multiple SMP workers.
4185DOC_START
4186 Controls whether the memory cache is shared among SMP workers.
4187
4188 The shared memory cache is meant to occupy cache_mem bytes and replace
4189 the non-shared memory cache, although some entities may still be
4190 cached locally by workers for now (e.g., internal and in-transit
4191 objects may be served from a local memory cache even if shared memory
4192 caching is enabled).
4193
4194 By default, the memory cache is shared if and only if all of the
4195 following conditions are satisfied: Squid runs in SMP mode with
4196 multiple workers, cache_mem is positive, and Squid environment
4197 supports required IPC primitives (e.g., POSIX shared memory segments
4198 and GCC-style atomic operations).
4199
4200 To avoid blocking locks, shared memory uses opportunistic algorithms
4201 that do not guarantee that every cachable entity that could have been
4202 shared among SMP workers will actually be shared.
4203DOC_END
4204
4205NAME: memory_cache_mode
4206TYPE: memcachemode
4207LOC: Config
4208DEFAULT: always
4209DEFAULT_DOC: Keep the most recently fetched objects in memory
4210DOC_START
4211 Controls which objects to keep in the memory cache (cache_mem)
4212
4213 always Keep most recently fetched objects in memory (default)
4214
4215 disk Only disk cache hits are kept in memory, which means
4216 an object must first be cached on disk and then hit
4217 a second time before cached in memory.
4218
4219 network Only objects fetched from network is kept in memory
4220DOC_END
4221
4222NAME: memory_replacement_policy
4223TYPE: removalpolicy
4224LOC: Config.memPolicy
4225DEFAULT: lru
4226DOC_START
4227 The memory replacement policy parameter determines which
4228 objects are purged from memory when memory space is needed.
4229
4230 See cache_replacement_policy for details on algorithms.
4231DOC_END
4232
4233COMMENT_START
4234 DISK CACHE OPTIONS
4235 -----------------------------------------------------------------------------
4236COMMENT_END
4237
4238NAME: cache_replacement_policy
4239TYPE: removalpolicy
4240LOC: Config.replPolicy
4241DEFAULT: lru
4242DOC_START
4243 The cache replacement policy parameter determines which
4244 objects are evicted (replaced) when disk space is needed.
4245
4246 lru : Squid's original list based LRU policy
4247 heap GDSF : Greedy-Dual Size Frequency
4248 heap LFUDA: Least Frequently Used with Dynamic Aging
4249 heap LRU : LRU policy implemented using a heap
4250
4251 Applies to any cache_dir lines listed below this directive.
4252
4253 The LRU policies keeps recently referenced objects.
4254
4255 The heap GDSF policy optimizes object hit rate by keeping smaller
4256 popular objects in cache so it has a better chance of getting a
4257 hit. It achieves a lower byte hit rate than LFUDA though since
4258 it evicts larger (possibly popular) objects.
4259
4260 The heap LFUDA policy keeps popular objects in cache regardless of
4261 their size and thus optimizes byte hit rate at the expense of
4262 hit rate since one large, popular object will prevent many
4263 smaller, slightly less popular objects from being cached.
4264
4265 Both policies utilize a dynamic aging mechanism that prevents
4266 cache pollution that can otherwise occur with frequency-based
4267 replacement policies.
4268
4269 NOTE: if using the LFUDA replacement policy you should increase
4270 the value of maximum_object_size above its default of 4 MB to
4271 to maximize the potential byte hit rate improvement of LFUDA.
4272
4273 For more information about the GDSF and LFUDA cache replacement
4274 policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
4275 and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
4276DOC_END
4277
4278NAME: minimum_object_size
4279COMMENT: (bytes)
4280TYPE: b_int64_t
4281DEFAULT: 0 KB
4282DEFAULT_DOC: no limit
4283LOC: Config.Store.minObjectSize
4284DOC_START
4285 Objects smaller than this size will NOT be saved on disk. The
4286 value is specified in bytes, and the default is 0 KB, which
4287 means all responses can be stored.
4288DOC_END
4289
4290NAME: maximum_object_size
4291COMMENT: (bytes)
4292TYPE: b_int64_t
4293DEFAULT: 4 MB
4294LOC: Config.Store.maxObjectSize
4295DOC_START
4296 Set the default value for max-size parameter on any cache_dir.
4297 The value is specified in bytes, and the default is 4 MB.
4298
4299 If you wish to get a high BYTES hit ratio, you should probably
4300 increase this (one 32 MB object hit counts for 3200 10KB
4301 hits).
4302
4303 If you wish to increase hit ratio more than you want to
4304 save bandwidth you should leave this low.
4305
4306 NOTE: if using the LFUDA replacement policy you should increase
4307 this value to maximize the byte hit rate improvement of LFUDA!
4308 See cache_replacement_policy for a discussion of this policy.
4309DOC_END
4310
4311NAME: cache_dir
4312TYPE: cachedir
4313DEFAULT: none
4314DEFAULT_DOC: No disk cache. Store cache objects only in memory.
4315LOC: Config.cacheSwap
4316DOC_START
4317 Format:
4318 cache_dir Type Directory-Name Fs-specific-data [options]
4319
4320 You can specify multiple cache_dir lines to spread the
4321 cache among different disk partitions.
4322
4323 Type specifies the kind of storage system to use. Only "ufs"
4324 is built by default. To enable any of the other storage systems
4325 see the --enable-storeio configure option.
4326
4327 'Directory' is a top-level directory where cache swap
4328 files will be stored. If you want to use an entire disk
4329 for caching, this can be the mount-point directory.
4330 The directory must exist and be writable by the Squid
4331 process. Squid will NOT create this directory for you.
4332
4333 Rock is currently the only SMP-aware cache_dir type. Using other
4334 store types in configurations with multiple workers is not
4335 supported and may lead to HTTP violations or undefined behavior,
4336 even when each such cache_dir is given a dedicated worker using
4337 configuration conditionals.
4338
4339
4340 ==== The ufs store type ====
4341
4342 "ufs" is the old well-known Squid storage format that has always
4343 been there.
4344
4345 Usage:
4346 cache_dir ufs Directory-Name Mbytes L1 L2 [options]
4347
4348 'Mbytes' is the amount of disk space (MB) to use under this
4349 directory. The default is 100 MB. Change this to suit your
4350 configuration. Do NOT put the size of your disk drive here.
4351 Instead, if you want Squid to use the entire disk drive,
4352 subtract 20% and use that value.
4353
4354 'L1' is the number of first-level subdirectories which
4355 will be created under the 'Directory'. The default is 16.
4356
4357 'L2' is the number of second-level subdirectories which
4358 will be created under each first-level directory. The default
4359 is 256.
4360
4361
4362 ==== The aufs store type ====
4363
4364 "aufs" uses the same storage format as "ufs", utilizing
4365 POSIX-threads to avoid blocking the main Squid process on
4366 disk-I/O. This was formerly known in Squid as async-io.
4367
4368 Usage:
4369 cache_dir aufs Directory-Name Mbytes L1 L2 [options]
4370
4371 see argument descriptions under ufs above
4372
4373
4374 ==== The diskd store type ====
4375
4376 "diskd" uses the same storage format as "ufs", utilizing a
4377 separate process to avoid blocking the main Squid process on
4378 disk-I/O.
4379
4380 Usage:
4381 cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
4382
4383 see argument descriptions under ufs above
4384
4385 Q1 specifies the number of unacknowledged I/O requests when Squid
4386 stops opening new files. If this many messages are in the queues,
4387 Squid won't open new files. Default is 64
4388
4389 Q2 specifies the number of unacknowledged messages when Squid
4390 starts blocking. If this many messages are in the queues,
4391 Squid blocks until it receives some replies. Default is 72
4392
4393 When Q1 < Q2 (the default), the cache directory is optimized
4394 for lower response time at the expense of a decrease in hit
4395 ratio. If Q1 > Q2, the cache directory is optimized for
4396 higher hit ratio at the expense of an increase in response
4397 time.
4398
4399
4400 ==== The rock store type ====
4401
4402 Usage:
4403 cache_dir rock Directory-Name Mbytes [options]
4404
4405 The Rock Store type is a database-style storage. All cached
4406 entries are stored in a "database" file, using fixed-size slots.
4407 A single entry occupies one or more slots.
4408
4409 If possible, Squid using Rock Store creates a dedicated kid
4410 process called "disker" to avoid blocking Squid worker(s) on disk
4411 I/O. One disker kid is created for each rock cache_dir. Diskers
4412 are created only when Squid, running in daemon mode, has support
4413 for the IpcIo disk I/O module.
4414
4415 swap-timeout=msec: Squid will not start writing a miss to or
4416 reading a hit from disk if it estimates that the swap operation
4417 will take more than the specified number of milliseconds. By
4418 default and when set to zero, disables the disk I/O time limit
4419 enforcement. Ignored when using blocking I/O module because
4420 blocking synchronous I/O does not allow Squid to estimate the
4421 expected swap wait time.
4422
4423 max-swap-rate=swaps/sec: Artificially limits disk access using
4424 the specified I/O rate limit. Swap out requests that
4425 would cause the average I/O rate to exceed the limit are
4426 delayed. Individual swap in requests (i.e., hits or reads) are
4427 not delayed, but they do contribute to measured swap rate and
4428 since they are placed in the same FIFO queue as swap out
4429 requests, they may wait longer if max-swap-rate is smaller.
4430 This is necessary on file systems that buffer "too
4431 many" writes and then start blocking Squid and other processes
4432 while committing those writes to disk. Usually used together
4433 with swap-timeout to avoid excessive delays and queue overflows
4434 when disk demand exceeds available disk "bandwidth". By default
4435 and when set to zero, disables the disk I/O rate limit
4436 enforcement. Currently supported by IpcIo module only.
4437
4438 slot-size=bytes: The size of a database "record" used for
4439 storing cached responses. A cached response occupies at least
4440 one slot and all database I/O is done using individual slots so
4441 increasing this parameter leads to more disk space waste while
4442 decreasing it leads to more disk I/O overheads. Should be a
4443 multiple of your operating system I/O page size. Defaults to
4444 16KBytes. A housekeeping header is stored with each slot and
4445 smaller slot-sizes will be rejected. The header is smaller than
4446 100 bytes.
4447
4448
4449 ==== COMMON OPTIONS ====
4450
4451 no-store no new objects should be stored to this cache_dir.
4452
4453 min-size=n the minimum object size in bytes this cache_dir
4454 will accept. It's used to restrict a cache_dir
4455 to only store large objects (e.g. AUFS) while
4456 other stores are optimized for smaller objects
4457 (e.g. Rock).
4458 Defaults to 0.
4459
4460 max-size=n the maximum object size in bytes this cache_dir
4461 supports.
4462 The value in maximum_object_size directive sets
4463 the default unless more specific details are
4464 available (ie a small store capacity).
4465
4466 Note: To make optimal use of the max-size limits you should order
4467 the cache_dir lines with the smallest max-size value first.
4468
4469CONFIG_START
4470
4471# Uncomment and adjust the following to add a disk cache directory.
4472#cache_dir ufs @DEFAULT_SWAP_DIR@ 100 16 256
4473CONFIG_END
4474DOC_END
4475
4476NAME: store_dir_select_algorithm
4477TYPE: string
4478LOC: Config.store_dir_select_algorithm
4479DEFAULT: least-load
4480DOC_START
4481 How Squid selects which cache_dir to use when the response
4482 object will fit into more than one.
4483
4484 Regardless of which algorithm is used the cache_dir min-size
4485 and max-size parameters are obeyed. As such they can affect
4486 the selection algorithm by limiting the set of considered
4487 cache_dir.
4488
4489 Algorithms:
4490
4491 least-load
4492
4493 This algorithm is suited to caches with similar cache_dir
4494 sizes and disk speeds.
4495
4496 The disk with the least I/O pending is selected.
4497 When there are multiple disks with the same I/O load ranking
4498 the cache_dir with most available capacity is selected.
4499
4500 When a mix of cache_dir sizes are configured the faster disks
4501 have a naturally lower I/O loading and larger disks have more
4502 capacity. So space used to store objects and data throughput
4503 may be very unbalanced towards larger disks.
4504
4505
4506 round-robin
4507
4508 This algorithm is suited to caches with unequal cache_dir
4509 disk sizes.
4510
4511 Each cache_dir is selected in a rotation. The next suitable
4512 cache_dir is used.
4513
4514 Available cache_dir capacity is only considered in relation
4515 to whether the object will fit and meets the min-size and
4516 max-size parameters.
4517
4518 Disk I/O loading is only considered to prevent overload on slow
4519 disks. This algorithm does not spread objects by size, so any
4520 I/O loading per-disk may appear very unbalanced and volatile.
4521
4522 If several cache_dirs use similar min-size, max-size, or other
4523 limits to to reject certain responses, then do not group such
4524 cache_dir lines together, to avoid round-robin selection bias
4525 towards the first cache_dir after the group. Instead, interleave
4526 cache_dir lines from different groups. For example:
4527
4528 store_dir_select_algorithm round-robin
4529 cache_dir rock /hdd1 ... min-size=100000
4530 cache_dir rock /ssd1 ... max-size=99999
4531 cache_dir rock /hdd2 ... min-size=100000
4532 cache_dir rock /ssd2 ... max-size=99999
4533 cache_dir rock /hdd3 ... min-size=100000
4534 cache_dir rock /ssd3 ... max-size=99999
4535DOC_END
4536
4537NAME: paranoid_hit_validation
4538COMMENT: time-units-small
4539TYPE: time_nanoseconds
4540DEFAULT: 0
4541DEFAULT_DOC: validation disabled
4542LOC: Config.paranoid_hit_validation
4543DOC_START
4544 Controls whether Squid should perform paranoid validation of cache entry
4545 metadata integrity every time a cache entry is hit. This low-level
4546 validation should always succeed. Each failed validation results in a
4547 cache miss, a BUG line reported to cache.log, and the invalid entry
4548 marked as unusable (and eventually purged from the cache).
4549
4550 Squid can only validate shared cache memory and rock cache_dir entries.
4551
4552 * Zero (default) value means that the validation is disabled.
4553
4554 * Positive values enable validation:
4555 - values less than 1 day approximate the maximum time that Squid is allowed
4556 to spend validating a single cache hit.
4557 - values greater or equal to 1 day are considered as no limitation:
4558 in this case all checks will be performed, regardless of how much time
4559 they take.
4560
4561 Hits are usually stored using 16KB slots (for rock, the size is
4562 configurable via cache_dir slot-size). Larger hits require scanning more
4563 slots and, hence, take more time. When validation is enabled, at least one
4564 slot is always validated, regardless of the configured time limit.
4565
4566 A worker process validating an entry cannot do anything else (i.e. the
4567 validation is blocking). The validation overhead is environment dependent,
4568 but developers have observed Squid spending 3-10 microseconds to check each
4569 slot of a Rock or shared memory hit entry. If Squid cuts validation short
4570 because it runs out of configured time, it treats the entry as valid.
4571
4572 When hit validation is enabled, its statistics is included in Cache
4573 Manager mgr:counters, mgr:5min, and mgr:60min reports.
4574DOC_END
4575
4576NAME: max_open_disk_fds
4577TYPE: int
4578LOC: Config.max_open_disk_fds
4579DEFAULT: 0
4580DEFAULT_DOC: no limit
4581DOC_START
4582 To avoid having disk as the I/O bottleneck Squid can optionally
4583 bypass the on-disk cache if more than this amount of disk file
4584 descriptors are open.
4585
4586 A value of 0 indicates no limit.
4587DOC_END
4588
4589NAME: cache_swap_low
4590COMMENT: (percent, 0-100)
4591TYPE: int
4592DEFAULT: 90
4593LOC: Config.Swap.lowWaterMark
4594DOC_START
4595 The low-water mark for AUFS/UFS/diskd cache object eviction by
4596 the cache_replacement_policy algorithm.
4597
4598 Removal begins when the swap (disk) usage of a cache_dir is
4599 above this low-water mark and attempts to maintain utilization
4600 near the low-water mark.
4601
4602 As swap utilization increases towards the high-water mark set
4603 by cache_swap_high object eviction becomes more aggressive.
4604
4605 The value difference in percentages between low- and high-water
4606 marks represent an eviction rate of 300 objects per second and
4607 the rate continues to scale in aggressiveness by multiples of
4608 this above the high-water mark.
4609
4610 Defaults are 90% and 95%. If you have a large cache, 5% could be
4611 hundreds of MB. If this is the case you may wish to set these
4612 numbers closer together.
4613
4614 See also cache_swap_high and cache_replacement_policy
4615DOC_END
4616
4617NAME: cache_swap_high
4618COMMENT: (percent, 0-100)
4619TYPE: int
4620DEFAULT: 95
4621LOC: Config.Swap.highWaterMark
4622DOC_START
4623 The high-water mark for AUFS/UFS/diskd cache object eviction by
4624 the cache_replacement_policy algorithm.
4625
4626 Removal begins when the swap (disk) usage of a cache_dir is
4627 above the low-water mark set by cache_swap_low and attempts to
4628 maintain utilization near the low-water mark.
4629
4630 As swap utilization increases towards this high-water mark object
4631 eviction becomes more aggressive.
4632
4633 The value difference in percentages between low- and high-water
4634 marks represent an eviction rate of 300 objects per second and
4635 the rate continues to scale in aggressiveness by multiples of
4636 this above the high-water mark.
4637
4638 Defaults are 90% and 95%. If you have a large cache, 5% could be
4639 hundreds of MB. If this is the case you may wish to set these
4640 numbers closer together.
4641
4642 See also cache_swap_low and cache_replacement_policy
4643DOC_END
4644
4645COMMENT_START
4646 LOGFILE OPTIONS
4647 -----------------------------------------------------------------------------
4648COMMENT_END
4649
4650NAME: logformat
4651TYPE: logformat
4652LOC: Log::TheConfig
4653DEFAULT: none
4654DEFAULT_DOC: The format definitions squid, common, combined, referrer, useragent are built in.
4655DOC_START
4656 Usage:
4657
4658 logformat <name> <format specification>
4659
4660 Defines an access log format.
4661
4662 The <format specification> is a string with embedded % format codes
4663
4664 % format codes all follow the same basic structure where all
4665 components but the formatcode are optional and usually unnecessary,
4666 especially when dealing with common codes.
4667
4668 % [encoding] [-] [[0]width] [{arg}] formatcode [{arg}]
4669
4670 encoding escapes or otherwise protects "special" characters:
4671
4672 " Quoted string encoding where quote(") and
4673 backslash(\) characters are \-escaped while
4674 CR, LF, and TAB characters are encoded as \r,
4675 \n, and \t two-character sequences.
4676
4677 [ Custom Squid encoding where percent(%), square
4678 brackets([]), backslash(\) and characters with
4679 codes outside of [32,126] range are %-encoded.
4680 SP is not encoded. Used by log_mime_hdrs.
4681
4682 # URL encoding (a.k.a. percent-encoding) where
4683 all URL unsafe and control characters (per RFC
4684 1738) are %-encoded.
4685
4686 / Shell-like encoding where quote(") and
4687 backslash(\) characters are \-escaped while CR
4688 and LF characters are encoded as \r and \n
4689 two-character sequences. Values containing SP
4690 character(s) are surrounded by quotes(").
4691
4692 ' Raw/as-is encoding with no escaping/quoting.
4693
4694 Default encoding: When no explicit encoding is
4695 specified, each %code determines its own encoding.
4696 Most %codes use raw/as-is encoding, but some codes use
4697 a so called "pass-through URL encoding" where all URL
4698 unsafe and control characters (per RFC 1738) are
4699 %-encoded, but the percent character(%) is left as is.
4700
4701 - left aligned
4702
4703 width minimum and/or maximum field width:
4704 [width_min][.width_max]
4705 When minimum starts with 0, the field is zero-padded.
4706 String values exceeding maximum width are truncated.
4707
4708 {arg} argument such as header name etc. This field may be
4709 placed before or after the token, but not both at once.
4710
4711 Format codes:
4712
4713 % a literal % character
4714
4715 byte{value} Adds a single byte with the given value (e.g., %byte{10}
4716 adds an ASCII LF character a.k.a. "new line" or "\n"). The value
4717 parameter is required and must be a positive decimal integer not
4718 exceeding 255. Zero-valued bytes (i.e. ASCII NUL characters) are
4719 not yet supported.
4720
4721 sn Unique sequence number per log line entry
4722 err_code The ID of an error response served by Squid or
4723 a similar internal error identifier.
4724
4725 err_detail Additional err_code-dependent error information. Multiple
4726 details are separated by the plus sign ('+'). Admins should not
4727 rely on a particular detail listing order, the uniqueness of the
4728 entries, or individual detail text stability. All those properties
4729 depend on many unstable factors, including external libraries.
4730
4731 note The annotation specified by the argument. Also
4732 logs the adaptation meta headers set by the
4733 adaptation_meta configuration parameter.
4734 If no argument given all annotations logged.
4735 The argument may include a separator to use with
4736 annotation values:
4737 name[:separator]
4738 By default, multiple note values are separated with ","
4739 and multiple notes are separated with "\r\n".
4740 When logging named notes with %{name}note, the
4741 explicitly configured separator is used between note
4742 values. When logging all notes with %note, the
4743 explicitly configured separator is used between
4744 individual notes. There is currently no way to
4745 specify both value and notes separators when logging
4746 all notes with %note.
4747 master_xaction The master transaction identifier is an unsigned
4748 integer. These IDs are guaranteed to monotonically
4749 increase within a single worker process lifetime, with
4750 higher values corresponding to transactions that were
4751 accepted or initiated later. Due to current implementation
4752 deficiencies, some IDs are skipped (i.e. never logged).
4753 Concurrent workers and restarted workers use similar,
4754 overlapping sequences of master transaction IDs.
4755
4756 Connection related format codes:
4757
4758 >a Client source IP address
4759 >A Client FQDN
4760 >p Client source port
4761 >eui Client source EUI (MAC address, EUI-48 or EUI-64 identifier)
4762 >la Local IP address the client connected to
4763 >lp Local port number the client connected to
4764 >qos Client connection TOS/DSCP value set by Squid
4765 >nfmark Client connection netfilter packet MARK set by Squid
4766
4767 transport::>connection_id Identifies a transport connection
4768 accepted by Squid (e.g., a connection carrying the
4769 logged HTTP request). Currently, Squid only supports
4770 TCP transport connections.
4771
4772 The logged identifier is an unsigned integer. These
4773 IDs are guaranteed to monotonically increase within a
4774 single worker process lifetime, with higher values
4775 corresponding to connections that were accepted later.
4776 Many IDs are skipped (i.e. never logged). Concurrent
4777 workers and restarted workers use similar, partially
4778 overlapping sequences of IDs.
4779
4780 la Local listening IP address the client connection was connected to.
4781 lp Local listening port number the client connection was connected to.
4782
4783 <a Server IP address of the last server or peer connection
4784 <A Server FQDN or peer name
4785 <p Server port number of the last server or peer connection
4786 <la Local IP address of the last server or peer connection
4787 <lp Local port number of the last server or peer connection
4788 <qos Server connection TOS/DSCP value set by Squid
4789 <nfmark Server connection netfilter packet MARK set by Squid
4790
4791 >handshake Raw client handshake
4792 Initial client bytes received by Squid on a newly
4793 accepted TCP connection or inside a just established
4794 CONNECT tunnel. Squid stops accumulating handshake
4795 bytes as soon as the handshake parser succeeds or
4796 fails (determining whether the client is using the
4797 expected protocol).
4798
4799 For HTTP clients, the handshake is the request line.
4800 For TLS clients, the handshake consists of all TLS
4801 records up to and including the TLS record that
4802 contains the last byte of the first ClientHello
4803 message. For clients using an unsupported protocol,
4804 this field contains the bytes received by Squid at the
4805 time of the handshake parsing failure.
4806
4807 See the on_unsupported_protocol directive for more
4808 information on Squid handshake traffic expectations.
4809
4810 Current support is limited to these contexts:
4811 - http_port connections, but only when the
4812 on_unsupported_protocol directive is in use.
4813 - https_port connections (and CONNECT tunnels) that
4814 are subject to the ssl_bump peek or stare action.
4815
4816 To protect binary handshake data, this field is always
4817 base64-encoded (RFC 4648 Section 4). If logformat
4818 field encoding is configured, that encoding is applied
4819 on top of base64. Otherwise, the computed base64 value
4820 is recorded as is.
4821
4822 Time related format codes:
4823
4824 ts Seconds since epoch
4825 tu subsecond time (milliseconds)
4826 tl Local time. Optional strftime format argument
4827 default %d/%b/%Y:%H:%M:%S %z
4828 tg GMT time. Optional strftime format argument
4829 default %d/%b/%Y:%H:%M:%S %z
4830 tr Response time (milliseconds)
4831 dt Total time spent making DNS lookups (milliseconds)
4832 tS Approximate master transaction start time in
4833 <full seconds since epoch>.<fractional seconds> format.
4834 Currently, Squid considers the master transaction
4835 started when a complete HTTP request header initiating
4836 the transaction is received from the client. This is
4837 the same value that Squid uses to calculate transaction
4838 response time when logging %tr to access.log. Currently,
4839 Squid uses millisecond resolution for %tS values,
4840 similar to the default access.log "current time" field
4841 (%ts.%03tu).
4842
4843 busy_time Time spent in transaction-related code (nanoseconds)
4844 This cumulative measurement excludes periods of time when the
4845 transaction was waiting (e.g., for a server or helper response)
4846 while Squid worked on other transactions or was engaged in
4847 transaction-unrelated activities (e.g., generating a cache index).
4848 In other words, this measurement represents the total amount of
4849 physical time when Squid was busy working on this transaction.
4850
4851 WARNING: This measurement relies on Squid transaction context
4852 tracking features that currently have known context leak bugs and
4853 coverage gaps. Until those features are fully implemented, logged
4854 values may significantly understate or exaggerate actual times.
4855 Do not use this measurement unless you know it works in your case.
4856
4857 Access Control related format codes:
4858
4859 et Tag returned by external acl
4860 ea Log string returned by external acl
4861 un User name (any available)
4862 ul User name from authentication
4863 ue User name from external acl helper
4864 un A user name. Expands to the first available name
4865 from the following list of information sources:
4866 - authenticated user name, like %ul
4867 - user name supplied by an external ACL, like %ue
4868 - SSL client name, like %us
4869 credentials Client credentials. The exact meaning depends on
4870 the authentication scheme: For Basic authentication,
4871 it is the password; for Digest, the realm sent by the
4872 client; for NTLM and Negotiate, the client challenge
4873 or client credentials prefixed with "YR " or "KK ".
4874
4875 HTTP related format codes:
4876
4877 REQUEST
4878
4879 [http::]rm Request method (GET/POST etc)
4880 [http::]>rm Request method from client
4881 [http::]<rm Request method sent to server or peer
4882
4883 [http::]ru Request URL received (or computed) and sanitized
4884
4885 Logs request URI received from the client, a
4886 request adaptation service, or a request
4887 redirector (whichever was applied last).
4888
4889 Computed URLs are URIs of internally generated
4890 requests and various "error:..." URIs.
4891
4892 Honors strip_query_terms and uri_whitespace.
4893
4894 This field is not encoded by default. Encoding
4895 this field using variants of %-encoding will
4896 clash with uri_whitespace modifications that
4897 also use %-encoding.
4898
4899 [http::]>ru Request URL received from the client (or computed)
4900
4901 Computed URLs are URIs of internally generated
4902 requests and various "error:..." URIs.
4903
4904 Unlike %ru, this request URI is not affected
4905 by request adaptation, URL rewriting services,
4906 and strip_query_terms.
4907
4908 Honors uri_whitespace.
4909
4910 This field is using pass-through URL encoding
4911 by default. Encoding this field using other
4912 variants of %-encoding will clash with
4913 uri_whitespace modifications that also use
4914 %-encoding.
4915
4916 [http::]<ru Request URL sent to server or peer
4917 [http::]>rs Request URL scheme from client
4918 [http::]<rs Request URL scheme sent to server or peer
4919 [http::]>rd Request URL domain from client
4920 [http::]<rd Request URL domain sent to server or peer
4921 [http::]>rP Request URL port from client
4922 [http::]<rP Request URL port sent to server or peer
4923 [http::]rp Request URL path excluding hostname
4924 [http::]>rp Request URL path excluding hostname from client
4925 [http::]<rp Request URL path excluding hostname sent to server or peer
4926 [http::]rv Request protocol version
4927 [http::]>rv Request protocol version from client
4928 [http::]<rv Request protocol version sent to server or peer
4929
4930 [http::]>h Original received request header.
4931 Usually differs from the request header sent by
4932 Squid, although most fields are often preserved.
4933 Accepts optional header field name/value filter
4934 argument using name[:[separator]element] format.
4935 [http::]>ha Received request header after adaptation and
4936 redirection (pre-cache REQMOD vectoring point).
4937 Usually differs from the request header sent by
4938 Squid, although most fields are often preserved.
4939 Optional header name argument as for >h
4940
4941 RESPONSE
4942
4943 [http::]<Hs HTTP status code received from the next hop
4944 [http::]>Hs HTTP status code sent to the client
4945
4946 [http::]<h Reply header. Optional header name argument
4947 as for >h
4948
4949 [http::]mt MIME content type
4950
4951
4952 SIZE COUNTERS
4953
4954 [http::]st Total size of request + reply traffic with client
4955 [http::]>st Total size of request received from client.
4956 Excluding chunked encoding bytes.
4957 [http::]<st Total size of reply sent to client (after adaptation)
4958
4959 [http::]>sh Size of request headers received from client
4960 [http::]<sh Size of reply headers sent to client (after adaptation)
4961
4962 [http::]<sH Reply high offset sent
4963 [http::]<sS Upstream object size
4964
4965 [http::]<bs Number of HTTP-equivalent message body bytes
4966 received from the next hop, excluding chunked
4967 transfer encoding and control messages.
4968 Generated FTP listings are treated as
4969 received bodies.
4970
4971 TIMING
4972
4973 [http::]<pt Peer response time in milliseconds. The timer starts
4974 when the last request byte is sent to the next hop
4975 and stops when the last response byte is received.
4976 [http::]<tt Total time spent forwarding to origin servers or
4977 cache_peers (milliseconds).
4978
4979 The timer starts when Squid decides to forward the request (to
4980 an origin server or cache_peer) and peer selection begins. The
4981 timer stops when relevant forwarding activities (including any
4982 retries) end.
4983
4984 Between those two timer events, Squid may perform DNS lookups,
4985 query external ACL helpers, adapt responses using pre-cache
4986 RESPMOD services, and participate in other concurrent
4987 secondary activities. Most secondary activities increase
4988 peering time. In some cases, a secondary activity may start
4989 before the timer starts or end after the timer stops, leading
4990 to misleading results of simple computations like %<tt - %dt.
4991
4992 If this logformat %code is used before its timer starts, the
4993 corresponding measurement has no value (and the %code expands
4994 to a single dash ("-") character).
4995
4996 If this code is used while its timer is running, the time
4997 spent so far is used as the measurement value.
4998
4999 When Squid re-forwards the request (e.g., after certain cache
5000 revalidation failures), the timer may restart. In this case,
5001 the new measurement is added to the value accumulated from
5002 previous forwarding attempts. The time interval between
5003 forwarding attempts is not added to the final result.
5004
5005 Squid handling related format codes:
5006
5007 Ss Squid request status (TCP_MISS etc)
5008 Sh Squid hierarchy status (DEFAULT_PARENT etc)
5009
5010 [http::]request_attempts Number of request forwarding attempts
5011
5012 See forward_max_tries documentation that details what Squid counts
5013 as a forwarding attempt. Pure cache hits log zero, but cache hits
5014 that triggered HTTP cache revalidation log the number of attempts
5015 made when sending an internal revalidation request. DNS, ICMP,
5016 ICP, HTCP, ICAP, eCAP, helper, and other secondary requests
5017 sent by Squid as a part of a master transaction do not increment
5018 the counter logged for the received request.
5019
5020 SSL-related format codes:
5021
5022 ssl::bump_mode SslBump decision for the transaction:
5023
5024 For CONNECT requests that initiated bumping of
5025 a connection and for any request received on
5026 an already bumped connection, Squid logs the
5027 corresponding SslBump mode ("splice", "bump",
5028 "peek", "stare", "terminate", "server-first"
5029 or "client-first"). See the ssl_bump option
5030 for more information about these modes.
5031
5032 A "none" token is logged for requests that
5033 triggered "ssl_bump" ACL evaluation matching
5034 a "none" rule.
5035
5036 In all other cases, a single dash ("-") is
5037 logged.
5038
5039 ssl::>sni SSL client SNI sent to Squid.
5040
5041 ssl::>cert_subject
5042 The Subject field of the received client
5043 SSL certificate or a dash ('-') if Squid has
5044 received an invalid/malformed certificate or
5045 no certificate at all. Consider encoding the
5046 logged value because Subject often has spaces.
5047
5048 ssl::>cert_issuer
5049 The Issuer field of the received client
5050 SSL certificate or a dash ('-') if Squid has
5051 received an invalid/malformed certificate or
5052 no certificate at all. Consider encoding the
5053 logged value because Issuer often has spaces.
5054
5055 ssl::<cert_subject
5056 The Subject field of the received server
5057 TLS certificate or a dash ('-') if this is
5058 not available. Consider encoding the logged
5059 value because Subject often has spaces.
5060
5061 ssl::<cert_issuer
5062 The Issuer field of the received server
5063 TLS certificate or a dash ('-') if this is
5064 not available. Consider encoding the logged
5065 value because Issuer often has spaces.
5066
5067 ssl::<cert
5068 The received server x509 certificate in PEM
5069 format, including BEGIN and END lines (or a
5070 dash ('-') if the certificate is unavailable).
5071
5072 WARNING: Large certificates will exceed the
5073 current 8KB access.log record limit, resulting
5074 in truncated records. Such truncation usually
5075 happens in the middle of a record field. The
5076 limit applies to all access logging modules.
5077
5078 The logged certificate may have failed
5079 validation and may not be trusted by Squid.
5080 This field does not include any intermediate
5081 certificates that may have been received from
5082 the server or fetched during certificate
5083 validation process.
5084
5085 Currently, Squid only collects server
5086 certificates during step3 of SslBump
5087 processing; connections that were not subject
5088 to ssl_bump rules or that did not match a peek
5089 or stare rule at step2 will not have the
5090 server certificate information.
5091
5092 This field is using pass-through URL encoding
5093 by default.
5094
5095 ssl::<cert_errors
5096 The list of certificate validation errors
5097 detected by Squid (including OpenSSL and
5098 certificate validation helper components). The
5099 errors are listed in the discovery order. By
5100 default, the error codes are separated by ':'.
5101 Accepts an optional separator argument.
5102
5103 %ssl::>negotiated_version The negotiated TLS version of the
5104 client connection.
5105
5106 %ssl::<negotiated_version The negotiated TLS version of the
5107 last server or peer connection.
5108
5109 %ssl::>received_hello_version The TLS version of the Hello
5110 message received from TLS client.
5111
5112 %ssl::<received_hello_version The TLS version of the Hello
5113 message received from TLS server.
5114
5115 %ssl::>received_supported_version The maximum TLS version
5116 supported by the TLS client.
5117
5118 %ssl::<received_supported_version The maximum TLS version
5119 supported by the TLS server.
5120
5121 %ssl::>negotiated_cipher The negotiated cipher of the
5122 client connection.
5123
5124 %ssl::<negotiated_cipher The negotiated cipher of the
5125 last server or peer connection.
5126
5127 If ICAP is enabled, the following code becomes available (as
5128 well as ICAP log codes documented with the icap_log option):
5129
5130 icap::tt Total ICAP "blocking" time for the HTTP transaction. The
5131 timer ticks while Squid checks adaptation_access and while
5132 ICAP transaction(s) expect ICAP response headers, including
5133 the embedded adapted HTTP message headers (where applicable).
5134 This measurement is meant to estimate ICAP impact on HTTP
5135 transaction response times, but it does not currently account
5136 for slow ICAP response body delivery blocking HTTP progress.
5137
5138 Once Squid receives the final ICAP response headers (e.g.,
5139 ICAP 200 or 204) and the associated adapted HTTP message
5140 headers (if any) from the ICAP service, the corresponding ICAP
5141 transaction stops affecting this measurement, even though the
5142 transaction itself may continue for a long time (e.g., to
5143 finish sending the ICAP request and/or to finish receiving the
5144 ICAP response body).
5145
5146 When "blocking" sections of multiple concurrent ICAP
5147 transactions overlap in time, the overlapping segment is
5148 counted only once.
5149
5150 To see complete ICAP transaction response times (rather than
5151 the cumulative effect of their blocking sections) use the
5152 %adapt::all_trs logformat code or the icap_log directive.
5153
5154 If adaptation is enabled the following codes become available:
5155
5156 adapt::<last_h The header of the last ICAP response or
5157 meta-information from the last eCAP
5158 transaction related to the HTTP transaction.
5159 Like <h, accepts an optional header name
5160 argument.
5161
5162 adapt::sum_trs Summed adaptation transaction response
5163 times recorded as a comma-separated list in
5164 the order of transaction start time. Each time
5165 value is recorded as an integer number,
5166 representing response time of one or more
5167 adaptation (ICAP or eCAP) transaction in
5168 milliseconds. When a failed transaction is
5169 being retried or repeated, its time is not
5170 logged individually but added to the
5171 replacement (next) transaction. Lifetimes of individually
5172 listed adaptation transactions may overlap.
5173 See also: %icap::tt and %adapt::all_trs.
5174
5175 adapt::all_trs All adaptation transaction response times.
5176 Same as %adapt::sum_trs but response times of
5177 individual transactions are never added
5178 together. Instead, all transaction response
5179 times are recorded individually.
5180
5181 You can prefix adapt::*_trs format codes with adaptation
5182 service name in curly braces to record response time(s) specific
5183 to that service. For example: %{my_service}adapt::sum_trs
5184
5185 Format codes related to the PROXY protocol:
5186
5187 proxy_protocol::>h PROXY protocol header, including optional TLVs.
5188
5189 Supports the same field and element reporting/extraction logic
5190 as %http::>h. For configuration and reporting purposes, Squid
5191 maps each PROXY TLV to an HTTP header field: the TLV type
5192 (configured as a decimal integer) is the field name, and the
5193 TLV value is the field value. All TLVs of "LOCAL" connections
5194 (in PROXY protocol terminology) are currently skipped/ignored.
5195
5196 Squid also maps the following standard PROXY protocol header
5197 blocks to pseudo HTTP headers (their names use PROXY
5198 terminology and start with a colon, following HTTP tradition
5199 for pseudo headers): :command, :version, :src_addr, :dst_addr,
5200 :src_port, and :dst_port.
5201
5202 Without optional parameters, this logformat code logs
5203 pseudo headers and TLVs.
5204
5205 This format code uses pass-through URL encoding by default.
5206
5207 Example:
5208 # relay custom PROXY TLV #224 to adaptation services
5209 adaptation_meta Client-Foo "%proxy_protocol::>h{224}"
5210
5211 See also: %http::>h
5212
5213 The default formats available (which do not need re-defining) are:
5214
5215logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
5216logformat common %>a - %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh
5217logformat combined %>a - %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
5218logformat referrer %ts.%03tu %>a %{Referer}>h %ru
5219logformat useragent %>a [%tl] "%{User-Agent}>h"
5220
5221 NOTE: When the log_mime_hdrs directive is set to ON.
5222 The squid, common and combined formats have a safely encoded copy
5223 of the mime headers appended to each line within a pair of brackets.
5224
5225 NOTE: The common and combined formats are not quite true to the Apache definition.
5226 The logs from Squid contain an extra status and hierarchy code appended.
5227
5228DOC_END
5229
5230NAME: access_log cache_access_log
5231TYPE: access_log
5232LOC: Config.Log.accesslogs
5233DEFAULT_IF_NONE: daemon:@DEFAULT_ACCESS_LOG@ squid
5234DOC_START
5235 Configures whether and how Squid logs HTTP and ICP transactions.
5236 If access logging is enabled, a single line is logged for every
5237 matching HTTP or ICP request. The recommended directive formats are:
5238
5239 access_log <module>:<place> [option ...] [acl acl ...]
5240 access_log none [acl acl ...]
5241
5242 The following directive format is accepted but may be deprecated:
5243 access_log <module>:<place> [<logformat name> [acl acl ...]]
5244
5245 In most cases, the first ACL name must not contain the '=' character
5246 and should not be equal to an existing logformat name. You can always
5247 start with an 'all' ACL to work around those restrictions.
5248
5249 Will log to the specified module:place using the specified format (which
5250 must be defined in a logformat directive) those entries which match
5251 ALL the acl's specified (which must be defined in acl clauses).
5252 If no acl is specified, all requests will be logged to this destination.
5253
5254 ===== Available options for the recommended directive format =====
5255
5256 logformat=name Names log line format (either built-in or
5257 defined by a logformat directive). Defaults
5258 to 'squid'.
5259
5260 buffer-size=64KB Defines approximate buffering limit for log
5261 records (see buffered_logs). Squid should not
5262 keep more than the specified size and, hence,
5263 should flush records before the buffer becomes
5264 full to avoid overflows under normal
5265 conditions (the exact flushing algorithm is
5266 module-dependent though). The on-error option
5267 controls overflow handling.
5268
5269 on-error=die|drop Defines action on unrecoverable errors. The
5270 'drop' action ignores (i.e., does not log)
5271 affected log records. The default 'die' action
5272 kills the affected worker. The drop action
5273 support has not been tested for modules other
5274 than tcp.
5275
5276 rotate=N Specifies the number of log file rotations to
5277 make when you run 'squid -k rotate'. The default
5278 is to obey the logfile_rotate directive. Setting
5279 rotate=0 will disable the file name rotation,
5280 but the log files are still closed and re-opened.
5281 This will enable you to rename the logfiles
5282 yourself just before sending the rotate signal.
5283 Only supported by the stdio module.
5284
5285 ===== Modules Currently available =====
5286
5287 none Do not log any requests matching these ACL.
5288 Do not specify Place or logformat name.
5289
5290 stdio Write each log line to disk immediately at the completion of
5291 each request.
5292 Place: the filename and path to be written.
5293
5294 daemon Very similar to stdio. But instead of writing to disk the log
5295 line is passed to a daemon helper for asynchronous handling instead.
5296 Place: varies depending on the daemon.
5297
5298 log_file_daemon Place: the file name and path to be written.
5299
5300 syslog To log each request via syslog facility.
5301 Place: The syslog facility and priority level for these entries.
5302 Place Format: facility.priority
5303
5304 where facility could be any of:
5305 authpriv, daemon, local0 ... local7 or user.
5306
5307 And priority could be any of:
5308 err, warning, notice, info, debug.
5309
5310 udp To send each log line as text data to a UDP receiver.
5311 Place: The destination host name or IP and port.
5312 Place Format: //host:port
5313
5314 tcp To send each log line as text data to a TCP receiver.
5315 Lines may be accumulated before sending (see buffered_logs).
5316 Place: The destination host name or IP and port.
5317 Place Format: //host:port
5318
5319 Default:
5320 access_log daemon:@DEFAULT_ACCESS_LOG@ squid
5321DOC_END
5322
5323NAME: icap_log
5324TYPE: access_log
5325IFDEF: ICAP_CLIENT
5326LOC: Config.Log.icaplogs
5327DEFAULT: none
5328DOC_START
5329 ICAP log files record ICAP transaction summaries, one line per
5330 transaction.
5331
5332 The icap_log option format is:
5333 icap_log <filepath> [<logformat name> [acl acl ...]]
5334 icap_log none [acl acl ...]]
5335
5336 Please see access_log option documentation for details. The two
5337 kinds of logs share the overall configuration approach and many
5338 features.
5339
5340 ICAP processing of a single HTTP message or transaction may
5341 require multiple ICAP transactions. In such cases, multiple
5342 ICAP transaction log lines will correspond to a single access
5343 log line.
5344
5345 ICAP log supports many access.log logformat %codes. In ICAP context,
5346 HTTP message-related %codes are applied to the HTTP message embedded
5347 in an ICAP message. Logformat "%http::>..." codes are used for HTTP
5348 messages embedded in ICAP requests while "%http::<..." codes are used
5349 for HTTP messages embedded in ICAP responses. For example:
5350
5351 http::>h To-be-adapted HTTP message headers sent by Squid to
5352 the ICAP service. For REQMOD transactions, these are
5353 HTTP request headers. For RESPMOD, these are HTTP
5354 response headers, but Squid currently cannot log them
5355 (i.e., %http::>h will expand to "-" for RESPMOD).
5356
5357 http::<h Adapted HTTP message headers sent by the ICAP
5358 service to Squid (i.e., HTTP request headers in regular
5359 REQMOD; HTTP response headers in RESPMOD and during
5360 request satisfaction in REQMOD).
5361
5362 ICAP OPTIONS transactions do not embed HTTP messages.
5363
5364 Several logformat codes below deal with ICAP message bodies. An ICAP
5365 message body, if any, typically includes a complete HTTP message
5366 (required HTTP headers plus optional HTTP message body). When
5367 computing HTTP message body size for these logformat codes, Squid
5368 either includes or excludes chunked encoding overheads; see
5369 code-specific documentation for details.
5370
5371 For Secure ICAP services, all size-related information is currently
5372 computed before/after TLS encryption/decryption, as if TLS was not
5373 in use at all.
5374
5375 The following format codes are also available for ICAP logs:
5376
5377 icap::<A ICAP server IP address. Similar to <A.
5378
5379 icap::<service_name ICAP service name from the icap_service
5380 option in Squid configuration file.
5381
5382 icap::ru ICAP Request-URI. Similar to ru.
5383
5384 icap::rm ICAP request method (REQMOD, RESPMOD, or
5385 OPTIONS). Similar to existing rm.
5386
5387 icap::>st The total size of the ICAP request sent to the ICAP
5388 server (ICAP headers + ICAP body), including chunking
5389 metadata (if any).
5390
5391 icap::<st The total size of the ICAP response received from the
5392 ICAP server (ICAP headers + ICAP body), including
5393 chunking metadata (if any).
5394
5395 icap::<bs The size of the ICAP response body received from the
5396 ICAP server, excluding chunking metadata (if any).
5397
5398 icap::tr Transaction response time (in
5399 milliseconds). The timer starts when
5400 the ICAP transaction is created and
5401 stops when the transaction is completed.
5402 Similar to tr.
5403
5404 icap::tio Transaction I/O time (in milliseconds). The
5405 timer starts when the first ICAP request
5406 byte is scheduled for sending. The timers
5407 stops when the last byte of the ICAP response
5408 is received.
5409
5410 icap::to Transaction outcome: ICAP_ERR* for all
5411 transaction errors, ICAP_OPT for OPTION
5412 transactions, ICAP_ECHO for 204
5413 responses, ICAP_MOD for message
5414 modification, and ICAP_SAT for request
5415 satisfaction. Similar to Ss.
5416
5417 icap::Hs ICAP response status code. Similar to Hs.
5418
5419 icap::>h ICAP request header(s). Similar to >h.
5420
5421 icap::<h ICAP response header(s). Similar to <h.
5422
5423 The default ICAP log format, which can be used without an explicit
5424 definition, is called icap_squid:
5425
5426logformat icap_squid %ts.%03tu %6icap::tr %>A %icap::to/%03icap::Hs %icap::<st %icap::rm %icap::ru %un -/%icap::<A -
5427
5428 See also: logformat and %adapt::<last_h
5429DOC_END
5430
5431NAME: logfile_daemon
5432TYPE: string
5433DEFAULT: @DEFAULT_LOGFILED@
5434LOC: Log::TheConfig.logfile_daemon
5435DOC_START
5436 Specify the path to the logfile-writing daemon. This daemon is
5437 used to write the access and store logs, if configured.
5438
5439 Squid sends a number of commands to the log daemon:
5440 L<data>\n - logfile data
5441 R\n - rotate file
5442 T\n - truncate file
5443 O\n - reopen file
5444 F\n - flush file
5445 r<n>\n - set rotate count to <n>
5446 b<n>\n - 1 = buffer output, 0 = don't buffer output
5447
5448 No responses is expected.
5449DOC_END
5450
5451NAME: stats_collection
5452TYPE: acl_access
5453LOC: Config.accessList.stats_collection
5454DEFAULT: none
5455DEFAULT_DOC: Allow logging for all transactions.
5456COMMENT: allow|deny acl acl...
5457DOC_START
5458 This options allows you to control which requests gets accounted
5459 in performance counters.
5460
5461 This clause only supports fast acl types.
5462 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5463DOC_END
5464
5465NAME: cache_store_log
5466TYPE: string
5467DEFAULT: none
5468LOC: Config.Log.store
5469DOC_START
5470 Logs the activities of the storage manager. Shows which
5471 objects are ejected from the cache, and which objects are
5472 saved and for how long.
5473 There are not really utilities to analyze this data, so you can safely
5474 disable it (the default).
5475
5476 Store log uses modular logging outputs. See access_log for the list
5477 of modules supported.
5478
5479 Example:
5480 cache_store_log stdio:@DEFAULT_STORE_LOG@
5481 cache_store_log daemon:@DEFAULT_STORE_LOG@
5482DOC_END
5483
5484NAME: cache_swap_state cache_swap_log
5485TYPE: string
5486LOC: Config.Log.swap
5487DEFAULT: none
5488DEFAULT_DOC: Store the journal inside its cache_dir
5489DOC_START
5490 Location for the cache "swap.state" file. This index file holds
5491 the metadata of objects saved on disk. It is used to rebuild
5492 the cache during startup. Normally this file resides in each
5493 'cache_dir' directory, but you may specify an alternate
5494 pathname here. Note you must give a full filename, not just
5495 a directory. Since this is the index for the whole object
5496 list you CANNOT periodically rotate it!
5497
5498 If %s can be used in the file name it will be replaced with a
5499 a representation of the cache_dir name where each / is replaced
5500 with '.'. This is needed to allow adding/removing cache_dir
5501 lines when cache_swap_log is being used.
5502
5503 If have more than one 'cache_dir', and %s is not used in the name
5504 these swap logs will have names such as:
5505
5506 cache_swap_log.00
5507 cache_swap_log.01
5508 cache_swap_log.02
5509
5510 The numbered extension (which is added automatically)
5511 corresponds to the order of the 'cache_dir' lines in this
5512 configuration file. If you change the order of the 'cache_dir'
5513 lines in this file, these index files will NOT correspond to
5514 the correct 'cache_dir' entry (unless you manually rename
5515 them). We recommend you do NOT use this option. It is
5516 better to keep these index files in each 'cache_dir' directory.
5517DOC_END
5518
5519NAME: logfile_rotate
5520TYPE: int
5521DEFAULT: 10
5522LOC: Config.Log.rotateNumber
5523DOC_START
5524 Specifies the default number of logfile rotations to make when you
5525 type 'squid -k rotate'. The default is 10, which will rotate
5526 with extensions 0 through 9. Setting logfile_rotate to 0 will
5527 disable the file name rotation, but the logfiles are still closed
5528 and re-opened. This will enable you to rename the logfiles
5529 yourself just before sending the rotate signal.
5530
5531 Note, from Squid-3.1 this option is only a default for cache.log,
5532 that log can be rotated separately by using debug_options.
5533
5534 Note, from Squid-4 this option is only a default for access.log
5535 recorded by stdio: module. Those logs can be rotated separately by
5536 using the rotate=N option on their access_log directive.
5537
5538 Note, the 'squid -k rotate' command normally sends a USR1
5539 signal to the running squid process. In certain situations
5540 (e.g. on Linux with Async I/O), USR1 is used for other
5541 purposes, so -k rotate uses another signal. It is best to get
5542 in the habit of using 'squid -k rotate' instead of 'kill -USR1
5543 <pid>'.
5544
5545DOC_END
5546
5547NAME: mime_table
5548TYPE: string
5549DEFAULT: @DEFAULT_MIME_TABLE@
5550LOC: Config.mimeTablePathname
5551DOC_START
5552 Path to Squid's icon configuration file.
5553
5554 You shouldn't need to change this, but the default file contains
5555 examples and formatting information if you do.
5556DOC_END
5557
5558NAME: log_mime_hdrs
5559COMMENT: on|off
5560TYPE: onoff
5561LOC: Config.onoff.log_mime_hdrs
5562DEFAULT: off
5563DOC_START
5564 The Cache can record both the request and the response MIME
5565 headers for each HTTP transaction. The headers are encoded
5566 safely and will appear as two bracketed fields at the end of
5567 the access log (for either the native or httpd-emulated log
5568 formats). To enable this logging set log_mime_hdrs to 'on'.
5569DOC_END
5570
5571NAME: pid_filename
5572TYPE: string
5573DEFAULT: @DEFAULT_PID_FILE@
5574LOC: Config.pidFilename
5575DOC_START
5576 A filename to write the process-id to. To disable, enter "none".
5577DOC_END
5578
5579NAME: client_netmask
5580TYPE: address
5581LOC: Config.Addrs.client_netmask
5582DEFAULT: no_addr
5583DEFAULT_DOC: Log full client IP address
5584DOC_START
5585 A netmask for client addresses in logfiles and cachemgr output.
5586 Change this to protect the privacy of your cache clients.
5587 A netmask of 255.255.255.0 will log all IP's in that range with
5588 the last digit set to '0'.
5589DOC_END
5590
5591NAME: strip_query_terms
5592TYPE: onoff
5593LOC: Config.onoff.strip_query_terms
5594DEFAULT: on
5595DOC_START
5596 By default, Squid strips query terms from requested URLs before
5597 logging. This protects your user's privacy and reduces log size.
5598
5599 When investigating HIT/MISS or other caching behaviour you
5600 will need to disable this to see the full URL used by Squid.
5601DOC_END
5602
5603NAME: buffered_logs
5604COMMENT: on|off
5605TYPE: onoff
5606DEFAULT: off
5607LOC: Config.onoff.buffered_logs
5608DOC_START
5609 Whether to write/send access_log records ASAP or accumulate them and
5610 then write/send them in larger chunks. Buffering may improve
5611 performance because it decreases the number of I/Os. However,
5612 buffering increases the delay before log records become available to
5613 the final recipient (e.g., a disk file or logging daemon) and,
5614 hence, increases the risk of log records loss.
5615
5616 Note that even when buffered_logs are off, Squid may have to buffer
5617 records if it cannot write/send them immediately due to pending I/Os
5618 (e.g., the I/O writing the previous log record) or connectivity loss.
5619
5620 Currently honored by 'daemon', 'tcp' and 'udp' access_log modules only.
5621DOC_END
5622
5623NAME: netdb_filename
5624TYPE: string
5625DEFAULT: stdio:@DEFAULT_NETDB_FILE@
5626LOC: Config.netdbFilename
5627IFDEF: USE_ICMP
5628DOC_START
5629 Where Squid stores it's netdb journal.
5630 When enabled this journal preserves netdb state between restarts.
5631
5632 To disable, enter "none".
5633DOC_END
5634
5635NAME: tls_key_log
5636TYPE: Security::KeyLog*
5637DEFAULT: none
5638LOC: Config.Log.tlsKeys
5639IFDEF: USE_OPENSSL
5640DOC_START
5641 Configures whether and where Squid records pre-master secret and
5642 related encryption details for TLS connections accepted or established
5643 by Squid. These connections include connections accepted at
5644 https_port, TLS connections opened to origin servers/cache_peers/ICAP
5645 services, and TLS tunnels bumped by Squid using the SslBump feature.
5646 This log (a.k.a. SSLKEYLOGFILE) is meant for triage with traffic
5647 inspection tools like Wireshark.
5648
5649 tls_key_log <destination> [options] [if [!]<acl>...]
5650
5651 WARNING: This log allows anybody to decrypt the corresponding
5652 encrypted TLS connections, both in-flight and postmortem.
5653
5654 At most one log file is supported at this time. Repeated tls_key_log
5655 directives are treated as fatal configuration errors. By default, no
5656 log is created or updated.
5657
5658 If the log file does not exist, Squid creates it. Otherwise, Squid
5659 appends an existing log file.
5660
5661 The directive is consulted whenever a TLS connection is accepted or
5662 established by Squid. TLS connections that fail the handshake may be
5663 logged if Squid got enough information to form a log record. A record
5664 is logged only if all of the configured ACLs match.
5665
5666 While transport-related ACLs like src and dst should work, Squid may
5667 not have access to higher-level information. For example, when logging
5668 accepted https_port connections, Squid does not yet have access to the
5669 expected HTTPS request. Similarly, an HTTPS response is not available
5670 when logging most TLS connections established by Squid.
5671
5672 The log record format is meant to be compatible with TLS deciphering
5673 features of Wireshark which relies on fields like CLIENT_RANDOM and
5674 RSA Master-Key. A single log record usually spans multiple lines.
5675 Technical documentation for that format is maintained inside the
5676 Wireshark code (e.g., see tls_keylog_process_lines() comments as of
5677 Wireshark commit e3d44136f0f0026c5e893fa249f458073f3b7328). TLS key
5678 log does not support custom record formats.
5679
5680 This clause only supports fast acl types.
5681 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5682
5683 See access_log's <module>:<place> parameter for a list of supported
5684 logging destinations.
5685
5686 TLS key log supports all access_log key=value options with the
5687 exception of logformat=name.
5688
5689 Requires Squid built with OpenSSL support.
5690DOC_END
5691
5692
5693COMMENT_START
5694 OPTIONS FOR TROUBLESHOOTING
5695 -----------------------------------------------------------------------------
5696COMMENT_END
5697
5698NAME: cache_log
5699TYPE: string
5700DEFAULT_IF_NONE: @DEFAULT_CACHE_LOG@
5701LOC: Debug::cache_log
5702DOC_START
5703 Squid administrative logging file.
5704
5705 This is where general information about Squid behavior goes. You can
5706 increase the amount of data logged to this file and how often it is
5707 rotated with "debug_options"
5708DOC_END
5709
5710NAME: cache_log_message
5711TYPE: cache_log_message
5712DEFAULT: none
5713DEFAULT_DOC: Use debug_options.
5714LOC: DebugMessagesConfig
5715DOC_START
5716 Configures logging of individual cache.log messages.
5717
5718 cache_log_message id=<number> option...
5719 cache_log_message ids=<number>-<number> option...
5720
5721 Most messages have _not_ been instrumented to support this directive
5722 yet. For the list of instrumented messages and their IDs, please see
5723 the doc/debug-messages.dox file.
5724
5725 Message ID corresponds to the message semantics rather than message
5726 text or source code location. The ID is stable across Squid
5727 instances and versions. Substantial changes in message semantics
5728 result in a new ID assignment. To reduce the danger of suppressing
5729 an important log message, the old IDs of removed (or substantially
5730 changed) messages are never reused.
5731
5732 If more than one cache_log_message directive refers to the same
5733 message ID, the last directive wins.
5734
5735 Use ids=min-max syntax to apply the same message configuration to an
5736 inclusive range of message IDs. An ID range with N values has
5737 exactly the same effect as typing N cache_log_message lines.
5738
5739 At least one option is required. Supported options are:
5740
5741 level=<number>: The logging level to use for the message. Squid
5742 command line options (-s and -d) as well as the debug_options
5743 directive control which levels go to syslog, stderr, and/or
5744 cache.log. In most environments, using level=2 or higher stops
5745 Squid from logging the message anywhere. By default, the
5746 hard-coded message-specific level is used.
5747
5748 limit=<number>: After logging the specified number of messages at
5749 the configured (or default) debugging level DL, start using
5750 level 3 (for DL 0 and 1) or 8 (for higher DL values). Usually,
5751 level-3+ messages are not logged anywhere so this option can
5752 often be used to effectively suppress the message. Each SMP
5753 Squid process gets the same limit.
5754DOC_END
5755
5756NAME: debug_options
5757TYPE: eol
5758DEFAULT: ALL,1
5759DEFAULT_DOC: Log all critical and important messages.
5760LOC: Debug::debugOptions
5761DOC_START
5762 Logging options are set as section,level where each source file
5763 is assigned a unique section. Lower levels result in less
5764 output, Full debugging (level 9) can result in a very large
5765 log file, so be careful.
5766
5767 The magic word "ALL" sets debugging levels for all sections.
5768 The default is to run with "ALL,1" to record important warnings.
5769
5770 The rotate=N option can be used to keep more or less of these logs
5771 than would otherwise be kept by logfile_rotate.
5772 For most uses a single log should be enough to monitor current
5773 events affecting Squid.
5774DOC_END
5775
5776NAME: coredump_dir
5777TYPE: string
5778LOC: Config.coredump_dir
5779DEFAULT_IF_NONE: none
5780DEFAULT_DOC: Use the directory from where Squid was started.
5781DOC_START
5782 By default Squid leaves core files in the directory from where
5783 it was started. If you set 'coredump_dir' to a directory
5784 that exists, Squid will chdir() to that directory at startup
5785 and coredump files will be left there.
5786
5787 In addition to changing the directory, the process permissions are updated
5788 to enable process tracing and/or coredump file generation. The details are
5789 OS-specific, but look for prctl(2) PR_SET_DUMPABLE and procctl(2)
5790 PROC_TRACE_CTL documentation as guiding examples.
5791
5792CONFIG_START
5793
5794# Leave coredumps in the first cache dir
5795coredump_dir @DEFAULT_SWAP_DIR@
5796CONFIG_END
5797DOC_END
5798
5799
5800COMMENT_START
5801 OPTIONS FOR FTP GATEWAYING
5802 -----------------------------------------------------------------------------
5803COMMENT_END
5804
5805NAME: ftp_user
5806TYPE: string
5807DEFAULT: Squid@
5808LOC: Config.Ftp.anon_user
5809DOC_START
5810 If you want the anonymous login password to be more informative
5811 (and enable the use of picky FTP servers), set this to something
5812 reasonable for your domain, like wwwuser@somewhere.net
5813
5814 The reason why this is domainless by default is the
5815 request can be made on the behalf of a user in any domain,
5816 depending on how the cache is used.
5817 Some FTP server also validate the email address is valid
5818 (for example perl.com).
5819DOC_END
5820
5821NAME: ftp_passive
5822TYPE: onoff
5823DEFAULT: on
5824LOC: Config.Ftp.passive
5825DOC_START
5826 If your firewall does not allow Squid to use passive
5827 connections, turn off this option.
5828
5829 Use of ftp_epsv_all option requires this to be ON.
5830DOC_END
5831
5832NAME: ftp_epsv_all
5833TYPE: onoff
5834DEFAULT: off
5835LOC: Config.Ftp.epsv_all
5836DOC_START
5837 FTP Protocol extensions permit the use of a special "EPSV ALL" command.
5838
5839 NATs may be able to put the connection on a "fast path" through the
5840 translator, as the EPRT command will never be used and therefore,
5841 translation of the data portion of the segments will never be needed.
5842
5843 When a client only expects to do two-way FTP transfers this may be
5844 useful.
5845 If squid finds that it must do a three-way FTP transfer after issuing
5846 an EPSV ALL command, the FTP session will fail.
5847
5848 If you have any doubts about this option do not use it.
5849 Squid will nicely attempt all other connection methods.
5850
5851 Requires ftp_passive to be ON (default) for any effect.
5852DOC_END
5853
5854NAME: ftp_epsv
5855TYPE: ftp_epsv
5856DEFAULT: none
5857LOC: Config.accessList.ftp_epsv
5858DOC_START
5859 FTP Protocol extensions permit the use of a special "EPSV" command.
5860
5861 NATs may be able to put the connection on a "fast path" through the
5862 translator using EPSV, as the EPRT command will never be used
5863 and therefore, translation of the data portion of the segments
5864 will never be needed.
5865
5866 EPSV is often required to interoperate with FTP servers on IPv6
5867 networks. On the other hand, it may break some IPv4 servers.
5868
5869 By default, EPSV may try EPSV with any FTP server. To fine tune
5870 that decision, you may restrict EPSV to certain clients or servers
5871 using ACLs:
5872
5873 ftp_epsv allow|deny al1 acl2 ...
5874
5875 WARNING: Disabling EPSV may cause problems with external NAT and IPv6.
5876
5877 Only fast ACLs are supported.
5878 Requires ftp_passive to be ON (default) for any effect.
5879DOC_END
5880
5881NAME: ftp_eprt
5882TYPE: onoff
5883DEFAULT: on
5884LOC: Config.Ftp.eprt
5885DOC_START
5886 FTP Protocol extensions permit the use of a special "EPRT" command.
5887
5888 This extension provides a protocol neutral alternative to the
5889 IPv4-only PORT command. When supported it enables active FTP data
5890 channels over IPv6 and efficient NAT handling.
5891
5892 Turning this OFF will prevent EPRT being attempted and will skip
5893 straight to using PORT for IPv4 servers.
5894
5895 Some devices are known to not handle this extension correctly and
5896 may result in crashes. Devices which support EPRT enough to fail
5897 cleanly will result in Squid attempting PORT anyway. This directive
5898 should only be disabled when EPRT results in device failures.
5899
5900 WARNING: Doing so will convert Squid back to the old behavior with all
5901 the related problems with external NAT devices/layers and IPv4-only FTP.
5902DOC_END
5903
5904NAME: ftp_sanitycheck
5905TYPE: onoff
5906DEFAULT: on
5907LOC: Config.Ftp.sanitycheck
5908DOC_START
5909 For security and data integrity reasons Squid by default performs
5910 sanity checks of the addresses of FTP data connections ensure the
5911 data connection is to the requested server. If you need to allow
5912 FTP connections to servers using another IP address for the data
5913 connection turn this off.
5914DOC_END
5915
5916NAME: ftp_telnet_protocol
5917TYPE: onoff
5918DEFAULT: on
5919LOC: Config.Ftp.telnet
5920DOC_START
5921 The FTP protocol is officially defined to use the telnet protocol
5922 as transport channel for the control connection. However, many
5923 implementations are broken and does not respect this aspect of
5924 the FTP protocol.
5925
5926 If you have trouble accessing files with ASCII code 255 in the
5927 path or similar problems involving this ASCII code you can
5928 try setting this directive to off. If that helps, report to the
5929 operator of the FTP server in question that their FTP server
5930 is broken and does not follow the FTP standard.
5931DOC_END
5932
5933COMMENT_START
5934 OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
5935 -----------------------------------------------------------------------------
5936COMMENT_END
5937
5938NAME: diskd_program
5939TYPE: string
5940DEFAULT: @DEFAULT_DISKD@
5941LOC: Config.Program.diskd
5942DOC_START
5943 Specify the location of the diskd executable.
5944 Note this is only useful if you have compiled in
5945 diskd as one of the store io modules.
5946DOC_END
5947
5948NAME: unlinkd_program
5949IFDEF: USE_UNLINKD
5950TYPE: string
5951DEFAULT: @DEFAULT_UNLINKD@
5952LOC: Config.Program.unlinkd
5953DOC_START
5954 Specify the location of the executable for file deletion process.
5955DOC_END
5956
5957NAME: pinger_program
5958IFDEF: USE_ICMP
5959TYPE: icmp
5960DEFAULT: @DEFAULT_PINGER@
5961LOC: IcmpCfg
5962DOC_START
5963 Specify the location of the executable for the pinger process.
5964DOC_END
5965
5966NAME: pinger_enable
5967TYPE: onoff
5968DEFAULT: on
5969LOC: IcmpCfg.enable
5970IFDEF: USE_ICMP
5971DOC_START
5972 Control whether the pinger is active at run-time.
5973 Enables turning ICMP pinger on and off with a simple
5974 squid -k reconfigure.
5975DOC_END
5976
5977
5978COMMENT_START
5979 OPTIONS FOR URL REWRITING
5980 -----------------------------------------------------------------------------
5981COMMENT_END
5982
5983NAME: url_rewrite_program redirect_program
5984TYPE: wordlist
5985LOC: Config.Program.redirect
5986DEFAULT: none
5987DOC_START
5988 The name and command line parameters of an admin-provided executable
5989 for redirecting clients or adjusting/replacing client request URLs.
5990
5991 This helper is consulted after the received request is cleared by
5992 http_access and adapted using eICAP/ICAP services (if any). If the
5993 helper does not redirect the client, Squid checks adapted_http_access
5994 and may consult the cache or forward the request to the next hop.
5995
5996
5997 For each request, the helper gets one line in the following format:
5998
5999 [channel-ID <SP>] request-URL [<SP> extras] <NL>
6000
6001 Use url_rewrite_extras to configure what Squid sends as 'extras'.
6002
6003
6004 The helper must reply to each query using a single line:
6005
6006 [channel-ID <SP>] result [<SP> kv-pairs] <NL>
6007
6008 The result section must match exactly one of the following outcomes:
6009
6010 OK [status=30N] url="..."
6011
6012 Redirect the client to a URL supplied in the 'url' parameter.
6013 Optional 'status' specifies the status code to send to the
6014 client in Squid's HTTP redirect response. It must be one of
6015 the standard HTTP redirect status codes: 301, 302, 303, 307,
6016 or 308. When no specific status is requested, Squid uses 302.
6017
6018 OK rewrite-url="..."
6019
6020 Replace the current request URL with the one supplied in the
6021 'rewrite-url' parameter. Squid fetches the resource specified
6022 by the new URL and forwards the received response (or its
6023 cached copy) to the client.
6024
6025 WARNING: Avoid rewriting URLs! When possible, redirect the
6026 client using an "OK url=..." helper response instead.
6027 Rewriting URLs may create inconsistent requests and/or break
6028 synchronization between internal client and origin server
6029 states, especially when URLs or other message parts contain
6030 snippets of that state. For example, Squid does not adjust
6031 Location headers and embedded URLs after the helper rewrites
6032 the request URL.
6033
6034 If Squid cannot parse the URL value returned by the helper, it logs a
6035 critical cache.log ERROR message and uses the original request URL.
6036 Supported URL format depends on the request method. For example,
6037 CONNECT request URLs must use `host:port` form, while GET URLs start
6038 with a `scheme:` prefix (e.g., `https://example.com/`).
6039
6040 OK
6041 Keep the client request intact.
6042
6043 ERR
6044 Keep the client request intact.
6045
6046 BH [message="..."]
6047 A helper problem that should be reported to the Squid admin
6048 via a level-1 cache.log message. The 'message' parameter is
6049 reserved for specifying the log message.
6050
6051 In addition to the kv-pairs mentioned above, Squid also understands
6052 the following optional kv-pairs in URL rewriter responses:
6053
6054 clt_conn_tag=TAG
6055 Associates a TAG with the client TCP connection.
6056
6057 The clt_conn_tag=TAG pair is treated as a regular transaction
6058 annotation for the current request and also annotates future
6059 requests on the same client connection. A helper may update
6060 the TAG during subsequent requests by returning a new kv-pair.
6061
6062
6063 Helper messages contain the channel-ID part if and only if the
6064 url_rewrite_children directive specifies positive concurrency. As a
6065 channel-ID value, Squid sends a number between 0 and concurrency-1.
6066 The helper must echo back the received channel-ID in its response.
6067
6068 By default, Squid does not use a URL rewriter.
6069DOC_END
6070
6071NAME: url_rewrite_children redirect_children
6072TYPE: HelperChildConfig
6073DEFAULT: 20 startup=0 idle=1 concurrency=0
6074LOC: Config.redirectChildren
6075DOC_START
6076 Specifies the maximum number of redirector processes that Squid may
6077 spawn (numberofchildren) and several related options. Using too few of
6078 these helper processes (a.k.a. "helpers") creates request queues.
6079 Using too many helpers wastes your system resources.
6080
6081 Usage: numberofchildren [option]...
6082
6083 The startup= and idle= options allow some measure of skew in your
6084 tuning.
6085
6086 startup=
6087
6088 Sets a minimum of how many processes are to be spawned when Squid
6089 starts or reconfigures. When set to zero the first request will
6090 cause spawning of the first child process to handle it.
6091
6092 Starting too few will cause an initial slowdown in traffic as Squid
6093 attempts to simultaneously spawn enough processes to cope.
6094
6095 idle=
6096
6097 Sets a minimum of how many processes Squid is to try and keep available
6098 at all times. When traffic begins to rise above what the existing
6099 processes can handle this many more will be spawned up to the maximum
6100 configured. A minimum setting of 1 is required.
6101
6102 concurrency=
6103
6104 The number of requests each redirector helper can handle in
6105 parallel. Defaults to 0 which indicates the redirector
6106 is a old-style single threaded redirector.
6107
6108 When this directive is set to a value >= 1 then the protocol
6109 used to communicate with the helper is modified to include
6110 an ID in front of the request/response. The ID from the request
6111 must be echoed back with the response to that request.
6112
6113 queue-size=N
6114
6115 Sets the maximum number of queued requests. A request is queued when
6116 no existing child can accept it due to concurrency limit and no new
6117 child can be started due to numberofchildren limit. The default
6118 maximum is zero if url_rewrite_bypass is enabled and
6119 2*numberofchildren otherwise. If the queued requests exceed queue size
6120 and redirector_bypass configuration option is set, then redirector is
6121 bypassed. Otherwise, Squid is allowed to temporarily exceed the
6122 configured maximum, marking the affected helper as "overloaded". If
6123 the helper overload lasts more than 3 minutes, the action prescribed
6124 by the on-persistent-overload option applies.
6125
6126 on-persistent-overload=action
6127
6128 Specifies Squid reaction to a new helper request arriving when the helper
6129 has been overloaded for more that 3 minutes already. The number of queued
6130 requests determines whether the helper is overloaded (see the queue-size
6131 option).
6132
6133 Two actions are supported:
6134
6135 die Squid worker quits. This is the default behavior.
6136
6137 ERR Squid treats the helper request as if it was
6138 immediately submitted, and the helper immediately
6139 replied with an ERR response. This action has no effect
6140 on the already queued and in-progress helper requests.
6141DOC_END
6142
6143NAME: url_rewrite_host_header redirect_rewrites_host_header
6144TYPE: onoff
6145DEFAULT: on
6146LOC: Config.onoff.redir_rewrites_host
6147DOC_START
6148 To preserve same-origin security policies in browsers and
6149 prevent Host: header forgery by redirectors Squid rewrites
6150 any Host: header in redirected requests.
6151
6152 If you are running an accelerator this may not be a wanted
6153 effect of a redirector. This directive enables you disable
6154 Host: alteration in reverse-proxy traffic.
6155
6156 WARNING: Entries are cached on the result of the URL rewriting
6157 process, so be careful if you have domain-virtual hosts.
6158
6159 WARNING: Squid and other software verifies the URL and Host
6160 are matching, so be careful not to relay through other proxies
6161 or inspecting firewalls with this disabled.
6162DOC_END
6163
6164NAME: url_rewrite_access redirector_access
6165TYPE: acl_access
6166DEFAULT: none
6167DEFAULT_DOC: Allow, unless rules exist in squid.conf.
6168LOC: Config.accessList.redirector
6169DOC_START
6170 If defined, this access list specifies which requests are
6171 sent to the redirector processes.
6172
6173 This clause supports both fast and slow acl types.
6174 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6175DOC_END
6176
6177NAME: url_rewrite_bypass redirector_bypass
6178TYPE: onoff
6179LOC: Config.onoff.redirector_bypass
6180DEFAULT: off
6181DOC_START
6182 When this is 'on', a request will not go through the
6183 redirector if all the helpers are busy. If this is 'off' and the
6184 redirector queue grows too large, the action is prescribed by the
6185 on-persistent-overload option. You should only enable this if the
6186 redirectors are not critical to your caching system. If you use
6187 redirectors for access control, and you enable this option,
6188 users may have access to pages they should not
6189 be allowed to request.
6190
6191 Enabling this option sets the default url_rewrite_children queue-size
6192 option value to 0.
6193DOC_END
6194
6195NAME: url_rewrite_extras
6196TYPE: TokenOrQuotedString
6197LOC: Config.redirector_extras
6198DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp"
6199DOC_START
6200 Specifies a string to be append to request line format for the
6201 rewriter helper. "Quoted" format values may contain spaces and
6202 logformat %macros. In theory, any logformat %macro can be used.
6203 In practice, a %macro expands as a dash (-) if the helper request is
6204 sent before the required macro information is available to Squid.
6205DOC_END
6206
6207NAME: url_rewrite_timeout
6208TYPE: UrlHelperTimeout
6209LOC: Config.onUrlRewriteTimeout
6210DEFAULT: none
6211DEFAULT_DOC: Squid waits for the helper response forever
6212DOC_START
6213 Squid times active requests to redirector. The timeout value and Squid
6214 reaction to a timed out request are configurable using the following
6215 format:
6216
6217 url_rewrite_timeout timeout time-units on_timeout=<action> [response=<quoted-response>]
6218
6219 supported timeout actions:
6220 fail Squid return a ERR_GATEWAY_FAILURE error page
6221
6222 bypass Do not re-write the URL
6223
6224 retry Send the lookup to the helper again
6225
6226 use_configured_response
6227 Use the <quoted-response> as helper response
6228DOC_END
6229
6230COMMENT_START
6231 OPTIONS FOR STORE ID
6232 -----------------------------------------------------------------------------
6233COMMENT_END
6234
6235NAME: store_id_program storeurl_rewrite_program
6236TYPE: wordlist
6237LOC: Config.Program.store_id
6238DEFAULT: none
6239DOC_START
6240 Specify the location of the executable StoreID helper to use.
6241 Since they can perform almost any function there isn't one included.
6242
6243 For each requested URL, the helper will receive one line with the format
6244
6245 [channel-ID <SP>] URL [<SP> extras]<NL>
6246
6247
6248 After processing the request the helper must reply using the following format:
6249
6250 [channel-ID <SP>] result [<SP> kv-pairs]
6251
6252 The result code can be:
6253
6254 OK store-id="..."
6255 Use the StoreID supplied in 'store-id='.
6256
6257 ERR
6258 The default is to use HTTP request URL as the store ID.
6259
6260 BH
6261 An internal error occurred in the helper, preventing
6262 a result being identified.
6263
6264 In addition to the above kv-pairs Squid also understands the following
6265 optional kv-pairs received from URL rewriters:
6266 clt_conn_tag=TAG
6267 Associates a TAG with the client TCP connection.
6268 Please see url_rewrite_program related documentation for this
6269 kv-pair
6270
6271 Helper programs should be prepared to receive and possibly ignore
6272 additional whitespace-separated tokens on each input line.
6273
6274 When using the concurrency= option the protocol is changed by
6275 introducing a query channel tag in front of the request/response.
6276 The query channel tag is a number between 0 and concurrency-1.
6277 This value must be echoed back unchanged to Squid as the first part
6278 of the response relating to its request.
6279
6280 NOTE: when using StoreID refresh_pattern will apply to the StoreID
6281 returned from the helper and not the URL.
6282
6283 WARNING: Wrong StoreID value returned by a careless helper may result
6284 in the wrong cached response returned to the user.
6285
6286 By default, a StoreID helper is not used.
6287DOC_END
6288
6289NAME: store_id_extras
6290TYPE: TokenOrQuotedString
6291LOC: Config.storeId_extras
6292DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp"
6293DOC_START
6294 Specifies a string to be append to request line format for the
6295 StoreId helper. "Quoted" format values may contain spaces and
6296 logformat %macros. In theory, any logformat %macro can be used.
6297 In practice, a %macro expands as a dash (-) if the helper request is
6298 sent before the required macro information is available to Squid.
6299DOC_END
6300
6301NAME: store_id_children storeurl_rewrite_children
6302TYPE: HelperChildConfig
6303DEFAULT: 20 startup=0 idle=1 concurrency=0
6304LOC: Config.storeIdChildren
6305DOC_START
6306 Specifies the maximum number of StoreID helper processes that Squid
6307 may spawn (numberofchildren) and several related options. Using
6308 too few of these helper processes (a.k.a. "helpers") creates request
6309 queues. Using too many helpers wastes your system resources.
6310
6311 Usage: numberofchildren [option]...
6312
6313 The startup= and idle= options allow some measure of skew in your
6314 tuning.
6315
6316 startup=
6317
6318 Sets a minimum of how many processes are to be spawned when Squid
6319 starts or reconfigures. When set to zero the first request will
6320 cause spawning of the first child process to handle it.
6321
6322 Starting too few will cause an initial slowdown in traffic as Squid
6323 attempts to simultaneously spawn enough processes to cope.
6324
6325 idle=
6326
6327 Sets a minimum of how many processes Squid is to try and keep available
6328 at all times. When traffic begins to rise above what the existing
6329 processes can handle this many more will be spawned up to the maximum
6330 configured. A minimum setting of 1 is required.
6331
6332 concurrency=
6333
6334 The number of requests each storeID helper can handle in
6335 parallel. Defaults to 0 which indicates the helper
6336 is a old-style single threaded program.
6337
6338 When this directive is set to a value >= 1 then the protocol
6339 used to communicate with the helper is modified to include
6340 an ID in front of the request/response. The ID from the request
6341 must be echoed back with the response to that request.
6342
6343 queue-size=N
6344
6345 Sets the maximum number of queued requests to N. A request is queued
6346 when no existing child can accept it due to concurrency limit and no
6347 new child can be started due to numberofchildren limit. The default
6348 maximum is 2*numberofchildren. If the queued requests exceed queue
6349 size and redirector_bypass configuration option is set, then
6350 redirector is bypassed. Otherwise, Squid is allowed to temporarily
6351 exceed the configured maximum, marking the affected helper as
6352 "overloaded". If the helper overload lasts more than 3 minutes, the
6353 action prescribed by the on-persistent-overload option applies.
6354
6355 on-persistent-overload=action
6356
6357 Specifies Squid reaction to a new helper request arriving when the helper
6358 has been overloaded for more that 3 minutes already. The number of queued
6359 requests determines whether the helper is overloaded (see the queue-size
6360 option).
6361
6362 Two actions are supported:
6363
6364 die Squid worker quits. This is the default behavior.
6365
6366 ERR Squid treats the helper request as if it was
6367 immediately submitted, and the helper immediately
6368 replied with an ERR response. This action has no effect
6369 on the already queued and in-progress helper requests.
6370DOC_END
6371
6372NAME: store_id_access storeurl_rewrite_access
6373TYPE: acl_access
6374DEFAULT: none
6375DEFAULT_DOC: Allow, unless rules exist in squid.conf.
6376LOC: Config.accessList.store_id
6377DOC_START
6378 If defined, this access list specifies which requests are
6379 sent to the StoreID processes. By default all requests
6380 are sent.
6381
6382 This clause supports both fast and slow acl types.
6383 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6384DOC_END
6385
6386NAME: store_id_bypass storeurl_rewrite_bypass
6387TYPE: onoff
6388LOC: Config.onoff.store_id_bypass
6389DEFAULT: on
6390DOC_START
6391 When this is 'on', a request will not go through the
6392 helper if all helpers are busy. If this is 'off' and the helper
6393 queue grows too large, the action is prescribed by the
6394 on-persistent-overload option. You should only enable this if the
6395 helpers are not critical to your caching system. If you use
6396 helpers for critical caching components, and you enable this
6397 option, users may not get objects from cache.
6398 This options sets default queue-size option of the store_id_children
6399 to 0.
6400DOC_END
6401
6402COMMENT_START
6403 OPTIONS FOR TUNING THE CACHE
6404 -----------------------------------------------------------------------------
6405COMMENT_END
6406
6407NAME: cache no_cache
6408TYPE: acl_access
6409DEFAULT: none
6410DEFAULT_DOC: By default, this directive is unused and has no effect.
6411LOC: Config.accessList.noCache
6412DOC_START
6413 Requests denied by this directive will not be served from the cache
6414 and their responses will not be stored in the cache. This directive
6415 has no effect on other transactions and on already cached responses.
6416
6417 This clause supports both fast and slow acl types.
6418 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6419
6420 This and the two other similar caching directives listed below are
6421 checked at different transaction processing stages, have different
6422 access to response information, affect different cache operations,
6423 and differ in slow ACLs support:
6424
6425 * cache: Checked before Squid makes a hit/miss determination.
6426 No access to reply information!
6427 Denies both serving a hit and storing a miss.
6428 Supports both fast and slow ACLs.
6429 * send_hit: Checked after a hit was detected.
6430 Has access to reply (hit) information.
6431 Denies serving a hit only.
6432 Supports fast ACLs only.
6433 * store_miss: Checked before storing a cachable miss.
6434 Has access to reply (miss) information.
6435 Denies storing a miss only.
6436 Supports fast ACLs only.
6437
6438 If you are not sure which of the three directives to use, apply the
6439 following decision logic:
6440
6441 * If your ACL(s) are of slow type _and_ need response info, redesign.
6442 Squid does not support that particular combination at this time.
6443 Otherwise:
6444 * If your directive ACL(s) are of slow type, use "cache"; and/or
6445 * if your directive ACL(s) need no response info, use "cache".
6446 Otherwise:
6447 * If you do not want the response cached, use store_miss; and/or
6448 * if you do not want a hit on a cached response, use send_hit.
6449DOC_END
6450
6451NAME: send_hit
6452TYPE: acl_access
6453DEFAULT: none
6454DEFAULT_DOC: By default, this directive is unused and has no effect.
6455LOC: Config.accessList.sendHit
6456DOC_START
6457 Responses denied by this directive will not be served from the cache
6458 (but may still be cached, see store_miss). This directive has no
6459 effect on the responses it allows and on the cached objects. This
6460 directive is applied to both regular from-cache responses and responses
6461 reused by collapsed requests (see collapsed_forwarding).
6462
6463 Please see the "cache" directive for a summary of differences among
6464 store_miss, send_hit, and cache directives.
6465
6466 Unlike the "cache" directive, send_hit only supports fast acl
6467 types. See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6468
6469 For example:
6470
6471 # apply custom Store ID mapping to some URLs
6472 acl MapMe dstdomain .c.example.com
6473 store_id_program ...
6474 store_id_access allow MapMe
6475
6476 # but prevent caching of special responses
6477 # such as 302 redirects that cause StoreID loops
6478 acl Ordinary http_status 200-299
6479 store_miss deny MapMe !Ordinary
6480
6481 # and do not serve any previously stored special responses
6482 # from the cache (in case they were already cached before
6483 # the above store_miss rule was in effect).
6484 send_hit deny MapMe !Ordinary
6485DOC_END
6486
6487NAME: store_miss
6488TYPE: acl_access
6489DEFAULT: none
6490DEFAULT_DOC: By default, this directive is unused and has no effect.
6491LOC: Config.accessList.storeMiss
6492DOC_START
6493 Responses denied by this directive will not be cached (but may still
6494 be served from the cache, see send_hit). This directive has no
6495 effect on the responses it allows and on the already cached responses.
6496
6497 Please see the "cache" directive for a summary of differences among
6498 store_miss, send_hit, and cache directives. See the
6499 send_hit directive for a usage example.
6500
6501 Unlike the "cache" directive, store_miss only supports fast acl
6502 types. See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6503DOC_END
6504
6505NAME: max_stale
6506COMMENT: time-units
6507TYPE: time_t
6508LOC: Config.maxStale
6509DEFAULT: 1 week
6510DOC_START
6511 This option puts an upper limit on how stale content Squid
6512 will serve from the cache if cache validation fails.
6513 Can be overridden by the refresh_pattern max-stale option.
6514DOC_END
6515
6516NAME: refresh_pattern
6517TYPE: refreshpattern
6518LOC: Config.Refresh
6519DEFAULT: none
6520DOC_START
6521 usage: refresh_pattern [-i] regex min percent max [options]
6522
6523 By default, regular expressions are CASE-SENSITIVE. To make
6524 them case-insensitive, use the -i option.
6525
6526 'Min' is the time (in minutes) an object without an explicit
6527 expiry time should be considered fresh. The recommended
6528 value is 0, any higher values may cause dynamic applications
6529 to be erroneously cached unless the application designer
6530 has taken the appropriate actions.
6531
6532 'Percent' is used to compute the max-age value for responses
6533 with a Last-Modified header and no Cache-Control:max-age nor Expires.
6534 Cache-Control:max-age = ( Date - Last-Modified ) * percent
6535
6536 'Max' is an upper limit on how long objects without an explicit
6537 expiry time will be considered fresh. The value is also used
6538 to form Cache-Control: max-age header for a request sent from
6539 Squid to origin/parent.
6540
6541 options: override-expire
6542 override-lastmod
6543 reload-into-ims
6544 ignore-reload
6545 ignore-no-store
6546 ignore-private
6547 max-stale=NN
6548 refresh-ims
6549 store-stale
6550
6551 override-expire enforces min age even if the server
6552 sent an explicit expiry time (e.g., with the
6553 Expires: header or Cache-Control: max-age). Doing this
6554 VIOLATES the HTTP standard. Enabling this feature
6555 could make you liable for problems which it causes.
6556
6557 Note: override-expire does not enforce staleness - it only extends
6558 freshness / min. If the server returns a Expires time which
6559 is longer than your max time, Squid will still consider
6560 the object fresh for that period of time.
6561
6562 override-lastmod enforces min age even on objects
6563 that were modified recently.
6564
6565 reload-into-ims changes a client no-cache or ``reload''
6566 request for a cached entry into a conditional request using
6567 If-Modified-Since and/or If-None-Match headers, provided the
6568 cached entry has a Last-Modified and/or a strong ETag header.
6569 Doing this VIOLATES the HTTP standard. Enabling this feature
6570 could make you liable for problems which it causes.
6571
6572 ignore-reload ignores a client no-cache or ``reload''
6573 header. Doing this VIOLATES the HTTP standard. Enabling
6574 this feature could make you liable for problems which
6575 it causes.
6576
6577 ignore-no-store ignores any ``Cache-control: no-store''
6578 headers received from a server. Doing this VIOLATES
6579 the HTTP standard. Enabling this feature could make you
6580 liable for problems which it causes.
6581
6582 ignore-private ignores any ``Cache-control: private''
6583 headers received from a server. Doing this VIOLATES
6584 the HTTP standard. Enabling this feature could make you
6585 liable for problems which it causes.
6586
6587 refresh-ims causes squid to contact the origin server
6588 when a client issues an If-Modified-Since request. This
6589 ensures that the client will receive an updated version
6590 if one is available.
6591
6592 store-stale stores responses even if they don't have explicit
6593 freshness or a validator (i.e., Last-Modified or an ETag)
6594 present, or if they're already stale. By default, Squid will
6595 not cache such responses because they usually can't be
6596 reused. Note that such responses will be stale by default.
6597
6598 max-stale=NN provide a maximum staleness factor. Squid won't
6599 serve objects more stale than this even if it failed to
6600 validate the object. Default: use the max_stale global limit.
6601
6602 Basically a cached object is:
6603
6604 FRESH if expire > now, else STALE
6605 STALE if age > max
6606 FRESH if lm-factor < percent, else STALE
6607 FRESH if age < min
6608 else STALE
6609
6610 The refresh_pattern lines are checked in the order listed here.
6611 The first entry which matches is used. If none of the entries
6612 match the default will be used.
6613
6614 Note, you must uncomment all the default lines if you want
6615 to change one. The default setting is only active if none is
6616 used.
6617
6618CONFIG_START
6619
6620#
6621# Add any of your own refresh_pattern entries above these.
6622#
6623refresh_pattern ^ftp: 1440 20% 10080
6624refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
6625refresh_pattern . 0 20% 4320
6626CONFIG_END
6627DOC_END
6628
6629NAME: quick_abort_min
6630COMMENT: (KB)
6631TYPE: kb_int64_t
6632DEFAULT: 16 KB
6633LOC: Config.quickAbort.min
6634DOC_NONE
6635
6636NAME: quick_abort_max
6637COMMENT: (KB)
6638TYPE: kb_int64_t
6639DEFAULT: 16 KB
6640LOC: Config.quickAbort.max
6641DOC_NONE
6642
6643NAME: quick_abort_pct
6644COMMENT: (percent)
6645TYPE: int
6646DEFAULT: 95
6647LOC: Config.quickAbort.pct
6648DOC_START
6649 Continuing to download a cachable response after its request is aborted is
6650 going to waste resources if the received response is not requested again.
6651 On the other hand, aborting an in-progress download may effectively waste
6652 (already spent) resources if the received cachable response is requested
6653 again. Such waste is especially noticeable when, for example, impatient
6654 users repeatedly request and then abort slow downloads. To balance these
6655 trade-offs when a request is aborted during response download, Squid may
6656 check quick_abort_* directives to decide whether to finish the retrieval:
6657
6658 If the transfer has less than 'quick_abort_min' KB remaining,
6659 it will finish the retrieval.
6660
6661 If the transfer has more than 'quick_abort_max' KB remaining,
6662 it will abort the retrieval.
6663
6664 If more than 'quick_abort_pct' of the transfer has completed,
6665 it will finish the retrieval.
6666
6667 If you do not want any retrieval to continue after the client
6668 has aborted, set both 'quick_abort_min' and 'quick_abort_max'
6669 to '0 KB'.
6670
6671 If you want retrievals to always continue if they are being
6672 cached set 'quick_abort_min' to '-1 KB'.
6673
6674 Many other conditions affect Squid decision to abort or continue download.
6675 For example, Squid continues to download responses that feed other
6676 requests but aborts responses with unknown body length.
6677DOC_END
6678
6679NAME: read_ahead_gap
6680COMMENT: buffer-size
6681TYPE: b_int64_t
6682LOC: Config.readAheadGap
6683DEFAULT: 16 KB
6684DOC_START
6685 The amount of data the cache will buffer ahead of what has been
6686 sent to the client when retrieving an object from another server.
6687DOC_END
6688
6689NAME: negative_ttl
6690IFDEF: USE_HTTP_VIOLATIONS
6691COMMENT: time-units
6692TYPE: time_t
6693LOC: Config.negativeTtl
6694DEFAULT: 0 seconds
6695DOC_START
6696 Set the Default Time-to-Live (TTL) for failed requests.
6697 Certain types of failures (such as "connection refused" and
6698 "404 Not Found") are able to be negatively-cached for a short time.
6699 Modern web servers should provide Expires: header, however if they
6700 do not this can provide a minimum TTL.
6701 The default is not to cache errors with unknown expiry details.
6702
6703 Note that this is different from negative caching of DNS lookups.
6704
6705 WARNING: Doing this VIOLATES the HTTP standard. Enabling
6706 this feature could make you liable for problems which it
6707 causes.
6708DOC_END
6709
6710NAME: positive_dns_ttl
6711COMMENT: time-units
6712TYPE: time_t
6713LOC: Config.positiveDnsTtl
6714DEFAULT: 6 hours
6715DOC_START
6716 Upper limit on how long Squid will cache positive DNS responses.
6717 Default is 6 hours (360 minutes). This directive must be set
6718 larger than negative_dns_ttl.
6719DOC_END
6720
6721NAME: negative_dns_ttl
6722COMMENT: time-units
6723TYPE: time_t
6724LOC: Config.negativeDnsTtl
6725DEFAULT: 1 minutes
6726DOC_START
6727 Time-to-Live (TTL) for negative caching of failed DNS lookups.
6728 This also sets the lower cache limit on positive lookups.
6729 Minimum value is 1 second, and it is not recommendable to go
6730 much below 10 seconds.
6731DOC_END
6732
6733NAME: range_offset_limit
6734COMMENT: size [acl acl...]
6735TYPE: acl_b_size_t
6736LOC: Config.rangeOffsetLimit
6737DEFAULT: none
6738DOC_START
6739 usage: (size) [units] [[!]aclname]
6740
6741 Sets an upper limit on how far (number of bytes) into the file
6742 a Range request may be to cause Squid to prefetch the whole file.
6743 If beyond this limit, Squid forwards the Range request as it is and
6744 the result is NOT cached.
6745
6746 This is to stop a far ahead range request (lets say start at 17MB)
6747 from making Squid fetch the whole object up to that point before
6748 sending anything to the client.
6749
6750 Multiple range_offset_limit lines may be specified, and they will
6751 be searched from top to bottom on each request until a match is found.
6752 The first match found will be used. If no line matches a request, the
6753 default limit of 0 bytes will be used.
6754
6755 'size' is the limit specified as a number of units.
6756
6757 'units' specifies whether to use bytes, KB, MB, etc.
6758 If no units are specified bytes are assumed.
6759
6760 A size of 0 causes Squid to never fetch more than the
6761 client requested. (default)
6762
6763 A size of 'none' causes Squid to always fetch the object from the
6764 beginning so it may cache the result. (2.0 style)
6765
6766 'aclname' is the name of a defined ACL.
6767
6768 NP: Using 'none' as the byte value here will override any quick_abort settings
6769 that may otherwise apply to the range request. The range request will
6770 be fully fetched from start to finish regardless of the client
6771 actions. This affects bandwidth usage.
6772DOC_END
6773
6774NAME: minimum_expiry_time
6775COMMENT: (seconds)
6776TYPE: time_t
6777LOC: Config.minimum_expiry_time
6778DEFAULT: 60 seconds
6779DOC_START
6780 The minimum caching time according to (Expires - Date)
6781 headers Squid honors if the object can't be revalidated.
6782 The default is 60 seconds.
6783
6784 In reverse proxy environments it might be desirable to honor
6785 shorter object lifetimes. It is most likely better to make
6786 your server return a meaningful Last-Modified header however.
6787DOC_END
6788
6789NAME: store_avg_object_size
6790COMMENT: (bytes)
6791TYPE: b_int64_t
6792DEFAULT: 13 KB
6793LOC: Config.Store.avgObjectSize
6794DOC_START
6795 Average object size, used to estimate number of objects your
6796 cache can hold. The default is 13 KB.
6797
6798 This is used to pre-seed the cache index memory allocation to
6799 reduce expensive reallocate operations while handling clients
6800 traffic. Too-large values may result in memory allocation during
6801 peak traffic, too-small values will result in wasted memory.
6802
6803 Check the cache manager 'info' report metrics for the real
6804 object sizes seen by your Squid before tuning this.
6805DOC_END
6806
6807NAME: store_objects_per_bucket
6808TYPE: int
6809DEFAULT: 20
6810LOC: Config.Store.objectsPerBucket
6811DOC_START
6812 Target number of objects per bucket in the store hash table.
6813 Lowering this value increases the total number of buckets and
6814 also the storage maintenance rate. The default is 20.
6815DOC_END
6816
6817COMMENT_START
6818 HTTP OPTIONS
6819 -----------------------------------------------------------------------------
6820COMMENT_END
6821
6822NAME: request_header_max_size
6823COMMENT: (KB)
6824TYPE: b_size_t
6825DEFAULT: 64 KB
6826LOC: Config.maxRequestHeaderSize
6827DOC_START
6828 This directives limits the header size of a received HTTP request
6829 (including request-line). Increasing this limit beyond its 64 KB default
6830 exposes certain old Squid code to various denial-of-service attacks. This
6831 limit also applies to received FTP commands.
6832
6833 This limit has no direct affect on Squid memory consumption.
6834
6835 Squid does not check this limit when sending requests.
6836DOC_END
6837
6838NAME: reply_header_max_size
6839COMMENT: (KB)
6840TYPE: b_size_t
6841DEFAULT: 64 KB
6842LOC: Config.maxReplyHeaderSize
6843DOC_START
6844 This directives limits the header size of a received HTTP response
6845 (including status-line). Increasing this limit beyond its 64 KB default
6846 exposes certain old Squid code to various denial-of-service attacks. This
6847 limit also applies to FTP command responses.
6848
6849 Squid also checks this limit when loading hit responses from disk cache.
6850
6851 Squid does not check this limit when sending responses.
6852DOC_END
6853
6854NAME: request_body_max_size
6855COMMENT: (bytes)
6856TYPE: b_int64_t
6857DEFAULT: 0 KB
6858DEFAULT_DOC: No limit.
6859LOC: Config.maxRequestBodySize
6860DOC_START
6861 This specifies the maximum size for an HTTP request body.
6862 In other words, the maximum size of a PUT/POST request.
6863 A user who attempts to send a request with a body larger
6864 than this limit receives an "Invalid Request" error message.
6865 If you set this parameter to a zero (the default), there will
6866 be no limit imposed.
6867
6868 See also client_request_buffer_max_size for an alternative
6869 limitation on client uploads which can be configured.
6870DOC_END
6871
6872NAME: client_request_buffer_max_size
6873COMMENT: (bytes)
6874TYPE: b_size_t
6875DEFAULT: 512 KB
6876LOC: Config.maxRequestBufferSize
6877DOC_START
6878 This specifies the maximum buffer size of a client request.
6879 It prevents squid eating too much memory when somebody uploads
6880 a large file.
6881DOC_END
6882
6883NAME: broken_posts
6884IFDEF: USE_HTTP_VIOLATIONS
6885TYPE: acl_access
6886DEFAULT: none
6887DEFAULT_DOC: Obey RFC 2616.
6888LOC: Config.accessList.brokenPosts
6889DOC_START
6890 A list of ACL elements which, if matched, causes Squid to send
6891 an extra CRLF pair after the body of a PUT/POST request.
6892
6893 Some HTTP servers has broken implementations of PUT/POST,
6894 and rely on an extra CRLF pair sent by some WWW clients.
6895
6896 Quote from RFC2616 section 4.1 on this matter:
6897
6898 Note: certain buggy HTTP/1.0 client implementations generate an
6899 extra CRLF's after a POST request. To restate what is explicitly
6900 forbidden by the BNF, an HTTP/1.1 client must not preface or follow
6901 a request with an extra CRLF.
6902
6903 This clause only supports fast acl types.
6904 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6905
6906Example:
6907 acl buggy_server url_regex ^http://....
6908 broken_posts allow buggy_server
6909DOC_END
6910
6911NAME: adaptation_uses_indirect_client icap_uses_indirect_client
6912COMMENT: on|off
6913TYPE: onoff
6914IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_ADAPTATION
6915DEFAULT: on
6916LOC: Adaptation::Config::use_indirect_client
6917DOC_START
6918 Controls whether the indirect client IP address (instead of the direct
6919 client IP address) is passed to adaptation services.
6920
6921 See also: follow_x_forwarded_for adaptation_send_client_ip
6922DOC_END
6923
6924NAME: via
6925IFDEF: USE_HTTP_VIOLATIONS
6926COMMENT: on|off
6927TYPE: onoff
6928DEFAULT: on
6929LOC: Config.onoff.via
6930DOC_START
6931 If set (default), Squid will include a Via header in requests and
6932 replies as required by RFC2616.
6933DOC_END
6934
6935NAME: vary_ignore_expire
6936COMMENT: on|off
6937TYPE: onoff
6938LOC: Config.onoff.vary_ignore_expire
6939DEFAULT: off
6940DOC_START
6941 Many HTTP servers supporting Vary gives such objects
6942 immediate expiry time with no cache-control header
6943 when requested by a HTTP/1.0 client. This option
6944 enables Squid to ignore such expiry times until
6945 HTTP/1.1 is fully implemented.
6946
6947 WARNING: If turned on this may eventually cause some
6948 varying objects not intended for caching to get cached.
6949DOC_END
6950
6951NAME: request_header_access
6952IFDEF: USE_HTTP_VIOLATIONS
6953TYPE: http_header_access
6954LOC: Config.request_header_access
6955DEFAULT: none
6956DEFAULT_DOC: No limits.
6957DOC_START
6958 Usage: request_header_access header_name allow|deny [!]aclname ...
6959
6960 WARNING: Doing this VIOLATES the HTTP standard. Enabling
6961 this feature could make you liable for problems which it
6962 causes.
6963
6964 This option replaces the old 'anonymize_headers' and the
6965 older 'http_anonymizer' option with something that is much
6966 more configurable. A list of ACLs for each header name allows
6967 removal of specific header fields under specific conditions.
6968
6969 This option only applies to outgoing HTTP request headers (i.e.,
6970 headers sent by Squid to the next HTTP hop such as a cache peer
6971 or an origin server). The option has no effect during cache hit
6972 detection. The equivalent adaptation vectoring point in ICAP
6973 terminology is post-cache REQMOD.
6974
6975 The option is applied to individual outgoing request header
6976 fields. For each request header field F, Squid uses the first
6977 qualifying sets of request_header_access rules:
6978
6979 1. Rules with header_name equal to F's name.
6980 2. Rules with header_name 'Other', provided F's name is not
6981 on the hard-coded list of commonly used HTTP header names.
6982 3. Rules with header_name 'All'.
6983
6984 Within that qualifying rule set, rule ACLs are checked as usual.
6985 If ACLs of an "allow" rule match, the header field is allowed to
6986 go through as is. If ACLs of a "deny" rule match, the header is
6987 removed and request_header_replace is then checked to identify
6988 if the removed header has a replacement. If no rules within the
6989 set have matching ACLs, the header field is left as is.
6990
6991 For example, to achieve the same behavior as the old
6992 'http_anonymizer standard' option, you should use:
6993
6994 request_header_access From deny all
6995 request_header_access Referer deny all
6996 request_header_access User-Agent deny all
6997
6998 Or, to reproduce the old 'http_anonymizer paranoid' feature
6999 you should use:
7000
7001 request_header_access Authorization allow all
7002 request_header_access Proxy-Authorization allow all
7003 request_header_access Cache-Control allow all
7004 request_header_access Content-Length allow all
7005 request_header_access Content-Type allow all
7006 request_header_access Date allow all
7007 request_header_access Host allow all
7008 request_header_access If-Modified-Since allow all
7009 request_header_access Pragma allow all
7010 request_header_access Accept allow all
7011 request_header_access Accept-Charset allow all
7012 request_header_access Accept-Encoding allow all
7013 request_header_access Accept-Language allow all
7014 request_header_access Connection allow all
7015 request_header_access All deny all
7016
7017 HTTP reply headers are controlled with the reply_header_access directive.
7018
7019 By default, all headers are allowed (no anonymizing is performed).
7020DOC_END
7021
7022NAME: reply_header_access
7023IFDEF: USE_HTTP_VIOLATIONS
7024TYPE: http_header_access
7025LOC: Config.reply_header_access
7026DEFAULT: none
7027DEFAULT_DOC: No limits.
7028DOC_START
7029 Usage: reply_header_access header_name allow|deny [!]aclname ...
7030
7031 WARNING: Doing this VIOLATES the HTTP standard. Enabling
7032 this feature could make you liable for problems which it
7033 causes.
7034
7035 This option only applies to reply headers, i.e., from the
7036 server to the client.
7037
7038 This is the same as request_header_access, but in the other
7039 direction. Please see request_header_access for detailed
7040 documentation.
7041
7042 For example, to achieve the same behavior as the old
7043 'http_anonymizer standard' option, you should use:
7044
7045 reply_header_access Server deny all
7046 reply_header_access WWW-Authenticate deny all
7047 reply_header_access Link deny all
7048
7049 Or, to reproduce the old 'http_anonymizer paranoid' feature
7050 you should use:
7051
7052 reply_header_access Allow allow all
7053 reply_header_access WWW-Authenticate allow all
7054 reply_header_access Proxy-Authenticate allow all
7055 reply_header_access Cache-Control allow all
7056 reply_header_access Content-Encoding allow all
7057 reply_header_access Content-Length allow all
7058 reply_header_access Content-Type allow all
7059 reply_header_access Date allow all
7060 reply_header_access Expires allow all
7061 reply_header_access Last-Modified allow all
7062 reply_header_access Location allow all
7063 reply_header_access Pragma allow all
7064 reply_header_access Content-Language allow all
7065 reply_header_access Retry-After allow all
7066 reply_header_access Title allow all
7067 reply_header_access Content-Disposition allow all
7068 reply_header_access Connection allow all
7069 reply_header_access All deny all
7070
7071 HTTP request headers are controlled with the request_header_access directive.
7072
7073 By default, all headers are allowed (no anonymizing is
7074 performed).
7075DOC_END
7076
7077NAME: request_header_replace header_replace
7078IFDEF: USE_HTTP_VIOLATIONS
7079TYPE: http_header_replace
7080LOC: Config.request_header_access
7081DEFAULT: none
7082DOC_START
7083 Usage: request_header_replace header_name message
7084 Example: request_header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
7085
7086 This option allows you to change the contents of headers
7087 denied with request_header_access above, by replacing them
7088 with some fixed string.
7089
7090 This only applies to request headers, not reply headers.
7091
7092 By default, headers are removed if denied.
7093DOC_END
7094
7095NAME: reply_header_replace
7096IFDEF: USE_HTTP_VIOLATIONS
7097TYPE: http_header_replace
7098LOC: Config.reply_header_access
7099DEFAULT: none
7100DOC_START
7101 Usage: reply_header_replace header_name message
7102 Example: reply_header_replace Server Foo/1.0
7103
7104 This option allows you to change the contents of headers
7105 denied with reply_header_access above, by replacing them
7106 with some fixed string.
7107
7108 This only applies to reply headers, not request headers.
7109
7110 By default, headers are removed if denied.
7111DOC_END
7112
7113NAME: request_header_add
7114TYPE: HeaderWithAclList
7115LOC: Config.request_header_add
7116DEFAULT: none
7117DOC_START
7118 Usage: request_header_add field-name field-value [ acl ... ]
7119 Example: request_header_add X-Client-CA "CA=%ssl::>cert_issuer" all
7120
7121 This option adds header fields to outgoing HTTP requests (i.e.,
7122 request headers sent by Squid to the next HTTP hop such as a
7123 cache peer or an origin server). The option has no effect during
7124 cache hit detection. The equivalent adaptation vectoring point
7125 in ICAP terminology is post-cache REQMOD.
7126
7127 Field-name is a token specifying an HTTP header name. If a
7128 standard HTTP header name is used, Squid does not check whether
7129 the new header conflicts with any existing headers or violates
7130 HTTP rules. If the request to be modified already contains a
7131 field with the same name, the old field is preserved but the
7132 header field values are not merged.
7133
7134 Field-value is either a token or a quoted string. If quoted
7135 string format is used, then the surrounding quotes are removed
7136 while escape sequences and %macros are processed.
7137
7138 One or more Squid ACLs may be specified to restrict header
7139 injection to matching requests. As always in squid.conf, all
7140 ACLs in the ACL list must be satisfied for the insertion to
7141 happen. The request_header_add supports fast ACLs only.
7142
7143 See also: reply_header_add.
7144DOC_END
7145
7146NAME: reply_header_add
7147TYPE: HeaderWithAclList
7148LOC: Config.reply_header_add
7149DEFAULT: none
7150DOC_START
7151 Usage: reply_header_add field-name field-value [ acl ... ]
7152 Example: reply_header_add X-Client-CA "CA=%ssl::>cert_issuer" all
7153
7154 This option adds header fields to outgoing HTTP responses (i.e., response
7155 headers delivered by Squid to the client). This option has no effect on
7156 cache hit detection. The equivalent adaptation vectoring point in
7157 ICAP terminology is post-cache RESPMOD. This option does not apply to
7158 successful CONNECT replies.
7159
7160 Field-name is a token specifying an HTTP header name. If a
7161 standard HTTP header name is used, Squid does not check whether
7162 the new header conflicts with any existing headers or violates
7163 HTTP rules. If the response to be modified already contains a
7164 field with the same name, the old field is preserved but the
7165 header field values are not merged.
7166
7167 Field-value is either a token or a quoted string. If quoted
7168 string format is used, then the surrounding quotes are removed
7169 while escape sequences and %macros are processed.
7170
7171 One or more Squid ACLs may be specified to restrict header
7172 injection to matching responses. As always in squid.conf, all
7173 ACLs in the ACL list must be satisfied for the insertion to
7174 happen. The reply_header_add option supports fast ACLs only.
7175
7176 See also: request_header_add.
7177DOC_END
7178
7179NAME: note
7180TYPE: note
7181LOC: Config.notes
7182DEFAULT: none
7183DOC_START
7184 This option used to log custom information about the master
7185 transaction. For example, an admin may configure Squid to log
7186 which "user group" the transaction belongs to, where "user group"
7187 will be determined based on a set of ACLs and not [just]
7188 authentication information.
7189 Values of key/value pairs can be logged using %{key}note macros:
7190
7191 note key value acl ...
7192 logformat myFormat ... %{key}note ...
7193
7194 This clause only supports fast acl types.
7195 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
7196DOC_END
7197
7198NAME: relaxed_header_parser
7199COMMENT: on|off|warn
7200TYPE: tristate
7201LOC: Config.onoff.relaxed_header_parser
7202DEFAULT: on
7203DOC_START
7204 In the default "on" setting Squid accepts certain forms
7205 of non-compliant HTTP messages where it is unambiguous
7206 what the sending application intended even if the message
7207 is not correctly formatted. The messages is then normalized
7208 to the correct form when forwarded by Squid.
7209
7210 If set to "warn" then a warning will be emitted in cache.log
7211 each time such HTTP error is encountered.
7212
7213 If set to "off" then such HTTP errors will cause the request
7214 or response to be rejected.
7215DOC_END
7216
7217NAME: collapsed_forwarding
7218COMMENT: (on|off)
7219TYPE: onoff
7220LOC: Config.onoff.collapsed_forwarding
7221DEFAULT: off
7222DOC_START
7223 This option controls whether Squid is allowed to merge multiple
7224 potentially cachable requests for the same URI before Squid knows
7225 whether the response is going to be cachable.
7226
7227 When enabled, instead of forwarding each concurrent request for
7228 the same URL, Squid just sends the first of them. The other, so
7229 called "collapsed" requests, wait for the response to the first
7230 request and, if it happens to be cachable, use that response.
7231 Here, "concurrent requests" means "received after the first
7232 request headers were parsed and before the corresponding response
7233 headers were parsed".
7234
7235 This feature is disabled by default: enabling collapsed
7236 forwarding needlessly delays forwarding requests that look
7237 cachable (when they are collapsed) but then need to be forwarded
7238 individually anyway because they end up being for uncachable
7239 content. However, in some cases, such as acceleration of highly
7240 cachable content with periodic or grouped expiration times, the
7241 gains from collapsing [large volumes of simultaneous refresh
7242 requests] outweigh losses from such delays.
7243
7244 Squid collapses two kinds of requests: regular client requests
7245 received on one of the listening ports and internal "cache
7246 revalidation" requests which are triggered by those regular
7247 requests hitting a stale cached object. Revalidation collapsing
7248 is currently disabled for Squid instances containing SMP-aware
7249 disk or memory caches and for Vary-controlled cached objects.
7250
7251 A response reused by the collapsed request is deemed fresh in that
7252 request processing context -- Squid does not apply refresh_pattern and
7253 internal freshness validation checks to collapsed transactions. Squid
7254 does apply send_hit rules.
7255DOC_END
7256
7257NAME: collapsed_forwarding_access
7258TYPE: acl_access
7259DEFAULT: none
7260DEFAULT_DOC: Requests may be collapsed if collapsed_forwarding is on.
7261LOC: Config.accessList.collapsedForwardingAccess
7262DOC_START
7263 Use this directive to restrict collapsed forwarding to a subset of
7264 eligible requests. The directive is checked for regular HTTP
7265 requests, internal revalidation requests, and HTCP/ICP requests.
7266
7267 collapsed_forwarding_access allow|deny [!]aclname ...
7268
7269 This directive cannot force collapsing. It has no effect on
7270 collapsing unless collapsed_forwarding is 'on', and all other
7271 collapsing preconditions are satisfied.
7272
7273 * A denied request will not collapse, and future transactions will
7274 not collapse on it (even if they are allowed to collapse).
7275
7276 * An allowed request may collapse, or future transactions may
7277 collapse on it (provided they are allowed to collapse).
7278
7279 This directive is evaluated before receiving HTTP response headers
7280 and without access to Squid-to-peer connection (if any).
7281
7282 Only fast ACLs are supported.
7283
7284 See also: collapsed_forwarding.
7285DOC_END
7286
7287NAME: shared_transient_entries_limit collapsed_forwarding_shared_entries_limit
7288COMMENT: (number of entries)
7289TYPE: int64_t
7290LOC: Config.shared_transient_entries_limit
7291DEFAULT: 16384
7292DOC_START
7293 This directive limits the size of a table used for sharing current
7294 transaction information among SMP workers. A table entry stores meta
7295 information about a single cache entry being delivered to Squid
7296 client(s) by one or more SMP workers. A single table entry consumes
7297 less than 128 shared memory bytes.
7298
7299 The limit should be significantly larger than the number of
7300 concurrent non-collapsed cachable responses leaving Squid. For a
7301 cache that handles less than 5000 concurrent requests, the default
7302 setting of 16384 should be plenty.
7303
7304 Using excessively large values wastes shared memory. Limiting the
7305 table size too much results in hash collisions, leading to lower hit
7306 ratio and missed SMP request collapsing opportunities: Transactions
7307 left without a table entry cannot cache their responses and are
7308 invisible to other concurrent requests for the same resource.
7309
7310 A zero limit is allowed but unsupported. A positive small limit
7311 lowers hit ratio, but zero limit disables a lot of essential
7312 synchronization among SMP workers, leading to HTTP violations (e.g.,
7313 stale hit responses). It also disables shared collapsed forwarding:
7314 A worker becomes unable to collapse its requests on transactions in
7315 other workers, resulting in more trips to the origin server and more
7316 cache thrashing.
7317DOC_END
7318
7319COMMENT_START
7320 TIMEOUTS
7321 -----------------------------------------------------------------------------
7322COMMENT_END
7323
7324NAME: forward_timeout
7325COMMENT: time-units
7326TYPE: time_t
7327LOC: Config.Timeout.forward
7328DEFAULT: 4 minutes
7329DOC_START
7330 This parameter specifies how long Squid should at most attempt in
7331 finding a forwarding path for the request before giving up.
7332DOC_END
7333
7334NAME: connect_timeout
7335COMMENT: time-units
7336TYPE: time_t
7337LOC: Config.Timeout.connect
7338DEFAULT: 1 minute
7339DOC_START
7340 This parameter specifies how long to wait for the TCP connect to
7341 the requested server or peer to complete before Squid should
7342 attempt to find another path where to forward the request.
7343DOC_END
7344
7345NAME: peer_connect_timeout
7346COMMENT: time-units
7347TYPE: time_t
7348LOC: Config.Timeout.peer_connect
7349DEFAULT: 30 seconds
7350DOC_START
7351 This parameter specifies how long to wait for a pending TCP
7352 connection to a peer cache. The default is 30 seconds. You
7353 may also set different timeout values for individual neighbors
7354 with the 'connect-timeout' option on a 'cache_peer' line.
7355DOC_END
7356
7357NAME: read_timeout
7358COMMENT: time-units
7359TYPE: time_t
7360LOC: Config.Timeout.read
7361DEFAULT: 15 minutes
7362DOC_START
7363 Applied on peer server connections.
7364
7365 After each successful read(), the timeout will be extended by this
7366 amount. If no data is read again after this amount of time,
7367 the request is aborted and logged with ERR_READ_TIMEOUT.
7368
7369 The default is 15 minutes.
7370DOC_END
7371
7372NAME: write_timeout
7373COMMENT: time-units
7374TYPE: time_t
7375LOC: Config.Timeout.write
7376DEFAULT: 15 minutes
7377DOC_START
7378 This timeout is tracked for all connections that have data
7379 available for writing and are waiting for the socket to become
7380 ready. After each successful write, the timeout is extended by
7381 the configured amount. If Squid has data to write but the
7382 connection is not ready for the configured duration, the
7383 transaction associated with the connection is terminated. The
7384 default is 15 minutes.
7385DOC_END
7386
7387NAME: request_timeout
7388TYPE: time_t
7389LOC: Config.Timeout.request
7390DEFAULT: 5 minutes
7391DOC_START
7392 How long to wait for complete HTTP request headers after initial
7393 connection establishment.
7394DOC_END
7395
7396NAME: request_start_timeout
7397TYPE: time_t
7398LOC: Config.Timeout.request_start_timeout
7399DEFAULT: 5 minutes
7400DOC_START
7401 How long to wait for the first request byte after initial
7402 connection establishment.
7403DOC_END
7404
7405NAME: client_idle_pconn_timeout persistent_request_timeout
7406TYPE: time_t
7407LOC: Config.Timeout.clientIdlePconn
7408DEFAULT: 2 minutes
7409DOC_START
7410 How long to wait for the next HTTP request on a persistent
7411 client connection after the previous request completes.
7412DOC_END
7413
7414NAME: ftp_client_idle_timeout
7415TYPE: time_t
7416LOC: Config.Timeout.ftpClientIdle
7417DEFAULT: 30 minutes
7418DOC_START
7419 How long to wait for an FTP request on a connection to Squid ftp_port.
7420 Many FTP clients do not deal with idle connection closures well,
7421 necessitating a longer default timeout than client_idle_pconn_timeout
7422 used for incoming HTTP requests.
7423DOC_END
7424
7425NAME: client_lifetime
7426COMMENT: time-units
7427TYPE: time_t
7428LOC: Config.Timeout.lifetime
7429DEFAULT: 1 day
7430DOC_START
7431 The maximum amount of time a client (browser) is allowed to
7432 remain connected to the cache process. This protects the Cache
7433 from having a lot of sockets (and hence file descriptors) tied up
7434 in a CLOSE_WAIT state from remote clients that go away without
7435 properly shutting down (either because of a network failure or
7436 because of a poor client implementation). The default is one
7437 day, 1440 minutes.
7438
7439 NOTE: The default value is intended to be much larger than any
7440 client would ever need to be connected to your cache. You
7441 should probably change client_lifetime only as a last resort.
7442 If you seem to have many client connections tying up
7443 filedescriptors, we recommend first tuning the read_timeout,
7444 request_timeout, persistent_request_timeout and quick_abort values.
7445DOC_END
7446
7447NAME: pconn_lifetime
7448COMMENT: time-units
7449TYPE: time_t
7450LOC: Config.Timeout.pconnLifetime
7451DEFAULT: 0 seconds
7452DOC_START
7453 Desired maximum lifetime of a persistent connection.
7454 When set, Squid will close a now-idle persistent connection that
7455 exceeded configured lifetime instead of moving the connection into
7456 the idle connection pool (or equivalent). No effect on ongoing/active
7457 transactions. Connection lifetime is the time period from the
7458 connection acceptance or opening time until "now".
7459
7460 This limit is useful in environments with long-lived connections
7461 where Squid configuration or environmental factors change during a
7462 single connection lifetime. If unrestricted, some connections may
7463 last for hours and even days, ignoring those changes that should
7464 have affected their behavior or their existence.
7465
7466 Currently, a new lifetime value supplied via Squid reconfiguration
7467 has no effect on already idle connections unless they become busy.
7468
7469 When set to '0' this limit is not used.
7470DOC_END
7471
7472NAME: half_closed_clients
7473TYPE: onoff
7474LOC: Config.onoff.half_closed_clients
7475DEFAULT: off
7476DOC_START
7477 Some clients may shutdown the sending side of their TCP
7478 connections, while leaving their receiving sides open. Sometimes,
7479 Squid can not tell the difference between a half-closed and a
7480 fully-closed TCP connection.
7481
7482 By default, Squid will immediately close client connections when
7483 read(2) returns "no more data to read."
7484
7485 Change this option to 'on' and Squid will keep open connections
7486 until a read(2) or write(2) on the socket returns an error.
7487 This may show some benefits for reverse proxies. But if not
7488 it is recommended to leave OFF.
7489DOC_END
7490
7491NAME: server_idle_pconn_timeout pconn_timeout
7492TYPE: time_t
7493LOC: Config.Timeout.serverIdlePconn
7494DEFAULT: 1 minute
7495DOC_START
7496 Timeout for idle persistent connections to servers and other
7497 proxies.
7498DOC_END
7499
7500NAME: shutdown_lifetime
7501COMMENT: time-units
7502TYPE: time_t
7503LOC: Config.shutdownLifetime
7504DEFAULT: 30 seconds
7505DOC_START
7506 When SIGTERM or SIGHUP is received, the cache is put into
7507 "shutdown pending" mode until all active sockets are closed.
7508 This value is the lifetime to set for all open descriptors
7509 during shutdown mode. Any active clients after this many
7510 seconds will receive a 'timeout' message.
7511DOC_END
7512
7513COMMENT_START
7514 ADMINISTRATIVE PARAMETERS
7515 -----------------------------------------------------------------------------
7516COMMENT_END
7517
7518NAME: cache_mgr
7519TYPE: string
7520DEFAULT: webmaster
7521LOC: Config.adminEmail
7522DOC_START
7523 Email-address of local cache manager who will receive
7524 mail if the cache dies. The default is "webmaster".
7525DOC_END
7526
7527NAME: mail_from
7528TYPE: string
7529DEFAULT: none
7530LOC: Config.EmailFrom
7531DOC_START
7532 From: email-address for mail sent when the cache dies.
7533 The default is to use 'squid@unique_hostname'.
7534
7535 See also: unique_hostname directive.
7536DOC_END
7537
7538NAME: mail_program
7539TYPE: eol
7540DEFAULT: mail
7541LOC: Config.EmailProgram
7542DOC_START
7543 Email program used to send mail if the cache dies.
7544 The default is "mail". The specified program must comply
7545 with the standard Unix mail syntax:
7546 mail-program recipient < mailfile
7547
7548 Optional command line options can be specified.
7549DOC_END
7550
7551NAME: cache_effective_user
7552TYPE: string
7553DEFAULT: @DEFAULT_CACHE_EFFECTIVE_USER@
7554LOC: Config.effectiveUser
7555DOC_START
7556 If you start Squid as root, it will change its effective/real
7557 UID/GID to the user specified below. The default is to change
7558 to UID of @DEFAULT_CACHE_EFFECTIVE_USER@.
7559 see also; cache_effective_group
7560DOC_END
7561
7562NAME: cache_effective_group
7563TYPE: string
7564DEFAULT: none
7565DEFAULT_DOC: Use system group memberships of the cache_effective_user account
7566LOC: Config.effectiveGroup
7567DOC_START
7568 Squid sets the GID to the effective user's default group ID
7569 (taken from the password file) and supplementary group list
7570 from the groups membership.
7571
7572 If you want Squid to run with a specific GID regardless of
7573 the group memberships of the effective user then set this
7574 to the group (or GID) you want Squid to run as. When set
7575 all other group privileges of the effective user are ignored
7576 and only this GID is effective. If Squid is not started as
7577 root the user starting Squid MUST be member of the specified
7578 group.
7579
7580 This option is not recommended by the Squid Team.
7581 Our preference is for administrators to configure a secure
7582 user account for squid with UID/GID matching system policies.
7583DOC_END
7584
7585NAME: httpd_suppress_version_string
7586COMMENT: on|off
7587TYPE: onoff
7588DEFAULT: off
7589LOC: Config.onoff.httpd_suppress_version_string
7590DOC_START
7591 Do not send Squid version string in HTTP metadata and generated content
7592 such as HTML error pages. Squid version string is still present in certain
7593 SNMP responses, HTTP(S) Server response header field,
7594 various console output, and cache.log.
7595DOC_END
7596
7597NAME: visible_hostname
7598TYPE: string
7599LOC: Config.visibleHostname
7600DEFAULT: none
7601DEFAULT_DOC: Automatically detect the system host name
7602DOC_START
7603 If you want to present a special hostname in error messages, etc,
7604 define this. Otherwise, the return value of gethostname()
7605 will be used. If you have multiple caches in a cluster and
7606 get errors about IP-forwarding you must set them to have individual
7607 names with this setting.
7608DOC_END
7609
7610NAME: unique_hostname
7611TYPE: string
7612LOC: Config.uniqueHostname
7613DEFAULT: none
7614DEFAULT_DOC: Copy the value from visible_hostname
7615DOC_START
7616 If you want to have multiple machines with the same
7617 'visible_hostname' you must give each machine a different
7618 'unique_hostname' so forwarding loops can be detected.
7619DOC_END
7620
7621NAME: hostname_aliases
7622TYPE: SBufList
7623LOC: Config.hostnameAliases
7624DEFAULT: none
7625DOC_START
7626 A list of other DNS names your cache has.
7627DOC_END
7628
7629NAME: umask
7630TYPE: int
7631LOC: Config.umask
7632DEFAULT: 027
7633DOC_START
7634 Minimum umask which should be enforced while the proxy
7635 is running, in addition to the umask set at startup.
7636
7637 For a traditional octal representation of umasks, start
7638 your value with 0.
7639DOC_END
7640
7641COMMENT_START
7642 HTTPD-ACCELERATOR OPTIONS
7643 -----------------------------------------------------------------------------
7644COMMENT_END
7645
7646NAME: httpd_accel_surrogate_id
7647TYPE: string
7648DEFAULT: none
7649DEFAULT_DOC: visible_hostname is used if no specific ID is set.
7650LOC: Config.Accel.surrogate_id
7651DOC_START
7652 Surrogates (http://www.esi.org/architecture_spec_1.0.html)
7653 need an identification token to allow control targeting. Because
7654 a farm of surrogates may all perform the same tasks, they may share
7655 an identification token.
7656
7657 When the surrogate is a reverse-proxy, this ID is also
7658 used as cdn-id for CDN-Loop detection (RFC 8586).
7659DOC_END
7660
7661NAME: http_accel_surrogate_remote
7662COMMENT: on|off
7663TYPE: onoff
7664DEFAULT: off
7665LOC: Config.onoff.surrogate_is_remote
7666DOC_START
7667 Remote surrogates (such as those in a CDN) honour the header
7668 "Surrogate-Control: no-store-remote".
7669
7670 Set this to on to have squid behave as a remote surrogate.
7671DOC_END
7672
7673COMMENT_START
7674 DELAY POOL PARAMETERS
7675 -----------------------------------------------------------------------------
7676COMMENT_END
7677
7678NAME: delay_pools
7679TYPE: delay_pool_count
7680DEFAULT: 0
7681IFDEF: USE_DELAY_POOLS
7682LOC: Config.Delay
7683DOC_START
7684 This represents the number of delay pools to be used. For example,
7685 if you have one class 2 delay pool and one class 3 delays pool, you
7686 have a total of 2 delay pools.
7687
7688 See also delay_parameters, delay_class, delay_access for pool
7689 configuration details.
7690DOC_END
7691
7692NAME: delay_class
7693TYPE: delay_pool_class
7694DEFAULT: none
7695IFDEF: USE_DELAY_POOLS
7696LOC: Config.Delay
7697DOC_START
7698 This defines the class of each delay pool. There must be exactly one
7699 delay_class line for each delay pool. For example, to define two
7700 delay pools, one of class 2 and one of class 3, the settings above
7701 and here would be:
7702
7703 Example:
7704 delay_pools 4 # 4 delay pools
7705 delay_class 1 2 # pool 1 is a class 2 pool
7706 delay_class 2 3 # pool 2 is a class 3 pool
7707 delay_class 3 4 # pool 3 is a class 4 pool
7708 delay_class 4 5 # pool 4 is a class 5 pool
7709
7710 The delay pool classes are:
7711
7712 class 1 Everything is limited by a single aggregate
7713 bucket.
7714
7715 class 2 Everything is limited by a single aggregate
7716 bucket as well as an "individual" bucket chosen
7717 from bits 25 through 32 of the IPv4 address.
7718
7719 class 3 Everything is limited by a single aggregate
7720 bucket as well as a "network" bucket chosen
7721 from bits 17 through 24 of the IP address and a
7722 "individual" bucket chosen from bits 17 through
7723 32 of the IPv4 address.
7724
7725 class 4 Everything in a class 3 delay pool, with an
7726 additional limit on a per user basis. This
7727 only takes effect if the username is established
7728 in advance - by forcing authentication in your
7729 http_access rules.
7730
7731 class 5 Requests are grouped according their tag (see
7732 external_acl's tag= reply).
7733
7734
7735 Each pool also requires a delay_parameters directive to configure the pool size
7736 and speed limits used whenever the pool is applied to a request. Along with
7737 a set of delay_access directives to determine when it is used.
7738
7739 NOTE: If an IP address is a.b.c.d
7740 -> bits 25 through 32 are "d"
7741 -> bits 17 through 24 are "c"
7742 -> bits 17 through 32 are "c * 256 + d"
7743
7744 NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to
7745 IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic.
7746
7747 This clause only supports fast acl types.
7748 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
7749
7750 See also delay_parameters and delay_access.
7751DOC_END
7752
7753NAME: delay_access
7754TYPE: delay_pool_access
7755DEFAULT: none
7756DEFAULT_DOC: Deny using the pool, unless allow rules exist in squid.conf for the pool.
7757IFDEF: USE_DELAY_POOLS
7758LOC: Config.Delay
7759DOC_START
7760 This is used to determine which delay pool a request falls into.
7761
7762 delay_access is sorted per pool and the matching starts with pool 1,
7763 then pool 2, ..., and finally pool N. The first delay pool where the
7764 request is allowed is selected for the request. If it does not allow
7765 the request to any pool then the request is not delayed (default).
7766
7767 For example, if you want some_big_clients in delay
7768 pool 1 and lotsa_little_clients in delay pool 2:
7769
7770 delay_access 1 allow some_big_clients
7771 delay_access 1 deny all
7772 delay_access 2 allow lotsa_little_clients
7773 delay_access 2 deny all
7774 delay_access 3 allow authenticated_clients
7775
7776 See also delay_parameters and delay_class.
7777
7778DOC_END
7779
7780NAME: delay_parameters
7781TYPE: delay_pool_rates
7782DEFAULT: none
7783IFDEF: USE_DELAY_POOLS
7784LOC: Config.Delay
7785DOC_START
7786 This defines the parameters for a delay pool. Each delay pool has
7787 a number of "buckets" associated with it, as explained in the
7788 description of delay_class.
7789
7790 For a class 1 delay pool, the syntax is:
7791 delay_class pool 1
7792 delay_parameters pool aggregate
7793
7794 For a class 2 delay pool:
7795 delay_class pool 2
7796 delay_parameters pool aggregate individual
7797
7798 For a class 3 delay pool:
7799 delay_class pool 3
7800 delay_parameters pool aggregate network individual
7801
7802 For a class 4 delay pool:
7803 delay_class pool 4
7804 delay_parameters pool aggregate network individual user
7805
7806 For a class 5 delay pool:
7807 delay_class pool 5
7808 delay_parameters pool tagrate
7809
7810 The option variables are:
7811
7812 pool a pool number - ie, a number between 1 and the
7813 number specified in delay_pools as used in
7814 delay_class lines.
7815
7816 aggregate the speed limit parameters for the aggregate bucket
7817 (class 1, 2, 3).
7818
7819 individual the speed limit parameters for the individual
7820 buckets (class 2, 3).
7821
7822 network the speed limit parameters for the network buckets
7823 (class 3).
7824
7825 user the speed limit parameters for the user buckets
7826 (class 4).
7827
7828 tagrate the speed limit parameters for the tag buckets
7829 (class 5).
7830
7831 A pair of delay parameters is written restore/maximum, where restore is
7832 the number of bytes (not bits - modem and network speeds are usually
7833 quoted in bits) per second placed into the bucket, and maximum is the
7834 maximum number of bytes which can be in the bucket at any time.
7835
7836 There must be one delay_parameters line for each delay pool.
7837
7838
7839 For example, if delay pool number 1 is a class 2 delay pool as in the
7840 above example, and is being used to strictly limit each host to 64Kbit/sec
7841 (plus overheads), with no overall limit, the line is:
7842
7843 delay_parameters 1 none 8000/8000
7844
7845 Note that 8 x 8K Byte/sec -> 64K bit/sec.
7846
7847 Note that the word 'none' is used to represent no limit.
7848
7849
7850 And, if delay pool number 2 is a class 3 delay pool as in the above
7851 example, and you want to limit it to a total of 256Kbit/sec (strict limit)
7852 with each 8-bit network permitted 64Kbit/sec (strict limit) and each
7853 individual host permitted 4800bit/sec with a bucket maximum size of 64Kbits
7854 to permit a decent web page to be downloaded at a decent speed
7855 (if the network is not being limited due to overuse) but slow down
7856 large downloads more significantly:
7857
7858 delay_parameters 2 32000/32000 8000/8000 600/8000
7859
7860 Note that 8 x 32K Byte/sec -> 256K bit/sec.
7861 8 x 8K Byte/sec -> 64K bit/sec.
7862 8 x 600 Byte/sec -> 4800 bit/sec.
7863
7864
7865 Finally, for a class 4 delay pool as in the example - each user will
7866 be limited to 128Kbits/sec no matter how many workstations they are logged into.:
7867
7868 delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
7869
7870
7871 See also delay_class and delay_access.
7872
7873DOC_END
7874
7875NAME: delay_initial_bucket_level
7876COMMENT: (percent, 0-100)
7877TYPE: u_short
7878DEFAULT: 50
7879IFDEF: USE_DELAY_POOLS
7880LOC: Config.Delay.initial
7881DOC_START
7882 The initial bucket percentage is used to determine how much is put
7883 in each bucket when squid starts, is reconfigured, or first notices
7884 a host accessing it (in class 2 and class 3, individual hosts and
7885 networks only have buckets associated with them once they have been
7886 "seen" by squid).
7887DOC_END
7888
7889COMMENT_START
7890 CLIENT DELAY POOL PARAMETERS
7891 -----------------------------------------------------------------------------
7892COMMENT_END
7893
7894NAME: client_delay_pools
7895TYPE: client_delay_pool_count
7896DEFAULT: 0
7897IFDEF: USE_DELAY_POOLS
7898LOC: Config.ClientDelay
7899DOC_START
7900 This option specifies the number of client delay pools used. It must
7901 preceed other client_delay_* options.
7902
7903 Example:
7904 client_delay_pools 2
7905
7906 See also client_delay_parameters and client_delay_access.
7907DOC_END
7908
7909NAME: client_delay_initial_bucket_level
7910COMMENT: (percent, 0-no_limit)
7911TYPE: u_short
7912DEFAULT: 50
7913IFDEF: USE_DELAY_POOLS
7914LOC: Config.ClientDelay.initial
7915DOC_START
7916 This option determines the initial bucket size as a percentage of
7917 max_bucket_size from client_delay_parameters. Buckets are created
7918 at the time of the "first" connection from the matching IP. Idle
7919 buckets are periodically deleted up.
7920
7921 You can specify more than 100 percent but note that such "oversized"
7922 buckets are not refilled until their size goes down to max_bucket_size
7923 from client_delay_parameters.
7924
7925 Example:
7926 client_delay_initial_bucket_level 50
7927DOC_END
7928
7929NAME: client_delay_parameters
7930TYPE: client_delay_pool_rates
7931DEFAULT: none
7932IFDEF: USE_DELAY_POOLS
7933LOC: Config.ClientDelay
7934DOC_START
7935
7936 This option configures client-side bandwidth limits using the
7937 following format:
7938
7939 client_delay_parameters pool speed_limit max_bucket_size
7940
7941 pool is an integer ID used for client_delay_access matching.
7942
7943 speed_limit is bytes added to the bucket per second.
7944
7945 max_bucket_size is the maximum size of a bucket, enforced after any
7946 speed_limit additions.
7947
7948 Please see the delay_parameters option for more information and
7949 examples.
7950
7951 Example:
7952 client_delay_parameters 1 1024 2048
7953 client_delay_parameters 2 51200 16384
7954
7955 See also client_delay_access.
7956
7957DOC_END
7958
7959NAME: client_delay_access
7960TYPE: client_delay_pool_access
7961DEFAULT: none
7962DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool.
7963IFDEF: USE_DELAY_POOLS
7964LOC: Config.ClientDelay
7965DOC_START
7966 This option determines the client-side delay pool for the
7967 request:
7968
7969 client_delay_access pool_ID allow|deny acl_name
7970
7971 All client_delay_access options are checked in their pool ID
7972 order, starting with pool 1. The first checked pool with allowed
7973 request is selected for the request. If no ACL matches or there
7974 are no client_delay_access options, the request bandwidth is not
7975 limited.
7976
7977 The ACL-selected pool is then used to find the
7978 client_delay_parameters for the request. Client-side pools are
7979 not used to aggregate clients. Clients are always aggregated
7980 based on their source IP addresses (one bucket per source IP).
7981
7982 This clause only supports fast acl types.
7983 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
7984 Additionally, only the client TCP connection details are available.
7985 ACLs testing HTTP properties will not work.
7986
7987 Please see delay_access for more examples.
7988
7989 Example:
7990 client_delay_access 1 allow low_rate_network
7991 client_delay_access 2 allow vips_network
7992
7993
7994 See also client_delay_parameters and client_delay_pools.
7995DOC_END
7996
7997NAME: response_delay_pool
7998TYPE: response_delay_pool_parameters
7999DEFAULT: none
8000IFDEF: USE_DELAY_POOLS
8001LOC: Config.MessageDelay
8002DOC_START
8003 This option configures client response bandwidth limits using the
8004 following format:
8005
8006 response_delay_pool name [option=value] ...
8007
8008 name the response delay pool name
8009
8010 available options:
8011
8012 individual-restore The speed limit of an individual
8013 bucket(bytes/s). To be used in conjunction
8014 with 'individual-maximum'.
8015
8016 individual-maximum The maximum number of bytes which can
8017 be placed into the individual bucket. To be used
8018 in conjunction with 'individual-restore'.
8019
8020 aggregate-restore The speed limit for the aggregate
8021 bucket(bytes/s). To be used in conjunction with
8022 'aggregate-maximum'.
8023
8024 aggregate-maximum The maximum number of bytes which can
8025 be placed into the aggregate bucket. To be used
8026 in conjunction with 'aggregate-restore'.
8027
8028 initial-bucket-level The initial bucket size as a percentage
8029 of individual-maximum.
8030
8031 Individual and(or) aggregate bucket options may not be specified,
8032 meaning no individual and(or) aggregate speed limitation.
8033 See also response_delay_pool_access and delay_parameters for
8034 terminology details.
8035DOC_END
8036
8037NAME: response_delay_pool_access
8038TYPE: response_delay_pool_access
8039DEFAULT: none
8040DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool.
8041IFDEF: USE_DELAY_POOLS
8042LOC: Config.MessageDelay
8043DOC_START
8044 Determines whether a specific named response delay pool is used
8045 for the transaction. The syntax for this directive is:
8046
8047 response_delay_pool_access pool_name allow|deny acl_name
8048
8049 All response_delay_pool_access options are checked in the order
8050 they appear in this configuration file. The first rule with a
8051 matching ACL wins. If (and only if) an "allow" rule won, Squid
8052 assigns the response to the corresponding named delay pool.
8053DOC_END
8054
8055COMMENT_START
8056 WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
8057 -----------------------------------------------------------------------------
8058COMMENT_END
8059
8060NAME: wccp_router
8061TYPE: address
8062LOC: Config.Wccp.router
8063DEFAULT: any_addr
8064DEFAULT_DOC: WCCP disabled.
8065IFDEF: USE_WCCP
8066DOC_START
8067 Use this option to define your WCCP ``home'' router for
8068 Squid.
8069
8070 wccp_router supports a single WCCP(v1) router
8071
8072 wccp2_router supports multiple WCCPv2 routers
8073
8074 only one of the two may be used at the same time and defines
8075 which version of WCCP to use.
8076DOC_END
8077
8078NAME: wccp2_router
8079TYPE: IpAddress_list
8080LOC: Config.Wccp2.router
8081DEFAULT: none
8082DEFAULT_DOC: WCCPv2 disabled.
8083IFDEF: USE_WCCPv2
8084DOC_START
8085 Use this option to define your WCCP ``home'' router for
8086 Squid.
8087
8088 wccp_router supports a single WCCP(v1) router
8089
8090 wccp2_router supports multiple WCCPv2 routers
8091
8092 only one of the two may be used at the same time and defines
8093 which version of WCCP to use.
8094DOC_END
8095
8096NAME: wccp_version
8097TYPE: int
8098LOC: Config.Wccp.version
8099DEFAULT: 4
8100IFDEF: USE_WCCP
8101DOC_START
8102 This directive is only relevant if you need to set up WCCP(v1)
8103 to some very old and end-of-life Cisco routers. In all other
8104 setups it must be left unset or at the default setting.
8105 It defines an internal version in the WCCP(v1) protocol,
8106 with version 4 being the officially documented protocol.
8107
8108 According to some users, Cisco IOS 11.2 and earlier only
8109 support WCCP version 3. If you're using that or an earlier
8110 version of IOS, you may need to change this value to 3, otherwise
8111 do not specify this parameter.
8112DOC_END
8113
8114NAME: wccp2_rebuild_wait
8115TYPE: onoff
8116LOC: Config.Wccp2.rebuildwait
8117DEFAULT: on
8118IFDEF: USE_WCCPv2
8119DOC_START
8120 If this is enabled Squid will wait for the cache dir rebuild to finish
8121 before sending the first wccp2 HereIAm packet
8122DOC_END
8123
8124NAME: wccp2_forwarding_method
8125TYPE: wccp2_method
8126LOC: Config.Wccp2.forwarding_method
8127DEFAULT: gre
8128IFDEF: USE_WCCPv2
8129DOC_START
8130 WCCP2 allows the setting of forwarding methods between the
8131 router/switch and the cache. Valid values are as follows:
8132
8133 gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
8134 l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
8135
8136 Currently (as of IOS 12.4) cisco routers only support GRE.
8137 Cisco switches only support the L2 redirect assignment method.
8138DOC_END
8139
8140NAME: wccp2_return_method
8141TYPE: wccp2_method
8142LOC: Config.Wccp2.return_method
8143DEFAULT: gre
8144IFDEF: USE_WCCPv2
8145DOC_START
8146 WCCP2 allows the setting of return methods between the
8147 router/switch and the cache for packets that the cache
8148 decides not to handle. Valid values are as follows:
8149
8150 gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
8151 l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
8152
8153 Currently (as of IOS 12.4) cisco routers only support GRE.
8154 Cisco switches only support the L2 redirect assignment.
8155
8156 If the "ip wccp redirect exclude in" command has been
8157 enabled on the cache interface, then it is still safe for
8158 the proxy server to use a l2 redirect method even if this
8159 option is set to GRE.
8160DOC_END
8161
8162NAME: wccp2_assignment_method
8163TYPE: wccp2_amethod
8164LOC: Config.Wccp2.assignment_method
8165DEFAULT: hash
8166IFDEF: USE_WCCPv2
8167DOC_START
8168 WCCP2 allows the setting of methods to assign the WCCP hash
8169 Valid values are as follows:
8170
8171 hash - Hash assignment
8172 mask - Mask assignment
8173
8174 As a general rule, cisco routers support the hash assignment method
8175 and cisco switches support the mask assignment method.
8176DOC_END
8177
8178NAME: wccp2_service
8179TYPE: wccp2_service
8180LOC: Config.Wccp2.info
8181DEFAULT_IF_NONE: standard 0
8182DEFAULT_DOC: Use the 'web-cache' standard service.
8183IFDEF: USE_WCCPv2
8184DOC_START
8185 WCCP2 allows for multiple traffic services. There are two
8186 types: "standard" and "dynamic". The standard type defines
8187 one service id - http (id 0). The dynamic service ids can be from
8188 51 to 255 inclusive. In order to use a dynamic service id
8189 one must define the type of traffic to be redirected; this is done
8190 using the wccp2_service_info option.
8191
8192 The "standard" type does not require a wccp2_service_info option,
8193 just specifying the service id will suffice.
8194
8195 MD5 service authentication can be enabled by adding
8196 "password=<password>" to the end of this service declaration.
8197
8198 Examples:
8199
8200 wccp2_service standard 0 # for the 'web-cache' standard service
8201 wccp2_service dynamic 80 # a dynamic service type which will be
8202 # fleshed out with subsequent options.
8203 wccp2_service standard 0 password=foo
8204DOC_END
8205
8206NAME: wccp2_service_info
8207TYPE: wccp2_service_info
8208LOC: Config.Wccp2.info
8209DEFAULT: none
8210IFDEF: USE_WCCPv2
8211DOC_START
8212 Dynamic WCCPv2 services require further information to define the
8213 traffic you wish to have diverted.
8214
8215 The format is:
8216
8217 wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
8218 priority=<priority> ports=<port>,<port>..
8219
8220 The relevant WCCPv2 flags:
8221 + src_ip_hash, dst_ip_hash
8222 + source_port_hash, dst_port_hash
8223 + src_ip_alt_hash, dst_ip_alt_hash
8224 + src_port_alt_hash, dst_port_alt_hash
8225 + ports_source
8226
8227 The port list can be one to eight entries.
8228
8229 Example:
8230
8231 wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
8232 priority=240 ports=80
8233
8234 Note: the service id must have been defined by a previous
8235 'wccp2_service dynamic <id>' entry.
8236DOC_END
8237
8238NAME: wccp2_weight
8239TYPE: int
8240LOC: Config.Wccp2.weight
8241DEFAULT: 10000
8242IFDEF: USE_WCCPv2
8243DOC_START
8244 Each cache server gets assigned a set of the destination
8245 hash proportional to their weight.
8246DOC_END
8247
8248NAME: wccp_address
8249TYPE: address
8250LOC: Config.Wccp.address
8251DEFAULT: 0.0.0.0
8252DEFAULT_DOC: Address selected by the operating system.
8253IFDEF: USE_WCCP
8254DOC_START
8255 Use this option if you require WCCP(v1) to use a specific
8256 interface address.
8257
8258 The default behavior is to not bind to any specific address.
8259DOC_END
8260
8261NAME: wccp2_address
8262TYPE: address
8263LOC: Config.Wccp2.address
8264DEFAULT: 0.0.0.0
8265DEFAULT_DOC: Address selected by the operating system.
8266IFDEF: USE_WCCPv2
8267DOC_START
8268 Use this option if you require WCCPv2 to use a specific
8269 interface address.
8270
8271 The default behavior is to not bind to any specific address.
8272DOC_END
8273
8274COMMENT_START
8275 PERSISTENT CONNECTION HANDLING
8276 -----------------------------------------------------------------------------
8277
8278 Also see "pconn_timeout" in the TIMEOUTS section
8279COMMENT_END
8280
8281NAME: client_persistent_connections
8282TYPE: onoff
8283LOC: Config.onoff.client_pconns
8284DEFAULT: on
8285DOC_START
8286 Persistent connection support for clients.
8287 Squid uses persistent connections (when allowed). You can use
8288 this option to disable persistent connections with clients.
8289DOC_END
8290
8291NAME: server_persistent_connections
8292TYPE: onoff
8293LOC: Config.onoff.server_pconns
8294DEFAULT: on
8295DOC_START
8296 Persistent connection support for servers.
8297 Squid uses persistent connections (when allowed). You can use
8298 this option to disable persistent connections with servers.
8299DOC_END
8300
8301NAME: persistent_connection_after_error
8302TYPE: onoff
8303LOC: Config.onoff.error_pconns
8304DEFAULT: on
8305DOC_START
8306 With this directive the use of persistent connections after
8307 HTTP errors can be disabled. Useful if you have clients
8308 who fail to handle errors on persistent connections proper.
8309DOC_END
8310
8311NAME: detect_broken_pconn
8312TYPE: onoff
8313LOC: Config.onoff.detect_broken_server_pconns
8314DEFAULT: off
8315DOC_START
8316 Some servers have been found to incorrectly signal the use
8317 of HTTP/1.0 persistent connections even on replies not
8318 compatible, causing significant delays. This server problem
8319 has mostly been seen on redirects.
8320
8321 By enabling this directive Squid attempts to detect such
8322 broken replies and automatically assume the reply is finished
8323 after 10 seconds timeout.
8324DOC_END
8325
8326COMMENT_START
8327 CACHE DIGEST OPTIONS
8328 -----------------------------------------------------------------------------
8329COMMENT_END
8330
8331NAME: digest_generation
8332IFDEF: USE_CACHE_DIGESTS
8333TYPE: onoff
8334LOC: Config.onoff.digest_generation
8335DEFAULT: on
8336DOC_START
8337 This controls whether the server will generate a Cache Digest
8338 of its contents. By default, Cache Digest generation is
8339 enabled if Squid is compiled with --enable-cache-digests defined.
8340DOC_END
8341
8342NAME: digest_bits_per_entry
8343IFDEF: USE_CACHE_DIGESTS
8344TYPE: int
8345LOC: Config.digest.bits_per_entry
8346DEFAULT: 5
8347DOC_START
8348 This is the number of bits of the server's Cache Digest which
8349 will be associated with the Digest entry for a given HTTP
8350 Method and URL (public key) combination. The default is 5.
8351DOC_END
8352
8353NAME: digest_rebuild_period
8354IFDEF: USE_CACHE_DIGESTS
8355COMMENT: (seconds)
8356TYPE: time_t
8357LOC: Config.digest.rebuild_period
8358DEFAULT: 1 hour
8359DOC_START
8360 This is the wait time between Cache Digest rebuilds.
8361DOC_END
8362
8363NAME: digest_rewrite_period
8364COMMENT: (seconds)
8365IFDEF: USE_CACHE_DIGESTS
8366TYPE: time_t
8367LOC: Config.digest.rewrite_period
8368DEFAULT: 1 hour
8369DOC_START
8370 This is the wait time between Cache Digest writes to
8371 disk.
8372DOC_END
8373
8374NAME: digest_swapout_chunk_size
8375COMMENT: (bytes)
8376TYPE: b_size_t
8377IFDEF: USE_CACHE_DIGESTS
8378LOC: Config.digest.swapout_chunk_size
8379DEFAULT: 4096 bytes
8380DOC_START
8381 This is the number of bytes of the Cache Digest to write to
8382 disk at a time. It defaults to 4096 bytes (4KB), the Squid
8383 default swap page.
8384DOC_END
8385
8386NAME: digest_rebuild_chunk_percentage
8387COMMENT: (percent, 0-100)
8388IFDEF: USE_CACHE_DIGESTS
8389TYPE: int
8390LOC: Config.digest.rebuild_chunk_percentage
8391DEFAULT: 10
8392DOC_START
8393 This is the percentage of the Cache Digest to be scanned at a
8394 time. By default it is set to 10% of the Cache Digest.
8395DOC_END
8396
8397COMMENT_START
8398 SNMP OPTIONS
8399 -----------------------------------------------------------------------------
8400COMMENT_END
8401
8402NAME: snmp_port
8403TYPE: u_short
8404LOC: Config.Port.snmp
8405DEFAULT: 0
8406DEFAULT_DOC: SNMP disabled.
8407IFDEF: SQUID_SNMP
8408DOC_START
8409 The port number where Squid listens for SNMP requests. To enable
8410 SNMP support set this to a suitable port number. Port number
8411 3401 is often used for the Squid SNMP agent. By default it's
8412 set to "0" (disabled)
8413
8414 Example:
8415 snmp_port 3401
8416DOC_END
8417
8418NAME: snmp_access
8419TYPE: acl_access
8420LOC: Config.accessList.snmp
8421DEFAULT: none
8422DEFAULT_DOC: Deny, unless rules exist in squid.conf.
8423IFDEF: SQUID_SNMP
8424DOC_START
8425 Allowing or denying access to the SNMP port.
8426
8427 All access to the agent is denied by default.
8428 usage:
8429
8430 snmp_access allow|deny [!]aclname ...
8431
8432 This clause only supports fast acl types.
8433 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
8434
8435Example:
8436 snmp_access allow snmppublic localhost
8437 snmp_access deny all
8438DOC_END
8439
8440NAME: snmp_incoming_address
8441TYPE: address
8442LOC: Config.Addrs.snmp_incoming
8443DEFAULT: any_addr
8444DEFAULT_DOC: Accept SNMP packets from all machine interfaces.
8445IFDEF: SQUID_SNMP
8446DOC_START
8447 Just like 'udp_incoming_address', but for the SNMP port.
8448
8449 snmp_incoming_address is used for the SNMP socket receiving
8450 messages from SNMP agents.
8451
8452 The default snmp_incoming_address is to listen on all
8453 available network interfaces.
8454DOC_END
8455
8456NAME: snmp_outgoing_address
8457TYPE: address
8458LOC: Config.Addrs.snmp_outgoing
8459DEFAULT: no_addr
8460DEFAULT_DOC: Use snmp_incoming_address or an address selected by the operating system.
8461IFDEF: SQUID_SNMP
8462DOC_START
8463 Just like 'udp_outgoing_address', but for the SNMP port.
8464
8465 snmp_outgoing_address is used for SNMP packets returned to SNMP
8466 agents.
8467
8468 If snmp_outgoing_address is not set it will use the same socket
8469 as snmp_incoming_address. Only change this if you want to have
8470 SNMP replies sent using another address than where this Squid
8471 listens for SNMP queries.
8472
8473 NOTE, snmp_incoming_address and snmp_outgoing_address can not have
8474 the same value since they both use the same port.
8475DOC_END
8476
8477COMMENT_START
8478 ICP OPTIONS
8479 -----------------------------------------------------------------------------
8480COMMENT_END
8481
8482NAME: icp_port udp_port
8483TYPE: u_short
8484DEFAULT: 0
8485DEFAULT_DOC: ICP disabled.
8486LOC: Config.Port.icp
8487DOC_START
8488 The port number where Squid sends and receives ICP queries to
8489 and from neighbor caches. The standard UDP port for ICP is 3130.
8490
8491 Example:
8492 icp_port 3130
8493DOC_END
8494
8495NAME: htcp_port
8496IFDEF: USE_HTCP
8497TYPE: u_short
8498DEFAULT: 0
8499DEFAULT_DOC: HTCP disabled.
8500LOC: Config.Port.htcp
8501DOC_START
8502 The port number where Squid sends and receives HTCP queries to
8503 and from neighbor caches. To turn it on you want to set it to
8504 4827.
8505
8506 Example:
8507 htcp_port 4827
8508DOC_END
8509
8510NAME: log_icp_queries
8511COMMENT: on|off
8512TYPE: onoff
8513DEFAULT: on
8514LOC: Config.onoff.log_udp
8515DOC_START
8516 If set, ICP queries are logged to access.log. You may wish
8517 do disable this if your ICP load is VERY high to speed things
8518 up or to simplify log analysis.
8519DOC_END
8520
8521NAME: udp_incoming_address
8522TYPE: address
8523LOC:Config.Addrs.udp_incoming
8524DEFAULT: any_addr
8525DEFAULT_DOC: Accept packets from all machine interfaces.
8526DOC_START
8527 udp_incoming_address is used for UDP packets received from other
8528 caches.
8529
8530 The default behavior is to not bind to any specific address.
8531
8532 Only change this if you want to have all UDP queries received on
8533 a specific interface/address.
8534
8535 NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS
8536 modules. Altering it will affect all of them in the same manner.
8537
8538 see also; udp_outgoing_address
8539
8540 NOTE, udp_incoming_address and udp_outgoing_address can not
8541 have the same value since they both use the same port.
8542DOC_END
8543
8544NAME: udp_outgoing_address
8545TYPE: address
8546LOC: Config.Addrs.udp_outgoing
8547DEFAULT: no_addr
8548DEFAULT_DOC: Use udp_incoming_address or an address selected by the operating system.
8549DOC_START
8550 udp_outgoing_address is used for UDP packets sent out to other
8551 caches.
8552
8553 The default behavior is to not bind to any specific address.
8554
8555 Instead it will use the same socket as udp_incoming_address.
8556 Only change this if you want to have UDP queries sent using another
8557 address than where this Squid listens for UDP queries from other
8558 caches.
8559
8560 NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS
8561 modules. Altering it will affect all of them in the same manner.
8562
8563 see also; udp_incoming_address
8564
8565 NOTE, udp_incoming_address and udp_outgoing_address can not
8566 have the same value since they both use the same port.
8567DOC_END
8568
8569NAME: icp_hit_stale
8570COMMENT: on|off
8571TYPE: onoff
8572DEFAULT: off
8573LOC: Config.onoff.icp_hit_stale
8574DOC_START
8575 If you want to return ICP_HIT for stale cache objects, set this
8576 option to 'on'. If you have sibling relationships with caches
8577 in other administrative domains, this should be 'off'. If you only
8578 have sibling relationships with caches under your control,
8579 it is probably okay to set this to 'on'.
8580 If set to 'on', your siblings should use the option "allow-miss"
8581 on their cache_peer lines for connecting to you.
8582DOC_END
8583
8584NAME: minimum_direct_hops
8585TYPE: int
8586DEFAULT: 4
8587LOC: Config.minDirectHops
8588DOC_START
8589 If using the ICMP pinging stuff, do direct fetches for sites
8590 which are no more than this many hops away.
8591DOC_END
8592
8593NAME: minimum_direct_rtt
8594COMMENT: (msec)
8595TYPE: int
8596DEFAULT: 400
8597LOC: Config.minDirectRtt
8598DOC_START
8599 If using the ICMP pinging stuff, do direct fetches for sites
8600 which are no more than this many rtt milliseconds away.
8601DOC_END
8602
8603NAME: netdb_low
8604TYPE: int
8605DEFAULT: 900
8606LOC: Config.Netdb.low
8607DOC_START
8608 The low water mark for the ICMP measurement database.
8609
8610 Note: high watermark controlled by netdb_high directive.
8611
8612 These watermarks are counts, not percents. The defaults are
8613 (low) 900 and (high) 1000. When the high water mark is
8614 reached, database entries will be deleted until the low
8615 mark is reached.
8616DOC_END
8617
8618NAME: netdb_high
8619TYPE: int
8620DEFAULT: 1000
8621LOC: Config.Netdb.high
8622DOC_START
8623 The high water mark for the ICMP measurement database.
8624
8625 Note: low watermark controlled by netdb_low directive.
8626
8627 These watermarks are counts, not percents. The defaults are
8628 (low) 900 and (high) 1000. When the high water mark is
8629 reached, database entries will be deleted until the low
8630 mark is reached.
8631DOC_END
8632
8633NAME: netdb_ping_period
8634TYPE: time_t
8635LOC: Config.Netdb.period
8636DEFAULT: 5 minutes
8637DOC_START
8638 The minimum period for measuring a site. There will be at
8639 least this much delay between successive pings to the same
8640 network. The default is five minutes.
8641DOC_END
8642
8643NAME: query_icmp
8644COMMENT: on|off
8645TYPE: onoff
8646DEFAULT: off
8647LOC: Config.onoff.query_icmp
8648DOC_START
8649 If you want to ask your peers to include ICMP data in their ICP
8650 replies, enable this option.
8651
8652 If your peer has configured Squid (during compilation) with
8653 '--enable-icmp' that peer will send ICMP pings to origin server
8654 sites of the URLs it receives. If you enable this option the
8655 ICP replies from that peer will include the ICMP data (if available).
8656 Then, when choosing a parent cache, Squid will choose the parent with
8657 the minimal RTT to the origin server. When this happens, the
8658 hierarchy field of the access.log will be
8659 "CLOSEST_PARENT_MISS". This option is off by default.
8660DOC_END
8661
8662NAME: test_reachability
8663COMMENT: on|off
8664TYPE: onoff
8665DEFAULT: off
8666LOC: Config.onoff.test_reachability
8667DOC_START
8668 When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
8669 instead of ICP_MISS if the target host is NOT in the ICMP
8670 database, or has a zero RTT.
8671DOC_END
8672
8673NAME: icp_query_timeout
8674COMMENT: (msec)
8675DEFAULT: 0
8676DEFAULT_DOC: Dynamic detection.
8677TYPE: int
8678LOC: Config.Timeout.icp_query
8679DOC_START
8680 Normally Squid will automatically determine an optimal ICP
8681 query timeout value based on the round-trip-time of recent ICP
8682 queries. If you want to override the value determined by
8683 Squid, set this 'icp_query_timeout' to a non-zero value. This
8684 value is specified in MILLISECONDS, so, to use a 2-second
8685 timeout (the old default), you would write:
8686
8687 icp_query_timeout 2000
8688DOC_END
8689
8690NAME: maximum_icp_query_timeout
8691COMMENT: (msec)
8692DEFAULT: 2000
8693TYPE: int
8694LOC: Config.Timeout.icp_query_max
8695DOC_START
8696 Normally the ICP query timeout is determined dynamically. But
8697 sometimes it can lead to very large values (say 5 seconds).
8698 Use this option to put an upper limit on the dynamic timeout
8699 value. Do NOT use this option to always use a fixed (instead
8700 of a dynamic) timeout value. To set a fixed timeout see the
8701 'icp_query_timeout' directive.
8702DOC_END
8703
8704NAME: minimum_icp_query_timeout
8705COMMENT: (msec)
8706DEFAULT: 5
8707TYPE: int
8708LOC: Config.Timeout.icp_query_min
8709DOC_START
8710 Normally the ICP query timeout is determined dynamically. But
8711 sometimes it can lead to very small timeouts, even lower than
8712 the normal latency variance on your link due to traffic.
8713 Use this option to put an lower limit on the dynamic timeout
8714 value. Do NOT use this option to always use a fixed (instead
8715 of a dynamic) timeout value. To set a fixed timeout see the
8716 'icp_query_timeout' directive.
8717DOC_END
8718
8719NAME: background_ping_rate
8720COMMENT: time-units
8721TYPE: time_t
8722DEFAULT: 10 seconds
8723LOC: Config.backgroundPingRate
8724DOC_START
8725 Controls how often the ICP pings are sent to siblings that
8726 have background-ping set.
8727DOC_END
8728
8729COMMENT_START
8730 MULTICAST ICP OPTIONS
8731 -----------------------------------------------------------------------------
8732COMMENT_END
8733
8734NAME: mcast_groups
8735TYPE: wordlist
8736LOC: Config.mcast_group_list
8737DEFAULT: none
8738DOC_START
8739 This tag specifies a list of multicast groups which your server
8740 should join to receive multicasted ICP queries.
8741
8742 NOTE! Be very careful what you put here! Be sure you
8743 understand the difference between an ICP _query_ and an ICP
8744 _reply_. This option is to be set only if you want to RECEIVE
8745 multicast queries. Do NOT set this option to SEND multicast
8746 ICP (use cache_peer for that). ICP replies are always sent via
8747 unicast, so this option does not affect whether or not you will
8748 receive replies from multicast group members.
8749
8750 You must be very careful to NOT use a multicast address which
8751 is already in use by another group of caches.
8752
8753 If you are unsure about multicast, please read the Multicast
8754 chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
8755
8756 Usage: mcast_groups 239.128.16.128 224.0.1.20
8757
8758 By default, Squid doesn't listen on any multicast groups.
8759DOC_END
8760
8761NAME: mcast_icp_query_timeout
8762COMMENT: (msec)
8763DEFAULT: 2000
8764TYPE: int
8765LOC: Config.Timeout.mcast_icp_query
8766DOC_START
8767 For multicast peers, Squid regularly sends out ICP "probes" to
8768 count how many other peers are listening on the given multicast
8769 address. This value specifies how long Squid should wait to
8770 count all the replies. The default is 2000 msec, or 2
8771 seconds.
8772DOC_END
8773
8774COMMENT_START
8775 INTERNAL ICON OPTIONS
8776 -----------------------------------------------------------------------------
8777COMMENT_END
8778
8779NAME: icon_directory
8780TYPE: string
8781LOC: Config.icons.directory
8782DEFAULT: @DEFAULT_ICON_DIR@
8783DOC_START
8784 Where the icons are stored. These are normally kept in
8785 @DEFAULT_ICON_DIR@
8786DOC_END
8787
8788NAME: global_internal_static
8789TYPE: onoff
8790LOC: Config.onoff.global_internal_static
8791DEFAULT: on
8792DOC_START
8793 This directive controls is Squid should intercept all requests for
8794 /squid-internal-static/ no matter which host the URL is requesting
8795 (default on setting), or if nothing special should be done for
8796 such URLs (off setting). The purpose of this directive is to make
8797 icons etc work better in complex cache hierarchies where it may
8798 not always be possible for all corners in the cache mesh to reach
8799 the server generating a directory listing.
8800DOC_END
8801
8802NAME: short_icon_urls
8803TYPE: onoff
8804LOC: Config.icons.use_short_names
8805DEFAULT: on
8806DOC_START
8807 If this is enabled Squid will use short URLs for icons.
8808 If disabled it will revert to the old behavior of including
8809 it's own name and port in the URL.
8810
8811 If you run a complex cache hierarchy with a mix of Squid and
8812 other proxies you may need to disable this directive.
8813DOC_END
8814
8815COMMENT_START
8816 ERROR PAGE OPTIONS
8817 -----------------------------------------------------------------------------
8818COMMENT_END
8819
8820NAME: error_directory
8821TYPE: string
8822LOC: Config.errorDirectory
8823DEFAULT: none
8824DEFAULT_DOC: Send error pages in the clients preferred language
8825DOC_START
8826 If you wish to create your own versions of the default
8827 error files to customize them to suit your company copy
8828 the error/template files to another directory and point
8829 this tag at them.
8830
8831 WARNING: This option will disable multi-language support
8832 on error pages if used.
8833
8834 The squid developers are interested in making squid available in
8835 a wide variety of languages. If you are making translations for a
8836 language that Squid does not currently provide please consider
8837 contributing your translation back to the project.
8838 https://wiki.squid-cache.org/Translations
8839
8840 The squid developers working on translations are happy to supply drop-in
8841 translated error files in exchange for any new language contributions.
8842DOC_END
8843
8844NAME: error_default_language
8845IFDEF: USE_ERR_LOCALES
8846TYPE: string
8847LOC: Config.errorDefaultLanguage
8848DEFAULT: none
8849DEFAULT_DOC: Generate English language pages.
8850DOC_START
8851 Set the default language which squid will send error pages in
8852 if no existing translation matches the clients language
8853 preferences.
8854
8855 If unset (default) generic English will be used.
8856
8857 The squid developers are interested in making squid available in
8858 a wide variety of languages. If you are interested in making
8859 translations for any language see the squid wiki for details.
8860 https://wiki.squid-cache.org/Translations
8861DOC_END
8862
8863NAME: error_log_languages
8864IFDEF: USE_ERR_LOCALES
8865TYPE: onoff
8866LOC: Config.errorLogMissingLanguages
8867DEFAULT: on
8868DOC_START
8869 Log to cache.log what languages users are attempting to
8870 auto-negotiate for translations.
8871
8872 Successful negotiations are not logged. Only failures
8873 have meaning to indicate that Squid may need an upgrade
8874 of its error page translations.
8875DOC_END
8876
8877NAME: err_page_stylesheet
8878TYPE: string
8879LOC: Config.errorStylesheet
8880DEFAULT: @DEFAULT_CONFIG_DIR@/errorpage.css
8881DOC_START
8882 CSS Stylesheet to pattern the display of Squid default error pages.
8883
8884 For information on CSS see http://www.w3.org/Style/CSS/
8885DOC_END
8886
8887NAME: err_html_text
8888TYPE: eol
8889LOC: Config.errHtmlText
8890DEFAULT: none
8891DOC_START
8892 HTML text to include in error messages. Make this a "mailto"
8893 URL to your admin address, or maybe just a link to your
8894 organizations Web page.
8895
8896 To include this in your error messages, you must rewrite
8897 the error template files (found in the "errors" directory).
8898 Wherever you want the 'err_html_text' line to appear,
8899 insert a %L tag in the error template file.
8900DOC_END
8901
8902NAME: email_err_data
8903COMMENT: on|off
8904TYPE: onoff
8905LOC: Config.onoff.emailErrData
8906DEFAULT: off
8907DOC_START
8908 If enabled, information about the occurred error will be
8909 included in the mailto links of the ERR pages (if %W is set)
8910 so that the email body contains the data.
8911 Syntax is <A HREF="mailto:%w%W">%w</A>
8912
8913 SECURITY WARNING:
8914 Request headers and other included facts may contain
8915 sensitive information about transaction history, the
8916 Squid instance, and its environment which would be
8917 unavailable to error recipients otherwise.
8918DOC_END
8919
8920NAME: deny_info
8921TYPE: denyinfo
8922LOC: Config.denyInfoList
8923DEFAULT: none
8924DOC_START
8925 Usage: deny_info err_page_name acl
8926 or deny_info http://... acl
8927 or deny_info TCP_RESET acl
8928
8929 This can be used to return a ERR_ page for requests which
8930 do not pass the 'http_access' rules. Squid remembers the last
8931 acl it evaluated in http_access, and if a 'deny_info' line exists
8932 for that ACL Squid returns a corresponding error page.
8933
8934 The acl is typically the last acl on the http_access deny line which
8935 denied access. The exceptions to this rule are:
8936 - When Squid needs to request authentication credentials. It's then
8937 the first authentication related acl encountered
8938 - When none of the http_access lines matches. It's then the last
8939 acl processed on the last http_access line.
8940 - When the decision to deny access was made by an adaptation service,
8941 the acl name is the corresponding eCAP or ICAP service_name.
8942
8943 NP: If providing your own custom error pages with error_directory
8944 you may also specify them by your custom file name:
8945 Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
8946
8947 By default Squid will send "403 Forbidden". A different 4xx or 5xx
8948 may be specified by prefixing the file name with the code and a colon.
8949 e.g. 404:ERR_CUSTOM_ACCESS_DENIED
8950
8951 Alternatively you can tell Squid to reset the TCP connection
8952 by specifying TCP_RESET.
8953
8954 Or you can specify an error URL or URL pattern. The browsers will
8955 get redirected to the specified URL after formatting tags have
8956 been replaced. Redirect will be done with 302 or 307 according to
8957 HTTP/1.1 specs. A different 3xx code may be specified by prefixing
8958 the URL. e.g. 303:http://example.com/
8959
8960 URL FORMAT TAGS:
8961 %a - username (if available. Password NOT included)
8962 %A - Local listening IP address the client connection was connected to
8963 %B - FTP path URL
8964 %e - Error number
8965 %E - Error description
8966 %h - Squid hostname
8967 %H - Request domain name
8968 %i - Client IP Address
8969 %M - Request Method
8970 %O - Unescaped message result from external ACL helper
8971 %o - Message result from external ACL helper
8972 %p - Request Port number
8973 %P - Request Protocol name
8974 %R - Request URL path
8975 %T - Timestamp in RFC 1123 format
8976 %U - Full canonical URL from client
8977 (HTTPS URLs terminate with *)
8978 %u - Full canonical URL from client
8979 %w - Admin email from squid.conf
8980 %x - Error name
8981 %% - Literal percent (%) code
8982
8983DOC_END
8984
8985COMMENT_START
8986 OPTIONS INFLUENCING REQUEST FORWARDING
8987 -----------------------------------------------------------------------------
8988COMMENT_END
8989
8990NAME: nonhierarchical_direct
8991TYPE: onoff
8992LOC: Config.onoff.nonhierarchical_direct
8993DEFAULT: on
8994DOC_START
8995 By default, Squid will send any non-hierarchical requests
8996 (not cacheable request type) direct to origin servers.
8997
8998 When this is set to "off", Squid will prefer to send these
8999 requests to parents.
9000
9001 Note that in most configurations, by turning this off you will only
9002 add latency to these request without any improvement in global hit
9003 ratio.
9004
9005 This option only sets a preference. If the parent is unavailable a
9006 direct connection to the origin server may still be attempted. To
9007 completely prevent direct connections use never_direct.
9008DOC_END
9009
9010NAME: prefer_direct
9011TYPE: onoff
9012LOC: Config.onoff.prefer_direct
9013DEFAULT: off
9014DOC_START
9015 Normally Squid tries to use parents for most requests. If you for some
9016 reason like it to first try going direct and only use a parent if
9017 going direct fails set this to on.
9018
9019 By combining nonhierarchical_direct off and prefer_direct on you
9020 can set up Squid to use a parent as a backup path if going direct
9021 fails.
9022
9023 Note: If you want Squid to use parents for all requests see
9024 the never_direct directive. prefer_direct only modifies how Squid
9025 acts on cacheable requests.
9026DOC_END
9027
9028NAME: cache_miss_revalidate
9029COMMENT: on|off
9030TYPE: onoff
9031DEFAULT: on
9032LOC: Config.onoff.cache_miss_revalidate
9033DOC_START
9034 RFC 7232 defines a conditional request mechanism to prevent
9035 response objects being unnecessarily transferred over the network.
9036 If that mechanism is used by the client and a cache MISS occurs
9037 it can prevent new cache entries being created.
9038
9039 This option determines whether Squid on cache MISS will pass the
9040 client revalidation request to the server or tries to fetch new
9041 content for caching. It can be useful while the cache is mostly
9042 empty to more quickly have the cache populated by generating
9043 non-conditional GETs.
9044
9045 When set to 'on' (default), Squid will pass all client If-* headers
9046 to the server. This permits server responses without a cacheable
9047 payload to be delivered and on MISS no new cache entry is created.
9048
9049 When set to 'off' and if the request is cacheable, Squid will
9050 remove the clients If-Modified-Since and If-None-Match headers from
9051 the request sent to the server. This requests a 200 status response
9052 from the server to create a new cache entry with.
9053DOC_END
9054
9055NAME: always_direct
9056TYPE: acl_access
9057LOC: Config.accessList.AlwaysDirect
9058DEFAULT: none
9059DEFAULT_DOC: Prevent any cache_peer being used for this request.
9060DOC_START
9061 Usage: always_direct allow|deny [!]aclname ...
9062
9063 Here you can use ACL elements to specify requests which should
9064 ALWAYS be forwarded by Squid to the origin servers without using
9065 any peers. For example, to always directly forward requests for
9066 local servers ignoring any parents or siblings you may have use
9067 something like:
9068
9069 acl local-servers dstdomain my.domain.net
9070 always_direct allow local-servers
9071
9072 To always forward FTP requests directly, use
9073
9074 acl FTP proto FTP
9075 always_direct allow FTP
9076
9077 NOTE: There is a similar, but opposite option named
9078 'never_direct'. You need to be aware that "always_direct deny
9079 foo" is NOT the same thing as "never_direct allow foo". You
9080 may need to use a deny rule to exclude a more-specific case of
9081 some other rule. Example:
9082
9083 acl local-external dstdomain external.foo.net
9084 acl local-servers dstdomain .foo.net
9085 always_direct deny local-external
9086 always_direct allow local-servers
9087
9088 NOTE: If your goal is to make the client forward the request
9089 directly to the origin server bypassing Squid then this needs
9090 to be done in the client configuration. Squid configuration
9091 can only tell Squid how Squid should fetch the object.
9092
9093 NOTE: This directive is not related to caching. The replies
9094 is cached as usual even if you use always_direct. To not cache
9095 the replies see the 'cache' directive.
9096
9097 This clause supports both fast and slow acl types.
9098 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
9099DOC_END
9100
9101NAME: never_direct
9102TYPE: acl_access
9103LOC: Config.accessList.NeverDirect
9104DEFAULT: none
9105DEFAULT_DOC: Allow DNS results to be used for this request.
9106DOC_START
9107 Usage: never_direct allow|deny [!]aclname ...
9108
9109 never_direct is the opposite of always_direct. Please read
9110 the description for always_direct if you have not already.
9111
9112 With 'never_direct' you can use ACL elements to specify
9113 requests which should NEVER be forwarded directly to origin
9114 servers. For example, to force the use of a proxy for all
9115 requests, except those in your local domain use something like:
9116
9117 acl local-servers dstdomain .foo.net
9118 never_direct deny local-servers
9119 never_direct allow all
9120
9121 or if Squid is inside a firewall and there are local intranet
9122 servers inside the firewall use something like:
9123
9124 acl local-intranet dstdomain .foo.net
9125 acl local-external dstdomain external.foo.net
9126 always_direct deny local-external
9127 always_direct allow local-intranet
9128 never_direct allow all
9129
9130 This clause supports both fast and slow acl types.
9131 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
9132DOC_END
9133
9134COMMENT_START
9135 ADVANCED NETWORKING OPTIONS
9136 -----------------------------------------------------------------------------
9137COMMENT_END
9138
9139NAME: incoming_udp_average incoming_icp_average
9140TYPE: int
9141DEFAULT: 6
9142LOC: Config.comm_incoming.udp.average
9143DOC_START
9144 Heavy voodoo here. I can't even believe you are reading this.
9145 Are you crazy? Don't even think about adjusting these unless
9146 you understand the algorithms in comm_select.c first!
9147DOC_END
9148
9149NAME: incoming_tcp_average incoming_http_average
9150TYPE: int
9151DEFAULT: 4
9152LOC: Config.comm_incoming.tcp.average
9153DOC_START
9154 Heavy voodoo here. I can't even believe you are reading this.
9155 Are you crazy? Don't even think about adjusting these unless
9156 you understand the algorithms in comm_select.c first!
9157DOC_END
9158
9159NAME: incoming_dns_average
9160TYPE: int
9161DEFAULT: 4
9162LOC: Config.comm_incoming.dns.average
9163DOC_START
9164 Heavy voodoo here. I can't even believe you are reading this.
9165 Are you crazy? Don't even think about adjusting these unless
9166 you understand the algorithms in comm_select.c first!
9167DOC_END
9168
9169NAME: min_udp_poll_cnt min_icp_poll_cnt
9170TYPE: int
9171DEFAULT: 8
9172LOC: Config.comm_incoming.udp.min_poll
9173DOC_START
9174 Heavy voodoo here. I can't even believe you are reading this.
9175 Are you crazy? Don't even think about adjusting these unless
9176 you understand the algorithms in comm_select.c first!
9177DOC_END
9178
9179NAME: min_dns_poll_cnt
9180TYPE: int
9181DEFAULT: 8
9182LOC: Config.comm_incoming.dns.min_poll
9183DOC_START
9184 Heavy voodoo here. I can't even believe you are reading this.
9185 Are you crazy? Don't even think about adjusting these unless
9186 you understand the algorithms in comm_select.c first!
9187DOC_END
9188
9189NAME: min_tcp_poll_cnt min_http_poll_cnt
9190TYPE: int
9191DEFAULT: 8
9192LOC: Config.comm_incoming.tcp.min_poll
9193DOC_START
9194 Heavy voodoo here. I can't even believe you are reading this.
9195 Are you crazy? Don't even think about adjusting these unless
9196 you understand the algorithms in comm_select.c first!
9197DOC_END
9198
9199NAME: accept_filter
9200TYPE: string
9201DEFAULT: none
9202LOC: Config.accept_filter
9203DOC_START
9204 FreeBSD:
9205
9206 The name of an accept(2) filter to install on Squid's
9207 listen socket(s). This feature is perhaps specific to
9208 FreeBSD and requires support in the kernel.
9209
9210 The 'httpready' filter delays delivering new connections
9211 to Squid until a full HTTP request has been received.
9212 See the accf_http(9) man page for details.
9213
9214 The 'dataready' filter delays delivering new connections
9215 to Squid until there is some data to process.
9216 See the accf_dataready(9) man page for details.
9217
9218 Linux:
9219
9220 The 'data' filter delays delivering of new connections
9221 to Squid until there is some data to process by TCP_ACCEPT_DEFER.
9222 You may optionally specify a number of seconds to wait by
9223 'data=N' where N is the number of seconds. Defaults to 30
9224 if not specified. See the tcp(7) man page for details.
9225EXAMPLE:
9226# FreeBSD
9227accept_filter httpready
9228# Linux
9229accept_filter data
9230DOC_END
9231
9232NAME: client_ip_max_connections
9233TYPE: int
9234LOC: Config.client_ip_max_connections
9235DEFAULT: -1
9236DEFAULT_DOC: No limit.
9237DOC_START
9238 Set an absolute limit on the number of connections a single
9239 client IP can use. Any more than this and Squid will begin to drop
9240 new connections from the client until it closes some links.
9241
9242 Note that this is a global limit. It affects all HTTP, HTCP, and FTP
9243 connections from the client. For finer control use the ACL access controls.
9244
9245 Requires client_db to be enabled (the default).
9246
9247 WARNING: This may noticeably slow down traffic received via external proxies
9248 or NAT devices and cause them to rebound error messages back to their clients.
9249DOC_END
9250
9251NAME: tcp_recv_bufsize
9252COMMENT: (bytes)
9253TYPE: b_size_t
9254DEFAULT: 0 bytes
9255DEFAULT_DOC: Use operating system TCP defaults.
9256LOC: Config.tcpRcvBufsz
9257DOC_START
9258 Size of receive buffer to set for TCP sockets. Probably just
9259 as easy to change your kernel's default.
9260 Omit from squid.conf to use the default buffer size.
9261DOC_END
9262
9263COMMENT_START
9264 ICAP OPTIONS
9265 -----------------------------------------------------------------------------
9266COMMENT_END
9267
9268NAME: icap_enable
9269TYPE: onoff
9270IFDEF: ICAP_CLIENT
9271COMMENT: on|off
9272LOC: Adaptation::Icap::TheConfig.onoff
9273DEFAULT: off
9274DOC_START
9275 If you want to enable the ICAP module support, set this to on.
9276DOC_END
9277
9278NAME: icap_connect_timeout
9279TYPE: time_t
9280DEFAULT: none
9281LOC: Adaptation::Icap::TheConfig.connect_timeout_raw
9282IFDEF: ICAP_CLIENT
9283DOC_START
9284 This parameter specifies how long to wait for the TCP connect to
9285 the requested ICAP server to complete before giving up and either
9286 terminating the HTTP transaction or bypassing the failure.
9287
9288 The default for optional services is peer_connect_timeout.
9289 The default for essential services is connect_timeout.
9290 If this option is explicitly set, its value applies to all services.
9291DOC_END
9292
9293NAME: icap_io_timeout
9294COMMENT: time-units
9295TYPE: time_t
9296DEFAULT: none
9297DEFAULT_DOC: Use read_timeout.
9298LOC: Adaptation::Icap::TheConfig.io_timeout_raw
9299IFDEF: ICAP_CLIENT
9300DOC_START
9301 This parameter specifies how long to wait for an I/O activity on
9302 an established, active ICAP connection before giving up and
9303 either terminating the HTTP transaction or bypassing the
9304 failure.
9305DOC_END
9306
9307NAME: icap_service_failure_limit
9308COMMENT: limit [in memory-depth time-units]
9309TYPE: icap_service_failure_limit
9310IFDEF: ICAP_CLIENT
9311LOC: Adaptation::Icap::TheConfig
9312DEFAULT: 10
9313DOC_START
9314 The limit specifies the number of failures that Squid tolerates
9315 when establishing a new TCP connection with an ICAP service. If
9316 the number of failures exceeds the limit, the ICAP service is
9317 not used for new ICAP requests until it is time to refresh its
9318 OPTIONS.
9319
9320 A negative value disables the limit. Without the limit, an ICAP
9321 service will not be considered down due to connectivity failures
9322 between ICAP OPTIONS requests.
9323
9324 Squid forgets ICAP service failures older than the specified
9325 value of memory-depth. The memory fading algorithm
9326 is approximate because Squid does not remember individual
9327 errors but groups them instead, splitting the option
9328 value into ten time slots of equal length.
9329
9330 When memory-depth is 0 and by default this option has no
9331 effect on service failure expiration.
9332
9333 Squid always forgets failures when updating service settings
9334 using an ICAP OPTIONS transaction, regardless of this option
9335 setting.
9336
9337 For example,
9338 # suspend service usage after 10 failures in 5 seconds:
9339 icap_service_failure_limit 10 in 5 seconds
9340DOC_END
9341
9342NAME: icap_service_revival_delay
9343TYPE: int
9344IFDEF: ICAP_CLIENT
9345LOC: Adaptation::Icap::TheConfig.service_revival_delay
9346DEFAULT: 180
9347DOC_START
9348 The delay specifies the number of seconds to wait after an ICAP
9349 OPTIONS request failure before requesting the options again. The
9350 failed ICAP service is considered "down" until fresh OPTIONS are
9351 fetched.
9352
9353 The actual delay cannot be smaller than the hardcoded minimum
9354 delay of 30 seconds.
9355DOC_END
9356
9357NAME: icap_preview_enable
9358TYPE: onoff
9359IFDEF: ICAP_CLIENT
9360COMMENT: on|off
9361LOC: Adaptation::Icap::TheConfig.preview_enable
9362DEFAULT: on
9363DOC_START
9364 The ICAP Preview feature allows the ICAP server to handle the
9365 HTTP message by looking only at the beginning of the message body
9366 or even without receiving the body at all. In some environments,
9367 previews greatly speedup ICAP processing.
9368
9369 During an ICAP OPTIONS transaction, the server may tell Squid what
9370 HTTP messages should be previewed and how big the preview should be.
9371 Squid will not use Preview if the server did not request one.
9372
9373 To disable ICAP Preview for all ICAP services, regardless of
9374 individual ICAP server OPTIONS responses, set this option to "off".
9375Example:
9376icap_preview_enable off
9377DOC_END
9378
9379NAME: icap_preview_size
9380TYPE: int
9381IFDEF: ICAP_CLIENT
9382LOC: Adaptation::Icap::TheConfig.preview_size
9383DEFAULT: -1
9384DEFAULT_DOC: No preview sent.
9385DOC_START
9386 The default size of preview data to be sent to the ICAP server.
9387 This value might be overwritten on a per server basis by OPTIONS requests.
9388DOC_END
9389
9390NAME: icap_206_enable
9391TYPE: onoff
9392IFDEF: ICAP_CLIENT
9393COMMENT: on|off
9394LOC: Adaptation::Icap::TheConfig.allow206_enable
9395DEFAULT: on
9396DOC_START
9397 206 (Partial Content) responses is an ICAP extension that allows the
9398 ICAP agents to optionally combine adapted and original HTTP message
9399 content. The decision to combine is postponed until the end of the
9400 ICAP response. Squid supports Partial Content extension by default.
9401
9402 Activation of the Partial Content extension is negotiated with each
9403 ICAP service during OPTIONS exchange. Most ICAP servers should handle
9404 negotiation correctly even if they do not support the extension, but
9405 some might fail. To disable Partial Content support for all ICAP
9406 services and to avoid any negotiation, set this option to "off".
9407
9408 Example:
9409 icap_206_enable off
9410DOC_END
9411
9412NAME: icap_default_options_ttl
9413TYPE: int
9414IFDEF: ICAP_CLIENT
9415LOC: Adaptation::Icap::TheConfig.default_options_ttl
9416DEFAULT: 60
9417DOC_START
9418 The default TTL value for ICAP OPTIONS responses that don't have
9419 an Options-TTL header.
9420DOC_END
9421
9422NAME: icap_persistent_connections
9423TYPE: onoff
9424IFDEF: ICAP_CLIENT
9425COMMENT: on|off
9426LOC: Adaptation::Icap::TheConfig.reuse_connections
9427DEFAULT: on
9428DOC_START
9429 Whether or not Squid should use persistent connections to
9430 an ICAP server.
9431DOC_END
9432
9433NAME: adaptation_send_client_ip icap_send_client_ip
9434TYPE: onoff
9435IFDEF: USE_ADAPTATION
9436COMMENT: on|off
9437LOC: Adaptation::Config::send_client_ip
9438DEFAULT: off
9439DOC_START
9440 If enabled, Squid shares HTTP client IP information with adaptation
9441 services. For ICAP, Squid adds the X-Client-IP header to ICAP requests.
9442 For eCAP, Squid sets the libecap::metaClientIp transaction option.
9443
9444 See also: adaptation_uses_indirect_client
9445DOC_END
9446
9447NAME: adaptation_send_username icap_send_client_username
9448TYPE: onoff
9449IFDEF: USE_ADAPTATION
9450COMMENT: on|off
9451LOC: Adaptation::Config::send_username
9452DEFAULT: off
9453DOC_START
9454 This sends authenticated HTTP client username (if available) to
9455 the adaptation service.
9456
9457 For ICAP, the username value is encoded based on the
9458 icap_client_username_encode option and is sent using the header
9459 specified by the icap_client_username_header option.
9460DOC_END
9461
9462NAME: icap_client_username_header
9463TYPE: string
9464IFDEF: ICAP_CLIENT
9465LOC: Adaptation::Icap::TheConfig.client_username_header
9466DEFAULT: X-Client-Username
9467DOC_START
9468 ICAP request header name to use for adaptation_send_username.
9469DOC_END
9470
9471NAME: icap_client_username_encode
9472TYPE: onoff
9473IFDEF: ICAP_CLIENT
9474COMMENT: on|off
9475LOC: Adaptation::Icap::TheConfig.client_username_encode
9476DEFAULT: off
9477DOC_START
9478 Whether to base64 encode the authenticated client username.
9479DOC_END
9480
9481NAME: icap_service
9482TYPE: icap_service_type
9483IFDEF: ICAP_CLIENT
9484LOC: Adaptation::Icap::TheConfig
9485DEFAULT: none
9486DOC_START
9487 Defines a single ICAP service using the following format:
9488
9489 icap_service id vectoring_point uri [option ...]
9490
9491 id: ID
9492 an opaque identifier or name which is used to direct traffic to
9493 this specific service. Must be unique among all adaptation
9494 services in squid.conf.
9495
9496 vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
9497 This specifies at which point of transaction processing the
9498 ICAP service should be activated. *_postcache vectoring points
9499 are not yet supported.
9500
9501 uri: icap://servername:port/servicepath
9502 ICAP server and service location.
9503 icaps://servername:port/servicepath
9504 The "icap:" URI scheme is used for traditional ICAP server and
9505 service location (default port is 1344, connections are not
9506 encrypted). The "icaps:" URI scheme is for Secure ICAP
9507 services that use SSL/TLS-encrypted ICAP connections (by
9508 default, on port 11344).
9509
9510 ICAP does not allow a single service to handle both REQMOD and RESPMOD
9511 transactions. Squid does not enforce that requirement. You can specify
9512 services with the same service_url and different vectoring_points. You
9513 can even specify multiple identical services as long as their
9514 service_names differ.
9515
9516 To activate a service, use the adaptation_access directive. To group
9517 services, use adaptation_service_chain and adaptation_service_set.
9518
9519 Service options are separated by white space. ICAP services support
9520 the following name=value options:
9521
9522 bypass=on|off|1|0
9523 If set to 'on' or '1', the ICAP service is treated as
9524 optional. If the service cannot be reached or malfunctions,
9525 Squid will try to ignore any errors and process the message as
9526 if the service was not enabled. No all ICAP errors can be
9527 bypassed. If set to 0, the ICAP service is treated as
9528 essential and all ICAP errors will result in an error page
9529 returned to the HTTP client.
9530
9531 Bypass is off by default: services are treated as essential.
9532
9533 routing=on|off|1|0
9534 If set to 'on' or '1', the ICAP service is allowed to
9535 dynamically change the current message adaptation plan by
9536 returning a chain of services to be used next. The services
9537 are specified using the X-Next-Services ICAP response header
9538 value, formatted as a comma-separated list of service names.
9539 Each named service should be configured in squid.conf. Other
9540 services are ignored. An empty X-Next-Services value results
9541 in an empty plan which ends the current adaptation.
9542
9543 Dynamic adaptation plan may cross or cover multiple supported
9544 vectoring points in their natural processing order.
9545
9546 Routing is not allowed by default: the ICAP X-Next-Services
9547 response header is ignored.
9548
9549 ipv6=on|off
9550 Only has effect on split-stack systems. The default on those systems
9551 is to use IPv4-only connections. When set to 'on' this option will
9552 make Squid use IPv6-only connections to contact this ICAP service.
9553
9554 on-overload=block|bypass|wait|force
9555 If the service Max-Connections limit has been reached, do
9556 one of the following for each new ICAP transaction:
9557 * block: send an HTTP error response to the client
9558 * bypass: ignore the "over-connected" ICAP service
9559 * wait: wait (in a FIFO queue) for an ICAP connection slot
9560 * force: proceed, ignoring the Max-Connections limit
9561
9562 In SMP mode with N workers, each worker assumes the service
9563 connection limit is Max-Connections/N, even though not all
9564 workers may use a given service.
9565
9566 The default value is "bypass" if service is bypassable,
9567 otherwise it is set to "wait".
9568
9569
9570 max-conn=number
9571 Use the given number as the Max-Connections limit, regardless
9572 of the Max-Connections value given by the service, if any.
9573
9574 connection-encryption=on|off
9575 Determines the ICAP service effect on the connections_encrypted
9576 ACL.
9577
9578 The default is "on" for Secure ICAP services (i.e., those
9579 with the icaps:// service URIs scheme) and "off" for plain ICAP
9580 services.
9581
9582 Does not affect ICAP connections (e.g., does not turn Secure
9583 ICAP on or off).
9584
9585 ==== ICAPS / TLS OPTIONS ====
9586
9587 These options are used for Secure ICAP (icaps://....) services only.
9588
9589 tls-cert=/path/to/ssl/certificate
9590 A client X.509 certificate to use when connecting to
9591 this ICAP server.
9592
9593 tls-key=/path/to/ssl/key
9594 The private key corresponding to the previous
9595 tls-cert= option.
9596
9597 If tls-key= is not specified tls-cert= is assumed to
9598 reference a PEM file containing both the certificate
9599 and private key.
9600
9601 tls-cipher=... The list of valid TLS/SSL ciphers to use when connecting
9602 to this icap server.
9603
9604 tls-min-version=1.N
9605 The minimum TLS protocol version to permit. To control
9606 SSLv3 use the tls-options= parameter.
9607 Supported Values: 1.0 (default), 1.1, 1.2
9608
9609 tls-options=... Specify various OpenSSL library options:
9610
9611 NO_SSLv3 Disallow the use of SSLv3
9612
9613 SINGLE_DH_USE
9614 Always create a new key when using
9615 temporary/ephemeral DH key exchanges
9616
9617 ALL Enable various bug workarounds
9618 suggested as "harmless" by OpenSSL
9619 Be warned that this reduces SSL/TLS
9620 strength to some attacks.
9621
9622 See the OpenSSL SSL_CTX_set_options documentation for a
9623 more complete list. Options relevant only to SSLv2 are
9624 not supported.
9625
9626 tls-cafile= PEM file containing CA certificates to use when verifying
9627 the icap server certificate.
9628 Use to specify intermediate CA certificate(s) if not sent
9629 by the server. Or the full CA chain for the server when
9630 using the tls-default-ca=off flag.
9631 May be repeated to load multiple files.
9632
9633 tls-capath=... A directory containing additional CA certificates to
9634 use when verifying the icap server certificate.
9635 Requires OpenSSL or LibreSSL.
9636
9637 tls-crlfile=... A certificate revocation list file to use when
9638 verifying the icap server certificate.
9639
9640 tls-flags=... Specify various flags modifying the Squid TLS implementation:
9641
9642 DONT_VERIFY_PEER
9643 Accept certificates even if they fail to
9644 verify.
9645 DONT_VERIFY_DOMAIN
9646 Don't verify the icap server certificate
9647 matches the server name
9648
9649 tls-default-ca[=off]
9650 Whether to use the system Trusted CAs. Default is ON.
9651
9652 tls-domain= The icap server name as advertised in it's certificate.
9653 Used for verifying the correctness of the received icap
9654 server certificate. If not specified the icap server
9655 hostname extracted from ICAP URI will be used.
9656
9657 Older icap_service format without optional named parameters is
9658 deprecated but supported for backward compatibility.
9659
9660Example:
9661icap_service svcBlocker reqmod_precache icap://icap1.mydomain.net:1344/reqmod bypass=0
9662icap_service svcLogger reqmod_precache icaps://icap2.mydomain.net:11344/reqmod routing=on
9663DOC_END
9664
9665NAME: icap_class
9666TYPE: icap_class_type
9667IFDEF: ICAP_CLIENT
9668LOC: none
9669DEFAULT: none
9670DOC_START
9671 This deprecated option was documented to define an ICAP service
9672 chain, even though it actually defined a set of similar, redundant
9673 services, and the chains were not supported.
9674
9675 To define a set of redundant services, please use the
9676 adaptation_service_set directive. For service chains, use
9677 adaptation_service_chain.
9678DOC_END
9679
9680NAME: icap_access
9681TYPE: icap_access_type
9682IFDEF: ICAP_CLIENT
9683LOC: none
9684DEFAULT: none
9685DOC_START
9686 This option is deprecated. Please use adaptation_access, which
9687 has the same ICAP functionality, but comes with better
9688 documentation, and eCAP support.
9689DOC_END
9690
9691COMMENT_START
9692 eCAP OPTIONS
9693 -----------------------------------------------------------------------------
9694COMMENT_END
9695
9696NAME: ecap_enable
9697TYPE: onoff
9698IFDEF: USE_ECAP
9699COMMENT: on|off
9700LOC: Adaptation::Ecap::TheConfig.onoff
9701DEFAULT: off
9702DOC_START
9703 Controls whether eCAP support is enabled.
9704DOC_END
9705
9706NAME: ecap_service
9707TYPE: ecap_service_type
9708IFDEF: USE_ECAP
9709LOC: Adaptation::Ecap::TheConfig
9710DEFAULT: none
9711DOC_START
9712 Defines a single eCAP service
9713
9714 ecap_service id vectoring_point uri [option ...]
9715
9716 id: ID
9717 an opaque identifier or name which is used to direct traffic to
9718 this specific service. Must be unique among all adaptation
9719 services in squid.conf.
9720
9721 vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
9722 This specifies at which point of transaction processing the
9723 eCAP service should be activated. *_postcache vectoring points
9724 are not yet supported.
9725
9726 uri: ecap://vendor/service_name?custom&cgi=style&parameters=optional
9727 Squid uses the eCAP service URI to match this configuration
9728 line with one of the dynamically loaded services. Each loaded
9729 eCAP service must have a unique URI. Obtain the right URI from
9730 the service provider.
9731
9732 To activate a service, use the adaptation_access directive. To group
9733 services, use adaptation_service_chain and adaptation_service_set.
9734
9735 Service options are separated by white space. eCAP services support
9736 the following name=value options:
9737
9738 bypass=on|off|1|0
9739 If set to 'on' or '1', the eCAP service is treated as optional.
9740 If the service cannot be reached or malfunctions, Squid will try
9741 to ignore any errors and process the message as if the service
9742 was not enabled. No all eCAP errors can be bypassed.
9743 If set to 'off' or '0', the eCAP service is treated as essential
9744 and all eCAP errors will result in an error page returned to the
9745 HTTP client.
9746
9747 Bypass is off by default: services are treated as essential.
9748
9749 routing=on|off|1|0
9750 If set to 'on' or '1', the eCAP service is allowed to
9751 dynamically change the current message adaptation plan by
9752 returning a chain of services to be used next.
9753
9754 Dynamic adaptation plan may cross or cover multiple supported
9755 vectoring points in their natural processing order.
9756
9757 Routing is not allowed by default.
9758
9759 connection-encryption=on|off
9760 Determines the eCAP service effect on the connections_encrypted
9761 ACL.
9762
9763 Defaults to "on", which does not taint the master transaction
9764 w.r.t. that ACL.
9765
9766 Does not affect eCAP API calls.
9767
9768 Older ecap_service format without optional named parameters is
9769 deprecated but supported for backward compatibility.
9770
9771
9772Example:
9773ecap_service s1 reqmod_precache ecap://filters.R.us/leakDetector?on_error=block bypass=off
9774ecap_service s2 respmod_precache ecap://filters.R.us/virusFilter config=/etc/vf.cfg bypass=on
9775DOC_END
9776
9777NAME: loadable_modules
9778TYPE: SBufList
9779IFDEF: USE_LOADABLE_MODULES
9780LOC: Config.loadable_module_names
9781DEFAULT: none
9782DOC_START
9783 Instructs Squid to load the specified dynamic module(s) or activate
9784 preloaded module(s).
9785Example:
9786loadable_modules @DEFAULT_PREFIX@/lib/MinimalAdapter.so
9787DOC_END
9788
9789COMMENT_START
9790 MESSAGE ADAPTATION OPTIONS
9791 -----------------------------------------------------------------------------
9792COMMENT_END
9793
9794NAME: adaptation_service_set
9795TYPE: adaptation_service_set_type
9796IFDEF: USE_ADAPTATION
9797LOC: none
9798DEFAULT: none
9799DOC_START
9800
9801 Configures an ordered set of similar, redundant services. This is
9802 useful when hot standby or backup adaptation servers are available.
9803
9804 adaptation_service_set set_name service_name1 service_name2 ...
9805
9806 The named services are used in the set declaration order. The first
9807 applicable adaptation service from the set is used first. The next
9808 applicable service is tried if and only if the transaction with the
9809 previous service fails and the message waiting to be adapted is still
9810 intact.
9811
9812 When adaptation starts, broken services are ignored as if they were
9813 not a part of the set. A broken service is a down optional service.
9814
9815 The services in a set must be attached to the same vectoring point
9816 (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
9817
9818 If all services in a set are optional then adaptation failures are
9819 bypassable. If all services in the set are essential, then a
9820 transaction failure with one service may still be retried using
9821 another service from the set, but when all services fail, the master
9822 transaction fails as well.
9823
9824 A set may contain a mix of optional and essential services, but that
9825 is likely to lead to surprising results because broken services become
9826 ignored (see above), making previously bypassable failures fatal.
9827 Technically, it is the bypassability of the last failed service that
9828 matters.
9829
9830 See also: adaptation_access adaptation_service_chain
9831
9832Example:
9833adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup
9834adaptation service_set svcLogger loggerLocal loggerRemote
9835DOC_END
9836
9837NAME: adaptation_service_chain
9838TYPE: adaptation_service_chain_type
9839IFDEF: USE_ADAPTATION
9840LOC: none
9841DEFAULT: none
9842DOC_START
9843
9844 Configures a list of complementary services that will be applied
9845 one-by-one, forming an adaptation chain or pipeline. This is useful
9846 when Squid must perform different adaptations on the same message.
9847
9848 adaptation_service_chain chain_name service_name1 svc_name2 ...
9849
9850 The named services are used in the chain declaration order. The first
9851 applicable adaptation service from the chain is used first. The next
9852 applicable service is applied to the successful adaptation results of
9853 the previous service in the chain.
9854
9855 When adaptation starts, broken services are ignored as if they were
9856 not a part of the chain. A broken service is a down optional service.
9857
9858 Request satisfaction terminates the adaptation chain because Squid
9859 does not currently allow declaration of RESPMOD services at the
9860 "reqmod_precache" vectoring point (see icap_service or ecap_service).
9861
9862 The services in a chain must be attached to the same vectoring point
9863 (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
9864
9865 A chain may contain a mix of optional and essential services. If an
9866 essential adaptation fails (or the failure cannot be bypassed for
9867 other reasons), the master transaction fails. Otherwise, the failure
9868 is bypassed as if the failed adaptation service was not in the chain.
9869
9870 See also: adaptation_access adaptation_service_set
9871
9872Example:
9873adaptation_service_chain svcRequest requestLogger urlFilter leakDetector
9874DOC_END
9875
9876NAME: adaptation_access
9877TYPE: adaptation_access_type
9878IFDEF: USE_ADAPTATION
9879LOC: none
9880DEFAULT: none
9881DEFAULT_DOC: Allow, unless rules exist in squid.conf.
9882DOC_START
9883 Sends an HTTP transaction to an ICAP or eCAP adaptation service.
9884
9885 adaptation_access service_name allow|deny [!]aclname...
9886 adaptation_access set_name allow|deny [!]aclname...
9887
9888 At each supported vectoring point, the adaptation_access
9889 statements are processed in the order they appear in this
9890 configuration file. Statements pointing to the following services
9891 are ignored (i.e., skipped without checking their ACL):
9892
9893 - services serving different vectoring points
9894 - "broken-but-bypassable" services
9895 - "up" services configured to ignore such transactions
9896 (e.g., based on the ICAP Transfer-Ignore header).
9897
9898 When a set_name is used, all services in the set are checked
9899 using the same rules, to find the first applicable one. See
9900 adaptation_service_set for details.
9901
9902 If an access list is checked and there is a match, the
9903 processing stops: For an "allow" rule, the corresponding
9904 adaptation service is used for the transaction. For a "deny"
9905 rule, no adaptation service is activated.
9906
9907 It is currently not possible to apply more than one adaptation
9908 service at the same vectoring point to the same HTTP transaction.
9909
9910 See also: icap_service and ecap_service
9911
9912Example:
9913adaptation_access service_1 allow all
9914DOC_END
9915
9916NAME: adaptation_service_iteration_limit
9917TYPE: int
9918IFDEF: USE_ADAPTATION
9919LOC: Adaptation::Config::service_iteration_limit
9920DEFAULT: 16
9921DOC_START
9922 Limits the number of iterations allowed when applying adaptation
9923 services to a message. If your longest adaptation set or chain
9924 may have more than 16 services, increase the limit beyond its
9925 default value of 16. If detecting infinite iteration loops sooner
9926 is critical, make the iteration limit match the actual number
9927 of services in your longest adaptation set or chain.
9928
9929 Infinite adaptation loops are most likely with routing services.
9930
9931 See also: icap_service routing=1
9932DOC_END
9933
9934NAME: adaptation_masterx_shared_names
9935TYPE: string
9936IFDEF: USE_ADAPTATION
9937LOC: Adaptation::Config::masterx_shared_name
9938DEFAULT: none
9939DOC_START
9940 For each master transaction (i.e., the HTTP request and response
9941 sequence, including all related ICAP and eCAP exchanges), Squid
9942 maintains a table of metadata. The table entries are (name, value)
9943 pairs shared among eCAP and ICAP exchanges. The table is destroyed
9944 with the master transaction.
9945
9946 This option specifies the table entry names that Squid must accept
9947 from and forward to the adaptation transactions.
9948
9949 An ICAP REQMOD or RESPMOD transaction may set an entry in the
9950 shared table by returning an ICAP header field with a name
9951 specified in adaptation_masterx_shared_names.
9952
9953 An eCAP REQMOD or RESPMOD transaction may set an entry in the
9954 shared table by implementing the libecap::visitEachOption() API
9955 to provide an option with a name specified in
9956 adaptation_masterx_shared_names.
9957
9958 Squid will store and forward the set entry to subsequent adaptation
9959 transactions within the same master transaction scope.
9960
9961 Only one shared entry name is supported at this time.
9962
9963Example:
9964# share authentication information among ICAP services
9965adaptation_masterx_shared_names X-Subscriber-ID
9966DOC_END
9967
9968NAME: adaptation_meta
9969TYPE: note
9970IFDEF: USE_ADAPTATION
9971LOC: Adaptation::Config::metaHeaders()
9972DEFAULT: none
9973DOC_START
9974 This option allows Squid administrator to add custom ICAP request
9975 headers or eCAP options to Squid ICAP requests or eCAP transactions.
9976 Use it to pass custom authentication tokens and other
9977 transaction-state related meta information to an ICAP/eCAP service.
9978
9979 The addition of a meta header is ACL-driven:
9980 adaptation_meta name value [!]aclname ...
9981
9982 Processing for a given header name stops after the first ACL list match.
9983 Thus, it is impossible to add two headers with the same name. If no ACL
9984 lists match for a given header name, no such header is added. For
9985 example:
9986
9987 # do not debug transactions except for those that need debugging
9988 adaptation_meta X-Debug 1 needs_debugging
9989
9990 # log all transactions except for those that must remain secret
9991 adaptation_meta X-Log 1 !keep_secret
9992
9993 # mark transactions from users in the "G 1" group
9994 adaptation_meta X-Authenticated-Groups "G 1" authed_as_G1
9995
9996 The "value" parameter may be a regular squid.conf token or a "double
9997 quoted string". Within the quoted string, use backslash (\) to escape
9998 any character, which is currently only useful for escaping backslashes
9999 and double quotes. For example,
10000 "this string has one backslash (\\) and two \"quotes\""
10001
10002 Used adaptation_meta header values may be logged via %note
10003 logformat code. If multiple adaptation_meta headers with the same name
10004 are used during master transaction lifetime, the header values are
10005 logged in the order they were used and duplicate values are ignored
10006 (only the first repeated value will be logged).
10007DOC_END
10008
10009NAME: icap_retry
10010TYPE: acl_access
10011IFDEF: ICAP_CLIENT
10012LOC: Adaptation::Icap::TheConfig.repeat
10013DEFAULT_IF_NONE: deny all
10014DOC_START
10015 This ACL determines which retriable ICAP transactions are
10016 retried. Transactions that received a complete ICAP response
10017 and did not have to consume or produce HTTP bodies to receive
10018 that response are usually retriable.
10019
10020 icap_retry allow|deny [!]aclname ...
10021
10022 Squid automatically retries some ICAP I/O timeouts and errors
10023 due to persistent connection race conditions.
10024
10025 See also: icap_retry_limit
10026DOC_END
10027
10028NAME: icap_retry_limit
10029TYPE: int
10030IFDEF: ICAP_CLIENT
10031LOC: Adaptation::Icap::TheConfig.repeat_limit
10032DEFAULT: 0
10033DEFAULT_DOC: No retries are allowed.
10034DOC_START
10035 Limits the number of retries allowed.
10036
10037 Communication errors due to persistent connection race
10038 conditions are unavoidable, automatically retried, and do not
10039 count against this limit.
10040
10041 See also: icap_retry
10042DOC_END
10043
10044
10045COMMENT_START
10046 DNS OPTIONS
10047 -----------------------------------------------------------------------------
10048COMMENT_END
10049
10050NAME: check_hostnames
10051TYPE: onoff
10052DEFAULT: off
10053LOC: Config.onoff.check_hostnames
10054DOC_START
10055 For security and stability reasons Squid can check
10056 hostnames for Internet standard RFC compliance. If you want
10057 Squid to perform these checks turn this directive on.
10058DOC_END
10059
10060NAME: allow_underscore
10061TYPE: onoff
10062DEFAULT: on
10063LOC: Config.onoff.allow_underscore
10064DOC_START
10065 Underscore characters is not strictly allowed in Internet hostnames
10066 but nevertheless used by many sites. Set this to off if you want
10067 Squid to be strict about the standard.
10068 This check is performed only when check_hostnames is set to on.
10069DOC_END
10070
10071NAME: dns_retransmit_interval
10072TYPE: time_msec
10073DEFAULT: 5 seconds
10074LOC: Config.Timeout.idns_retransmit
10075DOC_START
10076 Initial retransmit interval for DNS queries. The interval is
10077 doubled each time all configured DNS servers have been tried.
10078DOC_END
10079
10080NAME: dns_timeout
10081TYPE: time_msec
10082DEFAULT: 30 seconds
10083LOC: Config.Timeout.idns_query
10084DOC_START
10085 DNS Query timeout. If no response is received to a DNS query
10086 within this time all DNS servers for the queried domain
10087 are assumed to be unavailable.
10088DOC_END
10089
10090NAME: dns_packet_max
10091TYPE: b_ssize_t
10092DEFAULT_DOC: EDNS disabled
10093DEFAULT: none
10094LOC: Config.dns.packet_max
10095DOC_START
10096 Maximum number of bytes packet size to advertise via EDNS.
10097 Set to "none" to disable EDNS large packet support.
10098
10099 For legacy reasons DNS UDP replies will default to 512 bytes which
10100 is too small for many responses. EDNS provides a means for Squid to
10101 negotiate receiving larger responses back immediately without having
10102 to failover with repeat requests. Responses larger than this limit
10103 will retain the old behaviour of failover to TCP DNS.
10104
10105 Squid has no real fixed limit internally, but allowing packet sizes
10106 over 1500 bytes requires network jumbogram support and is usually not
10107 necessary.
10108
10109 WARNING: The RFC also indicates that some older resolvers will reply
10110 with failure of the whole request if the extension is added. Some
10111 resolvers have already been identified which will reply with mangled
10112 EDNS response on occasion. Usually in response to many-KB jumbogram
10113 sizes being advertised by Squid.
10114 Squid will currently treat these both as an unable-to-resolve domain
10115 even if it would be resolvable without EDNS.
10116DOC_END
10117
10118NAME: dns_defnames
10119COMMENT: on|off
10120TYPE: onoff
10121DEFAULT: off
10122DEFAULT_DOC: Search for single-label domain names is disabled.
10123LOC: Config.onoff.res_defnames
10124DOC_START
10125 Normally the RES_DEFNAMES resolver option is disabled
10126 (see res_init(3)). This prevents caches in a hierarchy
10127 from interpreting single-component hostnames locally. To allow
10128 Squid to handle single-component names, enable this option.
10129DOC_END
10130
10131NAME: dns_multicast_local
10132COMMENT: on|off
10133TYPE: onoff
10134DEFAULT: off
10135DEFAULT_DOC: Search for .local and .arpa names is disabled.
10136LOC: Config.onoff.dns_mdns
10137DOC_START
10138 When set to on, Squid sends multicast DNS lookups on the local
10139 network for domains ending in .local and .arpa.
10140 This enables local servers and devices to be contacted in an
10141 ad-hoc or zero-configuration network environment.
10142DOC_END
10143
10144NAME: dns_nameservers
10145TYPE: SBufList
10146DEFAULT: none
10147DEFAULT_DOC: Use operating system definitions
10148LOC: Config.dns.nameservers
10149DOC_START
10150 Use this if you want to specify a list of DNS name servers
10151 (IP addresses) to use instead of those given in your
10152 /etc/resolv.conf file.
10153
10154 On Windows platforms, if no value is specified here or in
10155 the /etc/resolv.conf file, the list of DNS name servers are
10156 taken from the Windows registry, both static and dynamic DHCP
10157 configurations are supported.
10158
10159 Example: dns_nameservers 10.0.0.1 192.172.0.4
10160DOC_END
10161
10162NAME: hosts_file
10163TYPE: string
10164DEFAULT: @DEFAULT_HOSTS@
10165LOC: Config.etcHostsPath
10166DOC_START
10167 Location of the host-local IP name-address associations
10168 database. Most Operating Systems have such a file on different
10169 default locations:
10170 - Un*X & Linux: /etc/hosts
10171 - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
10172 (%SystemRoot% value install default is c:\winnt)
10173 - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
10174 (%SystemRoot% value install default is c:\windows)
10175 - Windows 9x/Me: %windir%\hosts
10176 (%windir% value is usually c:\windows)
10177 - Cygwin: /etc/hosts
10178
10179 The file contains newline-separated definitions, in the
10180 form ip_address_in_dotted_form name [name ...] names are
10181 whitespace-separated. Lines beginning with an hash (#)
10182 character are comments.
10183
10184 The file is checked at startup and upon configuration.
10185 If set to 'none', it won't be checked.
10186 If append_domain is used, that domain will be added to
10187 domain-local (i.e. not containing any dot character) host
10188 definitions.
10189DOC_END
10190
10191NAME: append_domain
10192TYPE: string
10193LOC: Config.appendDomain
10194DEFAULT: none
10195DEFAULT_DOC: Use operating system definitions
10196DOC_START
10197 Appends local domain name to hostnames without any dots in
10198 them. append_domain must begin with a period.
10199
10200 Be warned there are now Internet names with no dots in
10201 them using only top-domain names, so setting this may
10202 cause some Internet sites to become unavailable.
10203
10204Example:
10205 append_domain .yourdomain.com
10206DOC_END
10207
10208NAME: ignore_unknown_nameservers
10209TYPE: onoff
10210LOC: Config.onoff.ignore_unknown_nameservers
10211DEFAULT: on
10212DOC_START
10213 By default Squid checks that DNS responses are received
10214 from the same IP addresses they are sent to. If they
10215 don't match, Squid ignores the response and writes a warning
10216 message to cache.log. You can allow responses from unknown
10217 nameservers by setting this option to 'off'.
10218DOC_END
10219
10220NAME: ipcache_size
10221COMMENT: (number of entries)
10222TYPE: int
10223DEFAULT: 1024
10224LOC: Config.ipcache.size
10225DOC_START
10226 Maximum number of DNS IP cache entries.
10227DOC_END
10228
10229NAME: ipcache_low
10230COMMENT: (percent)
10231TYPE: int
10232DEFAULT: 90
10233LOC: Config.ipcache.low
10234DOC_NONE
10235
10236NAME: ipcache_high
10237COMMENT: (percent)
10238TYPE: int
10239DEFAULT: 95
10240LOC: Config.ipcache.high
10241DOC_START
10242 The size, low-, and high-water marks for the IP cache.
10243DOC_END
10244
10245NAME: fqdncache_size
10246COMMENT: (number of entries)
10247TYPE: int
10248DEFAULT: 1024
10249LOC: Config.fqdncache.size
10250DOC_START
10251 Maximum number of FQDN cache entries.
10252DOC_END
10253
10254COMMENT_START
10255 MISCELLANEOUS
10256 -----------------------------------------------------------------------------
10257COMMENT_END
10258
10259NAME: configuration_includes_quoted_values
10260COMMENT: on|off
10261TYPE: configuration_includes_quoted_values
10262DEFAULT: off
10263LOC: ConfigParser::RecognizeQuotedValues
10264DOC_START
10265 If set, Squid will recognize each "quoted string" after a configuration
10266 directive as a single parameter. The quotes are stripped before the
10267 parameter value is interpreted or used.
10268 See "Values with spaces, quotes, and other special characters"
10269 section for more details.
10270DOC_END
10271
10272NAME: memory_pools
10273COMMENT: on|off
10274TYPE: onoff
10275DEFAULT: on
10276LOC: Config.onoff.mem_pools
10277DOC_START
10278 If set, Squid will keep pools of allocated (but unused) memory
10279 available for future use. If memory is a premium on your
10280 system and you believe your malloc library outperforms Squid
10281 routines, disable this.
10282DOC_END
10283
10284NAME: memory_pools_limit
10285COMMENT: (bytes)
10286TYPE: b_int64_t
10287DEFAULT: 5 MB
10288LOC: Config.MemPools.limit
10289DOC_START
10290 Used only with memory_pools on:
10291 memory_pools_limit 50 MB
10292
10293 If set to a non-zero value, Squid will keep at most the specified
10294 limit of allocated (but unused) memory in memory pools. All free()
10295 requests that exceed this limit will be handled by your malloc
10296 library. Squid does not pre-allocate any memory, just safe-keeps
10297 objects that otherwise would be free()d. Thus, it is safe to set
10298 memory_pools_limit to a reasonably high value even if your
10299 configuration will use less memory.
10300
10301 If set to none, Squid will keep all memory it can. That is, there
10302 will be no limit on the total amount of memory used for safe-keeping.
10303
10304 To disable memory allocation optimization, do not set
10305 memory_pools_limit to 0 or none. Set memory_pools to "off" instead.
10306
10307 An overhead for maintaining memory pools is not taken into account
10308 when the limit is checked. This overhead is close to four bytes per
10309 object kept. However, pools may actually _save_ memory because of
10310 reduced memory thrashing in your malloc library.
10311DOC_END
10312
10313NAME: forwarded_for
10314COMMENT: on|off|transparent|truncate|delete
10315TYPE: string
10316DEFAULT: on
10317LOC: opt_forwarded_for
10318DOC_START
10319 If set to "on", Squid will append your client's IP address
10320 in the HTTP requests it forwards. By default it looks like:
10321
10322 X-Forwarded-For: 192.1.2.3
10323
10324 If set to "off", it will appear as
10325
10326 X-Forwarded-For: unknown
10327
10328 If set to "transparent", Squid will not alter the
10329 X-Forwarded-For header in any way.
10330
10331 If set to "delete", Squid will delete the entire
10332 X-Forwarded-For header.
10333
10334 If set to "truncate", Squid will remove all existing
10335 X-Forwarded-For entries, and place the client IP as the sole entry.
10336DOC_END
10337
10338NAME: cachemgr_passwd
10339TYPE: cachemgrpasswd
10340DEFAULT: none
10341DEFAULT_DOC: No password. Actions which require password are denied.
10342LOC: Config.passwd_list
10343DOC_START
10344 Specify passwords for cachemgr operations.
10345
10346 Usage: cachemgr_passwd password action action ...
10347
10348 Some valid actions are (see cache manager menu for a full list):
10349 5min
10350 60min
10351 authenticator
10352 cbdata
10353 client_list
10354 comm_incoming
10355 config *
10356 counters
10357 delay
10358 digest_stats
10359 dns
10360 events
10361 filedescriptors
10362 fqdncache
10363 histograms
10364 http_headers
10365 info
10366 io
10367 ipcache
10368 mem
10369 menu
10370 netdb
10371 objects
10372 offline_toggle *
10373 pconn
10374 peer_select
10375 reconfigure *
10376 redirector
10377 refresh
10378 server_list
10379 shutdown *
10380 store_digest
10381 storedir
10382 utilization
10383 via_headers
10384 vm_objects
10385
10386 * Indicates actions which will not be performed without a
10387 valid password, others can be performed if not listed here.
10388
10389 To disable an action, set the password to "disable".
10390 To allow performing an action without a password, set the
10391 password to "none".
10392
10393 Use the keyword "all" to set the same password for all actions.
10394
10395Example:
10396 cachemgr_passwd secret shutdown
10397 cachemgr_passwd lesssssssecret info stats/objects
10398 cachemgr_passwd disable all
10399DOC_END
10400
10401NAME: client_db
10402COMMENT: on|off
10403TYPE: onoff
10404DEFAULT: on
10405LOC: Config.onoff.client_db
10406DOC_START
10407 If you want to disable collecting per-client statistics,
10408 turn off client_db here.
10409DOC_END
10410
10411NAME: refresh_all_ims
10412COMMENT: on|off
10413TYPE: onoff
10414DEFAULT: off
10415LOC: Config.onoff.refresh_all_ims
10416DOC_START
10417 When you enable this option, squid will always check
10418 the origin server for an update when a client sends an
10419 If-Modified-Since request. Many browsers use IMS
10420 requests when the user requests a reload, and this
10421 ensures those clients receive the latest version.
10422
10423 By default (off), squid may return a Not Modified response
10424 based on the age of the cached version.
10425DOC_END
10426
10427NAME: reload_into_ims
10428IFDEF: USE_HTTP_VIOLATIONS
10429COMMENT: on|off
10430TYPE: onoff
10431DEFAULT: off
10432LOC: Config.onoff.reload_into_ims
10433DOC_START
10434 When you enable this option, client no-cache or ``reload''
10435 requests will be changed to If-Modified-Since requests.
10436 Doing this VIOLATES the HTTP standard. Enabling this
10437 feature could make you liable for problems which it
10438 causes.
10439
10440 see also refresh_pattern for a more selective approach.
10441DOC_END
10442
10443NAME: connect_retries
10444TYPE: int
10445LOC: Config.connect_retries
10446DEFAULT: 0
10447DEFAULT_DOC: Do not retry failed connections.
10448DOC_START
10449 Limits the number of reopening attempts when establishing a single
10450 TCP connection. All these attempts must still complete before the
10451 applicable connection opening timeout expires.
10452
10453 By default and when connect_retries is set to zero, Squid does not
10454 retry failed connection opening attempts.
10455
10456 The (not recommended) maximum is 10 tries. An attempt to configure a
10457 higher value results in the value of 10 being used (with a warning).
10458
10459 Squid may open connections to retry various high-level forwarding
10460 failures. For an outside observer, that activity may look like a
10461 low-level connection reopening attempt, but those high-level retries
10462 are governed by forward_max_tries instead.
10463
10464 See also: connect_timeout, forward_timeout, icap_connect_timeout,
10465 and forward_max_tries.
10466DOC_END
10467
10468NAME: retry_on_error
10469TYPE: onoff
10470LOC: Config.retry.onerror
10471DEFAULT: off
10472DOC_START
10473 If set to ON Squid will automatically retry requests when
10474 receiving an error response with status 403 (Forbidden),
10475 500 (Internal Error), 501 or 503 (Service not available).
10476 Status 502 and 504 (Gateway errors) are always retried.
10477
10478 This is mainly useful if you are in a complex cache hierarchy to
10479 work around access control errors.
10480
10481 NOTE: This retry will attempt to find another working destination.
10482 Which is different from the server which just failed.
10483DOC_END
10484
10485NAME: as_whois_server
10486TYPE: string
10487LOC: Config.as_whois_server
10488DEFAULT: whois.ra.net
10489DOC_START
10490 WHOIS server to query for AS numbers. NOTE: AS numbers are
10491 queried only when Squid starts up, not for every request.
10492DOC_END
10493
10494NAME: offline_mode
10495TYPE: onoff
10496LOC: Config.onoff.offline
10497DEFAULT: off
10498DOC_START
10499 Enable this option and Squid will never try to validate cached
10500 objects.
10501DOC_END
10502
10503NAME: uri_whitespace
10504TYPE: uri_whitespace
10505LOC: Config.uri_whitespace
10506DEFAULT: strip
10507DOC_START
10508 What to do with requests that have whitespace characters in the
10509 URI. Options:
10510
10511 strip: The whitespace characters are stripped out of the URL.
10512 This is the behavior recommended by RFC2396 and RFC3986
10513 for tolerant handling of generic URI.
10514 NOTE: This is one difference between generic URI and HTTP URLs.
10515
10516 deny: The request is denied. The user receives an "Invalid
10517 Request" message.
10518 This is the behaviour recommended by RFC2616 for safe
10519 handling of HTTP request URL.
10520
10521 allow: The request is allowed and the URI is not changed. The
10522 whitespace characters remain in the URI. Note the
10523 whitespace is passed to redirector processes if they
10524 are in use.
10525 Note this may be considered a violation of RFC2616
10526 request parsing where whitespace is prohibited in the
10527 URL field.
10528
10529 encode: The request is allowed and the whitespace characters are
10530 encoded according to RFC1738.
10531
10532 chop: The request is allowed and the URI is chopped at the
10533 first whitespace.
10534
10535
10536 NOTE the current Squid implementation of encode and chop violates
10537 RFC2616 by not using a 301 redirect after altering the URL.
10538DOC_END
10539
10540NAME: chroot
10541TYPE: string
10542LOC: Config.chroot_dir
10543DEFAULT: none
10544DOC_START
10545 Specifies a directory where Squid should do a chroot() while
10546 initializing. This also causes Squid to fully drop root
10547 privileges after initializing. This means, for example, if you
10548 use a HTTP port less than 1024 and try to reconfigure, you may
10549 get an error saying that Squid can not open the port.
10550DOC_END
10551
10552NAME: pipeline_prefetch
10553TYPE: pipelinePrefetch
10554LOC: Config.pipeline_max_prefetch
10555DEFAULT: 0
10556DEFAULT_DOC: Do not pre-parse pipelined requests.
10557DOC_START
10558 HTTP clients may send a pipeline of 1+N requests to Squid using a
10559 single connection, without waiting for Squid to respond to the first
10560 of those requests. This option limits the number of concurrent
10561 requests Squid will try to handle in parallel. If set to N, Squid
10562 will try to receive and process up to 1+N requests on the same
10563 connection concurrently.
10564
10565 Defaults to 0 (off) for bandwidth management and access logging
10566 reasons.
10567
10568 NOTE: pipelining requires persistent connections to clients.
10569
10570 WARNING: pipelining breaks NTLM and Negotiate/Kerberos authentication.
10571DOC_END
10572
10573NAME: high_response_time_warning
10574TYPE: int
10575COMMENT: (msec)
10576LOC: Config.warnings.high_rptm
10577DEFAULT: 0
10578DEFAULT_DOC: disabled.
10579DOC_START
10580 If the one-minute median response time exceeds this value,
10581 Squid prints a WARNING with debug level 0 to get the
10582 administrators attention. The value is in milliseconds.
10583DOC_END
10584
10585NAME: high_page_fault_warning
10586TYPE: int
10587LOC: Config.warnings.high_pf
10588DEFAULT: 0
10589DEFAULT_DOC: disabled.
10590DOC_START
10591 If the one-minute average page fault rate exceeds this
10592 value, Squid prints a WARNING with debug level 0 to get
10593 the administrators attention. The value is in page faults
10594 per second.
10595DOC_END
10596
10597NAME: high_memory_warning
10598TYPE: b_size_t
10599LOC: Config.warnings.high_memory
10600IFDEF: HAVE_MSTATS&&HAVE_GNUMALLOC_H
10601DEFAULT: 0 KB
10602DEFAULT_DOC: disabled.
10603DOC_START
10604 If the memory usage (as determined by gnumalloc, if available and used)
10605 exceeds this amount, Squid prints a WARNING with debug level 0 to get
10606 the administrators attention.
10607DOC_END
10608# TODO: link high_memory_warning to mempools?
10609
10610NAME: sleep_after_fork
10611COMMENT: (microseconds)
10612TYPE: int
10613LOC: Config.sleep_after_fork
10614DEFAULT: 0
10615DOC_START
10616 When this is set to a non-zero value, the main Squid process
10617 sleeps the specified number of microseconds after a fork()
10618 system call. This sleep may help the situation where your
10619 system reports fork() failures due to lack of (virtual)
10620 memory. Note, however, if you have a lot of child
10621 processes, these sleep delays will add up and your
10622 Squid will not service requests for some amount of time
10623 until all the child processes have been started.
10624DOC_END
10625
10626NAME: windows_ipaddrchangemonitor
10627IFDEF: _SQUID_WINDOWS_
10628COMMENT: on|off
10629TYPE: onoff
10630DEFAULT: on
10631LOC: Config.onoff.WIN32_IpAddrChangeMonitor
10632DOC_START
10633 On Windows Squid by default will monitor IP address changes and will
10634 reconfigure itself after any detected event. This is very useful for
10635 proxies connected to internet with dial-up interfaces.
10636 In some cases (a Proxy server acting as VPN gateway is one) it could be
10637 desiderable to disable this behaviour setting this to 'off'.
10638 Note: after changing this, Squid service must be restarted.
10639DOC_END
10640
10641NAME: eui_lookup
10642TYPE: onoff
10643IFDEF: USE_SQUID_EUI
10644DEFAULT: on
10645LOC: Eui::TheConfig.euiLookup
10646DOC_START
10647 Whether to lookup the EUI or MAC address of a connected client.
10648DOC_END
10649
10650NAME: max_filedescriptors max_filedesc
10651TYPE: int
10652DEFAULT: 0
10653DEFAULT_DOC: Use operating system soft limit set by ulimit.
10654LOC: Config.max_filedescriptors
10655DOC_START
10656 Set the maximum number of filedescriptors, either below the
10657 operating system default or up to the hard limit.
10658
10659 Remove from squid.conf to inherit the current ulimit soft
10660 limit setting.
10661
10662 Note: Changing this requires a restart of Squid. Also
10663 not all I/O types supports large values (eg on Windows).
10664DOC_END
10665
10666NAME: force_request_body_continuation
10667TYPE: acl_access
10668LOC: Config.accessList.forceRequestBodyContinuation
10669DEFAULT: none
10670DEFAULT_DOC: Deny, unless rules exist in squid.conf.
10671DOC_START
10672 This option controls how Squid handles data upload requests from HTTP
10673 and FTP agents that require a "Please Continue" control message response
10674 to actually send the request body to Squid. It is mostly useful in
10675 adaptation environments.
10676
10677 When Squid receives an HTTP request with an "Expect: 100-continue"
10678 header or an FTP upload command (e.g., STOR), Squid normally sends the
10679 request headers or FTP command information to an adaptation service (or
10680 peer) and waits for a response. Most adaptation services (and some
10681 broken peers) may not respond to Squid at that stage because they may
10682 decide to wait for the HTTP request body or FTP data transfer. However,
10683 that request body or data transfer may never come because Squid has not
10684 responded with the HTTP 100 or FTP 150 (Please Continue) control message
10685 to the request sender yet!
10686
10687 An allow match tells Squid to respond with the HTTP 100 or FTP 150
10688 (Please Continue) control message on its own, before forwarding the
10689 request to an adaptation service or peer. Such a response usually forces
10690 the request sender to proceed with sending the body. A deny match tells
10691 Squid to delay that control response until the origin server confirms
10692 that the request body is needed. Delaying is the default behavior.
10693DOC_END
10694
10695NAME: http_upgrade_request_protocols
10696TYPE: http_upgrade_request_protocols
10697LOC: Config.http_upgrade_request_protocols
10698DEFAULT: none
10699DEFAULT_DOC: Upgrade header dropped, effectively blocking an upgrade attempt.
10700DOC_START
10701 Controls client-initiated and server-confirmed switching from HTTP to
10702 another protocol (or to several protocols) using HTTP Upgrade mechanism
10703 defined in RFC 7230 Section 6.7. Squid itself does not understand the
10704 protocols being upgraded to and participates in the upgraded
10705 communication only as a dumb TCP proxy. Admins should not allow
10706 upgrading to protocols that require a more meaningful proxy
10707 participation.
10708
10709 Usage: http_upgrade_request_protocols <protocol> allow|deny [!]acl ...
10710
10711 The required "protocol" parameter is either an all-caps word OTHER or an
10712 explicit protocol name (e.g. "WebSocket") optionally followed by a slash
10713 and a version token (e.g. "HTTP/3"). Explicit protocol names and
10714 versions are case sensitive.
10715
10716 When an HTTP client sends an Upgrade request header, Squid iterates over
10717 the client-offered protocols and, for each protocol P (with an optional
10718 version V), evaluates the first non-empty set of
10719 http_upgrade_request_protocols rules (if any) from the following list:
10720
10721 * All rules with an explicit protocol name equal to P.
10722 * All rules that use OTHER instead of a protocol name.
10723
10724 In other words, rules using OTHER are considered for protocol P if and
10725 only if there are no rules mentioning P by name.
10726
10727 If both of the above sets are empty, then Squid removes protocol P from
10728 the Upgrade offer.
10729
10730 If the client sent a versioned protocol offer P/X, then explicit rules
10731 referring to the same-name but different-version protocol P/Y are
10732 declared inapplicable. Inapplicable rules are not evaluated (i.e. are
10733 ignored). However, inapplicable rules still belong to the first set of
10734 rules for P.
10735
10736 Within the applicable rule subset, individual rules are evaluated in
10737 their configuration order. If all ACLs of an applicable "allow" rule
10738 match, then the protocol offered by the client is forwarded to the next
10739 hop as is. If all ACLs of an applicable "deny" rule match, then the
10740 offer is dropped. If no applicable rules have matching ACLs, then the
10741 offer is also dropped. The first matching rule also ends rules
10742 evaluation for the offered protocol.
10743
10744 If all client-offered protocols are removed, then Squid forwards the
10745 client request without the Upgrade header. Squid never sends an empty
10746 Upgrade request header.
10747
10748 An Upgrade request header with a value violating HTTP syntax is dropped
10749 and ignored without an attempt to use extractable individual protocol
10750 offers.
10751
10752 Upon receiving an HTTP 101 (Switching Protocols) control message, Squid
10753 checks that the server listed at least one protocol name and sent a
10754 Connection:upgrade response header. Squid does not understand individual
10755 protocol naming and versioning concepts enough to implement stricter
10756 checks, but an admin can restrict HTTP 101 (Switching Protocols)
10757 responses further using http_reply_access. Responses denied by
10758 http_reply_access rules and responses flagged by the internal Upgrade
10759 checks result in HTTP 502 (Bad Gateway) ERR_INVALID_RESP errors and
10760 Squid-to-server connection closures.
10761
10762 If Squid sends an Upgrade request header, and the next hop (e.g., the
10763 origin server) responds with an acceptable HTTP 101 (Switching
10764 Protocols), then Squid forwards that message to the client and becomes
10765 a TCP tunnel.
10766
10767 The presence of an Upgrade request header alone does not preclude cache
10768 lookups. In other words, an Upgrade request might be satisfied from the
10769 cache, using regular HTTP caching rules.
10770
10771 This clause only supports fast acl types.
10772 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
10773
10774 Each of the following groups of configuration lines represents a
10775 separate configuration example:
10776
10777 # never upgrade to protocol Foo; all others are OK
10778 http_upgrade_request_protocols Foo deny all
10779 http_upgrade_request_protocols OTHER allow all
10780
10781 # only allow upgrades to protocol Bar (except for its first version)
10782 http_upgrade_request_protocols Bar/1 deny all
10783 http_upgrade_request_protocols Bar allow all
10784 http_upgrade_request_protocols OTHER deny all # this rule is optional
10785
10786 # only allow upgrades to protocol Baz, and only if Baz is the only offer
10787 acl UpgradeHeaderHasMultipleOffers ...
10788 http_upgrade_request_protocols Baz deny UpgradeHeaderHasMultipleOffers
10789 http_upgrade_request_protocols Baz allow all
10790DOC_END
10791
10792NAME: server_pconn_for_nonretriable
10793TYPE: acl_access
10794DEFAULT: none
10795DEFAULT_DOC: Open new connections for forwarding requests Squid cannot retry safely.
10796LOC: Config.accessList.serverPconnForNonretriable
10797DOC_START
10798 This option provides fine-grained control over persistent connection
10799 reuse when forwarding HTTP requests that Squid cannot retry. It is useful
10800 in environments where opening new connections is very expensive
10801 (e.g., all connections are secured with TLS with complex client and server
10802 certificate validation) and race conditions associated with persistent
10803 connections are very rare and/or only cause minor problems.
10804
10805 HTTP prohibits retrying unsafe and non-idempotent requests (e.g., POST).
10806 Squid limitations also prohibit retrying all requests with bodies (e.g., PUT).
10807 By default, when forwarding such "risky" requests, Squid opens a new
10808 connection to the server or cache_peer, even if there is an idle persistent
10809 connection available. When Squid is configured to risk sending a non-retriable
10810 request on a previously used persistent connection, and the server closes
10811 the connection before seeing that risky request, the user gets an error response
10812 from Squid. In most cases, that error response will be HTTP 502 (Bad Gateway)
10813 with ERR_ZERO_SIZE_OBJECT or ERR_WRITE_ERROR (peer connection reset) error detail.
10814
10815 If an allow rule matches, Squid reuses an available idle persistent connection
10816 (if any) for the request that Squid cannot retry. If a deny rule matches, then
10817 Squid opens a new connection for the request that Squid cannot retry.
10818
10819 This option does not affect requests that Squid can retry. They will reuse idle
10820 persistent connections (if any).
10821
10822 This clause only supports fast acl types.
10823 See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
10824
10825 Example:
10826 acl SpeedIsWorthTheRisk method POST
10827 server_pconn_for_nonretriable allow SpeedIsWorthTheRisk
10828DOC_END
10829
10830NAME: happy_eyeballs_connect_timeout
10831COMMENT: (msec)
10832TYPE: int
10833DEFAULT: 250
10834LOC: Config.happyEyeballs.connect_timeout
10835DOC_START
10836 This Happy Eyeballs (RFC 8305) tuning directive specifies the minimum
10837 delay between opening a primary to-server connection and opening a
10838 spare to-server connection for the same master transaction. This delay
10839 is similar to the Connection Attempt Delay in RFC 8305, but it is only
10840 applied to the first spare connection attempt. Subsequent spare
10841 connection attempts use happy_eyeballs_connect_gap, and primary
10842 connection attempts are not artificially delayed at all.
10843
10844 Terminology: The "primary" and "spare" designations are determined by
10845 the order of DNS answers received by Squid: If Squid DNS AAAA query
10846 was answered first, then primary connections are connections to IPv6
10847 peer addresses (while spare connections use IPv4 addresses).
10848 Similarly, if Squid DNS A query was answered first, then primary
10849 connections are connections to IPv4 peer addresses (while spare
10850 connections use IPv6 addresses).
10851
10852 Shorter happy_eyeballs_connect_timeout values reduce master
10853 transaction response time, potentially improving user-perceived
10854 response times (i.e., making user eyeballs happier). Longer delays
10855 reduce both concurrent connection level and server bombardment with
10856 connection requests, potentially improving overall Squid performance
10857 and reducing the chance of being blocked by servers for opening too
10858 many unused connections.
10859
10860 RFC 8305 prohibits happy_eyeballs_connect_timeout values smaller than
10861 10 (milliseconds) to "avoid congestion collapse in the presence of
10862 high packet-loss rates".
10863
10864 The following Happy Eyeballs directives place additional connection
10865 opening restrictions: happy_eyeballs_connect_gap and
10866 happy_eyeballs_connect_limit.
10867DOC_END
10868
10869NAME: happy_eyeballs_connect_gap
10870COMMENT: (msec)
10871TYPE: int
10872DEFAULT: -1
10873DEFAULT_DOC: no artificial delays between spare attempts
10874LOC: Config.happyEyeballs.connect_gap
10875DOC_START
10876 This Happy Eyeballs (RFC 8305) tuning directive specifies the
10877 minimum delay between opening spare to-server connections (to any
10878 server; i.e. across all concurrent master transactions in a Squid
10879 instance). Each SMP worker currently multiplies the configured gap
10880 by the total number of workers so that the combined spare connection
10881 opening rate of a Squid instance obeys the configured limit. The
10882 workers do not coordinate connection openings yet; a micro burst
10883 of spare connection openings may violate the configured gap.
10884
10885 This directive has similar trade-offs as
10886 happy_eyeballs_connect_timeout, but its focus is on limiting traffic
10887 amplification effects for Squid as a whole, while
10888 happy_eyeballs_connect_timeout works on an individual master
10889 transaction level.
10890
10891 The following Happy Eyeballs directives place additional connection
10892 opening restrictions: happy_eyeballs_connect_timeout and
10893 happy_eyeballs_connect_limit. See the former for related terminology.
10894DOC_END
10895
10896NAME: happy_eyeballs_connect_limit
10897TYPE: int
10898DEFAULT: -1
10899DEFAULT_DOC: no artificial limit on the number of concurrent spare attempts
10900LOC: Config.happyEyeballs.connect_limit
10901DOC_START
10902 This Happy Eyeballs (RFC 8305) tuning directive specifies the
10903 maximum number of spare to-server connections (to any server; i.e.
10904 across all concurrent master transactions in a Squid instance).
10905 Each SMP worker gets an equal share of the total limit. However,
10906 the workers do not share the actual connection counts yet, so one
10907 (busier) worker cannot "borrow" spare connection slots from another
10908 (less loaded) worker.
10909
10910 Setting this limit to zero disables concurrent use of primary and
10911 spare TCP connections: Spare connection attempts are made only after
10912 all primary attempts fail. However, Squid would still use the
10913 DNS-related optimizations of the Happy Eyeballs approach.
10914
10915 This directive has similar trade-offs as happy_eyeballs_connect_gap,
10916 but its focus is on limiting Squid overheads, while
10917 happy_eyeballs_connect_gap focuses on the origin server and peer
10918 overheads.
10919
10920 The following Happy Eyeballs directives place additional connection
10921 opening restrictions: happy_eyeballs_connect_timeout and
10922 happy_eyeballs_connect_gap. See the former for related terminology.
10923DOC_END
10924
10925EOF