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