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