]>
Commit | Line | Data |
---|---|---|
1 | ## Copyright (C) 1996-2023 The Squid Software Foundation and contributors | |
2 | ## | |
3 | ## Squid software is distributed under GPLv2+ license and includes | |
4 | ## contributions from numerous individuals and organizations. | |
5 | ## Please see the COPYING and CONTRIBUTORS files for details. | |
6 | ## | |
7 | ||
8 | COMMENT_START | |
9 | WELCOME TO @SQUID@ | |
10 | ---------------------------- | |
11 | ||
12 | This is the documentation for the Squid configuration file. | |
13 | This documentation can also be found online at: | |
14 | http://www.squid-cache.org/Doc/config/ | |
15 | ||
16 | You may wish to look at the Squid home page and wiki for the | |
17 | FAQ and other documentation: | |
18 | http://www.squid-cache.org/ | |
19 | https://wiki.squid-cache.org/SquidFaq | |
20 | https://wiki.squid-cache.org/ConfigExamples | |
21 | ||
22 | This documentation shows what the defaults for various directives | |
23 | happen to be. If you don't need to change the default, you should | |
24 | leave the line out of your squid.conf in most cases. | |
25 | ||
26 | In some cases "none" refers to no default setting at all, | |
27 | while in other cases it refers to the value of the option | |
28 | - the comments for that keyword indicate if this is the case. | |
29 | ||
30 | COMMENT_END | |
31 | ||
32 | COMMENT_START | |
33 | Configuration options can be included using the "include" directive. | |
34 | Include takes a list of files to include. Quoting and wildcards are | |
35 | supported. | |
36 | ||
37 | For example, | |
38 | ||
39 | include /path/to/included/file/squid.acl.config | |
40 | ||
41 | Includes can be nested up to a hard-coded depth of 16 levels. | |
42 | This arbitrary restriction is to prevent recursive include references | |
43 | from causing Squid entering an infinite loop whilst trying to load | |
44 | configuration files. | |
45 | ||
46 | Values with byte units | |
47 | ||
48 | Squid accepts size units on some size related directives. All | |
49 | such directives are documented with a default value displaying | |
50 | a unit. | |
51 | ||
52 | Units accepted by Squid are: | |
53 | bytes - byte | |
54 | KB - Kilobyte (1024 bytes) | |
55 | MB - Megabyte | |
56 | GB - Gigabyte | |
57 | ||
58 | Values with time units | |
59 | ||
60 | Time-related directives marked with either "time-units" or | |
61 | "time-units-small" accept a time unit. The supported time units are: | |
62 | ||
63 | nanosecond (time-units-small only) | |
64 | microsecond (time-units-small only) | |
65 | millisecond | |
66 | second | |
67 | minute | |
68 | hour | |
69 | day | |
70 | week | |
71 | fortnight | |
72 | month - 30 days | |
73 | year - 31557790080 milliseconds (just over 365 days) | |
74 | decade | |
75 | ||
76 | Values with spaces, quotes, and other special characters | |
77 | ||
78 | Squid supports directive parameters with spaces, quotes, and other | |
79 | special characters. Surround such parameters with "double quotes". Use | |
80 | the configuration_includes_quoted_values directive to enable or | |
81 | disable that support. | |
82 | ||
83 | Squid supports reading configuration option parameters from external | |
84 | files using the syntax: | |
85 | parameters("/path/filename") | |
86 | For example: | |
87 | acl allowlist dstdomain parameters("/etc/squid/allowlist.txt") | |
88 | ||
89 | Conditional configuration | |
90 | ||
91 | If-statements can be used to make configuration directives | |
92 | depend on conditions: | |
93 | ||
94 | if <CONDITION> | |
95 | ... regular configuration directives ... | |
96 | [else | |
97 | ... regular configuration directives ...] | |
98 | endif | |
99 | ||
100 | The else part is optional. The keywords "if", "else", and "endif" | |
101 | must be typed on their own lines, as if they were regular | |
102 | configuration directives. | |
103 | ||
104 | NOTE: An else-if condition is not supported. | |
105 | ||
106 | These individual conditions types are supported: | |
107 | ||
108 | true | |
109 | Always evaluates to true. | |
110 | false | |
111 | Always evaluates to false. | |
112 | <integer> = <integer> | |
113 | Equality comparison of two integer numbers. | |
114 | ||
115 | ||
116 | SMP-Related Macros | |
117 | ||
118 | The following SMP-related preprocessor macros can be used. | |
119 | ||
120 | ${process_name} expands to the current Squid process "name" | |
121 | (e.g., squid1, squid2, or cache1). | |
122 | ||
123 | ${process_number} expands to the current Squid process | |
124 | identifier, which is an integer number (e.g., 1, 2, 3) unique | |
125 | across all Squid processes of the current service instance. | |
126 | ||
127 | ${service_name} expands into the current Squid service instance | |
128 | name identifier which is provided by -n on the command line. | |
129 | ||
130 | Logformat Macros | |
131 | ||
132 | Logformat macros can be used in many places outside of the logformat | |
133 | directive. In theory, all of the logformat codes can be used as %macros, | |
134 | where they are supported. In practice, a %macro expands as a dash (-) when | |
135 | the transaction does not yet have enough information and a value is needed. | |
136 | ||
137 | There is no definitive list of what tokens are available at the various | |
138 | stages of the transaction. | |
139 | ||
140 | And some information may already be available to Squid but not yet | |
141 | committed where the macro expansion code can access it (report | |
142 | such instances!). The macro will be expanded into a single dash | |
143 | ('-') in such cases. Not all macros have been tested. | |
144 | ||
145 | COMMENT_END | |
146 | ||
147 | # options still not yet ported from 2.7 to 3.x | |
148 | NAME: broken_vary_encoding | |
149 | TYPE: obsolete | |
150 | DOC_START | |
151 | This option is not yet supported by Squid-3. | |
152 | DOC_END | |
153 | ||
154 | NAME: cache_vary | |
155 | TYPE: obsolete | |
156 | DOC_START | |
157 | This option is not yet supported by Squid-3. | |
158 | DOC_END | |
159 | ||
160 | NAME: error_map | |
161 | TYPE: obsolete | |
162 | DOC_START | |
163 | This option is not yet supported by Squid-3. | |
164 | DOC_END | |
165 | ||
166 | NAME: external_refresh_check | |
167 | TYPE: obsolete | |
168 | DOC_START | |
169 | This option is not yet supported by Squid-3. | |
170 | DOC_END | |
171 | ||
172 | NAME: location_rewrite_program location_rewrite_access location_rewrite_children location_rewrite_concurrency | |
173 | TYPE: obsolete | |
174 | DOC_START | |
175 | This option is not yet supported by Squid-3. | |
176 | DOC_END | |
177 | ||
178 | NAME: refresh_stale_hit | |
179 | TYPE: obsolete | |
180 | DOC_START | |
181 | This option is not yet supported by Squid-3. | |
182 | DOC_END | |
183 | ||
184 | # Options removed in 6.x | |
185 | NAME: announce_file | |
186 | TYPE: obsolete | |
187 | DOC_START | |
188 | Remove this line. Squid no longer supports this feature. | |
189 | DOC_END | |
190 | ||
191 | NAME: announce_host | |
192 | TYPE: obsolete | |
193 | DOC_START | |
194 | Remove this line. Squid no longer supports this feature. | |
195 | DOC_END | |
196 | ||
197 | NAME: announce_period | |
198 | TYPE: obsolete | |
199 | DOC_START | |
200 | Remove this line. Squid no longer supports this feature. | |
201 | DOC_END | |
202 | ||
203 | NAME: announce_port | |
204 | TYPE: obsolete | |
205 | DOC_START | |
206 | Remove this line. Squid no longer supports this feature. | |
207 | DOC_END | |
208 | ||
209 | NAME: request_entities | |
210 | TYPE: obsolete | |
211 | DOC_START | |
212 | Remove this line. Squid now accepts HTTP/1.1 requests with bodies. | |
213 | To simplify UI and code, Squid rejects certain HTTP/1.0 requests with bodies. | |
214 | DOC_END | |
215 | ||
216 | # Options removed in 5.x | |
217 | NAME: dns_v4_first | |
218 | TYPE: obsolete | |
219 | DOC_START | |
220 | Remove this line. Squid no longer supports preferential treatment of DNS A records. | |
221 | DOC_END | |
222 | ||
223 | # Options removed in 4.x | |
224 | NAME: cache_peer_domain cache_host_domain | |
225 | TYPE: obsolete | |
226 | DOC_START | |
227 | Replace with dstdomain ACLs and cache_peer_access. | |
228 | DOC_END | |
229 | ||
230 | NAME: ie_refresh | |
231 | TYPE: obsolete | |
232 | DOC_START | |
233 | Remove this line. The behaviour enabled by this is no longer needed. | |
234 | DOC_END | |
235 | ||
236 | NAME: sslproxy_cafile | |
237 | TYPE: obsolete | |
238 | DOC_START | |
239 | Remove this line. Use tls_outgoing_options cafile= instead. | |
240 | DOC_END | |
241 | ||
242 | NAME: sslproxy_capath | |
243 | TYPE: obsolete | |
244 | DOC_START | |
245 | Remove this line. Use tls_outgoing_options capath= instead. | |
246 | DOC_END | |
247 | ||
248 | NAME: sslproxy_cipher | |
249 | TYPE: obsolete | |
250 | DOC_START | |
251 | Remove this line. Use tls_outgoing_options cipher= instead. | |
252 | DOC_END | |
253 | ||
254 | NAME: sslproxy_client_certificate | |
255 | TYPE: obsolete | |
256 | DOC_START | |
257 | Remove this line. Use tls_outgoing_options cert= instead. | |
258 | DOC_END | |
259 | ||
260 | NAME: sslproxy_client_key | |
261 | TYPE: obsolete | |
262 | DOC_START | |
263 | Remove this line. Use tls_outgoing_options key= instead. | |
264 | DOC_END | |
265 | ||
266 | NAME: sslproxy_flags | |
267 | TYPE: obsolete | |
268 | DOC_START | |
269 | Remove this line. Use tls_outgoing_options flags= instead. | |
270 | DOC_END | |
271 | ||
272 | NAME: sslproxy_options | |
273 | TYPE: obsolete | |
274 | DOC_START | |
275 | Remove this line. Use tls_outgoing_options options= instead. | |
276 | DOC_END | |
277 | ||
278 | NAME: sslproxy_version | |
279 | TYPE: obsolete | |
280 | DOC_START | |
281 | Remove this line. Use tls_outgoing_options options= instead. | |
282 | DOC_END | |
283 | ||
284 | # Options removed in 3.5 | |
285 | NAME: hierarchy_stoplist | |
286 | TYPE: obsolete | |
287 | DOC_START | |
288 | Remove this line. Use always_direct or cache_peer_access ACLs instead if you need to prevent cache_peer use. | |
289 | DOC_END | |
290 | ||
291 | # Options removed in 3.4 | |
292 | NAME: log_access | |
293 | TYPE: obsolete | |
294 | DOC_START | |
295 | Remove this line. Use acls with access_log directives to control access logging | |
296 | DOC_END | |
297 | ||
298 | NAME: log_icap | |
299 | TYPE: obsolete | |
300 | DOC_START | |
301 | Remove this line. Use acls with icap_log directives to control icap logging | |
302 | DOC_END | |
303 | ||
304 | # Options Removed in 3.3 | |
305 | NAME: ignore_ims_on_miss | |
306 | TYPE: obsolete | |
307 | DOC_START | |
308 | Remove this line. The HTTP/1.1 feature is now configured by 'cache_miss_revalidate'. | |
309 | DOC_END | |
310 | ||
311 | # Options Removed in 3.2 | |
312 | NAME: balance_on_multiple_ip | |
313 | TYPE: obsolete | |
314 | DOC_START | |
315 | Remove this line. Squid performs a 'Happy Eyeballs' algorithm, this multiple-IP algorithm is not longer relevant. | |
316 | DOC_END | |
317 | ||
318 | NAME: chunked_request_body_max_size | |
319 | TYPE: obsolete | |
320 | DOC_START | |
321 | Remove this line. Squid is now HTTP/1.1 compliant. | |
322 | DOC_END | |
323 | ||
324 | NAME: dns_v4_fallback | |
325 | TYPE: obsolete | |
326 | DOC_START | |
327 | Remove this line. Squid performs a 'Happy Eyeballs' algorithm, the 'fallback' algorithm is no longer relevant. | |
328 | DOC_END | |
329 | ||
330 | NAME: emulate_httpd_log | |
331 | TYPE: obsolete | |
332 | DOC_START | |
333 | Replace this with an access_log directive using the format 'common' or 'combined'. | |
334 | DOC_END | |
335 | ||
336 | NAME: forward_log | |
337 | TYPE: obsolete | |
338 | DOC_START | |
339 | Use a regular access.log with ACL limiting it to MISS events. | |
340 | DOC_END | |
341 | ||
342 | NAME: ftp_list_width | |
343 | TYPE: obsolete | |
344 | DOC_START | |
345 | Remove this line. Configure FTP page display using the CSS controls in errorpages.css instead. | |
346 | DOC_END | |
347 | ||
348 | NAME: ignore_expect_100 | |
349 | TYPE: obsolete | |
350 | DOC_START | |
351 | Remove this line. The HTTP/1.1 feature is now fully supported by default. | |
352 | DOC_END | |
353 | ||
354 | NAME: log_fqdn | |
355 | TYPE: obsolete | |
356 | DOC_START | |
357 | Remove this option from your config. To log FQDN use %>A in the log format. | |
358 | DOC_END | |
359 | ||
360 | NAME: log_ip_on_direct | |
361 | TYPE: obsolete | |
362 | DOC_START | |
363 | Remove this option from your config. To log server or peer names use %<A in the log format. | |
364 | DOC_END | |
365 | ||
366 | NAME: maximum_single_addr_tries | |
367 | TYPE: obsolete | |
368 | DOC_START | |
369 | Replaced by connect_retries. The behaviour has changed, please read the documentation before altering. | |
370 | DOC_END | |
371 | ||
372 | NAME: referer_log referrer_log | |
373 | TYPE: obsolete | |
374 | DOC_START | |
375 | Replace this with an access_log directive using the format 'referrer'. | |
376 | DOC_END | |
377 | ||
378 | NAME: update_headers | |
379 | TYPE: obsolete | |
380 | DOC_START | |
381 | Remove this line. The feature is supported by default in storage types where update is implemented. | |
382 | DOC_END | |
383 | ||
384 | NAME: url_rewrite_concurrency | |
385 | TYPE: obsolete | |
386 | DOC_START | |
387 | Remove this line. Set the 'concurrency=' option of url_rewrite_children instead. | |
388 | DOC_END | |
389 | ||
390 | NAME: useragent_log | |
391 | TYPE: obsolete | |
392 | DOC_START | |
393 | Replace this with an access_log directive using the format 'useragent'. | |
394 | DOC_END | |
395 | ||
396 | # Options Removed in 3.1 | |
397 | NAME: dns_testnames | |
398 | TYPE: obsolete | |
399 | DOC_START | |
400 | Remove this line. DNS is no longer tested on startup. | |
401 | DOC_END | |
402 | ||
403 | NAME: extension_methods | |
404 | TYPE: obsolete | |
405 | DOC_START | |
406 | Remove this line. All valid methods for HTTP are accepted by default. | |
407 | DOC_END | |
408 | ||
409 | # 2.7 Options Removed/Replaced in 3.2 | |
410 | NAME: zero_buffers | |
411 | TYPE: obsolete | |
412 | DOC_NONE | |
413 | ||
414 | # 2.7 Options Removed/Replaced in 3.1 | |
415 | NAME: incoming_rate | |
416 | TYPE: obsolete | |
417 | DOC_NONE | |
418 | ||
419 | NAME: server_http11 | |
420 | TYPE: obsolete | |
421 | DOC_START | |
422 | Remove this line. HTTP/1.1 is supported by default. | |
423 | DOC_END | |
424 | ||
425 | NAME: upgrade_http0.9 | |
426 | TYPE: obsolete | |
427 | DOC_START | |
428 | Remove this line. ICY/1.0 streaming protocol is supported by default. | |
429 | DOC_END | |
430 | ||
431 | NAME: zph_local zph_mode zph_option zph_parent zph_sibling | |
432 | TYPE: obsolete | |
433 | DOC_START | |
434 | Alter these entries. Use the qos_flows directive instead. | |
435 | DOC_END | |
436 | ||
437 | # Options Removed in 3.0 | |
438 | NAME: header_access | |
439 | TYPE: obsolete | |
440 | DOC_START | |
441 | Since squid-3.0 replace with request_header_access or reply_header_access | |
442 | depending on whether you wish to match client requests or server replies. | |
443 | DOC_END | |
444 | ||
445 | NAME: httpd_accel_no_pmtu_disc | |
446 | TYPE: obsolete | |
447 | DOC_START | |
448 | Since squid-3.0 use the 'disable-pmtu-discovery' flag on http_port instead. | |
449 | DOC_END | |
450 | ||
451 | NAME: wais_relay_host | |
452 | TYPE: obsolete | |
453 | DOC_START | |
454 | Replace this line with 'cache_peer' configuration. | |
455 | DOC_END | |
456 | ||
457 | NAME: wais_relay_port | |
458 | TYPE: obsolete | |
459 | DOC_START | |
460 | Replace this line with 'cache_peer' configuration. | |
461 | DOC_END | |
462 | ||
463 | COMMENT_START | |
464 | OPTIONS FOR SMP | |
465 | ----------------------------------------------------------------------------- | |
466 | COMMENT_END | |
467 | ||
468 | NAME: workers | |
469 | TYPE: int | |
470 | LOC: Config.workers | |
471 | DEFAULT: 1 | |
472 | DEFAULT_DOC: SMP support disabled. | |
473 | DOC_START | |
474 | Number of main Squid processes or "workers" to fork and maintain. | |
475 | 0: "no daemon" mode, like running "squid -N ..." | |
476 | 1: "no SMP" mode, start one main Squid process daemon (default) | |
477 | N: start N main Squid process daemons (i.e., SMP mode) | |
478 | ||
479 | In SMP mode, each worker does nearly all what a single Squid daemon | |
480 | does (e.g., listen on http_port and forward HTTP requests). | |
481 | DOC_END | |
482 | ||
483 | NAME: cpu_affinity_map | |
484 | TYPE: CpuAffinityMap | |
485 | LOC: Config.cpuAffinityMap | |
486 | DEFAULT: none | |
487 | DEFAULT_DOC: Let operating system decide. | |
488 | DOC_START | |
489 | Usage: cpu_affinity_map process_numbers=P1,P2,... cores=C1,C2,... | |
490 | ||
491 | Sets 1:1 mapping between Squid processes and CPU cores. For example, | |
492 | ||
493 | cpu_affinity_map process_numbers=1,2,3,4 cores=1,3,5,7 | |
494 | ||
495 | affects processes 1 through 4 only and places them on the first | |
496 | four even cores, starting with core #1. | |
497 | ||
498 | CPU cores are numbered starting from 1. Requires support for | |
499 | sched_getaffinity(2) and sched_setaffinity(2) system calls. | |
500 | ||
501 | Multiple cpu_affinity_map options are merged. | |
502 | ||
503 | See also: workers | |
504 | DOC_END | |
505 | ||
506 | NAME: shared_memory_locking | |
507 | TYPE: YesNoNone | |
508 | COMMENT: on|off | |
509 | LOC: Config.shmLocking | |
510 | DEFAULT: off | |
511 | DOC_START | |
512 | Whether to ensure that all required shared memory is available by | |
513 | "locking" that shared memory into RAM when Squid starts. The | |
514 | alternative is faster startup time followed by slightly slower | |
515 | performance and, if not enough RAM is actually available during | |
516 | runtime, mysterious crashes. | |
517 | ||
518 | SMP Squid uses many shared memory segments. These segments are | |
519 | brought into Squid memory space using an mmap(2) system call. During | |
520 | Squid startup, the mmap() call often succeeds regardless of whether | |
521 | the system has enough RAM. In general, Squid cannot tell whether the | |
522 | kernel applies this "optimistic" memory allocation policy (but | |
523 | popular modern kernels usually use it). | |
524 | ||
525 | Later, if Squid attempts to actually access the mapped memory | |
526 | regions beyond what the kernel is willing to allocate, the | |
527 | "optimistic" kernel simply kills Squid kid with a SIGBUS signal. | |
528 | Some of the memory limits enforced by the kernel are currently | |
529 | poorly understood: We do not know how to detect and check them. This | |
530 | option ensures that the mapped memory will be available. | |
531 | ||
532 | This option may have a positive performance side-effect: Locking | |
533 | memory at start avoids runtime paging I/O. Paging slows Squid down. | |
534 | ||
535 | Locking memory may require a large enough RLIMIT_MEMLOCK OS limit, | |
536 | CAP_IPC_LOCK capability, or equivalent. | |
537 | DOC_END | |
538 | ||
539 | NAME: hopeless_kid_revival_delay | |
540 | COMMENT: time-units | |
541 | TYPE: time_t | |
542 | LOC: Config.hopelessKidRevivalDelay | |
543 | DEFAULT: 1 hour | |
544 | DOC_START | |
545 | Normally, when a kid process dies, Squid immediately restarts the | |
546 | kid. A kid experiencing frequent deaths is marked as "hopeless" for | |
547 | the duration specified by this directive. Hopeless kids are not | |
548 | automatically restarted. | |
549 | ||
550 | Currently, zero values are not supported because they result in | |
551 | misconfigured SMP Squid instances running forever, endlessly | |
552 | restarting each dying kid. To effectively disable hopeless kids | |
553 | revival, set the delay to a huge value (e.g., 1 year). | |
554 | ||
555 | Reconfiguration also clears all hopeless kids designations, allowing | |
556 | for manual revival of hopeless kids. | |
557 | DOC_END | |
558 | ||
559 | COMMENT_START | |
560 | OPTIONS FOR AUTHENTICATION | |
561 | ----------------------------------------------------------------------------- | |
562 | COMMENT_END | |
563 | ||
564 | NAME: auth_param | |
565 | TYPE: authparam | |
566 | IFDEF: USE_AUTH | |
567 | LOC: Auth::TheConfig.schemes | |
568 | DEFAULT: none | |
569 | DOC_START | |
570 | This is used to define parameters for the various authentication | |
571 | schemes supported by Squid. | |
572 | ||
573 | format: auth_param scheme parameter [setting] | |
574 | ||
575 | The order in which authentication schemes are presented to the client is | |
576 | dependent on the order the scheme first appears in config file. IE | |
577 | has a bug (it's not RFC 2617 compliant) in that it will use the basic | |
578 | scheme if basic is the first entry presented, even if more secure | |
579 | schemes are presented. For now use the order in the recommended | |
580 | settings section below. If other browsers have difficulties (don't | |
581 | recognize the schemes offered even if you are using basic) either | |
582 | put basic first, or disable the other schemes (by commenting out their | |
583 | program entry). | |
584 | ||
585 | Once an authentication scheme is fully configured, it can only be | |
586 | shutdown by shutting squid down and restarting. Changes can be made on | |
587 | the fly and activated with a reconfigure. I.E. You can change to a | |
588 | different helper, but not unconfigure the helper completely. | |
589 | ||
590 | Please note that while this directive defines how Squid processes | |
591 | authentication it does not automatically activate authentication. For a | |
592 | given transaction, (re)authentication is requested in two primary cases | |
593 | detailed below: initial authentication and re-authentication. | |
594 | ||
595 | A client without credentials is requested to authenticate if one of the | |
596 | following ACLs is evaluated by an http_access or adapted_http_access rule: | |
597 | ||
598 | * proxy_auth ACL | |
599 | * proxy_auth_regex ACL | |
600 | * max_user_ip ACL | |
601 | * external ACL with %ul logformat %code used in FORMAT parameters | |
602 | * external ACL with %LOGIN macro used in FORMAT parameters; | |
603 | this legacy macro currently behaves the same as %ul logformat %code | |
604 | ||
605 | A client with credentials is requested to re-authenticate if http_access | |
606 | or adapted_http_access denies its request _and_ the last evaluated ACL was | |
607 | either proxy_auth, proxy_auth_regex, or an external | |
608 | ACL with %ul or %LOGIN parameter (regardless of whether that last | |
609 | evaluated ACL matched the denied request). Note that a max_user_ip ACL | |
610 | does not have this effect: Requests denied after evaluating max_user_ip | |
611 | trigger an HTTP 403 (Forbidden) response rather than re-authentication. | |
612 | ||
613 | In both initial authentication and re-authentication cases, client access | |
614 | is denied, typically with an HTTP 407 (Proxy Authentication Required) or | |
615 | an HTTP 401 (Unauthorized) response. | |
616 | ||
617 | WARNING: authentication can't be used in a transparently intercepting | |
618 | proxy as the client then thinks it is talking to an origin server and | |
619 | not the proxy. This is a limitation of bending the TCP/IP protocol to | |
620 | transparently intercepting port 80, not a limitation in Squid. | |
621 | Ports flagged 'transparent', 'intercept', or 'tproxy' have | |
622 | authentication disabled. | |
623 | ||
624 | === Parameters common to all schemes. === | |
625 | ||
626 | "program" cmdline | |
627 | Specifies the command for the external authenticator. | |
628 | ||
629 | By default, each authentication scheme is not used unless a | |
630 | program is specified. | |
631 | ||
632 | See https://wiki.squid-cache.org/Features/AddonHelpers for | |
633 | more details on helper operations and creating your own. | |
634 | ||
635 | "key_extras" format | |
636 | Specifies a string to be append to request line format for | |
637 | the authentication helper. "Quoted" format values may contain | |
638 | spaces and logformat %macros. In theory, any logformat %macro | |
639 | can be used. In practice, a %macro expands as a dash (-) if | |
640 | the helper request is sent before the required macro | |
641 | information is available to Squid. | |
642 | ||
643 | By default, Squid uses request formats provided in | |
644 | scheme-specific examples below (search for %credentials). | |
645 | ||
646 | The expanded key_extras value is added to the Squid credentials | |
647 | cache and, hence, will affect authentication. It can be used to | |
648 | authenticate different users with identical user names (e.g., | |
649 | when user authentication depends on http_port). | |
650 | ||
651 | Avoid adding frequently changing information to key_extras. For | |
652 | example, if you add user source IP, and it changes frequently | |
653 | in your environment, then max_user_ip ACL is going to treat | |
654 | every user+IP combination as a unique "user", breaking the ACL | |
655 | and wasting a lot of memory on those user records. It will also | |
656 | force users to authenticate from scratch whenever their IP | |
657 | changes. | |
658 | ||
659 | "realm" string | |
660 | Specifies the protection scope (aka realm name) which is to be | |
661 | reported to the client for the authentication scheme. It is | |
662 | commonly part of the text the user will see when prompted for | |
663 | their username and password. | |
664 | ||
665 | For Basic the default is "Squid proxy-caching web server". | |
666 | For Digest there is no default, this parameter is mandatory. | |
667 | For NTLM and Negotiate this parameter is ignored. | |
668 | ||
669 | "children" numberofchildren [startup=N] [idle=N] [concurrency=N] | |
670 | [queue-size=N] [on-persistent-overload=action] | |
671 | [reservation-timeout=seconds] | |
672 | ||
673 | The maximum number of authenticator processes to spawn. If | |
674 | you start too few Squid will have to wait for them to process | |
675 | a backlog of credential verifications, slowing it down. When | |
676 | password verifications are done via a (slow) network you are | |
677 | likely to need lots of authenticator processes. | |
678 | ||
679 | The startup= and idle= options permit some skew in the exact | |
680 | amount run. A minimum of startup=N will begin during startup | |
681 | and reconfigure. Squid will start more in groups of up to | |
682 | idle=N in an attempt to meet traffic needs and to keep idle=N | |
683 | free above those traffic needs up to the maximum. | |
684 | ||
685 | The concurrency= option sets the number of concurrent requests | |
686 | the helper can process. The default of 0 is used for helpers | |
687 | who only supports one request at a time. Setting this to a | |
688 | number greater than 0 changes the protocol used to include a | |
689 | channel ID field first on the request/response line, allowing | |
690 | multiple requests to be sent to the same helper in parallel | |
691 | without waiting for the response. | |
692 | ||
693 | Concurrency must not be set unless it's known the helper | |
694 | supports the input format with channel-ID fields. | |
695 | ||
696 | The queue-size option sets the maximum number of queued | |
697 | requests. A request is queued when no existing child can | |
698 | accept it due to concurrency limit and no new child can be | |
699 | started due to numberofchildren limit. The default maximum is | |
700 | 2*numberofchildren. Squid is allowed to temporarily exceed the | |
701 | configured maximum, marking the affected helper as | |
702 | "overloaded". If the helper overload lasts more than 3 | |
703 | minutes, the action prescribed by the on-persistent-overload | |
704 | option applies. | |
705 | ||
706 | The on-persistent-overload=action option specifies Squid | |
707 | reaction to a new helper request arriving when the helper | |
708 | has been overloaded for more that 3 minutes already. The number | |
709 | of queued requests determines whether the helper is overloaded | |
710 | (see the queue-size option). | |
711 | ||
712 | Two actions are supported: | |
713 | ||
714 | die Squid worker quits. This is the default behavior. | |
715 | ||
716 | ERR Squid treats the helper request as if it was | |
717 | immediately submitted, and the helper immediately | |
718 | replied with an ERR response. This action has no effect | |
719 | on the already queued and in-progress helper requests. | |
720 | ||
721 | NOTE: NTLM and Negotiate schemes do not support concurrency | |
722 | in the Squid code module even though some helpers can. | |
723 | ||
724 | The reservation-timeout=seconds option allows NTLM and Negotiate | |
725 | helpers to forget about clients that abandon their in-progress | |
726 | connection authentication without closing the connection. The | |
727 | timeout is measured since the last helper response received by | |
728 | Squid for the client. Fractional seconds are not supported. | |
729 | ||
730 | After the timeout, the helper will be used for other clients if | |
731 | there are no unreserved helpers available. In the latter case, | |
732 | the old client attempt to resume authentication will not be | |
733 | forwarded to the helper (and the client should open a new HTTP | |
734 | connection and retry authentication from scratch). | |
735 | ||
736 | By default, reservations do not expire and clients that keep | |
737 | their connections open without completing authentication may | |
738 | exhaust all NTLM and Negotiate helpers. | |
739 | ||
740 | "keep_alive" on|off | |
741 | If you experience problems with PUT/POST requests when using | |
742 | the NTLM or Negotiate schemes then you can try setting this | |
743 | to off. This will cause Squid to forcibly close the connection | |
744 | on the initial request where the browser asks which schemes | |
745 | are supported by the proxy. | |
746 | ||
747 | For Basic and Digest this parameter is ignored. | |
748 | ||
749 | "utf8" on|off | |
750 | Useful for sending credentials to authentication backends that | |
751 | expect UTF-8 encoding (e.g., LDAP). | |
752 | ||
753 | When this option is enabled, Squid uses HTTP Accept-Language | |
754 | request header to guess the received credentials encoding | |
755 | (ISO-Latin-1, CP1251, or UTF-8) and then converts the first | |
756 | two encodings into UTF-8. | |
757 | ||
758 | When this option is disabled and by default, Squid sends | |
759 | credentials in their original (i.e. received) encoding. | |
760 | ||
761 | This parameter is only honored for Basic and Digest schemes. | |
762 | For Basic, the entire username:password credentials are | |
763 | checked and, if necessary, re-encoded. For Digest -- just the | |
764 | username component. For NTLM and Negotiate schemes, this | |
765 | parameter is ignored. | |
766 | ||
767 | IF HAVE_AUTH_MODULE_BASIC | |
768 | === Basic authentication parameters === | |
769 | ||
770 | "credentialsttl" timetolive | |
771 | Specifies how long squid assumes an externally validated | |
772 | username:password pair is valid for - in other words how | |
773 | often the helper program is called for that user. Set this | |
774 | low to force revalidation with short lived passwords. | |
775 | ||
776 | NOTE: setting this high does not impact your susceptibility | |
777 | to replay attacks unless you are using an one-time password | |
778 | system (such as SecureID). If you are using such a system, | |
779 | you will be vulnerable to replay attacks unless you also | |
780 | use the max_user_ip ACL in an http_access rule. | |
781 | ||
782 | "casesensitive" on|off | |
783 | Specifies whether upper case letters in client-sent usernames are | |
784 | preserved. By default and when explicitly set to "off", a username | |
785 | extracted from Proxy-Authorization or Authorization request header is | |
786 | forced to lower case before user credentials are checked or stored. | |
787 | ||
788 | Most user databases are case insensitive, allowing the same username to be | |
789 | spelled using both lower and upper case letters. For such databases, any | |
790 | casesenstive setting should work, but forcing usernames to lower case may | |
791 | still make a big difference for Squid internal caches like those used by | |
792 | an external ACL with %un logformat code in FORMAT and a user_max_ip ACL. | |
793 | ||
794 | When working with a case sensitive database, set casesensitive to "on". | |
795 | ||
796 | Squid ACLs like proxy_auth are case-sensitive by default. An ACL using | |
797 | upper case letters in user names (e.g., `acl badGuys proxy_auth Bob`) | |
798 | will not match any user with Basic Authentication credentials unless | |
799 | casesensitive is explicitly turned "on" (to preserve "Bob" username | |
800 | instead of converting it to "bob" before the ACL is checked). | |
801 | ||
802 | ENDIF | |
803 | IF HAVE_AUTH_MODULE_DIGEST | |
804 | === Digest authentication parameters === | |
805 | ||
806 | "nonce_garbage_interval" timeinterval | |
807 | Specifies the interval that nonces that have been issued | |
808 | to client_agent's are checked for validity. | |
809 | ||
810 | "nonce_max_duration" timeinterval | |
811 | Specifies the maximum length of time a given nonce will be | |
812 | valid for. | |
813 | ||
814 | "nonce_max_count" number | |
815 | Specifies the maximum number of times a given nonce can be | |
816 | used. | |
817 | ||
818 | "nonce_strictness" on|off | |
819 | Determines if squid requires strict increment-by-1 behavior | |
820 | for nonce counts, or just incrementing (off - for use when | |
821 | user agents generate nonce counts that occasionally miss 1 | |
822 | (ie, 1,2,4,6)). Default off. | |
823 | ||
824 | "check_nonce_count" on|off | |
825 | This directive if set to off can disable the nonce count check | |
826 | completely to work around buggy digest qop implementations in | |
827 | certain mainstream browser versions. Default on to check the | |
828 | nonce count to protect from authentication replay attacks. | |
829 | ||
830 | "post_workaround" on|off | |
831 | This is a workaround to certain buggy browsers who send an | |
832 | incorrect request digest in POST requests when reusing the | |
833 | same nonce as acquired earlier on a GET request. | |
834 | ||
835 | ENDIF | |
836 | ||
837 | === Example Configuration === | |
838 | ||
839 | This configuration displays the recommended authentication scheme | |
840 | order from most to least secure with recommended minimum configuration | |
841 | settings for each scheme: | |
842 | ||
843 | #auth_param negotiate program <uncomment and complete this line to activate> | |
844 | #auth_param negotiate children 20 startup=0 idle=1 | |
845 | # | |
846 | #auth_param digest program <uncomment and complete this line to activate> | |
847 | #auth_param digest children 20 startup=0 idle=1 | |
848 | #auth_param digest realm Squid proxy-caching web server | |
849 | #auth_param digest nonce_garbage_interval 5 minutes | |
850 | #auth_param digest nonce_max_duration 30 minutes | |
851 | #auth_param digest nonce_max_count 50 | |
852 | # | |
853 | #auth_param ntlm program <uncomment and complete this line to activate> | |
854 | #auth_param ntlm children 20 startup=0 idle=1 | |
855 | # | |
856 | #auth_param basic program <uncomment and complete this line> | |
857 | #auth_param basic children 5 startup=5 idle=1 | |
858 | #auth_param basic credentialsttl 2 hours | |
859 | DOC_END | |
860 | ||
861 | NAME: authenticate_cache_garbage_interval | |
862 | IFDEF: USE_AUTH | |
863 | TYPE: time_t | |
864 | DEFAULT: 1 hour | |
865 | LOC: Auth::TheConfig.garbageCollectInterval | |
866 | DOC_START | |
867 | The time period between garbage collection across the username cache. | |
868 | This is a trade-off between memory utilization (long intervals - say | |
869 | 2 days) and CPU (short intervals - say 1 minute). Only change if you | |
870 | have good reason to. | |
871 | DOC_END | |
872 | ||
873 | NAME: authenticate_ttl | |
874 | IFDEF: USE_AUTH | |
875 | TYPE: time_t | |
876 | DEFAULT: 1 hour | |
877 | LOC: Auth::TheConfig.credentialsTtl | |
878 | DOC_START | |
879 | The time a user & their credentials stay in the logged in | |
880 | user cache since their last request. When the garbage | |
881 | interval passes, all user credentials that have passed their | |
882 | TTL are removed from memory. | |
883 | DOC_END | |
884 | ||
885 | NAME: authenticate_ip_ttl | |
886 | IFDEF: USE_AUTH | |
887 | TYPE: time_t | |
888 | LOC: Auth::TheConfig.ipTtl | |
889 | DEFAULT: 1 second | |
890 | DOC_START | |
891 | If you use proxy authentication and the 'max_user_ip' ACL, | |
892 | this directive controls how long Squid remembers the IP | |
893 | addresses associated with each user. Use a small value | |
894 | (e.g., 60 seconds) if your users might change addresses | |
895 | quickly, as is the case with dialup. You might be safe | |
896 | using a larger value (e.g., 2 hours) in a corporate LAN | |
897 | environment with relatively static address assignments. | |
898 | DOC_END | |
899 | ||
900 | COMMENT_START | |
901 | ACCESS CONTROLS | |
902 | ----------------------------------------------------------------------------- | |
903 | COMMENT_END | |
904 | ||
905 | NAME: external_acl_type | |
906 | TYPE: externalAclHelper | |
907 | LOC: Config.externalAclHelperList | |
908 | DEFAULT: none | |
909 | DOC_START | |
910 | This option defines external acl classes using a helper program | |
911 | to look up the status | |
912 | ||
913 | external_acl_type name [options] FORMAT /path/to/helper [helper arguments] | |
914 | ||
915 | Options: | |
916 | ||
917 | ttl=n TTL in seconds for cached results (defaults to 3600 | |
918 | for 1 hour) | |
919 | ||
920 | negative_ttl=n | |
921 | TTL for cached negative lookups (default same | |
922 | as ttl) | |
923 | ||
924 | grace=n Percentage remaining of TTL where a refresh of a | |
925 | cached entry should be initiated without needing to | |
926 | wait for a new reply. (default is for no grace period) | |
927 | ||
928 | cache=n The maximum number of entries in the result cache. The | |
929 | default limit is 262144 entries. Each cache entry usually | |
930 | consumes at least 256 bytes. Squid currently does not remove | |
931 | expired cache entries until the limit is reached, so a proxy | |
932 | will sooner or later reach the limit. The expanded FORMAT | |
933 | value is used as the cache key, so if the details in FORMAT | |
934 | are highly variable, a larger cache may be needed to produce | |
935 | reduction in helper load. | |
936 | ||
937 | children-max=n | |
938 | Maximum number of acl helper processes spawned to service | |
939 | external acl lookups of this type. (default 5) | |
940 | ||
941 | children-startup=n | |
942 | Minimum number of acl helper processes to spawn during | |
943 | startup and reconfigure to service external acl lookups | |
944 | of this type. (default 0) | |
945 | ||
946 | children-idle=n | |
947 | Number of acl helper processes to keep ahead of traffic | |
948 | loads. Squid will spawn this many at once whenever load | |
949 | rises above the capabilities of existing processes. | |
950 | Up to the value of children-max. (default 1) | |
951 | ||
952 | concurrency=n concurrency level per process. Only used with helpers | |
953 | capable of processing more than one query at a time. | |
954 | ||
955 | queue-size=N The queue-size option sets the maximum number of | |
956 | queued requests. A request is queued when no existing | |
957 | helper can accept it due to concurrency limit and no | |
958 | new helper can be started due to children-max limit. | |
959 | If the queued requests exceed queue size, the acl is | |
960 | ignored. The default value is set to 2*children-max. | |
961 | ||
962 | protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers. | |
963 | ||
964 | ipv4 / ipv6 IP protocol used to communicate with this helper. | |
965 | The default is to auto-detect IPv6 and use it when available. | |
966 | ||
967 | ||
968 | FORMAT is a series of %macro codes. See logformat directive for a full list | |
969 | of the accepted codes. Although note that at the time of any external ACL | |
970 | being tested data may not be available and thus some %macro expand to '-'. | |
971 | ||
972 | In addition to the logformat codes; when processing external ACLs these | |
973 | additional macros are made available: | |
974 | ||
975 | %ACL The name of the ACL being tested. | |
976 | ||
977 | %DATA The ACL arguments specified in the referencing config | |
978 | 'acl ... external' line, separated by spaces (an | |
979 | "argument string"). see acl external. | |
980 | ||
981 | If there are no ACL arguments %DATA expands to '-'. | |
982 | ||
983 | If you do not specify a DATA macro inside FORMAT, | |
984 | Squid automatically appends %DATA to your FORMAT. | |
985 | Note that Squid-3.x may expand %DATA to whitespace | |
986 | or nothing in this case. | |
987 | ||
988 | By default, Squid applies URL-encoding to each ACL | |
989 | argument inside the argument string. If an explicit | |
990 | encoding modifier is used (e.g., %#DATA), then Squid | |
991 | encodes the whole argument string as a single token | |
992 | (e.g., with %#DATA, spaces between arguments become | |
993 | %20). | |
994 | ||
995 | If SSL is enabled, the following formatting codes become available: | |
996 | ||
997 | %USER_CERT SSL User certificate in PEM format | |
998 | %USER_CERTCHAIN SSL User certificate chain in PEM format | |
999 | %USER_CERT_xx SSL User certificate subject attribute xx | |
1000 | %USER_CA_CERT_xx SSL User certificate issuer attribute xx | |
1001 | ||
1002 | ||
1003 | NOTE: all other format codes accepted by older Squid versions | |
1004 | are deprecated. | |
1005 | ||
1006 | ||
1007 | General request syntax: | |
1008 | ||
1009 | [channel-ID] FORMAT-values | |
1010 | ||
1011 | ||
1012 | FORMAT-values consists of transaction details expanded with | |
1013 | whitespace separation per the config file FORMAT specification | |
1014 | using the FORMAT macros listed above. | |
1015 | ||
1016 | Request values sent to the helper are URL escaped to protect | |
1017 | each value in requests against whitespaces. | |
1018 | ||
1019 | If using protocol=2.5 then the request sent to the helper is not | |
1020 | URL escaped to protect against whitespace. | |
1021 | ||
1022 | NOTE: protocol=3.0 is deprecated as no longer necessary. | |
1023 | ||
1024 | When using the concurrency= option the protocol is changed by | |
1025 | introducing a query channel tag in front of the request/response. | |
1026 | The query channel tag is a number between 0 and concurrency-1. | |
1027 | This value must be echoed back unchanged to Squid as the first part | |
1028 | of the response relating to its request. | |
1029 | ||
1030 | ||
1031 | The helper receives lines expanded per the above format specification | |
1032 | and for each input line returns 1 line starting with OK/ERR/BH result | |
1033 | code and optionally followed by additional keywords with more details. | |
1034 | ||
1035 | ||
1036 | General result syntax: | |
1037 | ||
1038 | [channel-ID] result keyword=value ... | |
1039 | ||
1040 | Result consists of one of the codes: | |
1041 | ||
1042 | OK | |
1043 | the ACL test produced a match. | |
1044 | ||
1045 | ERR | |
1046 | the ACL test does not produce a match. | |
1047 | ||
1048 | BH | |
1049 | An internal error occurred in the helper, preventing | |
1050 | a result being identified. | |
1051 | ||
1052 | The meaning of 'a match' is determined by your squid.conf | |
1053 | access control configuration. See the Squid wiki for details. | |
1054 | ||
1055 | Defined keywords: | |
1056 | ||
1057 | user= The users name (login) | |
1058 | ||
1059 | password= The users password (for login= cache_peer option) | |
1060 | ||
1061 | message= Message describing the reason for this response. | |
1062 | Available as %o in error pages. | |
1063 | Useful on (ERR and BH results). | |
1064 | ||
1065 | tag= Apply a tag to a request. Only sets a tag once, | |
1066 | does not alter existing tags. | |
1067 | ||
1068 | log= String to be logged in access.log. Available as | |
1069 | %ea in logformat specifications. | |
1070 | ||
1071 | clt_conn_tag= Associates a TAG with the client TCP connection. | |
1072 | Please see url_rewrite_program related documentation | |
1073 | for this kv-pair. | |
1074 | ||
1075 | Any keywords may be sent on any response whether OK, ERR or BH. | |
1076 | ||
1077 | All response keyword values need to be a single token with URL | |
1078 | escaping, or enclosed in double quotes (") and escaped using \ on | |
1079 | any double quotes or \ characters within the value. The wrapping | |
1080 | double quotes are removed before the value is interpreted by Squid. | |
1081 | \r and \n are also replace by CR and LF. | |
1082 | ||
1083 | Some example key values: | |
1084 | ||
1085 | user=John%20Smith | |
1086 | user="John Smith" | |
1087 | user="J. \"Bob\" Smith" | |
1088 | DOC_END | |
1089 | ||
1090 | NAME: acl | |
1091 | TYPE: acl | |
1092 | LOC: Config.namedAcls | |
1093 | IF USE_OPENSSL | |
1094 | DEFAULT: ssl::certHasExpired ssl_error X509_V_ERR_CERT_HAS_EXPIRED | |
1095 | DEFAULT: ssl::certNotYetValid ssl_error X509_V_ERR_CERT_NOT_YET_VALID | |
1096 | DEFAULT: ssl::certDomainMismatch ssl_error SQUID_X509_V_ERR_DOMAIN_MISMATCH | |
1097 | DEFAULT: 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 | |
1098 | DEFAULT: ssl::certSelfSigned ssl_error X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT | |
1099 | ENDIF | |
1100 | DEFAULT: all src all | |
1101 | DEFAULT: manager url_regex +i ^[^:]+://[^/]+/squid-internal-mgr/ | |
1102 | DEFAULT: localhost src 127.0.0.1/32 ::1 | |
1103 | DEFAULT: to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1/128 ::/128 | |
1104 | DEFAULT: to_linklocal dst 169.254.0.0/16 fe80::/10 | |
1105 | DEFAULT: CONNECT method CONNECT | |
1106 | DEFAULT_DOC: ACLs all, manager, localhost, to_localhost, to_linklocal, and CONNECT are predefined. | |
1107 | DOC_START | |
1108 | Defining an Access List | |
1109 | ||
1110 | Every access list definition must begin with an aclname and acltype, | |
1111 | followed by either type-specific arguments or a quoted filename that | |
1112 | they are read from. | |
1113 | ||
1114 | acl aclname acltype argument ... | |
1115 | acl aclname acltype "file" ... | |
1116 | ||
1117 | When using "file", the file should contain one item per line. | |
1118 | ||
1119 | ||
1120 | ACL Options | |
1121 | ||
1122 | Some acl types supports options which changes their default behaviour: | |
1123 | ||
1124 | -i,+i By default, regular expressions are CASE-SENSITIVE. To make them | |
1125 | case-insensitive, use the -i option. To return case-sensitive | |
1126 | use the +i option between patterns, or make a new ACL line | |
1127 | without -i. | |
1128 | ||
1129 | -n Disable lookups and address type conversions. If lookup or | |
1130 | conversion is required because the parameter type (IP or | |
1131 | domain name) does not match the message address type (domain | |
1132 | name or IP), then the ACL would immediately declare a mismatch | |
1133 | without any warnings or lookups. | |
1134 | ||
1135 | -m[=delimiters] | |
1136 | Perform a list membership test, interpreting values as | |
1137 | comma-separated token lists and matching against individual | |
1138 | tokens instead of whole values. | |
1139 | The optional "delimiters" parameter specifies one or more | |
1140 | alternative non-alphanumeric delimiter characters. | |
1141 | non-alphanumeric delimiter characters. | |
1142 | ||
1143 | -- Used to stop processing all options, in the case the first acl | |
1144 | value has '-' character as first character (for example the '-' | |
1145 | is a valid domain name) | |
1146 | ||
1147 | Some acl types require suspending the current request in order | |
1148 | to access some external data source. | |
1149 | Those which do are marked with the tag [slow], those which | |
1150 | don't are marked as [fast]. | |
1151 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl | |
1152 | for further information | |
1153 | ||
1154 | ***** ACL TYPES AVAILABLE ***** | |
1155 | ||
1156 | acl aclname src ip-address/mask ... # clients IP address [fast] | |
1157 | acl aclname src addr1-addr2/mask ... # range of addresses [fast] | |
1158 | acl aclname dst [-n] ip-address/mask ... # URL host's IP address [slow] | |
1159 | acl aclname localip ip-address/mask ... # IP address the client connected to [fast] | |
1160 | ||
1161 | IF USE_SQUID_EUI | |
1162 | acl aclname arp mac-address ... | |
1163 | acl aclname eui64 eui64-address ... | |
1164 | # [fast] | |
1165 | # MAC (EUI-48) and EUI-64 addresses use xx:xx:xx:xx:xx:xx notation. | |
1166 | # | |
1167 | # The 'arp' ACL code is not portable to all operating systems. | |
1168 | # It works on Linux, Solaris, Windows, FreeBSD, and some other | |
1169 | # BSD variants. | |
1170 | # | |
1171 | # The eui_lookup directive is required to be 'on' (the default) | |
1172 | # and Squid built with --enable-eui for MAC/EUI addresses to be | |
1173 | # available for this ACL. | |
1174 | # | |
1175 | # Squid can only determine the MAC/EUI address for IPv4 | |
1176 | # clients that are on the same subnet. If the client is on a | |
1177 | # different subnet, then Squid cannot find out its address. | |
1178 | # | |
1179 | # IPv6 protocol does not contain ARP. MAC/EUI is either | |
1180 | # encoded directly in the IPv6 address or not available. | |
1181 | ENDIF | |
1182 | acl aclname clientside_mark mark[/mask] ... | |
1183 | # matches CONNMARK of an accepted connection [fast] | |
1184 | # DEPRECATED. Use the 'client_connection_mark' instead. | |
1185 | ||
1186 | acl aclname client_connection_mark mark[/mask] ... | |
1187 | # matches CONNMARK of an accepted connection [fast] | |
1188 | # | |
1189 | # mark and mask are unsigned integers (hex, octal, or decimal). | |
1190 | # If multiple marks are given, then the ACL matches if at least | |
1191 | # one mark matches. | |
1192 | # | |
1193 | # Uses netfilter-conntrack library. | |
1194 | # Requires building Squid with --enable-linux-netfilter. | |
1195 | # | |
1196 | # The client, various intermediaries, and Squid itself may set | |
1197 | # CONNMARK at various times. The last CONNMARK set wins. This ACL | |
1198 | # checks the mark present on an accepted connection or set by | |
1199 | # Squid afterwards, depending on the ACL check timing. This ACL | |
1200 | # effectively ignores any mark set by other agents after Squid has | |
1201 | # accepted the connection. | |
1202 | ||
1203 | acl aclname srcdomain .foo.com ... | |
1204 | # reverse lookup, from client IP [slow] | |
1205 | acl aclname dstdomain [-n] .foo.com ... | |
1206 | # Destination server from URL [fast] | |
1207 | acl aclname srcdom_regex [-i] \.foo\.com ... | |
1208 | # regex matching client name [slow] | |
1209 | acl aclname dstdom_regex [-n] [-i] \.foo\.com ... | |
1210 | # regex matching server [fast] | |
1211 | # | |
1212 | # For dstdomain and dstdom_regex a reverse lookup is tried if a IP | |
1213 | # based URL is used and no match is found. The name "none" is used | |
1214 | # if the reverse lookup fails. | |
1215 | ||
1216 | acl aclname src_as number ... | |
1217 | acl aclname dst_as number ... | |
1218 | # [fast] | |
1219 | # Except for access control, AS numbers can be used for | |
1220 | # routing of requests to specific caches. Here's an | |
1221 | # example for routing all requests for AS#1241 and only | |
1222 | # those to mycache.mydomain.net: | |
1223 | # acl asexample dst_as 1241 | |
1224 | # cache_peer_access mycache.mydomain.net allow asexample | |
1225 | # cache_peer_access mycache_mydomain.net deny all | |
1226 | ||
1227 | acl aclname peername myPeer ... | |
1228 | acl aclname peername_regex [-i] regex-pattern ... | |
1229 | # [fast] | |
1230 | # match against a named cache_peer entry | |
1231 | # set unique name= on cache_peer lines for reliable use. | |
1232 | ||
1233 | acl aclname time [day-abbrevs] [h1:m1-h2:m2] | |
1234 | # [fast] | |
1235 | # day-abbrevs: | |
1236 | # S - Sunday | |
1237 | # M - Monday | |
1238 | # T - Tuesday | |
1239 | # W - Wednesday | |
1240 | # H - Thursday | |
1241 | # F - Friday | |
1242 | # A - Saturday | |
1243 | # h1:m1 must be less than h2:m2 | |
1244 | ||
1245 | acl aclname url_regex [-i] ^http:// ... | |
1246 | # regex matching on whole URL [fast] | |
1247 | acl aclname urllogin [-i] [^a-zA-Z0-9] ... | |
1248 | # regex matching on URL login field | |
1249 | acl aclname urlpath_regex [-i] \.gif$ ... | |
1250 | # regex matching on URL path [fast] | |
1251 | ||
1252 | acl aclname port 80 70 21 0-1024 ... | |
1253 | # destination TCP port (or port range) of the request [fast] | |
1254 | # | |
1255 | # Port 0 matches requests that have no explicit and no default destination | |
1256 | # ports (e.g., HTTP requests with URN targets) | |
1257 | ||
1258 | acl aclname localport 3128 ... # TCP port the client connected to [fast] | |
1259 | # NP: for interception mode this is usually '80' | |
1260 | ||
1261 | acl aclname myportname 3128 ... # *_port name [fast] | |
1262 | ||
1263 | acl aclname proto HTTP FTP ... # request protocol [fast] | |
1264 | ||
1265 | acl aclname method GET POST ... # HTTP request method [fast] | |
1266 | ||
1267 | acl aclname http_status 200 301 500- 400-403 ... | |
1268 | # status code in reply [fast] | |
1269 | ||
1270 | acl aclname browser [-i] regexp ... | |
1271 | # pattern match on User-Agent header (see also req_header below) [fast] | |
1272 | ||
1273 | acl aclname referer_regex [-i] regexp ... | |
1274 | # pattern match on Referer header [fast] | |
1275 | # Referer is highly unreliable, so use with care | |
1276 | ||
1277 | acl aclname proxy_auth [-i] username ... | |
1278 | # perform http authentication challenge to the client and match against | |
1279 | # supplied credentials [slow] | |
1280 | # | |
1281 | # takes a list of allowed usernames. | |
1282 | # use REQUIRED to accept any valid username. | |
1283 | # | |
1284 | # See proxy_auth_regex for more information. The two ACLs differ only in | |
1285 | # their parameter syntax and username matching algorithm. | |
1286 | ||
1287 | acl aclname proxy_auth_regex [-i] username_pattern ... | |
1288 | # perform http authentication challenge to the client and regex match | |
1289 | # supplied username [slow] | |
1290 | # | |
1291 | # Will use proxy authentication in forward-proxy scenarios, and plain | |
1292 | # http authentication in reverse-proxy scenarios | |
1293 | # | |
1294 | # NOTE: when a Proxy-Authentication header is sent but it is not | |
1295 | # needed during ACL checking the username is NOT logged | |
1296 | # in access.log. | |
1297 | # | |
1298 | # NOTE: proxy_auth requires a EXTERNAL authentication program | |
1299 | # to check username/password combinations (see | |
1300 | # auth_param directive). | |
1301 | # | |
1302 | # NOTE: proxy_auth can't be used in a transparent/intercepting proxy | |
1303 | # as the browser needs to be configured for using a proxy in order | |
1304 | # to respond to proxy authentication. | |
1305 | ||
1306 | acl aclname snmp_community string ... | |
1307 | # A community string to limit access to your SNMP Agent [fast] | |
1308 | # Example: | |
1309 | # | |
1310 | # acl snmppublic snmp_community public | |
1311 | ||
1312 | acl aclname maxconn number | |
1313 | # This will be matched when the client's IP address has | |
1314 | # more than <number> TCP connections established. [fast] | |
1315 | # NOTE: This only measures direct TCP links so X-Forwarded-For | |
1316 | # indirect clients are not counted. | |
1317 | ||
1318 | acl aclname max_user_ip [-s] number | |
1319 | # This will be matched when the user attempts to log in from more | |
1320 | # than <number> different ip addresses. The authenticate_ip_ttl | |
1321 | # parameter controls the timeout on the ip entries. [fast] | |
1322 | # If -s is specified the limit is strict, denying browsing | |
1323 | # from any further IP addresses until the ttl has expired. Without | |
1324 | # -s Squid will just annoy the user by "randomly" denying requests. | |
1325 | # (the counter is reset each time the limit is reached and a | |
1326 | # request is denied) | |
1327 | # NOTE: in acceleration mode or where there is mesh of child proxies, | |
1328 | # clients may appear to come from multiple addresses if they are | |
1329 | # going through proxy farms, so a limit of 1 may cause user problems. | |
1330 | ||
1331 | acl aclname random probability | |
1332 | # Pseudo-randomly match requests. Based on the probability given. | |
1333 | # Probability may be written as a decimal (0.333), fraction (1/3) | |
1334 | # or ratio of matches:non-matches (3:5). | |
1335 | ||
1336 | acl aclname req_mime_type [-i] mime-type ... | |
1337 | # regex match against the mime type of the request generated | |
1338 | # by the client. Can be used to detect file upload or some | |
1339 | # types HTTP tunneling requests [fast] | |
1340 | # NOTE: This does NOT match the reply. You cannot use this | |
1341 | # to match the returned file type. | |
1342 | ||
1343 | acl aclname req_header header-name [-i] any\.regex\.here | |
1344 | # regex match against any of the known request headers. May be | |
1345 | # thought of as a superset of "browser", "referer" and "mime-type" | |
1346 | # ACL [fast] | |
1347 | ||
1348 | acl aclname rep_mime_type [-i] mime-type ... | |
1349 | # regex match against the mime type of the reply received by | |
1350 | # squid. Can be used to detect file download or some | |
1351 | # types HTTP tunneling requests. [fast] | |
1352 | # NOTE: This has no effect in http_access rules. It only has | |
1353 | # effect in rules that affect the reply data stream such as | |
1354 | # http_reply_access. | |
1355 | ||
1356 | acl aclname rep_header header-name [-i] any\.regex\.here | |
1357 | # regex match against any of the known reply headers. May be | |
1358 | # thought of as a superset of "browser", "referer" and "mime-type" | |
1359 | # ACLs [fast] | |
1360 | ||
1361 | acl aclname external class_name [arguments...] | |
1362 | # external ACL lookup via a helper class defined by the | |
1363 | # external_acl_type directive [slow] | |
1364 | ||
1365 | acl aclname user_cert attribute values... | |
1366 | # match against attributes in a user SSL certificate | |
1367 | # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast] | |
1368 | ||
1369 | acl aclname ca_cert attribute values... | |
1370 | # match against attributes a users issuing CA SSL certificate | |
1371 | # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast] | |
1372 | ||
1373 | acl aclname ext_user [-i] username ... | |
1374 | # string match on username returned by external acl helper [slow] | |
1375 | # use REQUIRED to accept any non-null user name. | |
1376 | # | |
1377 | # See also: ext_user_regex. The two ACLs differ only in their parameter | |
1378 | # syntax and username matching algorithm. | |
1379 | ||
1380 | acl aclname ext_user_regex [-i] username_pattern ... | |
1381 | # regex match on username returned by external acl helper [slow] | |
1382 | ||
1383 | acl aclname tag tagvalue ... | |
1384 | # string match on tag returned by external acl helper [fast] | |
1385 | # DEPRECATED. Only the first tag will match with this ACL. | |
1386 | # Use the 'note' ACL instead for handling multiple tag values. | |
1387 | ||
1388 | acl aclname hier_code codename ... | |
1389 | # string match against squid hierarchy code(s); [fast] | |
1390 | # e.g., DIRECT, PARENT_HIT, NONE, etc. | |
1391 | # | |
1392 | # NOTE: This has no effect in http_access rules. It only has | |
1393 | # effect in rules that affect the reply data stream such as | |
1394 | # http_reply_access. | |
1395 | ||
1396 | acl aclname note [-m[=delimiters]] name [value ...] | |
1397 | # match transaction annotation [fast] | |
1398 | # Without values, matches any annotation with a given name. | |
1399 | # With value(s), matches any annotation with a given name that | |
1400 | # also has one of the given values. | |
1401 | # If the -m flag is used, then the value of the named | |
1402 | # annotation is interpreted as a list of tokens, and the ACL | |
1403 | # matches individual name=token pairs rather than whole | |
1404 | # name=value pairs. See "ACL Options" above for more info. | |
1405 | # Annotation sources include note and adaptation_meta directives | |
1406 | # as well as helper and eCAP responses. | |
1407 | ||
1408 | acl aclname annotate_transaction [-m[=delimiters]] key=value ... | |
1409 | acl aclname annotate_transaction [-m[=delimiters]] key+=value ... | |
1410 | # Always matches. [fast] | |
1411 | # Used for its side effect: This ACL immediately adds a | |
1412 | # key=value annotation to the current master transaction. | |
1413 | # The added annotation can then be tested using note ACL and | |
1414 | # logged (or sent to helpers) using %note format code. | |
1415 | # | |
1416 | # Annotations can be specified using replacement and addition | |
1417 | # formats. The key=value form replaces old same-key annotation | |
1418 | # value(s). The key+=value form appends a new value to the old | |
1419 | # same-key annotation. Both forms create a new key=value | |
1420 | # annotation if no same-key annotation exists already. If | |
1421 | # -m flag is used, then the value is interpreted as a list | |
1422 | # and the annotation will contain key=token pair(s) instead of the | |
1423 | # whole key=value pair. | |
1424 | # | |
1425 | # This ACL is especially useful for recording complex multi-step | |
1426 | # ACL-driven decisions. For example, the following configuration | |
1427 | # avoids logging transactions accepted after aclX matched: | |
1428 | # | |
1429 | # # First, mark transactions accepted after aclX matched | |
1430 | # acl markSpecial annotate_transaction special=true | |
1431 | # http_access allow acl001 | |
1432 | # ... | |
1433 | # http_access deny acl100 | |
1434 | # http_access allow aclX markSpecial | |
1435 | # | |
1436 | # # Second, do not log marked transactions: | |
1437 | # acl markedSpecial note special true | |
1438 | # access_log ... deny markedSpecial | |
1439 | # | |
1440 | # # Note that the following would not have worked because aclX | |
1441 | # # alone does not determine whether the transaction was allowed: | |
1442 | # access_log ... deny aclX # Wrong! | |
1443 | # | |
1444 | # Warning: This ACL annotates the transaction even when negated | |
1445 | # and even if subsequent ACLs fail to match. For example, the | |
1446 | # following three rules will have exactly the same effect as far | |
1447 | # as annotations set by the "mark" ACL are concerned: | |
1448 | # | |
1449 | # some_directive acl1 ... mark # rule matches if mark is reached | |
1450 | # some_directive acl1 ... !mark # rule never matches | |
1451 | # some_directive acl1 ... mark !all # rule never matches | |
1452 | ||
1453 | acl aclname annotate_client [-m[=delimiters]] key=value ... | |
1454 | acl aclname annotate_client [-m[=delimiters]] key+=value ... | |
1455 | # | |
1456 | # Always matches. [fast] | |
1457 | # Used for its side effect: This ACL immediately adds a | |
1458 | # key=value annotation to the current client-to-Squid | |
1459 | # connection. Connection annotations are propagated to the current | |
1460 | # and all future master transactions on the annotated connection. | |
1461 | # See the annotate_transaction ACL for details. | |
1462 | # | |
1463 | # For example, the following configuration avoids rewriting URLs | |
1464 | # of transactions bumped by SslBump: | |
1465 | # | |
1466 | # # First, mark bumped connections: | |
1467 | # acl markBumped annotate_client bumped=true | |
1468 | # ssl_bump peek acl1 | |
1469 | # ssl_bump stare acl2 | |
1470 | # ssl_bump bump acl3 markBumped | |
1471 | # ssl_bump splice all | |
1472 | # | |
1473 | # # Second, do not send marked transactions to the redirector: | |
1474 | # acl markedBumped note bumped true | |
1475 | # url_rewrite_access deny markedBumped | |
1476 | # | |
1477 | # # Note that the following would not have worked because acl3 alone | |
1478 | # # does not determine whether the connection is going to be bumped: | |
1479 | # url_rewrite_access deny acl3 # Wrong! | |
1480 | ||
1481 | acl aclname adaptation_service service ... | |
1482 | # Matches the name of any icap_service, ecap_service, | |
1483 | # adaptation_service_set, or adaptation_service_chain that Squid | |
1484 | # has used (or attempted to use) for the master transaction. | |
1485 | # This ACL must be defined after the corresponding adaptation | |
1486 | # service is named in squid.conf. This ACL is usable with | |
1487 | # adaptation_meta because it starts matching immediately after | |
1488 | # the service has been selected for adaptation. | |
1489 | ||
1490 | acl aclname transaction_initiator initiator ... | |
1491 | # Matches transaction's initiator [fast] | |
1492 | # | |
1493 | # Supported initiators are: | |
1494 | # esi: matches transactions fetching ESI resources | |
1495 | # certificate-fetching: matches transactions fetching | |
1496 | # a missing intermediate TLS certificate | |
1497 | # cache-digest: matches transactions fetching Cache Digests | |
1498 | # from a cache_peer | |
1499 | # htcp: matches HTCP requests from peers | |
1500 | # icp: matches ICP requests to peers | |
1501 | # icmp: matches ICMP RTT database (NetDB) requests to peers | |
1502 | # asn: matches asns db requests | |
1503 | # internal: matches any of the above | |
1504 | # client: matches transactions containing an HTTP or FTP | |
1505 | # client request received at a Squid *_port | |
1506 | # all: matches any transaction, including internal transactions | |
1507 | # without a configurable initiator and hopefully rare | |
1508 | # transactions without a known-to-Squid initiator | |
1509 | # | |
1510 | # Multiple initiators are ORed. | |
1511 | ||
1512 | acl aclname has component | |
1513 | # matches a transaction "component" [fast] | |
1514 | # | |
1515 | # Supported transaction components are: | |
1516 | # request: transaction has a request header (at least) | |
1517 | # response: transaction has a response header (at least) | |
1518 | # ALE: transaction has an internally-generated Access Log Entry | |
1519 | # structure; bugs notwithstanding, all transaction have it | |
1520 | # | |
1521 | # For example, the following configuration helps when dealing with HTTP | |
1522 | # clients that close connections without sending a request header: | |
1523 | # | |
1524 | # acl hasRequest has request | |
1525 | # acl logMe note important_transaction | |
1526 | # # avoid "logMe ACL is used in context without an HTTP request" warnings | |
1527 | # access_log ... logformat=detailed hasRequest logMe | |
1528 | # # log request-less transactions, instead of ignoring them | |
1529 | # access_log ... logformat=brief !hasRequest | |
1530 | # | |
1531 | # Multiple components are not supported for one "acl" rule, but | |
1532 | # can be specified (and are ORed) using multiple same-name rules: | |
1533 | # | |
1534 | # # OK, this strange logging daemon needs request or response, | |
1535 | # # but can work without either a request or a response: | |
1536 | # acl hasWhatMyLoggingDaemonNeeds has request | |
1537 | # acl hasWhatMyLoggingDaemonNeeds has response | |
1538 | ||
1539 | acl aclname at_step step | |
1540 | # match against the current request processing step [fast] | |
1541 | # Valid steps are: | |
1542 | # GeneratingCONNECT: Generating HTTP CONNECT request headers | |
1543 | IF USE_OPENSSL | |
1544 | # The following ssl_bump processing steps are recognized: | |
1545 | # SslBump1: After getting TCP-level and HTTP CONNECT info. | |
1546 | # SslBump2: After getting SSL Client Hello info. | |
1547 | # SslBump3: After getting SSL Server Hello info. | |
1548 | ENDIF | |
1549 | ||
1550 | IF USE_OPENSSL | |
1551 | acl aclname ssl_error errorname | |
1552 | # match against SSL certificate validation error [fast] | |
1553 | # | |
1554 | # When used with sslproxy_cert_error, this ACL tests a single | |
1555 | # certificate validation error currently being evaluated by that | |
1556 | # directive. When used with slproxy_cert_sign or sslproxy_cert_adapt, | |
1557 | # the ACL tests all past certificate validation errors associated with | |
1558 | # the current Squid-to-server connection (attempt). This ACL is not yet | |
1559 | # supported for use with other directives. | |
1560 | # | |
1561 | # For valid error names see in @DEFAULT_ERROR_DIR@/templates/error-details.txt | |
1562 | # template file. | |
1563 | # | |
1564 | # The following can be used as shortcuts for certificate properties: | |
1565 | # [ssl::]certHasExpired: the "not after" field is in the past | |
1566 | # [ssl::]certNotYetValid: the "not before" field is in the future | |
1567 | # [ssl::]certUntrusted: The certificate issuer is not to be trusted. | |
1568 | # [ssl::]certSelfSigned: The certificate is self signed. | |
1569 | # [ssl::]certDomainMismatch: The certificate CN domain does not | |
1570 | # match the name the name of the host we are connecting to. | |
1571 | # | |
1572 | # The ssl::certHasExpired, ssl::certNotYetValid, ssl::certDomainMismatch, | |
1573 | # ssl::certUntrusted, and ssl::certSelfSigned can also be used as | |
1574 | # predefined ACLs, just like the 'all' ACL. | |
1575 | ||
1576 | acl aclname server_cert_fingerprint fingerprint | |
1577 | # match against server SSL certificate fingerprint [fast] | |
1578 | # | |
1579 | # The fingerprint is the digest of the DER encoded version | |
1580 | # of the whole certificate. The user should use the form: XX:XX:... | |
1581 | # The SHA1 digest algorithm is the default and is currently | |
1582 | # the only algorithm supported. | |
1583 | ||
1584 | acl aclname ssl::server_name [option] .foo.com ... | |
1585 | # matches server name obtained from various sources [fast] | |
1586 | # | |
1587 | # The ACL computes server name(s) using such information sources as | |
1588 | # CONNECT request URI, TLS client SNI, and TLS server certificate | |
1589 | # subject (CN and SubjectAltName). The computed server name(s) usually | |
1590 | # change with each SslBump step, as more info becomes available: | |
1591 | # * SNI is used as the server name instead of the request URI, | |
1592 | # * subject name(s) from the server certificate (CN and | |
1593 | # SubjectAltName) are used as the server names instead of SNI. | |
1594 | # | |
1595 | # When the ACL computes multiple server names, matching any single | |
1596 | # computed name is sufficient for the ACL to match. | |
1597 | # | |
1598 | # The "none" name can be used to match transactions where the ACL | |
1599 | # could not compute the server name using any information source | |
1600 | # that was both available and allowed to be used by the ACL options at | |
1601 | # the ACL evaluation time. | |
1602 | # | |
1603 | # Unlike dstdomain, this ACL does not perform DNS lookups. | |
1604 | # | |
1605 | # An ACL option below may be used to restrict what information | |
1606 | # sources are used to extract the server names from: | |
1607 | # | |
1608 | # --client-requested | |
1609 | # The server name is SNI regardless of what the server says. | |
1610 | # --server-provided | |
1611 | # The server name(s) are the certificate subject name(s), regardless | |
1612 | # of what the client has requested. If the server certificate is | |
1613 | # unavailable, then the name is "none". | |
1614 | # --consensus | |
1615 | # The server name is either SNI (if SNI matches at least one of the | |
1616 | # certificate subject names) or "none" (otherwise). When the server | |
1617 | # certificate is unavailable, the consensus server name is SNI. | |
1618 | # | |
1619 | # Combining multiple options in one ACL is a fatal configuration | |
1620 | # error. | |
1621 | # | |
1622 | # For all options: If no SNI is available, then the CONNECT request | |
1623 | # target (a.k.a. URI) is used instead of SNI (for an intercepted | |
1624 | # connection, this target is the destination IP address). | |
1625 | ||
1626 | acl aclname ssl::server_name_regex [-i] \.foo\.com ... | |
1627 | # regex matches server name obtained from various sources [fast] | |
1628 | ||
1629 | acl aclname connections_encrypted | |
1630 | # matches transactions with all HTTP messages received over TLS | |
1631 | # transport connections. [fast] | |
1632 | # | |
1633 | # The master transaction deals with HTTP messages received from | |
1634 | # various sources. All sources used by the master transaction in the | |
1635 | # past are considered by the ACL. The following rules define whether | |
1636 | # a given message source taints the entire master transaction, | |
1637 | # resulting in ACL mismatches: | |
1638 | # | |
1639 | # * The HTTP client transport connection is not TLS. | |
1640 | # * An adaptation service connection-encryption flag is off. | |
1641 | # * The peer or origin server transport connection is not TLS. | |
1642 | # | |
1643 | # Caching currently does not affect these rules. This cache ignorance | |
1644 | # implies that only the current HTTP client transport and REQMOD | |
1645 | # services status determine whether this ACL matches a from-cache | |
1646 | # transaction. The source of the cached response does not have any | |
1647 | # effect on future transaction that use the cached response without | |
1648 | # revalidation. This may change. | |
1649 | # | |
1650 | # DNS, ICP, and HTCP exchanges during the master transaction do not | |
1651 | # affect these rules. | |
1652 | ENDIF | |
1653 | acl aclname any-of acl1 acl2 ... | |
1654 | # match any one of the acls [fast or slow] | |
1655 | # The first matching ACL stops further ACL evaluation. | |
1656 | # | |
1657 | # ACLs from multiple any-of lines with the same name are ORed. | |
1658 | # For example, A = (a1 or a2) or (a3 or a4) can be written as | |
1659 | # acl A any-of a1 a2 | |
1660 | # acl A any-of a3 a4 | |
1661 | # | |
1662 | # This group ACL is fast if all evaluated ACLs in the group are fast | |
1663 | # and slow otherwise. | |
1664 | ||
1665 | acl aclname all-of acl1 acl2 ... | |
1666 | # match all of the acls [fast or slow] | |
1667 | # The first mismatching ACL stops further ACL evaluation. | |
1668 | # | |
1669 | # ACLs from multiple all-of lines with the same name are ORed. | |
1670 | # For example, B = (b1 and b2) or (b3 and b4) can be written as | |
1671 | # acl B all-of b1 b2 | |
1672 | # acl B all-of b3 b4 | |
1673 | # | |
1674 | # This group ACL is fast if all evaluated ACLs in the group are fast | |
1675 | # and slow otherwise. | |
1676 | ||
1677 | Examples: | |
1678 | acl macaddress arp 09:00:2b:23:45:67 | |
1679 | acl myexample dst_as 1241 | |
1680 | acl password proxy_auth REQUIRED | |
1681 | acl fileupload req_mime_type -i ^multipart/form-data$ | |
1682 | acl javascript rep_mime_type -i ^application/x-javascript$ | |
1683 | ||
1684 | CONFIG_START | |
1685 | # | |
1686 | # Recommended minimum configuration: | |
1687 | # | |
1688 | ||
1689 | # Example rule allowing access from your local networks. | |
1690 | # Adapt to list your (internal) IP networks from where browsing | |
1691 | # should be allowed | |
1692 | acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN) | |
1693 | acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN) | |
1694 | acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN) | |
1695 | acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines | |
1696 | acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN) | |
1697 | acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN) | |
1698 | acl localnet src fc00::/7 # RFC 4193 local private network range | |
1699 | acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines | |
1700 | ||
1701 | acl SSL_ports port 443 | |
1702 | acl Safe_ports port 80 # http | |
1703 | acl Safe_ports port 21 # ftp | |
1704 | acl Safe_ports port 443 # https | |
1705 | acl Safe_ports port 70 # gopher | |
1706 | acl Safe_ports port 210 # wais | |
1707 | acl Safe_ports port 1025-65535 # unregistered ports | |
1708 | acl Safe_ports port 280 # http-mgmt | |
1709 | acl Safe_ports port 488 # gss-http | |
1710 | acl Safe_ports port 591 # filemaker | |
1711 | acl Safe_ports port 777 # multiling http | |
1712 | CONFIG_END | |
1713 | DOC_END | |
1714 | ||
1715 | NAME: proxy_protocol_access | |
1716 | TYPE: acl_access | |
1717 | LOC: Config.accessList.proxyProtocol | |
1718 | DEFAULT: none | |
1719 | DEFAULT_DOC: all TCP connections to ports with require-proxy-header will be denied | |
1720 | DOC_START | |
1721 | Determine which client proxies can be trusted to provide correct | |
1722 | information regarding real client IP address using PROXY protocol. | |
1723 | ||
1724 | Requests may pass through a chain of several other proxies | |
1725 | before reaching us. The original source details may by sent in: | |
1726 | * HTTP message Forwarded header, or | |
1727 | * HTTP message X-Forwarded-For header, or | |
1728 | * PROXY protocol connection header. | |
1729 | ||
1730 | This directive is solely for validating new PROXY protocol | |
1731 | connections received from a port flagged with require-proxy-header. | |
1732 | It is checked only once after TCP connection setup. | |
1733 | ||
1734 | A deny match results in TCP connection closure. | |
1735 | ||
1736 | An allow match is required for Squid to permit the corresponding | |
1737 | TCP connection, before Squid even looks for HTTP request headers. | |
1738 | If there is an allow match, Squid starts using PROXY header information | |
1739 | to determine the source address of the connection for all future ACL | |
1740 | checks, logging, etc. | |
1741 | ||
1742 | SECURITY CONSIDERATIONS: | |
1743 | ||
1744 | Any host from which we accept client IP details can place | |
1745 | incorrect information in the relevant header, and Squid | |
1746 | will use the incorrect information as if it were the | |
1747 | source address of the request. This may enable remote | |
1748 | hosts to bypass any access control restrictions that are | |
1749 | based on the client's source addresses. | |
1750 | ||
1751 | This clause only supports fast acl types. | |
1752 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
1753 | DOC_END | |
1754 | ||
1755 | NAME: follow_x_forwarded_for | |
1756 | TYPE: acl_access | |
1757 | IFDEF: FOLLOW_X_FORWARDED_FOR | |
1758 | LOC: Config.accessList.followXFF | |
1759 | DEFAULT_IF_NONE: deny all | |
1760 | DEFAULT_DOC: X-Forwarded-For header will be ignored. | |
1761 | DOC_START | |
1762 | Determine which client proxies can be trusted to provide correct | |
1763 | information regarding real client IP address. | |
1764 | ||
1765 | Requests may pass through a chain of several other proxies | |
1766 | before reaching us. The original source details may by sent in: | |
1767 | * HTTP message Forwarded header, or | |
1768 | * HTTP message X-Forwarded-For header, or | |
1769 | * PROXY protocol connection header. | |
1770 | ||
1771 | PROXY protocol connections are controlled by the proxy_protocol_access | |
1772 | directive which is checked before this. | |
1773 | ||
1774 | If a request reaches us from a source that is allowed by this | |
1775 | directive, then we trust the information it provides regarding | |
1776 | the IP of the client it received from (if any). | |
1777 | ||
1778 | For the purpose of ACLs used in this directive the src ACL type always | |
1779 | matches the address we are testing and srcdomain matches its rDNS. | |
1780 | ||
1781 | On each HTTP request Squid checks for X-Forwarded-For header fields. | |
1782 | If found the header values are iterated in reverse order and an allow | |
1783 | match is required for Squid to continue on to the next value. | |
1784 | The verification ends when a value receives a deny match, cannot be | |
1785 | tested, or there are no more values to test. | |
1786 | NOTE: Squid does not yet follow the Forwarded HTTP header. | |
1787 | ||
1788 | The end result of this process is an IP address that we will | |
1789 | refer to as the indirect client address. This address may | |
1790 | be treated as the client address for access control, ICAP, delay | |
1791 | pools and logging, depending on the acl_uses_indirect_client, | |
1792 | icap_uses_indirect_client, delay_pool_uses_indirect_client, | |
1793 | log_uses_indirect_client and tproxy_uses_indirect_client options. | |
1794 | ||
1795 | This clause only supports fast acl types. | |
1796 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
1797 | ||
1798 | SECURITY CONSIDERATIONS: | |
1799 | ||
1800 | Any host from which we accept client IP details can place | |
1801 | incorrect information in the relevant header, and Squid | |
1802 | will use the incorrect information as if it were the | |
1803 | source address of the request. This may enable remote | |
1804 | hosts to bypass any access control restrictions that are | |
1805 | based on the client's source addresses. | |
1806 | ||
1807 | For example: | |
1808 | ||
1809 | acl localhost src 127.0.0.1 | |
1810 | acl my_other_proxy srcdomain .proxy.example.com | |
1811 | follow_x_forwarded_for allow localhost | |
1812 | follow_x_forwarded_for allow my_other_proxy | |
1813 | DOC_END | |
1814 | ||
1815 | NAME: acl_uses_indirect_client | |
1816 | COMMENT: on|off | |
1817 | TYPE: onoff | |
1818 | IFDEF: FOLLOW_X_FORWARDED_FOR | |
1819 | DEFAULT: on | |
1820 | LOC: Config.onoff.acl_uses_indirect_client | |
1821 | DOC_START | |
1822 | Controls whether the indirect client address | |
1823 | (see follow_x_forwarded_for) is used instead of the | |
1824 | direct client address in acl matching. | |
1825 | ||
1826 | NOTE: maxconn ACL considers direct TCP links and indirect | |
1827 | clients will always have zero. So no match. | |
1828 | DOC_END | |
1829 | ||
1830 | NAME: delay_pool_uses_indirect_client | |
1831 | COMMENT: on|off | |
1832 | TYPE: onoff | |
1833 | IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_DELAY_POOLS | |
1834 | DEFAULT: on | |
1835 | LOC: Config.onoff.delay_pool_uses_indirect_client | |
1836 | DOC_START | |
1837 | Controls whether the indirect client address | |
1838 | (see follow_x_forwarded_for) is used instead of the | |
1839 | direct client address in delay pools. | |
1840 | DOC_END | |
1841 | ||
1842 | NAME: log_uses_indirect_client | |
1843 | COMMENT: on|off | |
1844 | TYPE: onoff | |
1845 | IFDEF: FOLLOW_X_FORWARDED_FOR | |
1846 | DEFAULT: on | |
1847 | LOC: Config.onoff.log_uses_indirect_client | |
1848 | DOC_START | |
1849 | Controls whether the indirect client address | |
1850 | (see follow_x_forwarded_for) is used instead of the | |
1851 | direct client address in the access log. | |
1852 | DOC_END | |
1853 | ||
1854 | NAME: tproxy_uses_indirect_client | |
1855 | COMMENT: on|off | |
1856 | TYPE: onoff | |
1857 | IFDEF: FOLLOW_X_FORWARDED_FOR&&LINUX_NETFILTER | |
1858 | DEFAULT: off | |
1859 | LOC: Config.onoff.tproxy_uses_indirect_client | |
1860 | DOC_START | |
1861 | Controls whether the indirect client address | |
1862 | (see follow_x_forwarded_for) is used instead of the | |
1863 | direct client address when spoofing the outgoing client. | |
1864 | ||
1865 | This has no effect on requests arriving in non-tproxy | |
1866 | mode ports. | |
1867 | ||
1868 | SECURITY WARNING: Usage of this option is dangerous | |
1869 | and should not be used trivially. Correct configuration | |
1870 | of follow_x_forwarded_for with a limited set of trusted | |
1871 | sources is required to prevent abuse of your proxy. | |
1872 | DOC_END | |
1873 | ||
1874 | NAME: spoof_client_ip | |
1875 | TYPE: acl_access | |
1876 | LOC: Config.accessList.spoof_client_ip | |
1877 | DEFAULT: none | |
1878 | DEFAULT_DOC: Allow spoofing on all TPROXY traffic. | |
1879 | DOC_START | |
1880 | Control client IP address spoofing of TPROXY traffic based on | |
1881 | defined access lists. | |
1882 | ||
1883 | spoof_client_ip allow|deny [!]aclname ... | |
1884 | ||
1885 | If there are no "spoof_client_ip" lines present, the default | |
1886 | is to "allow" spoofing of any suitable request. | |
1887 | ||
1888 | Note that the cache_peer "no-tproxy" option overrides this ACL. | |
1889 | ||
1890 | This clause supports fast acl types. | |
1891 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
1892 | DOC_END | |
1893 | ||
1894 | NAME: http_access | |
1895 | TYPE: acl_access | |
1896 | LOC: Config.accessList.http | |
1897 | DEFAULT_IF_NONE: deny all | |
1898 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
1899 | DOC_START | |
1900 | Allowing or Denying access based on defined access lists | |
1901 | ||
1902 | To allow or deny a message received on an HTTP, HTTPS, or FTP port: | |
1903 | http_access allow|deny [!]aclname ... | |
1904 | ||
1905 | NOTE on default values: | |
1906 | ||
1907 | If there are no "access" lines present, the default is to deny | |
1908 | the request. | |
1909 | ||
1910 | If none of the "access" lines cause a match, the default is the | |
1911 | opposite of the last line in the list. If the last line was | |
1912 | deny, the default is allow. Conversely, if the last line | |
1913 | is allow, the default will be deny. For these reasons, it is a | |
1914 | good idea to have an "deny all" entry at the end of your access | |
1915 | lists to avoid potential confusion. | |
1916 | ||
1917 | This clause supports both fast and slow acl types. | |
1918 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
1919 | ||
1920 | CONFIG_START | |
1921 | ||
1922 | # | |
1923 | # Recommended minimum Access Permission configuration: | |
1924 | # | |
1925 | # Deny requests to certain unsafe ports | |
1926 | http_access deny !Safe_ports | |
1927 | ||
1928 | # Deny CONNECT to other than secure SSL ports | |
1929 | http_access deny CONNECT !SSL_ports | |
1930 | ||
1931 | # Only allow cachemgr access from localhost | |
1932 | http_access allow localhost manager | |
1933 | http_access deny manager | |
1934 | ||
1935 | # This default configuration only allows localhost requests because a more | |
1936 | # permissive Squid installation could introduce new attack vectors into the | |
1937 | # network by proxying external TCP connections to unprotected services. | |
1938 | http_access allow localhost | |
1939 | ||
1940 | # The two deny rules below are unnecessary in this default configuration | |
1941 | # because they are followed by a "deny all" rule. However, they may become | |
1942 | # critically important when you start allowing external requests below them. | |
1943 | ||
1944 | # Protect web applications running on the same server as Squid. They often | |
1945 | # assume that only local users can access them at "localhost" ports. | |
1946 | http_access deny to_localhost | |
1947 | ||
1948 | # Protect cloud servers that provide local users with sensitive info about | |
1949 | # their server via certain well-known link-local (a.k.a. APIPA) addresses. | |
1950 | http_access deny to_linklocal | |
1951 | ||
1952 | # | |
1953 | # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS | |
1954 | # | |
1955 | ||
1956 | # For example, to allow access from your local networks, you may uncomment the | |
1957 | # following rule (and/or add rules that match your definition of "local"): | |
1958 | # http_access allow localnet | |
1959 | ||
1960 | # And finally deny all other access to this proxy | |
1961 | http_access deny all | |
1962 | CONFIG_END | |
1963 | DOC_END | |
1964 | ||
1965 | NAME: adapted_http_access http_access2 | |
1966 | TYPE: acl_access | |
1967 | LOC: Config.accessList.adapted_http | |
1968 | DEFAULT: none | |
1969 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. | |
1970 | DOC_START | |
1971 | Allowing or Denying access based on defined access lists | |
1972 | ||
1973 | Essentially identical to http_access, but runs after redirectors | |
1974 | and ICAP/eCAP adaptation. Allowing access control based on their | |
1975 | output. | |
1976 | ||
1977 | If not set then only http_access is used. | |
1978 | DOC_END | |
1979 | ||
1980 | NAME: http_reply_access | |
1981 | TYPE: acl_access | |
1982 | LOC: Config.accessList.reply | |
1983 | DEFAULT: none | |
1984 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. | |
1985 | DOC_START | |
1986 | Allow replies to client requests. This is complementary to http_access. | |
1987 | ||
1988 | http_reply_access allow|deny [!] aclname ... | |
1989 | ||
1990 | NOTE: if there are no access lines present, the default is to allow | |
1991 | all replies. | |
1992 | ||
1993 | If none of the access lines cause a match the opposite of the | |
1994 | last line will apply. Thus it is good practice to end the rules | |
1995 | with an "allow all" or "deny all" entry. | |
1996 | ||
1997 | This clause supports both fast and slow acl types. | |
1998 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
1999 | DOC_END | |
2000 | ||
2001 | NAME: icp_access | |
2002 | TYPE: acl_access | |
2003 | LOC: Config.accessList.icp | |
2004 | DEFAULT: none | |
2005 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
2006 | DOC_START | |
2007 | Allowing or Denying access to the ICP port based on defined | |
2008 | access lists | |
2009 | ||
2010 | icp_access allow|deny [!]aclname ... | |
2011 | ||
2012 | NOTE: The default if no icp_access lines are present is to | |
2013 | deny all traffic. This default may cause problems with peers | |
2014 | using ICP. | |
2015 | ||
2016 | This clause only supports fast acl types. | |
2017 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
2018 | ||
2019 | # Allow ICP queries from local networks only | |
2020 | #icp_access allow localnet | |
2021 | #icp_access deny all | |
2022 | DOC_END | |
2023 | ||
2024 | NAME: htcp_access | |
2025 | IFDEF: USE_HTCP | |
2026 | TYPE: acl_access | |
2027 | LOC: Config.accessList.htcp | |
2028 | DEFAULT: none | |
2029 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
2030 | DOC_START | |
2031 | Allowing or Denying access to the HTCP port based on defined | |
2032 | access lists | |
2033 | ||
2034 | htcp_access allow|deny [!]aclname ... | |
2035 | ||
2036 | See also htcp_clr_access for details on access control for | |
2037 | cache purge (CLR) HTCP messages. | |
2038 | ||
2039 | NOTE: The default if no htcp_access lines are present is to | |
2040 | deny all traffic. This default may cause problems with peers | |
2041 | using the htcp option. | |
2042 | ||
2043 | This clause only supports fast acl types. | |
2044 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
2045 | ||
2046 | # Allow HTCP queries from local networks only | |
2047 | #htcp_access allow localnet | |
2048 | #htcp_access deny all | |
2049 | DOC_END | |
2050 | ||
2051 | NAME: htcp_clr_access | |
2052 | IFDEF: USE_HTCP | |
2053 | TYPE: acl_access | |
2054 | LOC: Config.accessList.htcp_clr | |
2055 | DEFAULT: none | |
2056 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
2057 | DOC_START | |
2058 | Allowing or Denying access to purge content using HTCP based | |
2059 | on defined access lists. | |
2060 | See htcp_access for details on general HTCP access control. | |
2061 | ||
2062 | htcp_clr_access allow|deny [!]aclname ... | |
2063 | ||
2064 | This clause only supports fast acl types. | |
2065 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
2066 | ||
2067 | # Allow HTCP CLR requests from trusted peers | |
2068 | acl htcp_clr_peer src 192.0.2.2 2001:DB8::2 | |
2069 | htcp_clr_access allow htcp_clr_peer | |
2070 | htcp_clr_access deny all | |
2071 | DOC_END | |
2072 | ||
2073 | NAME: miss_access | |
2074 | TYPE: acl_access | |
2075 | LOC: Config.accessList.miss | |
2076 | DEFAULT: none | |
2077 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. | |
2078 | DOC_START | |
2079 | Determines whether network access is permitted when satisfying a request. | |
2080 | ||
2081 | For example; | |
2082 | to force your neighbors to use you as a sibling instead of | |
2083 | a parent. | |
2084 | ||
2085 | acl localclients src 192.0.2.0/24 2001:DB8::a:0/64 | |
2086 | miss_access deny !localclients | |
2087 | miss_access allow all | |
2088 | ||
2089 | This means only your local clients are allowed to fetch relayed/MISS | |
2090 | replies from the network and all other clients can only fetch cached | |
2091 | objects (HITs). | |
2092 | ||
2093 | The default for this setting allows all clients who passed the | |
2094 | http_access rules to relay via this proxy. | |
2095 | ||
2096 | This clause only supports fast acl types. | |
2097 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
2098 | DOC_END | |
2099 | ||
2100 | NAME: reply_body_max_size | |
2101 | COMMENT: size [acl acl...] | |
2102 | TYPE: acl_b_size_t | |
2103 | DEFAULT: none | |
2104 | DEFAULT_DOC: No limit is applied. | |
2105 | LOC: Config.ReplyBodySize | |
2106 | DOC_START | |
2107 | This option specifies the maximum size of a reply body. It can be | |
2108 | used to prevent users from downloading very large files, such as | |
2109 | MP3's and movies. When the reply headers are received, the | |
2110 | reply_body_max_size lines are processed, and the first line where | |
2111 | all (if any) listed ACLs are true is used as the maximum body size | |
2112 | for this reply. | |
2113 | ||
2114 | This size is checked twice. First when we get the reply headers, | |
2115 | we check the content-length value. If the content length value exists | |
2116 | and is larger than the allowed size, the request is denied and the | |
2117 | user receives an error message that says "the request or reply | |
2118 | is too large." If there is no content-length, and the reply | |
2119 | size exceeds this limit, the client's connection is just closed | |
2120 | and they will receive a partial reply. | |
2121 | ||
2122 | WARNING: downstream caches probably can not detect a partial reply | |
2123 | if there is no content-length header, so they will cache | |
2124 | partial responses and give them out as hits. You should NOT | |
2125 | use this option if you have downstream caches. | |
2126 | ||
2127 | WARNING: A maximum size smaller than the size of squid's error messages | |
2128 | will cause an infinite loop and crash squid. Ensure that the smallest | |
2129 | non-zero value you use is greater that the maximum header size plus | |
2130 | the size of your largest error page. | |
2131 | ||
2132 | If you set this parameter none (the default), there will be | |
2133 | no limit imposed. | |
2134 | ||
2135 | Configuration Format is: | |
2136 | reply_body_max_size SIZE UNITS [acl ...] | |
2137 | ie. | |
2138 | reply_body_max_size 10 MB | |
2139 | ||
2140 | DOC_END | |
2141 | ||
2142 | NAME: on_unsupported_protocol | |
2143 | TYPE: on_unsupported_protocol | |
2144 | LOC: Config.accessList.on_unsupported_protocol | |
2145 | DEFAULT: none | |
2146 | DEFAULT_DOC: Respond with an error message to unidentifiable traffic | |
2147 | DOC_START | |
2148 | Determines Squid behavior when encountering strange requests at the | |
2149 | beginning of an accepted TCP connection or the beginning of a bumped | |
2150 | CONNECT tunnel. Controlling Squid reaction to unexpected traffic is | |
2151 | especially useful in interception environments where Squid is likely | |
2152 | to see connections for unsupported protocols that Squid should either | |
2153 | terminate or tunnel at TCP level. | |
2154 | ||
2155 | on_unsupported_protocol <action> [!]acl ... | |
2156 | ||
2157 | The first matching action wins. Only fast ACLs are supported. | |
2158 | ||
2159 | Supported actions are: | |
2160 | ||
2161 | tunnel: Establish a TCP connection with the intended server and | |
2162 | blindly shovel TCP packets between the client and server. | |
2163 | ||
2164 | respond: Respond with an error message, using the transfer protocol | |
2165 | for the Squid port that received the request (e.g., HTTP | |
2166 | for connections intercepted at the http_port). This is the | |
2167 | default. | |
2168 | ||
2169 | Squid expects the following traffic patterns: | |
2170 | ||
2171 | http_port: a plain HTTP request | |
2172 | https_port: SSL/TLS handshake followed by an [encrypted] HTTP request | |
2173 | ftp_port: a plain FTP command (no on_unsupported_protocol support yet!) | |
2174 | CONNECT tunnel on http_port: same as https_port | |
2175 | CONNECT tunnel on https_port: same as https_port | |
2176 | ||
2177 | Currently, this directive has effect on intercepted connections and | |
2178 | bumped tunnels only. Other cases are not supported because Squid | |
2179 | cannot know the intended destination of other traffic. | |
2180 | ||
2181 | For example: | |
2182 | # define what Squid errors indicate receiving non-HTTP traffic: | |
2183 | acl foreignProtocol squid_error ERR_PROTOCOL_UNKNOWN ERR_TOO_BIG | |
2184 | # define what Squid errors indicate receiving nothing: | |
2185 | acl serverTalksFirstProtocol squid_error ERR_REQUEST_START_TIMEOUT | |
2186 | # tunnel everything that does not look like HTTP: | |
2187 | on_unsupported_protocol tunnel foreignProtocol | |
2188 | # tunnel if we think the client waits for the server to talk first: | |
2189 | on_unsupported_protocol tunnel serverTalksFirstProtocol | |
2190 | # in all other error cases, just send an HTTP "error page" response: | |
2191 | on_unsupported_protocol respond all | |
2192 | ||
2193 | See also: squid_error ACL | |
2194 | DOC_END | |
2195 | ||
2196 | NAME: auth_schemes | |
2197 | TYPE: AuthSchemes | |
2198 | IFDEF: USE_AUTH | |
2199 | LOC: Auth::TheConfig.schemeAccess | |
2200 | DEFAULT: none | |
2201 | DEFAULT_DOC: use all auth_param schemes in their configuration order | |
2202 | DOC_START | |
2203 | Use this directive to customize authentication schemes presence and | |
2204 | order in Squid's Unauthorized and Authentication Required responses. | |
2205 | ||
2206 | auth_schemes scheme1,scheme2,... [!]aclname ... | |
2207 | ||
2208 | where schemeN is the name of one of the authentication schemes | |
2209 | configured using auth_param directives. At least one scheme name is | |
2210 | required. Multiple scheme names are separated by commas. Either | |
2211 | avoid whitespace or quote the entire schemes list. | |
2212 | ||
2213 | A special "ALL" scheme name expands to all auth_param-configured | |
2214 | schemes in their configuration order. This directive cannot be used | |
2215 | to configure Squid to offer no authentication schemes at all. | |
2216 | ||
2217 | The first matching auth_schemes rule determines the schemes order | |
2218 | for the current Authentication Required transaction. Note that the | |
2219 | future response is not yet available during auth_schemes evaluation. | |
2220 | ||
2221 | If this directive is not used or none of its rules match, then Squid | |
2222 | responds with all configured authentication schemes in the order of | |
2223 | auth_param directives in the configuration file. | |
2224 | ||
2225 | This directive does not determine when authentication is used or | |
2226 | how each authentication scheme authenticates clients. | |
2227 | ||
2228 | The following example sends basic and negotiate authentication | |
2229 | schemes, in that order, when requesting authentication of HTTP | |
2230 | requests matching the isIE ACL (not shown) while sending all | |
2231 | auth_param schemes in their configuration order to other clients: | |
2232 | ||
2233 | auth_schemes basic,negotiate isIE | |
2234 | auth_schemes ALL all # explicit default | |
2235 | ||
2236 | This directive supports fast ACLs only. | |
2237 | ||
2238 | See also: auth_param. | |
2239 | DOC_END | |
2240 | ||
2241 | COMMENT_START | |
2242 | NETWORK OPTIONS | |
2243 | ----------------------------------------------------------------------------- | |
2244 | COMMENT_END | |
2245 | ||
2246 | NAME: http_port ascii_port | |
2247 | TYPE: PortCfg | |
2248 | DEFAULT: none | |
2249 | LOC: HttpPortList | |
2250 | DOC_START | |
2251 | Usage: port [mode] [options] | |
2252 | hostname:port [mode] [options] | |
2253 | 1.2.3.4:port [mode] [options] | |
2254 | ||
2255 | The socket addresses where Squid will listen for HTTP client | |
2256 | requests. You may specify multiple socket addresses. | |
2257 | There are three forms: port alone, hostname with port, and | |
2258 | IP address with port. If you specify a hostname or IP | |
2259 | address, Squid binds the socket to that specific | |
2260 | address. Most likely, you do not need to bind to a specific | |
2261 | address, so you can use the port number alone. | |
2262 | ||
2263 | If you are running Squid in accelerator mode, you | |
2264 | probably want to listen on port 80 also, or instead. | |
2265 | ||
2266 | The -a command line option may be used to specify additional | |
2267 | port(s) where Squid listens for proxy request. Such ports will | |
2268 | be plain proxy ports with no options. | |
2269 | ||
2270 | You may specify multiple socket addresses on multiple lines. | |
2271 | ||
2272 | Modes: | |
2273 | ||
2274 | intercept Support for IP-Layer NAT interception delivering | |
2275 | traffic to this Squid port. | |
2276 | NP: disables authentication on the port. | |
2277 | ||
2278 | tproxy Support Linux TPROXY (or BSD divert-to) with spoofing | |
2279 | of outgoing connections using the client IP address. | |
2280 | NP: disables authentication on the port. | |
2281 | ||
2282 | accel Accelerator / reverse proxy mode | |
2283 | ||
2284 | ssl-bump For each CONNECT request allowed by ssl_bump ACLs, | |
2285 | establish secure connection with the client and with | |
2286 | the server, decrypt HTTPS messages as they pass through | |
2287 | Squid, and treat them as unencrypted HTTP messages, | |
2288 | becoming the man-in-the-middle. | |
2289 | ||
2290 | The ssl_bump option is required to fully enable | |
2291 | bumping of CONNECT requests. | |
2292 | ||
2293 | Omitting the mode flag causes default forward proxy mode to be used. | |
2294 | ||
2295 | ||
2296 | Accelerator Mode Options: | |
2297 | ||
2298 | defaultsite=domainname | |
2299 | What to use for the Host: header if it is not present | |
2300 | in a request. Determines what site (not origin server) | |
2301 | accelerators should consider the default. | |
2302 | ||
2303 | no-vhost Disable using HTTP/1.1 Host header for virtual domain support. | |
2304 | ||
2305 | protocol= Protocol to reconstruct accelerated and intercepted | |
2306 | requests with. Defaults to HTTP/1.1 for http_port and | |
2307 | HTTPS/1.1 for https_port. | |
2308 | When an unsupported value is configured Squid will | |
2309 | produce a FATAL error. | |
2310 | Values: HTTP or HTTP/1.1, HTTPS or HTTPS/1.1 | |
2311 | ||
2312 | vport Virtual host port support. Using the http_port number | |
2313 | instead of the port passed on Host: headers. | |
2314 | ||
2315 | vport=NN Virtual host port support. Using the specified port | |
2316 | number instead of the port passed on Host: headers. | |
2317 | ||
2318 | act-as-origin | |
2319 | Act as if this Squid is the origin server. | |
2320 | This currently means generate new Date: and Expires: | |
2321 | headers on HIT instead of adding Age:. | |
2322 | ||
2323 | ignore-cc Ignore request Cache-Control headers. | |
2324 | ||
2325 | WARNING: This option violates HTTP specifications if | |
2326 | used in non-accelerator setups. | |
2327 | ||
2328 | allow-direct Allow direct forwarding in accelerator mode. Normally | |
2329 | accelerated requests are denied direct forwarding as if | |
2330 | never_direct was used. | |
2331 | ||
2332 | WARNING: this option opens accelerator mode to security | |
2333 | vulnerabilities usually only affecting in interception | |
2334 | mode. Make sure to protect forwarding with suitable | |
2335 | http_access rules when using this. | |
2336 | ||
2337 | ||
2338 | SSL Bump Mode Options: | |
2339 | In addition to these options ssl-bump requires TLS/SSL options. | |
2340 | ||
2341 | generate-host-certificates[=<on|off>] | |
2342 | Dynamically create SSL server certificates for the | |
2343 | destination hosts of bumped CONNECT requests.When | |
2344 | enabled, the cert and key options are used to sign | |
2345 | generated certificates. Otherwise generated | |
2346 | certificate will be selfsigned. | |
2347 | If there is a CA certificate lifetime of the generated | |
2348 | certificate equals lifetime of the CA certificate. If | |
2349 | generated certificate is selfsigned lifetime is three | |
2350 | years. | |
2351 | This option is enabled by default when ssl-bump is used. | |
2352 | See the ssl-bump option above for more information. | |
2353 | ||
2354 | dynamic_cert_mem_cache_size=SIZE | |
2355 | Approximate total RAM size spent on cached generated | |
2356 | certificates. If set to zero, caching is disabled. The | |
2357 | default value is 4MB. | |
2358 | ||
2359 | TLS / SSL Options: | |
2360 | ||
2361 | tls-cert= Path to file containing an X.509 certificate (PEM format) | |
2362 | to be used in the TLS handshake ServerHello. | |
2363 | ||
2364 | If this certificate is constrained by KeyUsage TLS | |
2365 | feature it must allow HTTP server usage, along with | |
2366 | any additional restrictions imposed by your choice | |
2367 | of options= settings. | |
2368 | ||
2369 | When OpenSSL is used this file may also contain a | |
2370 | chain of intermediate CA certificates to send in the | |
2371 | TLS handshake. | |
2372 | ||
2373 | When GnuTLS is used this option (and any paired | |
2374 | tls-key= option) may be repeated to load multiple | |
2375 | certificates for different domains. | |
2376 | ||
2377 | Also, when generate-host-certificates=on is configured | |
2378 | the first tls-cert= option must be a CA certificate | |
2379 | capable of signing the automatically generated | |
2380 | certificates. | |
2381 | ||
2382 | tls-key= Path to a file containing private key file (PEM format) | |
2383 | for the previous tls-cert= option. | |
2384 | ||
2385 | If tls-key= is not specified tls-cert= is assumed to | |
2386 | reference a PEM file containing both the certificate | |
2387 | and private key. | |
2388 | ||
2389 | cipher= Colon separated list of supported ciphers. | |
2390 | NOTE: some ciphers such as EDH ciphers depend on | |
2391 | additional settings. If those settings are | |
2392 | omitted the ciphers may be silently ignored | |
2393 | by the OpenSSL library. | |
2394 | ||
2395 | options= Various SSL implementation options. The most important | |
2396 | being: | |
2397 | ||
2398 | NO_SSLv3 Disallow the use of SSLv3 | |
2399 | ||
2400 | NO_TLSv1 Disallow the use of TLSv1.0 | |
2401 | ||
2402 | NO_TLSv1_1 Disallow the use of TLSv1.1 | |
2403 | ||
2404 | NO_TLSv1_2 Disallow the use of TLSv1.2 | |
2405 | ||
2406 | SINGLE_DH_USE | |
2407 | Always create a new key when using | |
2408 | temporary/ephemeral DH key exchanges | |
2409 | ||
2410 | SINGLE_ECDH_USE | |
2411 | Enable ephemeral ECDH key exchange. | |
2412 | The adopted curve should be specified | |
2413 | using the tls-dh option. | |
2414 | ||
2415 | NO_TICKET | |
2416 | Disable use of RFC5077 session tickets. | |
2417 | Some servers may have problems | |
2418 | understanding the TLS extension due | |
2419 | to ambiguous specification in RFC4507. | |
2420 | ||
2421 | ALL Enable various bug workarounds | |
2422 | suggested as "harmless" by OpenSSL | |
2423 | Be warned that this reduces SSL/TLS | |
2424 | strength to some attacks. | |
2425 | ||
2426 | See the OpenSSL SSL_CTX_set_options documentation for a | |
2427 | more complete list. | |
2428 | ||
2429 | clientca= File containing the list of CAs to use when | |
2430 | requesting a client certificate. | |
2431 | ||
2432 | tls-cafile= PEM file containing CA certificates to use when verifying | |
2433 | client certificates. If not configured clientca will be | |
2434 | used. May be repeated to load multiple files. | |
2435 | ||
2436 | capath= Directory containing additional CA certificates | |
2437 | and CRL lists to use when verifying client certificates. | |
2438 | Requires OpenSSL or LibreSSL. | |
2439 | ||
2440 | crlfile= File of additional CRL lists to use when verifying | |
2441 | the client certificate, in addition to CRLs stored in | |
2442 | the capath. Implies VERIFY_CRL flag below. | |
2443 | ||
2444 | tls-dh=[curve:]file | |
2445 | File containing DH parameters for temporary/ephemeral DH key | |
2446 | exchanges, optionally prefixed by a curve for ephemeral ECDH | |
2447 | key exchanges. | |
2448 | See OpenSSL documentation for details on how to create the | |
2449 | DH parameter file. Supported curves for ECDH can be listed | |
2450 | using the "openssl ecparam -list_curves" command. | |
2451 | WARNING: EDH and EECDH ciphers will be silently disabled if | |
2452 | this option is not set. | |
2453 | ||
2454 | sslflags= Various flags modifying the use of SSL: | |
2455 | DELAYED_AUTH | |
2456 | Don't request client certificates | |
2457 | immediately, but wait until acl processing | |
2458 | requires a certificate (not yet implemented). | |
2459 | CONDITIONAL_AUTH | |
2460 | Request a client certificate during the TLS | |
2461 | handshake, but ignore certificate absence in | |
2462 | the TLS client Hello. If the client does | |
2463 | supply a certificate, it is validated. | |
2464 | NO_SESSION_REUSE | |
2465 | Don't allow for session reuse. Each connection | |
2466 | will result in a new SSL session. | |
2467 | VERIFY_CRL | |
2468 | Verify CRL lists when accepting client | |
2469 | certificates. | |
2470 | VERIFY_CRL_ALL | |
2471 | Verify CRL lists for all certificates in the | |
2472 | client certificate chain. | |
2473 | ||
2474 | tls-default-ca[=off] | |
2475 | Whether to use the system Trusted CAs. Default is OFF. | |
2476 | ||
2477 | tls-no-npn Do not use the TLS NPN extension to advertise HTTP/1.1. | |
2478 | ||
2479 | sslcontext= SSL session ID context identifier. | |
2480 | ||
2481 | Other Options: | |
2482 | ||
2483 | connection-auth[=on|off] | |
2484 | use connection-auth=off to tell Squid to prevent | |
2485 | forwarding Microsoft connection oriented authentication | |
2486 | (NTLM, Negotiate and Kerberos) | |
2487 | ||
2488 | disable-pmtu-discovery= | |
2489 | Control Path-MTU discovery usage: | |
2490 | off lets OS decide on what to do (default). | |
2491 | transparent disable PMTU discovery when transparent | |
2492 | support is enabled. | |
2493 | always disable always PMTU discovery. | |
2494 | ||
2495 | In many setups of transparently intercepting proxies | |
2496 | Path-MTU discovery can not work on traffic towards the | |
2497 | clients. This is the case when the intercepting device | |
2498 | does not fully track connections and fails to forward | |
2499 | ICMP must fragment messages to the cache server. If you | |
2500 | have such setup and experience that certain clients | |
2501 | sporadically hang or never complete requests set | |
2502 | disable-pmtu-discovery option to 'transparent'. | |
2503 | ||
2504 | name= Specifies a internal name for the port. Defaults to | |
2505 | the port specification (port or addr:port) | |
2506 | ||
2507 | tcpkeepalive[=idle,interval,timeout] | |
2508 | Enable TCP keepalive probes of idle connections. | |
2509 | In seconds; idle is the initial time before TCP starts | |
2510 | probing the connection, interval how often to probe, and | |
2511 | timeout the time before giving up. | |
2512 | ||
2513 | require-proxy-header | |
2514 | Require PROXY protocol version 1 or 2 connections. | |
2515 | The proxy_protocol_access is required to permit | |
2516 | downstream proxies which can be trusted. | |
2517 | ||
2518 | worker-queues | |
2519 | Ask TCP stack to maintain a dedicated listening queue | |
2520 | for each worker accepting requests at this port. | |
2521 | Requires TCP stack that supports the SO_REUSEPORT socket | |
2522 | option. | |
2523 | ||
2524 | SECURITY WARNING: Enabling worker-specific queues | |
2525 | allows any process running as Squid's effective user to | |
2526 | easily accept requests destined to this port. | |
2527 | ||
2528 | If you run Squid on a dual-homed machine with an internal | |
2529 | and an external interface we recommend you to specify the | |
2530 | internal address:port in http_port. This way Squid will only be | |
2531 | visible on the internal address. | |
2532 | ||
2533 | CONFIG_START | |
2534 | ||
2535 | # Squid normally listens to port 3128 | |
2536 | http_port @DEFAULT_HTTP_PORT@ | |
2537 | CONFIG_END | |
2538 | DOC_END | |
2539 | ||
2540 | NAME: https_port | |
2541 | IFDEF: HAVE_LIBGNUTLS||USE_OPENSSL | |
2542 | TYPE: PortCfg | |
2543 | DEFAULT: none | |
2544 | LOC: HttpPortList | |
2545 | DOC_START | |
2546 | Usage: [ip:]port [mode] tls-cert=certificate.pem [options] | |
2547 | ||
2548 | The socket address where Squid will listen for client requests made | |
2549 | over TLS or SSL connections. Commonly referred to as HTTPS. | |
2550 | ||
2551 | This is most useful for situations where you are running squid in | |
2552 | accelerator mode and you want to do the TLS work at the accelerator | |
2553 | level. | |
2554 | ||
2555 | You may specify multiple socket addresses on multiple lines, | |
2556 | each with their own certificate and/or options. | |
2557 | ||
2558 | The tls-cert= option is mandatory on HTTPS ports. | |
2559 | ||
2560 | See http_port for a list of modes and options. | |
2561 | DOC_END | |
2562 | ||
2563 | NAME: ftp_port | |
2564 | TYPE: PortCfg | |
2565 | DEFAULT: none | |
2566 | LOC: FtpPortList | |
2567 | DOC_START | |
2568 | Enables Native FTP proxy by specifying the socket address where Squid | |
2569 | listens for FTP client requests. See http_port directive for various | |
2570 | ways to specify the listening address and mode. | |
2571 | ||
2572 | Usage: ftp_port address [mode] [options] | |
2573 | ||
2574 | WARNING: This is a new, experimental, complex feature that has seen | |
2575 | limited production exposure. Some Squid modules (e.g., caching) do not | |
2576 | currently work with native FTP proxying, and many features have not | |
2577 | even been tested for compatibility. Test well before deploying! | |
2578 | ||
2579 | Native FTP proxying differs substantially from proxying HTTP requests | |
2580 | with ftp:// URIs because Squid works as an FTP server and receives | |
2581 | actual FTP commands (rather than HTTP requests with FTP URLs). | |
2582 | ||
2583 | Native FTP commands accepted at ftp_port are internally converted or | |
2584 | wrapped into HTTP-like messages. The same happens to Native FTP | |
2585 | responses received from FTP origin servers. Those HTTP-like messages | |
2586 | are shoveled through regular access control and adaptation layers | |
2587 | between the FTP client and the FTP origin server. This allows Squid to | |
2588 | examine, adapt, block, and log FTP exchanges. Squid reuses most HTTP | |
2589 | mechanisms when shoveling wrapped FTP messages. For example, | |
2590 | http_access and adaptation_access directives are used. | |
2591 | ||
2592 | Modes: | |
2593 | ||
2594 | intercept Same as http_port intercept. The FTP origin address is | |
2595 | determined based on the intended destination of the | |
2596 | intercepted connection. | |
2597 | ||
2598 | tproxy Support Linux TPROXY for spoofing outgoing | |
2599 | connections using the client IP address. | |
2600 | NP: disables authentication and maybe IPv6 on the port. | |
2601 | ||
2602 | By default (i.e., without an explicit mode option), Squid extracts the | |
2603 | FTP origin address from the login@origin parameter of the FTP USER | |
2604 | command. Many popular FTP clients support such native FTP proxying. | |
2605 | ||
2606 | Options: | |
2607 | ||
2608 | name=token Specifies an internal name for the port. Defaults to | |
2609 | the port address. Usable with myportname ACL. | |
2610 | ||
2611 | ftp-track-dirs | |
2612 | Enables tracking of FTP directories by injecting extra | |
2613 | PWD commands and adjusting Request-URI (in wrapping | |
2614 | HTTP requests) to reflect the current FTP server | |
2615 | directory. Tracking is disabled by default. | |
2616 | ||
2617 | protocol=FTP Protocol to reconstruct accelerated and intercepted | |
2618 | requests with. Defaults to FTP. No other accepted | |
2619 | values have been tested with. An unsupported value | |
2620 | results in a FATAL error. Accepted values are FTP, | |
2621 | HTTP (or HTTP/1.1), and HTTPS (or HTTPS/1.1). | |
2622 | ||
2623 | Other http_port modes and options that are not specific to HTTP and | |
2624 | HTTPS may also work. | |
2625 | DOC_END | |
2626 | ||
2627 | NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp | |
2628 | TYPE: acl_tos | |
2629 | DEFAULT: none | |
2630 | LOC: Ip::Qos::TheConfig.tosToServer | |
2631 | DOC_START | |
2632 | Allows you to select a TOS/Diffserv value for packets outgoing | |
2633 | on the server side, based on an ACL. | |
2634 | ||
2635 | tcp_outgoing_tos ds-field [!]aclname ... | |
2636 | ||
2637 | Example where normal_service_net uses the TOS value 0x00 | |
2638 | and good_service_net uses 0x20 | |
2639 | ||
2640 | acl normal_service_net src 10.0.0.0/24 | |
2641 | acl good_service_net src 10.0.1.0/24 | |
2642 | tcp_outgoing_tos 0x00 normal_service_net | |
2643 | tcp_outgoing_tos 0x20 good_service_net | |
2644 | ||
2645 | TOS/DSCP values really only have local significance - so you should | |
2646 | know what you're specifying. For more information, see RFC2474, | |
2647 | RFC2475, and RFC3260. | |
2648 | ||
2649 | The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or | |
2650 | "default" to use whatever default your host has. | |
2651 | Note that only multiples of 4 are usable as the two rightmost bits have | |
2652 | been redefined for use by ECN (RFC 3168 section 23.1). | |
2653 | The squid parser will enforce this by masking away the ECN bits. | |
2654 | ||
2655 | Processing proceeds in the order specified, and stops at first fully | |
2656 | matching line. | |
2657 | ||
2658 | Only fast ACLs are supported. | |
2659 | DOC_END | |
2660 | ||
2661 | NAME: clientside_tos | |
2662 | TYPE: acl_tos | |
2663 | DEFAULT: none | |
2664 | LOC: Ip::Qos::TheConfig.tosToClient | |
2665 | DOC_START | |
2666 | Allows you to select a TOS/DSCP value for packets being transmitted | |
2667 | on the client-side, based on an ACL. | |
2668 | ||
2669 | clientside_tos ds-field [!]aclname ... | |
2670 | ||
2671 | Example where normal_service_net uses the TOS value 0x00 | |
2672 | and good_service_net uses 0x20 | |
2673 | ||
2674 | acl normal_service_net src 10.0.0.0/24 | |
2675 | acl good_service_net src 10.0.1.0/24 | |
2676 | clientside_tos 0x00 normal_service_net | |
2677 | clientside_tos 0x20 good_service_net | |
2678 | ||
2679 | Note: This feature is incompatible with qos_flows. Any TOS values set here | |
2680 | will be overwritten by TOS values in qos_flows. | |
2681 | ||
2682 | The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or | |
2683 | "default" to use whatever default your host has. | |
2684 | Note that only multiples of 4 are usable as the two rightmost bits have | |
2685 | been redefined for use by ECN (RFC 3168 section 23.1). | |
2686 | The squid parser will enforce this by masking away the ECN bits. | |
2687 | ||
2688 | This clause only supports fast acl types. | |
2689 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
2690 | DOC_END | |
2691 | ||
2692 | NAME: tcp_outgoing_mark | |
2693 | TYPE: acl_nfmark | |
2694 | IFDEF: HAVE_LIBCAP&&SO_MARK | |
2695 | DEFAULT: none | |
2696 | LOC: Ip::Qos::TheConfig.nfmarkToServer | |
2697 | DOC_START | |
2698 | Allows you to apply a Netfilter mark value to outgoing packets | |
2699 | on the server side, based on an ACL. | |
2700 | ||
2701 | tcp_outgoing_mark mark-value [!]aclname ... | |
2702 | ||
2703 | Example where normal_service_net uses the mark value 0x00 | |
2704 | and good_service_net uses 0x20 | |
2705 | ||
2706 | acl normal_service_net src 10.0.0.0/24 | |
2707 | acl good_service_net src 10.0.1.0/24 | |
2708 | tcp_outgoing_mark 0x00 normal_service_net | |
2709 | tcp_outgoing_mark 0x20 good_service_net | |
2710 | ||
2711 | Only fast ACLs are supported. | |
2712 | DOC_END | |
2713 | ||
2714 | NAME: mark_client_packet clientside_mark | |
2715 | TYPE: acl_nfmark | |
2716 | IFDEF: HAVE_LIBCAP&&SO_MARK | |
2717 | DEFAULT: none | |
2718 | LOC: Ip::Qos::TheConfig.nfmarkToClient | |
2719 | DOC_START | |
2720 | Allows you to apply a Netfilter MARK value to packets being transmitted | |
2721 | on the client-side, based on an ACL. | |
2722 | ||
2723 | mark_client_packet mark-value [!]aclname ... | |
2724 | ||
2725 | Example where normal_service_net uses the MARK value 0x00 | |
2726 | and good_service_net uses 0x20 | |
2727 | ||
2728 | acl normal_service_net src 10.0.0.0/24 | |
2729 | acl good_service_net src 10.0.1.0/24 | |
2730 | mark_client_packet 0x00 normal_service_net | |
2731 | mark_client_packet 0x20 good_service_net | |
2732 | ||
2733 | Note: This feature is incompatible with qos_flows. Any mark values set here | |
2734 | will be overwritten by mark values in qos_flows. | |
2735 | ||
2736 | This clause only supports fast acl types. | |
2737 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
2738 | DOC_END | |
2739 | ||
2740 | NAME: mark_client_connection | |
2741 | TYPE: acl_nfmark | |
2742 | IFDEF: HAVE_LIBCAP&&SO_MARK | |
2743 | DEFAULT: none | |
2744 | LOC: Ip::Qos::TheConfig.nfConnmarkToClient | |
2745 | DOC_START | |
2746 | Allows you to apply a Netfilter CONNMARK value to a connection | |
2747 | on the client-side, based on an ACL. | |
2748 | ||
2749 | mark_client_connection mark-value[/mask] [!]aclname ... | |
2750 | ||
2751 | The mark-value and mask are unsigned integers (hex, octal, or decimal). | |
2752 | The mask may be used to preserve marking previously set by other agents | |
2753 | (e.g., iptables). | |
2754 | ||
2755 | A matching rule replaces the CONNMARK value. If a mask is also | |
2756 | specified, then the masked bits of the original value are zeroed, and | |
2757 | the configured mark-value is ORed with that adjusted value. | |
2758 | For example, applying a mark-value 0xAB/0xF to 0x5F CONNMARK, results | |
2759 | in a 0xFB marking (rather than a 0xAB or 0x5B). | |
2760 | ||
2761 | This directive semantics is similar to iptables --set-mark rather than | |
2762 | --set-xmark functionality. | |
2763 | ||
2764 | The directive does not interfere with qos_flows (which uses packet MARKs, | |
2765 | not CONNMARKs). | |
2766 | ||
2767 | Example where squid marks intercepted FTP connections: | |
2768 | ||
2769 | acl proto_ftp proto FTP | |
2770 | mark_client_connection 0x200/0xff00 proto_ftp | |
2771 | ||
2772 | This clause only supports fast acl types. | |
2773 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
2774 | DOC_END | |
2775 | ||
2776 | NAME: qos_flows | |
2777 | TYPE: QosConfig | |
2778 | IFDEF: USE_QOS_TOS | |
2779 | DEFAULT: none | |
2780 | LOC: Ip::Qos::TheConfig | |
2781 | DOC_START | |
2782 | Allows you to select a TOS/DSCP value to mark outgoing | |
2783 | connections to the client, based on where the reply was sourced. | |
2784 | For platforms using netfilter, allows you to set a netfilter mark | |
2785 | value instead of, or in addition to, a TOS value. | |
2786 | ||
2787 | By default this functionality is disabled. To enable it with the default | |
2788 | settings simply use "qos_flows mark" or "qos_flows tos". Default | |
2789 | settings will result in the netfilter mark or TOS value being copied | |
2790 | from the upstream connection to the client. Note that it is the connection | |
2791 | CONNMARK value not the packet MARK value that is copied. | |
2792 | ||
2793 | It is not currently possible to copy the mark or TOS value from the | |
2794 | client to the upstream connection request. | |
2795 | ||
2796 | TOS values really only have local significance - so you should | |
2797 | know what you're specifying. For more information, see RFC2474, | |
2798 | RFC2475, and RFC3260. | |
2799 | ||
2800 | The TOS/DSCP byte must be exactly that - a octet value 0 - 255. | |
2801 | Note that only multiples of 4 are usable as the two rightmost bits have | |
2802 | been redefined for use by ECN (RFC 3168 section 23.1). | |
2803 | The squid parser will enforce this by masking away the ECN bits. | |
2804 | ||
2805 | Mark values can be any unsigned 32-bit integer value. | |
2806 | ||
2807 | This setting is configured by setting the following values: | |
2808 | ||
2809 | tos|mark Whether to set TOS or netfilter mark values | |
2810 | ||
2811 | local-hit=0xFF Value to mark local cache hits. | |
2812 | ||
2813 | sibling-hit=0xFF Value to mark hits from sibling peers. | |
2814 | ||
2815 | parent-hit=0xFF Value to mark hits from parent peers. | |
2816 | ||
2817 | miss=0xFF[/mask] Value to mark cache misses. Takes precedence | |
2818 | over the preserve-miss feature (see below), unless | |
2819 | mask is specified, in which case only the bits | |
2820 | specified in the mask are written. | |
2821 | ||
2822 | The TOS variant of the following features are only possible on Linux | |
2823 | and require your kernel to be patched with the TOS preserving ZPH | |
2824 | patch, available from http://zph.bratcheda.org | |
2825 | No patch is needed to preserve the netfilter mark, which will work | |
2826 | with all variants of netfilter. | |
2827 | ||
2828 | disable-preserve-miss | |
2829 | This option disables the preservation of the TOS or netfilter | |
2830 | mark. By default, the existing TOS or netfilter mark value of | |
2831 | the response coming from the remote server will be retained | |
2832 | and masked with miss-mark. | |
2833 | NOTE: in the case of a netfilter mark, the mark must be set on | |
2834 | the connection (using the CONNMARK target) not on the packet | |
2835 | (MARK target). | |
2836 | ||
2837 | miss-mask=0xFF | |
2838 | Allows you to mask certain bits in the TOS or mark value | |
2839 | received from the remote server, before copying the value to | |
2840 | the TOS sent towards clients. | |
2841 | Default for tos: 0xFF (TOS from server is not changed). | |
2842 | Default for mark: 0xFFFFFFFF (mark from server is not changed). | |
2843 | ||
2844 | All of these features require the --enable-zph-qos compilation flag | |
2845 | (enabled by default). Netfilter marking also requires the | |
2846 | libnetfilter_conntrack libraries (--with-netfilter-conntrack) and | |
2847 | libcap 2.09+ (--with-libcap). | |
2848 | ||
2849 | DOC_END | |
2850 | ||
2851 | NAME: tcp_outgoing_address | |
2852 | TYPE: acl_address | |
2853 | DEFAULT: none | |
2854 | DEFAULT_DOC: Address selection is performed by the operating system. | |
2855 | LOC: Config.accessList.outgoing_address | |
2856 | DOC_START | |
2857 | Allows you to map requests to different outgoing IP addresses | |
2858 | based on the username or source address of the user making | |
2859 | the request. | |
2860 | ||
2861 | tcp_outgoing_address ipaddr [[!]aclname] ... | |
2862 | ||
2863 | For example; | |
2864 | Forwarding clients with dedicated IPs for certain subnets. | |
2865 | ||
2866 | acl normal_service_net src 10.0.0.0/24 | |
2867 | acl good_service_net src 10.0.2.0/24 | |
2868 | ||
2869 | tcp_outgoing_address 2001:db8::c001 good_service_net | |
2870 | tcp_outgoing_address 10.1.0.2 good_service_net | |
2871 | ||
2872 | tcp_outgoing_address 2001:db8::beef normal_service_net | |
2873 | tcp_outgoing_address 10.1.0.1 normal_service_net | |
2874 | ||
2875 | tcp_outgoing_address 2001:db8::1 | |
2876 | tcp_outgoing_address 10.1.0.3 | |
2877 | ||
2878 | Processing proceeds in the order specified, and stops at first fully | |
2879 | matching line. | |
2880 | ||
2881 | Squid will add an implicit IP version test to each line. | |
2882 | Requests going to IPv4 websites will use the outgoing 10.1.0.* addresses. | |
2883 | Requests going to IPv6 websites will use the outgoing 2001:db8:* addresses. | |
2884 | ||
2885 | ||
2886 | NOTE: The use of this directive using client dependent ACLs is | |
2887 | incompatible with the use of server side persistent connections. To | |
2888 | ensure correct results it is best to set server_persistent_connections | |
2889 | to off when using this directive in such configurations. | |
2890 | ||
2891 | NOTE: The use of this directive to set a local IP on outgoing TCP links | |
2892 | is incompatible with using TPROXY to set client IP out outbound TCP links. | |
2893 | When needing to contact peers use the no-tproxy cache_peer option and the | |
2894 | client_dst_passthru directive re-enable normal forwarding such as this. | |
2895 | ||
2896 | This clause only supports fast acl types. | |
2897 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
2898 | DOC_END | |
2899 | ||
2900 | NAME: host_verify_strict | |
2901 | TYPE: onoff | |
2902 | DEFAULT: off | |
2903 | LOC: Config.onoff.hostStrictVerify | |
2904 | DOC_START | |
2905 | Regardless of this option setting, when dealing with intercepted | |
2906 | traffic, Squid always verifies that the destination IP address matches | |
2907 | the Host header domain or IP (called 'authority form URL'). | |
2908 | ||
2909 | This enforcement is performed to satisfy a MUST-level requirement in | |
2910 | RFC 2616 section 14.23: "The Host field value MUST represent the naming | |
2911 | authority of the origin server or gateway given by the original URL". | |
2912 | ||
2913 | When set to ON: | |
2914 | Squid always responds with an HTTP 409 (Conflict) error | |
2915 | page and logs a security warning if there is no match. | |
2916 | ||
2917 | Squid verifies that the destination IP address matches | |
2918 | the Host header for forward-proxy and reverse-proxy traffic | |
2919 | as well. For those traffic types, Squid also enables the | |
2920 | following checks, comparing the corresponding Host header | |
2921 | and Request-URI components: | |
2922 | ||
2923 | * The host names (domain or IP) must be identical, | |
2924 | but valueless or missing Host header disables all checks. | |
2925 | For the two host names to match, both must be either IP | |
2926 | or FQDN. | |
2927 | ||
2928 | * Port numbers must be identical, but if a port is missing | |
2929 | the scheme-default port is assumed. | |
2930 | ||
2931 | ||
2932 | When set to OFF (the default): | |
2933 | Squid allows suspicious requests to continue but logs a | |
2934 | security warning and blocks caching of the response. | |
2935 | ||
2936 | * Forward-proxy traffic is not checked at all. | |
2937 | ||
2938 | * Reverse-proxy traffic is not checked at all. | |
2939 | ||
2940 | * Intercepted traffic which passes verification is handled | |
2941 | according to client_dst_passthru. | |
2942 | ||
2943 | * Intercepted requests which fail verification are sent | |
2944 | to the client original destination instead of DIRECT. | |
2945 | This overrides 'client_dst_passthru off'. | |
2946 | ||
2947 | For now suspicious intercepted CONNECT requests are always | |
2948 | responded to with an HTTP 409 (Conflict) error page. | |
2949 | ||
2950 | ||
2951 | SECURITY NOTE: | |
2952 | ||
2953 | As described in CVE-2009-0801 when the Host: header alone is used | |
2954 | to determine the destination of a request it becomes trivial for | |
2955 | malicious scripts on remote websites to bypass browser same-origin | |
2956 | security policy and sandboxing protections. | |
2957 | ||
2958 | The cause of this is that such applets are allowed to perform their | |
2959 | own HTTP stack, in which case the same-origin policy of the browser | |
2960 | sandbox only verifies that the applet tries to contact the same IP | |
2961 | as from where it was loaded at the IP level. The Host: header may | |
2962 | be different from the connected IP and approved origin. | |
2963 | ||
2964 | DOC_END | |
2965 | ||
2966 | NAME: client_dst_passthru | |
2967 | TYPE: onoff | |
2968 | DEFAULT: on | |
2969 | LOC: Config.onoff.client_dst_passthru | |
2970 | DOC_START | |
2971 | With NAT or TPROXY intercepted traffic Squid may pass the request | |
2972 | directly to the original client destination IP or seek a faster | |
2973 | source using the HTTP Host header. | |
2974 | ||
2975 | Using Host to locate alternative servers can provide faster | |
2976 | connectivity with a range of failure recovery options. | |
2977 | But can also lead to connectivity trouble when the client and | |
2978 | server are attempting stateful interactions unaware of the proxy. | |
2979 | ||
2980 | This option (on by default) prevents alternative DNS entries being | |
2981 | located to send intercepted traffic DIRECT to an origin server. | |
2982 | The clients original destination IP and port will be used instead. | |
2983 | ||
2984 | Regardless of this option setting, when dealing with intercepted | |
2985 | traffic Squid will verify the Host: header and any traffic which | |
2986 | fails Host verification will be treated as if this option were ON. | |
2987 | ||
2988 | see host_verify_strict for details on the verification process. | |
2989 | DOC_END | |
2990 | ||
2991 | COMMENT_START | |
2992 | TLS OPTIONS | |
2993 | ----------------------------------------------------------------------------- | |
2994 | COMMENT_END | |
2995 | ||
2996 | NAME: tls_outgoing_options | |
2997 | IFDEF: HAVE_LIBGNUTLS||USE_OPENSSL | |
2998 | TYPE: securePeerOptions | |
2999 | DEFAULT: min-version=1.0 | |
3000 | LOC: Security::ProxyOutgoingConfig | |
3001 | DOC_START | |
3002 | disable Do not support https:// URLs. | |
3003 | ||
3004 | cert=/path/to/client/certificate | |
3005 | A client X.509 certificate to use when connecting. | |
3006 | ||
3007 | key=/path/to/client/private_key | |
3008 | The private key corresponding to the cert= above. | |
3009 | ||
3010 | If key= is not specified cert= is assumed to | |
3011 | reference a PEM file containing both the certificate | |
3012 | and private key. | |
3013 | ||
3014 | cipher=... The list of valid TLS ciphers to use. | |
3015 | ||
3016 | min-version=1.N | |
3017 | The minimum TLS protocol version to permit. | |
3018 | To control SSLv3 use the options= parameter. | |
3019 | Supported Values: 1.0 (default), 1.1, 1.2, 1.3 | |
3020 | ||
3021 | options=... Specify various TLS/SSL implementation options. | |
3022 | ||
3023 | OpenSSL options most important are: | |
3024 | ||
3025 | NO_SSLv3 Disallow the use of SSLv3 | |
3026 | ||
3027 | SINGLE_DH_USE | |
3028 | Always create a new key when using | |
3029 | temporary/ephemeral DH key exchanges | |
3030 | ||
3031 | NO_TICKET | |
3032 | Disable use of RFC5077 session tickets. | |
3033 | Some servers may have problems | |
3034 | understanding the TLS extension due | |
3035 | to ambiguous specification in RFC4507. | |
3036 | ||
3037 | ALL Enable various bug workarounds | |
3038 | suggested as "harmless" by OpenSSL | |
3039 | Be warned that this reduces SSL/TLS | |
3040 | strength to some attacks. | |
3041 | ||
3042 | See the OpenSSL SSL_CTX_set_options documentation | |
3043 | for a more complete list. | |
3044 | ||
3045 | GnuTLS options most important are: | |
3046 | ||
3047 | %NO_TICKETS | |
3048 | Disable use of RFC5077 session tickets. | |
3049 | Some servers may have problems | |
3050 | understanding the TLS extension due | |
3051 | to ambiguous specification in RFC4507. | |
3052 | ||
3053 | See the GnuTLS Priority Strings documentation | |
3054 | for a more complete list. | |
3055 | http://www.gnutls.org/manual/gnutls.html#Priority-Strings | |
3056 | ||
3057 | ||
3058 | cafile= PEM file containing CA certificates to use when verifying | |
3059 | the peer certificate. May be repeated to load multiple files. | |
3060 | ||
3061 | capath= A directory containing additional CA certificates to | |
3062 | use when verifying the peer certificate. | |
3063 | Requires OpenSSL or LibreSSL. | |
3064 | ||
3065 | crlfile=... A certificate revocation list file to use when | |
3066 | verifying the peer certificate. | |
3067 | ||
3068 | flags=... Specify various flags modifying the TLS implementation: | |
3069 | ||
3070 | DONT_VERIFY_PEER | |
3071 | Accept certificates even if they fail to | |
3072 | verify. | |
3073 | DONT_VERIFY_DOMAIN | |
3074 | Don't verify the peer certificate | |
3075 | matches the server name | |
3076 | ||
3077 | default-ca[=off] | |
3078 | Whether to use the system Trusted CAs. Default is ON. | |
3079 | ||
3080 | domain= The peer name as advertised in its certificate. | |
3081 | Used for verifying the correctness of the received peer | |
3082 | certificate. If not specified the peer hostname will be | |
3083 | used. | |
3084 | DOC_END | |
3085 | ||
3086 | COMMENT_START | |
3087 | SSL OPTIONS | |
3088 | ----------------------------------------------------------------------------- | |
3089 | COMMENT_END | |
3090 | ||
3091 | NAME: ssl_unclean_shutdown | |
3092 | IFDEF: USE_OPENSSL | |
3093 | TYPE: onoff | |
3094 | DEFAULT: off | |
3095 | LOC: Config.SSL.unclean_shutdown | |
3096 | DOC_START | |
3097 | Some browsers (especially MSIE) bugs out on SSL shutdown | |
3098 | messages. | |
3099 | DOC_END | |
3100 | ||
3101 | NAME: ssl_engine | |
3102 | IFDEF: USE_OPENSSL | |
3103 | TYPE: string | |
3104 | LOC: Config.SSL.ssl_engine | |
3105 | DEFAULT: none | |
3106 | DOC_START | |
3107 | The OpenSSL engine to use. You will need to set this if you | |
3108 | would like to use hardware SSL acceleration for example. | |
3109 | ||
3110 | Not supported in builds with OpenSSL 3.0 or newer. | |
3111 | DOC_END | |
3112 | ||
3113 | NAME: sslproxy_session_ttl | |
3114 | IFDEF: USE_OPENSSL | |
3115 | DEFAULT: 300 | |
3116 | LOC: Config.SSL.session_ttl | |
3117 | TYPE: int | |
3118 | DOC_START | |
3119 | Sets the timeout value for SSL sessions | |
3120 | DOC_END | |
3121 | ||
3122 | NAME: sslproxy_session_cache_size | |
3123 | IFDEF: USE_OPENSSL | |
3124 | DEFAULT: 2 MB | |
3125 | LOC: Config.SSL.sessionCacheSize | |
3126 | TYPE: b_size_t | |
3127 | DOC_START | |
3128 | Sets the cache size to use for ssl session | |
3129 | DOC_END | |
3130 | ||
3131 | NAME: sslproxy_foreign_intermediate_certs | |
3132 | IFDEF: USE_OPENSSL | |
3133 | DEFAULT: none | |
3134 | LOC: Config.ssl_client.foreignIntermediateCertsPath | |
3135 | TYPE: string | |
3136 | DOC_START | |
3137 | Many origin servers fail to send their full server certificate | |
3138 | chain for verification, assuming the client already has or can | |
3139 | easily locate any missing intermediate certificates. | |
3140 | ||
3141 | Squid uses the certificates from the specified file to fill in | |
3142 | these missing chains when trying to validate origin server | |
3143 | certificate chains. | |
3144 | ||
3145 | The file is expected to contain zero or more PEM-encoded | |
3146 | intermediate certificates. These certificates are not treated | |
3147 | as trusted root certificates, and any self-signed certificate in | |
3148 | this file will be ignored. | |
3149 | DOC_END | |
3150 | ||
3151 | NAME: sslproxy_cert_sign_hash | |
3152 | IFDEF: USE_OPENSSL | |
3153 | DEFAULT: none | |
3154 | LOC: Config.SSL.certSignHash | |
3155 | TYPE: string | |
3156 | DOC_START | |
3157 | Sets the hashing algorithm to use when signing generated certificates. | |
3158 | Valid algorithm names depend on the OpenSSL library used. The following | |
3159 | names are usually available: sha1, sha256, sha512, and md5. Please see | |
3160 | your OpenSSL library manual for the available hashes. By default, Squids | |
3161 | that support this option use sha256 hashes. | |
3162 | ||
3163 | Squid does not forcefully purge cached certificates that were generated | |
3164 | with an algorithm other than the currently configured one. They remain | |
3165 | in the cache, subject to the regular cache eviction policy, and become | |
3166 | useful if the algorithm changes again. | |
3167 | DOC_END | |
3168 | ||
3169 | NAME: ssl_bump | |
3170 | IFDEF: USE_OPENSSL | |
3171 | TYPE: sslproxy_ssl_bump | |
3172 | LOC: Config.accessList.ssl_bump | |
3173 | DEFAULT_DOC: Become a TCP tunnel without decrypting proxied traffic. | |
3174 | DEFAULT: none | |
3175 | DOC_START | |
3176 | This option is consulted when a CONNECT request is received on | |
3177 | an http_port (or a new connection is intercepted at an | |
3178 | https_port), provided that port was configured with an ssl-bump | |
3179 | flag. The subsequent data on the connection is either treated as | |
3180 | HTTPS and decrypted OR tunneled at TCP level without decryption, | |
3181 | depending on the first matching bumping "action". | |
3182 | ||
3183 | ssl_bump <action> [!]acl ... | |
3184 | ||
3185 | The following bumping actions are currently supported: | |
3186 | ||
3187 | splice | |
3188 | Become a TCP tunnel without decrypting proxied traffic. | |
3189 | This is the default action. | |
3190 | ||
3191 | bump | |
3192 | When used on step SslBump1, establishes a secure connection | |
3193 | with the client first, then connect to the server. | |
3194 | When used on step SslBump2 or SslBump3, establishes a secure | |
3195 | connection with the server and, using a mimicked server | |
3196 | certificate, with the client. | |
3197 | ||
3198 | peek | |
3199 | Receive client (step SslBump1) or server (step SslBump2) | |
3200 | certificate while preserving the possibility of splicing the | |
3201 | connection. Peeking at the server certificate (during step 2) | |
3202 | usually precludes bumping of the connection at step 3. | |
3203 | ||
3204 | stare | |
3205 | Receive client (step SslBump1) or server (step SslBump2) | |
3206 | certificate while preserving the possibility of bumping the | |
3207 | connection. Staring at the server certificate (during step 2) | |
3208 | usually precludes splicing of the connection at step 3. | |
3209 | ||
3210 | terminate | |
3211 | Close client and server connections. | |
3212 | ||
3213 | Backward compatibility actions available at step SslBump1: | |
3214 | ||
3215 | client-first | |
3216 | Bump the connection. Establish a secure connection with the | |
3217 | client first, then connect to the server. This old mode does | |
3218 | not allow Squid to mimic server SSL certificate and does not | |
3219 | work with intercepted SSL connections. | |
3220 | ||
3221 | server-first | |
3222 | Bump the connection. Establish a secure connection with the | |
3223 | server first, then establish a secure connection with the | |
3224 | client, using a mimicked server certificate. Works with both | |
3225 | CONNECT requests and intercepted SSL connections, but does | |
3226 | not allow to make decisions based on SSL handshake info. | |
3227 | ||
3228 | peek-and-splice | |
3229 | Decide whether to bump or splice the connection based on | |
3230 | client-to-squid and server-to-squid SSL hello messages. | |
3231 | XXX: Remove. | |
3232 | ||
3233 | none | |
3234 | Same as the "splice" action. | |
3235 | ||
3236 | All ssl_bump rules are evaluated at each of the supported bumping | |
3237 | steps. Rules with actions that are impossible at the current step are | |
3238 | ignored. The first matching ssl_bump action wins and is applied at the | |
3239 | end of the current step. If no rules match, the splice action is used. | |
3240 | See the at_step ACL for a list of the supported SslBump steps. | |
3241 | ||
3242 | This clause supports both fast and slow acl types. | |
3243 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
3244 | ||
3245 | See also: http_port ssl-bump, https_port ssl-bump, and acl at_step. | |
3246 | ||
3247 | ||
3248 | # Example: Bump all TLS connections except those originating from | |
3249 | # localhost or those going to example.com. | |
3250 | ||
3251 | acl broken_sites ssl::server_name .example.com | |
3252 | ssl_bump splice localhost | |
3253 | ssl_bump splice broken_sites | |
3254 | ssl_bump bump all | |
3255 | DOC_END | |
3256 | ||
3257 | NAME: sslproxy_cert_error | |
3258 | IFDEF: USE_OPENSSL | |
3259 | DEFAULT: none | |
3260 | DEFAULT_DOC: Server certificate errors terminate the transaction. | |
3261 | LOC: Config.ssl_client.cert_error | |
3262 | TYPE: acl_access | |
3263 | DOC_START | |
3264 | Use this ACL to bypass server certificate validation errors. | |
3265 | ||
3266 | For example, the following lines will bypass all validation errors | |
3267 | when talking to servers for example.com. All other | |
3268 | validation errors will result in ERR_SECURE_CONNECT_FAIL error. | |
3269 | ||
3270 | acl BrokenButTrustedServers dstdomain example.com | |
3271 | sslproxy_cert_error allow BrokenButTrustedServers | |
3272 | sslproxy_cert_error deny all | |
3273 | ||
3274 | This clause only supports fast acl types. | |
3275 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
3276 | Using slow acl types may result in server crashes | |
3277 | ||
3278 | Without this option, all server certificate validation errors | |
3279 | terminate the transaction to protect Squid and the client. | |
3280 | ||
3281 | SQUID_X509_V_ERR_INFINITE_VALIDATION error cannot be bypassed | |
3282 | but should not happen unless your OpenSSL library is buggy. | |
3283 | ||
3284 | SECURITY WARNING: | |
3285 | Bypassing validation errors is dangerous because an | |
3286 | error usually implies that the server cannot be trusted | |
3287 | and the connection may be insecure. | |
3288 | ||
3289 | See also: sslproxy_flags and DONT_VERIFY_PEER. | |
3290 | DOC_END | |
3291 | ||
3292 | NAME: sslproxy_cert_sign | |
3293 | IFDEF: USE_OPENSSL | |
3294 | DEFAULT: none | |
3295 | POSTSCRIPTUM: signUntrusted ssl::certUntrusted | |
3296 | POSTSCRIPTUM: signSelf ssl::certSelfSigned | |
3297 | POSTSCRIPTUM: signTrusted all | |
3298 | TYPE: sslproxy_cert_sign | |
3299 | LOC: Config.ssl_client.cert_sign | |
3300 | DOC_START | |
3301 | ||
3302 | sslproxy_cert_sign <signing algorithm> acl ... | |
3303 | ||
3304 | The following certificate signing algorithms are supported: | |
3305 | ||
3306 | signTrusted | |
3307 | Sign using the configured CA certificate which is usually | |
3308 | placed in and trusted by end-user browsers. This is the | |
3309 | default for trusted origin server certificates. | |
3310 | ||
3311 | signUntrusted | |
3312 | Sign to guarantee an X509_V_ERR_CERT_UNTRUSTED browser error. | |
3313 | This is the default for untrusted origin server certificates | |
3314 | that are not self-signed (see ssl::certUntrusted). | |
3315 | ||
3316 | signSelf | |
3317 | Sign using a self-signed certificate with the right CN to | |
3318 | generate a X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT error in the | |
3319 | browser. This is the default for self-signed origin server | |
3320 | certificates (see ssl::certSelfSigned). | |
3321 | ||
3322 | This clause only supports fast acl types. | |
3323 | ||
3324 | When sslproxy_cert_sign acl(s) match, Squid uses the corresponding | |
3325 | signing algorithm to generate the certificate and ignores all | |
3326 | subsequent sslproxy_cert_sign options (the first match wins). If no | |
3327 | acl(s) match, the default signing algorithm is determined by errors | |
3328 | detected when obtaining and validating the origin server certificate. | |
3329 | ||
3330 | WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can | |
3331 | be used with sslproxy_cert_adapt, but if and only if Squid is bumping a | |
3332 | CONNECT request that carries a domain name. In all other cases (CONNECT | |
3333 | to an IP address or an intercepted SSL connection), Squid cannot detect | |
3334 | the domain mismatch at certificate generation time when | |
3335 | bump-server-first is used. | |
3336 | DOC_END | |
3337 | ||
3338 | NAME: sslproxy_cert_adapt | |
3339 | IFDEF: USE_OPENSSL | |
3340 | DEFAULT: none | |
3341 | TYPE: sslproxy_cert_adapt | |
3342 | LOC: Config.ssl_client.cert_adapt | |
3343 | DOC_START | |
3344 | ||
3345 | sslproxy_cert_adapt <adaptation algorithm> acl ... | |
3346 | ||
3347 | The following certificate adaptation algorithms are supported: | |
3348 | ||
3349 | setValidAfter | |
3350 | Sets the "Not After" property to the "Not After" property of | |
3351 | the CA certificate used to sign generated certificates. | |
3352 | ||
3353 | setValidBefore | |
3354 | Sets the "Not Before" property to the "Not Before" property of | |
3355 | the CA certificate used to sign generated certificates. | |
3356 | ||
3357 | setCommonName or setCommonName{CN} | |
3358 | Sets Subject.CN property to the host name specified as a | |
3359 | CN parameter or, if no explicit CN parameter was specified, | |
3360 | extracted from the CONNECT request. It is a misconfiguration | |
3361 | to use setCommonName without an explicit parameter for | |
3362 | intercepted or tproxied SSL connections. | |
3363 | ||
3364 | This clause only supports fast acl types. | |
3365 | ||
3366 | Squid first groups sslproxy_cert_adapt options by adaptation algorithm. | |
3367 | Within a group, when sslproxy_cert_adapt acl(s) match, Squid uses the | |
3368 | corresponding adaptation algorithm to generate the certificate and | |
3369 | ignores all subsequent sslproxy_cert_adapt options in that algorithm's | |
3370 | group (i.e., the first match wins within each algorithm group). If no | |
3371 | acl(s) match, the default mimicking action takes place. | |
3372 | ||
3373 | WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can | |
3374 | be used with sslproxy_cert_adapt, but if and only if Squid is bumping a | |
3375 | CONNECT request that carries a domain name. In all other cases (CONNECT | |
3376 | to an IP address or an intercepted SSL connection), Squid cannot detect | |
3377 | the domain mismatch at certificate generation time when | |
3378 | bump-server-first is used. | |
3379 | DOC_END | |
3380 | ||
3381 | NAME: sslpassword_program | |
3382 | IFDEF: USE_OPENSSL | |
3383 | DEFAULT: none | |
3384 | LOC: Config.Program.ssl_password | |
3385 | TYPE: string | |
3386 | DOC_START | |
3387 | Specify a program used for entering SSL key passphrases | |
3388 | when using encrypted SSL certificate keys. If not specified | |
3389 | keys must either be unencrypted, or Squid started with the -N | |
3390 | option to allow it to query interactively for the passphrase. | |
3391 | ||
3392 | The key file name is given as argument to the program allowing | |
3393 | selection of the right password if you have multiple encrypted | |
3394 | keys. | |
3395 | DOC_END | |
3396 | ||
3397 | COMMENT_START | |
3398 | OPTIONS RELATING TO EXTERNAL SSL_CRTD | |
3399 | ----------------------------------------------------------------------------- | |
3400 | COMMENT_END | |
3401 | ||
3402 | NAME: sslcrtd_program | |
3403 | TYPE: eol | |
3404 | IFDEF: USE_SSL_CRTD | |
3405 | DEFAULT: @DEFAULT_SSL_CRTD@ -s @DEFAULT_SSL_DB_DIR@ -M 4MB | |
3406 | LOC: Ssl::TheConfig.ssl_crtd | |
3407 | DOC_START | |
3408 | Specify the location and options of the executable for certificate | |
3409 | generator. | |
3410 | ||
3411 | @DEFAULT_SSL_CRTD@ program can use a disk cache to improve response | |
3412 | times on repeated requests. To enable caching, specify -s and -M | |
3413 | parameters. If those parameters are not given, the program generates | |
3414 | a new certificate on every request. | |
3415 | ||
3416 | For more information use: | |
3417 | @DEFAULT_SSL_CRTD@ -h | |
3418 | DOC_END | |
3419 | ||
3420 | NAME: sslcrtd_children | |
3421 | TYPE: HelperChildConfig | |
3422 | IFDEF: USE_SSL_CRTD | |
3423 | DEFAULT: 32 startup=5 idle=1 | |
3424 | LOC: Ssl::TheConfig.ssl_crtdChildren | |
3425 | DOC_START | |
3426 | Specifies the maximum number of certificate generation processes that | |
3427 | Squid may spawn (numberofchildren) and several related options. Using | |
3428 | too few of these helper processes (a.k.a. "helpers") creates request | |
3429 | queues. Using too many helpers wastes your system resources. Squid | |
3430 | does not support spawning more than 32 helpers. | |
3431 | ||
3432 | Usage: numberofchildren [option]... | |
3433 | ||
3434 | The startup= and idle= options allow some measure of skew in your | |
3435 | tuning. | |
3436 | ||
3437 | startup=N | |
3438 | ||
3439 | Sets the minimum number of processes to spawn when Squid | |
3440 | starts or reconfigures. When set to zero the first request will | |
3441 | cause spawning of the first child process to handle it. | |
3442 | ||
3443 | Starting too few children temporary slows Squid under load while it | |
3444 | tries to spawn enough additional processes to cope with traffic. | |
3445 | ||
3446 | idle=N | |
3447 | ||
3448 | Sets a minimum of how many processes Squid is to try and keep available | |
3449 | at all times. When traffic begins to rise above what the existing | |
3450 | processes can handle this many more will be spawned up to the maximum | |
3451 | configured. A minimum setting of 1 is required. | |
3452 | ||
3453 | queue-size=N | |
3454 | ||
3455 | Sets the maximum number of queued requests. A request is queued when | |
3456 | no existing child is idle and no new child can be started due to | |
3457 | numberofchildren limit. If the queued requests exceed queue size for | |
3458 | more than 3 minutes squid aborts its operation. The default value is | |
3459 | set to 2*numberofchildren. | |
3460 | ||
3461 | You must have at least one ssl_crtd process. | |
3462 | DOC_END | |
3463 | ||
3464 | NAME: sslcrtvalidator_program | |
3465 | TYPE: eol | |
3466 | IFDEF: USE_OPENSSL | |
3467 | DEFAULT: none | |
3468 | LOC: Ssl::TheConfig.ssl_crt_validator | |
3469 | DOC_START | |
3470 | Specify the location and options of the executable for ssl_crt_validator | |
3471 | process. | |
3472 | ||
3473 | Usage: sslcrtvalidator_program [ttl=...] [cache=n] path ... | |
3474 | ||
3475 | Options: | |
3476 | ||
3477 | cache=bytes | |
3478 | Limits how much memory Squid can use for caching validator | |
3479 | responses. The default is 67108864 (i.e. 64 MB). | |
3480 | Reconfiguration purges any excess entries. To disable caching, | |
3481 | use cache=0. Currently, cache entry sizes are seriously | |
3482 | underestimated. Even with that bug, a typical estimate for a | |
3483 | single cache entry size would be at least a few kilobytes (the | |
3484 | size of the PEM certificates sent to the validator). | |
3485 | ||
3486 | ttl=<seconds|"infinity"> | |
3487 | Approximately how long Squid may reuse the validator results | |
3488 | for. The default is 3600 (i.e. 1 hour). Using ttl=infinity | |
3489 | disables TTL checks. Reconfiguration does not affect TTLs of | |
3490 | the already cached entries. To disable caching, use zero cache | |
3491 | size, not zero TTL -- zero TTL allows reuse for the remainder | |
3492 | of the second when the result was cached. | |
3493 | DOC_END | |
3494 | ||
3495 | NAME: sslcrtvalidator_children | |
3496 | TYPE: HelperChildConfig | |
3497 | IFDEF: USE_OPENSSL | |
3498 | DEFAULT: 32 startup=5 idle=1 concurrency=1 | |
3499 | LOC: Ssl::TheConfig.ssl_crt_validator_Children | |
3500 | DOC_START | |
3501 | Specifies the maximum number of certificate validation processes that | |
3502 | Squid may spawn (numberofchildren) and several related options. Using | |
3503 | too few of these helper processes (a.k.a. "helpers") creates request | |
3504 | queues. Using too many helpers wastes your system resources. Squid | |
3505 | does not support spawning more than 32 helpers. | |
3506 | ||
3507 | Usage: numberofchildren [option]... | |
3508 | ||
3509 | The startup= and idle= options allow some measure of skew in your | |
3510 | tuning. | |
3511 | ||
3512 | startup=N | |
3513 | ||
3514 | Sets the minimum number of processes to spawn when Squid | |
3515 | starts or reconfigures. When set to zero the first request will | |
3516 | cause spawning of the first child process to handle it. | |
3517 | ||
3518 | Starting too few children temporary slows Squid under load while it | |
3519 | tries to spawn enough additional processes to cope with traffic. | |
3520 | ||
3521 | idle=N | |
3522 | ||
3523 | Sets a minimum of how many processes Squid is to try and keep available | |
3524 | at all times. When traffic begins to rise above what the existing | |
3525 | processes can handle this many more will be spawned up to the maximum | |
3526 | configured. A minimum setting of 1 is required. | |
3527 | ||
3528 | concurrency= | |
3529 | ||
3530 | The number of requests each certificate validator helper can handle in | |
3531 | parallel. A value of 0 indicates the certificate validator does not | |
3532 | support concurrency. Defaults to 1. | |
3533 | ||
3534 | When this directive is set to a value >= 1 then the protocol | |
3535 | used to communicate with the helper is modified to include | |
3536 | a request ID in front of the request/response. The request | |
3537 | ID from the request must be echoed back with the response | |
3538 | to that request. | |
3539 | ||
3540 | queue-size=N | |
3541 | ||
3542 | Sets the maximum number of queued requests. A request is queued when | |
3543 | no existing child can accept it due to concurrency limit and no new | |
3544 | child can be started due to numberofchildren limit. If the queued | |
3545 | requests exceed queue size for more than 3 minutes squid aborts its | |
3546 | operation. The default value is set to 2*numberofchildren. | |
3547 | ||
3548 | You must have at least one ssl_crt_validator process. | |
3549 | DOC_END | |
3550 | ||
3551 | COMMENT_START | |
3552 | OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM | |
3553 | ----------------------------------------------------------------------------- | |
3554 | COMMENT_END | |
3555 | ||
3556 | NAME: cache_peer | |
3557 | TYPE: peer | |
3558 | DEFAULT: none | |
3559 | LOC: Config.peers | |
3560 | DOC_START | |
3561 | To specify other caches in a hierarchy, use the format: | |
3562 | ||
3563 | cache_peer hostname type http-port icp-port [options] | |
3564 | ||
3565 | For example, | |
3566 | ||
3567 | # proxy icp | |
3568 | # hostname type port port options | |
3569 | # -------------------- -------- ----- ----- ----------- | |
3570 | cache_peer parent.foo.net parent 3128 3130 default | |
3571 | cache_peer sib1.foo.net sibling 3128 3130 proxy-only | |
3572 | cache_peer sib2.foo.net sibling 3128 3130 proxy-only | |
3573 | cache_peer example.com parent 80 0 default | |
3574 | cache_peer cdn.example.com sibling 3128 0 | |
3575 | ||
3576 | type: either 'parent', 'sibling', or 'multicast'. | |
3577 | ||
3578 | proxy-port: The port number where the peer accept HTTP requests. | |
3579 | For other Squid proxies this is usually 3128 | |
3580 | For web servers this is usually 80 | |
3581 | ||
3582 | icp-port: Used for querying neighbor caches about objects. | |
3583 | Set to 0 if the peer does not support ICP or HTCP. | |
3584 | See ICP and HTCP options below for additional details. | |
3585 | ||
3586 | ||
3587 | ==== ICP OPTIONS ==== | |
3588 | ||
3589 | You MUST also set icp_port and icp_access explicitly when using these options. | |
3590 | The defaults will prevent peer traffic using ICP. | |
3591 | ||
3592 | ||
3593 | no-query Disable ICP queries to this neighbor. | |
3594 | ||
3595 | multicast-responder | |
3596 | Indicates the named peer is a member of a multicast group. | |
3597 | ICP queries will not be sent directly to the peer, but ICP | |
3598 | replies will be accepted from it. | |
3599 | ||
3600 | closest-only Indicates that, for ICP_OP_MISS replies, we'll only forward | |
3601 | CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes. | |
3602 | ||
3603 | background-ping | |
3604 | To only send ICP queries to this neighbor infrequently. | |
3605 | This is used to keep the neighbor round trip time updated | |
3606 | and is usually used in conjunction with weighted-round-robin. | |
3607 | ||
3608 | ||
3609 | ==== HTCP OPTIONS ==== | |
3610 | ||
3611 | You MUST also set htcp_port and htcp_access explicitly when using these options. | |
3612 | The defaults will prevent peer traffic using HTCP. | |
3613 | ||
3614 | ||
3615 | htcp Send HTCP, instead of ICP, queries to the neighbor. | |
3616 | You probably also want to set the "icp-port" to 4827 | |
3617 | instead of 3130. This directive accepts a comma separated | |
3618 | list of options described below. | |
3619 | ||
3620 | htcp=oldsquid Send HTCP to old Squid versions (2.5 or earlier). | |
3621 | ||
3622 | htcp=no-clr Send HTCP to the neighbor but without | |
3623 | sending any CLR requests. This cannot be used with | |
3624 | only-clr. | |
3625 | ||
3626 | htcp=only-clr Send HTCP to the neighbor but ONLY CLR requests. | |
3627 | This cannot be used with no-clr. | |
3628 | ||
3629 | htcp=no-purge-clr | |
3630 | Send HTCP to the neighbor including CLRs but only when | |
3631 | they do not result from PURGE requests. | |
3632 | ||
3633 | htcp=forward-clr | |
3634 | Forward any HTCP CLR requests this proxy receives to the peer. | |
3635 | ||
3636 | ||
3637 | ==== PEER SELECTION METHODS ==== | |
3638 | ||
3639 | The default peer selection method is ICP, with the first responding peer | |
3640 | being used as source. These options can be used for better load balancing. | |
3641 | ||
3642 | ||
3643 | default This is a parent cache which can be used as a "last-resort" | |
3644 | if a peer cannot be located by any of the peer-selection methods. | |
3645 | If specified more than once, only the first is used. | |
3646 | ||
3647 | round-robin Load-Balance parents which should be used in a round-robin | |
3648 | fashion in the absence of any ICP queries. | |
3649 | weight=N can be used to add bias. | |
3650 | ||
3651 | weighted-round-robin | |
3652 | Load-Balance parents which should be used in a round-robin | |
3653 | fashion with the frequency of each parent being based on the | |
3654 | round trip time. Closer parents are used more often. | |
3655 | Usually used for background-ping parents. | |
3656 | weight=N can be used to add bias. | |
3657 | ||
3658 | carp Load-Balance parents which should be used as a CARP array. | |
3659 | The requests will be distributed among the parents based on the | |
3660 | CARP load balancing hash function based on their weight. | |
3661 | ||
3662 | userhash Load-balance parents based on the client proxy_auth username. | |
3663 | ||
3664 | sourcehash Load-balance parents based on the client source IP. | |
3665 | ||
3666 | multicast-siblings | |
3667 | To be used only for cache peers of type "multicast". | |
3668 | ALL members of this multicast group have "sibling" | |
3669 | relationship with it, not "parent". This is to a multicast | |
3670 | group when the requested object would be fetched only from | |
3671 | a "parent" cache, anyway. It's useful, e.g., when | |
3672 | configuring a pool of redundant Squid proxies, being | |
3673 | members of the same multicast group. | |
3674 | ||
3675 | ||
3676 | ==== PEER SELECTION OPTIONS ==== | |
3677 | ||
3678 | weight=N use to affect the selection of a peer during any weighted | |
3679 | peer-selection mechanisms. | |
3680 | The weight must be an integer; default is 1, | |
3681 | larger weights are favored more. | |
3682 | This option does not affect parent selection if a peering | |
3683 | protocol is not in use. | |
3684 | ||
3685 | basetime=N Specify a base amount to be subtracted from round trip | |
3686 | times of parents. | |
3687 | It is subtracted before division by weight in calculating | |
3688 | which parent to fectch from. If the rtt is less than the | |
3689 | base time the rtt is set to a minimal value. | |
3690 | ||
3691 | ttl=N Specify a TTL to use when sending multicast ICP queries | |
3692 | to this address. | |
3693 | Only useful when sending to a multicast group. | |
3694 | Because we don't accept ICP replies from random | |
3695 | hosts, you must configure other group members as | |
3696 | peers with the 'multicast-responder' option. | |
3697 | ||
3698 | no-delay To prevent access to this neighbor from influencing the | |
3699 | delay pools. | |
3700 | ||
3701 | digest-url=URL Tell Squid to fetch the cache digest (if digests are | |
3702 | enabled) for this host from the specified URL rather | |
3703 | than the Squid default location. | |
3704 | ||
3705 | ||
3706 | ==== CARP OPTIONS ==== | |
3707 | ||
3708 | carp-key=key-specification | |
3709 | use a different key than the full URL to hash against the peer. | |
3710 | the key-specification is a comma-separated list of the keywords | |
3711 | scheme, host, port, path, params | |
3712 | Order is not important. | |
3713 | ||
3714 | ==== ACCELERATOR / REVERSE-PROXY OPTIONS ==== | |
3715 | ||
3716 | originserver Causes this parent to be contacted as an origin server. | |
3717 | Meant to be used in accelerator setups when the peer | |
3718 | is a web server. | |
3719 | ||
3720 | forceddomain=name | |
3721 | Set the Host header of requests forwarded to this peer. | |
3722 | Useful in accelerator setups where the server (peer) | |
3723 | expects a certain domain name but clients may request | |
3724 | others. ie example.com or www.example.com | |
3725 | ||
3726 | no-digest Disable request of cache digests. | |
3727 | ||
3728 | no-netdb-exchange | |
3729 | Disables requesting ICMP RTT database (NetDB). | |
3730 | ||
3731 | ||
3732 | ==== AUTHENTICATION OPTIONS ==== | |
3733 | ||
3734 | login=user:password | |
3735 | If this is a personal/workgroup proxy and your parent | |
3736 | requires proxy authentication. | |
3737 | ||
3738 | Note: The string can include URL escapes (i.e. %20 for | |
3739 | spaces). This also means % must be written as %%. | |
3740 | ||
3741 | login=PASSTHRU | |
3742 | Send login details received from client to this peer. | |
3743 | Both Proxy- and WWW-Authorization headers are passed | |
3744 | without alteration to the peer. | |
3745 | Authentication is not required by Squid for this to work. | |
3746 | ||
3747 | Note: This will pass any form of authentication but | |
3748 | only Basic auth will work through a proxy unless the | |
3749 | connection-auth options are also used. | |
3750 | ||
3751 | login=PASS Send login details received from client to this peer. | |
3752 | Authentication is not required by this option. | |
3753 | ||
3754 | If there are no client-provided authentication headers | |
3755 | to pass on, but username and password are available | |
3756 | from an external ACL user= and password= result tags | |
3757 | they may be sent instead. | |
3758 | ||
3759 | Note: To combine this with proxy_auth both proxies must | |
3760 | share the same user database as HTTP only allows for | |
3761 | a single login (one for proxy, one for origin server). | |
3762 | Also be warned this will expose your users proxy | |
3763 | password to the peer. USE WITH CAUTION | |
3764 | ||
3765 | login=*:password | |
3766 | Send the username to the upstream cache, but with a | |
3767 | fixed password. This is meant to be used when the peer | |
3768 | is in another administrative domain, but it is still | |
3769 | needed to identify each user. | |
3770 | The star can optionally be followed by some extra | |
3771 | information which is added to the username. This can | |
3772 | be used to identify this proxy to the peer, similar to | |
3773 | the login=username:password option above. | |
3774 | ||
3775 | login=NEGOTIATE | |
3776 | If this is a personal/workgroup proxy and your parent | |
3777 | requires a secure proxy authentication. | |
3778 | The first principal from the default keytab or defined by | |
3779 | the environment variable KRB5_KTNAME will be used. | |
3780 | ||
3781 | WARNING: The connection may transmit requests from multiple | |
3782 | clients. Negotiate often assumes end-to-end authentication | |
3783 | and a single-client. Which is not strictly true here. | |
3784 | ||
3785 | login=NEGOTIATE:principal_name | |
3786 | If this is a personal/workgroup proxy and your parent | |
3787 | requires a secure proxy authentication. | |
3788 | The principal principal_name from the default keytab or | |
3789 | defined by the environment variable KRB5_KTNAME will be | |
3790 | used. | |
3791 | ||
3792 | WARNING: The connection may transmit requests from multiple | |
3793 | clients. Negotiate often assumes end-to-end authentication | |
3794 | and a single-client. Which is not strictly true here. | |
3795 | ||
3796 | connection-auth=on|off | |
3797 | Tell Squid that this peer does or not support Microsoft | |
3798 | connection oriented authentication, and any such | |
3799 | challenges received from there should be ignored. | |
3800 | Default is auto to automatically determine the status | |
3801 | of the peer. | |
3802 | ||
3803 | auth-no-keytab | |
3804 | Do not use a keytab to authenticate to a peer when | |
3805 | login=NEGOTIATE is specified. Let the GSSAPI | |
3806 | implementation determine which already existing | |
3807 | credentials cache to use instead. | |
3808 | ||
3809 | ||
3810 | ==== SSL / HTTPS / TLS OPTIONS ==== | |
3811 | ||
3812 | tls Encrypt connections to this peer with TLS. | |
3813 | ||
3814 | sslcert=/path/to/ssl/certificate | |
3815 | A client X.509 certificate to use when connecting to | |
3816 | this peer. | |
3817 | ||
3818 | sslkey=/path/to/ssl/key | |
3819 | The private key corresponding to sslcert above. | |
3820 | ||
3821 | If sslkey= is not specified sslcert= is assumed to | |
3822 | reference a PEM file containing both the certificate | |
3823 | and private key. | |
3824 | ||
3825 | sslcipher=... The list of valid SSL ciphers to use when connecting | |
3826 | to this peer. | |
3827 | ||
3828 | tls-min-version=1.N | |
3829 | The minimum TLS protocol version to permit. To control | |
3830 | SSLv3 use the tls-options= parameter. | |
3831 | Supported Values: 1.0 (default), 1.1, 1.2 | |
3832 | ||
3833 | tls-options=... Specify various TLS implementation options. | |
3834 | ||
3835 | OpenSSL options most important are: | |
3836 | ||
3837 | NO_SSLv3 Disallow the use of SSLv3 | |
3838 | ||
3839 | SINGLE_DH_USE | |
3840 | Always create a new key when using | |
3841 | temporary/ephemeral DH key exchanges | |
3842 | ||
3843 | NO_TICKET | |
3844 | Disable use of RFC5077 session tickets. | |
3845 | Some servers may have problems | |
3846 | understanding the TLS extension due | |
3847 | to ambiguous specification in RFC4507. | |
3848 | ||
3849 | ALL Enable various bug workarounds | |
3850 | suggested as "harmless" by OpenSSL | |
3851 | Be warned that this reduces SSL/TLS | |
3852 | strength to some attacks. | |
3853 | ||
3854 | See the OpenSSL SSL_CTX_set_options documentation for a | |
3855 | more complete list. | |
3856 | ||
3857 | GnuTLS options most important are: | |
3858 | ||
3859 | %NO_TICKETS | |
3860 | Disable use of RFC5077 session tickets. | |
3861 | Some servers may have problems | |
3862 | understanding the TLS extension due | |
3863 | to ambiguous specification in RFC4507. | |
3864 | ||
3865 | See the GnuTLS Priority Strings documentation | |
3866 | for a more complete list. | |
3867 | http://www.gnutls.org/manual/gnutls.html#Priority-Strings | |
3868 | ||
3869 | tls-cafile= PEM file containing CA certificates to use when verifying | |
3870 | the peer certificate. May be repeated to load multiple files. | |
3871 | ||
3872 | sslcapath=... A directory containing additional CA certificates to | |
3873 | use when verifying the peer certificate. | |
3874 | Requires OpenSSL or LibreSSL. | |
3875 | ||
3876 | sslcrlfile=... A certificate revocation list file to use when | |
3877 | verifying the peer certificate. | |
3878 | ||
3879 | sslflags=... Specify various flags modifying the SSL implementation: | |
3880 | ||
3881 | DONT_VERIFY_PEER | |
3882 | Accept certificates even if they fail to | |
3883 | verify. | |
3884 | ||
3885 | DONT_VERIFY_DOMAIN | |
3886 | Don't verify the peer certificate | |
3887 | matches the server name | |
3888 | ||
3889 | ssldomain= The peer name as advertised in it's certificate. | |
3890 | Used for verifying the correctness of the received peer | |
3891 | certificate. If not specified the peer hostname will be | |
3892 | used. | |
3893 | ||
3894 | front-end-https[=off|on|auto] | |
3895 | Enable the "Front-End-Https: On" header needed when | |
3896 | using Squid as a SSL frontend in front of Microsoft OWA. | |
3897 | See MS KB document Q307347 for details on this header. | |
3898 | If set to auto the header will only be added if the | |
3899 | request is forwarded as a https:// URL. | |
3900 | ||
3901 | tls-default-ca[=off] | |
3902 | Whether to use the system Trusted CAs. Default is ON. | |
3903 | ||
3904 | tls-no-npn Do not use the TLS NPN extension to advertise HTTP/1.1. | |
3905 | ||
3906 | ==== GENERAL OPTIONS ==== | |
3907 | ||
3908 | connect-timeout=N | |
3909 | A peer-specific connect timeout. | |
3910 | Also see the peer_connect_timeout directive. | |
3911 | ||
3912 | connect-fail-limit=N | |
3913 | How many times connecting to a peer must fail before | |
3914 | it is marked as down. Standby connection failures | |
3915 | count towards this limit. Default is 10. | |
3916 | ||
3917 | allow-miss Disable Squid's use of only-if-cached when forwarding | |
3918 | requests to siblings. This is primarily useful when | |
3919 | icp_hit_stale is used by the sibling. Excessive use | |
3920 | of this option may result in forwarding loops. One way | |
3921 | to prevent peering loops when using this option, is to | |
3922 | deny cache peer usage on requests from a peer: | |
3923 | acl fromPeer ... | |
3924 | cache_peer_access peerName deny fromPeer | |
3925 | ||
3926 | max-conn=N Limit the number of concurrent connections the Squid | |
3927 | may open to this peer, including already opened idle | |
3928 | and standby connections. There is no peer-specific | |
3929 | connection limit by default. | |
3930 | ||
3931 | A peer exceeding the limit is not used for new | |
3932 | requests unless a standby connection is available. | |
3933 | ||
3934 | max-conn currently works poorly with idle persistent | |
3935 | connections: When a peer reaches its max-conn limit, | |
3936 | and there are idle persistent connections to the peer, | |
3937 | the peer may not be selected because the limiting code | |
3938 | does not know whether Squid can reuse those idle | |
3939 | connections. | |
3940 | ||
3941 | standby=N Maintain a pool of N "hot standby" connections to an | |
3942 | UP peer, available for requests when no idle | |
3943 | persistent connection is available (or safe) to use. | |
3944 | By default and with zero N, no such pool is maintained. | |
3945 | N must not exceed the max-conn limit (if any). | |
3946 | ||
3947 | At start or after reconfiguration, Squid opens new TCP | |
3948 | standby connections until there are N connections | |
3949 | available and then replenishes the standby pool as | |
3950 | opened connections are used up for requests. A used | |
3951 | connection never goes back to the standby pool, but | |
3952 | may go to the regular idle persistent connection pool | |
3953 | shared by all peers and origin servers. | |
3954 | ||
3955 | Squid never opens multiple new standby connections | |
3956 | concurrently. This one-at-a-time approach minimizes | |
3957 | flooding-like effect on peers. Furthermore, just a few | |
3958 | standby connections should be sufficient in most cases | |
3959 | to supply most new requests with a ready-to-use | |
3960 | connection. | |
3961 | ||
3962 | Standby connections obey server_idle_pconn_timeout. | |
3963 | For the feature to work as intended, the peer must be | |
3964 | configured to accept and keep them open longer than | |
3965 | the idle timeout at the connecting Squid, to minimize | |
3966 | race conditions typical to idle used persistent | |
3967 | connections. Default request_timeout and | |
3968 | server_idle_pconn_timeout values ensure such a | |
3969 | configuration. | |
3970 | ||
3971 | name=xxx Unique name for the peer. | |
3972 | Required if you have multiple cache_peers with the same hostname. | |
3973 | Defaults to cache_peer hostname when not explicitly specified. | |
3974 | ||
3975 | Other directives (e.g., cache_peer_access), cache manager reports, | |
3976 | and cache.log messages use this name to refer to this cache_peer. | |
3977 | ||
3978 | The cache_peer name value affects hashing-based peer selection | |
3979 | methods (e.g., carp and sourcehash). | |
3980 | ||
3981 | Can be used by outgoing access controls through the | |
3982 | peername ACL type. | |
3983 | ||
3984 | The name value preserves configured spelling, but name uniqueness | |
3985 | checks and name-based search are case-insensitive. | |
3986 | ||
3987 | no-tproxy Do not use the client-spoof TPROXY support when forwarding | |
3988 | requests to this peer. Use normal address selection instead. | |
3989 | This overrides the spoof_client_ip ACL. | |
3990 | ||
3991 | proxy-only objects fetched from the peer will not be stored locally. | |
3992 | ||
3993 | DOC_END | |
3994 | ||
3995 | NAME: cache_peer_access | |
3996 | TYPE: peer_access | |
3997 | DEFAULT: none | |
3998 | DEFAULT_DOC: No peer usage restrictions. | |
3999 | LOC: none | |
4000 | DOC_START | |
4001 | Restricts usage of cache_peer proxies. | |
4002 | ||
4003 | Usage: | |
4004 | cache_peer_access peer-name allow|deny [!]aclname ... | |
4005 | ||
4006 | For the required peer-name parameter, use either the value of the | |
4007 | cache_peer name=value parameter or, if name=value is missing, the | |
4008 | cache_peer hostname parameter. | |
4009 | ||
4010 | This directive narrows down the selection of peering candidates, but | |
4011 | does not determine the order in which the selected candidates are | |
4012 | contacted. That order is determined by the peer selection algorithms | |
4013 | (see PEER SELECTION sections in the cache_peer documentation). | |
4014 | ||
4015 | If a deny rule matches, the corresponding peer will not be contacted | |
4016 | for the current transaction -- Squid will not send ICP queries and | |
4017 | will not forward HTTP requests to that peer. An allow match leaves | |
4018 | the corresponding peer in the selection. The first match for a given | |
4019 | peer wins for that peer. | |
4020 | ||
4021 | The relative order of cache_peer_access directives for the same peer | |
4022 | matters. The relative order of any two cache_peer_access directives | |
4023 | for different peers does not matter. To ease interpretation, it is a | |
4024 | good idea to group cache_peer_access directives for the same peer | |
4025 | together. | |
4026 | ||
4027 | A single cache_peer_access directive may be evaluated multiple times | |
4028 | for a given transaction because individual peer selection algorithms | |
4029 | may check it independently from each other. These redundant checks | |
4030 | may be optimized away in future Squid versions. | |
4031 | ||
4032 | This clause only supports fast acl types. | |
4033 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
4034 | ||
4035 | DOC_END | |
4036 | ||
4037 | NAME: neighbor_type_domain | |
4038 | TYPE: hostdomaintype | |
4039 | DEFAULT: none | |
4040 | DEFAULT_DOC: The peer type from cache_peer directive is used for all requests to that peer. | |
4041 | LOC: none | |
4042 | DOC_START | |
4043 | Modify the cache_peer neighbor type when passing requests | |
4044 | about specific domains to the peer. | |
4045 | ||
4046 | Usage: | |
4047 | neighbor_type_domain peer-name parent|sibling domain... | |
4048 | ||
4049 | For the required peer-name parameter, use either the value of the | |
4050 | cache_peer name=value parameter or, if name=value is missing, the | |
4051 | cache_peer hostname parameter. | |
4052 | ||
4053 | For example: | |
4054 | cache_peer foo.example.com parent 3128 3130 | |
4055 | neighbor_type_domain foo.example.com sibling .au .de | |
4056 | ||
4057 | The above configuration treats all requests to foo.example.com as a | |
4058 | parent proxy unless the request is for a .au or .de ccTLD domain name. | |
4059 | DOC_END | |
4060 | ||
4061 | NAME: dead_peer_timeout | |
4062 | COMMENT: (seconds) | |
4063 | DEFAULT: 10 seconds | |
4064 | TYPE: time_t | |
4065 | LOC: Config.Timeout.deadPeer | |
4066 | DOC_START | |
4067 | This controls how long Squid waits to declare a peer cache | |
4068 | as "dead." If there are no ICP replies received in this | |
4069 | amount of time, Squid will declare the peer dead and not | |
4070 | expect to receive any further ICP replies. However, it | |
4071 | continues to send ICP queries, and will mark the peer as | |
4072 | alive upon receipt of the first subsequent ICP reply. | |
4073 | ||
4074 | This timeout also affects when Squid expects to receive ICP | |
4075 | replies from peers. If more than 'dead_peer' seconds have | |
4076 | passed since the last ICP reply was received, Squid will not | |
4077 | expect to receive an ICP reply on the next query. Thus, if | |
4078 | your time between requests is greater than this timeout, you | |
4079 | will see a lot of requests sent DIRECT to origin servers | |
4080 | instead of to your parents. | |
4081 | DOC_END | |
4082 | ||
4083 | NAME: forward_max_tries | |
4084 | DEFAULT: 25 | |
4085 | TYPE: int | |
4086 | LOC: Config.forward_max_tries | |
4087 | DOC_START | |
4088 | Limits the number of attempts to forward the request. | |
4089 | ||
4090 | For the purpose of this limit, Squid counts all high-level request | |
4091 | forwarding attempts, including any same-destination retries after | |
4092 | certain persistent connection failures and any attempts to use a | |
4093 | different peer. However, these low-level attempts are not counted: | |
4094 | * connection reopening attempts (enabled using connect_retries) | |
4095 | * unfinished Happy Eyeballs connection attempts (prevented by setting | |
4096 | happy_eyeballs_connect_limit to 0) | |
4097 | ||
4098 | See also: forward_timeout, connect_retries, and %request_attempts. | |
4099 | DOC_END | |
4100 | ||
4101 | COMMENT_START | |
4102 | MEMORY CACHE OPTIONS | |
4103 | ----------------------------------------------------------------------------- | |
4104 | COMMENT_END | |
4105 | ||
4106 | NAME: cache_mem | |
4107 | COMMENT: (bytes) | |
4108 | TYPE: b_size_t | |
4109 | DEFAULT: 256 MB | |
4110 | LOC: Config.memMaxSize | |
4111 | DOC_START | |
4112 | NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE. | |
4113 | IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL | |
4114 | USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER | |
4115 | THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS. | |
4116 | ||
4117 | 'cache_mem' specifies the ideal amount of memory to be used | |
4118 | for: | |
4119 | * In-Transit objects | |
4120 | * Hot Objects | |
4121 | * Negative-Cached objects | |
4122 | ||
4123 | Data for these objects are stored in 4 KB blocks. This | |
4124 | parameter specifies the ideal upper limit on the total size of | |
4125 | 4 KB blocks allocated. In-Transit objects take the highest | |
4126 | priority. | |
4127 | ||
4128 | In-transit objects have priority over the others. When | |
4129 | additional space is needed for incoming data, negative-cached | |
4130 | and hot objects will be released. In other words, the | |
4131 | negative-cached and hot objects will fill up any unused space | |
4132 | not needed for in-transit objects. | |
4133 | ||
4134 | If circumstances require, this limit will be exceeded. | |
4135 | Specifically, if your incoming request rate requires more than | |
4136 | 'cache_mem' of memory to hold in-transit objects, Squid will | |
4137 | exceed this limit to satisfy the new requests. When the load | |
4138 | decreases, blocks will be freed until the high-water mark is | |
4139 | reached. Thereafter, blocks will be used to store hot | |
4140 | objects. | |
4141 | ||
4142 | If shared memory caching is enabled, Squid does not use the shared | |
4143 | cache space for in-transit objects, but they still consume as much | |
4144 | local memory as they need. For more details about the shared memory | |
4145 | cache, see memory_cache_shared. | |
4146 | DOC_END | |
4147 | ||
4148 | NAME: maximum_object_size_in_memory | |
4149 | COMMENT: (bytes) | |
4150 | TYPE: b_size_t | |
4151 | DEFAULT: 512 KB | |
4152 | LOC: Config.Store.maxInMemObjSize | |
4153 | DOC_START | |
4154 | Objects greater than this size will not be attempted to kept in | |
4155 | the memory cache. This should be set high enough to keep objects | |
4156 | accessed frequently in memory to improve performance whilst low | |
4157 | enough to keep larger objects from hoarding cache_mem. | |
4158 | DOC_END | |
4159 | ||
4160 | NAME: memory_cache_shared | |
4161 | COMMENT: on|off | |
4162 | TYPE: YesNoNone | |
4163 | LOC: Config.memShared | |
4164 | DEFAULT: none | |
4165 | DEFAULT_DOC: "on" where supported if doing memory caching with multiple SMP workers. | |
4166 | DOC_START | |
4167 | Controls whether the memory cache is shared among SMP workers. | |
4168 | ||
4169 | The shared memory cache is meant to occupy cache_mem bytes and replace | |
4170 | the non-shared memory cache, although some entities may still be | |
4171 | cached locally by workers for now (e.g., internal and in-transit | |
4172 | objects may be served from a local memory cache even if shared memory | |
4173 | caching is enabled). | |
4174 | ||
4175 | By default, the memory cache is shared if and only if all of the | |
4176 | following conditions are satisfied: Squid runs in SMP mode with | |
4177 | multiple workers, cache_mem is positive, and Squid environment | |
4178 | supports required IPC primitives (e.g., POSIX shared memory segments | |
4179 | and GCC-style atomic operations). | |
4180 | ||
4181 | To avoid blocking locks, shared memory uses opportunistic algorithms | |
4182 | that do not guarantee that every cachable entity that could have been | |
4183 | shared among SMP workers will actually be shared. | |
4184 | DOC_END | |
4185 | ||
4186 | NAME: memory_cache_mode | |
4187 | TYPE: memcachemode | |
4188 | LOC: Config | |
4189 | DEFAULT: always | |
4190 | DEFAULT_DOC: Keep the most recently fetched objects in memory | |
4191 | DOC_START | |
4192 | Controls which objects to keep in the memory cache (cache_mem) | |
4193 | ||
4194 | always Keep most recently fetched objects in memory (default) | |
4195 | ||
4196 | disk Only disk cache hits are kept in memory, which means | |
4197 | an object must first be cached on disk and then hit | |
4198 | a second time before cached in memory. | |
4199 | ||
4200 | network Only objects fetched from network is kept in memory | |
4201 | DOC_END | |
4202 | ||
4203 | NAME: memory_replacement_policy | |
4204 | TYPE: removalpolicy | |
4205 | LOC: Config.memPolicy | |
4206 | DEFAULT: lru | |
4207 | DOC_START | |
4208 | The memory replacement policy parameter determines which | |
4209 | objects are purged from memory when memory space is needed. | |
4210 | ||
4211 | See cache_replacement_policy for details on algorithms. | |
4212 | DOC_END | |
4213 | ||
4214 | COMMENT_START | |
4215 | DISK CACHE OPTIONS | |
4216 | ----------------------------------------------------------------------------- | |
4217 | COMMENT_END | |
4218 | ||
4219 | NAME: cache_replacement_policy | |
4220 | TYPE: removalpolicy | |
4221 | LOC: Config.replPolicy | |
4222 | DEFAULT: lru | |
4223 | DOC_START | |
4224 | The cache replacement policy parameter determines which | |
4225 | objects are evicted (replaced) when disk space is needed. | |
4226 | ||
4227 | lru : Squid's original list based LRU policy | |
4228 | heap GDSF : Greedy-Dual Size Frequency | |
4229 | heap LFUDA: Least Frequently Used with Dynamic Aging | |
4230 | heap LRU : LRU policy implemented using a heap | |
4231 | ||
4232 | Applies to any cache_dir lines listed below this directive. | |
4233 | ||
4234 | The LRU policies keeps recently referenced objects. | |
4235 | ||
4236 | The heap GDSF policy optimizes object hit rate by keeping smaller | |
4237 | popular objects in cache so it has a better chance of getting a | |
4238 | hit. It achieves a lower byte hit rate than LFUDA though since | |
4239 | it evicts larger (possibly popular) objects. | |
4240 | ||
4241 | The heap LFUDA policy keeps popular objects in cache regardless of | |
4242 | their size and thus optimizes byte hit rate at the expense of | |
4243 | hit rate since one large, popular object will prevent many | |
4244 | smaller, slightly less popular objects from being cached. | |
4245 | ||
4246 | Both policies utilize a dynamic aging mechanism that prevents | |
4247 | cache pollution that can otherwise occur with frequency-based | |
4248 | replacement policies. | |
4249 | ||
4250 | NOTE: if using the LFUDA replacement policy you should increase | |
4251 | the value of maximum_object_size above its default of 4 MB to | |
4252 | to maximize the potential byte hit rate improvement of LFUDA. | |
4253 | ||
4254 | For more information about the GDSF and LFUDA cache replacement | |
4255 | policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html | |
4256 | and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html. | |
4257 | DOC_END | |
4258 | ||
4259 | NAME: minimum_object_size | |
4260 | COMMENT: (bytes) | |
4261 | TYPE: b_int64_t | |
4262 | DEFAULT: 0 KB | |
4263 | DEFAULT_DOC: no limit | |
4264 | LOC: Config.Store.minObjectSize | |
4265 | DOC_START | |
4266 | Objects smaller than this size will NOT be saved on disk. The | |
4267 | value is specified in bytes, and the default is 0 KB, which | |
4268 | means all responses can be stored. | |
4269 | DOC_END | |
4270 | ||
4271 | NAME: maximum_object_size | |
4272 | COMMENT: (bytes) | |
4273 | TYPE: b_int64_t | |
4274 | DEFAULT: 4 MB | |
4275 | LOC: Config.Store.maxObjectSize | |
4276 | DOC_START | |
4277 | Set the default value for max-size parameter on any cache_dir. | |
4278 | The value is specified in bytes, and the default is 4 MB. | |
4279 | ||
4280 | If you wish to get a high BYTES hit ratio, you should probably | |
4281 | increase this (one 32 MB object hit counts for 3200 10KB | |
4282 | hits). | |
4283 | ||
4284 | If you wish to increase hit ratio more than you want to | |
4285 | save bandwidth you should leave this low. | |
4286 | ||
4287 | NOTE: if using the LFUDA replacement policy you should increase | |
4288 | this value to maximize the byte hit rate improvement of LFUDA! | |
4289 | See cache_replacement_policy for a discussion of this policy. | |
4290 | DOC_END | |
4291 | ||
4292 | NAME: cache_dir | |
4293 | TYPE: cachedir | |
4294 | DEFAULT: none | |
4295 | DEFAULT_DOC: No disk cache. Store cache objects only in memory. | |
4296 | LOC: Config.cacheSwap | |
4297 | DOC_START | |
4298 | Format: | |
4299 | cache_dir Type Directory-Name Fs-specific-data [options] | |
4300 | ||
4301 | You can specify multiple cache_dir lines to spread the | |
4302 | cache among different disk partitions. | |
4303 | ||
4304 | Type specifies the kind of storage system to use. Only "ufs" | |
4305 | is built by default. To enable any of the other storage systems | |
4306 | see the --enable-storeio configure option. | |
4307 | ||
4308 | 'Directory' is a top-level directory where cache swap | |
4309 | files will be stored. If you want to use an entire disk | |
4310 | for caching, this can be the mount-point directory. | |
4311 | The directory must exist and be writable by the Squid | |
4312 | process. Squid will NOT create this directory for you. | |
4313 | ||
4314 | Rock is currently the only SMP-aware cache_dir type. Using other | |
4315 | store types in configurations with multiple workers is not | |
4316 | supported and may lead to HTTP violations or undefined behavior, | |
4317 | even when each such cache_dir is given a dedicated worker using | |
4318 | configuration conditionals. | |
4319 | ||
4320 | ||
4321 | ==== The ufs store type ==== | |
4322 | ||
4323 | "ufs" is the old well-known Squid storage format that has always | |
4324 | been there. | |
4325 | ||
4326 | Usage: | |
4327 | cache_dir ufs Directory-Name Mbytes L1 L2 [options] | |
4328 | ||
4329 | 'Mbytes' is the amount of disk space (MB) to use under this | |
4330 | directory. The default is 100 MB. Change this to suit your | |
4331 | configuration. Do NOT put the size of your disk drive here. | |
4332 | Instead, if you want Squid to use the entire disk drive, | |
4333 | subtract 20% and use that value. | |
4334 | ||
4335 | 'L1' is the number of first-level subdirectories which | |
4336 | will be created under the 'Directory'. The default is 16. | |
4337 | ||
4338 | 'L2' is the number of second-level subdirectories which | |
4339 | will be created under each first-level directory. The default | |
4340 | is 256. | |
4341 | ||
4342 | ||
4343 | ==== The aufs store type ==== | |
4344 | ||
4345 | "aufs" uses the same storage format as "ufs", utilizing | |
4346 | POSIX-threads to avoid blocking the main Squid process on | |
4347 | disk-I/O. This was formerly known in Squid as async-io. | |
4348 | ||
4349 | Usage: | |
4350 | cache_dir aufs Directory-Name Mbytes L1 L2 [options] | |
4351 | ||
4352 | see argument descriptions under ufs above | |
4353 | ||
4354 | ||
4355 | ==== The diskd store type ==== | |
4356 | ||
4357 | "diskd" uses the same storage format as "ufs", utilizing a | |
4358 | separate process to avoid blocking the main Squid process on | |
4359 | disk-I/O. | |
4360 | ||
4361 | Usage: | |
4362 | cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n] | |
4363 | ||
4364 | see argument descriptions under ufs above | |
4365 | ||
4366 | Q1 specifies the number of unacknowledged I/O requests when Squid | |
4367 | stops opening new files. If this many messages are in the queues, | |
4368 | Squid won't open new files. Default is 64 | |
4369 | ||
4370 | Q2 specifies the number of unacknowledged messages when Squid | |
4371 | starts blocking. If this many messages are in the queues, | |
4372 | Squid blocks until it receives some replies. Default is 72 | |
4373 | ||
4374 | When Q1 < Q2 (the default), the cache directory is optimized | |
4375 | for lower response time at the expense of a decrease in hit | |
4376 | ratio. If Q1 > Q2, the cache directory is optimized for | |
4377 | higher hit ratio at the expense of an increase in response | |
4378 | time. | |
4379 | ||
4380 | ||
4381 | ==== The rock store type ==== | |
4382 | ||
4383 | Usage: | |
4384 | cache_dir rock Directory-Name Mbytes [options] | |
4385 | ||
4386 | The Rock Store type is a database-style storage. All cached | |
4387 | entries are stored in a "database" file, using fixed-size slots. | |
4388 | A single entry occupies one or more slots. | |
4389 | ||
4390 | If possible, Squid using Rock Store creates a dedicated kid | |
4391 | process called "disker" to avoid blocking Squid worker(s) on disk | |
4392 | I/O. One disker kid is created for each rock cache_dir. Diskers | |
4393 | are created only when Squid, running in daemon mode, has support | |
4394 | for the IpcIo disk I/O module. | |
4395 | ||
4396 | swap-timeout=msec: Squid will not start writing a miss to or | |
4397 | reading a hit from disk if it estimates that the swap operation | |
4398 | will take more than the specified number of milliseconds. By | |
4399 | default and when set to zero, disables the disk I/O time limit | |
4400 | enforcement. Ignored when using blocking I/O module because | |
4401 | blocking synchronous I/O does not allow Squid to estimate the | |
4402 | expected swap wait time. | |
4403 | ||
4404 | max-swap-rate=swaps/sec: Artificially limits disk access using | |
4405 | the specified I/O rate limit. Swap out requests that | |
4406 | would cause the average I/O rate to exceed the limit are | |
4407 | delayed. Individual swap in requests (i.e., hits or reads) are | |
4408 | not delayed, but they do contribute to measured swap rate and | |
4409 | since they are placed in the same FIFO queue as swap out | |
4410 | requests, they may wait longer if max-swap-rate is smaller. | |
4411 | This is necessary on file systems that buffer "too | |
4412 | many" writes and then start blocking Squid and other processes | |
4413 | while committing those writes to disk. Usually used together | |
4414 | with swap-timeout to avoid excessive delays and queue overflows | |
4415 | when disk demand exceeds available disk "bandwidth". By default | |
4416 | and when set to zero, disables the disk I/O rate limit | |
4417 | enforcement. Currently supported by IpcIo module only. | |
4418 | ||
4419 | slot-size=bytes: The size of a database "record" used for | |
4420 | storing cached responses. A cached response occupies at least | |
4421 | one slot and all database I/O is done using individual slots so | |
4422 | increasing this parameter leads to more disk space waste while | |
4423 | decreasing it leads to more disk I/O overheads. Should be a | |
4424 | multiple of your operating system I/O page size. Defaults to | |
4425 | 16KBytes. A housekeeping header is stored with each slot and | |
4426 | smaller slot-sizes will be rejected. The header is smaller than | |
4427 | 100 bytes. | |
4428 | ||
4429 | ||
4430 | ==== COMMON OPTIONS ==== | |
4431 | ||
4432 | no-store no new objects should be stored to this cache_dir. | |
4433 | ||
4434 | min-size=n the minimum object size in bytes this cache_dir | |
4435 | will accept. It's used to restrict a cache_dir | |
4436 | to only store large objects (e.g. AUFS) while | |
4437 | other stores are optimized for smaller objects | |
4438 | (e.g. Rock). | |
4439 | Defaults to 0. | |
4440 | ||
4441 | max-size=n the maximum object size in bytes this cache_dir | |
4442 | supports. | |
4443 | The value in maximum_object_size directive sets | |
4444 | the default unless more specific details are | |
4445 | available (ie a small store capacity). | |
4446 | ||
4447 | Note: To make optimal use of the max-size limits you should order | |
4448 | the cache_dir lines with the smallest max-size value first. | |
4449 | ||
4450 | CONFIG_START | |
4451 | ||
4452 | # Uncomment and adjust the following to add a disk cache directory. | |
4453 | #cache_dir ufs @DEFAULT_SWAP_DIR@ 100 16 256 | |
4454 | CONFIG_END | |
4455 | DOC_END | |
4456 | ||
4457 | NAME: store_dir_select_algorithm | |
4458 | TYPE: string | |
4459 | LOC: Config.store_dir_select_algorithm | |
4460 | DEFAULT: least-load | |
4461 | DOC_START | |
4462 | How Squid selects which cache_dir to use when the response | |
4463 | object will fit into more than one. | |
4464 | ||
4465 | Regardless of which algorithm is used the cache_dir min-size | |
4466 | and max-size parameters are obeyed. As such they can affect | |
4467 | the selection algorithm by limiting the set of considered | |
4468 | cache_dir. | |
4469 | ||
4470 | Algorithms: | |
4471 | ||
4472 | least-load | |
4473 | ||
4474 | This algorithm is suited to caches with similar cache_dir | |
4475 | sizes and disk speeds. | |
4476 | ||
4477 | The disk with the least I/O pending is selected. | |
4478 | When there are multiple disks with the same I/O load ranking | |
4479 | the cache_dir with most available capacity is selected. | |
4480 | ||
4481 | When a mix of cache_dir sizes are configured the faster disks | |
4482 | have a naturally lower I/O loading and larger disks have more | |
4483 | capacity. So space used to store objects and data throughput | |
4484 | may be very unbalanced towards larger disks. | |
4485 | ||
4486 | ||
4487 | round-robin | |
4488 | ||
4489 | This algorithm is suited to caches with unequal cache_dir | |
4490 | disk sizes. | |
4491 | ||
4492 | Each cache_dir is selected in a rotation. The next suitable | |
4493 | cache_dir is used. | |
4494 | ||
4495 | Available cache_dir capacity is only considered in relation | |
4496 | to whether the object will fit and meets the min-size and | |
4497 | max-size parameters. | |
4498 | ||
4499 | Disk I/O loading is only considered to prevent overload on slow | |
4500 | disks. This algorithm does not spread objects by size, so any | |
4501 | I/O loading per-disk may appear very unbalanced and volatile. | |
4502 | ||
4503 | If several cache_dirs use similar min-size, max-size, or other | |
4504 | limits to to reject certain responses, then do not group such | |
4505 | cache_dir lines together, to avoid round-robin selection bias | |
4506 | towards the first cache_dir after the group. Instead, interleave | |
4507 | cache_dir lines from different groups. For example: | |
4508 | ||
4509 | store_dir_select_algorithm round-robin | |
4510 | cache_dir rock /hdd1 ... min-size=100000 | |
4511 | cache_dir rock /ssd1 ... max-size=99999 | |
4512 | cache_dir rock /hdd2 ... min-size=100000 | |
4513 | cache_dir rock /ssd2 ... max-size=99999 | |
4514 | cache_dir rock /hdd3 ... min-size=100000 | |
4515 | cache_dir rock /ssd3 ... max-size=99999 | |
4516 | DOC_END | |
4517 | ||
4518 | NAME: paranoid_hit_validation | |
4519 | COMMENT: time-units-small | |
4520 | TYPE: time_nanoseconds | |
4521 | DEFAULT: 0 | |
4522 | DEFAULT_DOC: validation disabled | |
4523 | LOC: Config.paranoid_hit_validation | |
4524 | DOC_START | |
4525 | Controls whether Squid should perform paranoid validation of cache entry | |
4526 | metadata integrity every time a cache entry is hit. This low-level | |
4527 | validation should always succeed. Each failed validation results in a | |
4528 | cache miss, a BUG line reported to cache.log, and the invalid entry | |
4529 | marked as unusable (and eventually purged from the cache). | |
4530 | ||
4531 | Squid can only validate shared cache memory and rock cache_dir entries. | |
4532 | ||
4533 | * Zero (default) value means that the validation is disabled. | |
4534 | ||
4535 | * Positive values enable validation: | |
4536 | - values less than 1 day approximate the maximum time that Squid is allowed | |
4537 | to spend validating a single cache hit. | |
4538 | - values greater or equal to 1 day are considered as no limitation: | |
4539 | in this case all checks will be performed, regardless of how much time | |
4540 | they take. | |
4541 | ||
4542 | Hits are usually stored using 16KB slots (for rock, the size is | |
4543 | configurable via cache_dir slot-size). Larger hits require scanning more | |
4544 | slots and, hence, take more time. When validation is enabled, at least one | |
4545 | slot is always validated, regardless of the configured time limit. | |
4546 | ||
4547 | A worker process validating an entry cannot do anything else (i.e. the | |
4548 | validation is blocking). The validation overhead is environment dependent, | |
4549 | but developers have observed Squid spending 3-10 microseconds to check each | |
4550 | slot of a Rock or shared memory hit entry. If Squid cuts validation short | |
4551 | because it runs out of configured time, it treats the entry as valid. | |
4552 | ||
4553 | When hit validation is enabled, its statistics is included in Cache | |
4554 | Manager mgr:counters, mgr:5min, and mgr:60min reports. | |
4555 | DOC_END | |
4556 | ||
4557 | NAME: max_open_disk_fds | |
4558 | TYPE: int | |
4559 | LOC: Config.max_open_disk_fds | |
4560 | DEFAULT: 0 | |
4561 | DEFAULT_DOC: no limit | |
4562 | DOC_START | |
4563 | To avoid having disk as the I/O bottleneck Squid can optionally | |
4564 | bypass the on-disk cache if more than this amount of disk file | |
4565 | descriptors are open. | |
4566 | ||
4567 | A value of 0 indicates no limit. | |
4568 | DOC_END | |
4569 | ||
4570 | NAME: cache_swap_low | |
4571 | COMMENT: (percent, 0-100) | |
4572 | TYPE: int | |
4573 | DEFAULT: 90 | |
4574 | LOC: Config.Swap.lowWaterMark | |
4575 | DOC_START | |
4576 | The low-water mark for AUFS/UFS/diskd cache object eviction by | |
4577 | the cache_replacement_policy algorithm. | |
4578 | ||
4579 | Removal begins when the swap (disk) usage of a cache_dir is | |
4580 | above this low-water mark and attempts to maintain utilization | |
4581 | near the low-water mark. | |
4582 | ||
4583 | As swap utilization increases towards the high-water mark set | |
4584 | by cache_swap_high object eviction becomes more aggressive. | |
4585 | ||
4586 | The value difference in percentages between low- and high-water | |
4587 | marks represent an eviction rate of 300 objects per second and | |
4588 | the rate continues to scale in aggressiveness by multiples of | |
4589 | this above the high-water mark. | |
4590 | ||
4591 | Defaults are 90% and 95%. If you have a large cache, 5% could be | |
4592 | hundreds of MB. If this is the case you may wish to set these | |
4593 | numbers closer together. | |
4594 | ||
4595 | See also cache_swap_high and cache_replacement_policy | |
4596 | DOC_END | |
4597 | ||
4598 | NAME: cache_swap_high | |
4599 | COMMENT: (percent, 0-100) | |
4600 | TYPE: int | |
4601 | DEFAULT: 95 | |
4602 | LOC: Config.Swap.highWaterMark | |
4603 | DOC_START | |
4604 | The high-water mark for AUFS/UFS/diskd cache object eviction by | |
4605 | the cache_replacement_policy algorithm. | |
4606 | ||
4607 | Removal begins when the swap (disk) usage of a cache_dir is | |
4608 | above the low-water mark set by cache_swap_low and attempts to | |
4609 | maintain utilization near the low-water mark. | |
4610 | ||
4611 | As swap utilization increases towards this high-water mark object | |
4612 | eviction becomes more aggressive. | |
4613 | ||
4614 | The value difference in percentages between low- and high-water | |
4615 | marks represent an eviction rate of 300 objects per second and | |
4616 | the rate continues to scale in aggressiveness by multiples of | |
4617 | this above the high-water mark. | |
4618 | ||
4619 | Defaults are 90% and 95%. If you have a large cache, 5% could be | |
4620 | hundreds of MB. If this is the case you may wish to set these | |
4621 | numbers closer together. | |
4622 | ||
4623 | See also cache_swap_low and cache_replacement_policy | |
4624 | DOC_END | |
4625 | ||
4626 | COMMENT_START | |
4627 | LOGFILE OPTIONS | |
4628 | ----------------------------------------------------------------------------- | |
4629 | COMMENT_END | |
4630 | ||
4631 | NAME: logformat | |
4632 | TYPE: logformat | |
4633 | LOC: Log::TheConfig | |
4634 | DEFAULT: none | |
4635 | DEFAULT_DOC: The format definitions squid, common, combined, referrer, useragent are built in. | |
4636 | DOC_START | |
4637 | Usage: | |
4638 | ||
4639 | logformat <name> <format specification> | |
4640 | ||
4641 | Defines an access log format. | |
4642 | ||
4643 | The <format specification> is a string with embedded % format codes | |
4644 | ||
4645 | % format codes all follow the same basic structure where all | |
4646 | components but the formatcode are optional and usually unnecessary, | |
4647 | especially when dealing with common codes. | |
4648 | ||
4649 | % [encoding] [-] [[0]width] [{arg}] formatcode [{arg}] | |
4650 | ||
4651 | encoding escapes or otherwise protects "special" characters: | |
4652 | ||
4653 | " Quoted string encoding where quote(") and | |
4654 | backslash(\) characters are \-escaped while | |
4655 | CR, LF, and TAB characters are encoded as \r, | |
4656 | \n, and \t two-character sequences. | |
4657 | ||
4658 | [ Custom Squid encoding where percent(%), square | |
4659 | brackets([]), backslash(\) and characters with | |
4660 | codes outside of [32,126] range are %-encoded. | |
4661 | SP is not encoded. Used by log_mime_hdrs. | |
4662 | ||
4663 | # URL encoding (a.k.a. percent-encoding) where | |
4664 | all URL unsafe and control characters (per RFC | |
4665 | 1738) are %-encoded. | |
4666 | ||
4667 | / Shell-like encoding where quote(") and | |
4668 | backslash(\) characters are \-escaped while CR | |
4669 | and LF characters are encoded as \r and \n | |
4670 | two-character sequences. Values containing SP | |
4671 | character(s) are surrounded by quotes("). | |
4672 | ||
4673 | ' Raw/as-is encoding with no escaping/quoting. | |
4674 | ||
4675 | Default encoding: When no explicit encoding is | |
4676 | specified, each %code determines its own encoding. | |
4677 | Most %codes use raw/as-is encoding, but some codes use | |
4678 | a so called "pass-through URL encoding" where all URL | |
4679 | unsafe and control characters (per RFC 1738) are | |
4680 | %-encoded, but the percent character(%) is left as is. | |
4681 | ||
4682 | - left aligned | |
4683 | ||
4684 | width minimum and/or maximum field width: | |
4685 | [width_min][.width_max] | |
4686 | When minimum starts with 0, the field is zero-padded. | |
4687 | String values exceeding maximum width are truncated. | |
4688 | ||
4689 | {arg} argument such as header name etc. This field may be | |
4690 | placed before or after the token, but not both at once. | |
4691 | ||
4692 | Format codes: | |
4693 | ||
4694 | % a literal % character | |
4695 | ||
4696 | byte{value} Adds a single byte with the given value (e.g., %byte{10} | |
4697 | adds an ASCII LF character a.k.a. "new line" or "\n"). The value | |
4698 | parameter is required and must be a positive decimal integer not | |
4699 | exceeding 255. Zero-valued bytes (i.e. ASCII NUL characters) are | |
4700 | not yet supported. | |
4701 | ||
4702 | sn Unique sequence number per log line entry | |
4703 | err_code The ID of an error response served by Squid or | |
4704 | a similar internal error identifier. | |
4705 | ||
4706 | err_detail Additional err_code-dependent error information. Multiple | |
4707 | details are separated by the plus sign ('+'). Admins should not | |
4708 | rely on a particular detail listing order, the uniqueness of the | |
4709 | entries, or individual detail text stability. All those properties | |
4710 | depend on many unstable factors, including external libraries. | |
4711 | ||
4712 | note The annotation specified by the argument. Also | |
4713 | logs the adaptation meta headers set by the | |
4714 | adaptation_meta configuration parameter. | |
4715 | If no argument given all annotations logged. | |
4716 | The argument may include a separator to use with | |
4717 | annotation values: | |
4718 | name[:separator] | |
4719 | By default, multiple note values are separated with "," | |
4720 | and multiple notes are separated with "\r\n". | |
4721 | When logging named notes with %{name}note, the | |
4722 | explicitly configured separator is used between note | |
4723 | values. When logging all notes with %note, the | |
4724 | explicitly configured separator is used between | |
4725 | individual notes. There is currently no way to | |
4726 | specify both value and notes separators when logging | |
4727 | all notes with %note. | |
4728 | master_xaction The master transaction identifier is an unsigned | |
4729 | integer. These IDs are guaranteed to monotonically | |
4730 | increase within a single worker process lifetime, with | |
4731 | higher values corresponding to transactions that were | |
4732 | accepted or initiated later. Due to current implementation | |
4733 | deficiencies, some IDs are skipped (i.e. never logged). | |
4734 | Concurrent workers and restarted workers use similar, | |
4735 | overlapping sequences of master transaction IDs. | |
4736 | ||
4737 | Connection related format codes: | |
4738 | ||
4739 | >a Client source IP address | |
4740 | >A Client FQDN | |
4741 | >p Client source port | |
4742 | >eui Client source EUI (MAC address, EUI-48 or EUI-64 identifier) | |
4743 | >la Local IP address the client connected to | |
4744 | >lp Local port number the client connected to | |
4745 | >qos Client connection TOS/DSCP value set by Squid | |
4746 | >nfmark Client connection netfilter packet MARK set by Squid | |
4747 | ||
4748 | transport::>connection_id Identifies a transport connection | |
4749 | accepted by Squid (e.g., a connection carrying the | |
4750 | logged HTTP request). Currently, Squid only supports | |
4751 | TCP transport connections. | |
4752 | ||
4753 | The logged identifier is an unsigned integer. These | |
4754 | IDs are guaranteed to monotonically increase within a | |
4755 | single worker process lifetime, with higher values | |
4756 | corresponding to connections that were accepted later. | |
4757 | Many IDs are skipped (i.e. never logged). Concurrent | |
4758 | workers and restarted workers use similar, partially | |
4759 | overlapping sequences of IDs. | |
4760 | ||
4761 | la Local listening IP address the client connection was connected to. | |
4762 | lp Local listening port number the client connection was connected to. | |
4763 | ||
4764 | <a Server IP address of the last server or peer connection | |
4765 | <A Server FQDN or peer name | |
4766 | <p Server port number of the last server or peer connection | |
4767 | <la Local IP address of the last server or peer connection | |
4768 | <lp Local port number of the last server or peer connection | |
4769 | <qos Server connection TOS/DSCP value set by Squid | |
4770 | <nfmark Server connection netfilter packet MARK set by Squid | |
4771 | ||
4772 | >handshake Raw client handshake | |
4773 | Initial client bytes received by Squid on a newly | |
4774 | accepted TCP connection or inside a just established | |
4775 | CONNECT tunnel. Squid stops accumulating handshake | |
4776 | bytes as soon as the handshake parser succeeds or | |
4777 | fails (determining whether the client is using the | |
4778 | expected protocol). | |
4779 | ||
4780 | For HTTP clients, the handshake is the request line. | |
4781 | For TLS clients, the handshake consists of all TLS | |
4782 | records up to and including the TLS record that | |
4783 | contains the last byte of the first ClientHello | |
4784 | message. For clients using an unsupported protocol, | |
4785 | this field contains the bytes received by Squid at the | |
4786 | time of the handshake parsing failure. | |
4787 | ||
4788 | See the on_unsupported_protocol directive for more | |
4789 | information on Squid handshake traffic expectations. | |
4790 | ||
4791 | Current support is limited to these contexts: | |
4792 | - http_port connections, but only when the | |
4793 | on_unsupported_protocol directive is in use. | |
4794 | - https_port connections (and CONNECT tunnels) that | |
4795 | are subject to the ssl_bump peek or stare action. | |
4796 | ||
4797 | To protect binary handshake data, this field is always | |
4798 | base64-encoded (RFC 4648 Section 4). If logformat | |
4799 | field encoding is configured, that encoding is applied | |
4800 | on top of base64. Otherwise, the computed base64 value | |
4801 | is recorded as is. | |
4802 | ||
4803 | Time related format codes: | |
4804 | ||
4805 | ts Seconds since epoch | |
4806 | tu subsecond time (milliseconds) | |
4807 | tl Local time. Optional strftime format argument | |
4808 | default %d/%b/%Y:%H:%M:%S %z | |
4809 | tg GMT time. Optional strftime format argument | |
4810 | default %d/%b/%Y:%H:%M:%S %z | |
4811 | tr Response time (milliseconds) | |
4812 | dt Total time spent making DNS lookups (milliseconds) | |
4813 | tS Approximate master transaction start time in | |
4814 | <full seconds since epoch>.<fractional seconds> format. | |
4815 | Currently, Squid considers the master transaction | |
4816 | started when a complete HTTP request header initiating | |
4817 | the transaction is received from the client. This is | |
4818 | the same value that Squid uses to calculate transaction | |
4819 | response time when logging %tr to access.log. Currently, | |
4820 | Squid uses millisecond resolution for %tS values, | |
4821 | similar to the default access.log "current time" field | |
4822 | (%ts.%03tu). | |
4823 | ||
4824 | busy_time Time spent in transaction-related code (nanoseconds) | |
4825 | This cumulative measurement excludes periods of time when the | |
4826 | transaction was waiting (e.g., for a server or helper response) | |
4827 | while Squid worked on other transactions or was engaged in | |
4828 | transaction-unrelated activities (e.g., generating a cache index). | |
4829 | In other words, this measurement represents the total amount of | |
4830 | physical time when Squid was busy working on this transaction. | |
4831 | ||
4832 | WARNING: This measurement relies on Squid transaction context | |
4833 | tracking features that currently have known context leak bugs and | |
4834 | coverage gaps. Until those features are fully implemented, logged | |
4835 | values may significantly understate or exaggerate actual times. | |
4836 | Do not use this measurement unless you know it works in your case. | |
4837 | ||
4838 | Access Control related format codes: | |
4839 | ||
4840 | et Tag returned by external acl | |
4841 | ea Log string returned by external acl | |
4842 | un User name (any available) | |
4843 | ul User name from authentication | |
4844 | ue User name from external acl helper | |
4845 | un A user name. Expands to the first available name | |
4846 | from the following list of information sources: | |
4847 | - authenticated user name, like %ul | |
4848 | - user name supplied by an external ACL, like %ue | |
4849 | - SSL client name, like %us | |
4850 | credentials Client credentials. The exact meaning depends on | |
4851 | the authentication scheme: For Basic authentication, | |
4852 | it is the password; for Digest, the realm sent by the | |
4853 | client; for NTLM and Negotiate, the client challenge | |
4854 | or client credentials prefixed with "YR " or "KK ". | |
4855 | ||
4856 | HTTP related format codes: | |
4857 | ||
4858 | REQUEST | |
4859 | ||
4860 | [http::]rm Request method (GET/POST etc) | |
4861 | [http::]>rm Request method from client | |
4862 | [http::]<rm Request method sent to server or peer | |
4863 | ||
4864 | [http::]ru Request URL received (or computed) and sanitized | |
4865 | ||
4866 | Logs request URI received from the client, a | |
4867 | request adaptation service, or a request | |
4868 | redirector (whichever was applied last). | |
4869 | ||
4870 | Computed URLs are URIs of internally generated | |
4871 | requests and various "error:..." URIs. | |
4872 | ||
4873 | Honors strip_query_terms and uri_whitespace. | |
4874 | ||
4875 | This field is not encoded by default. Encoding | |
4876 | this field using variants of %-encoding will | |
4877 | clash with uri_whitespace modifications that | |
4878 | also use %-encoding. | |
4879 | ||
4880 | [http::]>ru Request URL received from the client (or computed) | |
4881 | ||
4882 | Computed URLs are URIs of internally generated | |
4883 | requests and various "error:..." URIs. | |
4884 | ||
4885 | Unlike %ru, this request URI is not affected | |
4886 | by request adaptation, URL rewriting services, | |
4887 | and strip_query_terms. | |
4888 | ||
4889 | Honors uri_whitespace. | |
4890 | ||
4891 | This field is using pass-through URL encoding | |
4892 | by default. Encoding this field using other | |
4893 | variants of %-encoding will clash with | |
4894 | uri_whitespace modifications that also use | |
4895 | %-encoding. | |
4896 | ||
4897 | [http::]<ru Request URL sent to server or peer | |
4898 | [http::]>rs Request URL scheme from client | |
4899 | [http::]<rs Request URL scheme sent to server or peer | |
4900 | [http::]>rd Request URL domain from client | |
4901 | [http::]<rd Request URL domain sent to server or peer | |
4902 | [http::]>rP Request URL port from client | |
4903 | [http::]<rP Request URL port sent to server or peer | |
4904 | [http::]rp Request URL path excluding hostname | |
4905 | [http::]>rp Request URL path excluding hostname from client | |
4906 | [http::]<rp Request URL path excluding hostname sent to server or peer | |
4907 | [http::]rv Request protocol version | |
4908 | [http::]>rv Request protocol version from client | |
4909 | [http::]<rv Request protocol version sent to server or peer | |
4910 | ||
4911 | [http::]>h Original received request header. | |
4912 | Usually differs from the request header sent by | |
4913 | Squid, although most fields are often preserved. | |
4914 | Accepts optional header field name/value filter | |
4915 | argument using name[:[separator]element] format. | |
4916 | [http::]>ha Received request header after adaptation and | |
4917 | redirection (pre-cache REQMOD vectoring point). | |
4918 | Usually differs from the request header sent by | |
4919 | Squid, although most fields are often preserved. | |
4920 | Optional header name argument as for >h | |
4921 | ||
4922 | RESPONSE | |
4923 | ||
4924 | [http::]<Hs HTTP status code received from the next hop | |
4925 | [http::]>Hs HTTP status code sent to the client | |
4926 | ||
4927 | [http::]<h Reply header. Optional header name argument | |
4928 | as for >h | |
4929 | ||
4930 | [http::]mt MIME content type | |
4931 | ||
4932 | ||
4933 | SIZE COUNTERS | |
4934 | ||
4935 | [http::]st Total size of request + reply traffic with client | |
4936 | [http::]>st Total size of request received from client. | |
4937 | Excluding chunked encoding bytes. | |
4938 | [http::]<st Total size of reply sent to client (after adaptation) | |
4939 | ||
4940 | [http::]>sh Size of request headers received from client | |
4941 | [http::]<sh Size of reply headers sent to client (after adaptation) | |
4942 | ||
4943 | [http::]<sH Reply high offset sent | |
4944 | [http::]<sS Upstream object size | |
4945 | ||
4946 | [http::]<bs Number of HTTP-equivalent message body bytes | |
4947 | received from the next hop, excluding chunked | |
4948 | transfer encoding and control messages. | |
4949 | Generated FTP listings are treated as | |
4950 | received bodies. | |
4951 | ||
4952 | TIMING | |
4953 | ||
4954 | [http::]<pt Peer response time in milliseconds. The timer starts | |
4955 | when the last request byte is sent to the next hop | |
4956 | and stops when the last response byte is received. | |
4957 | [http::]<tt Total time spent forwarding to origin servers or | |
4958 | cache_peers (milliseconds). | |
4959 | ||
4960 | The timer starts when Squid decides to forward the request (to | |
4961 | an origin server or cache_peer) and peer selection begins. The | |
4962 | timer stops when relevant forwarding activities (including any | |
4963 | retries) end. | |
4964 | ||
4965 | Between those two timer events, Squid may perform DNS lookups, | |
4966 | query external ACL helpers, adapt responses using pre-cache | |
4967 | RESPMOD services, and participate in other concurrent | |
4968 | secondary activities. Most secondary activities increase | |
4969 | peering time. In some cases, a secondary activity may start | |
4970 | before the timer starts or end after the timer stops, leading | |
4971 | to misleading results of simple computations like %<tt - %dt. | |
4972 | ||
4973 | If this logformat %code is used before its timer starts, the | |
4974 | corresponding measurement has no value (and the %code expands | |
4975 | to a single dash ("-") character). | |
4976 | ||
4977 | If this code is used while its timer is running, the time | |
4978 | spent so far is used as the measurement value. | |
4979 | ||
4980 | When Squid re-forwards the request (e.g., after certain cache | |
4981 | revalidation failures), the timer may restart. In this case, | |
4982 | the new measurement is added to the value accumulated from | |
4983 | previous forwarding attempts. The time interval between | |
4984 | forwarding attempts is not added to the final result. | |
4985 | ||
4986 | Squid handling related format codes: | |
4987 | ||
4988 | Ss Squid request status (TCP_MISS etc) | |
4989 | Sh Squid hierarchy status (DEFAULT_PARENT etc) | |
4990 | ||
4991 | [http::]request_attempts Number of request forwarding attempts | |
4992 | ||
4993 | See forward_max_tries documentation that details what Squid counts | |
4994 | as a forwarding attempt. Pure cache hits log zero, but cache hits | |
4995 | that triggered HTTP cache revalidation log the number of attempts | |
4996 | made when sending an internal revalidation request. DNS, ICMP, | |
4997 | ICP, HTCP, ESI, ICAP, eCAP, helper, and other secondary requests | |
4998 | sent by Squid as a part of a master transaction do not increment | |
4999 | the counter logged for the received request. | |
5000 | ||
5001 | SSL-related format codes: | |
5002 | ||
5003 | ssl::bump_mode SslBump decision for the transaction: | |
5004 | ||
5005 | For CONNECT requests that initiated bumping of | |
5006 | a connection and for any request received on | |
5007 | an already bumped connection, Squid logs the | |
5008 | corresponding SslBump mode ("splice", "bump", | |
5009 | "peek", "stare", "terminate", "server-first" | |
5010 | or "client-first"). See the ssl_bump option | |
5011 | for more information about these modes. | |
5012 | ||
5013 | A "none" token is logged for requests that | |
5014 | triggered "ssl_bump" ACL evaluation matching | |
5015 | a "none" rule. | |
5016 | ||
5017 | In all other cases, a single dash ("-") is | |
5018 | logged. | |
5019 | ||
5020 | ssl::>sni SSL client SNI sent to Squid. | |
5021 | ||
5022 | ssl::>cert_subject | |
5023 | The Subject field of the received client | |
5024 | SSL certificate or a dash ('-') if Squid has | |
5025 | received an invalid/malformed certificate or | |
5026 | no certificate at all. Consider encoding the | |
5027 | logged value because Subject often has spaces. | |
5028 | ||
5029 | ssl::>cert_issuer | |
5030 | The Issuer field of the received client | |
5031 | SSL certificate or a dash ('-') if Squid has | |
5032 | received an invalid/malformed certificate or | |
5033 | no certificate at all. Consider encoding the | |
5034 | logged value because Issuer often has spaces. | |
5035 | ||
5036 | ssl::<cert_subject | |
5037 | The Subject field of the received server | |
5038 | TLS certificate or a dash ('-') if this is | |
5039 | not available. Consider encoding the logged | |
5040 | value because Subject often has spaces. | |
5041 | ||
5042 | ssl::<cert_issuer | |
5043 | The Issuer field of the received server | |
5044 | TLS certificate or a dash ('-') if this is | |
5045 | not available. Consider encoding the logged | |
5046 | value because Issuer often has spaces. | |
5047 | ||
5048 | ssl::<cert | |
5049 | The received server x509 certificate in PEM | |
5050 | format, including BEGIN and END lines (or a | |
5051 | dash ('-') if the certificate is unavailable). | |
5052 | ||
5053 | WARNING: Large certificates will exceed the | |
5054 | current 8KB access.log record limit, resulting | |
5055 | in truncated records. Such truncation usually | |
5056 | happens in the middle of a record field. The | |
5057 | limit applies to all access logging modules. | |
5058 | ||
5059 | The logged certificate may have failed | |
5060 | validation and may not be trusted by Squid. | |
5061 | This field does not include any intermediate | |
5062 | certificates that may have been received from | |
5063 | the server or fetched during certificate | |
5064 | validation process. | |
5065 | ||
5066 | Currently, Squid only collects server | |
5067 | certificates during step3 of SslBump | |
5068 | processing; connections that were not subject | |
5069 | to ssl_bump rules or that did not match a peek | |
5070 | or stare rule at step2 will not have the | |
5071 | server certificate information. | |
5072 | ||
5073 | This field is using pass-through URL encoding | |
5074 | by default. | |
5075 | ||
5076 | ssl::<cert_errors | |
5077 | The list of certificate validation errors | |
5078 | detected by Squid (including OpenSSL and | |
5079 | certificate validation helper components). The | |
5080 | errors are listed in the discovery order. By | |
5081 | default, the error codes are separated by ':'. | |
5082 | Accepts an optional separator argument. | |
5083 | ||
5084 | %ssl::>negotiated_version The negotiated TLS version of the | |
5085 | client connection. | |
5086 | ||
5087 | %ssl::<negotiated_version The negotiated TLS version of the | |
5088 | last server or peer connection. | |
5089 | ||
5090 | %ssl::>received_hello_version The TLS version of the Hello | |
5091 | message received from TLS client. | |
5092 | ||
5093 | %ssl::<received_hello_version The TLS version of the Hello | |
5094 | message received from TLS server. | |
5095 | ||
5096 | %ssl::>received_supported_version The maximum TLS version | |
5097 | supported by the TLS client. | |
5098 | ||
5099 | %ssl::<received_supported_version The maximum TLS version | |
5100 | supported by the TLS server. | |
5101 | ||
5102 | %ssl::>negotiated_cipher The negotiated cipher of the | |
5103 | client connection. | |
5104 | ||
5105 | %ssl::<negotiated_cipher The negotiated cipher of the | |
5106 | last server or peer connection. | |
5107 | ||
5108 | If ICAP is enabled, the following code becomes available (as | |
5109 | well as ICAP log codes documented with the icap_log option): | |
5110 | ||
5111 | icap::tt Total ICAP "blocking" time for the HTTP transaction. The | |
5112 | timer ticks while Squid checks adaptation_access and while | |
5113 | ICAP transaction(s) expect ICAP response headers, including | |
5114 | the embedded adapted HTTP message headers (where applicable). | |
5115 | This measurement is meant to estimate ICAP impact on HTTP | |
5116 | transaction response times, but it does not currently account | |
5117 | for slow ICAP response body delivery blocking HTTP progress. | |
5118 | ||
5119 | Once Squid receives the final ICAP response headers (e.g., | |
5120 | ICAP 200 or 204) and the associated adapted HTTP message | |
5121 | headers (if any) from the ICAP service, the corresponding ICAP | |
5122 | transaction stops affecting this measurement, even though the | |
5123 | transaction itself may continue for a long time (e.g., to | |
5124 | finish sending the ICAP request and/or to finish receiving the | |
5125 | ICAP response body). | |
5126 | ||
5127 | When "blocking" sections of multiple concurrent ICAP | |
5128 | transactions overlap in time, the overlapping segment is | |
5129 | counted only once. | |
5130 | ||
5131 | To see complete ICAP transaction response times (rather than | |
5132 | the cumulative effect of their blocking sections) use the | |
5133 | %adapt::all_trs logformat code or the icap_log directive. | |
5134 | ||
5135 | If adaptation is enabled the following codes become available: | |
5136 | ||
5137 | adapt::<last_h The header of the last ICAP response or | |
5138 | meta-information from the last eCAP | |
5139 | transaction related to the HTTP transaction. | |
5140 | Like <h, accepts an optional header name | |
5141 | argument. | |
5142 | ||
5143 | adapt::sum_trs Summed adaptation transaction response | |
5144 | times recorded as a comma-separated list in | |
5145 | the order of transaction start time. Each time | |
5146 | value is recorded as an integer number, | |
5147 | representing response time of one or more | |
5148 | adaptation (ICAP or eCAP) transaction in | |
5149 | milliseconds. When a failed transaction is | |
5150 | being retried or repeated, its time is not | |
5151 | logged individually but added to the | |
5152 | replacement (next) transaction. Lifetimes of individually | |
5153 | listed adaptation transactions may overlap. | |
5154 | See also: %icap::tt and %adapt::all_trs. | |
5155 | ||
5156 | adapt::all_trs All adaptation transaction response times. | |
5157 | Same as %adapt::sum_trs but response times of | |
5158 | individual transactions are never added | |
5159 | together. Instead, all transaction response | |
5160 | times are recorded individually. | |
5161 | ||
5162 | You can prefix adapt::*_trs format codes with adaptation | |
5163 | service name in curly braces to record response time(s) specific | |
5164 | to that service. For example: %{my_service}adapt::sum_trs | |
5165 | ||
5166 | Format codes related to the PROXY protocol: | |
5167 | ||
5168 | proxy_protocol::>h PROXY protocol header, including optional TLVs. | |
5169 | ||
5170 | Supports the same field and element reporting/extraction logic | |
5171 | as %http::>h. For configuration and reporting purposes, Squid | |
5172 | maps each PROXY TLV to an HTTP header field: the TLV type | |
5173 | (configured as a decimal integer) is the field name, and the | |
5174 | TLV value is the field value. All TLVs of "LOCAL" connections | |
5175 | (in PROXY protocol terminology) are currently skipped/ignored. | |
5176 | ||
5177 | Squid also maps the following standard PROXY protocol header | |
5178 | blocks to pseudo HTTP headers (their names use PROXY | |
5179 | terminology and start with a colon, following HTTP tradition | |
5180 | for pseudo headers): :command, :version, :src_addr, :dst_addr, | |
5181 | :src_port, and :dst_port. | |
5182 | ||
5183 | Without optional parameters, this logformat code logs | |
5184 | pseudo headers and TLVs. | |
5185 | ||
5186 | This format code uses pass-through URL encoding by default. | |
5187 | ||
5188 | Example: | |
5189 | # relay custom PROXY TLV #224 to adaptation services | |
5190 | adaptation_meta Client-Foo "%proxy_protocol::>h{224}" | |
5191 | ||
5192 | See also: %http::>h | |
5193 | ||
5194 | The default formats available (which do not need re-defining) are: | |
5195 | ||
5196 | logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt | |
5197 | logformat common %>a - %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh | |
5198 | logformat combined %>a - %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh | |
5199 | logformat referrer %ts.%03tu %>a %{Referer}>h %ru | |
5200 | logformat useragent %>a [%tl] "%{User-Agent}>h" | |
5201 | ||
5202 | NOTE: When the log_mime_hdrs directive is set to ON. | |
5203 | The squid, common and combined formats have a safely encoded copy | |
5204 | of the mime headers appended to each line within a pair of brackets. | |
5205 | ||
5206 | NOTE: The common and combined formats are not quite true to the Apache definition. | |
5207 | The logs from Squid contain an extra status and hierarchy code appended. | |
5208 | ||
5209 | DOC_END | |
5210 | ||
5211 | NAME: access_log cache_access_log | |
5212 | TYPE: access_log | |
5213 | LOC: Config.Log.accesslogs | |
5214 | DEFAULT_IF_NONE: daemon:@DEFAULT_ACCESS_LOG@ squid | |
5215 | DOC_START | |
5216 | Configures whether and how Squid logs HTTP and ICP transactions. | |
5217 | If access logging is enabled, a single line is logged for every | |
5218 | matching HTTP or ICP request. The recommended directive formats are: | |
5219 | ||
5220 | access_log <module>:<place> [option ...] [acl acl ...] | |
5221 | access_log none [acl acl ...] | |
5222 | ||
5223 | The following directive format is accepted but may be deprecated: | |
5224 | access_log <module>:<place> [<logformat name> [acl acl ...]] | |
5225 | ||
5226 | In most cases, the first ACL name must not contain the '=' character | |
5227 | and should not be equal to an existing logformat name. You can always | |
5228 | start with an 'all' ACL to work around those restrictions. | |
5229 | ||
5230 | Will log to the specified module:place using the specified format (which | |
5231 | must be defined in a logformat directive) those entries which match | |
5232 | ALL the acl's specified (which must be defined in acl clauses). | |
5233 | If no acl is specified, all requests will be logged to this destination. | |
5234 | ||
5235 | ===== Available options for the recommended directive format ===== | |
5236 | ||
5237 | logformat=name Names log line format (either built-in or | |
5238 | defined by a logformat directive). Defaults | |
5239 | to 'squid'. | |
5240 | ||
5241 | buffer-size=64KB Defines approximate buffering limit for log | |
5242 | records (see buffered_logs). Squid should not | |
5243 | keep more than the specified size and, hence, | |
5244 | should flush records before the buffer becomes | |
5245 | full to avoid overflows under normal | |
5246 | conditions (the exact flushing algorithm is | |
5247 | module-dependent though). The on-error option | |
5248 | controls overflow handling. | |
5249 | ||
5250 | on-error=die|drop Defines action on unrecoverable errors. The | |
5251 | 'drop' action ignores (i.e., does not log) | |
5252 | affected log records. The default 'die' action | |
5253 | kills the affected worker. The drop action | |
5254 | support has not been tested for modules other | |
5255 | than tcp. | |
5256 | ||
5257 | rotate=N Specifies the number of log file rotations to | |
5258 | make when you run 'squid -k rotate'. The default | |
5259 | is to obey the logfile_rotate directive. Setting | |
5260 | rotate=0 will disable the file name rotation, | |
5261 | but the log files are still closed and re-opened. | |
5262 | This will enable you to rename the logfiles | |
5263 | yourself just before sending the rotate signal. | |
5264 | Only supported by the stdio module. | |
5265 | ||
5266 | ===== Modules Currently available ===== | |
5267 | ||
5268 | none Do not log any requests matching these ACL. | |
5269 | Do not specify Place or logformat name. | |
5270 | ||
5271 | stdio Write each log line to disk immediately at the completion of | |
5272 | each request. | |
5273 | Place: the filename and path to be written. | |
5274 | ||
5275 | daemon Very similar to stdio. But instead of writing to disk the log | |
5276 | line is passed to a daemon helper for asychronous handling instead. | |
5277 | Place: varies depending on the daemon. | |
5278 | ||
5279 | log_file_daemon Place: the file name and path to be written. | |
5280 | ||
5281 | syslog To log each request via syslog facility. | |
5282 | Place: The syslog facility and priority level for these entries. | |
5283 | Place Format: facility.priority | |
5284 | ||
5285 | where facility could be any of: | |
5286 | authpriv, daemon, local0 ... local7 or user. | |
5287 | ||
5288 | And priority could be any of: | |
5289 | err, warning, notice, info, debug. | |
5290 | ||
5291 | udp To send each log line as text data to a UDP receiver. | |
5292 | Place: The destination host name or IP and port. | |
5293 | Place Format: //host:port | |
5294 | ||
5295 | tcp To send each log line as text data to a TCP receiver. | |
5296 | Lines may be accumulated before sending (see buffered_logs). | |
5297 | Place: The destination host name or IP and port. | |
5298 | Place Format: //host:port | |
5299 | ||
5300 | Default: | |
5301 | access_log daemon:@DEFAULT_ACCESS_LOG@ squid | |
5302 | DOC_END | |
5303 | ||
5304 | NAME: icap_log | |
5305 | TYPE: access_log | |
5306 | IFDEF: ICAP_CLIENT | |
5307 | LOC: Config.Log.icaplogs | |
5308 | DEFAULT: none | |
5309 | DOC_START | |
5310 | ICAP log files record ICAP transaction summaries, one line per | |
5311 | transaction. | |
5312 | ||
5313 | The icap_log option format is: | |
5314 | icap_log <filepath> [<logformat name> [acl acl ...]] | |
5315 | icap_log none [acl acl ...]] | |
5316 | ||
5317 | Please see access_log option documentation for details. The two | |
5318 | kinds of logs share the overall configuration approach and many | |
5319 | features. | |
5320 | ||
5321 | ICAP processing of a single HTTP message or transaction may | |
5322 | require multiple ICAP transactions. In such cases, multiple | |
5323 | ICAP transaction log lines will correspond to a single access | |
5324 | log line. | |
5325 | ||
5326 | ICAP log supports many access.log logformat %codes. In ICAP context, | |
5327 | HTTP message-related %codes are applied to the HTTP message embedded | |
5328 | in an ICAP message. Logformat "%http::>..." codes are used for HTTP | |
5329 | messages embedded in ICAP requests while "%http::<..." codes are used | |
5330 | for HTTP messages embedded in ICAP responses. For example: | |
5331 | ||
5332 | http::>h To-be-adapted HTTP message headers sent by Squid to | |
5333 | the ICAP service. For REQMOD transactions, these are | |
5334 | HTTP request headers. For RESPMOD, these are HTTP | |
5335 | response headers, but Squid currently cannot log them | |
5336 | (i.e., %http::>h will expand to "-" for RESPMOD). | |
5337 | ||
5338 | http::<h Adapted HTTP message headers sent by the ICAP | |
5339 | service to Squid (i.e., HTTP request headers in regular | |
5340 | REQMOD; HTTP response headers in RESPMOD and during | |
5341 | request satisfaction in REQMOD). | |
5342 | ||
5343 | ICAP OPTIONS transactions do not embed HTTP messages. | |
5344 | ||
5345 | Several logformat codes below deal with ICAP message bodies. An ICAP | |
5346 | message body, if any, typically includes a complete HTTP message | |
5347 | (required HTTP headers plus optional HTTP message body). When | |
5348 | computing HTTP message body size for these logformat codes, Squid | |
5349 | either includes or excludes chunked encoding overheads; see | |
5350 | code-specific documentation for details. | |
5351 | ||
5352 | For Secure ICAP services, all size-related information is currently | |
5353 | computed before/after TLS encryption/decryption, as if TLS was not | |
5354 | in use at all. | |
5355 | ||
5356 | The following format codes are also available for ICAP logs: | |
5357 | ||
5358 | icap::<A ICAP server IP address. Similar to <A. | |
5359 | ||
5360 | icap::<service_name ICAP service name from the icap_service | |
5361 | option in Squid configuration file. | |
5362 | ||
5363 | icap::ru ICAP Request-URI. Similar to ru. | |
5364 | ||
5365 | icap::rm ICAP request method (REQMOD, RESPMOD, or | |
5366 | OPTIONS). Similar to existing rm. | |
5367 | ||
5368 | icap::>st The total size of the ICAP request sent to the ICAP | |
5369 | server (ICAP headers + ICAP body), including chunking | |
5370 | metadata (if any). | |
5371 | ||
5372 | icap::<st The total size of the ICAP response received from the | |
5373 | ICAP server (ICAP headers + ICAP body), including | |
5374 | chunking metadata (if any). | |
5375 | ||
5376 | icap::<bs The size of the ICAP response body received from the | |
5377 | ICAP server, excluding chunking metadata (if any). | |
5378 | ||
5379 | icap::tr Transaction response time (in | |
5380 | milliseconds). The timer starts when | |
5381 | the ICAP transaction is created and | |
5382 | stops when the transaction is completed. | |
5383 | Similar to tr. | |
5384 | ||
5385 | icap::tio Transaction I/O time (in milliseconds). The | |
5386 | timer starts when the first ICAP request | |
5387 | byte is scheduled for sending. The timers | |
5388 | stops when the last byte of the ICAP response | |
5389 | is received. | |
5390 | ||
5391 | icap::to Transaction outcome: ICAP_ERR* for all | |
5392 | transaction errors, ICAP_OPT for OPTION | |
5393 | transactions, ICAP_ECHO for 204 | |
5394 | responses, ICAP_MOD for message | |
5395 | modification, and ICAP_SAT for request | |
5396 | satisfaction. Similar to Ss. | |
5397 | ||
5398 | icap::Hs ICAP response status code. Similar to Hs. | |
5399 | ||
5400 | icap::>h ICAP request header(s). Similar to >h. | |
5401 | ||
5402 | icap::<h ICAP response header(s). Similar to <h. | |
5403 | ||
5404 | The default ICAP log format, which can be used without an explicit | |
5405 | definition, is called icap_squid: | |
5406 | ||
5407 | logformat icap_squid %ts.%03tu %6icap::tr %>A %icap::to/%03icap::Hs %icap::<st %icap::rm %icap::ru %un -/%icap::<A - | |
5408 | ||
5409 | See also: logformat and %adapt::<last_h | |
5410 | DOC_END | |
5411 | ||
5412 | NAME: logfile_daemon | |
5413 | TYPE: string | |
5414 | DEFAULT: @DEFAULT_LOGFILED@ | |
5415 | LOC: Log::TheConfig.logfile_daemon | |
5416 | DOC_START | |
5417 | Specify the path to the logfile-writing daemon. This daemon is | |
5418 | used to write the access and store logs, if configured. | |
5419 | ||
5420 | Squid sends a number of commands to the log daemon: | |
5421 | L<data>\n - logfile data | |
5422 | R\n - rotate file | |
5423 | T\n - truncate file | |
5424 | O\n - reopen file | |
5425 | F\n - flush file | |
5426 | r<n>\n - set rotate count to <n> | |
5427 | b<n>\n - 1 = buffer output, 0 = don't buffer output | |
5428 | ||
5429 | No responses is expected. | |
5430 | DOC_END | |
5431 | ||
5432 | NAME: stats_collection | |
5433 | TYPE: acl_access | |
5434 | LOC: Config.accessList.stats_collection | |
5435 | DEFAULT: none | |
5436 | DEFAULT_DOC: Allow logging for all transactions. | |
5437 | COMMENT: allow|deny acl acl... | |
5438 | DOC_START | |
5439 | This options allows you to control which requests gets accounted | |
5440 | in performance counters. | |
5441 | ||
5442 | This clause only supports fast acl types. | |
5443 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
5444 | DOC_END | |
5445 | ||
5446 | NAME: cache_store_log | |
5447 | TYPE: string | |
5448 | DEFAULT: none | |
5449 | LOC: Config.Log.store | |
5450 | DOC_START | |
5451 | Logs the activities of the storage manager. Shows which | |
5452 | objects are ejected from the cache, and which objects are | |
5453 | saved and for how long. | |
5454 | There are not really utilities to analyze this data, so you can safely | |
5455 | disable it (the default). | |
5456 | ||
5457 | Store log uses modular logging outputs. See access_log for the list | |
5458 | of modules supported. | |
5459 | ||
5460 | Example: | |
5461 | cache_store_log stdio:@DEFAULT_STORE_LOG@ | |
5462 | cache_store_log daemon:@DEFAULT_STORE_LOG@ | |
5463 | DOC_END | |
5464 | ||
5465 | NAME: cache_swap_state cache_swap_log | |
5466 | TYPE: string | |
5467 | LOC: Config.Log.swap | |
5468 | DEFAULT: none | |
5469 | DEFAULT_DOC: Store the journal inside its cache_dir | |
5470 | DOC_START | |
5471 | Location for the cache "swap.state" file. This index file holds | |
5472 | the metadata of objects saved on disk. It is used to rebuild | |
5473 | the cache during startup. Normally this file resides in each | |
5474 | 'cache_dir' directory, but you may specify an alternate | |
5475 | pathname here. Note you must give a full filename, not just | |
5476 | a directory. Since this is the index for the whole object | |
5477 | list you CANNOT periodically rotate it! | |
5478 | ||
5479 | If %s can be used in the file name it will be replaced with a | |
5480 | a representation of the cache_dir name where each / is replaced | |
5481 | with '.'. This is needed to allow adding/removing cache_dir | |
5482 | lines when cache_swap_log is being used. | |
5483 | ||
5484 | If have more than one 'cache_dir', and %s is not used in the name | |
5485 | these swap logs will have names such as: | |
5486 | ||
5487 | cache_swap_log.00 | |
5488 | cache_swap_log.01 | |
5489 | cache_swap_log.02 | |
5490 | ||
5491 | The numbered extension (which is added automatically) | |
5492 | corresponds to the order of the 'cache_dir' lines in this | |
5493 | configuration file. If you change the order of the 'cache_dir' | |
5494 | lines in this file, these index files will NOT correspond to | |
5495 | the correct 'cache_dir' entry (unless you manually rename | |
5496 | them). We recommend you do NOT use this option. It is | |
5497 | better to keep these index files in each 'cache_dir' directory. | |
5498 | DOC_END | |
5499 | ||
5500 | NAME: logfile_rotate | |
5501 | TYPE: int | |
5502 | DEFAULT: 10 | |
5503 | LOC: Config.Log.rotateNumber | |
5504 | DOC_START | |
5505 | Specifies the default number of logfile rotations to make when you | |
5506 | type 'squid -k rotate'. The default is 10, which will rotate | |
5507 | with extensions 0 through 9. Setting logfile_rotate to 0 will | |
5508 | disable the file name rotation, but the logfiles are still closed | |
5509 | and re-opened. This will enable you to rename the logfiles | |
5510 | yourself just before sending the rotate signal. | |
5511 | ||
5512 | Note, from Squid-3.1 this option is only a default for cache.log, | |
5513 | that log can be rotated separately by using debug_options. | |
5514 | ||
5515 | Note, from Squid-4 this option is only a default for access.log | |
5516 | recorded by stdio: module. Those logs can be rotated separately by | |
5517 | using the rotate=N option on their access_log directive. | |
5518 | ||
5519 | Note, the 'squid -k rotate' command normally sends a USR1 | |
5520 | signal to the running squid process. In certain situations | |
5521 | (e.g. on Linux with Async I/O), USR1 is used for other | |
5522 | purposes, so -k rotate uses another signal. It is best to get | |
5523 | in the habit of using 'squid -k rotate' instead of 'kill -USR1 | |
5524 | <pid>'. | |
5525 | ||
5526 | DOC_END | |
5527 | ||
5528 | NAME: mime_table | |
5529 | TYPE: string | |
5530 | DEFAULT: @DEFAULT_MIME_TABLE@ | |
5531 | LOC: Config.mimeTablePathname | |
5532 | DOC_START | |
5533 | Path to Squid's icon configuration file. | |
5534 | ||
5535 | You shouldn't need to change this, but the default file contains | |
5536 | examples and formatting information if you do. | |
5537 | DOC_END | |
5538 | ||
5539 | NAME: log_mime_hdrs | |
5540 | COMMENT: on|off | |
5541 | TYPE: onoff | |
5542 | LOC: Config.onoff.log_mime_hdrs | |
5543 | DEFAULT: off | |
5544 | DOC_START | |
5545 | The Cache can record both the request and the response MIME | |
5546 | headers for each HTTP transaction. The headers are encoded | |
5547 | safely and will appear as two bracketed fields at the end of | |
5548 | the access log (for either the native or httpd-emulated log | |
5549 | formats). To enable this logging set log_mime_hdrs to 'on'. | |
5550 | DOC_END | |
5551 | ||
5552 | NAME: pid_filename | |
5553 | TYPE: string | |
5554 | DEFAULT: @DEFAULT_PID_FILE@ | |
5555 | LOC: Config.pidFilename | |
5556 | DOC_START | |
5557 | A filename to write the process-id to. To disable, enter "none". | |
5558 | DOC_END | |
5559 | ||
5560 | NAME: client_netmask | |
5561 | TYPE: address | |
5562 | LOC: Config.Addrs.client_netmask | |
5563 | DEFAULT: no_addr | |
5564 | DEFAULT_DOC: Log full client IP address | |
5565 | DOC_START | |
5566 | A netmask for client addresses in logfiles and cachemgr output. | |
5567 | Change this to protect the privacy of your cache clients. | |
5568 | A netmask of 255.255.255.0 will log all IP's in that range with | |
5569 | the last digit set to '0'. | |
5570 | DOC_END | |
5571 | ||
5572 | NAME: strip_query_terms | |
5573 | TYPE: onoff | |
5574 | LOC: Config.onoff.strip_query_terms | |
5575 | DEFAULT: on | |
5576 | DOC_START | |
5577 | By default, Squid strips query terms from requested URLs before | |
5578 | logging. This protects your user's privacy and reduces log size. | |
5579 | ||
5580 | When investigating HIT/MISS or other caching behaviour you | |
5581 | will need to disable this to see the full URL used by Squid. | |
5582 | DOC_END | |
5583 | ||
5584 | NAME: buffered_logs | |
5585 | COMMENT: on|off | |
5586 | TYPE: onoff | |
5587 | DEFAULT: off | |
5588 | LOC: Config.onoff.buffered_logs | |
5589 | DOC_START | |
5590 | Whether to write/send access_log records ASAP or accumulate them and | |
5591 | then write/send them in larger chunks. Buffering may improve | |
5592 | performance because it decreases the number of I/Os. However, | |
5593 | buffering increases the delay before log records become available to | |
5594 | the final recipient (e.g., a disk file or logging daemon) and, | |
5595 | hence, increases the risk of log records loss. | |
5596 | ||
5597 | Note that even when buffered_logs are off, Squid may have to buffer | |
5598 | records if it cannot write/send them immediately due to pending I/Os | |
5599 | (e.g., the I/O writing the previous log record) or connectivity loss. | |
5600 | ||
5601 | Currently honored by 'daemon', 'tcp' and 'udp' access_log modules only. | |
5602 | DOC_END | |
5603 | ||
5604 | NAME: netdb_filename | |
5605 | TYPE: string | |
5606 | DEFAULT: stdio:@DEFAULT_NETDB_FILE@ | |
5607 | LOC: Config.netdbFilename | |
5608 | IFDEF: USE_ICMP | |
5609 | DOC_START | |
5610 | Where Squid stores it's netdb journal. | |
5611 | When enabled this journal preserves netdb state between restarts. | |
5612 | ||
5613 | To disable, enter "none". | |
5614 | DOC_END | |
5615 | ||
5616 | NAME: tls_key_log | |
5617 | TYPE: Security::KeyLog* | |
5618 | DEFAULT: none | |
5619 | LOC: Config.Log.tlsKeys | |
5620 | IFDEF: USE_OPENSSL | |
5621 | DOC_START | |
5622 | Configures whether and where Squid records pre-master secret and | |
5623 | related encryption details for TLS connections accepted or established | |
5624 | by Squid. These connections include connections accepted at | |
5625 | https_port, TLS connections opened to origin servers/cache_peers/ICAP | |
5626 | services, and TLS tunnels bumped by Squid using the SslBump feature. | |
5627 | This log (a.k.a. SSLKEYLOGFILE) is meant for triage with traffic | |
5628 | inspection tools like Wireshark. | |
5629 | ||
5630 | tls_key_log <destination> [options] [if [!]<acl>...] | |
5631 | ||
5632 | WARNING: This log allows anybody to decrypt the corresponding | |
5633 | encrypted TLS connections, both in-flight and postmortem. | |
5634 | ||
5635 | At most one log file is supported at this time. Repeated tls_key_log | |
5636 | directives are treated as fatal configuration errors. By default, no | |
5637 | log is created or updated. | |
5638 | ||
5639 | If the log file does not exist, Squid creates it. Otherwise, Squid | |
5640 | appends an existing log file. | |
5641 | ||
5642 | The directive is consulted whenever a TLS connection is accepted or | |
5643 | established by Squid. TLS connections that fail the handshake may be | |
5644 | logged if Squid got enough information to form a log record. A record | |
5645 | is logged only if all of the configured ACLs match. | |
5646 | ||
5647 | While transport-related ACLs like src and dst should work, Squid may | |
5648 | not have access to higher-level information. For example, when logging | |
5649 | accepted https_port connections, Squid does not yet have access to the | |
5650 | expected HTTPS request. Similarly, an HTTPS response is not available | |
5651 | when logging most TLS connections established by Squid. | |
5652 | ||
5653 | The log record format is meant to be compatible with TLS deciphering | |
5654 | features of Wireshark which relies on fields like CLIENT_RANDOM and | |
5655 | RSA Master-Key. A single log record usually spans multiple lines. | |
5656 | Technical documentation for that format is maintained inside the | |
5657 | Wireshark code (e.g., see tls_keylog_process_lines() comments as of | |
5658 | Wireshark commit e3d44136f0f0026c5e893fa249f458073f3b7328). TLS key | |
5659 | log does not support custom record formats. | |
5660 | ||
5661 | This clause only supports fast acl types. | |
5662 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
5663 | ||
5664 | See access_log's <module>:<place> parameter for a list of supported | |
5665 | logging destinations. | |
5666 | ||
5667 | TLS key log supports all access_log key=value options with the | |
5668 | exception of logformat=name. | |
5669 | ||
5670 | Requires Squid built with OpenSSL support. | |
5671 | DOC_END | |
5672 | ||
5673 | ||
5674 | COMMENT_START | |
5675 | OPTIONS FOR TROUBLESHOOTING | |
5676 | ----------------------------------------------------------------------------- | |
5677 | COMMENT_END | |
5678 | ||
5679 | NAME: cache_log | |
5680 | TYPE: string | |
5681 | DEFAULT_IF_NONE: @DEFAULT_CACHE_LOG@ | |
5682 | LOC: Debug::cache_log | |
5683 | DOC_START | |
5684 | Squid administrative logging file. | |
5685 | ||
5686 | This is where general information about Squid behavior goes. You can | |
5687 | increase the amount of data logged to this file and how often it is | |
5688 | rotated with "debug_options" | |
5689 | DOC_END | |
5690 | ||
5691 | NAME: cache_log_message | |
5692 | TYPE: cache_log_message | |
5693 | DEFAULT: none | |
5694 | DEFAULT_DOC: Use debug_options. | |
5695 | LOC: DebugMessagesConfig | |
5696 | DOC_START | |
5697 | Configures logging of individual cache.log messages. | |
5698 | ||
5699 | cache_log_message id=<number> option... | |
5700 | cache_log_message ids=<number>-<number> option... | |
5701 | ||
5702 | Most messages have _not_ been instrumented to support this directive | |
5703 | yet. For the list of instrumented messages and their IDs, please see | |
5704 | the doc/debug-messages.txt file. | |
5705 | ||
5706 | Message ID corresponds to the message semantics rather than message | |
5707 | text or source code location. The ID is stable across Squid | |
5708 | instances and versions. Substantial changes in message semantics | |
5709 | result in a new ID assignment. To reduce the danger of suppressing | |
5710 | an important log message, the old IDs of removed (or substantially | |
5711 | changed) messages are never reused. | |
5712 | ||
5713 | If more than one cache_log_message directive refers to the same | |
5714 | message ID, the last directive wins. | |
5715 | ||
5716 | Use ids=min-max syntax to apply the same message configuration to an | |
5717 | inclusive range of message IDs. An ID range with N values has | |
5718 | exactly the same effect as typing N cache_log_message lines. | |
5719 | ||
5720 | At least one option is required. Supported options are: | |
5721 | ||
5722 | level=<number>: The logging level to use for the message. Squid | |
5723 | command line options (-s and -d) as well as the debug_options | |
5724 | directive control which levels go to syslog, stderr, and/or | |
5725 | cache.log. In most environments, using level=2 or higher stops | |
5726 | Squid from logging the message anywhere. By default, the | |
5727 | hard-coded message-specific level is used. | |
5728 | ||
5729 | limit=<number>: After logging the specified number of messages at | |
5730 | the configured (or default) debugging level DL, start using | |
5731 | level 3 (for DL 0 and 1) or 8 (for higher DL values). Usually, | |
5732 | level-3+ messages are not logged anywhere so this option can | |
5733 | often be used to effectively suppress the message. Each SMP | |
5734 | Squid process gets the same limit. | |
5735 | DOC_END | |
5736 | ||
5737 | NAME: debug_options | |
5738 | TYPE: eol | |
5739 | DEFAULT: ALL,1 | |
5740 | DEFAULT_DOC: Log all critical and important messages. | |
5741 | LOC: Debug::debugOptions | |
5742 | DOC_START | |
5743 | Logging options are set as section,level where each source file | |
5744 | is assigned a unique section. Lower levels result in less | |
5745 | output, Full debugging (level 9) can result in a very large | |
5746 | log file, so be careful. | |
5747 | ||
5748 | The magic word "ALL" sets debugging levels for all sections. | |
5749 | The default is to run with "ALL,1" to record important warnings. | |
5750 | ||
5751 | The rotate=N option can be used to keep more or less of these logs | |
5752 | than would otherwise be kept by logfile_rotate. | |
5753 | For most uses a single log should be enough to monitor current | |
5754 | events affecting Squid. | |
5755 | DOC_END | |
5756 | ||
5757 | NAME: coredump_dir | |
5758 | TYPE: string | |
5759 | LOC: Config.coredump_dir | |
5760 | DEFAULT_IF_NONE: none | |
5761 | DEFAULT_DOC: Use the directory from where Squid was started. | |
5762 | DOC_START | |
5763 | By default Squid leaves core files in the directory from where | |
5764 | it was started. If you set 'coredump_dir' to a directory | |
5765 | that exists, Squid will chdir() to that directory at startup | |
5766 | and coredump files will be left there. | |
5767 | ||
5768 | In addition to changing the directory, the process permissions are updated | |
5769 | to enable process tracing and/or coredump file generation. The details are | |
5770 | OS-specific, but look for prctl(2) PR_SET_DUMPABLE and procctl(2) | |
5771 | PROC_TRACE_CTL documentation as guiding examples. | |
5772 | ||
5773 | CONFIG_START | |
5774 | ||
5775 | # Leave coredumps in the first cache dir | |
5776 | coredump_dir @DEFAULT_SWAP_DIR@ | |
5777 | CONFIG_END | |
5778 | DOC_END | |
5779 | ||
5780 | ||
5781 | COMMENT_START | |
5782 | OPTIONS FOR FTP GATEWAYING | |
5783 | ----------------------------------------------------------------------------- | |
5784 | COMMENT_END | |
5785 | ||
5786 | NAME: ftp_user | |
5787 | TYPE: string | |
5788 | DEFAULT: Squid@ | |
5789 | LOC: Config.Ftp.anon_user | |
5790 | DOC_START | |
5791 | If you want the anonymous login password to be more informative | |
5792 | (and enable the use of picky FTP servers), set this to something | |
5793 | reasonable for your domain, like wwwuser@somewhere.net | |
5794 | ||
5795 | The reason why this is domainless by default is the | |
5796 | request can be made on the behalf of a user in any domain, | |
5797 | depending on how the cache is used. | |
5798 | Some FTP server also validate the email address is valid | |
5799 | (for example perl.com). | |
5800 | DOC_END | |
5801 | ||
5802 | NAME: ftp_passive | |
5803 | TYPE: onoff | |
5804 | DEFAULT: on | |
5805 | LOC: Config.Ftp.passive | |
5806 | DOC_START | |
5807 | If your firewall does not allow Squid to use passive | |
5808 | connections, turn off this option. | |
5809 | ||
5810 | Use of ftp_epsv_all option requires this to be ON. | |
5811 | DOC_END | |
5812 | ||
5813 | NAME: ftp_epsv_all | |
5814 | TYPE: onoff | |
5815 | DEFAULT: off | |
5816 | LOC: Config.Ftp.epsv_all | |
5817 | DOC_START | |
5818 | FTP Protocol extensions permit the use of a special "EPSV ALL" command. | |
5819 | ||
5820 | NATs may be able to put the connection on a "fast path" through the | |
5821 | translator, as the EPRT command will never be used and therefore, | |
5822 | translation of the data portion of the segments will never be needed. | |
5823 | ||
5824 | When a client only expects to do two-way FTP transfers this may be | |
5825 | useful. | |
5826 | If squid finds that it must do a three-way FTP transfer after issuing | |
5827 | an EPSV ALL command, the FTP session will fail. | |
5828 | ||
5829 | If you have any doubts about this option do not use it. | |
5830 | Squid will nicely attempt all other connection methods. | |
5831 | ||
5832 | Requires ftp_passive to be ON (default) for any effect. | |
5833 | DOC_END | |
5834 | ||
5835 | NAME: ftp_epsv | |
5836 | TYPE: ftp_epsv | |
5837 | DEFAULT: none | |
5838 | LOC: Config.accessList.ftp_epsv | |
5839 | DOC_START | |
5840 | FTP Protocol extensions permit the use of a special "EPSV" command. | |
5841 | ||
5842 | NATs may be able to put the connection on a "fast path" through the | |
5843 | translator using EPSV, as the EPRT command will never be used | |
5844 | and therefore, translation of the data portion of the segments | |
5845 | will never be needed. | |
5846 | ||
5847 | EPSV is often required to interoperate with FTP servers on IPv6 | |
5848 | networks. On the other hand, it may break some IPv4 servers. | |
5849 | ||
5850 | By default, EPSV may try EPSV with any FTP server. To fine tune | |
5851 | that decision, you may restrict EPSV to certain clients or servers | |
5852 | using ACLs: | |
5853 | ||
5854 | ftp_epsv allow|deny al1 acl2 ... | |
5855 | ||
5856 | WARNING: Disabling EPSV may cause problems with external NAT and IPv6. | |
5857 | ||
5858 | Only fast ACLs are supported. | |
5859 | Requires ftp_passive to be ON (default) for any effect. | |
5860 | DOC_END | |
5861 | ||
5862 | NAME: ftp_eprt | |
5863 | TYPE: onoff | |
5864 | DEFAULT: on | |
5865 | LOC: Config.Ftp.eprt | |
5866 | DOC_START | |
5867 | FTP Protocol extensions permit the use of a special "EPRT" command. | |
5868 | ||
5869 | This extension provides a protocol neutral alternative to the | |
5870 | IPv4-only PORT command. When supported it enables active FTP data | |
5871 | channels over IPv6 and efficient NAT handling. | |
5872 | ||
5873 | Turning this OFF will prevent EPRT being attempted and will skip | |
5874 | straight to using PORT for IPv4 servers. | |
5875 | ||
5876 | Some devices are known to not handle this extension correctly and | |
5877 | may result in crashes. Devices which support EPRT enough to fail | |
5878 | cleanly will result in Squid attempting PORT anyway. This directive | |
5879 | should only be disabled when EPRT results in device failures. | |
5880 | ||
5881 | WARNING: Doing so will convert Squid back to the old behavior with all | |
5882 | the related problems with external NAT devices/layers and IPv4-only FTP. | |
5883 | DOC_END | |
5884 | ||
5885 | NAME: ftp_sanitycheck | |
5886 | TYPE: onoff | |
5887 | DEFAULT: on | |
5888 | LOC: Config.Ftp.sanitycheck | |
5889 | DOC_START | |
5890 | For security and data integrity reasons Squid by default performs | |
5891 | sanity checks of the addresses of FTP data connections ensure the | |
5892 | data connection is to the requested server. If you need to allow | |
5893 | FTP connections to servers using another IP address for the data | |
5894 | connection turn this off. | |
5895 | DOC_END | |
5896 | ||
5897 | NAME: ftp_telnet_protocol | |
5898 | TYPE: onoff | |
5899 | DEFAULT: on | |
5900 | LOC: Config.Ftp.telnet | |
5901 | DOC_START | |
5902 | The FTP protocol is officially defined to use the telnet protocol | |
5903 | as transport channel for the control connection. However, many | |
5904 | implementations are broken and does not respect this aspect of | |
5905 | the FTP protocol. | |
5906 | ||
5907 | If you have trouble accessing files with ASCII code 255 in the | |
5908 | path or similar problems involving this ASCII code you can | |
5909 | try setting this directive to off. If that helps, report to the | |
5910 | operator of the FTP server in question that their FTP server | |
5911 | is broken and does not follow the FTP standard. | |
5912 | DOC_END | |
5913 | ||
5914 | COMMENT_START | |
5915 | OPTIONS FOR EXTERNAL SUPPORT PROGRAMS | |
5916 | ----------------------------------------------------------------------------- | |
5917 | COMMENT_END | |
5918 | ||
5919 | NAME: diskd_program | |
5920 | TYPE: string | |
5921 | DEFAULT: @DEFAULT_DISKD@ | |
5922 | LOC: Config.Program.diskd | |
5923 | DOC_START | |
5924 | Specify the location of the diskd executable. | |
5925 | Note this is only useful if you have compiled in | |
5926 | diskd as one of the store io modules. | |
5927 | DOC_END | |
5928 | ||
5929 | NAME: unlinkd_program | |
5930 | IFDEF: USE_UNLINKD | |
5931 | TYPE: string | |
5932 | DEFAULT: @DEFAULT_UNLINKD@ | |
5933 | LOC: Config.Program.unlinkd | |
5934 | DOC_START | |
5935 | Specify the location of the executable for file deletion process. | |
5936 | DOC_END | |
5937 | ||
5938 | NAME: pinger_program | |
5939 | IFDEF: USE_ICMP | |
5940 | TYPE: icmp | |
5941 | DEFAULT: @DEFAULT_PINGER@ | |
5942 | LOC: IcmpCfg | |
5943 | DOC_START | |
5944 | Specify the location of the executable for the pinger process. | |
5945 | DOC_END | |
5946 | ||
5947 | NAME: pinger_enable | |
5948 | TYPE: onoff | |
5949 | DEFAULT: on | |
5950 | LOC: IcmpCfg.enable | |
5951 | IFDEF: USE_ICMP | |
5952 | DOC_START | |
5953 | Control whether the pinger is active at run-time. | |
5954 | Enables turning ICMP pinger on and off with a simple | |
5955 | squid -k reconfigure. | |
5956 | DOC_END | |
5957 | ||
5958 | ||
5959 | COMMENT_START | |
5960 | OPTIONS FOR URL REWRITING | |
5961 | ----------------------------------------------------------------------------- | |
5962 | COMMENT_END | |
5963 | ||
5964 | NAME: url_rewrite_program redirect_program | |
5965 | TYPE: wordlist | |
5966 | LOC: Config.Program.redirect | |
5967 | DEFAULT: none | |
5968 | DOC_START | |
5969 | The name and command line parameters of an admin-provided executable | |
5970 | for redirecting clients or adjusting/replacing client request URLs. | |
5971 | ||
5972 | This helper is consulted after the received request is cleared by | |
5973 | http_access and adapted using eICAP/ICAP services (if any). If the | |
5974 | helper does not redirect the client, Squid checks adapted_http_access | |
5975 | and may consult the cache or forward the request to the next hop. | |
5976 | ||
5977 | ||
5978 | For each request, the helper gets one line in the following format: | |
5979 | ||
5980 | [channel-ID <SP>] request-URL [<SP> extras] <NL> | |
5981 | ||
5982 | Use url_rewrite_extras to configure what Squid sends as 'extras'. | |
5983 | ||
5984 | ||
5985 | The helper must reply to each query using a single line: | |
5986 | ||
5987 | [channel-ID <SP>] result [<SP> kv-pairs] <NL> | |
5988 | ||
5989 | The result section must match exactly one of the following outcomes: | |
5990 | ||
5991 | OK [status=30N] url="..." | |
5992 | ||
5993 | Redirect the client to a URL supplied in the 'url' parameter. | |
5994 | Optional 'status' specifies the status code to send to the | |
5995 | client in Squid's HTTP redirect response. It must be one of | |
5996 | the standard HTTP redirect status codes: 301, 302, 303, 307, | |
5997 | or 308. When no specific status is requested, Squid uses 302. | |
5998 | ||
5999 | OK rewrite-url="..." | |
6000 | ||
6001 | Replace the current request URL with the one supplied in the | |
6002 | 'rewrite-url' parameter. Squid fetches the resource specified | |
6003 | by the new URL and forwards the received response (or its | |
6004 | cached copy) to the client. | |
6005 | ||
6006 | WARNING: Avoid rewriting URLs! When possible, redirect the | |
6007 | client using an "OK url=..." helper response instead. | |
6008 | Rewriting URLs may create inconsistent requests and/or break | |
6009 | synchronization between internal client and origin server | |
6010 | states, especially when URLs or other message parts contain | |
6011 | snippets of that state. For example, Squid does not adjust | |
6012 | Location headers and embedded URLs after the helper rewrites | |
6013 | the request URL. | |
6014 | ||
6015 | OK | |
6016 | Keep the client request intact. | |
6017 | ||
6018 | ERR | |
6019 | Keep the client request intact. | |
6020 | ||
6021 | BH [message="..."] | |
6022 | A helper problem that should be reported to the Squid admin | |
6023 | via a level-1 cache.log message. The 'message' parameter is | |
6024 | reserved for specifying the log message. | |
6025 | ||
6026 | In addition to the kv-pairs mentioned above, Squid also understands | |
6027 | the following optional kv-pairs in URL rewriter responses: | |
6028 | ||
6029 | clt_conn_tag=TAG | |
6030 | Associates a TAG with the client TCP connection. | |
6031 | ||
6032 | The clt_conn_tag=TAG pair is treated as a regular transaction | |
6033 | annotation for the current request and also annotates future | |
6034 | requests on the same client connection. A helper may update | |
6035 | the TAG during subsequent requests by returning a new kv-pair. | |
6036 | ||
6037 | ||
6038 | Helper messages contain the channel-ID part if and only if the | |
6039 | url_rewrite_children directive specifies positive concurrency. As a | |
6040 | channel-ID value, Squid sends a number between 0 and concurrency-1. | |
6041 | The helper must echo back the received channel-ID in its response. | |
6042 | ||
6043 | By default, Squid does not use a URL rewriter. | |
6044 | DOC_END | |
6045 | ||
6046 | NAME: url_rewrite_children redirect_children | |
6047 | TYPE: HelperChildConfig | |
6048 | DEFAULT: 20 startup=0 idle=1 concurrency=0 | |
6049 | LOC: Config.redirectChildren | |
6050 | DOC_START | |
6051 | Specifies the maximum number of redirector processes that Squid may | |
6052 | spawn (numberofchildren) and several related options. Using too few of | |
6053 | these helper processes (a.k.a. "helpers") creates request queues. | |
6054 | Using too many helpers wastes your system resources. | |
6055 | ||
6056 | Usage: numberofchildren [option]... | |
6057 | ||
6058 | The startup= and idle= options allow some measure of skew in your | |
6059 | tuning. | |
6060 | ||
6061 | startup= | |
6062 | ||
6063 | Sets a minimum of how many processes are to be spawned when Squid | |
6064 | starts or reconfigures. When set to zero the first request will | |
6065 | cause spawning of the first child process to handle it. | |
6066 | ||
6067 | Starting too few will cause an initial slowdown in traffic as Squid | |
6068 | attempts to simultaneously spawn enough processes to cope. | |
6069 | ||
6070 | idle= | |
6071 | ||
6072 | Sets a minimum of how many processes Squid is to try and keep available | |
6073 | at all times. When traffic begins to rise above what the existing | |
6074 | processes can handle this many more will be spawned up to the maximum | |
6075 | configured. A minimum setting of 1 is required. | |
6076 | ||
6077 | concurrency= | |
6078 | ||
6079 | The number of requests each redirector helper can handle in | |
6080 | parallel. Defaults to 0 which indicates the redirector | |
6081 | is a old-style single threaded redirector. | |
6082 | ||
6083 | When this directive is set to a value >= 1 then the protocol | |
6084 | used to communicate with the helper is modified to include | |
6085 | an ID in front of the request/response. The ID from the request | |
6086 | must be echoed back with the response to that request. | |
6087 | ||
6088 | queue-size=N | |
6089 | ||
6090 | Sets the maximum number of queued requests. A request is queued when | |
6091 | no existing child can accept it due to concurrency limit and no new | |
6092 | child can be started due to numberofchildren limit. The default | |
6093 | maximum is zero if url_rewrite_bypass is enabled and | |
6094 | 2*numberofchildren otherwise. If the queued requests exceed queue size | |
6095 | and redirector_bypass configuration option is set, then redirector is | |
6096 | bypassed. Otherwise, Squid is allowed to temporarily exceed the | |
6097 | configured maximum, marking the affected helper as "overloaded". If | |
6098 | the helper overload lasts more than 3 minutes, the action prescribed | |
6099 | by the on-persistent-overload option applies. | |
6100 | ||
6101 | on-persistent-overload=action | |
6102 | ||
6103 | Specifies Squid reaction to a new helper request arriving when the helper | |
6104 | has been overloaded for more that 3 minutes already. The number of queued | |
6105 | requests determines whether the helper is overloaded (see the queue-size | |
6106 | option). | |
6107 | ||
6108 | Two actions are supported: | |
6109 | ||
6110 | die Squid worker quits. This is the default behavior. | |
6111 | ||
6112 | ERR Squid treats the helper request as if it was | |
6113 | immediately submitted, and the helper immediately | |
6114 | replied with an ERR response. This action has no effect | |
6115 | on the already queued and in-progress helper requests. | |
6116 | DOC_END | |
6117 | ||
6118 | NAME: url_rewrite_host_header redirect_rewrites_host_header | |
6119 | TYPE: onoff | |
6120 | DEFAULT: on | |
6121 | LOC: Config.onoff.redir_rewrites_host | |
6122 | DOC_START | |
6123 | To preserve same-origin security policies in browsers and | |
6124 | prevent Host: header forgery by redirectors Squid rewrites | |
6125 | any Host: header in redirected requests. | |
6126 | ||
6127 | If you are running an accelerator this may not be a wanted | |
6128 | effect of a redirector. This directive enables you disable | |
6129 | Host: alteration in reverse-proxy traffic. | |
6130 | ||
6131 | WARNING: Entries are cached on the result of the URL rewriting | |
6132 | process, so be careful if you have domain-virtual hosts. | |
6133 | ||
6134 | WARNING: Squid and other software verifies the URL and Host | |
6135 | are matching, so be careful not to relay through other proxies | |
6136 | or inspecting firewalls with this disabled. | |
6137 | DOC_END | |
6138 | ||
6139 | NAME: url_rewrite_access redirector_access | |
6140 | TYPE: acl_access | |
6141 | DEFAULT: none | |
6142 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. | |
6143 | LOC: Config.accessList.redirector | |
6144 | DOC_START | |
6145 | If defined, this access list specifies which requests are | |
6146 | sent to the redirector processes. | |
6147 | ||
6148 | This clause supports both fast and slow acl types. | |
6149 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
6150 | DOC_END | |
6151 | ||
6152 | NAME: url_rewrite_bypass redirector_bypass | |
6153 | TYPE: onoff | |
6154 | LOC: Config.onoff.redirector_bypass | |
6155 | DEFAULT: off | |
6156 | DOC_START | |
6157 | When this is 'on', a request will not go through the | |
6158 | redirector if all the helpers are busy. If this is 'off' and the | |
6159 | redirector queue grows too large, the action is prescribed by the | |
6160 | on-persistent-overload option. You should only enable this if the | |
6161 | redirectors are not critical to your caching system. If you use | |
6162 | redirectors for access control, and you enable this option, | |
6163 | users may have access to pages they should not | |
6164 | be allowed to request. | |
6165 | ||
6166 | Enabling this option sets the default url_rewrite_children queue-size | |
6167 | option value to 0. | |
6168 | DOC_END | |
6169 | ||
6170 | NAME: url_rewrite_extras | |
6171 | TYPE: TokenOrQuotedString | |
6172 | LOC: Config.redirector_extras | |
6173 | DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp" | |
6174 | DOC_START | |
6175 | Specifies a string to be append to request line format for the | |
6176 | rewriter helper. "Quoted" format values may contain spaces and | |
6177 | logformat %macros. In theory, any logformat %macro can be used. | |
6178 | In practice, a %macro expands as a dash (-) if the helper request is | |
6179 | sent before the required macro information is available to Squid. | |
6180 | DOC_END | |
6181 | ||
6182 | NAME: url_rewrite_timeout | |
6183 | TYPE: UrlHelperTimeout | |
6184 | LOC: Config.onUrlRewriteTimeout | |
6185 | DEFAULT: none | |
6186 | DEFAULT_DOC: Squid waits for the helper response forever | |
6187 | DOC_START | |
6188 | Squid times active requests to redirector. The timeout value and Squid | |
6189 | reaction to a timed out request are configurable using the following | |
6190 | format: | |
6191 | ||
6192 | url_rewrite_timeout timeout time-units on_timeout=<action> [response=<quoted-response>] | |
6193 | ||
6194 | supported timeout actions: | |
6195 | fail Squid return a ERR_GATEWAY_FAILURE error page | |
6196 | ||
6197 | bypass Do not re-write the URL | |
6198 | ||
6199 | retry Send the lookup to the helper again | |
6200 | ||
6201 | use_configured_response | |
6202 | Use the <quoted-response> as helper response | |
6203 | DOC_END | |
6204 | ||
6205 | COMMENT_START | |
6206 | OPTIONS FOR STORE ID | |
6207 | ----------------------------------------------------------------------------- | |
6208 | COMMENT_END | |
6209 | ||
6210 | NAME: store_id_program storeurl_rewrite_program | |
6211 | TYPE: wordlist | |
6212 | LOC: Config.Program.store_id | |
6213 | DEFAULT: none | |
6214 | DOC_START | |
6215 | Specify the location of the executable StoreID helper to use. | |
6216 | Since they can perform almost any function there isn't one included. | |
6217 | ||
6218 | For each requested URL, the helper will receive one line with the format | |
6219 | ||
6220 | [channel-ID <SP>] URL [<SP> extras]<NL> | |
6221 | ||
6222 | ||
6223 | After processing the request the helper must reply using the following format: | |
6224 | ||
6225 | [channel-ID <SP>] result [<SP> kv-pairs] | |
6226 | ||
6227 | The result code can be: | |
6228 | ||
6229 | OK store-id="..." | |
6230 | Use the StoreID supplied in 'store-id='. | |
6231 | ||
6232 | ERR | |
6233 | The default is to use HTTP request URL as the store ID. | |
6234 | ||
6235 | BH | |
6236 | An internal error occurred in the helper, preventing | |
6237 | a result being identified. | |
6238 | ||
6239 | In addition to the above kv-pairs Squid also understands the following | |
6240 | optional kv-pairs received from URL rewriters: | |
6241 | clt_conn_tag=TAG | |
6242 | Associates a TAG with the client TCP connection. | |
6243 | Please see url_rewrite_program related documentation for this | |
6244 | kv-pair | |
6245 | ||
6246 | Helper programs should be prepared to receive and possibly ignore | |
6247 | additional whitespace-separated tokens on each input line. | |
6248 | ||
6249 | When using the concurrency= option the protocol is changed by | |
6250 | introducing a query channel tag in front of the request/response. | |
6251 | The query channel tag is a number between 0 and concurrency-1. | |
6252 | This value must be echoed back unchanged to Squid as the first part | |
6253 | of the response relating to its request. | |
6254 | ||
6255 | NOTE: when using StoreID refresh_pattern will apply to the StoreID | |
6256 | returned from the helper and not the URL. | |
6257 | ||
6258 | WARNING: Wrong StoreID value returned by a careless helper may result | |
6259 | in the wrong cached response returned to the user. | |
6260 | ||
6261 | By default, a StoreID helper is not used. | |
6262 | DOC_END | |
6263 | ||
6264 | NAME: store_id_extras | |
6265 | TYPE: TokenOrQuotedString | |
6266 | LOC: Config.storeId_extras | |
6267 | DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp" | |
6268 | DOC_START | |
6269 | Specifies a string to be append to request line format for the | |
6270 | StoreId helper. "Quoted" format values may contain spaces and | |
6271 | logformat %macros. In theory, any logformat %macro can be used. | |
6272 | In practice, a %macro expands as a dash (-) if the helper request is | |
6273 | sent before the required macro information is available to Squid. | |
6274 | DOC_END | |
6275 | ||
6276 | NAME: store_id_children storeurl_rewrite_children | |
6277 | TYPE: HelperChildConfig | |
6278 | DEFAULT: 20 startup=0 idle=1 concurrency=0 | |
6279 | LOC: Config.storeIdChildren | |
6280 | DOC_START | |
6281 | Specifies the maximum number of StoreID helper processes that Squid | |
6282 | may spawn (numberofchildren) and several related options. Using | |
6283 | too few of these helper processes (a.k.a. "helpers") creates request | |
6284 | queues. Using too many helpers wastes your system resources. | |
6285 | ||
6286 | Usage: numberofchildren [option]... | |
6287 | ||
6288 | The startup= and idle= options allow some measure of skew in your | |
6289 | tuning. | |
6290 | ||
6291 | startup= | |
6292 | ||
6293 | Sets a minimum of how many processes are to be spawned when Squid | |
6294 | starts or reconfigures. When set to zero the first request will | |
6295 | cause spawning of the first child process to handle it. | |
6296 | ||
6297 | Starting too few will cause an initial slowdown in traffic as Squid | |
6298 | attempts to simultaneously spawn enough processes to cope. | |
6299 | ||
6300 | idle= | |
6301 | ||
6302 | Sets a minimum of how many processes Squid is to try and keep available | |
6303 | at all times. When traffic begins to rise above what the existing | |
6304 | processes can handle this many more will be spawned up to the maximum | |
6305 | configured. A minimum setting of 1 is required. | |
6306 | ||
6307 | concurrency= | |
6308 | ||
6309 | The number of requests each storeID helper can handle in | |
6310 | parallel. Defaults to 0 which indicates the helper | |
6311 | is a old-style single threaded program. | |
6312 | ||
6313 | When this directive is set to a value >= 1 then the protocol | |
6314 | used to communicate with the helper is modified to include | |
6315 | an ID in front of the request/response. The ID from the request | |
6316 | must be echoed back with the response to that request. | |
6317 | ||
6318 | queue-size=N | |
6319 | ||
6320 | Sets the maximum number of queued requests to N. A request is queued | |
6321 | when no existing child can accept it due to concurrency limit and no | |
6322 | new child can be started due to numberofchildren limit. The default | |
6323 | maximum is 2*numberofchildren. If the queued requests exceed queue | |
6324 | size and redirector_bypass configuration option is set, then | |
6325 | redirector is bypassed. Otherwise, Squid is allowed to temporarily | |
6326 | exceed the configured maximum, marking the affected helper as | |
6327 | "overloaded". If the helper overload lasts more than 3 minutes, the | |
6328 | action prescribed by the on-persistent-overload option applies. | |
6329 | ||
6330 | on-persistent-overload=action | |
6331 | ||
6332 | Specifies Squid reaction to a new helper request arriving when the helper | |
6333 | has been overloaded for more that 3 minutes already. The number of queued | |
6334 | requests determines whether the helper is overloaded (see the queue-size | |
6335 | option). | |
6336 | ||
6337 | Two actions are supported: | |
6338 | ||
6339 | die Squid worker quits. This is the default behavior. | |
6340 | ||
6341 | ERR Squid treats the helper request as if it was | |
6342 | immediately submitted, and the helper immediately | |
6343 | replied with an ERR response. This action has no effect | |
6344 | on the already queued and in-progress helper requests. | |
6345 | DOC_END | |
6346 | ||
6347 | NAME: store_id_access storeurl_rewrite_access | |
6348 | TYPE: acl_access | |
6349 | DEFAULT: none | |
6350 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. | |
6351 | LOC: Config.accessList.store_id | |
6352 | DOC_START | |
6353 | If defined, this access list specifies which requests are | |
6354 | sent to the StoreID processes. By default all requests | |
6355 | are sent. | |
6356 | ||
6357 | This clause supports both fast and slow acl types. | |
6358 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
6359 | DOC_END | |
6360 | ||
6361 | NAME: store_id_bypass storeurl_rewrite_bypass | |
6362 | TYPE: onoff | |
6363 | LOC: Config.onoff.store_id_bypass | |
6364 | DEFAULT: on | |
6365 | DOC_START | |
6366 | When this is 'on', a request will not go through the | |
6367 | helper if all helpers are busy. If this is 'off' and the helper | |
6368 | queue grows too large, the action is prescribed by the | |
6369 | on-persistent-overload option. You should only enable this if the | |
6370 | helpers are not critical to your caching system. If you use | |
6371 | helpers for critical caching components, and you enable this | |
6372 | option, users may not get objects from cache. | |
6373 | This options sets default queue-size option of the store_id_children | |
6374 | to 0. | |
6375 | DOC_END | |
6376 | ||
6377 | COMMENT_START | |
6378 | OPTIONS FOR TUNING THE CACHE | |
6379 | ----------------------------------------------------------------------------- | |
6380 | COMMENT_END | |
6381 | ||
6382 | NAME: cache no_cache | |
6383 | TYPE: acl_access | |
6384 | DEFAULT: none | |
6385 | DEFAULT_DOC: By default, this directive is unused and has no effect. | |
6386 | LOC: Config.accessList.noCache | |
6387 | DOC_START | |
6388 | Requests denied by this directive will not be served from the cache | |
6389 | and their responses will not be stored in the cache. This directive | |
6390 | has no effect on other transactions and on already cached responses. | |
6391 | ||
6392 | This clause supports both fast and slow acl types. | |
6393 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
6394 | ||
6395 | This and the two other similar caching directives listed below are | |
6396 | checked at different transaction processing stages, have different | |
6397 | access to response information, affect different cache operations, | |
6398 | and differ in slow ACLs support: | |
6399 | ||
6400 | * cache: Checked before Squid makes a hit/miss determination. | |
6401 | No access to reply information! | |
6402 | Denies both serving a hit and storing a miss. | |
6403 | Supports both fast and slow ACLs. | |
6404 | * send_hit: Checked after a hit was detected. | |
6405 | Has access to reply (hit) information. | |
6406 | Denies serving a hit only. | |
6407 | Supports fast ACLs only. | |
6408 | * store_miss: Checked before storing a cachable miss. | |
6409 | Has access to reply (miss) information. | |
6410 | Denies storing a miss only. | |
6411 | Supports fast ACLs only. | |
6412 | ||
6413 | If you are not sure which of the three directives to use, apply the | |
6414 | following decision logic: | |
6415 | ||
6416 | * If your ACL(s) are of slow type _and_ need response info, redesign. | |
6417 | Squid does not support that particular combination at this time. | |
6418 | Otherwise: | |
6419 | * If your directive ACL(s) are of slow type, use "cache"; and/or | |
6420 | * if your directive ACL(s) need no response info, use "cache". | |
6421 | Otherwise: | |
6422 | * If you do not want the response cached, use store_miss; and/or | |
6423 | * if you do not want a hit on a cached response, use send_hit. | |
6424 | DOC_END | |
6425 | ||
6426 | NAME: send_hit | |
6427 | TYPE: acl_access | |
6428 | DEFAULT: none | |
6429 | DEFAULT_DOC: By default, this directive is unused and has no effect. | |
6430 | LOC: Config.accessList.sendHit | |
6431 | DOC_START | |
6432 | Responses denied by this directive will not be served from the cache | |
6433 | (but may still be cached, see store_miss). This directive has no | |
6434 | effect on the responses it allows and on the cached objects. | |
6435 | ||
6436 | Please see the "cache" directive for a summary of differences among | |
6437 | store_miss, send_hit, and cache directives. | |
6438 | ||
6439 | Unlike the "cache" directive, send_hit only supports fast acl | |
6440 | types. See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
6441 | ||
6442 | For example: | |
6443 | ||
6444 | # apply custom Store ID mapping to some URLs | |
6445 | acl MapMe dstdomain .c.example.com | |
6446 | store_id_program ... | |
6447 | store_id_access allow MapMe | |
6448 | ||
6449 | # but prevent caching of special responses | |
6450 | # such as 302 redirects that cause StoreID loops | |
6451 | acl Ordinary http_status 200-299 | |
6452 | store_miss deny MapMe !Ordinary | |
6453 | ||
6454 | # and do not serve any previously stored special responses | |
6455 | # from the cache (in case they were already cached before | |
6456 | # the above store_miss rule was in effect). | |
6457 | send_hit deny MapMe !Ordinary | |
6458 | DOC_END | |
6459 | ||
6460 | NAME: store_miss | |
6461 | TYPE: acl_access | |
6462 | DEFAULT: none | |
6463 | DEFAULT_DOC: By default, this directive is unused and has no effect. | |
6464 | LOC: Config.accessList.storeMiss | |
6465 | DOC_START | |
6466 | Responses denied by this directive will not be cached (but may still | |
6467 | be served from the cache, see send_hit). This directive has no | |
6468 | effect on the responses it allows and on the already cached responses. | |
6469 | ||
6470 | Please see the "cache" directive for a summary of differences among | |
6471 | store_miss, send_hit, and cache directives. See the | |
6472 | send_hit directive for a usage example. | |
6473 | ||
6474 | Unlike the "cache" directive, store_miss only supports fast acl | |
6475 | types. See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
6476 | DOC_END | |
6477 | ||
6478 | NAME: max_stale | |
6479 | COMMENT: time-units | |
6480 | TYPE: time_t | |
6481 | LOC: Config.maxStale | |
6482 | DEFAULT: 1 week | |
6483 | DOC_START | |
6484 | This option puts an upper limit on how stale content Squid | |
6485 | will serve from the cache if cache validation fails. | |
6486 | Can be overridden by the refresh_pattern max-stale option. | |
6487 | DOC_END | |
6488 | ||
6489 | NAME: refresh_pattern | |
6490 | TYPE: refreshpattern | |
6491 | LOC: Config.Refresh | |
6492 | DEFAULT: none | |
6493 | DOC_START | |
6494 | usage: refresh_pattern [-i] regex min percent max [options] | |
6495 | ||
6496 | By default, regular expressions are CASE-SENSITIVE. To make | |
6497 | them case-insensitive, use the -i option. | |
6498 | ||
6499 | 'Min' is the time (in minutes) an object without an explicit | |
6500 | expiry time should be considered fresh. The recommended | |
6501 | value is 0, any higher values may cause dynamic applications | |
6502 | to be erroneously cached unless the application designer | |
6503 | has taken the appropriate actions. | |
6504 | ||
6505 | 'Percent' is used to compute the max-age value for responses | |
6506 | with a Last-Modified header and no Cache-Control:max-age nor Expires. | |
6507 | Cache-Control:max-age = ( Date - Last-Modified ) * percent | |
6508 | ||
6509 | 'Max' is an upper limit on how long objects without an explicit | |
6510 | expiry time will be considered fresh. The value is also used | |
6511 | to form Cache-Control: max-age header for a request sent from | |
6512 | Squid to origin/parent. | |
6513 | ||
6514 | options: override-expire | |
6515 | override-lastmod | |
6516 | reload-into-ims | |
6517 | ignore-reload | |
6518 | ignore-no-store | |
6519 | ignore-private | |
6520 | max-stale=NN | |
6521 | refresh-ims | |
6522 | store-stale | |
6523 | ||
6524 | override-expire enforces min age even if the server | |
6525 | sent an explicit expiry time (e.g., with the | |
6526 | Expires: header or Cache-Control: max-age). Doing this | |
6527 | VIOLATES the HTTP standard. Enabling this feature | |
6528 | could make you liable for problems which it causes. | |
6529 | ||
6530 | Note: override-expire does not enforce staleness - it only extends | |
6531 | freshness / min. If the server returns a Expires time which | |
6532 | is longer than your max time, Squid will still consider | |
6533 | the object fresh for that period of time. | |
6534 | ||
6535 | override-lastmod enforces min age even on objects | |
6536 | that were modified recently. | |
6537 | ||
6538 | reload-into-ims changes a client no-cache or ``reload'' | |
6539 | request for a cached entry into a conditional request using | |
6540 | If-Modified-Since and/or If-None-Match headers, provided the | |
6541 | cached entry has a Last-Modified and/or a strong ETag header. | |
6542 | Doing this VIOLATES the HTTP standard. Enabling this feature | |
6543 | could make you liable for problems which it causes. | |
6544 | ||
6545 | ignore-reload ignores a client no-cache or ``reload'' | |
6546 | header. Doing this VIOLATES the HTTP standard. Enabling | |
6547 | this feature could make you liable for problems which | |
6548 | it causes. | |
6549 | ||
6550 | ignore-no-store ignores any ``Cache-control: no-store'' | |
6551 | headers received from a server. Doing this VIOLATES | |
6552 | the HTTP standard. Enabling this feature could make you | |
6553 | liable for problems which it causes. | |
6554 | ||
6555 | ignore-private ignores any ``Cache-control: private'' | |
6556 | headers received from a server. Doing this VIOLATES | |
6557 | the HTTP standard. Enabling this feature could make you | |
6558 | liable for problems which it causes. | |
6559 | ||
6560 | refresh-ims causes squid to contact the origin server | |
6561 | when a client issues an If-Modified-Since request. This | |
6562 | ensures that the client will receive an updated version | |
6563 | if one is available. | |
6564 | ||
6565 | store-stale stores responses even if they don't have explicit | |
6566 | freshness or a validator (i.e., Last-Modified or an ETag) | |
6567 | present, or if they're already stale. By default, Squid will | |
6568 | not cache such responses because they usually can't be | |
6569 | reused. Note that such responses will be stale by default. | |
6570 | ||
6571 | max-stale=NN provide a maximum staleness factor. Squid won't | |
6572 | serve objects more stale than this even if it failed to | |
6573 | validate the object. Default: use the max_stale global limit. | |
6574 | ||
6575 | Basically a cached object is: | |
6576 | ||
6577 | FRESH if expire > now, else STALE | |
6578 | STALE if age > max | |
6579 | FRESH if lm-factor < percent, else STALE | |
6580 | FRESH if age < min | |
6581 | else STALE | |
6582 | ||
6583 | The refresh_pattern lines are checked in the order listed here. | |
6584 | The first entry which matches is used. If none of the entries | |
6585 | match the default will be used. | |
6586 | ||
6587 | Note, you must uncomment all the default lines if you want | |
6588 | to change one. The default setting is only active if none is | |
6589 | used. | |
6590 | ||
6591 | CONFIG_START | |
6592 | ||
6593 | # | |
6594 | # Add any of your own refresh_pattern entries above these. | |
6595 | # | |
6596 | refresh_pattern ^ftp: 1440 20% 10080 | |
6597 | refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 | |
6598 | refresh_pattern . 0 20% 4320 | |
6599 | CONFIG_END | |
6600 | DOC_END | |
6601 | ||
6602 | NAME: quick_abort_min | |
6603 | COMMENT: (KB) | |
6604 | TYPE: kb_int64_t | |
6605 | DEFAULT: 16 KB | |
6606 | LOC: Config.quickAbort.min | |
6607 | DOC_NONE | |
6608 | ||
6609 | NAME: quick_abort_max | |
6610 | COMMENT: (KB) | |
6611 | TYPE: kb_int64_t | |
6612 | DEFAULT: 16 KB | |
6613 | LOC: Config.quickAbort.max | |
6614 | DOC_NONE | |
6615 | ||
6616 | NAME: quick_abort_pct | |
6617 | COMMENT: (percent) | |
6618 | TYPE: int | |
6619 | DEFAULT: 95 | |
6620 | LOC: Config.quickAbort.pct | |
6621 | DOC_START | |
6622 | The cache by default continues downloading aborted requests | |
6623 | which are almost completed (less than 16 KB remaining). This | |
6624 | may be undesirable on slow (e.g. SLIP) links and/or very busy | |
6625 | caches. Impatient users may tie up file descriptors and | |
6626 | bandwidth by repeatedly requesting and immediately aborting | |
6627 | downloads. | |
6628 | ||
6629 | When the user aborts a request, Squid will check the | |
6630 | quick_abort values to the amount of data transferred until | |
6631 | then. | |
6632 | ||
6633 | If the transfer has less than 'quick_abort_min' KB remaining, | |
6634 | it will finish the retrieval. | |
6635 | ||
6636 | If the transfer has more than 'quick_abort_max' KB remaining, | |
6637 | it will abort the retrieval. | |
6638 | ||
6639 | If more than 'quick_abort_pct' of the transfer has completed, | |
6640 | it will finish the retrieval. | |
6641 | ||
6642 | If you do not want any retrieval to continue after the client | |
6643 | has aborted, set both 'quick_abort_min' and 'quick_abort_max' | |
6644 | to '0 KB'. | |
6645 | ||
6646 | If you want retrievals to always continue if they are being | |
6647 | cached set 'quick_abort_min' to '-1 KB'. | |
6648 | DOC_END | |
6649 | ||
6650 | NAME: read_ahead_gap | |
6651 | COMMENT: buffer-size | |
6652 | TYPE: b_int64_t | |
6653 | LOC: Config.readAheadGap | |
6654 | DEFAULT: 16 KB | |
6655 | DOC_START | |
6656 | The amount of data the cache will buffer ahead of what has been | |
6657 | sent to the client when retrieving an object from another server. | |
6658 | DOC_END | |
6659 | ||
6660 | NAME: negative_ttl | |
6661 | IFDEF: USE_HTTP_VIOLATIONS | |
6662 | COMMENT: time-units | |
6663 | TYPE: time_t | |
6664 | LOC: Config.negativeTtl | |
6665 | DEFAULT: 0 seconds | |
6666 | DOC_START | |
6667 | Set the Default Time-to-Live (TTL) for failed requests. | |
6668 | Certain types of failures (such as "connection refused" and | |
6669 | "404 Not Found") are able to be negatively-cached for a short time. | |
6670 | Modern web servers should provide Expires: header, however if they | |
6671 | do not this can provide a minimum TTL. | |
6672 | The default is not to cache errors with unknown expiry details. | |
6673 | ||
6674 | Note that this is different from negative caching of DNS lookups. | |
6675 | ||
6676 | WARNING: Doing this VIOLATES the HTTP standard. Enabling | |
6677 | this feature could make you liable for problems which it | |
6678 | causes. | |
6679 | DOC_END | |
6680 | ||
6681 | NAME: positive_dns_ttl | |
6682 | COMMENT: time-units | |
6683 | TYPE: time_t | |
6684 | LOC: Config.positiveDnsTtl | |
6685 | DEFAULT: 6 hours | |
6686 | DOC_START | |
6687 | Upper limit on how long Squid will cache positive DNS responses. | |
6688 | Default is 6 hours (360 minutes). This directive must be set | |
6689 | larger than negative_dns_ttl. | |
6690 | DOC_END | |
6691 | ||
6692 | NAME: negative_dns_ttl | |
6693 | COMMENT: time-units | |
6694 | TYPE: time_t | |
6695 | LOC: Config.negativeDnsTtl | |
6696 | DEFAULT: 1 minutes | |
6697 | DOC_START | |
6698 | Time-to-Live (TTL) for negative caching of failed DNS lookups. | |
6699 | This also sets the lower cache limit on positive lookups. | |
6700 | Minimum value is 1 second, and it is not recommendable to go | |
6701 | much below 10 seconds. | |
6702 | DOC_END | |
6703 | ||
6704 | NAME: range_offset_limit | |
6705 | COMMENT: size [acl acl...] | |
6706 | TYPE: acl_b_size_t | |
6707 | LOC: Config.rangeOffsetLimit | |
6708 | DEFAULT: none | |
6709 | DOC_START | |
6710 | usage: (size) [units] [[!]aclname] | |
6711 | ||
6712 | Sets an upper limit on how far (number of bytes) into the file | |
6713 | a Range request may be to cause Squid to prefetch the whole file. | |
6714 | If beyond this limit, Squid forwards the Range request as it is and | |
6715 | the result is NOT cached. | |
6716 | ||
6717 | This is to stop a far ahead range request (lets say start at 17MB) | |
6718 | from making Squid fetch the whole object up to that point before | |
6719 | sending anything to the client. | |
6720 | ||
6721 | Multiple range_offset_limit lines may be specified, and they will | |
6722 | be searched from top to bottom on each request until a match is found. | |
6723 | The first match found will be used. If no line matches a request, the | |
6724 | default limit of 0 bytes will be used. | |
6725 | ||
6726 | 'size' is the limit specified as a number of units. | |
6727 | ||
6728 | 'units' specifies whether to use bytes, KB, MB, etc. | |
6729 | If no units are specified bytes are assumed. | |
6730 | ||
6731 | A size of 0 causes Squid to never fetch more than the | |
6732 | client requested. (default) | |
6733 | ||
6734 | A size of 'none' causes Squid to always fetch the object from the | |
6735 | beginning so it may cache the result. (2.0 style) | |
6736 | ||
6737 | 'aclname' is the name of a defined ACL. | |
6738 | ||
6739 | NP: Using 'none' as the byte value here will override any quick_abort settings | |
6740 | that may otherwise apply to the range request. The range request will | |
6741 | be fully fetched from start to finish regardless of the client | |
6742 | actions. This affects bandwidth usage. | |
6743 | DOC_END | |
6744 | ||
6745 | NAME: minimum_expiry_time | |
6746 | COMMENT: (seconds) | |
6747 | TYPE: time_t | |
6748 | LOC: Config.minimum_expiry_time | |
6749 | DEFAULT: 60 seconds | |
6750 | DOC_START | |
6751 | The minimum caching time according to (Expires - Date) | |
6752 | headers Squid honors if the object can't be revalidated. | |
6753 | The default is 60 seconds. | |
6754 | ||
6755 | In reverse proxy environments it might be desirable to honor | |
6756 | shorter object lifetimes. It is most likely better to make | |
6757 | your server return a meaningful Last-Modified header however. | |
6758 | ||
6759 | In ESI environments where page fragments often have short | |
6760 | lifetimes, this will often be best set to 0. | |
6761 | DOC_END | |
6762 | ||
6763 | NAME: store_avg_object_size | |
6764 | COMMENT: (bytes) | |
6765 | TYPE: b_int64_t | |
6766 | DEFAULT: 13 KB | |
6767 | LOC: Config.Store.avgObjectSize | |
6768 | DOC_START | |
6769 | Average object size, used to estimate number of objects your | |
6770 | cache can hold. The default is 13 KB. | |
6771 | ||
6772 | This is used to pre-seed the cache index memory allocation to | |
6773 | reduce expensive reallocate operations while handling clients | |
6774 | traffic. Too-large values may result in memory allocation during | |
6775 | peak traffic, too-small values will result in wasted memory. | |
6776 | ||
6777 | Check the cache manager 'info' report metrics for the real | |
6778 | object sizes seen by your Squid before tuning this. | |
6779 | DOC_END | |
6780 | ||
6781 | NAME: store_objects_per_bucket | |
6782 | TYPE: int | |
6783 | DEFAULT: 20 | |
6784 | LOC: Config.Store.objectsPerBucket | |
6785 | DOC_START | |
6786 | Target number of objects per bucket in the store hash table. | |
6787 | Lowering this value increases the total number of buckets and | |
6788 | also the storage maintenance rate. The default is 20. | |
6789 | DOC_END | |
6790 | ||
6791 | COMMENT_START | |
6792 | HTTP OPTIONS | |
6793 | ----------------------------------------------------------------------------- | |
6794 | COMMENT_END | |
6795 | ||
6796 | NAME: request_header_max_size | |
6797 | COMMENT: (KB) | |
6798 | TYPE: b_size_t | |
6799 | DEFAULT: 64 KB | |
6800 | LOC: Config.maxRequestHeaderSize | |
6801 | DOC_START | |
6802 | This directives limits the header size of a received HTTP request | |
6803 | (including request-line). Increasing this limit beyond its 64 KB default | |
6804 | exposes certain old Squid code to various denial-of-service attacks. This | |
6805 | limit also applies to received FTP commands. | |
6806 | ||
6807 | This limit has no direct affect on Squid memory consumption. | |
6808 | ||
6809 | Squid does not check this limit when sending requests. | |
6810 | DOC_END | |
6811 | ||
6812 | NAME: reply_header_max_size | |
6813 | COMMENT: (KB) | |
6814 | TYPE: b_size_t | |
6815 | DEFAULT: 64 KB | |
6816 | LOC: Config.maxReplyHeaderSize | |
6817 | DOC_START | |
6818 | This directives limits the header size of a received HTTP response | |
6819 | (including status-line). Increasing this limit beyond its 64 KB default | |
6820 | exposes certain old Squid code to various denial-of-service attacks. This | |
6821 | limit also applies to FTP command responses. | |
6822 | ||
6823 | Squid also checks this limit when loading hit responses from disk cache. | |
6824 | ||
6825 | Squid does not check this limit when sending responses. | |
6826 | DOC_END | |
6827 | ||
6828 | NAME: request_body_max_size | |
6829 | COMMENT: (bytes) | |
6830 | TYPE: b_int64_t | |
6831 | DEFAULT: 0 KB | |
6832 | DEFAULT_DOC: No limit. | |
6833 | LOC: Config.maxRequestBodySize | |
6834 | DOC_START | |
6835 | This specifies the maximum size for an HTTP request body. | |
6836 | In other words, the maximum size of a PUT/POST request. | |
6837 | A user who attempts to send a request with a body larger | |
6838 | than this limit receives an "Invalid Request" error message. | |
6839 | If you set this parameter to a zero (the default), there will | |
6840 | be no limit imposed. | |
6841 | ||
6842 | See also client_request_buffer_max_size for an alternative | |
6843 | limitation on client uploads which can be configured. | |
6844 | DOC_END | |
6845 | ||
6846 | NAME: client_request_buffer_max_size | |
6847 | COMMENT: (bytes) | |
6848 | TYPE: b_size_t | |
6849 | DEFAULT: 512 KB | |
6850 | LOC: Config.maxRequestBufferSize | |
6851 | DOC_START | |
6852 | This specifies the maximum buffer size of a client request. | |
6853 | It prevents squid eating too much memory when somebody uploads | |
6854 | a large file. | |
6855 | DOC_END | |
6856 | ||
6857 | NAME: broken_posts | |
6858 | IFDEF: USE_HTTP_VIOLATIONS | |
6859 | TYPE: acl_access | |
6860 | DEFAULT: none | |
6861 | DEFAULT_DOC: Obey RFC 2616. | |
6862 | LOC: Config.accessList.brokenPosts | |
6863 | DOC_START | |
6864 | A list of ACL elements which, if matched, causes Squid to send | |
6865 | an extra CRLF pair after the body of a PUT/POST request. | |
6866 | ||
6867 | Some HTTP servers has broken implementations of PUT/POST, | |
6868 | and rely on an extra CRLF pair sent by some WWW clients. | |
6869 | ||
6870 | Quote from RFC2616 section 4.1 on this matter: | |
6871 | ||
6872 | Note: certain buggy HTTP/1.0 client implementations generate an | |
6873 | extra CRLF's after a POST request. To restate what is explicitly | |
6874 | forbidden by the BNF, an HTTP/1.1 client must not preface or follow | |
6875 | a request with an extra CRLF. | |
6876 | ||
6877 | This clause only supports fast acl types. | |
6878 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
6879 | ||
6880 | Example: | |
6881 | acl buggy_server url_regex ^http://.... | |
6882 | broken_posts allow buggy_server | |
6883 | DOC_END | |
6884 | ||
6885 | NAME: adaptation_uses_indirect_client icap_uses_indirect_client | |
6886 | COMMENT: on|off | |
6887 | TYPE: onoff | |
6888 | IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_ADAPTATION | |
6889 | DEFAULT: on | |
6890 | LOC: Adaptation::Config::use_indirect_client | |
6891 | DOC_START | |
6892 | Controls whether the indirect client IP address (instead of the direct | |
6893 | client IP address) is passed to adaptation services. | |
6894 | ||
6895 | See also: follow_x_forwarded_for adaptation_send_client_ip | |
6896 | DOC_END | |
6897 | ||
6898 | NAME: via | |
6899 | IFDEF: USE_HTTP_VIOLATIONS | |
6900 | COMMENT: on|off | |
6901 | TYPE: onoff | |
6902 | DEFAULT: on | |
6903 | LOC: Config.onoff.via | |
6904 | DOC_START | |
6905 | If set (default), Squid will include a Via header in requests and | |
6906 | replies as required by RFC2616. | |
6907 | DOC_END | |
6908 | ||
6909 | NAME: vary_ignore_expire | |
6910 | COMMENT: on|off | |
6911 | TYPE: onoff | |
6912 | LOC: Config.onoff.vary_ignore_expire | |
6913 | DEFAULT: off | |
6914 | DOC_START | |
6915 | Many HTTP servers supporting Vary gives such objects | |
6916 | immediate expiry time with no cache-control header | |
6917 | when requested by a HTTP/1.0 client. This option | |
6918 | enables Squid to ignore such expiry times until | |
6919 | HTTP/1.1 is fully implemented. | |
6920 | ||
6921 | WARNING: If turned on this may eventually cause some | |
6922 | varying objects not intended for caching to get cached. | |
6923 | DOC_END | |
6924 | ||
6925 | NAME: request_header_access | |
6926 | IFDEF: USE_HTTP_VIOLATIONS | |
6927 | TYPE: http_header_access | |
6928 | LOC: Config.request_header_access | |
6929 | DEFAULT: none | |
6930 | DEFAULT_DOC: No limits. | |
6931 | DOC_START | |
6932 | Usage: request_header_access header_name allow|deny [!]aclname ... | |
6933 | ||
6934 | WARNING: Doing this VIOLATES the HTTP standard. Enabling | |
6935 | this feature could make you liable for problems which it | |
6936 | causes. | |
6937 | ||
6938 | This option replaces the old 'anonymize_headers' and the | |
6939 | older 'http_anonymizer' option with something that is much | |
6940 | more configurable. A list of ACLs for each header name allows | |
6941 | removal of specific header fields under specific conditions. | |
6942 | ||
6943 | This option only applies to outgoing HTTP request headers (i.e., | |
6944 | headers sent by Squid to the next HTTP hop such as a cache peer | |
6945 | or an origin server). The option has no effect during cache hit | |
6946 | detection. The equivalent adaptation vectoring point in ICAP | |
6947 | terminology is post-cache REQMOD. | |
6948 | ||
6949 | The option is applied to individual outgoing request header | |
6950 | fields. For each request header field F, Squid uses the first | |
6951 | qualifying sets of request_header_access rules: | |
6952 | ||
6953 | 1. Rules with header_name equal to F's name. | |
6954 | 2. Rules with header_name 'Other', provided F's name is not | |
6955 | on the hard-coded list of commonly used HTTP header names. | |
6956 | 3. Rules with header_name 'All'. | |
6957 | ||
6958 | Within that qualifying rule set, rule ACLs are checked as usual. | |
6959 | If ACLs of an "allow" rule match, the header field is allowed to | |
6960 | go through as is. If ACLs of a "deny" rule match, the header is | |
6961 | removed and request_header_replace is then checked to identify | |
6962 | if the removed header has a replacement. If no rules within the | |
6963 | set have matching ACLs, the header field is left as is. | |
6964 | ||
6965 | For example, to achieve the same behavior as the old | |
6966 | 'http_anonymizer standard' option, you should use: | |
6967 | ||
6968 | request_header_access From deny all | |
6969 | request_header_access Referer deny all | |
6970 | request_header_access User-Agent deny all | |
6971 | ||
6972 | Or, to reproduce the old 'http_anonymizer paranoid' feature | |
6973 | you should use: | |
6974 | ||
6975 | request_header_access Authorization allow all | |
6976 | request_header_access Proxy-Authorization allow all | |
6977 | request_header_access Cache-Control allow all | |
6978 | request_header_access Content-Length allow all | |
6979 | request_header_access Content-Type allow all | |
6980 | request_header_access Date allow all | |
6981 | request_header_access Host allow all | |
6982 | request_header_access If-Modified-Since allow all | |
6983 | request_header_access Pragma allow all | |
6984 | request_header_access Accept allow all | |
6985 | request_header_access Accept-Charset allow all | |
6986 | request_header_access Accept-Encoding allow all | |
6987 | request_header_access Accept-Language allow all | |
6988 | request_header_access Connection allow all | |
6989 | request_header_access All deny all | |
6990 | ||
6991 | HTTP reply headers are controlled with the reply_header_access directive. | |
6992 | ||
6993 | By default, all headers are allowed (no anonymizing is performed). | |
6994 | DOC_END | |
6995 | ||
6996 | NAME: reply_header_access | |
6997 | IFDEF: USE_HTTP_VIOLATIONS | |
6998 | TYPE: http_header_access | |
6999 | LOC: Config.reply_header_access | |
7000 | DEFAULT: none | |
7001 | DEFAULT_DOC: No limits. | |
7002 | DOC_START | |
7003 | Usage: reply_header_access header_name allow|deny [!]aclname ... | |
7004 | ||
7005 | WARNING: Doing this VIOLATES the HTTP standard. Enabling | |
7006 | this feature could make you liable for problems which it | |
7007 | causes. | |
7008 | ||
7009 | This option only applies to reply headers, i.e., from the | |
7010 | server to the client. | |
7011 | ||
7012 | This is the same as request_header_access, but in the other | |
7013 | direction. Please see request_header_access for detailed | |
7014 | documentation. | |
7015 | ||
7016 | For example, to achieve the same behavior as the old | |
7017 | 'http_anonymizer standard' option, you should use: | |
7018 | ||
7019 | reply_header_access Server deny all | |
7020 | reply_header_access WWW-Authenticate deny all | |
7021 | reply_header_access Link deny all | |
7022 | ||
7023 | Or, to reproduce the old 'http_anonymizer paranoid' feature | |
7024 | you should use: | |
7025 | ||
7026 | reply_header_access Allow allow all | |
7027 | reply_header_access WWW-Authenticate allow all | |
7028 | reply_header_access Proxy-Authenticate allow all | |
7029 | reply_header_access Cache-Control allow all | |
7030 | reply_header_access Content-Encoding allow all | |
7031 | reply_header_access Content-Length allow all | |
7032 | reply_header_access Content-Type allow all | |
7033 | reply_header_access Date allow all | |
7034 | reply_header_access Expires allow all | |
7035 | reply_header_access Last-Modified allow all | |
7036 | reply_header_access Location allow all | |
7037 | reply_header_access Pragma allow all | |
7038 | reply_header_access Content-Language allow all | |
7039 | reply_header_access Retry-After allow all | |
7040 | reply_header_access Title allow all | |
7041 | reply_header_access Content-Disposition allow all | |
7042 | reply_header_access Connection allow all | |
7043 | reply_header_access All deny all | |
7044 | ||
7045 | HTTP request headers are controlled with the request_header_access directive. | |
7046 | ||
7047 | By default, all headers are allowed (no anonymizing is | |
7048 | performed). | |
7049 | DOC_END | |
7050 | ||
7051 | NAME: request_header_replace header_replace | |
7052 | IFDEF: USE_HTTP_VIOLATIONS | |
7053 | TYPE: http_header_replace | |
7054 | LOC: Config.request_header_access | |
7055 | DEFAULT: none | |
7056 | DOC_START | |
7057 | Usage: request_header_replace header_name message | |
7058 | Example: request_header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit) | |
7059 | ||
7060 | This option allows you to change the contents of headers | |
7061 | denied with request_header_access above, by replacing them | |
7062 | with some fixed string. | |
7063 | ||
7064 | This only applies to request headers, not reply headers. | |
7065 | ||
7066 | By default, headers are removed if denied. | |
7067 | DOC_END | |
7068 | ||
7069 | NAME: reply_header_replace | |
7070 | IFDEF: USE_HTTP_VIOLATIONS | |
7071 | TYPE: http_header_replace | |
7072 | LOC: Config.reply_header_access | |
7073 | DEFAULT: none | |
7074 | DOC_START | |
7075 | Usage: reply_header_replace header_name message | |
7076 | Example: reply_header_replace Server Foo/1.0 | |
7077 | ||
7078 | This option allows you to change the contents of headers | |
7079 | denied with reply_header_access above, by replacing them | |
7080 | with some fixed string. | |
7081 | ||
7082 | This only applies to reply headers, not request headers. | |
7083 | ||
7084 | By default, headers are removed if denied. | |
7085 | DOC_END | |
7086 | ||
7087 | NAME: request_header_add | |
7088 | TYPE: HeaderWithAclList | |
7089 | LOC: Config.request_header_add | |
7090 | DEFAULT: none | |
7091 | DOC_START | |
7092 | Usage: request_header_add field-name field-value [ acl ... ] | |
7093 | Example: request_header_add X-Client-CA "CA=%ssl::>cert_issuer" all | |
7094 | ||
7095 | This option adds header fields to outgoing HTTP requests (i.e., | |
7096 | request headers sent by Squid to the next HTTP hop such as a | |
7097 | cache peer or an origin server). The option has no effect during | |
7098 | cache hit detection. The equivalent adaptation vectoring point | |
7099 | in ICAP terminology is post-cache REQMOD. | |
7100 | ||
7101 | Field-name is a token specifying an HTTP header name. If a | |
7102 | standard HTTP header name is used, Squid does not check whether | |
7103 | the new header conflicts with any existing headers or violates | |
7104 | HTTP rules. If the request to be modified already contains a | |
7105 | field with the same name, the old field is preserved but the | |
7106 | header field values are not merged. | |
7107 | ||
7108 | Field-value is either a token or a quoted string. If quoted | |
7109 | string format is used, then the surrounding quotes are removed | |
7110 | while escape sequences and %macros are processed. | |
7111 | ||
7112 | One or more Squid ACLs may be specified to restrict header | |
7113 | injection to matching requests. As always in squid.conf, all | |
7114 | ACLs in the ACL list must be satisfied for the insertion to | |
7115 | happen. The request_header_add supports fast ACLs only. | |
7116 | ||
7117 | See also: reply_header_add. | |
7118 | DOC_END | |
7119 | ||
7120 | NAME: reply_header_add | |
7121 | TYPE: HeaderWithAclList | |
7122 | LOC: Config.reply_header_add | |
7123 | DEFAULT: none | |
7124 | DOC_START | |
7125 | Usage: reply_header_add field-name field-value [ acl ... ] | |
7126 | Example: reply_header_add X-Client-CA "CA=%ssl::>cert_issuer" all | |
7127 | ||
7128 | This option adds header fields to outgoing HTTP responses (i.e., response | |
7129 | headers delivered by Squid to the client). This option has no effect on | |
7130 | cache hit detection. The equivalent adaptation vectoring point in | |
7131 | ICAP terminology is post-cache RESPMOD. This option does not apply to | |
7132 | successful CONNECT replies. | |
7133 | ||
7134 | Field-name is a token specifying an HTTP header name. If a | |
7135 | standard HTTP header name is used, Squid does not check whether | |
7136 | the new header conflicts with any existing headers or violates | |
7137 | HTTP rules. If the response to be modified already contains a | |
7138 | field with the same name, the old field is preserved but the | |
7139 | header field values are not merged. | |
7140 | ||
7141 | Field-value is either a token or a quoted string. If quoted | |
7142 | string format is used, then the surrounding quotes are removed | |
7143 | while escape sequences and %macros are processed. | |
7144 | ||
7145 | One or more Squid ACLs may be specified to restrict header | |
7146 | injection to matching responses. As always in squid.conf, all | |
7147 | ACLs in the ACL list must be satisfied for the insertion to | |
7148 | happen. The reply_header_add option supports fast ACLs only. | |
7149 | ||
7150 | See also: request_header_add. | |
7151 | DOC_END | |
7152 | ||
7153 | NAME: note | |
7154 | TYPE: note | |
7155 | LOC: Config.notes | |
7156 | DEFAULT: none | |
7157 | DOC_START | |
7158 | This option used to log custom information about the master | |
7159 | transaction. For example, an admin may configure Squid to log | |
7160 | which "user group" the transaction belongs to, where "user group" | |
7161 | will be determined based on a set of ACLs and not [just] | |
7162 | authentication information. | |
7163 | Values of key/value pairs can be logged using %{key}note macros: | |
7164 | ||
7165 | note key value acl ... | |
7166 | logformat myFormat ... %{key}note ... | |
7167 | ||
7168 | This clause only supports fast acl types. | |
7169 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
7170 | DOC_END | |
7171 | ||
7172 | NAME: relaxed_header_parser | |
7173 | COMMENT: on|off|warn | |
7174 | TYPE: tristate | |
7175 | LOC: Config.onoff.relaxed_header_parser | |
7176 | DEFAULT: on | |
7177 | DOC_START | |
7178 | In the default "on" setting Squid accepts certain forms | |
7179 | of non-compliant HTTP messages where it is unambiguous | |
7180 | what the sending application intended even if the message | |
7181 | is not correctly formatted. The messages is then normalized | |
7182 | to the correct form when forwarded by Squid. | |
7183 | ||
7184 | If set to "warn" then a warning will be emitted in cache.log | |
7185 | each time such HTTP error is encountered. | |
7186 | ||
7187 | If set to "off" then such HTTP errors will cause the request | |
7188 | or response to be rejected. | |
7189 | DOC_END | |
7190 | ||
7191 | NAME: collapsed_forwarding | |
7192 | COMMENT: (on|off) | |
7193 | TYPE: onoff | |
7194 | LOC: Config.onoff.collapsed_forwarding | |
7195 | DEFAULT: off | |
7196 | DOC_START | |
7197 | This option controls whether Squid is allowed to merge multiple | |
7198 | potentially cachable requests for the same URI before Squid knows | |
7199 | whether the response is going to be cachable. | |
7200 | ||
7201 | When enabled, instead of forwarding each concurrent request for | |
7202 | the same URL, Squid just sends the first of them. The other, so | |
7203 | called "collapsed" requests, wait for the response to the first | |
7204 | request and, if it happens to be cachable, use that response. | |
7205 | Here, "concurrent requests" means "received after the first | |
7206 | request headers were parsed and before the corresponding response | |
7207 | headers were parsed". | |
7208 | ||
7209 | This feature is disabled by default: enabling collapsed | |
7210 | forwarding needlessly delays forwarding requests that look | |
7211 | cachable (when they are collapsed) but then need to be forwarded | |
7212 | individually anyway because they end up being for uncachable | |
7213 | content. However, in some cases, such as acceleration of highly | |
7214 | cachable content with periodic or grouped expiration times, the | |
7215 | gains from collapsing [large volumes of simultaneous refresh | |
7216 | requests] outweigh losses from such delays. | |
7217 | ||
7218 | Squid collapses two kinds of requests: regular client requests | |
7219 | received on one of the listening ports and internal "cache | |
7220 | revalidation" requests which are triggered by those regular | |
7221 | requests hitting a stale cached object. Revalidation collapsing | |
7222 | is currently disabled for Squid instances containing SMP-aware | |
7223 | disk or memory caches and for Vary-controlled cached objects. | |
7224 | DOC_END | |
7225 | ||
7226 | NAME: collapsed_forwarding_access | |
7227 | TYPE: acl_access | |
7228 | DEFAULT: none | |
7229 | DEFAULT_DOC: Requests may be collapsed if collapsed_forwarding is on. | |
7230 | LOC: Config.accessList.collapsedForwardingAccess | |
7231 | DOC_START | |
7232 | Use this directive to restrict collapsed forwarding to a subset of | |
7233 | eligible requests. The directive is checked for regular HTTP | |
7234 | requests, internal revalidation requests, and HTCP/ICP requests. | |
7235 | ||
7236 | collapsed_forwarding_access allow|deny [!]aclname ... | |
7237 | ||
7238 | This directive cannot force collapsing. It has no effect on | |
7239 | collapsing unless collapsed_forwarding is 'on', and all other | |
7240 | collapsing preconditions are satisfied. | |
7241 | ||
7242 | * A denied request will not collapse, and future transactions will | |
7243 | not collapse on it (even if they are allowed to collapse). | |
7244 | ||
7245 | * An allowed request may collapse, or future transactions may | |
7246 | collapse on it (provided they are allowed to collapse). | |
7247 | ||
7248 | This directive is evaluated before receiving HTTP response headers | |
7249 | and without access to Squid-to-peer connection (if any). | |
7250 | ||
7251 | Only fast ACLs are supported. | |
7252 | ||
7253 | See also: collapsed_forwarding. | |
7254 | DOC_END | |
7255 | ||
7256 | NAME: shared_transient_entries_limit collapsed_forwarding_shared_entries_limit | |
7257 | COMMENT: (number of entries) | |
7258 | TYPE: int64_t | |
7259 | LOC: Config.shared_transient_entries_limit | |
7260 | DEFAULT: 16384 | |
7261 | DOC_START | |
7262 | This directive limits the size of a table used for sharing current | |
7263 | transaction information among SMP workers. A table entry stores meta | |
7264 | information about a single cache entry being delivered to Squid | |
7265 | client(s) by one or more SMP workers. A single table entry consumes | |
7266 | less than 128 shared memory bytes. | |
7267 | ||
7268 | The limit should be significantly larger than the number of | |
7269 | concurrent non-collapsed cachable responses leaving Squid. For a | |
7270 | cache that handles less than 5000 concurrent requests, the default | |
7271 | setting of 16384 should be plenty. | |
7272 | ||
7273 | Using excessively large values wastes shared memory. Limiting the | |
7274 | table size too much results in hash collisions, leading to lower hit | |
7275 | ratio and missed SMP request collapsing opportunities: Transactions | |
7276 | left without a table entry cannot cache their responses and are | |
7277 | invisible to other concurrent requests for the same resource. | |
7278 | ||
7279 | A zero limit is allowed but unsupported. A positive small limit | |
7280 | lowers hit ratio, but zero limit disables a lot of essential | |
7281 | synchronization among SMP workers, leading to HTTP violations (e.g., | |
7282 | stale hit responses). It also disables shared collapsed forwarding: | |
7283 | A worker becomes unable to collapse its requests on transactions in | |
7284 | other workers, resulting in more trips to the origin server and more | |
7285 | cache thrashing. | |
7286 | DOC_END | |
7287 | ||
7288 | COMMENT_START | |
7289 | TIMEOUTS | |
7290 | ----------------------------------------------------------------------------- | |
7291 | COMMENT_END | |
7292 | ||
7293 | NAME: forward_timeout | |
7294 | COMMENT: time-units | |
7295 | TYPE: time_t | |
7296 | LOC: Config.Timeout.forward | |
7297 | DEFAULT: 4 minutes | |
7298 | DOC_START | |
7299 | This parameter specifies how long Squid should at most attempt in | |
7300 | finding a forwarding path for the request before giving up. | |
7301 | DOC_END | |
7302 | ||
7303 | NAME: connect_timeout | |
7304 | COMMENT: time-units | |
7305 | TYPE: time_t | |
7306 | LOC: Config.Timeout.connect | |
7307 | DEFAULT: 1 minute | |
7308 | DOC_START | |
7309 | This parameter specifies how long to wait for the TCP connect to | |
7310 | the requested server or peer to complete before Squid should | |
7311 | attempt to find another path where to forward the request. | |
7312 | DOC_END | |
7313 | ||
7314 | NAME: peer_connect_timeout | |
7315 | COMMENT: time-units | |
7316 | TYPE: time_t | |
7317 | LOC: Config.Timeout.peer_connect | |
7318 | DEFAULT: 30 seconds | |
7319 | DOC_START | |
7320 | This parameter specifies how long to wait for a pending TCP | |
7321 | connection to a peer cache. The default is 30 seconds. You | |
7322 | may also set different timeout values for individual neighbors | |
7323 | with the 'connect-timeout' option on a 'cache_peer' line. | |
7324 | DOC_END | |
7325 | ||
7326 | NAME: read_timeout | |
7327 | COMMENT: time-units | |
7328 | TYPE: time_t | |
7329 | LOC: Config.Timeout.read | |
7330 | DEFAULT: 15 minutes | |
7331 | DOC_START | |
7332 | Applied on peer server connections. | |
7333 | ||
7334 | After each successful read(), the timeout will be extended by this | |
7335 | amount. If no data is read again after this amount of time, | |
7336 | the request is aborted and logged with ERR_READ_TIMEOUT. | |
7337 | ||
7338 | The default is 15 minutes. | |
7339 | DOC_END | |
7340 | ||
7341 | NAME: write_timeout | |
7342 | COMMENT: time-units | |
7343 | TYPE: time_t | |
7344 | LOC: Config.Timeout.write | |
7345 | DEFAULT: 15 minutes | |
7346 | DOC_START | |
7347 | This timeout is tracked for all connections that have data | |
7348 | available for writing and are waiting for the socket to become | |
7349 | ready. After each successful write, the timeout is extended by | |
7350 | the configured amount. If Squid has data to write but the | |
7351 | connection is not ready for the configured duration, the | |
7352 | transaction associated with the connection is terminated. The | |
7353 | default is 15 minutes. | |
7354 | DOC_END | |
7355 | ||
7356 | NAME: request_timeout | |
7357 | TYPE: time_t | |
7358 | LOC: Config.Timeout.request | |
7359 | DEFAULT: 5 minutes | |
7360 | DOC_START | |
7361 | How long to wait for complete HTTP request headers after initial | |
7362 | connection establishment. | |
7363 | DOC_END | |
7364 | ||
7365 | NAME: request_start_timeout | |
7366 | TYPE: time_t | |
7367 | LOC: Config.Timeout.request_start_timeout | |
7368 | DEFAULT: 5 minutes | |
7369 | DOC_START | |
7370 | How long to wait for the first request byte after initial | |
7371 | connection establishment. | |
7372 | DOC_END | |
7373 | ||
7374 | NAME: client_idle_pconn_timeout persistent_request_timeout | |
7375 | TYPE: time_t | |
7376 | LOC: Config.Timeout.clientIdlePconn | |
7377 | DEFAULT: 2 minutes | |
7378 | DOC_START | |
7379 | How long to wait for the next HTTP request on a persistent | |
7380 | client connection after the previous request completes. | |
7381 | DOC_END | |
7382 | ||
7383 | NAME: ftp_client_idle_timeout | |
7384 | TYPE: time_t | |
7385 | LOC: Config.Timeout.ftpClientIdle | |
7386 | DEFAULT: 30 minutes | |
7387 | DOC_START | |
7388 | How long to wait for an FTP request on a connection to Squid ftp_port. | |
7389 | Many FTP clients do not deal with idle connection closures well, | |
7390 | necessitating a longer default timeout than client_idle_pconn_timeout | |
7391 | used for incoming HTTP requests. | |
7392 | DOC_END | |
7393 | ||
7394 | NAME: client_lifetime | |
7395 | COMMENT: time-units | |
7396 | TYPE: time_t | |
7397 | LOC: Config.Timeout.lifetime | |
7398 | DEFAULT: 1 day | |
7399 | DOC_START | |
7400 | The maximum amount of time a client (browser) is allowed to | |
7401 | remain connected to the cache process. This protects the Cache | |
7402 | from having a lot of sockets (and hence file descriptors) tied up | |
7403 | in a CLOSE_WAIT state from remote clients that go away without | |
7404 | properly shutting down (either because of a network failure or | |
7405 | because of a poor client implementation). The default is one | |
7406 | day, 1440 minutes. | |
7407 | ||
7408 | NOTE: The default value is intended to be much larger than any | |
7409 | client would ever need to be connected to your cache. You | |
7410 | should probably change client_lifetime only as a last resort. | |
7411 | If you seem to have many client connections tying up | |
7412 | filedescriptors, we recommend first tuning the read_timeout, | |
7413 | request_timeout, persistent_request_timeout and quick_abort values. | |
7414 | DOC_END | |
7415 | ||
7416 | NAME: pconn_lifetime | |
7417 | COMMENT: time-units | |
7418 | TYPE: time_t | |
7419 | LOC: Config.Timeout.pconnLifetime | |
7420 | DEFAULT: 0 seconds | |
7421 | DOC_START | |
7422 | Desired maximum lifetime of a persistent connection. | |
7423 | When set, Squid will close a now-idle persistent connection that | |
7424 | exceeded configured lifetime instead of moving the connection into | |
7425 | the idle connection pool (or equivalent). No effect on ongoing/active | |
7426 | transactions. Connection lifetime is the time period from the | |
7427 | connection acceptance or opening time until "now". | |
7428 | ||
7429 | This limit is useful in environments with long-lived connections | |
7430 | where Squid configuration or environmental factors change during a | |
7431 | single connection lifetime. If unrestricted, some connections may | |
7432 | last for hours and even days, ignoring those changes that should | |
7433 | have affected their behavior or their existence. | |
7434 | ||
7435 | Currently, a new lifetime value supplied via Squid reconfiguration | |
7436 | has no effect on already idle connections unless they become busy. | |
7437 | ||
7438 | When set to '0' this limit is not used. | |
7439 | DOC_END | |
7440 | ||
7441 | NAME: half_closed_clients | |
7442 | TYPE: onoff | |
7443 | LOC: Config.onoff.half_closed_clients | |
7444 | DEFAULT: off | |
7445 | DOC_START | |
7446 | Some clients may shutdown the sending side of their TCP | |
7447 | connections, while leaving their receiving sides open. Sometimes, | |
7448 | Squid can not tell the difference between a half-closed and a | |
7449 | fully-closed TCP connection. | |
7450 | ||
7451 | By default, Squid will immediately close client connections when | |
7452 | read(2) returns "no more data to read." | |
7453 | ||
7454 | Change this option to 'on' and Squid will keep open connections | |
7455 | until a read(2) or write(2) on the socket returns an error. | |
7456 | This may show some benefits for reverse proxies. But if not | |
7457 | it is recommended to leave OFF. | |
7458 | DOC_END | |
7459 | ||
7460 | NAME: server_idle_pconn_timeout pconn_timeout | |
7461 | TYPE: time_t | |
7462 | LOC: Config.Timeout.serverIdlePconn | |
7463 | DEFAULT: 1 minute | |
7464 | DOC_START | |
7465 | Timeout for idle persistent connections to servers and other | |
7466 | proxies. | |
7467 | DOC_END | |
7468 | ||
7469 | NAME: shutdown_lifetime | |
7470 | COMMENT: time-units | |
7471 | TYPE: time_t | |
7472 | LOC: Config.shutdownLifetime | |
7473 | DEFAULT: 30 seconds | |
7474 | DOC_START | |
7475 | When SIGTERM or SIGHUP is received, the cache is put into | |
7476 | "shutdown pending" mode until all active sockets are closed. | |
7477 | This value is the lifetime to set for all open descriptors | |
7478 | during shutdown mode. Any active clients after this many | |
7479 | seconds will receive a 'timeout' message. | |
7480 | DOC_END | |
7481 | ||
7482 | COMMENT_START | |
7483 | ADMINISTRATIVE PARAMETERS | |
7484 | ----------------------------------------------------------------------------- | |
7485 | COMMENT_END | |
7486 | ||
7487 | NAME: cache_mgr | |
7488 | TYPE: string | |
7489 | DEFAULT: webmaster | |
7490 | LOC: Config.adminEmail | |
7491 | DOC_START | |
7492 | Email-address of local cache manager who will receive | |
7493 | mail if the cache dies. The default is "webmaster". | |
7494 | DOC_END | |
7495 | ||
7496 | NAME: mail_from | |
7497 | TYPE: string | |
7498 | DEFAULT: none | |
7499 | LOC: Config.EmailFrom | |
7500 | DOC_START | |
7501 | From: email-address for mail sent when the cache dies. | |
7502 | The default is to use 'squid@unique_hostname'. | |
7503 | ||
7504 | See also: unique_hostname directive. | |
7505 | DOC_END | |
7506 | ||
7507 | NAME: mail_program | |
7508 | TYPE: eol | |
7509 | DEFAULT: mail | |
7510 | LOC: Config.EmailProgram | |
7511 | DOC_START | |
7512 | Email program used to send mail if the cache dies. | |
7513 | The default is "mail". The specified program must comply | |
7514 | with the standard Unix mail syntax: | |
7515 | mail-program recipient < mailfile | |
7516 | ||
7517 | Optional command line options can be specified. | |
7518 | DOC_END | |
7519 | ||
7520 | NAME: cache_effective_user | |
7521 | TYPE: string | |
7522 | DEFAULT: @DEFAULT_CACHE_EFFECTIVE_USER@ | |
7523 | LOC: Config.effectiveUser | |
7524 | DOC_START | |
7525 | If you start Squid as root, it will change its effective/real | |
7526 | UID/GID to the user specified below. The default is to change | |
7527 | to UID of @DEFAULT_CACHE_EFFECTIVE_USER@. | |
7528 | see also; cache_effective_group | |
7529 | DOC_END | |
7530 | ||
7531 | NAME: cache_effective_group | |
7532 | TYPE: string | |
7533 | DEFAULT: none | |
7534 | DEFAULT_DOC: Use system group memberships of the cache_effective_user account | |
7535 | LOC: Config.effectiveGroup | |
7536 | DOC_START | |
7537 | Squid sets the GID to the effective user's default group ID | |
7538 | (taken from the password file) and supplementary group list | |
7539 | from the groups membership. | |
7540 | ||
7541 | If you want Squid to run with a specific GID regardless of | |
7542 | the group memberships of the effective user then set this | |
7543 | to the group (or GID) you want Squid to run as. When set | |
7544 | all other group privileges of the effective user are ignored | |
7545 | and only this GID is effective. If Squid is not started as | |
7546 | root the user starting Squid MUST be member of the specified | |
7547 | group. | |
7548 | ||
7549 | This option is not recommended by the Squid Team. | |
7550 | Our preference is for administrators to configure a secure | |
7551 | user account for squid with UID/GID matching system policies. | |
7552 | DOC_END | |
7553 | ||
7554 | NAME: httpd_suppress_version_string | |
7555 | COMMENT: on|off | |
7556 | TYPE: onoff | |
7557 | DEFAULT: off | |
7558 | LOC: Config.onoff.httpd_suppress_version_string | |
7559 | DOC_START | |
7560 | Do not send Squid version string in HTTP metadata and generated content | |
7561 | such as HTML error pages. Squid version string is still present in certain | |
7562 | SNMP responses, HTTP(S) Server response header field, | |
7563 | various console output, and cache.log. | |
7564 | DOC_END | |
7565 | ||
7566 | NAME: visible_hostname | |
7567 | TYPE: string | |
7568 | LOC: Config.visibleHostname | |
7569 | DEFAULT: none | |
7570 | DEFAULT_DOC: Automatically detect the system host name | |
7571 | DOC_START | |
7572 | If you want to present a special hostname in error messages, etc, | |
7573 | define this. Otherwise, the return value of gethostname() | |
7574 | will be used. If you have multiple caches in a cluster and | |
7575 | get errors about IP-forwarding you must set them to have individual | |
7576 | names with this setting. | |
7577 | DOC_END | |
7578 | ||
7579 | NAME: unique_hostname | |
7580 | TYPE: string | |
7581 | LOC: Config.uniqueHostname | |
7582 | DEFAULT: none | |
7583 | DEFAULT_DOC: Copy the value from visible_hostname | |
7584 | DOC_START | |
7585 | If you want to have multiple machines with the same | |
7586 | 'visible_hostname' you must give each machine a different | |
7587 | 'unique_hostname' so forwarding loops can be detected. | |
7588 | DOC_END | |
7589 | ||
7590 | NAME: hostname_aliases | |
7591 | TYPE: SBufList | |
7592 | LOC: Config.hostnameAliases | |
7593 | DEFAULT: none | |
7594 | DOC_START | |
7595 | A list of other DNS names your cache has. | |
7596 | DOC_END | |
7597 | ||
7598 | NAME: umask | |
7599 | TYPE: int | |
7600 | LOC: Config.umask | |
7601 | DEFAULT: 027 | |
7602 | DOC_START | |
7603 | Minimum umask which should be enforced while the proxy | |
7604 | is running, in addition to the umask set at startup. | |
7605 | ||
7606 | For a traditional octal representation of umasks, start | |
7607 | your value with 0. | |
7608 | DOC_END | |
7609 | ||
7610 | COMMENT_START | |
7611 | HTTPD-ACCELERATOR OPTIONS | |
7612 | ----------------------------------------------------------------------------- | |
7613 | COMMENT_END | |
7614 | ||
7615 | NAME: httpd_accel_surrogate_id | |
7616 | TYPE: string | |
7617 | DEFAULT: none | |
7618 | DEFAULT_DOC: visible_hostname is used if no specific ID is set. | |
7619 | LOC: Config.Accel.surrogate_id | |
7620 | DOC_START | |
7621 | Surrogates (http://www.esi.org/architecture_spec_1.0.html) | |
7622 | need an identification token to allow control targeting. Because | |
7623 | a farm of surrogates may all perform the same tasks, they may share | |
7624 | an identification token. | |
7625 | ||
7626 | When the surrogate is a reverse-proxy, this ID is also | |
7627 | used as cdn-id for CDN-Loop detection (RFC 8586). | |
7628 | DOC_END | |
7629 | ||
7630 | NAME: http_accel_surrogate_remote | |
7631 | COMMENT: on|off | |
7632 | TYPE: onoff | |
7633 | DEFAULT: off | |
7634 | LOC: Config.onoff.surrogate_is_remote | |
7635 | DOC_START | |
7636 | Remote surrogates (such as those in a CDN) honour the header | |
7637 | "Surrogate-Control: no-store-remote". | |
7638 | ||
7639 | Set this to on to have squid behave as a remote surrogate. | |
7640 | DOC_END | |
7641 | ||
7642 | NAME: esi_parser | |
7643 | IFDEF: USE_SQUID_ESI | |
7644 | COMMENT: libxml2|expat | |
7645 | TYPE: string | |
7646 | LOC: ESIParser::Type | |
7647 | DEFAULT: auto | |
7648 | DEFAULT_DOC: Selects libxml2 if available at ./configure time or libexpat otherwise. | |
7649 | DOC_START | |
7650 | Selects the XML parsing library to use when interpreting responses with | |
7651 | Edge Side Includes. | |
7652 | ||
7653 | To disable ESI handling completely, ./configure Squid with --disable-esi. | |
7654 | DOC_END | |
7655 | ||
7656 | COMMENT_START | |
7657 | DELAY POOL PARAMETERS | |
7658 | ----------------------------------------------------------------------------- | |
7659 | COMMENT_END | |
7660 | ||
7661 | NAME: delay_pools | |
7662 | TYPE: delay_pool_count | |
7663 | DEFAULT: 0 | |
7664 | IFDEF: USE_DELAY_POOLS | |
7665 | LOC: Config.Delay | |
7666 | DOC_START | |
7667 | This represents the number of delay pools to be used. For example, | |
7668 | if you have one class 2 delay pool and one class 3 delays pool, you | |
7669 | have a total of 2 delay pools. | |
7670 | ||
7671 | See also delay_parameters, delay_class, delay_access for pool | |
7672 | configuration details. | |
7673 | DOC_END | |
7674 | ||
7675 | NAME: delay_class | |
7676 | TYPE: delay_pool_class | |
7677 | DEFAULT: none | |
7678 | IFDEF: USE_DELAY_POOLS | |
7679 | LOC: Config.Delay | |
7680 | DOC_START | |
7681 | This defines the class of each delay pool. There must be exactly one | |
7682 | delay_class line for each delay pool. For example, to define two | |
7683 | delay pools, one of class 2 and one of class 3, the settings above | |
7684 | and here would be: | |
7685 | ||
7686 | Example: | |
7687 | delay_pools 4 # 4 delay pools | |
7688 | delay_class 1 2 # pool 1 is a class 2 pool | |
7689 | delay_class 2 3 # pool 2 is a class 3 pool | |
7690 | delay_class 3 4 # pool 3 is a class 4 pool | |
7691 | delay_class 4 5 # pool 4 is a class 5 pool | |
7692 | ||
7693 | The delay pool classes are: | |
7694 | ||
7695 | class 1 Everything is limited by a single aggregate | |
7696 | bucket. | |
7697 | ||
7698 | class 2 Everything is limited by a single aggregate | |
7699 | bucket as well as an "individual" bucket chosen | |
7700 | from bits 25 through 32 of the IPv4 address. | |
7701 | ||
7702 | class 3 Everything is limited by a single aggregate | |
7703 | bucket as well as a "network" bucket chosen | |
7704 | from bits 17 through 24 of the IP address and a | |
7705 | "individual" bucket chosen from bits 17 through | |
7706 | 32 of the IPv4 address. | |
7707 | ||
7708 | class 4 Everything in a class 3 delay pool, with an | |
7709 | additional limit on a per user basis. This | |
7710 | only takes effect if the username is established | |
7711 | in advance - by forcing authentication in your | |
7712 | http_access rules. | |
7713 | ||
7714 | class 5 Requests are grouped according their tag (see | |
7715 | external_acl's tag= reply). | |
7716 | ||
7717 | ||
7718 | Each pool also requires a delay_parameters directive to configure the pool size | |
7719 | and speed limits used whenever the pool is applied to a request. Along with | |
7720 | a set of delay_access directives to determine when it is used. | |
7721 | ||
7722 | NOTE: If an IP address is a.b.c.d | |
7723 | -> bits 25 through 32 are "d" | |
7724 | -> bits 17 through 24 are "c" | |
7725 | -> bits 17 through 32 are "c * 256 + d" | |
7726 | ||
7727 | NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to | |
7728 | IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic. | |
7729 | ||
7730 | This clause only supports fast acl types. | |
7731 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
7732 | ||
7733 | See also delay_parameters and delay_access. | |
7734 | DOC_END | |
7735 | ||
7736 | NAME: delay_access | |
7737 | TYPE: delay_pool_access | |
7738 | DEFAULT: none | |
7739 | DEFAULT_DOC: Deny using the pool, unless allow rules exist in squid.conf for the pool. | |
7740 | IFDEF: USE_DELAY_POOLS | |
7741 | LOC: Config.Delay | |
7742 | DOC_START | |
7743 | This is used to determine which delay pool a request falls into. | |
7744 | ||
7745 | delay_access is sorted per pool and the matching starts with pool 1, | |
7746 | then pool 2, ..., and finally pool N. The first delay pool where the | |
7747 | request is allowed is selected for the request. If it does not allow | |
7748 | the request to any pool then the request is not delayed (default). | |
7749 | ||
7750 | For example, if you want some_big_clients in delay | |
7751 | pool 1 and lotsa_little_clients in delay pool 2: | |
7752 | ||
7753 | delay_access 1 allow some_big_clients | |
7754 | delay_access 1 deny all | |
7755 | delay_access 2 allow lotsa_little_clients | |
7756 | delay_access 2 deny all | |
7757 | delay_access 3 allow authenticated_clients | |
7758 | ||
7759 | See also delay_parameters and delay_class. | |
7760 | ||
7761 | DOC_END | |
7762 | ||
7763 | NAME: delay_parameters | |
7764 | TYPE: delay_pool_rates | |
7765 | DEFAULT: none | |
7766 | IFDEF: USE_DELAY_POOLS | |
7767 | LOC: Config.Delay | |
7768 | DOC_START | |
7769 | This defines the parameters for a delay pool. Each delay pool has | |
7770 | a number of "buckets" associated with it, as explained in the | |
7771 | description of delay_class. | |
7772 | ||
7773 | For a class 1 delay pool, the syntax is: | |
7774 | delay_class pool 1 | |
7775 | delay_parameters pool aggregate | |
7776 | ||
7777 | For a class 2 delay pool: | |
7778 | delay_class pool 2 | |
7779 | delay_parameters pool aggregate individual | |
7780 | ||
7781 | For a class 3 delay pool: | |
7782 | delay_class pool 3 | |
7783 | delay_parameters pool aggregate network individual | |
7784 | ||
7785 | For a class 4 delay pool: | |
7786 | delay_class pool 4 | |
7787 | delay_parameters pool aggregate network individual user | |
7788 | ||
7789 | For a class 5 delay pool: | |
7790 | delay_class pool 5 | |
7791 | delay_parameters pool tagrate | |
7792 | ||
7793 | The option variables are: | |
7794 | ||
7795 | pool a pool number - ie, a number between 1 and the | |
7796 | number specified in delay_pools as used in | |
7797 | delay_class lines. | |
7798 | ||
7799 | aggregate the speed limit parameters for the aggregate bucket | |
7800 | (class 1, 2, 3). | |
7801 | ||
7802 | individual the speed limit parameters for the individual | |
7803 | buckets (class 2, 3). | |
7804 | ||
7805 | network the speed limit parameters for the network buckets | |
7806 | (class 3). | |
7807 | ||
7808 | user the speed limit parameters for the user buckets | |
7809 | (class 4). | |
7810 | ||
7811 | tagrate the speed limit parameters for the tag buckets | |
7812 | (class 5). | |
7813 | ||
7814 | A pair of delay parameters is written restore/maximum, where restore is | |
7815 | the number of bytes (not bits - modem and network speeds are usually | |
7816 | quoted in bits) per second placed into the bucket, and maximum is the | |
7817 | maximum number of bytes which can be in the bucket at any time. | |
7818 | ||
7819 | There must be one delay_parameters line for each delay pool. | |
7820 | ||
7821 | ||
7822 | For example, if delay pool number 1 is a class 2 delay pool as in the | |
7823 | above example, and is being used to strictly limit each host to 64Kbit/sec | |
7824 | (plus overheads), with no overall limit, the line is: | |
7825 | ||
7826 | delay_parameters 1 none 8000/8000 | |
7827 | ||
7828 | Note that 8 x 8K Byte/sec -> 64K bit/sec. | |
7829 | ||
7830 | Note that the word 'none' is used to represent no limit. | |
7831 | ||
7832 | ||
7833 | And, if delay pool number 2 is a class 3 delay pool as in the above | |
7834 | example, and you want to limit it to a total of 256Kbit/sec (strict limit) | |
7835 | with each 8-bit network permitted 64Kbit/sec (strict limit) and each | |
7836 | individual host permitted 4800bit/sec with a bucket maximum size of 64Kbits | |
7837 | to permit a decent web page to be downloaded at a decent speed | |
7838 | (if the network is not being limited due to overuse) but slow down | |
7839 | large downloads more significantly: | |
7840 | ||
7841 | delay_parameters 2 32000/32000 8000/8000 600/8000 | |
7842 | ||
7843 | Note that 8 x 32K Byte/sec -> 256K bit/sec. | |
7844 | 8 x 8K Byte/sec -> 64K bit/sec. | |
7845 | 8 x 600 Byte/sec -> 4800 bit/sec. | |
7846 | ||
7847 | ||
7848 | Finally, for a class 4 delay pool as in the example - each user will | |
7849 | be limited to 128Kbits/sec no matter how many workstations they are logged into.: | |
7850 | ||
7851 | delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000 | |
7852 | ||
7853 | ||
7854 | See also delay_class and delay_access. | |
7855 | ||
7856 | DOC_END | |
7857 | ||
7858 | NAME: delay_initial_bucket_level | |
7859 | COMMENT: (percent, 0-100) | |
7860 | TYPE: u_short | |
7861 | DEFAULT: 50 | |
7862 | IFDEF: USE_DELAY_POOLS | |
7863 | LOC: Config.Delay.initial | |
7864 | DOC_START | |
7865 | The initial bucket percentage is used to determine how much is put | |
7866 | in each bucket when squid starts, is reconfigured, or first notices | |
7867 | a host accessing it (in class 2 and class 3, individual hosts and | |
7868 | networks only have buckets associated with them once they have been | |
7869 | "seen" by squid). | |
7870 | DOC_END | |
7871 | ||
7872 | COMMENT_START | |
7873 | CLIENT DELAY POOL PARAMETERS | |
7874 | ----------------------------------------------------------------------------- | |
7875 | COMMENT_END | |
7876 | ||
7877 | NAME: client_delay_pools | |
7878 | TYPE: client_delay_pool_count | |
7879 | DEFAULT: 0 | |
7880 | IFDEF: USE_DELAY_POOLS | |
7881 | LOC: Config.ClientDelay | |
7882 | DOC_START | |
7883 | This option specifies the number of client delay pools used. It must | |
7884 | preceed other client_delay_* options. | |
7885 | ||
7886 | Example: | |
7887 | client_delay_pools 2 | |
7888 | ||
7889 | See also client_delay_parameters and client_delay_access. | |
7890 | DOC_END | |
7891 | ||
7892 | NAME: client_delay_initial_bucket_level | |
7893 | COMMENT: (percent, 0-no_limit) | |
7894 | TYPE: u_short | |
7895 | DEFAULT: 50 | |
7896 | IFDEF: USE_DELAY_POOLS | |
7897 | LOC: Config.ClientDelay.initial | |
7898 | DOC_START | |
7899 | This option determines the initial bucket size as a percentage of | |
7900 | max_bucket_size from client_delay_parameters. Buckets are created | |
7901 | at the time of the "first" connection from the matching IP. Idle | |
7902 | buckets are periodically deleted up. | |
7903 | ||
7904 | You can specify more than 100 percent but note that such "oversized" | |
7905 | buckets are not refilled until their size goes down to max_bucket_size | |
7906 | from client_delay_parameters. | |
7907 | ||
7908 | Example: | |
7909 | client_delay_initial_bucket_level 50 | |
7910 | DOC_END | |
7911 | ||
7912 | NAME: client_delay_parameters | |
7913 | TYPE: client_delay_pool_rates | |
7914 | DEFAULT: none | |
7915 | IFDEF: USE_DELAY_POOLS | |
7916 | LOC: Config.ClientDelay | |
7917 | DOC_START | |
7918 | ||
7919 | This option configures client-side bandwidth limits using the | |
7920 | following format: | |
7921 | ||
7922 | client_delay_parameters pool speed_limit max_bucket_size | |
7923 | ||
7924 | pool is an integer ID used for client_delay_access matching. | |
7925 | ||
7926 | speed_limit is bytes added to the bucket per second. | |
7927 | ||
7928 | max_bucket_size is the maximum size of a bucket, enforced after any | |
7929 | speed_limit additions. | |
7930 | ||
7931 | Please see the delay_parameters option for more information and | |
7932 | examples. | |
7933 | ||
7934 | Example: | |
7935 | client_delay_parameters 1 1024 2048 | |
7936 | client_delay_parameters 2 51200 16384 | |
7937 | ||
7938 | See also client_delay_access. | |
7939 | ||
7940 | DOC_END | |
7941 | ||
7942 | NAME: client_delay_access | |
7943 | TYPE: client_delay_pool_access | |
7944 | DEFAULT: none | |
7945 | DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool. | |
7946 | IFDEF: USE_DELAY_POOLS | |
7947 | LOC: Config.ClientDelay | |
7948 | DOC_START | |
7949 | This option determines the client-side delay pool for the | |
7950 | request: | |
7951 | ||
7952 | client_delay_access pool_ID allow|deny acl_name | |
7953 | ||
7954 | All client_delay_access options are checked in their pool ID | |
7955 | order, starting with pool 1. The first checked pool with allowed | |
7956 | request is selected for the request. If no ACL matches or there | |
7957 | are no client_delay_access options, the request bandwidth is not | |
7958 | limited. | |
7959 | ||
7960 | The ACL-selected pool is then used to find the | |
7961 | client_delay_parameters for the request. Client-side pools are | |
7962 | not used to aggregate clients. Clients are always aggregated | |
7963 | based on their source IP addresses (one bucket per source IP). | |
7964 | ||
7965 | This clause only supports fast acl types. | |
7966 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
7967 | Additionally, only the client TCP connection details are available. | |
7968 | ACLs testing HTTP properties will not work. | |
7969 | ||
7970 | Please see delay_access for more examples. | |
7971 | ||
7972 | Example: | |
7973 | client_delay_access 1 allow low_rate_network | |
7974 | client_delay_access 2 allow vips_network | |
7975 | ||
7976 | ||
7977 | See also client_delay_parameters and client_delay_pools. | |
7978 | DOC_END | |
7979 | ||
7980 | NAME: response_delay_pool | |
7981 | TYPE: response_delay_pool_parameters | |
7982 | DEFAULT: none | |
7983 | IFDEF: USE_DELAY_POOLS | |
7984 | LOC: Config.MessageDelay | |
7985 | DOC_START | |
7986 | This option configures client response bandwidth limits using the | |
7987 | following format: | |
7988 | ||
7989 | response_delay_pool name [option=value] ... | |
7990 | ||
7991 | name the response delay pool name | |
7992 | ||
7993 | available options: | |
7994 | ||
7995 | individual-restore The speed limit of an individual | |
7996 | bucket(bytes/s). To be used in conjunction | |
7997 | with 'individual-maximum'. | |
7998 | ||
7999 | individual-maximum The maximum number of bytes which can | |
8000 | be placed into the individual bucket. To be used | |
8001 | in conjunction with 'individual-restore'. | |
8002 | ||
8003 | aggregate-restore The speed limit for the aggregate | |
8004 | bucket(bytes/s). To be used in conjunction with | |
8005 | 'aggregate-maximum'. | |
8006 | ||
8007 | aggregate-maximum The maximum number of bytes which can | |
8008 | be placed into the aggregate bucket. To be used | |
8009 | in conjunction with 'aggregate-restore'. | |
8010 | ||
8011 | initial-bucket-level The initial bucket size as a percentage | |
8012 | of individual-maximum. | |
8013 | ||
8014 | Individual and(or) aggregate bucket options may not be specified, | |
8015 | meaning no individual and(or) aggregate speed limitation. | |
8016 | See also response_delay_pool_access and delay_parameters for | |
8017 | terminology details. | |
8018 | DOC_END | |
8019 | ||
8020 | NAME: response_delay_pool_access | |
8021 | TYPE: response_delay_pool_access | |
8022 | DEFAULT: none | |
8023 | DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool. | |
8024 | IFDEF: USE_DELAY_POOLS | |
8025 | LOC: Config.MessageDelay | |
8026 | DOC_START | |
8027 | Determines whether a specific named response delay pool is used | |
8028 | for the transaction. The syntax for this directive is: | |
8029 | ||
8030 | response_delay_pool_access pool_name allow|deny acl_name | |
8031 | ||
8032 | All response_delay_pool_access options are checked in the order | |
8033 | they appear in this configuration file. The first rule with a | |
8034 | matching ACL wins. If (and only if) an "allow" rule won, Squid | |
8035 | assigns the response to the corresponding named delay pool. | |
8036 | DOC_END | |
8037 | ||
8038 | COMMENT_START | |
8039 | WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS | |
8040 | ----------------------------------------------------------------------------- | |
8041 | COMMENT_END | |
8042 | ||
8043 | NAME: wccp_router | |
8044 | TYPE: address | |
8045 | LOC: Config.Wccp.router | |
8046 | DEFAULT: any_addr | |
8047 | DEFAULT_DOC: WCCP disabled. | |
8048 | IFDEF: USE_WCCP | |
8049 | DOC_START | |
8050 | Use this option to define your WCCP ``home'' router for | |
8051 | Squid. | |
8052 | ||
8053 | wccp_router supports a single WCCP(v1) router | |
8054 | ||
8055 | wccp2_router supports multiple WCCPv2 routers | |
8056 | ||
8057 | only one of the two may be used at the same time and defines | |
8058 | which version of WCCP to use. | |
8059 | DOC_END | |
8060 | ||
8061 | NAME: wccp2_router | |
8062 | TYPE: IpAddress_list | |
8063 | LOC: Config.Wccp2.router | |
8064 | DEFAULT: none | |
8065 | DEFAULT_DOC: WCCPv2 disabled. | |
8066 | IFDEF: USE_WCCPv2 | |
8067 | DOC_START | |
8068 | Use this option to define your WCCP ``home'' router for | |
8069 | Squid. | |
8070 | ||
8071 | wccp_router supports a single WCCP(v1) router | |
8072 | ||
8073 | wccp2_router supports multiple WCCPv2 routers | |
8074 | ||
8075 | only one of the two may be used at the same time and defines | |
8076 | which version of WCCP to use. | |
8077 | DOC_END | |
8078 | ||
8079 | NAME: wccp_version | |
8080 | TYPE: int | |
8081 | LOC: Config.Wccp.version | |
8082 | DEFAULT: 4 | |
8083 | IFDEF: USE_WCCP | |
8084 | DOC_START | |
8085 | This directive is only relevant if you need to set up WCCP(v1) | |
8086 | to some very old and end-of-life Cisco routers. In all other | |
8087 | setups it must be left unset or at the default setting. | |
8088 | It defines an internal version in the WCCP(v1) protocol, | |
8089 | with version 4 being the officially documented protocol. | |
8090 | ||
8091 | According to some users, Cisco IOS 11.2 and earlier only | |
8092 | support WCCP version 3. If you're using that or an earlier | |
8093 | version of IOS, you may need to change this value to 3, otherwise | |
8094 | do not specify this parameter. | |
8095 | DOC_END | |
8096 | ||
8097 | NAME: wccp2_rebuild_wait | |
8098 | TYPE: onoff | |
8099 | LOC: Config.Wccp2.rebuildwait | |
8100 | DEFAULT: on | |
8101 | IFDEF: USE_WCCPv2 | |
8102 | DOC_START | |
8103 | If this is enabled Squid will wait for the cache dir rebuild to finish | |
8104 | before sending the first wccp2 HereIAm packet | |
8105 | DOC_END | |
8106 | ||
8107 | NAME: wccp2_forwarding_method | |
8108 | TYPE: wccp2_method | |
8109 | LOC: Config.Wccp2.forwarding_method | |
8110 | DEFAULT: gre | |
8111 | IFDEF: USE_WCCPv2 | |
8112 | DOC_START | |
8113 | WCCP2 allows the setting of forwarding methods between the | |
8114 | router/switch and the cache. Valid values are as follows: | |
8115 | ||
8116 | gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel) | |
8117 | l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting) | |
8118 | ||
8119 | Currently (as of IOS 12.4) cisco routers only support GRE. | |
8120 | Cisco switches only support the L2 redirect assignment method. | |
8121 | DOC_END | |
8122 | ||
8123 | NAME: wccp2_return_method | |
8124 | TYPE: wccp2_method | |
8125 | LOC: Config.Wccp2.return_method | |
8126 | DEFAULT: gre | |
8127 | IFDEF: USE_WCCPv2 | |
8128 | DOC_START | |
8129 | WCCP2 allows the setting of return methods between the | |
8130 | router/switch and the cache for packets that the cache | |
8131 | decides not to handle. Valid values are as follows: | |
8132 | ||
8133 | gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel) | |
8134 | l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting) | |
8135 | ||
8136 | Currently (as of IOS 12.4) cisco routers only support GRE. | |
8137 | Cisco switches only support the L2 redirect assignment. | |
8138 | ||
8139 | If the "ip wccp redirect exclude in" command has been | |
8140 | enabled on the cache interface, then it is still safe for | |
8141 | the proxy server to use a l2 redirect method even if this | |
8142 | option is set to GRE. | |
8143 | DOC_END | |
8144 | ||
8145 | NAME: wccp2_assignment_method | |
8146 | TYPE: wccp2_amethod | |
8147 | LOC: Config.Wccp2.assignment_method | |
8148 | DEFAULT: hash | |
8149 | IFDEF: USE_WCCPv2 | |
8150 | DOC_START | |
8151 | WCCP2 allows the setting of methods to assign the WCCP hash | |
8152 | Valid values are as follows: | |
8153 | ||
8154 | hash - Hash assignment | |
8155 | mask - Mask assignment | |
8156 | ||
8157 | As a general rule, cisco routers support the hash assignment method | |
8158 | and cisco switches support the mask assignment method. | |
8159 | DOC_END | |
8160 | ||
8161 | NAME: wccp2_service | |
8162 | TYPE: wccp2_service | |
8163 | LOC: Config.Wccp2.info | |
8164 | DEFAULT_IF_NONE: standard 0 | |
8165 | DEFAULT_DOC: Use the 'web-cache' standard service. | |
8166 | IFDEF: USE_WCCPv2 | |
8167 | DOC_START | |
8168 | WCCP2 allows for multiple traffic services. There are two | |
8169 | types: "standard" and "dynamic". The standard type defines | |
8170 | one service id - http (id 0). The dynamic service ids can be from | |
8171 | 51 to 255 inclusive. In order to use a dynamic service id | |
8172 | one must define the type of traffic to be redirected; this is done | |
8173 | using the wccp2_service_info option. | |
8174 | ||
8175 | The "standard" type does not require a wccp2_service_info option, | |
8176 | just specifying the service id will suffice. | |
8177 | ||
8178 | MD5 service authentication can be enabled by adding | |
8179 | "password=<password>" to the end of this service declaration. | |
8180 | ||
8181 | Examples: | |
8182 | ||
8183 | wccp2_service standard 0 # for the 'web-cache' standard service | |
8184 | wccp2_service dynamic 80 # a dynamic service type which will be | |
8185 | # fleshed out with subsequent options. | |
8186 | wccp2_service standard 0 password=foo | |
8187 | DOC_END | |
8188 | ||
8189 | NAME: wccp2_service_info | |
8190 | TYPE: wccp2_service_info | |
8191 | LOC: Config.Wccp2.info | |
8192 | DEFAULT: none | |
8193 | IFDEF: USE_WCCPv2 | |
8194 | DOC_START | |
8195 | Dynamic WCCPv2 services require further information to define the | |
8196 | traffic you wish to have diverted. | |
8197 | ||
8198 | The format is: | |
8199 | ||
8200 | wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>.. | |
8201 | priority=<priority> ports=<port>,<port>.. | |
8202 | ||
8203 | The relevant WCCPv2 flags: | |
8204 | + src_ip_hash, dst_ip_hash | |
8205 | + source_port_hash, dst_port_hash | |
8206 | + src_ip_alt_hash, dst_ip_alt_hash | |
8207 | + src_port_alt_hash, dst_port_alt_hash | |
8208 | + ports_source | |
8209 | ||
8210 | The port list can be one to eight entries. | |
8211 | ||
8212 | Example: | |
8213 | ||
8214 | wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source | |
8215 | priority=240 ports=80 | |
8216 | ||
8217 | Note: the service id must have been defined by a previous | |
8218 | 'wccp2_service dynamic <id>' entry. | |
8219 | DOC_END | |
8220 | ||
8221 | NAME: wccp2_weight | |
8222 | TYPE: int | |
8223 | LOC: Config.Wccp2.weight | |
8224 | DEFAULT: 10000 | |
8225 | IFDEF: USE_WCCPv2 | |
8226 | DOC_START | |
8227 | Each cache server gets assigned a set of the destination | |
8228 | hash proportional to their weight. | |
8229 | DOC_END | |
8230 | ||
8231 | NAME: wccp_address | |
8232 | TYPE: address | |
8233 | LOC: Config.Wccp.address | |
8234 | DEFAULT: 0.0.0.0 | |
8235 | DEFAULT_DOC: Address selected by the operating system. | |
8236 | IFDEF: USE_WCCP | |
8237 | DOC_START | |
8238 | Use this option if you require WCCP(v1) to use a specific | |
8239 | interface address. | |
8240 | ||
8241 | The default behavior is to not bind to any specific address. | |
8242 | DOC_END | |
8243 | ||
8244 | NAME: wccp2_address | |
8245 | TYPE: address | |
8246 | LOC: Config.Wccp2.address | |
8247 | DEFAULT: 0.0.0.0 | |
8248 | DEFAULT_DOC: Address selected by the operating system. | |
8249 | IFDEF: USE_WCCPv2 | |
8250 | DOC_START | |
8251 | Use this option if you require WCCPv2 to use a specific | |
8252 | interface address. | |
8253 | ||
8254 | The default behavior is to not bind to any specific address. | |
8255 | DOC_END | |
8256 | ||
8257 | COMMENT_START | |
8258 | PERSISTENT CONNECTION HANDLING | |
8259 | ----------------------------------------------------------------------------- | |
8260 | ||
8261 | Also see "pconn_timeout" in the TIMEOUTS section | |
8262 | COMMENT_END | |
8263 | ||
8264 | NAME: client_persistent_connections | |
8265 | TYPE: onoff | |
8266 | LOC: Config.onoff.client_pconns | |
8267 | DEFAULT: on | |
8268 | DOC_START | |
8269 | Persistent connection support for clients. | |
8270 | Squid uses persistent connections (when allowed). You can use | |
8271 | this option to disable persistent connections with clients. | |
8272 | DOC_END | |
8273 | ||
8274 | NAME: server_persistent_connections | |
8275 | TYPE: onoff | |
8276 | LOC: Config.onoff.server_pconns | |
8277 | DEFAULT: on | |
8278 | DOC_START | |
8279 | Persistent connection support for servers. | |
8280 | Squid uses persistent connections (when allowed). You can use | |
8281 | this option to disable persistent connections with servers. | |
8282 | DOC_END | |
8283 | ||
8284 | NAME: persistent_connection_after_error | |
8285 | TYPE: onoff | |
8286 | LOC: Config.onoff.error_pconns | |
8287 | DEFAULT: on | |
8288 | DOC_START | |
8289 | With this directive the use of persistent connections after | |
8290 | HTTP errors can be disabled. Useful if you have clients | |
8291 | who fail to handle errors on persistent connections proper. | |
8292 | DOC_END | |
8293 | ||
8294 | NAME: detect_broken_pconn | |
8295 | TYPE: onoff | |
8296 | LOC: Config.onoff.detect_broken_server_pconns | |
8297 | DEFAULT: off | |
8298 | DOC_START | |
8299 | Some servers have been found to incorrectly signal the use | |
8300 | of HTTP/1.0 persistent connections even on replies not | |
8301 | compatible, causing significant delays. This server problem | |
8302 | has mostly been seen on redirects. | |
8303 | ||
8304 | By enabling this directive Squid attempts to detect such | |
8305 | broken replies and automatically assume the reply is finished | |
8306 | after 10 seconds timeout. | |
8307 | DOC_END | |
8308 | ||
8309 | COMMENT_START | |
8310 | CACHE DIGEST OPTIONS | |
8311 | ----------------------------------------------------------------------------- | |
8312 | COMMENT_END | |
8313 | ||
8314 | NAME: digest_generation | |
8315 | IFDEF: USE_CACHE_DIGESTS | |
8316 | TYPE: onoff | |
8317 | LOC: Config.onoff.digest_generation | |
8318 | DEFAULT: on | |
8319 | DOC_START | |
8320 | This controls whether the server will generate a Cache Digest | |
8321 | of its contents. By default, Cache Digest generation is | |
8322 | enabled if Squid is compiled with --enable-cache-digests defined. | |
8323 | DOC_END | |
8324 | ||
8325 | NAME: digest_bits_per_entry | |
8326 | IFDEF: USE_CACHE_DIGESTS | |
8327 | TYPE: int | |
8328 | LOC: Config.digest.bits_per_entry | |
8329 | DEFAULT: 5 | |
8330 | DOC_START | |
8331 | This is the number of bits of the server's Cache Digest which | |
8332 | will be associated with the Digest entry for a given HTTP | |
8333 | Method and URL (public key) combination. The default is 5. | |
8334 | DOC_END | |
8335 | ||
8336 | NAME: digest_rebuild_period | |
8337 | IFDEF: USE_CACHE_DIGESTS | |
8338 | COMMENT: (seconds) | |
8339 | TYPE: time_t | |
8340 | LOC: Config.digest.rebuild_period | |
8341 | DEFAULT: 1 hour | |
8342 | DOC_START | |
8343 | This is the wait time between Cache Digest rebuilds. | |
8344 | DOC_END | |
8345 | ||
8346 | NAME: digest_rewrite_period | |
8347 | COMMENT: (seconds) | |
8348 | IFDEF: USE_CACHE_DIGESTS | |
8349 | TYPE: time_t | |
8350 | LOC: Config.digest.rewrite_period | |
8351 | DEFAULT: 1 hour | |
8352 | DOC_START | |
8353 | This is the wait time between Cache Digest writes to | |
8354 | disk. | |
8355 | DOC_END | |
8356 | ||
8357 | NAME: digest_swapout_chunk_size | |
8358 | COMMENT: (bytes) | |
8359 | TYPE: b_size_t | |
8360 | IFDEF: USE_CACHE_DIGESTS | |
8361 | LOC: Config.digest.swapout_chunk_size | |
8362 | DEFAULT: 4096 bytes | |
8363 | DOC_START | |
8364 | This is the number of bytes of the Cache Digest to write to | |
8365 | disk at a time. It defaults to 4096 bytes (4KB), the Squid | |
8366 | default swap page. | |
8367 | DOC_END | |
8368 | ||
8369 | NAME: digest_rebuild_chunk_percentage | |
8370 | COMMENT: (percent, 0-100) | |
8371 | IFDEF: USE_CACHE_DIGESTS | |
8372 | TYPE: int | |
8373 | LOC: Config.digest.rebuild_chunk_percentage | |
8374 | DEFAULT: 10 | |
8375 | DOC_START | |
8376 | This is the percentage of the Cache Digest to be scanned at a | |
8377 | time. By default it is set to 10% of the Cache Digest. | |
8378 | DOC_END | |
8379 | ||
8380 | COMMENT_START | |
8381 | SNMP OPTIONS | |
8382 | ----------------------------------------------------------------------------- | |
8383 | COMMENT_END | |
8384 | ||
8385 | NAME: snmp_port | |
8386 | TYPE: u_short | |
8387 | LOC: Config.Port.snmp | |
8388 | DEFAULT: 0 | |
8389 | DEFAULT_DOC: SNMP disabled. | |
8390 | IFDEF: SQUID_SNMP | |
8391 | DOC_START | |
8392 | The port number where Squid listens for SNMP requests. To enable | |
8393 | SNMP support set this to a suitable port number. Port number | |
8394 | 3401 is often used for the Squid SNMP agent. By default it's | |
8395 | set to "0" (disabled) | |
8396 | ||
8397 | Example: | |
8398 | snmp_port 3401 | |
8399 | DOC_END | |
8400 | ||
8401 | NAME: snmp_access | |
8402 | TYPE: acl_access | |
8403 | LOC: Config.accessList.snmp | |
8404 | DEFAULT: none | |
8405 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
8406 | IFDEF: SQUID_SNMP | |
8407 | DOC_START | |
8408 | Allowing or denying access to the SNMP port. | |
8409 | ||
8410 | All access to the agent is denied by default. | |
8411 | usage: | |
8412 | ||
8413 | snmp_access allow|deny [!]aclname ... | |
8414 | ||
8415 | This clause only supports fast acl types. | |
8416 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
8417 | ||
8418 | Example: | |
8419 | snmp_access allow snmppublic localhost | |
8420 | snmp_access deny all | |
8421 | DOC_END | |
8422 | ||
8423 | NAME: snmp_incoming_address | |
8424 | TYPE: address | |
8425 | LOC: Config.Addrs.snmp_incoming | |
8426 | DEFAULT: any_addr | |
8427 | DEFAULT_DOC: Accept SNMP packets from all machine interfaces. | |
8428 | IFDEF: SQUID_SNMP | |
8429 | DOC_START | |
8430 | Just like 'udp_incoming_address', but for the SNMP port. | |
8431 | ||
8432 | snmp_incoming_address is used for the SNMP socket receiving | |
8433 | messages from SNMP agents. | |
8434 | ||
8435 | The default snmp_incoming_address is to listen on all | |
8436 | available network interfaces. | |
8437 | DOC_END | |
8438 | ||
8439 | NAME: snmp_outgoing_address | |
8440 | TYPE: address | |
8441 | LOC: Config.Addrs.snmp_outgoing | |
8442 | DEFAULT: no_addr | |
8443 | DEFAULT_DOC: Use snmp_incoming_address or an address selected by the operating system. | |
8444 | IFDEF: SQUID_SNMP | |
8445 | DOC_START | |
8446 | Just like 'udp_outgoing_address', but for the SNMP port. | |
8447 | ||
8448 | snmp_outgoing_address is used for SNMP packets returned to SNMP | |
8449 | agents. | |
8450 | ||
8451 | If snmp_outgoing_address is not set it will use the same socket | |
8452 | as snmp_incoming_address. Only change this if you want to have | |
8453 | SNMP replies sent using another address than where this Squid | |
8454 | listens for SNMP queries. | |
8455 | ||
8456 | NOTE, snmp_incoming_address and snmp_outgoing_address can not have | |
8457 | the same value since they both use the same port. | |
8458 | DOC_END | |
8459 | ||
8460 | COMMENT_START | |
8461 | ICP OPTIONS | |
8462 | ----------------------------------------------------------------------------- | |
8463 | COMMENT_END | |
8464 | ||
8465 | NAME: icp_port udp_port | |
8466 | TYPE: u_short | |
8467 | DEFAULT: 0 | |
8468 | DEFAULT_DOC: ICP disabled. | |
8469 | LOC: Config.Port.icp | |
8470 | DOC_START | |
8471 | The port number where Squid sends and receives ICP queries to | |
8472 | and from neighbor caches. The standard UDP port for ICP is 3130. | |
8473 | ||
8474 | Example: | |
8475 | icp_port @DEFAULT_ICP_PORT@ | |
8476 | DOC_END | |
8477 | ||
8478 | NAME: htcp_port | |
8479 | IFDEF: USE_HTCP | |
8480 | TYPE: u_short | |
8481 | DEFAULT: 0 | |
8482 | DEFAULT_DOC: HTCP disabled. | |
8483 | LOC: Config.Port.htcp | |
8484 | DOC_START | |
8485 | The port number where Squid sends and receives HTCP queries to | |
8486 | and from neighbor caches. To turn it on you want to set it to | |
8487 | 4827. | |
8488 | ||
8489 | Example: | |
8490 | htcp_port 4827 | |
8491 | DOC_END | |
8492 | ||
8493 | NAME: log_icp_queries | |
8494 | COMMENT: on|off | |
8495 | TYPE: onoff | |
8496 | DEFAULT: on | |
8497 | LOC: Config.onoff.log_udp | |
8498 | DOC_START | |
8499 | If set, ICP queries are logged to access.log. You may wish | |
8500 | do disable this if your ICP load is VERY high to speed things | |
8501 | up or to simplify log analysis. | |
8502 | DOC_END | |
8503 | ||
8504 | NAME: udp_incoming_address | |
8505 | TYPE: address | |
8506 | LOC:Config.Addrs.udp_incoming | |
8507 | DEFAULT: any_addr | |
8508 | DEFAULT_DOC: Accept packets from all machine interfaces. | |
8509 | DOC_START | |
8510 | udp_incoming_address is used for UDP packets received from other | |
8511 | caches. | |
8512 | ||
8513 | The default behavior is to not bind to any specific address. | |
8514 | ||
8515 | Only change this if you want to have all UDP queries received on | |
8516 | a specific interface/address. | |
8517 | ||
8518 | NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS | |
8519 | modules. Altering it will affect all of them in the same manner. | |
8520 | ||
8521 | see also; udp_outgoing_address | |
8522 | ||
8523 | NOTE, udp_incoming_address and udp_outgoing_address can not | |
8524 | have the same value since they both use the same port. | |
8525 | DOC_END | |
8526 | ||
8527 | NAME: udp_outgoing_address | |
8528 | TYPE: address | |
8529 | LOC: Config.Addrs.udp_outgoing | |
8530 | DEFAULT: no_addr | |
8531 | DEFAULT_DOC: Use udp_incoming_address or an address selected by the operating system. | |
8532 | DOC_START | |
8533 | udp_outgoing_address is used for UDP packets sent out to other | |
8534 | caches. | |
8535 | ||
8536 | The default behavior is to not bind to any specific address. | |
8537 | ||
8538 | Instead it will use the same socket as udp_incoming_address. | |
8539 | Only change this if you want to have UDP queries sent using another | |
8540 | address than where this Squid listens for UDP queries from other | |
8541 | caches. | |
8542 | ||
8543 | NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS | |
8544 | modules. Altering it will affect all of them in the same manner. | |
8545 | ||
8546 | see also; udp_incoming_address | |
8547 | ||
8548 | NOTE, udp_incoming_address and udp_outgoing_address can not | |
8549 | have the same value since they both use the same port. | |
8550 | DOC_END | |
8551 | ||
8552 | NAME: icp_hit_stale | |
8553 | COMMENT: on|off | |
8554 | TYPE: onoff | |
8555 | DEFAULT: off | |
8556 | LOC: Config.onoff.icp_hit_stale | |
8557 | DOC_START | |
8558 | If you want to return ICP_HIT for stale cache objects, set this | |
8559 | option to 'on'. If you have sibling relationships with caches | |
8560 | in other administrative domains, this should be 'off'. If you only | |
8561 | have sibling relationships with caches under your control, | |
8562 | it is probably okay to set this to 'on'. | |
8563 | If set to 'on', your siblings should use the option "allow-miss" | |
8564 | on their cache_peer lines for connecting to you. | |
8565 | DOC_END | |
8566 | ||
8567 | NAME: minimum_direct_hops | |
8568 | TYPE: int | |
8569 | DEFAULT: 4 | |
8570 | LOC: Config.minDirectHops | |
8571 | DOC_START | |
8572 | If using the ICMP pinging stuff, do direct fetches for sites | |
8573 | which are no more than this many hops away. | |
8574 | DOC_END | |
8575 | ||
8576 | NAME: minimum_direct_rtt | |
8577 | COMMENT: (msec) | |
8578 | TYPE: int | |
8579 | DEFAULT: 400 | |
8580 | LOC: Config.minDirectRtt | |
8581 | DOC_START | |
8582 | If using the ICMP pinging stuff, do direct fetches for sites | |
8583 | which are no more than this many rtt milliseconds away. | |
8584 | DOC_END | |
8585 | ||
8586 | NAME: netdb_low | |
8587 | TYPE: int | |
8588 | DEFAULT: 900 | |
8589 | LOC: Config.Netdb.low | |
8590 | DOC_START | |
8591 | The low water mark for the ICMP measurement database. | |
8592 | ||
8593 | Note: high watermark controlled by netdb_high directive. | |
8594 | ||
8595 | These watermarks are counts, not percents. The defaults are | |
8596 | (low) 900 and (high) 1000. When the high water mark is | |
8597 | reached, database entries will be deleted until the low | |
8598 | mark is reached. | |
8599 | DOC_END | |
8600 | ||
8601 | NAME: netdb_high | |
8602 | TYPE: int | |
8603 | DEFAULT: 1000 | |
8604 | LOC: Config.Netdb.high | |
8605 | DOC_START | |
8606 | The high water mark for the ICMP measurement database. | |
8607 | ||
8608 | Note: low watermark controlled by netdb_low directive. | |
8609 | ||
8610 | These watermarks are counts, not percents. The defaults are | |
8611 | (low) 900 and (high) 1000. When the high water mark is | |
8612 | reached, database entries will be deleted until the low | |
8613 | mark is reached. | |
8614 | DOC_END | |
8615 | ||
8616 | NAME: netdb_ping_period | |
8617 | TYPE: time_t | |
8618 | LOC: Config.Netdb.period | |
8619 | DEFAULT: 5 minutes | |
8620 | DOC_START | |
8621 | The minimum period for measuring a site. There will be at | |
8622 | least this much delay between successive pings to the same | |
8623 | network. The default is five minutes. | |
8624 | DOC_END | |
8625 | ||
8626 | NAME: query_icmp | |
8627 | COMMENT: on|off | |
8628 | TYPE: onoff | |
8629 | DEFAULT: off | |
8630 | LOC: Config.onoff.query_icmp | |
8631 | DOC_START | |
8632 | If you want to ask your peers to include ICMP data in their ICP | |
8633 | replies, enable this option. | |
8634 | ||
8635 | If your peer has configured Squid (during compilation) with | |
8636 | '--enable-icmp' that peer will send ICMP pings to origin server | |
8637 | sites of the URLs it receives. If you enable this option the | |
8638 | ICP replies from that peer will include the ICMP data (if available). | |
8639 | Then, when choosing a parent cache, Squid will choose the parent with | |
8640 | the minimal RTT to the origin server. When this happens, the | |
8641 | hierarchy field of the access.log will be | |
8642 | "CLOSEST_PARENT_MISS". This option is off by default. | |
8643 | DOC_END | |
8644 | ||
8645 | NAME: test_reachability | |
8646 | COMMENT: on|off | |
8647 | TYPE: onoff | |
8648 | DEFAULT: off | |
8649 | LOC: Config.onoff.test_reachability | |
8650 | DOC_START | |
8651 | When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH | |
8652 | instead of ICP_MISS if the target host is NOT in the ICMP | |
8653 | database, or has a zero RTT. | |
8654 | DOC_END | |
8655 | ||
8656 | NAME: icp_query_timeout | |
8657 | COMMENT: (msec) | |
8658 | DEFAULT: 0 | |
8659 | DEFAULT_DOC: Dynamic detection. | |
8660 | TYPE: int | |
8661 | LOC: Config.Timeout.icp_query | |
8662 | DOC_START | |
8663 | Normally Squid will automatically determine an optimal ICP | |
8664 | query timeout value based on the round-trip-time of recent ICP | |
8665 | queries. If you want to override the value determined by | |
8666 | Squid, set this 'icp_query_timeout' to a non-zero value. This | |
8667 | value is specified in MILLISECONDS, so, to use a 2-second | |
8668 | timeout (the old default), you would write: | |
8669 | ||
8670 | icp_query_timeout 2000 | |
8671 | DOC_END | |
8672 | ||
8673 | NAME: maximum_icp_query_timeout | |
8674 | COMMENT: (msec) | |
8675 | DEFAULT: 2000 | |
8676 | TYPE: int | |
8677 | LOC: Config.Timeout.icp_query_max | |
8678 | DOC_START | |
8679 | Normally the ICP query timeout is determined dynamically. But | |
8680 | sometimes it can lead to very large values (say 5 seconds). | |
8681 | Use this option to put an upper limit on the dynamic timeout | |
8682 | value. Do NOT use this option to always use a fixed (instead | |
8683 | of a dynamic) timeout value. To set a fixed timeout see the | |
8684 | 'icp_query_timeout' directive. | |
8685 | DOC_END | |
8686 | ||
8687 | NAME: minimum_icp_query_timeout | |
8688 | COMMENT: (msec) | |
8689 | DEFAULT: 5 | |
8690 | TYPE: int | |
8691 | LOC: Config.Timeout.icp_query_min | |
8692 | DOC_START | |
8693 | Normally the ICP query timeout is determined dynamically. But | |
8694 | sometimes it can lead to very small timeouts, even lower than | |
8695 | the normal latency variance on your link due to traffic. | |
8696 | Use this option to put an lower limit on the dynamic timeout | |
8697 | value. Do NOT use this option to always use a fixed (instead | |
8698 | of a dynamic) timeout value. To set a fixed timeout see the | |
8699 | 'icp_query_timeout' directive. | |
8700 | DOC_END | |
8701 | ||
8702 | NAME: background_ping_rate | |
8703 | COMMENT: time-units | |
8704 | TYPE: time_t | |
8705 | DEFAULT: 10 seconds | |
8706 | LOC: Config.backgroundPingRate | |
8707 | DOC_START | |
8708 | Controls how often the ICP pings are sent to siblings that | |
8709 | have background-ping set. | |
8710 | DOC_END | |
8711 | ||
8712 | COMMENT_START | |
8713 | MULTICAST ICP OPTIONS | |
8714 | ----------------------------------------------------------------------------- | |
8715 | COMMENT_END | |
8716 | ||
8717 | NAME: mcast_groups | |
8718 | TYPE: wordlist | |
8719 | LOC: Config.mcast_group_list | |
8720 | DEFAULT: none | |
8721 | DOC_START | |
8722 | This tag specifies a list of multicast groups which your server | |
8723 | should join to receive multicasted ICP queries. | |
8724 | ||
8725 | NOTE! Be very careful what you put here! Be sure you | |
8726 | understand the difference between an ICP _query_ and an ICP | |
8727 | _reply_. This option is to be set only if you want to RECEIVE | |
8728 | multicast queries. Do NOT set this option to SEND multicast | |
8729 | ICP (use cache_peer for that). ICP replies are always sent via | |
8730 | unicast, so this option does not affect whether or not you will | |
8731 | receive replies from multicast group members. | |
8732 | ||
8733 | You must be very careful to NOT use a multicast address which | |
8734 | is already in use by another group of caches. | |
8735 | ||
8736 | If you are unsure about multicast, please read the Multicast | |
8737 | chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/). | |
8738 | ||
8739 | Usage: mcast_groups 239.128.16.128 224.0.1.20 | |
8740 | ||
8741 | By default, Squid doesn't listen on any multicast groups. | |
8742 | DOC_END | |
8743 | ||
8744 | NAME: mcast_icp_query_timeout | |
8745 | COMMENT: (msec) | |
8746 | DEFAULT: 2000 | |
8747 | TYPE: int | |
8748 | LOC: Config.Timeout.mcast_icp_query | |
8749 | DOC_START | |
8750 | For multicast peers, Squid regularly sends out ICP "probes" to | |
8751 | count how many other peers are listening on the given multicast | |
8752 | address. This value specifies how long Squid should wait to | |
8753 | count all the replies. The default is 2000 msec, or 2 | |
8754 | seconds. | |
8755 | DOC_END | |
8756 | ||
8757 | COMMENT_START | |
8758 | INTERNAL ICON OPTIONS | |
8759 | ----------------------------------------------------------------------------- | |
8760 | COMMENT_END | |
8761 | ||
8762 | NAME: icon_directory | |
8763 | TYPE: string | |
8764 | LOC: Config.icons.directory | |
8765 | DEFAULT: @DEFAULT_ICON_DIR@ | |
8766 | DOC_START | |
8767 | Where the icons are stored. These are normally kept in | |
8768 | @DEFAULT_ICON_DIR@ | |
8769 | DOC_END | |
8770 | ||
8771 | NAME: global_internal_static | |
8772 | TYPE: onoff | |
8773 | LOC: Config.onoff.global_internal_static | |
8774 | DEFAULT: on | |
8775 | DOC_START | |
8776 | This directive controls is Squid should intercept all requests for | |
8777 | /squid-internal-static/ no matter which host the URL is requesting | |
8778 | (default on setting), or if nothing special should be done for | |
8779 | such URLs (off setting). The purpose of this directive is to make | |
8780 | icons etc work better in complex cache hierarchies where it may | |
8781 | not always be possible for all corners in the cache mesh to reach | |
8782 | the server generating a directory listing. | |
8783 | DOC_END | |
8784 | ||
8785 | NAME: short_icon_urls | |
8786 | TYPE: onoff | |
8787 | LOC: Config.icons.use_short_names | |
8788 | DEFAULT: on | |
8789 | DOC_START | |
8790 | If this is enabled Squid will use short URLs for icons. | |
8791 | If disabled it will revert to the old behavior of including | |
8792 | it's own name and port in the URL. | |
8793 | ||
8794 | If you run a complex cache hierarchy with a mix of Squid and | |
8795 | other proxies you may need to disable this directive. | |
8796 | DOC_END | |
8797 | ||
8798 | COMMENT_START | |
8799 | ERROR PAGE OPTIONS | |
8800 | ----------------------------------------------------------------------------- | |
8801 | COMMENT_END | |
8802 | ||
8803 | NAME: error_directory | |
8804 | TYPE: string | |
8805 | LOC: Config.errorDirectory | |
8806 | DEFAULT: none | |
8807 | DEFAULT_DOC: Send error pages in the clients preferred language | |
8808 | DOC_START | |
8809 | If you wish to create your own versions of the default | |
8810 | error files to customize them to suit your company copy | |
8811 | the error/template files to another directory and point | |
8812 | this tag at them. | |
8813 | ||
8814 | WARNING: This option will disable multi-language support | |
8815 | on error pages if used. | |
8816 | ||
8817 | The squid developers are interested in making squid available in | |
8818 | a wide variety of languages. If you are making translations for a | |
8819 | language that Squid does not currently provide please consider | |
8820 | contributing your translation back to the project. | |
8821 | https://wiki.squid-cache.org/Translations | |
8822 | ||
8823 | The squid developers working on translations are happy to supply drop-in | |
8824 | translated error files in exchange for any new language contributions. | |
8825 | DOC_END | |
8826 | ||
8827 | NAME: error_default_language | |
8828 | IFDEF: USE_ERR_LOCALES | |
8829 | TYPE: string | |
8830 | LOC: Config.errorDefaultLanguage | |
8831 | DEFAULT: none | |
8832 | DEFAULT_DOC: Generate English language pages. | |
8833 | DOC_START | |
8834 | Set the default language which squid will send error pages in | |
8835 | if no existing translation matches the clients language | |
8836 | preferences. | |
8837 | ||
8838 | If unset (default) generic English will be used. | |
8839 | ||
8840 | The squid developers are interested in making squid available in | |
8841 | a wide variety of languages. If you are interested in making | |
8842 | translations for any language see the squid wiki for details. | |
8843 | https://wiki.squid-cache.org/Translations | |
8844 | DOC_END | |
8845 | ||
8846 | NAME: error_log_languages | |
8847 | IFDEF: USE_ERR_LOCALES | |
8848 | TYPE: onoff | |
8849 | LOC: Config.errorLogMissingLanguages | |
8850 | DEFAULT: on | |
8851 | DOC_START | |
8852 | Log to cache.log what languages users are attempting to | |
8853 | auto-negotiate for translations. | |
8854 | ||
8855 | Successful negotiations are not logged. Only failures | |
8856 | have meaning to indicate that Squid may need an upgrade | |
8857 | of its error page translations. | |
8858 | DOC_END | |
8859 | ||
8860 | NAME: err_page_stylesheet | |
8861 | TYPE: string | |
8862 | LOC: Config.errorStylesheet | |
8863 | DEFAULT: @DEFAULT_CONFIG_DIR@/errorpage.css | |
8864 | DOC_START | |
8865 | CSS Stylesheet to pattern the display of Squid default error pages. | |
8866 | ||
8867 | For information on CSS see http://www.w3.org/Style/CSS/ | |
8868 | DOC_END | |
8869 | ||
8870 | NAME: err_html_text | |
8871 | TYPE: eol | |
8872 | LOC: Config.errHtmlText | |
8873 | DEFAULT: none | |
8874 | DOC_START | |
8875 | HTML text to include in error messages. Make this a "mailto" | |
8876 | URL to your admin address, or maybe just a link to your | |
8877 | organizations Web page. | |
8878 | ||
8879 | To include this in your error messages, you must rewrite | |
8880 | the error template files (found in the "errors" directory). | |
8881 | Wherever you want the 'err_html_text' line to appear, | |
8882 | insert a %L tag in the error template file. | |
8883 | DOC_END | |
8884 | ||
8885 | NAME: email_err_data | |
8886 | COMMENT: on|off | |
8887 | TYPE: onoff | |
8888 | LOC: Config.onoff.emailErrData | |
8889 | DEFAULT: on | |
8890 | DOC_START | |
8891 | If enabled, information about the occurred error will be | |
8892 | included in the mailto links of the ERR pages (if %W is set) | |
8893 | so that the email body contains the data. | |
8894 | Syntax is <A HREF="mailto:%w%W">%w</A> | |
8895 | DOC_END | |
8896 | ||
8897 | NAME: deny_info | |
8898 | TYPE: denyinfo | |
8899 | LOC: Config.denyInfoList | |
8900 | DEFAULT: none | |
8901 | DOC_START | |
8902 | Usage: deny_info err_page_name acl | |
8903 | or deny_info http://... acl | |
8904 | or deny_info TCP_RESET acl | |
8905 | ||
8906 | This can be used to return a ERR_ page for requests which | |
8907 | do not pass the 'http_access' rules. Squid remembers the last | |
8908 | acl it evaluated in http_access, and if a 'deny_info' line exists | |
8909 | for that ACL Squid returns a corresponding error page. | |
8910 | ||
8911 | The acl is typically the last acl on the http_access deny line which | |
8912 | denied access. The exceptions to this rule are: | |
8913 | - When Squid needs to request authentication credentials. It's then | |
8914 | the first authentication related acl encountered | |
8915 | - When none of the http_access lines matches. It's then the last | |
8916 | acl processed on the last http_access line. | |
8917 | - When the decision to deny access was made by an adaptation service, | |
8918 | the acl name is the corresponding eCAP or ICAP service_name. | |
8919 | ||
8920 | NP: If providing your own custom error pages with error_directory | |
8921 | you may also specify them by your custom file name: | |
8922 | Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys | |
8923 | ||
8924 | By default Squid will send "403 Forbidden". A different 4xx or 5xx | |
8925 | may be specified by prefixing the file name with the code and a colon. | |
8926 | e.g. 404:ERR_CUSTOM_ACCESS_DENIED | |
8927 | ||
8928 | Alternatively you can tell Squid to reset the TCP connection | |
8929 | by specifying TCP_RESET. | |
8930 | ||
8931 | Or you can specify an error URL or URL pattern. The browsers will | |
8932 | get redirected to the specified URL after formatting tags have | |
8933 | been replaced. Redirect will be done with 302 or 307 according to | |
8934 | HTTP/1.1 specs. A different 3xx code may be specified by prefixing | |
8935 | the URL. e.g. 303:http://example.com/ | |
8936 | ||
8937 | URL FORMAT TAGS: | |
8938 | %a - username (if available. Password NOT included) | |
8939 | %A - Local listening IP address the client connection was connected to | |
8940 | %B - FTP path URL | |
8941 | %e - Error number | |
8942 | %E - Error description | |
8943 | %h - Squid hostname | |
8944 | %H - Request domain name | |
8945 | %i - Client IP Address | |
8946 | %M - Request Method | |
8947 | %O - Unescaped message result from external ACL helper | |
8948 | %o - Message result from external ACL helper | |
8949 | %p - Request Port number | |
8950 | %P - Request Protocol name | |
8951 | %R - Request URL path | |
8952 | %T - Timestamp in RFC 1123 format | |
8953 | %U - Full canonical URL from client | |
8954 | (HTTPS URLs terminate with *) | |
8955 | %u - Full canonical URL from client | |
8956 | %w - Admin email from squid.conf | |
8957 | %x - Error name | |
8958 | %% - Literal percent (%) code | |
8959 | ||
8960 | DOC_END | |
8961 | ||
8962 | COMMENT_START | |
8963 | OPTIONS INFLUENCING REQUEST FORWARDING | |
8964 | ----------------------------------------------------------------------------- | |
8965 | COMMENT_END | |
8966 | ||
8967 | NAME: nonhierarchical_direct | |
8968 | TYPE: onoff | |
8969 | LOC: Config.onoff.nonhierarchical_direct | |
8970 | DEFAULT: on | |
8971 | DOC_START | |
8972 | By default, Squid will send any non-hierarchical requests | |
8973 | (not cacheable request type) direct to origin servers. | |
8974 | ||
8975 | When this is set to "off", Squid will prefer to send these | |
8976 | requests to parents. | |
8977 | ||
8978 | Note that in most configurations, by turning this off you will only | |
8979 | add latency to these request without any improvement in global hit | |
8980 | ratio. | |
8981 | ||
8982 | This option only sets a preference. If the parent is unavailable a | |
8983 | direct connection to the origin server may still be attempted. To | |
8984 | completely prevent direct connections use never_direct. | |
8985 | DOC_END | |
8986 | ||
8987 | NAME: prefer_direct | |
8988 | TYPE: onoff | |
8989 | LOC: Config.onoff.prefer_direct | |
8990 | DEFAULT: off | |
8991 | DOC_START | |
8992 | Normally Squid tries to use parents for most requests. If you for some | |
8993 | reason like it to first try going direct and only use a parent if | |
8994 | going direct fails set this to on. | |
8995 | ||
8996 | By combining nonhierarchical_direct off and prefer_direct on you | |
8997 | can set up Squid to use a parent as a backup path if going direct | |
8998 | fails. | |
8999 | ||
9000 | Note: If you want Squid to use parents for all requests see | |
9001 | the never_direct directive. prefer_direct only modifies how Squid | |
9002 | acts on cacheable requests. | |
9003 | DOC_END | |
9004 | ||
9005 | NAME: cache_miss_revalidate | |
9006 | COMMENT: on|off | |
9007 | TYPE: onoff | |
9008 | DEFAULT: on | |
9009 | LOC: Config.onoff.cache_miss_revalidate | |
9010 | DOC_START | |
9011 | RFC 7232 defines a conditional request mechanism to prevent | |
9012 | response objects being unnecessarily transferred over the network. | |
9013 | If that mechanism is used by the client and a cache MISS occurs | |
9014 | it can prevent new cache entries being created. | |
9015 | ||
9016 | This option determines whether Squid on cache MISS will pass the | |
9017 | client revalidation request to the server or tries to fetch new | |
9018 | content for caching. It can be useful while the cache is mostly | |
9019 | empty to more quickly have the cache populated by generating | |
9020 | non-conditional GETs. | |
9021 | ||
9022 | When set to 'on' (default), Squid will pass all client If-* headers | |
9023 | to the server. This permits server responses without a cacheable | |
9024 | payload to be delivered and on MISS no new cache entry is created. | |
9025 | ||
9026 | When set to 'off' and if the request is cacheable, Squid will | |
9027 | remove the clients If-Modified-Since and If-None-Match headers from | |
9028 | the request sent to the server. This requests a 200 status response | |
9029 | from the server to create a new cache entry with. | |
9030 | DOC_END | |
9031 | ||
9032 | NAME: always_direct | |
9033 | TYPE: acl_access | |
9034 | LOC: Config.accessList.AlwaysDirect | |
9035 | DEFAULT: none | |
9036 | DEFAULT_DOC: Prevent any cache_peer being used for this request. | |
9037 | DOC_START | |
9038 | Usage: always_direct allow|deny [!]aclname ... | |
9039 | ||
9040 | Here you can use ACL elements to specify requests which should | |
9041 | ALWAYS be forwarded by Squid to the origin servers without using | |
9042 | any peers. For example, to always directly forward requests for | |
9043 | local servers ignoring any parents or siblings you may have use | |
9044 | something like: | |
9045 | ||
9046 | acl local-servers dstdomain my.domain.net | |
9047 | always_direct allow local-servers | |
9048 | ||
9049 | To always forward FTP requests directly, use | |
9050 | ||
9051 | acl FTP proto FTP | |
9052 | always_direct allow FTP | |
9053 | ||
9054 | NOTE: There is a similar, but opposite option named | |
9055 | 'never_direct'. You need to be aware that "always_direct deny | |
9056 | foo" is NOT the same thing as "never_direct allow foo". You | |
9057 | may need to use a deny rule to exclude a more-specific case of | |
9058 | some other rule. Example: | |
9059 | ||
9060 | acl local-external dstdomain external.foo.net | |
9061 | acl local-servers dstdomain .foo.net | |
9062 | always_direct deny local-external | |
9063 | always_direct allow local-servers | |
9064 | ||
9065 | NOTE: If your goal is to make the client forward the request | |
9066 | directly to the origin server bypassing Squid then this needs | |
9067 | to be done in the client configuration. Squid configuration | |
9068 | can only tell Squid how Squid should fetch the object. | |
9069 | ||
9070 | NOTE: This directive is not related to caching. The replies | |
9071 | is cached as usual even if you use always_direct. To not cache | |
9072 | the replies see the 'cache' directive. | |
9073 | ||
9074 | This clause supports both fast and slow acl types. | |
9075 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
9076 | DOC_END | |
9077 | ||
9078 | NAME: never_direct | |
9079 | TYPE: acl_access | |
9080 | LOC: Config.accessList.NeverDirect | |
9081 | DEFAULT: none | |
9082 | DEFAULT_DOC: Allow DNS results to be used for this request. | |
9083 | DOC_START | |
9084 | Usage: never_direct allow|deny [!]aclname ... | |
9085 | ||
9086 | never_direct is the opposite of always_direct. Please read | |
9087 | the description for always_direct if you have not already. | |
9088 | ||
9089 | With 'never_direct' you can use ACL elements to specify | |
9090 | requests which should NEVER be forwarded directly to origin | |
9091 | servers. For example, to force the use of a proxy for all | |
9092 | requests, except those in your local domain use something like: | |
9093 | ||
9094 | acl local-servers dstdomain .foo.net | |
9095 | never_direct deny local-servers | |
9096 | never_direct allow all | |
9097 | ||
9098 | or if Squid is inside a firewall and there are local intranet | |
9099 | servers inside the firewall use something like: | |
9100 | ||
9101 | acl local-intranet dstdomain .foo.net | |
9102 | acl local-external dstdomain external.foo.net | |
9103 | always_direct deny local-external | |
9104 | always_direct allow local-intranet | |
9105 | never_direct allow all | |
9106 | ||
9107 | This clause supports both fast and slow acl types. | |
9108 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
9109 | DOC_END | |
9110 | ||
9111 | COMMENT_START | |
9112 | ADVANCED NETWORKING OPTIONS | |
9113 | ----------------------------------------------------------------------------- | |
9114 | COMMENT_END | |
9115 | ||
9116 | NAME: incoming_udp_average incoming_icp_average | |
9117 | TYPE: int | |
9118 | DEFAULT: 6 | |
9119 | LOC: Config.comm_incoming.udp.average | |
9120 | DOC_START | |
9121 | Heavy voodoo here. I can't even believe you are reading this. | |
9122 | Are you crazy? Don't even think about adjusting these unless | |
9123 | you understand the algorithms in comm_select.c first! | |
9124 | DOC_END | |
9125 | ||
9126 | NAME: incoming_tcp_average incoming_http_average | |
9127 | TYPE: int | |
9128 | DEFAULT: 4 | |
9129 | LOC: Config.comm_incoming.tcp.average | |
9130 | DOC_START | |
9131 | Heavy voodoo here. I can't even believe you are reading this. | |
9132 | Are you crazy? Don't even think about adjusting these unless | |
9133 | you understand the algorithms in comm_select.c first! | |
9134 | DOC_END | |
9135 | ||
9136 | NAME: incoming_dns_average | |
9137 | TYPE: int | |
9138 | DEFAULT: 4 | |
9139 | LOC: Config.comm_incoming.dns.average | |
9140 | DOC_START | |
9141 | Heavy voodoo here. I can't even believe you are reading this. | |
9142 | Are you crazy? Don't even think about adjusting these unless | |
9143 | you understand the algorithms in comm_select.c first! | |
9144 | DOC_END | |
9145 | ||
9146 | NAME: min_udp_poll_cnt min_icp_poll_cnt | |
9147 | TYPE: int | |
9148 | DEFAULT: 8 | |
9149 | LOC: Config.comm_incoming.udp.min_poll | |
9150 | DOC_START | |
9151 | Heavy voodoo here. I can't even believe you are reading this. | |
9152 | Are you crazy? Don't even think about adjusting these unless | |
9153 | you understand the algorithms in comm_select.c first! | |
9154 | DOC_END | |
9155 | ||
9156 | NAME: min_dns_poll_cnt | |
9157 | TYPE: int | |
9158 | DEFAULT: 8 | |
9159 | LOC: Config.comm_incoming.dns.min_poll | |
9160 | DOC_START | |
9161 | Heavy voodoo here. I can't even believe you are reading this. | |
9162 | Are you crazy? Don't even think about adjusting these unless | |
9163 | you understand the algorithms in comm_select.c first! | |
9164 | DOC_END | |
9165 | ||
9166 | NAME: min_tcp_poll_cnt min_http_poll_cnt | |
9167 | TYPE: int | |
9168 | DEFAULT: 8 | |
9169 | LOC: Config.comm_incoming.tcp.min_poll | |
9170 | DOC_START | |
9171 | Heavy voodoo here. I can't even believe you are reading this. | |
9172 | Are you crazy? Don't even think about adjusting these unless | |
9173 | you understand the algorithms in comm_select.c first! | |
9174 | DOC_END | |
9175 | ||
9176 | NAME: accept_filter | |
9177 | TYPE: string | |
9178 | DEFAULT: none | |
9179 | LOC: Config.accept_filter | |
9180 | DOC_START | |
9181 | FreeBSD: | |
9182 | ||
9183 | The name of an accept(2) filter to install on Squid's | |
9184 | listen socket(s). This feature is perhaps specific to | |
9185 | FreeBSD and requires support in the kernel. | |
9186 | ||
9187 | The 'httpready' filter delays delivering new connections | |
9188 | to Squid until a full HTTP request has been received. | |
9189 | See the accf_http(9) man page for details. | |
9190 | ||
9191 | The 'dataready' filter delays delivering new connections | |
9192 | to Squid until there is some data to process. | |
9193 | See the accf_dataready(9) man page for details. | |
9194 | ||
9195 | Linux: | |
9196 | ||
9197 | The 'data' filter delays delivering of new connections | |
9198 | to Squid until there is some data to process by TCP_ACCEPT_DEFER. | |
9199 | You may optionally specify a number of seconds to wait by | |
9200 | 'data=N' where N is the number of seconds. Defaults to 30 | |
9201 | if not specified. See the tcp(7) man page for details. | |
9202 | EXAMPLE: | |
9203 | # FreeBSD | |
9204 | accept_filter httpready | |
9205 | # Linux | |
9206 | accept_filter data | |
9207 | DOC_END | |
9208 | ||
9209 | NAME: client_ip_max_connections | |
9210 | TYPE: int | |
9211 | LOC: Config.client_ip_max_connections | |
9212 | DEFAULT: -1 | |
9213 | DEFAULT_DOC: No limit. | |
9214 | DOC_START | |
9215 | Set an absolute limit on the number of connections a single | |
9216 | client IP can use. Any more than this and Squid will begin to drop | |
9217 | new connections from the client until it closes some links. | |
9218 | ||
9219 | Note that this is a global limit. It affects all HTTP, HTCP, and FTP | |
9220 | connections from the client. For finer control use the ACL access controls. | |
9221 | ||
9222 | Requires client_db to be enabled (the default). | |
9223 | ||
9224 | WARNING: This may noticeably slow down traffic received via external proxies | |
9225 | or NAT devices and cause them to rebound error messages back to their clients. | |
9226 | DOC_END | |
9227 | ||
9228 | NAME: tcp_recv_bufsize | |
9229 | COMMENT: (bytes) | |
9230 | TYPE: b_size_t | |
9231 | DEFAULT: 0 bytes | |
9232 | DEFAULT_DOC: Use operating system TCP defaults. | |
9233 | LOC: Config.tcpRcvBufsz | |
9234 | DOC_START | |
9235 | Size of receive buffer to set for TCP sockets. Probably just | |
9236 | as easy to change your kernel's default. | |
9237 | Omit from squid.conf to use the default buffer size. | |
9238 | DOC_END | |
9239 | ||
9240 | COMMENT_START | |
9241 | ICAP OPTIONS | |
9242 | ----------------------------------------------------------------------------- | |
9243 | COMMENT_END | |
9244 | ||
9245 | NAME: icap_enable | |
9246 | TYPE: onoff | |
9247 | IFDEF: ICAP_CLIENT | |
9248 | COMMENT: on|off | |
9249 | LOC: Adaptation::Icap::TheConfig.onoff | |
9250 | DEFAULT: off | |
9251 | DOC_START | |
9252 | If you want to enable the ICAP module support, set this to on. | |
9253 | DOC_END | |
9254 | ||
9255 | NAME: icap_connect_timeout | |
9256 | TYPE: time_t | |
9257 | DEFAULT: none | |
9258 | LOC: Adaptation::Icap::TheConfig.connect_timeout_raw | |
9259 | IFDEF: ICAP_CLIENT | |
9260 | DOC_START | |
9261 | This parameter specifies how long to wait for the TCP connect to | |
9262 | the requested ICAP server to complete before giving up and either | |
9263 | terminating the HTTP transaction or bypassing the failure. | |
9264 | ||
9265 | The default for optional services is peer_connect_timeout. | |
9266 | The default for essential services is connect_timeout. | |
9267 | If this option is explicitly set, its value applies to all services. | |
9268 | DOC_END | |
9269 | ||
9270 | NAME: icap_io_timeout | |
9271 | COMMENT: time-units | |
9272 | TYPE: time_t | |
9273 | DEFAULT: none | |
9274 | DEFAULT_DOC: Use read_timeout. | |
9275 | LOC: Adaptation::Icap::TheConfig.io_timeout_raw | |
9276 | IFDEF: ICAP_CLIENT | |
9277 | DOC_START | |
9278 | This parameter specifies how long to wait for an I/O activity on | |
9279 | an established, active ICAP connection before giving up and | |
9280 | either terminating the HTTP transaction or bypassing the | |
9281 | failure. | |
9282 | DOC_END | |
9283 | ||
9284 | NAME: icap_service_failure_limit | |
9285 | COMMENT: limit [in memory-depth time-units] | |
9286 | TYPE: icap_service_failure_limit | |
9287 | IFDEF: ICAP_CLIENT | |
9288 | LOC: Adaptation::Icap::TheConfig | |
9289 | DEFAULT: 10 | |
9290 | DOC_START | |
9291 | The limit specifies the number of failures that Squid tolerates | |
9292 | when establishing a new TCP connection with an ICAP service. If | |
9293 | the number of failures exceeds the limit, the ICAP service is | |
9294 | not used for new ICAP requests until it is time to refresh its | |
9295 | OPTIONS. | |
9296 | ||
9297 | A negative value disables the limit. Without the limit, an ICAP | |
9298 | service will not be considered down due to connectivity failures | |
9299 | between ICAP OPTIONS requests. | |
9300 | ||
9301 | Squid forgets ICAP service failures older than the specified | |
9302 | value of memory-depth. The memory fading algorithm | |
9303 | is approximate because Squid does not remember individual | |
9304 | errors but groups them instead, splitting the option | |
9305 | value into ten time slots of equal length. | |
9306 | ||
9307 | When memory-depth is 0 and by default this option has no | |
9308 | effect on service failure expiration. | |
9309 | ||
9310 | Squid always forgets failures when updating service settings | |
9311 | using an ICAP OPTIONS transaction, regardless of this option | |
9312 | setting. | |
9313 | ||
9314 | For example, | |
9315 | # suspend service usage after 10 failures in 5 seconds: | |
9316 | icap_service_failure_limit 10 in 5 seconds | |
9317 | DOC_END | |
9318 | ||
9319 | NAME: icap_service_revival_delay | |
9320 | TYPE: int | |
9321 | IFDEF: ICAP_CLIENT | |
9322 | LOC: Adaptation::Icap::TheConfig.service_revival_delay | |
9323 | DEFAULT: 180 | |
9324 | DOC_START | |
9325 | The delay specifies the number of seconds to wait after an ICAP | |
9326 | OPTIONS request failure before requesting the options again. The | |
9327 | failed ICAP service is considered "down" until fresh OPTIONS are | |
9328 | fetched. | |
9329 | ||
9330 | The actual delay cannot be smaller than the hardcoded minimum | |
9331 | delay of 30 seconds. | |
9332 | DOC_END | |
9333 | ||
9334 | NAME: icap_preview_enable | |
9335 | TYPE: onoff | |
9336 | IFDEF: ICAP_CLIENT | |
9337 | COMMENT: on|off | |
9338 | LOC: Adaptation::Icap::TheConfig.preview_enable | |
9339 | DEFAULT: on | |
9340 | DOC_START | |
9341 | The ICAP Preview feature allows the ICAP server to handle the | |
9342 | HTTP message by looking only at the beginning of the message body | |
9343 | or even without receiving the body at all. In some environments, | |
9344 | previews greatly speedup ICAP processing. | |
9345 | ||
9346 | During an ICAP OPTIONS transaction, the server may tell Squid what | |
9347 | HTTP messages should be previewed and how big the preview should be. | |
9348 | Squid will not use Preview if the server did not request one. | |
9349 | ||
9350 | To disable ICAP Preview for all ICAP services, regardless of | |
9351 | individual ICAP server OPTIONS responses, set this option to "off". | |
9352 | Example: | |
9353 | icap_preview_enable off | |
9354 | DOC_END | |
9355 | ||
9356 | NAME: icap_preview_size | |
9357 | TYPE: int | |
9358 | IFDEF: ICAP_CLIENT | |
9359 | LOC: Adaptation::Icap::TheConfig.preview_size | |
9360 | DEFAULT: -1 | |
9361 | DEFAULT_DOC: No preview sent. | |
9362 | DOC_START | |
9363 | The default size of preview data to be sent to the ICAP server. | |
9364 | This value might be overwritten on a per server basis by OPTIONS requests. | |
9365 | DOC_END | |
9366 | ||
9367 | NAME: icap_206_enable | |
9368 | TYPE: onoff | |
9369 | IFDEF: ICAP_CLIENT | |
9370 | COMMENT: on|off | |
9371 | LOC: Adaptation::Icap::TheConfig.allow206_enable | |
9372 | DEFAULT: on | |
9373 | DOC_START | |
9374 | 206 (Partial Content) responses is an ICAP extension that allows the | |
9375 | ICAP agents to optionally combine adapted and original HTTP message | |
9376 | content. The decision to combine is postponed until the end of the | |
9377 | ICAP response. Squid supports Partial Content extension by default. | |
9378 | ||
9379 | Activation of the Partial Content extension is negotiated with each | |
9380 | ICAP service during OPTIONS exchange. Most ICAP servers should handle | |
9381 | negotiation correctly even if they do not support the extension, but | |
9382 | some might fail. To disable Partial Content support for all ICAP | |
9383 | services and to avoid any negotiation, set this option to "off". | |
9384 | ||
9385 | Example: | |
9386 | icap_206_enable off | |
9387 | DOC_END | |
9388 | ||
9389 | NAME: icap_default_options_ttl | |
9390 | TYPE: int | |
9391 | IFDEF: ICAP_CLIENT | |
9392 | LOC: Adaptation::Icap::TheConfig.default_options_ttl | |
9393 | DEFAULT: 60 | |
9394 | DOC_START | |
9395 | The default TTL value for ICAP OPTIONS responses that don't have | |
9396 | an Options-TTL header. | |
9397 | DOC_END | |
9398 | ||
9399 | NAME: icap_persistent_connections | |
9400 | TYPE: onoff | |
9401 | IFDEF: ICAP_CLIENT | |
9402 | COMMENT: on|off | |
9403 | LOC: Adaptation::Icap::TheConfig.reuse_connections | |
9404 | DEFAULT: on | |
9405 | DOC_START | |
9406 | Whether or not Squid should use persistent connections to | |
9407 | an ICAP server. | |
9408 | DOC_END | |
9409 | ||
9410 | NAME: adaptation_send_client_ip icap_send_client_ip | |
9411 | TYPE: onoff | |
9412 | IFDEF: USE_ADAPTATION | |
9413 | COMMENT: on|off | |
9414 | LOC: Adaptation::Config::send_client_ip | |
9415 | DEFAULT: off | |
9416 | DOC_START | |
9417 | If enabled, Squid shares HTTP client IP information with adaptation | |
9418 | services. For ICAP, Squid adds the X-Client-IP header to ICAP requests. | |
9419 | For eCAP, Squid sets the libecap::metaClientIp transaction option. | |
9420 | ||
9421 | See also: adaptation_uses_indirect_client | |
9422 | DOC_END | |
9423 | ||
9424 | NAME: adaptation_send_username icap_send_client_username | |
9425 | TYPE: onoff | |
9426 | IFDEF: USE_ADAPTATION | |
9427 | COMMENT: on|off | |
9428 | LOC: Adaptation::Config::send_username | |
9429 | DEFAULT: off | |
9430 | DOC_START | |
9431 | This sends authenticated HTTP client username (if available) to | |
9432 | the adaptation service. | |
9433 | ||
9434 | For ICAP, the username value is encoded based on the | |
9435 | icap_client_username_encode option and is sent using the header | |
9436 | specified by the icap_client_username_header option. | |
9437 | DOC_END | |
9438 | ||
9439 | NAME: icap_client_username_header | |
9440 | TYPE: string | |
9441 | IFDEF: ICAP_CLIENT | |
9442 | LOC: Adaptation::Icap::TheConfig.client_username_header | |
9443 | DEFAULT: X-Client-Username | |
9444 | DOC_START | |
9445 | ICAP request header name to use for adaptation_send_username. | |
9446 | DOC_END | |
9447 | ||
9448 | NAME: icap_client_username_encode | |
9449 | TYPE: onoff | |
9450 | IFDEF: ICAP_CLIENT | |
9451 | COMMENT: on|off | |
9452 | LOC: Adaptation::Icap::TheConfig.client_username_encode | |
9453 | DEFAULT: off | |
9454 | DOC_START | |
9455 | Whether to base64 encode the authenticated client username. | |
9456 | DOC_END | |
9457 | ||
9458 | NAME: icap_service | |
9459 | TYPE: icap_service_type | |
9460 | IFDEF: ICAP_CLIENT | |
9461 | LOC: Adaptation::Icap::TheConfig | |
9462 | DEFAULT: none | |
9463 | DOC_START | |
9464 | Defines a single ICAP service using the following format: | |
9465 | ||
9466 | icap_service id vectoring_point uri [option ...] | |
9467 | ||
9468 | id: ID | |
9469 | an opaque identifier or name which is used to direct traffic to | |
9470 | this specific service. Must be unique among all adaptation | |
9471 | services in squid.conf. | |
9472 | ||
9473 | vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache | |
9474 | This specifies at which point of transaction processing the | |
9475 | ICAP service should be activated. *_postcache vectoring points | |
9476 | are not yet supported. | |
9477 | ||
9478 | uri: icap://servername:port/servicepath | |
9479 | ICAP server and service location. | |
9480 | icaps://servername:port/servicepath | |
9481 | The "icap:" URI scheme is used for traditional ICAP server and | |
9482 | service location (default port is 1344, connections are not | |
9483 | encrypted). The "icaps:" URI scheme is for Secure ICAP | |
9484 | services that use SSL/TLS-encrypted ICAP connections (by | |
9485 | default, on port 11344). | |
9486 | ||
9487 | ICAP does not allow a single service to handle both REQMOD and RESPMOD | |
9488 | transactions. Squid does not enforce that requirement. You can specify | |
9489 | services with the same service_url and different vectoring_points. You | |
9490 | can even specify multiple identical services as long as their | |
9491 | service_names differ. | |
9492 | ||
9493 | To activate a service, use the adaptation_access directive. To group | |
9494 | services, use adaptation_service_chain and adaptation_service_set. | |
9495 | ||
9496 | Service options are separated by white space. ICAP services support | |
9497 | the following name=value options: | |
9498 | ||
9499 | bypass=on|off|1|0 | |
9500 | If set to 'on' or '1', the ICAP service is treated as | |
9501 | optional. If the service cannot be reached or malfunctions, | |
9502 | Squid will try to ignore any errors and process the message as | |
9503 | if the service was not enabled. No all ICAP errors can be | |
9504 | bypassed. If set to 0, the ICAP service is treated as | |
9505 | essential and all ICAP errors will result in an error page | |
9506 | returned to the HTTP client. | |
9507 | ||
9508 | Bypass is off by default: services are treated as essential. | |
9509 | ||
9510 | routing=on|off|1|0 | |
9511 | If set to 'on' or '1', the ICAP service is allowed to | |
9512 | dynamically change the current message adaptation plan by | |
9513 | returning a chain of services to be used next. The services | |
9514 | are specified using the X-Next-Services ICAP response header | |
9515 | value, formatted as a comma-separated list of service names. | |
9516 | Each named service should be configured in squid.conf. Other | |
9517 | services are ignored. An empty X-Next-Services value results | |
9518 | in an empty plan which ends the current adaptation. | |
9519 | ||
9520 | Dynamic adaptation plan may cross or cover multiple supported | |
9521 | vectoring points in their natural processing order. | |
9522 | ||
9523 | Routing is not allowed by default: the ICAP X-Next-Services | |
9524 | response header is ignored. | |
9525 | ||
9526 | ipv6=on|off | |
9527 | Only has effect on split-stack systems. The default on those systems | |
9528 | is to use IPv4-only connections. When set to 'on' this option will | |
9529 | make Squid use IPv6-only connections to contact this ICAP service. | |
9530 | ||
9531 | on-overload=block|bypass|wait|force | |
9532 | If the service Max-Connections limit has been reached, do | |
9533 | one of the following for each new ICAP transaction: | |
9534 | * block: send an HTTP error response to the client | |
9535 | * bypass: ignore the "over-connected" ICAP service | |
9536 | * wait: wait (in a FIFO queue) for an ICAP connection slot | |
9537 | * force: proceed, ignoring the Max-Connections limit | |
9538 | ||
9539 | In SMP mode with N workers, each worker assumes the service | |
9540 | connection limit is Max-Connections/N, even though not all | |
9541 | workers may use a given service. | |
9542 | ||
9543 | The default value is "bypass" if service is bypassable, | |
9544 | otherwise it is set to "wait". | |
9545 | ||
9546 | ||
9547 | max-conn=number | |
9548 | Use the given number as the Max-Connections limit, regardless | |
9549 | of the Max-Connections value given by the service, if any. | |
9550 | ||
9551 | connection-encryption=on|off | |
9552 | Determines the ICAP service effect on the connections_encrypted | |
9553 | ACL. | |
9554 | ||
9555 | The default is "on" for Secure ICAP services (i.e., those | |
9556 | with the icaps:// service URIs scheme) and "off" for plain ICAP | |
9557 | services. | |
9558 | ||
9559 | Does not affect ICAP connections (e.g., does not turn Secure | |
9560 | ICAP on or off). | |
9561 | ||
9562 | ==== ICAPS / TLS OPTIONS ==== | |
9563 | ||
9564 | These options are used for Secure ICAP (icaps://....) services only. | |
9565 | ||
9566 | tls-cert=/path/to/ssl/certificate | |
9567 | A client X.509 certificate to use when connecting to | |
9568 | this ICAP server. | |
9569 | ||
9570 | tls-key=/path/to/ssl/key | |
9571 | The private key corresponding to the previous | |
9572 | tls-cert= option. | |
9573 | ||
9574 | If tls-key= is not specified tls-cert= is assumed to | |
9575 | reference a PEM file containing both the certificate | |
9576 | and private key. | |
9577 | ||
9578 | tls-cipher=... The list of valid TLS/SSL ciphers to use when connecting | |
9579 | to this icap server. | |
9580 | ||
9581 | tls-min-version=1.N | |
9582 | The minimum TLS protocol version to permit. To control | |
9583 | SSLv3 use the tls-options= parameter. | |
9584 | Supported Values: 1.0 (default), 1.1, 1.2 | |
9585 | ||
9586 | tls-options=... Specify various OpenSSL library options: | |
9587 | ||
9588 | NO_SSLv3 Disallow the use of SSLv3 | |
9589 | ||
9590 | SINGLE_DH_USE | |
9591 | Always create a new key when using | |
9592 | temporary/ephemeral DH key exchanges | |
9593 | ||
9594 | ALL Enable various bug workarounds | |
9595 | suggested as "harmless" by OpenSSL | |
9596 | Be warned that this reduces SSL/TLS | |
9597 | strength to some attacks. | |
9598 | ||
9599 | See the OpenSSL SSL_CTX_set_options documentation for a | |
9600 | more complete list. Options relevant only to SSLv2 are | |
9601 | not supported. | |
9602 | ||
9603 | tls-cafile= PEM file containing CA certificates to use when verifying | |
9604 | the icap server certificate. | |
9605 | Use to specify intermediate CA certificate(s) if not sent | |
9606 | by the server. Or the full CA chain for the server when | |
9607 | using the tls-default-ca=off flag. | |
9608 | May be repeated to load multiple files. | |
9609 | ||
9610 | tls-capath=... A directory containing additional CA certificates to | |
9611 | use when verifying the icap server certificate. | |
9612 | Requires OpenSSL or LibreSSL. | |
9613 | ||
9614 | tls-crlfile=... A certificate revocation list file to use when | |
9615 | verifying the icap server certificate. | |
9616 | ||
9617 | tls-flags=... Specify various flags modifying the Squid TLS implementation: | |
9618 | ||
9619 | DONT_VERIFY_PEER | |
9620 | Accept certificates even if they fail to | |
9621 | verify. | |
9622 | DONT_VERIFY_DOMAIN | |
9623 | Don't verify the icap server certificate | |
9624 | matches the server name | |
9625 | ||
9626 | tls-default-ca[=off] | |
9627 | Whether to use the system Trusted CAs. Default is ON. | |
9628 | ||
9629 | tls-domain= The icap server name as advertised in it's certificate. | |
9630 | Used for verifying the correctness of the received icap | |
9631 | server certificate. If not specified the icap server | |
9632 | hostname extracted from ICAP URI will be used. | |
9633 | ||
9634 | Older icap_service format without optional named parameters is | |
9635 | deprecated but supported for backward compatibility. | |
9636 | ||
9637 | Example: | |
9638 | icap_service svcBlocker reqmod_precache icap://icap1.mydomain.net:1344/reqmod bypass=0 | |
9639 | icap_service svcLogger reqmod_precache icaps://icap2.mydomain.net:11344/reqmod routing=on | |
9640 | DOC_END | |
9641 | ||
9642 | NAME: icap_class | |
9643 | TYPE: icap_class_type | |
9644 | IFDEF: ICAP_CLIENT | |
9645 | LOC: none | |
9646 | DEFAULT: none | |
9647 | DOC_START | |
9648 | This deprecated option was documented to define an ICAP service | |
9649 | chain, even though it actually defined a set of similar, redundant | |
9650 | services, and the chains were not supported. | |
9651 | ||
9652 | To define a set of redundant services, please use the | |
9653 | adaptation_service_set directive. For service chains, use | |
9654 | adaptation_service_chain. | |
9655 | DOC_END | |
9656 | ||
9657 | NAME: icap_access | |
9658 | TYPE: icap_access_type | |
9659 | IFDEF: ICAP_CLIENT | |
9660 | LOC: none | |
9661 | DEFAULT: none | |
9662 | DOC_START | |
9663 | This option is deprecated. Please use adaptation_access, which | |
9664 | has the same ICAP functionality, but comes with better | |
9665 | documentation, and eCAP support. | |
9666 | DOC_END | |
9667 | ||
9668 | COMMENT_START | |
9669 | eCAP OPTIONS | |
9670 | ----------------------------------------------------------------------------- | |
9671 | COMMENT_END | |
9672 | ||
9673 | NAME: ecap_enable | |
9674 | TYPE: onoff | |
9675 | IFDEF: USE_ECAP | |
9676 | COMMENT: on|off | |
9677 | LOC: Adaptation::Ecap::TheConfig.onoff | |
9678 | DEFAULT: off | |
9679 | DOC_START | |
9680 | Controls whether eCAP support is enabled. | |
9681 | DOC_END | |
9682 | ||
9683 | NAME: ecap_service | |
9684 | TYPE: ecap_service_type | |
9685 | IFDEF: USE_ECAP | |
9686 | LOC: Adaptation::Ecap::TheConfig | |
9687 | DEFAULT: none | |
9688 | DOC_START | |
9689 | Defines a single eCAP service | |
9690 | ||
9691 | ecap_service id vectoring_point uri [option ...] | |
9692 | ||
9693 | id: ID | |
9694 | an opaque identifier or name which is used to direct traffic to | |
9695 | this specific service. Must be unique among all adaptation | |
9696 | services in squid.conf. | |
9697 | ||
9698 | vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache | |
9699 | This specifies at which point of transaction processing the | |
9700 | eCAP service should be activated. *_postcache vectoring points | |
9701 | are not yet supported. | |
9702 | ||
9703 | uri: ecap://vendor/service_name?custom&cgi=style¶meters=optional | |
9704 | Squid uses the eCAP service URI to match this configuration | |
9705 | line with one of the dynamically loaded services. Each loaded | |
9706 | eCAP service must have a unique URI. Obtain the right URI from | |
9707 | the service provider. | |
9708 | ||
9709 | To activate a service, use the adaptation_access directive. To group | |
9710 | services, use adaptation_service_chain and adaptation_service_set. | |
9711 | ||
9712 | Service options are separated by white space. eCAP services support | |
9713 | the following name=value options: | |
9714 | ||
9715 | bypass=on|off|1|0 | |
9716 | If set to 'on' or '1', the eCAP service is treated as optional. | |
9717 | If the service cannot be reached or malfunctions, Squid will try | |
9718 | to ignore any errors and process the message as if the service | |
9719 | was not enabled. No all eCAP errors can be bypassed. | |
9720 | If set to 'off' or '0', the eCAP service is treated as essential | |
9721 | and all eCAP errors will result in an error page returned to the | |
9722 | HTTP client. | |
9723 | ||
9724 | Bypass is off by default: services are treated as essential. | |
9725 | ||
9726 | routing=on|off|1|0 | |
9727 | If set to 'on' or '1', the eCAP service is allowed to | |
9728 | dynamically change the current message adaptation plan by | |
9729 | returning a chain of services to be used next. | |
9730 | ||
9731 | Dynamic adaptation plan may cross or cover multiple supported | |
9732 | vectoring points in their natural processing order. | |
9733 | ||
9734 | Routing is not allowed by default. | |
9735 | ||
9736 | connection-encryption=on|off | |
9737 | Determines the eCAP service effect on the connections_encrypted | |
9738 | ACL. | |
9739 | ||
9740 | Defaults to "on", which does not taint the master transaction | |
9741 | w.r.t. that ACL. | |
9742 | ||
9743 | Does not affect eCAP API calls. | |
9744 | ||
9745 | Older ecap_service format without optional named parameters is | |
9746 | deprecated but supported for backward compatibility. | |
9747 | ||
9748 | ||
9749 | Example: | |
9750 | ecap_service s1 reqmod_precache ecap://filters.R.us/leakDetector?on_error=block bypass=off | |
9751 | ecap_service s2 respmod_precache ecap://filters.R.us/virusFilter config=/etc/vf.cfg bypass=on | |
9752 | DOC_END | |
9753 | ||
9754 | NAME: loadable_modules | |
9755 | TYPE: SBufList | |
9756 | IFDEF: USE_LOADABLE_MODULES | |
9757 | LOC: Config.loadable_module_names | |
9758 | DEFAULT: none | |
9759 | DOC_START | |
9760 | Instructs Squid to load the specified dynamic module(s) or activate | |
9761 | preloaded module(s). | |
9762 | Example: | |
9763 | loadable_modules @DEFAULT_PREFIX@/lib/MinimalAdapter.so | |
9764 | DOC_END | |
9765 | ||
9766 | COMMENT_START | |
9767 | MESSAGE ADAPTATION OPTIONS | |
9768 | ----------------------------------------------------------------------------- | |
9769 | COMMENT_END | |
9770 | ||
9771 | NAME: adaptation_service_set | |
9772 | TYPE: adaptation_service_set_type | |
9773 | IFDEF: USE_ADAPTATION | |
9774 | LOC: none | |
9775 | DEFAULT: none | |
9776 | DOC_START | |
9777 | ||
9778 | Configures an ordered set of similar, redundant services. This is | |
9779 | useful when hot standby or backup adaptation servers are available. | |
9780 | ||
9781 | adaptation_service_set set_name service_name1 service_name2 ... | |
9782 | ||
9783 | The named services are used in the set declaration order. The first | |
9784 | applicable adaptation service from the set is used first. The next | |
9785 | applicable service is tried if and only if the transaction with the | |
9786 | previous service fails and the message waiting to be adapted is still | |
9787 | intact. | |
9788 | ||
9789 | When adaptation starts, broken services are ignored as if they were | |
9790 | not a part of the set. A broken service is a down optional service. | |
9791 | ||
9792 | The services in a set must be attached to the same vectoring point | |
9793 | (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD). | |
9794 | ||
9795 | If all services in a set are optional then adaptation failures are | |
9796 | bypassable. If all services in the set are essential, then a | |
9797 | transaction failure with one service may still be retried using | |
9798 | another service from the set, but when all services fail, the master | |
9799 | transaction fails as well. | |
9800 | ||
9801 | A set may contain a mix of optional and essential services, but that | |
9802 | is likely to lead to surprising results because broken services become | |
9803 | ignored (see above), making previously bypassable failures fatal. | |
9804 | Technically, it is the bypassability of the last failed service that | |
9805 | matters. | |
9806 | ||
9807 | See also: adaptation_access adaptation_service_chain | |
9808 | ||
9809 | Example: | |
9810 | adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup | |
9811 | adaptation service_set svcLogger loggerLocal loggerRemote | |
9812 | DOC_END | |
9813 | ||
9814 | NAME: adaptation_service_chain | |
9815 | TYPE: adaptation_service_chain_type | |
9816 | IFDEF: USE_ADAPTATION | |
9817 | LOC: none | |
9818 | DEFAULT: none | |
9819 | DOC_START | |
9820 | ||
9821 | Configures a list of complementary services that will be applied | |
9822 | one-by-one, forming an adaptation chain or pipeline. This is useful | |
9823 | when Squid must perform different adaptations on the same message. | |
9824 | ||
9825 | adaptation_service_chain chain_name service_name1 svc_name2 ... | |
9826 | ||
9827 | The named services are used in the chain declaration order. The first | |
9828 | applicable adaptation service from the chain is used first. The next | |
9829 | applicable service is applied to the successful adaptation results of | |
9830 | the previous service in the chain. | |
9831 | ||
9832 | When adaptation starts, broken services are ignored as if they were | |
9833 | not a part of the chain. A broken service is a down optional service. | |
9834 | ||
9835 | Request satisfaction terminates the adaptation chain because Squid | |
9836 | does not currently allow declaration of RESPMOD services at the | |
9837 | "reqmod_precache" vectoring point (see icap_service or ecap_service). | |
9838 | ||
9839 | The services in a chain must be attached to the same vectoring point | |
9840 | (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD). | |
9841 | ||
9842 | A chain may contain a mix of optional and essential services. If an | |
9843 | essential adaptation fails (or the failure cannot be bypassed for | |
9844 | other reasons), the master transaction fails. Otherwise, the failure | |
9845 | is bypassed as if the failed adaptation service was not in the chain. | |
9846 | ||
9847 | See also: adaptation_access adaptation_service_set | |
9848 | ||
9849 | Example: | |
9850 | adaptation_service_chain svcRequest requestLogger urlFilter leakDetector | |
9851 | DOC_END | |
9852 | ||
9853 | NAME: adaptation_access | |
9854 | TYPE: adaptation_access_type | |
9855 | IFDEF: USE_ADAPTATION | |
9856 | LOC: none | |
9857 | DEFAULT: none | |
9858 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. | |
9859 | DOC_START | |
9860 | Sends an HTTP transaction to an ICAP or eCAP adaptation service. | |
9861 | ||
9862 | adaptation_access service_name allow|deny [!]aclname... | |
9863 | adaptation_access set_name allow|deny [!]aclname... | |
9864 | ||
9865 | At each supported vectoring point, the adaptation_access | |
9866 | statements are processed in the order they appear in this | |
9867 | configuration file. Statements pointing to the following services | |
9868 | are ignored (i.e., skipped without checking their ACL): | |
9869 | ||
9870 | - services serving different vectoring points | |
9871 | - "broken-but-bypassable" services | |
9872 | - "up" services configured to ignore such transactions | |
9873 | (e.g., based on the ICAP Transfer-Ignore header). | |
9874 | ||
9875 | When a set_name is used, all services in the set are checked | |
9876 | using the same rules, to find the first applicable one. See | |
9877 | adaptation_service_set for details. | |
9878 | ||
9879 | If an access list is checked and there is a match, the | |
9880 | processing stops: For an "allow" rule, the corresponding | |
9881 | adaptation service is used for the transaction. For a "deny" | |
9882 | rule, no adaptation service is activated. | |
9883 | ||
9884 | It is currently not possible to apply more than one adaptation | |
9885 | service at the same vectoring point to the same HTTP transaction. | |
9886 | ||
9887 | See also: icap_service and ecap_service | |
9888 | ||
9889 | Example: | |
9890 | adaptation_access service_1 allow all | |
9891 | DOC_END | |
9892 | ||
9893 | NAME: adaptation_service_iteration_limit | |
9894 | TYPE: int | |
9895 | IFDEF: USE_ADAPTATION | |
9896 | LOC: Adaptation::Config::service_iteration_limit | |
9897 | DEFAULT: 16 | |
9898 | DOC_START | |
9899 | Limits the number of iterations allowed when applying adaptation | |
9900 | services to a message. If your longest adaptation set or chain | |
9901 | may have more than 16 services, increase the limit beyond its | |
9902 | default value of 16. If detecting infinite iteration loops sooner | |
9903 | is critical, make the iteration limit match the actual number | |
9904 | of services in your longest adaptation set or chain. | |
9905 | ||
9906 | Infinite adaptation loops are most likely with routing services. | |
9907 | ||
9908 | See also: icap_service routing=1 | |
9909 | DOC_END | |
9910 | ||
9911 | NAME: adaptation_masterx_shared_names | |
9912 | TYPE: string | |
9913 | IFDEF: USE_ADAPTATION | |
9914 | LOC: Adaptation::Config::masterx_shared_name | |
9915 | DEFAULT: none | |
9916 | DOC_START | |
9917 | For each master transaction (i.e., the HTTP request and response | |
9918 | sequence, including all related ICAP and eCAP exchanges), Squid | |
9919 | maintains a table of metadata. The table entries are (name, value) | |
9920 | pairs shared among eCAP and ICAP exchanges. The table is destroyed | |
9921 | with the master transaction. | |
9922 | ||
9923 | This option specifies the table entry names that Squid must accept | |
9924 | from and forward to the adaptation transactions. | |
9925 | ||
9926 | An ICAP REQMOD or RESPMOD transaction may set an entry in the | |
9927 | shared table by returning an ICAP header field with a name | |
9928 | specified in adaptation_masterx_shared_names. | |
9929 | ||
9930 | An eCAP REQMOD or RESPMOD transaction may set an entry in the | |
9931 | shared table by implementing the libecap::visitEachOption() API | |
9932 | to provide an option with a name specified in | |
9933 | adaptation_masterx_shared_names. | |
9934 | ||
9935 | Squid will store and forward the set entry to subsequent adaptation | |
9936 | transactions within the same master transaction scope. | |
9937 | ||
9938 | Only one shared entry name is supported at this time. | |
9939 | ||
9940 | Example: | |
9941 | # share authentication information among ICAP services | |
9942 | adaptation_masterx_shared_names X-Subscriber-ID | |
9943 | DOC_END | |
9944 | ||
9945 | NAME: adaptation_meta | |
9946 | TYPE: note | |
9947 | IFDEF: USE_ADAPTATION | |
9948 | LOC: Adaptation::Config::metaHeaders() | |
9949 | DEFAULT: none | |
9950 | DOC_START | |
9951 | This option allows Squid administrator to add custom ICAP request | |
9952 | headers or eCAP options to Squid ICAP requests or eCAP transactions. | |
9953 | Use it to pass custom authentication tokens and other | |
9954 | transaction-state related meta information to an ICAP/eCAP service. | |
9955 | ||
9956 | The addition of a meta header is ACL-driven: | |
9957 | adaptation_meta name value [!]aclname ... | |
9958 | ||
9959 | Processing for a given header name stops after the first ACL list match. | |
9960 | Thus, it is impossible to add two headers with the same name. If no ACL | |
9961 | lists match for a given header name, no such header is added. For | |
9962 | example: | |
9963 | ||
9964 | # do not debug transactions except for those that need debugging | |
9965 | adaptation_meta X-Debug 1 needs_debugging | |
9966 | ||
9967 | # log all transactions except for those that must remain secret | |
9968 | adaptation_meta X-Log 1 !keep_secret | |
9969 | ||
9970 | # mark transactions from users in the "G 1" group | |
9971 | adaptation_meta X-Authenticated-Groups "G 1" authed_as_G1 | |
9972 | ||
9973 | The "value" parameter may be a regular squid.conf token or a "double | |
9974 | quoted string". Within the quoted string, use backslash (\) to escape | |
9975 | any character, which is currently only useful for escaping backslashes | |
9976 | and double quotes. For example, | |
9977 | "this string has one backslash (\\) and two \"quotes\"" | |
9978 | ||
9979 | Used adaptation_meta header values may be logged via %note | |
9980 | logformat code. If multiple adaptation_meta headers with the same name | |
9981 | are used during master transaction lifetime, the header values are | |
9982 | logged in the order they were used and duplicate values are ignored | |
9983 | (only the first repeated value will be logged). | |
9984 | DOC_END | |
9985 | ||
9986 | NAME: icap_retry | |
9987 | TYPE: acl_access | |
9988 | IFDEF: ICAP_CLIENT | |
9989 | LOC: Adaptation::Icap::TheConfig.repeat | |
9990 | DEFAULT_IF_NONE: deny all | |
9991 | DOC_START | |
9992 | This ACL determines which retriable ICAP transactions are | |
9993 | retried. Transactions that received a complete ICAP response | |
9994 | and did not have to consume or produce HTTP bodies to receive | |
9995 | that response are usually retriable. | |
9996 | ||
9997 | icap_retry allow|deny [!]aclname ... | |
9998 | ||
9999 | Squid automatically retries some ICAP I/O timeouts and errors | |
10000 | due to persistent connection race conditions. | |
10001 | ||
10002 | See also: icap_retry_limit | |
10003 | DOC_END | |
10004 | ||
10005 | NAME: icap_retry_limit | |
10006 | TYPE: int | |
10007 | IFDEF: ICAP_CLIENT | |
10008 | LOC: Adaptation::Icap::TheConfig.repeat_limit | |
10009 | DEFAULT: 0 | |
10010 | DEFAULT_DOC: No retries are allowed. | |
10011 | DOC_START | |
10012 | Limits the number of retries allowed. | |
10013 | ||
10014 | Communication errors due to persistent connection race | |
10015 | conditions are unavoidable, automatically retried, and do not | |
10016 | count against this limit. | |
10017 | ||
10018 | See also: icap_retry | |
10019 | DOC_END | |
10020 | ||
10021 | ||
10022 | COMMENT_START | |
10023 | DNS OPTIONS | |
10024 | ----------------------------------------------------------------------------- | |
10025 | COMMENT_END | |
10026 | ||
10027 | NAME: check_hostnames | |
10028 | TYPE: onoff | |
10029 | DEFAULT: off | |
10030 | LOC: Config.onoff.check_hostnames | |
10031 | DOC_START | |
10032 | For security and stability reasons Squid can check | |
10033 | hostnames for Internet standard RFC compliance. If you want | |
10034 | Squid to perform these checks turn this directive on. | |
10035 | DOC_END | |
10036 | ||
10037 | NAME: allow_underscore | |
10038 | TYPE: onoff | |
10039 | DEFAULT: on | |
10040 | LOC: Config.onoff.allow_underscore | |
10041 | DOC_START | |
10042 | Underscore characters is not strictly allowed in Internet hostnames | |
10043 | but nevertheless used by many sites. Set this to off if you want | |
10044 | Squid to be strict about the standard. | |
10045 | This check is performed only when check_hostnames is set to on. | |
10046 | DOC_END | |
10047 | ||
10048 | NAME: dns_retransmit_interval | |
10049 | TYPE: time_msec | |
10050 | DEFAULT: 5 seconds | |
10051 | LOC: Config.Timeout.idns_retransmit | |
10052 | DOC_START | |
10053 | Initial retransmit interval for DNS queries. The interval is | |
10054 | doubled each time all configured DNS servers have been tried. | |
10055 | DOC_END | |
10056 | ||
10057 | NAME: dns_timeout | |
10058 | TYPE: time_msec | |
10059 | DEFAULT: 30 seconds | |
10060 | LOC: Config.Timeout.idns_query | |
10061 | DOC_START | |
10062 | DNS Query timeout. If no response is received to a DNS query | |
10063 | within this time all DNS servers for the queried domain | |
10064 | are assumed to be unavailable. | |
10065 | DOC_END | |
10066 | ||
10067 | NAME: dns_packet_max | |
10068 | TYPE: b_ssize_t | |
10069 | DEFAULT_DOC: EDNS disabled | |
10070 | DEFAULT: none | |
10071 | LOC: Config.dns.packet_max | |
10072 | DOC_START | |
10073 | Maximum number of bytes packet size to advertise via EDNS. | |
10074 | Set to "none" to disable EDNS large packet support. | |
10075 | ||
10076 | For legacy reasons DNS UDP replies will default to 512 bytes which | |
10077 | is too small for many responses. EDNS provides a means for Squid to | |
10078 | negotiate receiving larger responses back immediately without having | |
10079 | to failover with repeat requests. Responses larger than this limit | |
10080 | will retain the old behaviour of failover to TCP DNS. | |
10081 | ||
10082 | Squid has no real fixed limit internally, but allowing packet sizes | |
10083 | over 1500 bytes requires network jumbogram support and is usually not | |
10084 | necessary. | |
10085 | ||
10086 | WARNING: The RFC also indicates that some older resolvers will reply | |
10087 | with failure of the whole request if the extension is added. Some | |
10088 | resolvers have already been identified which will reply with mangled | |
10089 | EDNS response on occasion. Usually in response to many-KB jumbogram | |
10090 | sizes being advertised by Squid. | |
10091 | Squid will currently treat these both as an unable-to-resolve domain | |
10092 | even if it would be resolvable without EDNS. | |
10093 | DOC_END | |
10094 | ||
10095 | NAME: dns_defnames | |
10096 | COMMENT: on|off | |
10097 | TYPE: onoff | |
10098 | DEFAULT: off | |
10099 | DEFAULT_DOC: Search for single-label domain names is disabled. | |
10100 | LOC: Config.onoff.res_defnames | |
10101 | DOC_START | |
10102 | Normally the RES_DEFNAMES resolver option is disabled | |
10103 | (see res_init(3)). This prevents caches in a hierarchy | |
10104 | from interpreting single-component hostnames locally. To allow | |
10105 | Squid to handle single-component names, enable this option. | |
10106 | DOC_END | |
10107 | ||
10108 | NAME: dns_multicast_local | |
10109 | COMMENT: on|off | |
10110 | TYPE: onoff | |
10111 | DEFAULT: off | |
10112 | DEFAULT_DOC: Search for .local and .arpa names is disabled. | |
10113 | LOC: Config.onoff.dns_mdns | |
10114 | DOC_START | |
10115 | When set to on, Squid sends multicast DNS lookups on the local | |
10116 | network for domains ending in .local and .arpa. | |
10117 | This enables local servers and devices to be contacted in an | |
10118 | ad-hoc or zero-configuration network environment. | |
10119 | DOC_END | |
10120 | ||
10121 | NAME: dns_nameservers | |
10122 | TYPE: SBufList | |
10123 | DEFAULT: none | |
10124 | DEFAULT_DOC: Use operating system definitions | |
10125 | LOC: Config.dns.nameservers | |
10126 | DOC_START | |
10127 | Use this if you want to specify a list of DNS name servers | |
10128 | (IP addresses) to use instead of those given in your | |
10129 | /etc/resolv.conf file. | |
10130 | ||
10131 | On Windows platforms, if no value is specified here or in | |
10132 | the /etc/resolv.conf file, the list of DNS name servers are | |
10133 | taken from the Windows registry, both static and dynamic DHCP | |
10134 | configurations are supported. | |
10135 | ||
10136 | Example: dns_nameservers 10.0.0.1 192.172.0.4 | |
10137 | DOC_END | |
10138 | ||
10139 | NAME: hosts_file | |
10140 | TYPE: string | |
10141 | DEFAULT: @DEFAULT_HOSTS@ | |
10142 | LOC: Config.etcHostsPath | |
10143 | DOC_START | |
10144 | Location of the host-local IP name-address associations | |
10145 | database. Most Operating Systems have such a file on different | |
10146 | default locations: | |
10147 | - Un*X & Linux: /etc/hosts | |
10148 | - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts | |
10149 | (%SystemRoot% value install default is c:\winnt) | |
10150 | - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts | |
10151 | (%SystemRoot% value install default is c:\windows) | |
10152 | - Windows 9x/Me: %windir%\hosts | |
10153 | (%windir% value is usually c:\windows) | |
10154 | - Cygwin: /etc/hosts | |
10155 | ||
10156 | The file contains newline-separated definitions, in the | |
10157 | form ip_address_in_dotted_form name [name ...] names are | |
10158 | whitespace-separated. Lines beginning with an hash (#) | |
10159 | character are comments. | |
10160 | ||
10161 | The file is checked at startup and upon configuration. | |
10162 | If set to 'none', it won't be checked. | |
10163 | If append_domain is used, that domain will be added to | |
10164 | domain-local (i.e. not containing any dot character) host | |
10165 | definitions. | |
10166 | DOC_END | |
10167 | ||
10168 | NAME: append_domain | |
10169 | TYPE: string | |
10170 | LOC: Config.appendDomain | |
10171 | DEFAULT: none | |
10172 | DEFAULT_DOC: Use operating system definitions | |
10173 | DOC_START | |
10174 | Appends local domain name to hostnames without any dots in | |
10175 | them. append_domain must begin with a period. | |
10176 | ||
10177 | Be warned there are now Internet names with no dots in | |
10178 | them using only top-domain names, so setting this may | |
10179 | cause some Internet sites to become unavailable. | |
10180 | ||
10181 | Example: | |
10182 | append_domain .yourdomain.com | |
10183 | DOC_END | |
10184 | ||
10185 | NAME: ignore_unknown_nameservers | |
10186 | TYPE: onoff | |
10187 | LOC: Config.onoff.ignore_unknown_nameservers | |
10188 | DEFAULT: on | |
10189 | DOC_START | |
10190 | By default Squid checks that DNS responses are received | |
10191 | from the same IP addresses they are sent to. If they | |
10192 | don't match, Squid ignores the response and writes a warning | |
10193 | message to cache.log. You can allow responses from unknown | |
10194 | nameservers by setting this option to 'off'. | |
10195 | DOC_END | |
10196 | ||
10197 | NAME: ipcache_size | |
10198 | COMMENT: (number of entries) | |
10199 | TYPE: int | |
10200 | DEFAULT: 1024 | |
10201 | LOC: Config.ipcache.size | |
10202 | DOC_START | |
10203 | Maximum number of DNS IP cache entries. | |
10204 | DOC_END | |
10205 | ||
10206 | NAME: ipcache_low | |
10207 | COMMENT: (percent) | |
10208 | TYPE: int | |
10209 | DEFAULT: 90 | |
10210 | LOC: Config.ipcache.low | |
10211 | DOC_NONE | |
10212 | ||
10213 | NAME: ipcache_high | |
10214 | COMMENT: (percent) | |
10215 | TYPE: int | |
10216 | DEFAULT: 95 | |
10217 | LOC: Config.ipcache.high | |
10218 | DOC_START | |
10219 | The size, low-, and high-water marks for the IP cache. | |
10220 | DOC_END | |
10221 | ||
10222 | NAME: fqdncache_size | |
10223 | COMMENT: (number of entries) | |
10224 | TYPE: int | |
10225 | DEFAULT: 1024 | |
10226 | LOC: Config.fqdncache.size | |
10227 | DOC_START | |
10228 | Maximum number of FQDN cache entries. | |
10229 | DOC_END | |
10230 | ||
10231 | COMMENT_START | |
10232 | MISCELLANEOUS | |
10233 | ----------------------------------------------------------------------------- | |
10234 | COMMENT_END | |
10235 | ||
10236 | NAME: configuration_includes_quoted_values | |
10237 | COMMENT: on|off | |
10238 | TYPE: configuration_includes_quoted_values | |
10239 | DEFAULT: off | |
10240 | LOC: ConfigParser::RecognizeQuotedValues | |
10241 | DOC_START | |
10242 | If set, Squid will recognize each "quoted string" after a configuration | |
10243 | directive as a single parameter. The quotes are stripped before the | |
10244 | parameter value is interpreted or used. | |
10245 | See "Values with spaces, quotes, and other special characters" | |
10246 | section for more details. | |
10247 | DOC_END | |
10248 | ||
10249 | NAME: memory_pools | |
10250 | COMMENT: on|off | |
10251 | TYPE: onoff | |
10252 | DEFAULT: on | |
10253 | LOC: Config.onoff.mem_pools | |
10254 | DOC_START | |
10255 | If set, Squid will keep pools of allocated (but unused) memory | |
10256 | available for future use. If memory is a premium on your | |
10257 | system and you believe your malloc library outperforms Squid | |
10258 | routines, disable this. | |
10259 | DOC_END | |
10260 | ||
10261 | NAME: memory_pools_limit | |
10262 | COMMENT: (bytes) | |
10263 | TYPE: b_int64_t | |
10264 | DEFAULT: 5 MB | |
10265 | LOC: Config.MemPools.limit | |
10266 | DOC_START | |
10267 | Used only with memory_pools on: | |
10268 | memory_pools_limit 50 MB | |
10269 | ||
10270 | If set to a non-zero value, Squid will keep at most the specified | |
10271 | limit of allocated (but unused) memory in memory pools. All free() | |
10272 | requests that exceed this limit will be handled by your malloc | |
10273 | library. Squid does not pre-allocate any memory, just safe-keeps | |
10274 | objects that otherwise would be free()d. Thus, it is safe to set | |
10275 | memory_pools_limit to a reasonably high value even if your | |
10276 | configuration will use less memory. | |
10277 | ||
10278 | If set to none, Squid will keep all memory it can. That is, there | |
10279 | will be no limit on the total amount of memory used for safe-keeping. | |
10280 | ||
10281 | To disable memory allocation optimization, do not set | |
10282 | memory_pools_limit to 0 or none. Set memory_pools to "off" instead. | |
10283 | ||
10284 | An overhead for maintaining memory pools is not taken into account | |
10285 | when the limit is checked. This overhead is close to four bytes per | |
10286 | object kept. However, pools may actually _save_ memory because of | |
10287 | reduced memory thrashing in your malloc library. | |
10288 | DOC_END | |
10289 | ||
10290 | NAME: forwarded_for | |
10291 | COMMENT: on|off|transparent|truncate|delete | |
10292 | TYPE: string | |
10293 | DEFAULT: on | |
10294 | LOC: opt_forwarded_for | |
10295 | DOC_START | |
10296 | If set to "on", Squid will append your client's IP address | |
10297 | in the HTTP requests it forwards. By default it looks like: | |
10298 | ||
10299 | X-Forwarded-For: 192.1.2.3 | |
10300 | ||
10301 | If set to "off", it will appear as | |
10302 | ||
10303 | X-Forwarded-For: unknown | |
10304 | ||
10305 | If set to "transparent", Squid will not alter the | |
10306 | X-Forwarded-For header in any way. | |
10307 | ||
10308 | If set to "delete", Squid will delete the entire | |
10309 | X-Forwarded-For header. | |
10310 | ||
10311 | If set to "truncate", Squid will remove all existing | |
10312 | X-Forwarded-For entries, and place the client IP as the sole entry. | |
10313 | DOC_END | |
10314 | ||
10315 | NAME: cachemgr_passwd | |
10316 | TYPE: cachemgrpasswd | |
10317 | DEFAULT: none | |
10318 | DEFAULT_DOC: No password. Actions which require password are denied. | |
10319 | LOC: Config.passwd_list | |
10320 | DOC_START | |
10321 | Specify passwords for cachemgr operations. | |
10322 | ||
10323 | Usage: cachemgr_passwd password action action ... | |
10324 | ||
10325 | Some valid actions are (see cache manager menu for a full list): | |
10326 | 5min | |
10327 | 60min | |
10328 | asndb | |
10329 | authenticator | |
10330 | cbdata | |
10331 | client_list | |
10332 | comm_incoming | |
10333 | config * | |
10334 | counters | |
10335 | delay | |
10336 | digest_stats | |
10337 | dns | |
10338 | events | |
10339 | filedescriptors | |
10340 | fqdncache | |
10341 | histograms | |
10342 | http_headers | |
10343 | info | |
10344 | io | |
10345 | ipcache | |
10346 | mem | |
10347 | menu | |
10348 | netdb | |
10349 | objects | |
10350 | offline_toggle * | |
10351 | pconn | |
10352 | peer_select | |
10353 | reconfigure * | |
10354 | redirector | |
10355 | refresh | |
10356 | server_list | |
10357 | shutdown * | |
10358 | store_digest | |
10359 | storedir | |
10360 | utilization | |
10361 | via_headers | |
10362 | vm_objects | |
10363 | ||
10364 | * Indicates actions which will not be performed without a | |
10365 | valid password, others can be performed if not listed here. | |
10366 | ||
10367 | To disable an action, set the password to "disable". | |
10368 | To allow performing an action without a password, set the | |
10369 | password to "none". | |
10370 | ||
10371 | Use the keyword "all" to set the same password for all actions. | |
10372 | ||
10373 | Example: | |
10374 | cachemgr_passwd secret shutdown | |
10375 | cachemgr_passwd lesssssssecret info stats/objects | |
10376 | cachemgr_passwd disable all | |
10377 | DOC_END | |
10378 | ||
10379 | NAME: client_db | |
10380 | COMMENT: on|off | |
10381 | TYPE: onoff | |
10382 | DEFAULT: on | |
10383 | LOC: Config.onoff.client_db | |
10384 | DOC_START | |
10385 | If you want to disable collecting per-client statistics, | |
10386 | turn off client_db here. | |
10387 | DOC_END | |
10388 | ||
10389 | NAME: refresh_all_ims | |
10390 | COMMENT: on|off | |
10391 | TYPE: onoff | |
10392 | DEFAULT: off | |
10393 | LOC: Config.onoff.refresh_all_ims | |
10394 | DOC_START | |
10395 | When you enable this option, squid will always check | |
10396 | the origin server for an update when a client sends an | |
10397 | If-Modified-Since request. Many browsers use IMS | |
10398 | requests when the user requests a reload, and this | |
10399 | ensures those clients receive the latest version. | |
10400 | ||
10401 | By default (off), squid may return a Not Modified response | |
10402 | based on the age of the cached version. | |
10403 | DOC_END | |
10404 | ||
10405 | NAME: reload_into_ims | |
10406 | IFDEF: USE_HTTP_VIOLATIONS | |
10407 | COMMENT: on|off | |
10408 | TYPE: onoff | |
10409 | DEFAULT: off | |
10410 | LOC: Config.onoff.reload_into_ims | |
10411 | DOC_START | |
10412 | When you enable this option, client no-cache or ``reload'' | |
10413 | requests will be changed to If-Modified-Since requests. | |
10414 | Doing this VIOLATES the HTTP standard. Enabling this | |
10415 | feature could make you liable for problems which it | |
10416 | causes. | |
10417 | ||
10418 | see also refresh_pattern for a more selective approach. | |
10419 | DOC_END | |
10420 | ||
10421 | NAME: connect_retries | |
10422 | TYPE: int | |
10423 | LOC: Config.connect_retries | |
10424 | DEFAULT: 0 | |
10425 | DEFAULT_DOC: Do not retry failed connections. | |
10426 | DOC_START | |
10427 | Limits the number of reopening attempts when establishing a single | |
10428 | TCP connection. All these attempts must still complete before the | |
10429 | applicable connection opening timeout expires. | |
10430 | ||
10431 | By default and when connect_retries is set to zero, Squid does not | |
10432 | retry failed connection opening attempts. | |
10433 | ||
10434 | The (not recommended) maximum is 10 tries. An attempt to configure a | |
10435 | higher value results in the value of 10 being used (with a warning). | |
10436 | ||
10437 | Squid may open connections to retry various high-level forwarding | |
10438 | failures. For an outside observer, that activity may look like a | |
10439 | low-level connection reopening attempt, but those high-level retries | |
10440 | are governed by forward_max_tries instead. | |
10441 | ||
10442 | See also: connect_timeout, forward_timeout, icap_connect_timeout, | |
10443 | and forward_max_tries. | |
10444 | DOC_END | |
10445 | ||
10446 | NAME: retry_on_error | |
10447 | TYPE: onoff | |
10448 | LOC: Config.retry.onerror | |
10449 | DEFAULT: off | |
10450 | DOC_START | |
10451 | If set to ON Squid will automatically retry requests when | |
10452 | receiving an error response with status 403 (Forbidden), | |
10453 | 500 (Internal Error), 501 or 503 (Service not available). | |
10454 | Status 502 and 504 (Gateway errors) are always retried. | |
10455 | ||
10456 | This is mainly useful if you are in a complex cache hierarchy to | |
10457 | work around access control errors. | |
10458 | ||
10459 | NOTE: This retry will attempt to find another working destination. | |
10460 | Which is different from the server which just failed. | |
10461 | DOC_END | |
10462 | ||
10463 | NAME: as_whois_server | |
10464 | TYPE: string | |
10465 | LOC: Config.as_whois_server | |
10466 | DEFAULT: whois.ra.net | |
10467 | DOC_START | |
10468 | WHOIS server to query for AS numbers. NOTE: AS numbers are | |
10469 | queried only when Squid starts up, not for every request. | |
10470 | DOC_END | |
10471 | ||
10472 | NAME: offline_mode | |
10473 | TYPE: onoff | |
10474 | LOC: Config.onoff.offline | |
10475 | DEFAULT: off | |
10476 | DOC_START | |
10477 | Enable this option and Squid will never try to validate cached | |
10478 | objects. | |
10479 | DOC_END | |
10480 | ||
10481 | NAME: uri_whitespace | |
10482 | TYPE: uri_whitespace | |
10483 | LOC: Config.uri_whitespace | |
10484 | DEFAULT: strip | |
10485 | DOC_START | |
10486 | What to do with requests that have whitespace characters in the | |
10487 | URI. Options: | |
10488 | ||
10489 | strip: The whitespace characters are stripped out of the URL. | |
10490 | This is the behavior recommended by RFC2396 and RFC3986 | |
10491 | for tolerant handling of generic URI. | |
10492 | NOTE: This is one difference between generic URI and HTTP URLs. | |
10493 | ||
10494 | deny: The request is denied. The user receives an "Invalid | |
10495 | Request" message. | |
10496 | This is the behaviour recommended by RFC2616 for safe | |
10497 | handling of HTTP request URL. | |
10498 | ||
10499 | allow: The request is allowed and the URI is not changed. The | |
10500 | whitespace characters remain in the URI. Note the | |
10501 | whitespace is passed to redirector processes if they | |
10502 | are in use. | |
10503 | Note this may be considered a violation of RFC2616 | |
10504 | request parsing where whitespace is prohibited in the | |
10505 | URL field. | |
10506 | ||
10507 | encode: The request is allowed and the whitespace characters are | |
10508 | encoded according to RFC1738. | |
10509 | ||
10510 | chop: The request is allowed and the URI is chopped at the | |
10511 | first whitespace. | |
10512 | ||
10513 | ||
10514 | NOTE the current Squid implementation of encode and chop violates | |
10515 | RFC2616 by not using a 301 redirect after altering the URL. | |
10516 | DOC_END | |
10517 | ||
10518 | NAME: chroot | |
10519 | TYPE: string | |
10520 | LOC: Config.chroot_dir | |
10521 | DEFAULT: none | |
10522 | DOC_START | |
10523 | Specifies a directory where Squid should do a chroot() while | |
10524 | initializing. This also causes Squid to fully drop root | |
10525 | privileges after initializing. This means, for example, if you | |
10526 | use a HTTP port less than 1024 and try to reconfigure, you may | |
10527 | get an error saying that Squid can not open the port. | |
10528 | DOC_END | |
10529 | ||
10530 | NAME: pipeline_prefetch | |
10531 | TYPE: pipelinePrefetch | |
10532 | LOC: Config.pipeline_max_prefetch | |
10533 | DEFAULT: 0 | |
10534 | DEFAULT_DOC: Do not pre-parse pipelined requests. | |
10535 | DOC_START | |
10536 | HTTP clients may send a pipeline of 1+N requests to Squid using a | |
10537 | single connection, without waiting for Squid to respond to the first | |
10538 | of those requests. This option limits the number of concurrent | |
10539 | requests Squid will try to handle in parallel. If set to N, Squid | |
10540 | will try to receive and process up to 1+N requests on the same | |
10541 | connection concurrently. | |
10542 | ||
10543 | Defaults to 0 (off) for bandwidth management and access logging | |
10544 | reasons. | |
10545 | ||
10546 | NOTE: pipelining requires persistent connections to clients. | |
10547 | ||
10548 | WARNING: pipelining breaks NTLM and Negotiate/Kerberos authentication. | |
10549 | DOC_END | |
10550 | ||
10551 | NAME: high_response_time_warning | |
10552 | TYPE: int | |
10553 | COMMENT: (msec) | |
10554 | LOC: Config.warnings.high_rptm | |
10555 | DEFAULT: 0 | |
10556 | DEFAULT_DOC: disabled. | |
10557 | DOC_START | |
10558 | If the one-minute median response time exceeds this value, | |
10559 | Squid prints a WARNING with debug level 0 to get the | |
10560 | administrators attention. The value is in milliseconds. | |
10561 | DOC_END | |
10562 | ||
10563 | NAME: high_page_fault_warning | |
10564 | TYPE: int | |
10565 | LOC: Config.warnings.high_pf | |
10566 | DEFAULT: 0 | |
10567 | DEFAULT_DOC: disabled. | |
10568 | DOC_START | |
10569 | If the one-minute average page fault rate exceeds this | |
10570 | value, Squid prints a WARNING with debug level 0 to get | |
10571 | the administrators attention. The value is in page faults | |
10572 | per second. | |
10573 | DOC_END | |
10574 | ||
10575 | NAME: high_memory_warning | |
10576 | TYPE: b_size_t | |
10577 | LOC: Config.warnings.high_memory | |
10578 | IFDEF: HAVE_MSTATS&&HAVE_GNUMALLOC_H | |
10579 | DEFAULT: 0 KB | |
10580 | DEFAULT_DOC: disabled. | |
10581 | DOC_START | |
10582 | If the memory usage (as determined by gnumalloc, if available and used) | |
10583 | exceeds this amount, Squid prints a WARNING with debug level 0 to get | |
10584 | the administrators attention. | |
10585 | DOC_END | |
10586 | # TODO: link high_memory_warning to mempools? | |
10587 | ||
10588 | NAME: sleep_after_fork | |
10589 | COMMENT: (microseconds) | |
10590 | TYPE: int | |
10591 | LOC: Config.sleep_after_fork | |
10592 | DEFAULT: 0 | |
10593 | DOC_START | |
10594 | When this is set to a non-zero value, the main Squid process | |
10595 | sleeps the specified number of microseconds after a fork() | |
10596 | system call. This sleep may help the situation where your | |
10597 | system reports fork() failures due to lack of (virtual) | |
10598 | memory. Note, however, if you have a lot of child | |
10599 | processes, these sleep delays will add up and your | |
10600 | Squid will not service requests for some amount of time | |
10601 | until all the child processes have been started. | |
10602 | DOC_END | |
10603 | ||
10604 | NAME: windows_ipaddrchangemonitor | |
10605 | IFDEF: _SQUID_WINDOWS_ | |
10606 | COMMENT: on|off | |
10607 | TYPE: onoff | |
10608 | DEFAULT: on | |
10609 | LOC: Config.onoff.WIN32_IpAddrChangeMonitor | |
10610 | DOC_START | |
10611 | On Windows Squid by default will monitor IP address changes and will | |
10612 | reconfigure itself after any detected event. This is very useful for | |
10613 | proxies connected to internet with dial-up interfaces. | |
10614 | In some cases (a Proxy server acting as VPN gateway is one) it could be | |
10615 | desiderable to disable this behaviour setting this to 'off'. | |
10616 | Note: after changing this, Squid service must be restarted. | |
10617 | DOC_END | |
10618 | ||
10619 | NAME: eui_lookup | |
10620 | TYPE: onoff | |
10621 | IFDEF: USE_SQUID_EUI | |
10622 | DEFAULT: on | |
10623 | LOC: Eui::TheConfig.euiLookup | |
10624 | DOC_START | |
10625 | Whether to lookup the EUI or MAC address of a connected client. | |
10626 | DOC_END | |
10627 | ||
10628 | NAME: max_filedescriptors max_filedesc | |
10629 | TYPE: int | |
10630 | DEFAULT: 0 | |
10631 | DEFAULT_DOC: Use operating system soft limit set by ulimit. | |
10632 | LOC: Config.max_filedescriptors | |
10633 | DOC_START | |
10634 | Set the maximum number of filedescriptors, either below the | |
10635 | operating system default or up to the hard limit. | |
10636 | ||
10637 | Remove from squid.conf to inherit the current ulimit soft | |
10638 | limit setting. | |
10639 | ||
10640 | Note: Changing this requires a restart of Squid. Also | |
10641 | not all I/O types supports large values (eg on Windows). | |
10642 | DOC_END | |
10643 | ||
10644 | NAME: force_request_body_continuation | |
10645 | TYPE: acl_access | |
10646 | LOC: Config.accessList.forceRequestBodyContinuation | |
10647 | DEFAULT: none | |
10648 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
10649 | DOC_START | |
10650 | This option controls how Squid handles data upload requests from HTTP | |
10651 | and FTP agents that require a "Please Continue" control message response | |
10652 | to actually send the request body to Squid. It is mostly useful in | |
10653 | adaptation environments. | |
10654 | ||
10655 | When Squid receives an HTTP request with an "Expect: 100-continue" | |
10656 | header or an FTP upload command (e.g., STOR), Squid normally sends the | |
10657 | request headers or FTP command information to an adaptation service (or | |
10658 | peer) and waits for a response. Most adaptation services (and some | |
10659 | broken peers) may not respond to Squid at that stage because they may | |
10660 | decide to wait for the HTTP request body or FTP data transfer. However, | |
10661 | that request body or data transfer may never come because Squid has not | |
10662 | responded with the HTTP 100 or FTP 150 (Please Continue) control message | |
10663 | to the request sender yet! | |
10664 | ||
10665 | An allow match tells Squid to respond with the HTTP 100 or FTP 150 | |
10666 | (Please Continue) control message on its own, before forwarding the | |
10667 | request to an adaptation service or peer. Such a response usually forces | |
10668 | the request sender to proceed with sending the body. A deny match tells | |
10669 | Squid to delay that control response until the origin server confirms | |
10670 | that the request body is needed. Delaying is the default behavior. | |
10671 | DOC_END | |
10672 | ||
10673 | NAME: http_upgrade_request_protocols | |
10674 | TYPE: http_upgrade_request_protocols | |
10675 | LOC: Config.http_upgrade_request_protocols | |
10676 | DEFAULT: none | |
10677 | DEFAULT_DOC: Upgrade header dropped, effectively blocking an upgrade attempt. | |
10678 | DOC_START | |
10679 | Controls client-initiated and server-confirmed switching from HTTP to | |
10680 | another protocol (or to several protocols) using HTTP Upgrade mechanism | |
10681 | defined in RFC 7230 Section 6.7. Squid itself does not understand the | |
10682 | protocols being upgraded to and participates in the upgraded | |
10683 | communication only as a dumb TCP proxy. Admins should not allow | |
10684 | upgrading to protocols that require a more meaningful proxy | |
10685 | participation. | |
10686 | ||
10687 | Usage: http_upgrade_request_protocols <protocol> allow|deny [!]acl ... | |
10688 | ||
10689 | The required "protocol" parameter is either an all-caps word OTHER or an | |
10690 | explicit protocol name (e.g. "WebSocket") optionally followed by a slash | |
10691 | and a version token (e.g. "HTTP/3"). Explicit protocol names and | |
10692 | versions are case sensitive. | |
10693 | ||
10694 | When an HTTP client sends an Upgrade request header, Squid iterates over | |
10695 | the client-offered protocols and, for each protocol P (with an optional | |
10696 | version V), evaluates the first non-empty set of | |
10697 | http_upgrade_request_protocols rules (if any) from the following list: | |
10698 | ||
10699 | * All rules with an explicit protocol name equal to P. | |
10700 | * All rules that use OTHER instead of a protocol name. | |
10701 | ||
10702 | In other words, rules using OTHER are considered for protocol P if and | |
10703 | only if there are no rules mentioning P by name. | |
10704 | ||
10705 | If both of the above sets are empty, then Squid removes protocol P from | |
10706 | the Upgrade offer. | |
10707 | ||
10708 | If the client sent a versioned protocol offer P/X, then explicit rules | |
10709 | referring to the same-name but different-version protocol P/Y are | |
10710 | declared inapplicable. Inapplicable rules are not evaluated (i.e. are | |
10711 | ignored). However, inapplicable rules still belong to the first set of | |
10712 | rules for P. | |
10713 | ||
10714 | Within the applicable rule subset, individual rules are evaluated in | |
10715 | their configuration order. If all ACLs of an applicable "allow" rule | |
10716 | match, then the protocol offered by the client is forwarded to the next | |
10717 | hop as is. If all ACLs of an applicable "deny" rule match, then the | |
10718 | offer is dropped. If no applicable rules have matching ACLs, then the | |
10719 | offer is also dropped. The first matching rule also ends rules | |
10720 | evaluation for the offered protocol. | |
10721 | ||
10722 | If all client-offered protocols are removed, then Squid forwards the | |
10723 | client request without the Upgrade header. Squid never sends an empty | |
10724 | Upgrade request header. | |
10725 | ||
10726 | An Upgrade request header with a value violating HTTP syntax is dropped | |
10727 | and ignored without an attempt to use extractable individual protocol | |
10728 | offers. | |
10729 | ||
10730 | Upon receiving an HTTP 101 (Switching Protocols) control message, Squid | |
10731 | checks that the server listed at least one protocol name and sent a | |
10732 | Connection:upgrade response header. Squid does not understand individual | |
10733 | protocol naming and versioning concepts enough to implement stricter | |
10734 | checks, but an admin can restrict HTTP 101 (Switching Protocols) | |
10735 | responses further using http_reply_access. Responses denied by | |
10736 | http_reply_access rules and responses flagged by the internal Upgrade | |
10737 | checks result in HTTP 502 (Bad Gateway) ERR_INVALID_RESP errors and | |
10738 | Squid-to-server connection closures. | |
10739 | ||
10740 | If Squid sends an Upgrade request header, and the next hop (e.g., the | |
10741 | origin server) responds with an acceptable HTTP 101 (Switching | |
10742 | Protocols), then Squid forwards that message to the client and becomes | |
10743 | a TCP tunnel. | |
10744 | ||
10745 | The presence of an Upgrade request header alone does not preclude cache | |
10746 | lookups. In other words, an Upgrade request might be satisfied from the | |
10747 | cache, using regular HTTP caching rules. | |
10748 | ||
10749 | This clause only supports fast acl types. | |
10750 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
10751 | ||
10752 | Each of the following groups of configuration lines represents a | |
10753 | separate configuration example: | |
10754 | ||
10755 | # never upgrade to protocol Foo; all others are OK | |
10756 | http_upgrade_request_protocols Foo deny all | |
10757 | http_upgrade_request_protocols OTHER allow all | |
10758 | ||
10759 | # only allow upgrades to protocol Bar (except for its first version) | |
10760 | http_upgrade_request_protocols Bar/1 deny all | |
10761 | http_upgrade_request_protocols Bar allow all | |
10762 | http_upgrade_request_protocols OTHER deny all # this rule is optional | |
10763 | ||
10764 | # only allow upgrades to protocol Baz, and only if Baz is the only offer | |
10765 | acl UpgradeHeaderHasMultipleOffers ... | |
10766 | http_upgrade_request_protocols Baz deny UpgradeHeaderHasMultipleOffers | |
10767 | http_upgrade_request_protocols Baz allow all | |
10768 | DOC_END | |
10769 | ||
10770 | NAME: server_pconn_for_nonretriable | |
10771 | TYPE: acl_access | |
10772 | DEFAULT: none | |
10773 | DEFAULT_DOC: Open new connections for forwarding requests Squid cannot retry safely. | |
10774 | LOC: Config.accessList.serverPconnForNonretriable | |
10775 | DOC_START | |
10776 | This option provides fine-grained control over persistent connection | |
10777 | reuse when forwarding HTTP requests that Squid cannot retry. It is useful | |
10778 | in environments where opening new connections is very expensive | |
10779 | (e.g., all connections are secured with TLS with complex client and server | |
10780 | certificate validation) and race conditions associated with persistent | |
10781 | connections are very rare and/or only cause minor problems. | |
10782 | ||
10783 | HTTP prohibits retrying unsafe and non-idempotent requests (e.g., POST). | |
10784 | Squid limitations also prohibit retrying all requests with bodies (e.g., PUT). | |
10785 | By default, when forwarding such "risky" requests, Squid opens a new | |
10786 | connection to the server or cache_peer, even if there is an idle persistent | |
10787 | connection available. When Squid is configured to risk sending a non-retriable | |
10788 | request on a previously used persistent connection, and the server closes | |
10789 | the connection before seeing that risky request, the user gets an error response | |
10790 | from Squid. In most cases, that error response will be HTTP 502 (Bad Gateway) | |
10791 | with ERR_ZERO_SIZE_OBJECT or ERR_WRITE_ERROR (peer connection reset) error detail. | |
10792 | ||
10793 | If an allow rule matches, Squid reuses an available idle persistent connection | |
10794 | (if any) for the request that Squid cannot retry. If a deny rule matches, then | |
10795 | Squid opens a new connection for the request that Squid cannot retry. | |
10796 | ||
10797 | This option does not affect requests that Squid can retry. They will reuse idle | |
10798 | persistent connections (if any). | |
10799 | ||
10800 | This clause only supports fast acl types. | |
10801 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
10802 | ||
10803 | Example: | |
10804 | acl SpeedIsWorthTheRisk method POST | |
10805 | server_pconn_for_nonretriable allow SpeedIsWorthTheRisk | |
10806 | DOC_END | |
10807 | ||
10808 | NAME: happy_eyeballs_connect_timeout | |
10809 | COMMENT: (msec) | |
10810 | TYPE: int | |
10811 | DEFAULT: 250 | |
10812 | LOC: Config.happyEyeballs.connect_timeout | |
10813 | DOC_START | |
10814 | This Happy Eyeballs (RFC 8305) tuning directive specifies the minimum | |
10815 | delay between opening a primary to-server connection and opening a | |
10816 | spare to-server connection for the same master transaction. This delay | |
10817 | is similar to the Connection Attempt Delay in RFC 8305, but it is only | |
10818 | applied to the first spare connection attempt. Subsequent spare | |
10819 | connection attempts use happy_eyeballs_connect_gap, and primary | |
10820 | connection attempts are not artificially delayed at all. | |
10821 | ||
10822 | Terminology: The "primary" and "spare" designations are determined by | |
10823 | the order of DNS answers received by Squid: If Squid DNS AAAA query | |
10824 | was answered first, then primary connections are connections to IPv6 | |
10825 | peer addresses (while spare connections use IPv4 addresses). | |
10826 | Similarly, if Squid DNS A query was answered first, then primary | |
10827 | connections are connections to IPv4 peer addresses (while spare | |
10828 | connections use IPv6 addresses). | |
10829 | ||
10830 | Shorter happy_eyeballs_connect_timeout values reduce master | |
10831 | transaction response time, potentially improving user-perceived | |
10832 | response times (i.e., making user eyeballs happier). Longer delays | |
10833 | reduce both concurrent connection level and server bombardment with | |
10834 | connection requests, potentially improving overall Squid performance | |
10835 | and reducing the chance of being blocked by servers for opening too | |
10836 | many unused connections. | |
10837 | ||
10838 | RFC 8305 prohibits happy_eyeballs_connect_timeout values smaller than | |
10839 | 10 (milliseconds) to "avoid congestion collapse in the presence of | |
10840 | high packet-loss rates". | |
10841 | ||
10842 | The following Happy Eyeballs directives place additional connection | |
10843 | opening restrictions: happy_eyeballs_connect_gap and | |
10844 | happy_eyeballs_connect_limit. | |
10845 | DOC_END | |
10846 | ||
10847 | NAME: happy_eyeballs_connect_gap | |
10848 | COMMENT: (msec) | |
10849 | TYPE: int | |
10850 | DEFAULT: -1 | |
10851 | DEFAULT_DOC: no artificial delays between spare attempts | |
10852 | LOC: Config.happyEyeballs.connect_gap | |
10853 | DOC_START | |
10854 | This Happy Eyeballs (RFC 8305) tuning directive specifies the | |
10855 | minimum delay between opening spare to-server connections (to any | |
10856 | server; i.e. across all concurrent master transactions in a Squid | |
10857 | instance). Each SMP worker currently multiplies the configured gap | |
10858 | by the total number of workers so that the combined spare connection | |
10859 | opening rate of a Squid instance obeys the configured limit. The | |
10860 | workers do not coordinate connection openings yet; a micro burst | |
10861 | of spare connection openings may violate the configured gap. | |
10862 | ||
10863 | This directive has similar trade-offs as | |
10864 | happy_eyeballs_connect_timeout, but its focus is on limiting traffic | |
10865 | amplification effects for Squid as a whole, while | |
10866 | happy_eyeballs_connect_timeout works on an individual master | |
10867 | transaction level. | |
10868 | ||
10869 | The following Happy Eyeballs directives place additional connection | |
10870 | opening restrictions: happy_eyeballs_connect_timeout and | |
10871 | happy_eyeballs_connect_limit. See the former for related terminology. | |
10872 | DOC_END | |
10873 | ||
10874 | NAME: happy_eyeballs_connect_limit | |
10875 | TYPE: int | |
10876 | DEFAULT: -1 | |
10877 | DEFAULT_DOC: no artificial limit on the number of concurrent spare attempts | |
10878 | LOC: Config.happyEyeballs.connect_limit | |
10879 | DOC_START | |
10880 | This Happy Eyeballs (RFC 8305) tuning directive specifies the | |
10881 | maximum number of spare to-server connections (to any server; i.e. | |
10882 | across all concurrent master transactions in a Squid instance). | |
10883 | Each SMP worker gets an equal share of the total limit. However, | |
10884 | the workers do not share the actual connection counts yet, so one | |
10885 | (busier) worker cannot "borrow" spare connection slots from another | |
10886 | (less loaded) worker. | |
10887 | ||
10888 | Setting this limit to zero disables concurrent use of primary and | |
10889 | spare TCP connections: Spare connection attempts are made only after | |
10890 | all primary attempts fail. However, Squid would still use the | |
10891 | DNS-related optimizations of the Happy Eyeballs approach. | |
10892 | ||
10893 | This directive has similar trade-offs as happy_eyeballs_connect_gap, | |
10894 | but its focus is on limiting Squid overheads, while | |
10895 | happy_eyeballs_connect_gap focuses on the origin server and peer | |
10896 | overheads. | |
10897 | ||
10898 | The following Happy Eyeballs directives place additional connection | |
10899 | opening restrictions: happy_eyeballs_connect_timeout and | |
10900 | happy_eyeballs_connect_gap. See the former for related terminology. | |
10901 | DOC_END | |
10902 | ||
10903 | EOF |