]>
Commit | Line | Data |
---|---|---|
b8ae064d | 1 | ## Copyright (C) 1996-2023 The Squid Software Foundation and contributors |
5d28d44b AJ |
2 | ## |
3 | ## Squid software is distributed under GPLv2+ license and includes | |
4 | ## contributions from numerous individuals and organizations. | |
5 | ## Please see the COPYING and CONTRIBUTORS files for details. | |
6 | ## | |
9cef6668 | 7 | |
0f74202c | 8 | COMMENT_START |
ad12fb4b | 9 | WELCOME TO @SQUID@ |
cccac0a2 | 10 | ---------------------------- |
9603207d | 11 | |
5945964d AJ |
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/ | |
9603207d | 15 | |
5945964d AJ |
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/ | |
7409131e AJ |
19 | https://wiki.squid-cache.org/SquidFaq |
20 | https://wiki.squid-cache.org/ConfigExamples | |
9603207d | 21 | |
5945964d AJ |
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. | |
9603207d | 25 | |
5945964d AJ |
26 | In some cases "none" refers to no default setting at all, |
27 | while in other cases it refers to the value of the option | |
28 | - the comments for that keyword indicate if this is the case. | |
debd9a31 | 29 | |
cccac0a2 | 30 | COMMENT_END |
3a278cb8 | 31 | |
592a09dc | 32 | COMMENT_START |
33 | Configuration options can be included using the "include" directive. | |
5945964d | 34 | Include takes a list of files to include. Quoting and wildcards are |
592a09dc | 35 | supported. |
36 | ||
37 | For example, | |
38 | ||
39 | include /path/to/included/file/squid.acl.config | |
40 | ||
41 | Includes can be nested up to a hard-coded depth of 16 levels. | |
42 | This arbitrary restriction is to prevent recursive include references | |
43 | from causing Squid entering an infinite loop whilst trying to load | |
44 | configuration files. | |
d4a3e179 | 45 | |
a345387f AJ |
46 | Values with byte units |
47 | ||
a01a87d9 AJ |
48 | Squid accepts size units on some size related directives. All |
49 | such directives are documented with a default value displaying | |
50 | a unit. | |
a345387f AJ |
51 | |
52 | Units accepted by Squid are: | |
a01a87d9 AJ |
53 | bytes - byte |
54 | KB - Kilobyte (1024 bytes) | |
a345387f AJ |
55 | MB - Megabyte |
56 | GB - Gigabyte | |
d4a3e179 | 57 | |
8da861a5 EB |
58 | Values with time units |
59 | ||
60 | Time-related directives marked with either "time-units" or | |
61 | "time-units-small" accept a time unit. The supported time units are: | |
62 | ||
63 | nanosecond (time-units-small only) | |
64 | microsecond (time-units-small only) | |
65 | millisecond | |
66 | second | |
67 | minute | |
68 | hour | |
69 | day | |
70 | week | |
71 | fortnight | |
72 | month - 30 days | |
73 | year - 31557790080 milliseconds (just over 365 days) | |
74 | decade | |
75 | ||
2eceb328 CT |
76 | Values with spaces, quotes, and other special characters |
77 | ||
78 | Squid supports directive parameters with spaces, quotes, and other | |
79 | special characters. Surround such parameters with "double quotes". Use | |
80 | the configuration_includes_quoted_values directive to enable or | |
81 | disable that support. | |
82 | ||
83 | Squid supports reading configuration option parameters from external | |
84 | files using the syntax: | |
85 | parameters("/path/filename") | |
86 | For example: | |
70d0ef18 | 87 | acl allowlist dstdomain parameters("/etc/squid/allowlist.txt") |
2eceb328 | 88 | |
5735d30b AR |
89 | Conditional configuration |
90 | ||
91 | If-statements can be used to make configuration directives | |
92 | depend on conditions: | |
93 | ||
94 | if <CONDITION> | |
95 | ... regular configuration directives ... | |
96 | [else | |
97 | ... regular configuration directives ...] | |
98 | endif | |
99 | ||
100 | The else part is optional. The keywords "if", "else", and "endif" | |
101 | must be typed on their own lines, as if they were regular | |
102 | configuration directives. | |
103 | ||
5945964d AJ |
104 | NOTE: An else-if condition is not supported. |
105 | ||
5735d30b AR |
106 | These individual conditions types are supported: |
107 | ||
108 | true | |
109 | Always evaluates to true. | |
110 | false | |
111 | Always evaluates to false. | |
112 | <integer> = <integer> | |
113 | Equality comparison of two integer numbers. | |
114 | ||
115 | ||
d4a3e179 AR |
116 | SMP-Related Macros |
117 | ||
118 | The following SMP-related preprocessor macros can be used. | |
119 | ||
120 | ${process_name} expands to the current Squid process "name" | |
121 | (e.g., squid1, squid2, or cache1). | |
122 | ||
123 | ${process_number} expands to the current Squid process | |
124 | identifier, which is an integer number (e.g., 1, 2, 3) unique | |
6fe8c876 AJ |
125 | across all Squid processes of the current service instance. |
126 | ||
127 | ${service_name} expands into the current Squid service instance | |
128 | name identifier which is provided by -n on the command line. | |
129 | ||
cde8f31b NH |
130 | Logformat Macros |
131 | ||
132 | Logformat macros can be used in many places outside of the logformat | |
133 | directive. In theory, all of the logformat codes can be used as %macros, | |
134 | where they are supported. In practice, a %macro expands as a dash (-) when | |
135 | the transaction does not yet have enough information and a value is needed. | |
136 | ||
137 | There is no definitive list of what tokens are available at the various | |
138 | stages of the transaction. | |
139 | ||
140 | And some information may already be available to Squid but not yet | |
141 | committed where the macro expansion code can access it (report | |
142 | such instances!). The macro will be expanded into a single dash | |
143 | ('-') in such cases. Not all macros have been tested. | |
144 | ||
592a09dc | 145 | COMMENT_END |
146 | ||
25234ebd AJ |
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 | ||
25234ebd AJ |
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 | ||
96598f93 | 172 | NAME: location_rewrite_program location_rewrite_access location_rewrite_children location_rewrite_concurrency |
25234ebd AJ |
173 | TYPE: obsolete |
174 | DOC_START | |
175 | This option is not yet supported by Squid-3. | |
176 | DOC_END | |
177 | ||
96598f93 | 178 | NAME: refresh_stale_hit |
25234ebd AJ |
179 | TYPE: obsolete |
180 | DOC_START | |
181 | This option is not yet supported by Squid-3. | |
182 | DOC_END | |
183 | ||
4bd88eb4 | 184 | # Options removed in 6.x |
a6e452cd AJ |
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 | ||
4bd88eb4 AJ |
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 | ||
a4f1aef2 D |
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 | ||
6eb545bc | 223 | # Options removed in 4.x |
f1a5d071 AJ |
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 | ||
6eb545bc AJ |
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 | ||
7e62a74f AJ |
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 | |
1cc44095 | 281 | Remove this line. Use tls_outgoing_options options= instead. |
7e62a74f AJ |
282 | DOC_END |
283 | ||
9967aef6 AJ |
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 | ||
a8f70484 | 291 | # Options removed in 3.4 |
74d81220 AJ |
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 | ||
96598f93 AJ |
304 | # Options Removed in 3.3 |
305 | NAME: ignore_ims_on_miss | |
25234ebd AJ |
306 | TYPE: obsolete |
307 | DOC_START | |
2d4eefd9 | 308 | Remove this line. The HTTP/1.1 feature is now configured by 'cache_miss_revalidate'. |
25234ebd AJ |
309 | DOC_END |
310 | ||
76f44481 | 311 | # Options Removed in 3.2 |
635c1614 AJ |
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 | ||
16cd62b7 AJ |
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 | ||
74d81220 | 324 | NAME: dns_v4_fallback |
76f44481 AJ |
325 | TYPE: obsolete |
326 | DOC_START | |
74d81220 | 327 | Remove this line. Squid performs a 'Happy Eyeballs' algorithm, the 'fallback' algorithm is no longer relevant. |
76f44481 AJ |
328 | DOC_END |
329 | ||
74d81220 | 330 | NAME: emulate_httpd_log |
6e095b46 AJ |
331 | TYPE: obsolete |
332 | DOC_START | |
74d81220 AJ |
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. | |
6e095b46 AJ |
340 | DOC_END |
341 | ||
76f44481 AJ |
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 | ||
74d81220 AJ |
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 | ||
38493d67 AJ |
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 | ||
74d81220 AJ |
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 | ||
4ded749e AJ |
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 | ||
76f44481 AJ |
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 | ||
74d81220 AJ |
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 | ||
76f44481 AJ |
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 | ||
c72a2049 AJ |
409 | # 2.7 Options Removed/Replaced in 3.2 |
410 | NAME: zero_buffers | |
411 | TYPE: obsolete | |
412 | DOC_NONE | |
413 | ||
76f44481 AJ |
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 | ||
3b31a711 AJ |
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 | ||
50ff42a2 AJ |
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 | ||
c756d517 AR |
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 | |
9603207d | 530 | option ensures that the mapped memory will be available. |
c756d517 AR |
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 | ||
00e2479d AR |
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 | ||
5473c134 | 559 | COMMENT_START |
41bd17a4 | 560 | OPTIONS FOR AUTHENTICATION |
5473c134 | 561 | ----------------------------------------------------------------------------- |
562 | COMMENT_END | |
563 | ||
41bd17a4 | 564 | NAME: auth_param |
565 | TYPE: authparam | |
2f1431ea | 566 | IFDEF: USE_AUTH |
5c112575 | 567 | LOC: Auth::TheConfig.schemes |
cccac0a2 | 568 | DEFAULT: none |
569 | DOC_START | |
41bd17a4 | 570 | This is used to define parameters for the various authentication |
571 | schemes supported by Squid. | |
cccac0a2 | 572 | |
66c583dc | 573 | format: auth_param scheme parameter [setting] |
cccac0a2 | 574 | |
41bd17a4 | 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). | |
cccac0a2 | 584 | |
41bd17a4 | 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. | |
cccac0a2 | 589 | |
41bd17a4 | 590 | Please note that while this directive defines how Squid processes |
047bc0a2 AR |
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, ident, ident_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. | |
cccac0a2 | 616 | |
41bd17a4 | 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. | |
b3567eb5 FC |
621 | Ports flagged 'transparent', 'intercept', or 'tproxy' have |
622 | authentication disabled. | |
cccac0a2 | 623 | |
d4806c91 CT |
624 | === Parameters common to all schemes. === |
625 | ||
626 | "program" cmdline | |
66c583dc | 627 | Specifies the command for the external authenticator. |
d4806c91 | 628 | |
66c583dc AJ |
629 | By default, each authentication scheme is not used unless a |
630 | program is specified. | |
cccac0a2 | 631 | |
7409131e | 632 | See https://wiki.squid-cache.org/Features/AddonHelpers for |
66c583dc | 633 | more details on helper operations and creating your own. |
5269ec0e | 634 | |
66c583dc AJ |
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 | |
2f8abb64 | 648 | authenticate different users with identical user names (e.g., |
66c583dc AJ |
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. | |
5269ec0e | 668 | |
6082a0e2 EB |
669 | "children" numberofchildren [startup=N] [idle=N] [concurrency=N] |
670 | [queue-size=N] [on-persistent-overload=action] | |
a56fcf0b | 671 | [reservation-timeout=seconds] |
5269ec0e | 672 | |
66c583dc AJ |
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. | |
5269ec0e | 678 | |
66c583dc AJ |
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. | |
5269ec0e | 684 | |
66c583dc AJ |
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. | |
cccac0a2 | 692 | |
66c583dc AJ |
693 | Concurrency must not be set unless it's known the helper |
694 | supports the input format with channel-ID fields. | |
cccac0a2 | 695 | |
79933cd6 AR |
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. | |
6082a0e2 EB |
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. | |
6825b101 | 720 | |
66c583dc AJ |
721 | NOTE: NTLM and Negotiate schemes do not support concurrency |
722 | in the Squid code module even though some helpers can. | |
307b83b7 | 723 | |
a56fcf0b CT |
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 | ||
b2b09838 AJ |
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. | |
9e7dbc51 | 746 | |
b2b09838 | 747 | For Basic and Digest this parameter is ignored. |
d2a89ac1 | 748 | |
66c583dc | 749 | "utf8" on|off |
7e851a3e SK |
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. | |
b2b09838 AJ |
766 | |
767 | IF HAVE_AUTH_MODULE_BASIC | |
768 | === Basic authentication parameters === | |
769 | ||
41bd17a4 | 770 | "credentialsttl" timetolive |
66c583dc AJ |
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. | |
cccac0a2 | 775 | |
66c583dc AJ |
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. | |
cccac0a2 | 781 | |
66c583dc AJ |
782 | "casesensitive" on|off |
783 | Specifies if usernames are case sensitive. Most user databases | |
784 | are case insensitive allowing the same username to be spelled | |
785 | using both lower and upper case letters, but some are case | |
786 | sensitive. This makes a big difference for user_max_ip ACL | |
787 | processing and similar. | |
cccac0a2 | 788 | |
66c583dc AJ |
789 | ENDIF |
790 | IF HAVE_AUTH_MODULE_DIGEST | |
791 | === Digest authentication parameters === | |
cccac0a2 | 792 | |
41bd17a4 | 793 | "nonce_garbage_interval" timeinterval |
66c583dc AJ |
794 | Specifies the interval that nonces that have been issued |
795 | to client_agent's are checked for validity. | |
cccac0a2 | 796 | |
41bd17a4 | 797 | "nonce_max_duration" timeinterval |
66c583dc AJ |
798 | Specifies the maximum length of time a given nonce will be |
799 | valid for. | |
cccac0a2 | 800 | |
41bd17a4 | 801 | "nonce_max_count" number |
66c583dc AJ |
802 | Specifies the maximum number of times a given nonce can be |
803 | used. | |
cccac0a2 | 804 | |
41bd17a4 | 805 | "nonce_strictness" on|off |
66c583dc AJ |
806 | Determines if squid requires strict increment-by-1 behavior |
807 | for nonce counts, or just incrementing (off - for use when | |
808 | user agents generate nonce counts that occasionally miss 1 | |
809 | (ie, 1,2,4,6)). Default off. | |
cccac0a2 | 810 | |
41bd17a4 | 811 | "check_nonce_count" on|off |
66c583dc AJ |
812 | This directive if set to off can disable the nonce count check |
813 | completely to work around buggy digest qop implementations in | |
814 | certain mainstream browser versions. Default on to check the | |
815 | nonce count to protect from authentication replay attacks. | |
cccac0a2 | 816 | |
41bd17a4 | 817 | "post_workaround" on|off |
66c583dc AJ |
818 | This is a workaround to certain buggy browsers who send an |
819 | incorrect request digest in POST requests when reusing the | |
820 | same nonce as acquired earlier on a GET request. | |
cccac0a2 | 821 | |
66c583dc | 822 | ENDIF |
527ee50d | 823 | |
66c583dc AJ |
824 | === Example Configuration === |
825 | ||
826 | This configuration displays the recommended authentication scheme | |
827 | order from most to least secure with recommended minimum configuration | |
828 | settings for each scheme: | |
e0855596 | 829 | |
41bd17a4 | 830 | #auth_param negotiate program <uncomment and complete this line to activate> |
48d54e4d | 831 | #auth_param negotiate children 20 startup=0 idle=1 |
e0855596 | 832 | # |
66c583dc | 833 | #auth_param digest program <uncomment and complete this line to activate> |
48d54e4d | 834 | #auth_param digest children 20 startup=0 idle=1 |
41bd17a4 | 835 | #auth_param digest realm Squid proxy-caching web server |
836 | #auth_param digest nonce_garbage_interval 5 minutes | |
837 | #auth_param digest nonce_max_duration 30 minutes | |
838 | #auth_param digest nonce_max_count 50 | |
e0855596 | 839 | # |
66c583dc AJ |
840 | #auth_param ntlm program <uncomment and complete this line to activate> |
841 | #auth_param ntlm children 20 startup=0 idle=1 | |
66c583dc | 842 | # |
41bd17a4 | 843 | #auth_param basic program <uncomment and complete this line> |
6f4d3ed6 | 844 | #auth_param basic children 5 startup=5 idle=1 |
41bd17a4 | 845 | #auth_param basic credentialsttl 2 hours |
41bd17a4 | 846 | DOC_END |
cccac0a2 | 847 | |
41bd17a4 | 848 | NAME: authenticate_cache_garbage_interval |
5db226c8 | 849 | IFDEF: USE_AUTH |
41bd17a4 | 850 | TYPE: time_t |
851 | DEFAULT: 1 hour | |
00ef8d82 | 852 | LOC: Auth::TheConfig.garbageCollectInterval |
41bd17a4 | 853 | DOC_START |
854 | The time period between garbage collection across the username cache. | |
4ded749e | 855 | This is a trade-off between memory utilization (long intervals - say |
41bd17a4 | 856 | 2 days) and CPU (short intervals - say 1 minute). Only change if you |
857 | have good reason to. | |
858 | DOC_END | |
cccac0a2 | 859 | |
41bd17a4 | 860 | NAME: authenticate_ttl |
5db226c8 | 861 | IFDEF: USE_AUTH |
41bd17a4 | 862 | TYPE: time_t |
863 | DEFAULT: 1 hour | |
00ef8d82 | 864 | LOC: Auth::TheConfig.credentialsTtl |
41bd17a4 | 865 | DOC_START |
866 | The time a user & their credentials stay in the logged in | |
867 | user cache since their last request. When the garbage | |
868 | interval passes, all user credentials that have passed their | |
869 | TTL are removed from memory. | |
870 | DOC_END | |
cccac0a2 | 871 | |
41bd17a4 | 872 | NAME: authenticate_ip_ttl |
5db226c8 | 873 | IFDEF: USE_AUTH |
41bd17a4 | 874 | TYPE: time_t |
00ef8d82 | 875 | LOC: Auth::TheConfig.ipTtl |
c35dd848 | 876 | DEFAULT: 1 second |
41bd17a4 | 877 | DOC_START |
878 | If you use proxy authentication and the 'max_user_ip' ACL, | |
879 | this directive controls how long Squid remembers the IP | |
880 | addresses associated with each user. Use a small value | |
881 | (e.g., 60 seconds) if your users might change addresses | |
4ded749e | 882 | quickly, as is the case with dialup. You might be safe |
41bd17a4 | 883 | using a larger value (e.g., 2 hours) in a corporate LAN |
884 | environment with relatively static address assignments. | |
885 | DOC_END | |
cccac0a2 | 886 | |
3d1e3e43 | 887 | COMMENT_START |
888 | ACCESS CONTROLS | |
889 | ----------------------------------------------------------------------------- | |
890 | COMMENT_END | |
891 | ||
41bd17a4 | 892 | NAME: external_acl_type |
893 | TYPE: externalAclHelper | |
894 | LOC: Config.externalAclHelperList | |
cccac0a2 | 895 | DEFAULT: none |
cccac0a2 | 896 | DOC_START |
41bd17a4 | 897 | This option defines external acl classes using a helper program |
898 | to look up the status | |
cccac0a2 | 899 | |
262eaf9a | 900 | external_acl_type name [options] FORMAT /path/to/helper [helper arguments] |
cccac0a2 | 901 | |
41bd17a4 | 902 | Options: |
cccac0a2 | 903 | |
41bd17a4 | 904 | ttl=n TTL in seconds for cached results (defaults to 3600 |
cd0fd8a9 | 905 | for 1 hour) |
4f8d0a65 | 906 | |
41bd17a4 | 907 | negative_ttl=n |
cd0fd8a9 AJ |
908 | TTL for cached negative lookups (default same |
909 | as ttl) | |
4f8d0a65 AJ |
910 | |
911 | grace=n Percentage remaining of TTL where a refresh of a | |
912 | cached entry should be initiated without needing to | |
913 | wait for a new reply. (default is for no grace period) | |
914 | ||
eef8bf2d AR |
915 | cache=n The maximum number of entries in the result cache. The |
916 | default limit is 262144 entries. Each cache entry usually | |
917 | consumes at least 256 bytes. Squid currently does not remove | |
918 | expired cache entries until the limit is reached, so a proxy | |
919 | will sooner or later reach the limit. The expanded FORMAT | |
920 | value is used as the cache key, so if the details in FORMAT | |
921 | are highly variable, a larger cache may be needed to produce | |
922 | reduction in helper load. | |
4f8d0a65 | 923 | |
48d54e4d AJ |
924 | children-max=n |
925 | Maximum number of acl helper processes spawned to service | |
2ccfb9a7 | 926 | external acl lookups of this type. (default 5) |
4f8d0a65 | 927 | |
48d54e4d AJ |
928 | children-startup=n |
929 | Minimum number of acl helper processes to spawn during | |
930 | startup and reconfigure to service external acl lookups | |
931 | of this type. (default 0) | |
4f8d0a65 | 932 | |
48d54e4d AJ |
933 | children-idle=n |
934 | Number of acl helper processes to keep ahead of traffic | |
935 | loads. Squid will spawn this many at once whenever load | |
936 | rises above the capabilities of existing processes. | |
937 | Up to the value of children-max. (default 1) | |
4f8d0a65 | 938 | |
41bd17a4 | 939 | concurrency=n concurrency level per process. Only used with helpers |
940 | capable of processing more than one query at a time. | |
4f8d0a65 | 941 | |
79933cd6 AR |
942 | queue-size=N The queue-size option sets the maximum number of |
943 | queued requests. A request is queued when no existing | |
944 | helper can accept it due to concurrency limit and no | |
945 | new helper can be started due to children-max limit. | |
946 | If the queued requests exceed queue size, the acl is | |
947 | ignored. The default value is set to 2*children-max. | |
4f8d0a65 AJ |
948 | |
949 | protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers. | |
950 | ||
91e64de9 AJ |
951 | ipv4 / ipv6 IP protocol used to communicate with this helper. |
952 | The default is to auto-detect IPv6 and use it when available. | |
cccac0a2 | 953 | |
4f8d0a65 | 954 | |
cd0fd8a9 AJ |
955 | FORMAT is a series of %macro codes. See logformat directive for a full list |
956 | of the accepted codes. Although note that at the time of any external ACL | |
957 | being tested data may not be available and thus some %macro expand to '-'. | |
958 | ||
959 | In addition to the logformat codes; when processing external ACLs these | |
960 | additional macros are made available: | |
7b0ca1e8 | 961 | |
ec2d5242 | 962 | %ACL The name of the ACL being tested. |
ec2d5242 | 963 | |
0638f4a2 AJ |
964 | %DATA The ACL arguments specified in the referencing config |
965 | 'acl ... external' line, separated by spaces (an | |
966 | "argument string"). see acl external. | |
967 | ||
968 | If there are no ACL arguments %DATA expands to '-'. | |
969 | ||
970 | If you do not specify a DATA macro inside FORMAT, | |
971 | Squid automatically appends %DATA to your FORMAT. | |
2fb65892 AJ |
972 | Note that Squid-3.x may expand %DATA to whitespace |
973 | or nothing in this case. | |
cd0fd8a9 | 974 | |
262eaf9a CT |
975 | By default, Squid applies URL-encoding to each ACL |
976 | argument inside the argument string. If an explicit | |
977 | encoding modifier is used (e.g., %#DATA), then Squid | |
978 | encodes the whole argument string as a single token | |
979 | (e.g., with %#DATA, spaces between arguments become | |
980 | %20). | |
981 | ||
2f8abb64 | 982 | If SSL is enabled, the following formatting codes become available: |
cd0fd8a9 AJ |
983 | |
984 | %USER_CERT SSL User certificate in PEM format | |
985 | %USER_CERTCHAIN SSL User certificate chain in PEM format | |
986 | %USER_CERT_xx SSL User certificate subject attribute xx | |
987 | %USER_CA_CERT_xx SSL User certificate issuer attribute xx | |
988 | ||
989 | ||
990 | NOTE: all other format codes accepted by older Squid versions | |
991 | are deprecated. | |
0db8942f | 992 | |
cccac0a2 | 993 | |
5269ec0e AJ |
994 | General request syntax: |
995 | ||
0638f4a2 | 996 | [channel-ID] FORMAT-values |
5269ec0e AJ |
997 | |
998 | ||
999 | FORMAT-values consists of transaction details expanded with | |
1000 | whitespace separation per the config file FORMAT specification | |
1001 | using the FORMAT macros listed above. | |
1002 | ||
5269ec0e AJ |
1003 | Request values sent to the helper are URL escaped to protect |
1004 | each value in requests against whitespaces. | |
1005 | ||
1006 | If using protocol=2.5 then the request sent to the helper is not | |
1007 | URL escaped to protect against whitespace. | |
1008 | ||
1009 | NOTE: protocol=3.0 is deprecated as no longer necessary. | |
1010 | ||
1011 | When using the concurrency= option the protocol is changed by | |
1012 | introducing a query channel tag in front of the request/response. | |
1013 | The query channel tag is a number between 0 and concurrency-1. | |
1014 | This value must be echoed back unchanged to Squid as the first part | |
1015 | of the response relating to its request. | |
1016 | ||
1017 | ||
1018 | The helper receives lines expanded per the above format specification | |
1019 | and for each input line returns 1 line starting with OK/ERR/BH result | |
1020 | code and optionally followed by additional keywords with more details. | |
1021 | ||
cccac0a2 | 1022 | |
41bd17a4 | 1023 | General result syntax: |
cccac0a2 | 1024 | |
5269ec0e AJ |
1025 | [channel-ID] result keyword=value ... |
1026 | ||
1027 | Result consists of one of the codes: | |
1028 | ||
1029 | OK | |
1030 | the ACL test produced a match. | |
1031 | ||
1032 | ERR | |
1033 | the ACL test does not produce a match. | |
1034 | ||
1035 | BH | |
4ded749e | 1036 | An internal error occurred in the helper, preventing |
5269ec0e AJ |
1037 | a result being identified. |
1038 | ||
1039 | The meaning of 'a match' is determined by your squid.conf | |
1040 | access control configuration. See the Squid wiki for details. | |
cccac0a2 | 1041 | |
41bd17a4 | 1042 | Defined keywords: |
cccac0a2 | 1043 | |
41bd17a4 | 1044 | user= The users name (login) |
5269ec0e | 1045 | |
41bd17a4 | 1046 | password= The users password (for login= cache_peer option) |
5269ec0e | 1047 | |
05e52854 | 1048 | message= Message describing the reason for this response. |
5269ec0e AJ |
1049 | Available as %o in error pages. |
1050 | Useful on (ERR and BH results). | |
1051 | ||
05e52854 AJ |
1052 | tag= Apply a tag to a request. Only sets a tag once, |
1053 | does not alter existing tags. | |
5269ec0e | 1054 | |
41bd17a4 | 1055 | log= String to be logged in access.log. Available as |
cd0fd8a9 | 1056 | %ea in logformat specifications. |
934b03fc | 1057 | |
cd0fd8a9 | 1058 | clt_conn_tag= Associates a TAG with the client TCP connection. |
4f8d0a65 AJ |
1059 | Please see url_rewrite_program related documentation |
1060 | for this kv-pair. | |
457857fe | 1061 | |
05e52854 | 1062 | Any keywords may be sent on any response whether OK, ERR or BH. |
6a566b9c | 1063 | |
05e52854 AJ |
1064 | All response keyword values need to be a single token with URL |
1065 | escaping, or enclosed in double quotes (") and escaped using \ on | |
24eac830 AJ |
1066 | any double quotes or \ characters within the value. The wrapping |
1067 | double quotes are removed before the value is interpreted by Squid. | |
1068 | \r and \n are also replace by CR and LF. | |
1e5562e3 | 1069 | |
24eac830 AJ |
1070 | Some example key values: |
1071 | ||
5269ec0e | 1072 | user=John%20Smith |
24eac830 AJ |
1073 | user="John Smith" |
1074 | user="J. \"Bob\" Smith" | |
cccac0a2 | 1075 | DOC_END |
1076 | ||
41bd17a4 | 1077 | NAME: acl |
1078 | TYPE: acl | |
1079 | LOC: Config.aclList | |
cb4f4424 | 1080 | IF USE_OPENSSL |
cf1c09f6 CT |
1081 | DEFAULT: ssl::certHasExpired ssl_error X509_V_ERR_CERT_HAS_EXPIRED |
1082 | DEFAULT: ssl::certNotYetValid ssl_error X509_V_ERR_CERT_NOT_YET_VALID | |
1083 | DEFAULT: ssl::certDomainMismatch ssl_error SQUID_X509_V_ERR_DOMAIN_MISMATCH | |
1084 | 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 | |
1085 | DEFAULT: ssl::certSelfSigned ssl_error X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT | |
1086 | ENDIF | |
1f5bd0a4 | 1087 | DEFAULT: all src all |
7902bd5b | 1088 | DEFAULT: manager url_regex +i ^[^:]+://[^/]+/squid-internal-mgr/ |
b8a25eaa | 1089 | DEFAULT: localhost src 127.0.0.1/32 ::1 |
d959846f | 1090 | DEFAULT: to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1/128 ::/128 |
6d2f8ed0 | 1091 | DEFAULT: to_linklocal dst 169.254.0.0/16 fe80::/10 |
2c56ee3c | 1092 | DEFAULT: CONNECT method CONNECT |
6d2f8ed0 | 1093 | DEFAULT_DOC: ACLs all, manager, localhost, to_localhost, to_linklocal, and CONNECT are predefined. |
cccac0a2 | 1094 | DOC_START |
41bd17a4 | 1095 | Defining an Access List |
cccac0a2 | 1096 | |
9603207d | 1097 | Every access list definition must begin with an aclname and acltype, |
375eeb3b AJ |
1098 | followed by either type-specific arguments or a quoted filename that |
1099 | they are read from. | |
cccac0a2 | 1100 | |
375eeb3b AJ |
1101 | acl aclname acltype argument ... |
1102 | acl aclname acltype "file" ... | |
cccac0a2 | 1103 | |
375eeb3b | 1104 | When using "file", the file should contain one item per line. |
cccac0a2 | 1105 | |
76ee67ac CT |
1106 | |
1107 | ACL Options | |
1108 | ||
1109 | Some acl types supports options which changes their default behaviour: | |
0f987978 CT |
1110 | |
1111 | -i,+i By default, regular expressions are CASE-SENSITIVE. To make them | |
1112 | case-insensitive, use the -i option. To return case-sensitive | |
1113 | use the +i option between patterns, or make a new ACL line | |
9603207d | 1114 | without -i. |
0f987978 CT |
1115 | |
1116 | -n Disable lookups and address type conversions. If lookup or | |
1117 | conversion is required because the parameter type (IP or | |
1118 | domain name) does not match the message address type (domain | |
1119 | name or IP), then the ACL would immediately declare a mismatch | |
1120 | without any warnings or lookups. | |
1121 | ||
76ee67ac CT |
1122 | -m[=delimiters] |
1123 | Perform a list membership test, interpreting values as | |
1124 | comma-separated token lists and matching against individual | |
9603207d | 1125 | tokens instead of whole values. |
76ee67ac CT |
1126 | The optional "delimiters" parameter specifies one or more |
1127 | alternative non-alphanumeric delimiter characters. | |
1128 | non-alphanumeric delimiter characters. | |
1129 | ||
0f987978 CT |
1130 | -- Used to stop processing all options, in the case the first acl |
1131 | value has '-' character as first character (for example the '-' | |
1132 | is a valid domain name) | |
cccac0a2 | 1133 | |
b3567eb5 FC |
1134 | Some acl types require suspending the current request in order |
1135 | to access some external data source. | |
1136 | Those which do are marked with the tag [slow], those which | |
1137 | don't are marked as [fast]. | |
7409131e | 1138 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl |
b3567eb5 | 1139 | for further information |
e988aa40 AJ |
1140 | |
1141 | ***** ACL TYPES AVAILABLE ***** | |
1142 | ||
1e40905d AJ |
1143 | acl aclname src ip-address/mask ... # clients IP address [fast] |
1144 | acl aclname src addr1-addr2/mask ... # range of addresses [fast] | |
0f987978 | 1145 | acl aclname dst [-n] ip-address/mask ... # URL host's IP address [slow] |
1e40905d | 1146 | acl aclname localip ip-address/mask ... # IP address the client connected to [fast] |
cccac0a2 | 1147 | |
560630e6 | 1148 | IF USE_SQUID_EUI |
a85f0df5 AJ |
1149 | acl aclname arp mac-address ... |
1150 | acl aclname eui64 eui64-address ... | |
b3567eb5 | 1151 | # [fast] |
a85f0df5 AJ |
1152 | # MAC (EUI-48) and EUI-64 addresses use xx:xx:xx:xx:xx:xx notation. |
1153 | # | |
abe01913 AJ |
1154 | # The 'arp' ACL code is not portable to all operating systems. |
1155 | # It works on Linux, Solaris, Windows, FreeBSD, and some other | |
1156 | # BSD variants. | |
41bd17a4 | 1157 | # |
a85f0df5 AJ |
1158 | # The eui_lookup directive is required to be 'on' (the default) |
1159 | # and Squid built with --enable-eui for MAC/EUI addresses to be | |
1160 | # available for this ACL. | |
1161 | # | |
1162 | # Squid can only determine the MAC/EUI address for IPv4 | |
abe01913 AJ |
1163 | # clients that are on the same subnet. If the client is on a |
1164 | # different subnet, then Squid cannot find out its address. | |
1165 | # | |
a85f0df5 | 1166 | # IPv6 protocol does not contain ARP. MAC/EUI is either |
abe01913 | 1167 | # encoded directly in the IPv6 address or not available. |
560630e6 | 1168 | ENDIF |
653d9927 | 1169 | acl aclname clientside_mark mark[/mask] ... |
244da4ad AG |
1170 | # matches CONNMARK of an accepted connection [fast] |
1171 | # DEPRECATED. Use the 'client_connection_mark' instead. | |
1172 | ||
1173 | acl aclname client_connection_mark mark[/mask] ... | |
653d9927 A |
1174 | # matches CONNMARK of an accepted connection [fast] |
1175 | # | |
1176 | # mark and mask are unsigned integers (hex, octal, or decimal). | |
1177 | # If multiple marks are given, then the ACL matches if at least | |
1178 | # one mark matches. | |
1179 | # | |
1180 | # Uses netfilter-conntrack library. | |
1181 | # Requires building Squid with --enable-linux-netfilter. | |
1182 | # | |
1183 | # The client, various intermediaries, and Squid itself may set | |
1184 | # CONNMARK at various times. The last CONNMARK set wins. This ACL | |
1185 | # checks the mark present on an accepted connection or set by | |
1186 | # Squid afterwards, depending on the ACL check timing. This ACL | |
1187 | # effectively ignores any mark set by other agents after Squid has | |
1188 | # accepted the connection. | |
1189 | ||
b3567eb5 FC |
1190 | acl aclname srcdomain .foo.com ... |
1191 | # reverse lookup, from client IP [slow] | |
0f987978 | 1192 | acl aclname dstdomain [-n] .foo.com ... |
e38c7724 | 1193 | # Destination server from URL [fast] |
b3567eb5 FC |
1194 | acl aclname srcdom_regex [-i] \.foo\.com ... |
1195 | # regex matching client name [slow] | |
0f987978 | 1196 | acl aclname dstdom_regex [-n] [-i] \.foo\.com ... |
e38c7724 | 1197 | # regex matching server [fast] |
b3567eb5 | 1198 | # |
41bd17a4 | 1199 | # For dstdomain and dstdom_regex a reverse lookup is tried if a IP |
1200 | # based URL is used and no match is found. The name "none" is used | |
1201 | # if the reverse lookup fails. | |
9bc73deb | 1202 | |
375eeb3b AJ |
1203 | acl aclname src_as number ... |
1204 | acl aclname dst_as number ... | |
b3567eb5 | 1205 | # [fast] |
e988aa40 AJ |
1206 | # Except for access control, AS numbers can be used for |
1207 | # routing of requests to specific caches. Here's an | |
1208 | # example for routing all requests for AS#1241 and only | |
1209 | # those to mycache.mydomain.net: | |
1210 | # acl asexample dst_as 1241 | |
1211 | # cache_peer_access mycache.mydomain.net allow asexample | |
1212 | # cache_peer_access mycache_mydomain.net deny all | |
7f7db318 | 1213 | |
6db78a1a | 1214 | acl aclname peername myPeer ... |
a85f0df5 | 1215 | acl aclname peername_regex [-i] regex-pattern ... |
b3567eb5 | 1216 | # [fast] |
6db78a1a AJ |
1217 | # match against a named cache_peer entry |
1218 | # set unique name= on cache_peer lines for reliable use. | |
1219 | ||
375eeb3b | 1220 | acl aclname time [day-abbrevs] [h1:m1-h2:m2] |
b3567eb5 | 1221 | # [fast] |
375eeb3b AJ |
1222 | # day-abbrevs: |
1223 | # S - Sunday | |
1224 | # M - Monday | |
1225 | # T - Tuesday | |
1226 | # W - Wednesday | |
1227 | # H - Thursday | |
1228 | # F - Friday | |
1229 | # A - Saturday | |
1230 | # h1:m1 must be less than h2:m2 | |
1231 | ||
b3567eb5 FC |
1232 | acl aclname url_regex [-i] ^http:// ... |
1233 | # regex matching on whole URL [fast] | |
9d35fe37 AJ |
1234 | acl aclname urllogin [-i] [^a-zA-Z0-9] ... |
1235 | # regex matching on URL login field | |
b3567eb5 FC |
1236 | acl aclname urlpath_regex [-i] \.gif$ ... |
1237 | # regex matching on URL path [fast] | |
e988aa40 | 1238 | |
380b09ae AR |
1239 | acl aclname port 80 70 21 0-1024 ... |
1240 | # destination TCP port (or port range) of the request [fast] | |
1241 | # | |
1242 | # Port 0 matches requests that have no explicit and no default destination | |
1243 | # ports (e.g., HTTP requests with URN targets) | |
1244 | ||
1e40905d AJ |
1245 | acl aclname localport 3128 ... # TCP port the client connected to [fast] |
1246 | # NP: for interception mode this is usually '80' | |
1247 | ||
3cc0f4e7 | 1248 | acl aclname myportname 3128 ... # *_port name [fast] |
e988aa40 | 1249 | |
b3567eb5 | 1250 | acl aclname proto HTTP FTP ... # request protocol [fast] |
9603207d | 1251 | |
b3567eb5 | 1252 | acl aclname method GET POST ... # HTTP request method [fast] |
e988aa40 | 1253 | |
9603207d | 1254 | acl aclname http_status 200 301 500- 400-403 ... |
b3567eb5 | 1255 | # status code in reply [fast] |
e988aa40 | 1256 | |
375eeb3b | 1257 | acl aclname browser [-i] regexp ... |
b3567eb5 | 1258 | # pattern match on User-Agent header (see also req_header below) [fast] |
e988aa40 | 1259 | |
375eeb3b | 1260 | acl aclname referer_regex [-i] regexp ... |
b3567eb5 | 1261 | # pattern match on Referer header [fast] |
41bd17a4 | 1262 | # Referer is highly unreliable, so use with care |
e988aa40 | 1263 | |
d4c6acac | 1264 | acl aclname ident [-i] username ... |
41bd17a4 | 1265 | acl aclname ident_regex [-i] pattern ... |
b3567eb5 | 1266 | # string match on ident output [slow] |
41bd17a4 | 1267 | # use REQUIRED to accept any non-null ident. |
cf5cc17e | 1268 | |
41bd17a4 | 1269 | acl aclname proxy_auth [-i] username ... |
1270 | acl aclname proxy_auth_regex [-i] pattern ... | |
b3567eb5 FC |
1271 | # perform http authentication challenge to the client and match against |
1272 | # supplied credentials [slow] | |
1273 | # | |
1274 | # takes a list of allowed usernames. | |
41bd17a4 | 1275 | # use REQUIRED to accept any valid username. |
1276 | # | |
b3567eb5 | 1277 | # Will use proxy authentication in forward-proxy scenarios, and plain |
2f8abb64 | 1278 | # http authentication in reverse-proxy scenarios |
b3567eb5 | 1279 | # |
41bd17a4 | 1280 | # NOTE: when a Proxy-Authentication header is sent but it is not |
1281 | # needed during ACL checking the username is NOT logged | |
1282 | # in access.log. | |
1283 | # | |
1284 | # NOTE: proxy_auth requires a EXTERNAL authentication program | |
1285 | # to check username/password combinations (see | |
1286 | # auth_param directive). | |
1287 | # | |
e988aa40 AJ |
1288 | # NOTE: proxy_auth can't be used in a transparent/intercepting proxy |
1289 | # as the browser needs to be configured for using a proxy in order | |
41bd17a4 | 1290 | # to respond to proxy authentication. |
8e8d4f30 | 1291 | |
41bd17a4 | 1292 | acl aclname snmp_community string ... |
b3567eb5 | 1293 | # A community string to limit access to your SNMP Agent [fast] |
41bd17a4 | 1294 | # Example: |
1295 | # | |
1296 | # acl snmppublic snmp_community public | |
934b03fc | 1297 | |
41bd17a4 | 1298 | acl aclname maxconn number |
1299 | # This will be matched when the client's IP address has | |
55d0fae8 AJ |
1300 | # more than <number> TCP connections established. [fast] |
1301 | # NOTE: This only measures direct TCP links so X-Forwarded-For | |
1302 | # indirect clients are not counted. | |
1e5562e3 | 1303 | |
41bd17a4 | 1304 | acl aclname max_user_ip [-s] number |
1305 | # This will be matched when the user attempts to log in from more | |
1306 | # than <number> different ip addresses. The authenticate_ip_ttl | |
b3567eb5 | 1307 | # parameter controls the timeout on the ip entries. [fast] |
41bd17a4 | 1308 | # If -s is specified the limit is strict, denying browsing |
1309 | # from any further IP addresses until the ttl has expired. Without | |
1310 | # -s Squid will just annoy the user by "randomly" denying requests. | |
1311 | # (the counter is reset each time the limit is reached and a | |
1312 | # request is denied) | |
1313 | # NOTE: in acceleration mode or where there is mesh of child proxies, | |
1314 | # clients may appear to come from multiple addresses if they are | |
1315 | # going through proxy farms, so a limit of 1 may cause user problems. | |
cccac0a2 | 1316 | |
cb1b906f AJ |
1317 | acl aclname random probability |
1318 | # Pseudo-randomly match requests. Based on the probability given. | |
1319 | # Probability may be written as a decimal (0.333), fraction (1/3) | |
1320 | # or ratio of matches:non-matches (3:5). | |
1321 | ||
375eeb3b | 1322 | acl aclname req_mime_type [-i] mime-type ... |
41bd17a4 | 1323 | # regex match against the mime type of the request generated |
1324 | # by the client. Can be used to detect file upload or some | |
b3567eb5 | 1325 | # types HTTP tunneling requests [fast] |
41bd17a4 | 1326 | # NOTE: This does NOT match the reply. You cannot use this |
1327 | # to match the returned file type. | |
cccac0a2 | 1328 | |
41bd17a4 | 1329 | acl aclname req_header header-name [-i] any\.regex\.here |
1330 | # regex match against any of the known request headers. May be | |
1331 | # thought of as a superset of "browser", "referer" and "mime-type" | |
b3567eb5 | 1332 | # ACL [fast] |
cccac0a2 | 1333 | |
375eeb3b | 1334 | acl aclname rep_mime_type [-i] mime-type ... |
41bd17a4 | 1335 | # regex match against the mime type of the reply received by |
1336 | # squid. Can be used to detect file download or some | |
b3567eb5 | 1337 | # types HTTP tunneling requests. [fast] |
41bd17a4 | 1338 | # NOTE: This has no effect in http_access rules. It only has |
1339 | # effect in rules that affect the reply data stream such as | |
1340 | # http_reply_access. | |
cccac0a2 | 1341 | |
41bd17a4 | 1342 | acl aclname rep_header header-name [-i] any\.regex\.here |
1343 | # regex match against any of the known reply headers. May be | |
1344 | # thought of as a superset of "browser", "referer" and "mime-type" | |
b3567eb5 | 1345 | # ACLs [fast] |
cccac0a2 | 1346 | |
375eeb3b | 1347 | acl aclname external class_name [arguments...] |
41bd17a4 | 1348 | # external ACL lookup via a helper class defined by the |
b3567eb5 | 1349 | # external_acl_type directive [slow] |
cccac0a2 | 1350 | |
41bd17a4 | 1351 | acl aclname user_cert attribute values... |
1352 | # match against attributes in a user SSL certificate | |
2927ae41 | 1353 | # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast] |
cccac0a2 | 1354 | |
41bd17a4 | 1355 | acl aclname ca_cert attribute values... |
1356 | # match against attributes a users issuing CA SSL certificate | |
2927ae41 | 1357 | # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast] |
cccac0a2 | 1358 | |
d4c6acac | 1359 | acl aclname ext_user [-i] username ... |
41bd17a4 | 1360 | acl aclname ext_user_regex [-i] pattern ... |
b3567eb5 | 1361 | # string match on username returned by external acl helper [slow] |
41bd17a4 | 1362 | # use REQUIRED to accept any non-null user name. |
b3567eb5 | 1363 | |
0ab50441 | 1364 | acl aclname tag tagvalue ... |
94da12c8 AJ |
1365 | # string match on tag returned by external acl helper [fast] |
1366 | # DEPRECATED. Only the first tag will match with this ACL. | |
1367 | # Use the 'note' ACL instead for handling multiple tag values. | |
cccac0a2 | 1368 | |
bbaf2685 AJ |
1369 | acl aclname hier_code codename ... |
1370 | # string match against squid hierarchy code(s); [fast] | |
1371 | # e.g., DIRECT, PARENT_HIT, NONE, etc. | |
1372 | # | |
1373 | # NOTE: This has no effect in http_access rules. It only has | |
1374 | # effect in rules that affect the reply data stream such as | |
1375 | # http_reply_access. | |
1376 | ||
76ee67ac | 1377 | acl aclname note [-m[=delimiters]] name [value ...] |
39baccc8 CT |
1378 | # match transaction annotation [fast] |
1379 | # Without values, matches any annotation with a given name. | |
1380 | # With value(s), matches any annotation with a given name that | |
1381 | # also has one of the given values. | |
76ee67ac CT |
1382 | # If the -m flag is used, then the value of the named |
1383 | # annotation is interpreted as a list of tokens, and the ACL | |
1384 | # matches individual name=token pairs rather than whole | |
1385 | # name=value pairs. See "ACL Options" above for more info. | |
39baccc8 CT |
1386 | # Annotation sources include note and adaptation_meta directives |
1387 | # as well as helper and eCAP responses. | |
1388 | ||
589aab05 CT |
1389 | acl aclname annotate_transaction [-m[=delimiters]] key=value ... |
1390 | acl aclname annotate_transaction [-m[=delimiters]] key+=value ... | |
75d47340 CT |
1391 | # Always matches. [fast] |
1392 | # Used for its side effect: This ACL immediately adds a | |
1393 | # key=value annotation to the current master transaction. | |
1394 | # The added annotation can then be tested using note ACL and | |
1395 | # logged (or sent to helpers) using %note format code. | |
1396 | # | |
1397 | # Annotations can be specified using replacement and addition | |
1398 | # formats. The key=value form replaces old same-key annotation | |
1399 | # value(s). The key+=value form appends a new value to the old | |
1400 | # same-key annotation. Both forms create a new key=value | |
1401 | # annotation if no same-key annotation exists already. If | |
1402 | # -m flag is used, then the value is interpreted as a list | |
1403 | # and the annotation will contain key=token pair(s) instead of the | |
1404 | # whole key=value pair. | |
1405 | # | |
1406 | # This ACL is especially useful for recording complex multi-step | |
1407 | # ACL-driven decisions. For example, the following configuration | |
1408 | # avoids logging transactions accepted after aclX matched: | |
1409 | # | |
1410 | # # First, mark transactions accepted after aclX matched | |
1411 | # acl markSpecial annotate_transaction special=true | |
1412 | # http_access allow acl001 | |
1413 | # ... | |
1414 | # http_access deny acl100 | |
1415 | # http_access allow aclX markSpecial | |
1416 | # | |
1417 | # # Second, do not log marked transactions: | |
1418 | # acl markedSpecial note special true | |
1419 | # access_log ... deny markedSpecial | |
1420 | # | |
1421 | # # Note that the following would not have worked because aclX | |
1422 | # # alone does not determine whether the transaction was allowed: | |
1423 | # access_log ... deny aclX # Wrong! | |
1424 | # | |
1425 | # Warning: This ACL annotates the transaction even when negated | |
1426 | # and even if subsequent ACLs fail to match. For example, the | |
1427 | # following three rules will have exactly the same effect as far | |
1428 | # as annotations set by the "mark" ACL are concerned: | |
1429 | # | |
1430 | # some_directive acl1 ... mark # rule matches if mark is reached | |
1431 | # some_directive acl1 ... !mark # rule never matches | |
1432 | # some_directive acl1 ... mark !all # rule never matches | |
1433 | ||
589aab05 CT |
1434 | acl aclname annotate_client [-m[=delimiters]] key=value ... |
1435 | acl aclname annotate_client [-m[=delimiters]] key+=value ... | |
75d47340 | 1436 | # |
589aab05 CT |
1437 | # Always matches. [fast] |
1438 | # Used for its side effect: This ACL immediately adds a | |
1439 | # key=value annotation to the current client-to-Squid | |
75d47340 CT |
1440 | # connection. Connection annotations are propagated to the current |
1441 | # and all future master transactions on the annotated connection. | |
1442 | # See the annotate_transaction ACL for details. | |
1443 | # | |
1444 | # For example, the following configuration avoids rewriting URLs | |
1445 | # of transactions bumped by SslBump: | |
1446 | # | |
1447 | # # First, mark bumped connections: | |
1448 | # acl markBumped annotate_client bumped=true | |
1449 | # ssl_bump peek acl1 | |
1450 | # ssl_bump stare acl2 | |
1451 | # ssl_bump bump acl3 markBumped | |
1452 | # ssl_bump splice all | |
1453 | # | |
1454 | # # Second, do not send marked transactions to the redirector: | |
1455 | # acl markedBumped note bumped true | |
1456 | # url_rewrite_access deny markedBumped | |
1457 | # | |
1458 | # # Note that the following would not have worked because acl3 alone | |
1459 | # # does not determine whether the connection is going to be bumped: | |
1460 | # url_rewrite_access deny acl3 # Wrong! | |
1461 | ||
c302ddb5 CT |
1462 | acl aclname adaptation_service service ... |
1463 | # Matches the name of any icap_service, ecap_service, | |
1464 | # adaptation_service_set, or adaptation_service_chain that Squid | |
1465 | # has used (or attempted to use) for the master transaction. | |
1466 | # This ACL must be defined after the corresponding adaptation | |
1467 | # service is named in squid.conf. This ACL is usable with | |
1468 | # adaptation_meta because it starts matching immediately after | |
1469 | # the service has been selected for adaptation. | |
1470 | ||
5ceaee75 CT |
1471 | acl aclname transaction_initiator initiator ... |
1472 | # Matches transaction's initiator [fast] | |
1473 | # | |
1474 | # Supported initiators are: | |
1475 | # esi: matches transactions fetching ESI resources | |
1476 | # certificate-fetching: matches transactions fetching | |
1477 | # a missing intermediate TLS certificate | |
1478 | # cache-digest: matches transactions fetching Cache Digests | |
1479 | # from a cache_peer | |
1480 | # htcp: matches HTCP requests from peers | |
1481 | # icp: matches ICP requests to peers | |
1482 | # icmp: matches ICMP RTT database (NetDB) requests to peers | |
1483 | # asn: matches asns db requests | |
1484 | # internal: matches any of the above | |
1485 | # client: matches transactions containing an HTTP or FTP | |
1486 | # client request received at a Squid *_port | |
1487 | # all: matches any transaction, including internal transactions | |
1488 | # without a configurable initiator and hopefully rare | |
1489 | # transactions without a known-to-Squid initiator | |
1490 | # | |
1491 | # Multiple initiators are ORed. | |
1492 | ||
5ec4cffe EB |
1493 | acl aclname has component |
1494 | # matches a transaction "component" [fast] | |
1495 | # | |
1496 | # Supported transaction components are: | |
1497 | # request: transaction has a request header (at least) | |
1498 | # response: transaction has a response header (at least) | |
1499 | # ALE: transaction has an internally-generated Access Log Entry | |
1500 | # structure; bugs notwithstanding, all transaction have it | |
1501 | # | |
1502 | # For example, the following configuration helps when dealing with HTTP | |
1503 | # clients that close connections without sending a request header: | |
1504 | # | |
1505 | # acl hasRequest has request | |
1506 | # acl logMe note important_transaction | |
1507 | # # avoid "logMe ACL is used in context without an HTTP request" warnings | |
1508 | # access_log ... logformat=detailed hasRequest logMe | |
1509 | # # log request-less transactions, instead of ignoring them | |
1510 | # access_log ... logformat=brief !hasRequest | |
1511 | # | |
1512 | # Multiple components are not supported for one "acl" rule, but | |
1513 | # can be specified (and are ORed) using multiple same-name rules: | |
1514 | # | |
1515 | # # OK, this strange logging daemon needs request or response, | |
1516 | # # but can work without either a request or a response: | |
1517 | # acl hasWhatMyLoggingDaemonNeeds has request | |
1518 | # acl hasWhatMyLoggingDaemonNeeds has response | |
1519 | ||
560630e6 | 1520 | acl aclname at_step step |
090f1d3c CT |
1521 | # match against the current request processing step [fast] |
1522 | # Valid steps are: | |
1523 | # GeneratingCONNECT: Generating HTTP CONNECT request headers | |
1524 | IF USE_OPENSSL | |
1525 | # The following ssl_bump processing steps are recognized: | |
1526 | # SslBump1: After getting TCP-level and HTTP CONNECT info. | |
1527 | # SslBump2: After getting SSL Client Hello info. | |
1528 | # SslBump3: After getting SSL Server Hello info. | |
1529 | ENDIF | |
1530 | ||
cb4f4424 | 1531 | IF USE_OPENSSL |
cf1c09f6 CT |
1532 | acl aclname ssl_error errorname |
1533 | # match against SSL certificate validation error [fast] | |
cf1c09f6 | 1534 | # |
757a738c AR |
1535 | # When used with sslproxy_cert_error, this ACL tests a single |
1536 | # certificate validation error currently being evaluated by that | |
1537 | # directive. When used with slproxy_cert_sign or sslproxy_cert_adapt, | |
1538 | # the ACL tests all past certificate validation errors associated with | |
1539 | # the current Squid-to-server connection (attempt). This ACL is not yet | |
1540 | # supported for use with other directives. | |
1541 | # | |
7a957a93 AR |
1542 | # For valid error names see in @DEFAULT_ERROR_DIR@/templates/error-details.txt |
1543 | # template file. | |
cf1c09f6 | 1544 | # |
7a957a93 AR |
1545 | # The following can be used as shortcuts for certificate properties: |
1546 | # [ssl::]certHasExpired: the "not after" field is in the past | |
1547 | # [ssl::]certNotYetValid: the "not before" field is in the future | |
1548 | # [ssl::]certUntrusted: The certificate issuer is not to be trusted. | |
1549 | # [ssl::]certSelfSigned: The certificate is self signed. | |
1550 | # [ssl::]certDomainMismatch: The certificate CN domain does not | |
1551 | # match the name the name of the host we are connecting to. | |
1552 | # | |
1553 | # The ssl::certHasExpired, ssl::certNotYetValid, ssl::certDomainMismatch, | |
1554 | # ssl::certUntrusted, and ssl::certSelfSigned can also be used as | |
1555 | # predefined ACLs, just like the 'all' ACL. | |
00352183 | 1556 | |
ab04fcb3 | 1557 | acl aclname server_cert_fingerprint fingerprint |
00352183 AR |
1558 | # match against server SSL certificate fingerprint [fast] |
1559 | # | |
9603207d | 1560 | # The fingerprint is the digest of the DER encoded version |
00352183 | 1561 | # of the whole certificate. The user should use the form: XX:XX:... |
00352183 | 1562 | # The SHA1 digest algorithm is the default and is currently |
ab04fcb3 | 1563 | # the only algorithm supported. |
5d65362c | 1564 | |
4f6990ec | 1565 | acl aclname ssl::server_name [option] .foo.com ... |
69f69080 CT |
1566 | # matches server name obtained from various sources [fast] |
1567 | # | |
4f6990ec | 1568 | # The ACL computes server name(s) using such information sources as |
9603207d | 1569 | # CONNECT request URI, TLS client SNI, and TLS server certificate |
4f6990ec CT |
1570 | # subject (CN and SubjectAltName). The computed server name(s) usually |
1571 | # change with each SslBump step, as more info becomes available: | |
1572 | # * SNI is used as the server name instead of the request URI, | |
1573 | # * subject name(s) from the server certificate (CN and | |
1574 | # SubjectAltName) are used as the server names instead of SNI. | |
1575 | # | |
1576 | # When the ACL computes multiple server names, matching any single | |
1577 | # computed name is sufficient for the ACL to match. | |
1578 | # | |
1579 | # The "none" name can be used to match transactions where the ACL | |
8d9e6d7f | 1580 | # could not compute the server name using any information source |
4f6990ec CT |
1581 | # that was both available and allowed to be used by the ACL options at |
1582 | # the ACL evaluation time. | |
1583 | # | |
1584 | # Unlike dstdomain, this ACL does not perform DNS lookups. | |
1585 | # | |
9603207d | 1586 | # An ACL option below may be used to restrict what information |
4f6990ec CT |
1587 | # sources are used to extract the server names from: |
1588 | # | |
1589 | # --client-requested | |
1590 | # The server name is SNI regardless of what the server says. | |
1591 | # --server-provided | |
1592 | # The server name(s) are the certificate subject name(s), regardless | |
1593 | # of what the client has requested. If the server certificate is | |
1594 | # unavailable, then the name is "none". | |
1595 | # --consensus | |
1596 | # The server name is either SNI (if SNI matches at least one of the | |
1597 | # certificate subject names) or "none" (otherwise). When the server | |
1598 | # certificate is unavailable, the consensus server name is SNI. | |
1599 | # | |
1600 | # Combining multiple options in one ACL is a fatal configuration | |
1601 | # error. | |
1602 | # | |
1603 | # For all options: If no SNI is available, then the CONNECT request | |
1604 | # target (a.k.a. URI) is used instead of SNI (for an intercepted | |
1605 | # connection, this target is the destination IP address). | |
69f69080 CT |
1606 | |
1607 | acl aclname ssl::server_name_regex [-i] \.foo\.com ... | |
1608 | # regex matches server name obtained from various sources [fast] | |
88df846b CT |
1609 | |
1610 | acl aclname connections_encrypted | |
1611 | # matches transactions with all HTTP messages received over TLS | |
1612 | # transport connections. [fast] | |
1613 | # | |
1614 | # The master transaction deals with HTTP messages received from | |
1615 | # various sources. All sources used by the master transaction in the | |
1616 | # past are considered by the ACL. The following rules define whether | |
1617 | # a given message source taints the entire master transaction, | |
1618 | # resulting in ACL mismatches: | |
1619 | # | |
1620 | # * The HTTP client transport connection is not TLS. | |
1621 | # * An adaptation service connection-encryption flag is off. | |
1622 | # * The peer or origin server transport connection is not TLS. | |
1623 | # | |
1624 | # Caching currently does not affect these rules. This cache ignorance | |
1625 | # implies that only the current HTTP client transport and REQMOD | |
1626 | # services status determine whether this ACL matches a from-cache | |
1627 | # transaction. The source of the cached response does not have any | |
1628 | # effect on future transaction that use the cached response without | |
1629 | # revalidation. This may change. | |
1630 | # | |
1631 | # DNS, ICP, and HTCP exchanges during the master transaction do not | |
1632 | # affect these rules. | |
cf1c09f6 | 1633 | ENDIF |
6f58d7d7 AR |
1634 | acl aclname any-of acl1 acl2 ... |
1635 | # match any one of the acls [fast or slow] | |
1636 | # The first matching ACL stops further ACL evaluation. | |
1637 | # | |
1638 | # ACLs from multiple any-of lines with the same name are ORed. | |
1639 | # For example, A = (a1 or a2) or (a3 or a4) can be written as | |
1640 | # acl A any-of a1 a2 | |
1641 | # acl A any-of a3 a4 | |
1642 | # | |
1643 | # This group ACL is fast if all evaluated ACLs in the group are fast | |
1644 | # and slow otherwise. | |
1645 | ||
9603207d | 1646 | acl aclname all-of acl1 acl2 ... |
6f58d7d7 AR |
1647 | # match all of the acls [fast or slow] |
1648 | # The first mismatching ACL stops further ACL evaluation. | |
1649 | # | |
1650 | # ACLs from multiple all-of lines with the same name are ORed. | |
1651 | # For example, B = (b1 and b2) or (b3 and b4) can be written as | |
1652 | # acl B all-of b1 b2 | |
1653 | # acl B all-of b3 b4 | |
1654 | # | |
1655 | # This group ACL is fast if all evaluated ACLs in the group are fast | |
1656 | # and slow otherwise. | |
cf1c09f6 | 1657 | |
e0855596 AJ |
1658 | Examples: |
1659 | acl macaddress arp 09:00:2b:23:45:67 | |
1660 | acl myexample dst_as 1241 | |
1661 | acl password proxy_auth REQUIRED | |
1662 | acl fileupload req_mime_type -i ^multipart/form-data$ | |
1663 | acl javascript rep_mime_type -i ^application/x-javascript$ | |
cccac0a2 | 1664 | |
47f0eaea | 1665 | CONFIG_START |
e0855596 AJ |
1666 | # |
1667 | # Recommended minimum configuration: | |
1668 | # | |
e0855596 | 1669 | |
ee776778 | 1670 | # Example rule allowing access from your local networks. |
1671 | # Adapt to list your (internal) IP networks from where browsing | |
1672 | # should be allowed | |
fe204e1d AJ |
1673 | acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN) |
1674 | acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN) | |
1675 | acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN) | |
7c392424 | 1676 | acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines |
fe204e1d AJ |
1677 | acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN) |
1678 | acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN) | |
1679 | acl localnet src fc00::/7 # RFC 4193 local private network range | |
1680 | acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines | |
e0855596 | 1681 | |
41bd17a4 | 1682 | acl SSL_ports port 443 |
1683 | acl Safe_ports port 80 # http | |
1684 | acl Safe_ports port 21 # ftp | |
1685 | acl Safe_ports port 443 # https | |
1686 | acl Safe_ports port 70 # gopher | |
1687 | acl Safe_ports port 210 # wais | |
1688 | acl Safe_ports port 1025-65535 # unregistered ports | |
1689 | acl Safe_ports port 280 # http-mgmt | |
1690 | acl Safe_ports port 488 # gss-http | |
1691 | acl Safe_ports port 591 # filemaker | |
1692 | acl Safe_ports port 777 # multiling http | |
47f0eaea | 1693 | CONFIG_END |
41bd17a4 | 1694 | DOC_END |
cccac0a2 | 1695 | |
d3d92daa | 1696 | NAME: proxy_protocol_access |
3d674977 | 1697 | TYPE: acl_access |
d3d92daa AJ |
1698 | LOC: Config.accessList.proxyProtocol |
1699 | DEFAULT: none | |
c390580b | 1700 | DEFAULT_DOC: all TCP connections to ports with require-proxy-header will be denied |
d3d92daa AJ |
1701 | DOC_START |
1702 | Determine which client proxies can be trusted to provide correct | |
1703 | information regarding real client IP address using PROXY protocol. | |
1704 | ||
1705 | Requests may pass through a chain of several other proxies | |
1706 | before reaching us. The original source details may by sent in: | |
1707 | * HTTP message Forwarded header, or | |
1708 | * HTTP message X-Forwarded-For header, or | |
1709 | * PROXY protocol connection header. | |
1710 | ||
1711 | This directive is solely for validating new PROXY protocol | |
1712 | connections received from a port flagged with require-proxy-header. | |
1713 | It is checked only once after TCP connection setup. | |
1714 | ||
1715 | A deny match results in TCP connection closure. | |
1716 | ||
1717 | An allow match is required for Squid to permit the corresponding | |
1718 | TCP connection, before Squid even looks for HTTP request headers. | |
1719 | If there is an allow match, Squid starts using PROXY header information | |
1720 | to determine the source address of the connection for all future ACL | |
1721 | checks, logging, etc. | |
1722 | ||
1723 | SECURITY CONSIDERATIONS: | |
1724 | ||
c390580b | 1725 | Any host from which we accept client IP details can place |
d3d92daa AJ |
1726 | incorrect information in the relevant header, and Squid |
1727 | will use the incorrect information as if it were the | |
1728 | source address of the request. This may enable remote | |
1729 | hosts to bypass any access control restrictions that are | |
1730 | based on the client's source addresses. | |
1731 | ||
1732 | This clause only supports fast acl types. | |
7409131e | 1733 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
d3d92daa AJ |
1734 | DOC_END |
1735 | ||
1736 | NAME: follow_x_forwarded_for | |
1737 | TYPE: acl_access | |
1738 | IFDEF: FOLLOW_X_FORWARDED_FOR | |
3d674977 | 1739 | LOC: Config.accessList.followXFF |
3d674977 | 1740 | DEFAULT_IF_NONE: deny all |
9353df52 | 1741 | DEFAULT_DOC: X-Forwarded-For header will be ignored. |
3d674977 | 1742 | DOC_START |
00d0ce87 AJ |
1743 | Determine which client proxies can be trusted to provide correct |
1744 | information regarding real client IP address. | |
1745 | ||
3d674977 | 1746 | Requests may pass through a chain of several other proxies |
70a16fea AJ |
1747 | before reaching us. The original source details may by sent in: |
1748 | * HTTP message Forwarded header, or | |
1749 | * HTTP message X-Forwarded-For header, or | |
1750 | * PROXY protocol connection header. | |
3d674977 | 1751 | |
d3d92daa AJ |
1752 | PROXY protocol connections are controlled by the proxy_protocol_access |
1753 | directive which is checked before this. | |
1754 | ||
3d674977 | 1755 | If a request reaches us from a source that is allowed by this |
70a16fea AJ |
1756 | directive, then we trust the information it provides regarding |
1757 | the IP of the client it received from (if any). | |
1758 | ||
1759 | For the purpose of ACLs used in this directive the src ACL type always | |
1760 | matches the address we are testing and srcdomain matches its rDNS. | |
1761 | ||
70a16fea AJ |
1762 | On each HTTP request Squid checks for X-Forwarded-For header fields. |
1763 | If found the header values are iterated in reverse order and an allow | |
1764 | match is required for Squid to continue on to the next value. | |
1765 | The verification ends when a value receives a deny match, cannot be | |
1766 | tested, or there are no more values to test. | |
1767 | NOTE: Squid does not yet follow the Forwarded HTTP header. | |
3d674977 AJ |
1768 | |
1769 | The end result of this process is an IP address that we will | |
1770 | refer to as the indirect client address. This address may | |
57d76dd4 | 1771 | be treated as the client address for access control, ICAP, delay |
3d674977 | 1772 | pools and logging, depending on the acl_uses_indirect_client, |
9603207d | 1773 | icap_uses_indirect_client, delay_pool_uses_indirect_client, |
96d64448 | 1774 | log_uses_indirect_client and tproxy_uses_indirect_client options. |
3d674977 | 1775 | |
b3567eb5 | 1776 | This clause only supports fast acl types. |
7409131e | 1777 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
b3567eb5 | 1778 | |
3d674977 AJ |
1779 | SECURITY CONSIDERATIONS: |
1780 | ||
c390580b | 1781 | Any host from which we accept client IP details can place |
70a16fea | 1782 | incorrect information in the relevant header, and Squid |
3d674977 AJ |
1783 | will use the incorrect information as if it were the |
1784 | source address of the request. This may enable remote | |
1785 | hosts to bypass any access control restrictions that are | |
1786 | based on the client's source addresses. | |
1787 | ||
1788 | For example: | |
1789 | ||
1790 | acl localhost src 127.0.0.1 | |
1791 | acl my_other_proxy srcdomain .proxy.example.com | |
1792 | follow_x_forwarded_for allow localhost | |
1793 | follow_x_forwarded_for allow my_other_proxy | |
1794 | DOC_END | |
1795 | ||
1796 | NAME: acl_uses_indirect_client | |
1797 | COMMENT: on|off | |
1798 | TYPE: onoff | |
1799 | IFDEF: FOLLOW_X_FORWARDED_FOR | |
1800 | DEFAULT: on | |
1801 | LOC: Config.onoff.acl_uses_indirect_client | |
1802 | DOC_START | |
1803 | Controls whether the indirect client address | |
1804 | (see follow_x_forwarded_for) is used instead of the | |
1805 | direct client address in acl matching. | |
55d0fae8 AJ |
1806 | |
1807 | NOTE: maxconn ACL considers direct TCP links and indirect | |
1808 | clients will always have zero. So no match. | |
3d674977 AJ |
1809 | DOC_END |
1810 | ||
1811 | NAME: delay_pool_uses_indirect_client | |
1812 | COMMENT: on|off | |
1813 | TYPE: onoff | |
9a0a18de | 1814 | IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_DELAY_POOLS |
3d674977 AJ |
1815 | DEFAULT: on |
1816 | LOC: Config.onoff.delay_pool_uses_indirect_client | |
1817 | DOC_START | |
1818 | Controls whether the indirect client address | |
1819 | (see follow_x_forwarded_for) is used instead of the | |
1820 | direct client address in delay pools. | |
1821 | DOC_END | |
1822 | ||
1823 | NAME: log_uses_indirect_client | |
1824 | COMMENT: on|off | |
1825 | TYPE: onoff | |
1826 | IFDEF: FOLLOW_X_FORWARDED_FOR | |
1827 | DEFAULT: on | |
1828 | LOC: Config.onoff.log_uses_indirect_client | |
1829 | DOC_START | |
1830 | Controls whether the indirect client address | |
1831 | (see follow_x_forwarded_for) is used instead of the | |
1832 | direct client address in the access log. | |
1833 | DOC_END | |
1834 | ||
96d64448 AJ |
1835 | NAME: tproxy_uses_indirect_client |
1836 | COMMENT: on|off | |
1837 | TYPE: onoff | |
1838 | IFDEF: FOLLOW_X_FORWARDED_FOR&&LINUX_NETFILTER | |
4d7ab5a2 | 1839 | DEFAULT: off |
96d64448 AJ |
1840 | LOC: Config.onoff.tproxy_uses_indirect_client |
1841 | DOC_START | |
1842 | Controls whether the indirect client address | |
1843 | (see follow_x_forwarded_for) is used instead of the | |
1844 | direct client address when spoofing the outgoing client. | |
4d7ab5a2 AJ |
1845 | |
1846 | This has no effect on requests arriving in non-tproxy | |
1847 | mode ports. | |
1848 | ||
1849 | SECURITY WARNING: Usage of this option is dangerous | |
1850 | and should not be used trivially. Correct configuration | |
16ae256c | 1851 | of follow_x_forwarded_for with a limited set of trusted |
4d7ab5a2 | 1852 | sources is required to prevent abuse of your proxy. |
96d64448 AJ |
1853 | DOC_END |
1854 | ||
0d901ef4 SH |
1855 | NAME: spoof_client_ip |
1856 | TYPE: acl_access | |
1857 | LOC: Config.accessList.spoof_client_ip | |
1858 | DEFAULT: none | |
1859 | DEFAULT_DOC: Allow spoofing on all TPROXY traffic. | |
1860 | DOC_START | |
1861 | Control client IP address spoofing of TPROXY traffic based on | |
1862 | defined access lists. | |
1863 | ||
1864 | spoof_client_ip allow|deny [!]aclname ... | |
1865 | ||
1866 | If there are no "spoof_client_ip" lines present, the default | |
1867 | is to "allow" spoofing of any suitable request. | |
1868 | ||
1869 | Note that the cache_peer "no-tproxy" option overrides this ACL. | |
1870 | ||
1871 | This clause supports fast acl types. | |
7409131e | 1872 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
0d901ef4 SH |
1873 | DOC_END |
1874 | ||
41bd17a4 | 1875 | NAME: http_access |
1876 | TYPE: acl_access | |
1877 | LOC: Config.accessList.http | |
41bd17a4 | 1878 | DEFAULT_IF_NONE: deny all |
638402dd | 1879 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. |
41bd17a4 | 1880 | DOC_START |
1881 | Allowing or Denying access based on defined access lists | |
cccac0a2 | 1882 | |
8a2f40dd | 1883 | To allow or deny a message received on an HTTP, HTTPS, or FTP port: |
41bd17a4 | 1884 | http_access allow|deny [!]aclname ... |
cccac0a2 | 1885 | |
41bd17a4 | 1886 | NOTE on default values: |
cccac0a2 | 1887 | |
41bd17a4 | 1888 | If there are no "access" lines present, the default is to deny |
1889 | the request. | |
cccac0a2 | 1890 | |
41bd17a4 | 1891 | If none of the "access" lines cause a match, the default is the |
1892 | opposite of the last line in the list. If the last line was | |
1893 | deny, the default is allow. Conversely, if the last line | |
1894 | is allow, the default will be deny. For these reasons, it is a | |
51ae86b2 HN |
1895 | good idea to have an "deny all" entry at the end of your access |
1896 | lists to avoid potential confusion. | |
cccac0a2 | 1897 | |
b3567eb5 | 1898 | This clause supports both fast and slow acl types. |
7409131e | 1899 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
b3567eb5 | 1900 | |
47f0eaea | 1901 | CONFIG_START |
e0855596 AJ |
1902 | |
1903 | # | |
1904 | # Recommended minimum Access Permission configuration: | |
41bd17a4 | 1905 | # |
e0855596 | 1906 | # Deny requests to certain unsafe ports |
41bd17a4 | 1907 | http_access deny !Safe_ports |
e0855596 AJ |
1908 | |
1909 | # Deny CONNECT to other than secure SSL ports | |
41bd17a4 | 1910 | http_access deny CONNECT !SSL_ports |
e0855596 | 1911 | |
baa3ea7e AJ |
1912 | # Only allow cachemgr access from localhost |
1913 | http_access allow localhost manager | |
1914 | http_access deny manager | |
1915 | ||
f13e556e AR |
1916 | # This default configuration only allows localhost requests because a more |
1917 | # permissive Squid installation could introduce new attack vectors into the | |
1918 | # network by proxying external TCP connections to unprotected services. | |
1919 | http_access allow localhost | |
1920 | ||
1921 | # The two deny rules below are unnecessary in this default configuration | |
1922 | # because they are followed by a "deny all" rule. However, they may become | |
1923 | # critically important when you start allowing external requests below them. | |
1924 | ||
6d2f8ed0 AR |
1925 | # Protect web applications running on the same server as Squid. They often |
1926 | # assume that only local users can access them at "localhost" ports. | |
1927 | http_access deny to_localhost | |
1928 | ||
1929 | # Protect cloud servers that provide local users with sensitive info about | |
1930 | # their server via certain well-known link-local (a.k.a. APIPA) addresses. | |
1931 | http_access deny to_linklocal | |
e0855596 | 1932 | |
41bd17a4 | 1933 | # |
1934 | # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS | |
e0855596 | 1935 | # |
c8f4eac4 | 1936 | |
f13e556e AR |
1937 | # For example, to allow access from your local networks, you may uncomment the |
1938 | # following rule (and/or add rules that match your definition of "local"): | |
1939 | # http_access allow localnet | |
7d90757b | 1940 | |
41bd17a4 | 1941 | # And finally deny all other access to this proxy |
1942 | http_access deny all | |
47f0eaea | 1943 | CONFIG_END |
41bd17a4 | 1944 | DOC_END |
7d90757b | 1945 | |
533493da AJ |
1946 | NAME: adapted_http_access http_access2 |
1947 | TYPE: acl_access | |
1948 | LOC: Config.accessList.adapted_http | |
1949 | DEFAULT: none | |
638402dd | 1950 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
533493da AJ |
1951 | DOC_START |
1952 | Allowing or Denying access based on defined access lists | |
1953 | ||
1954 | Essentially identical to http_access, but runs after redirectors | |
1955 | and ICAP/eCAP adaptation. Allowing access control based on their | |
1956 | output. | |
1957 | ||
1958 | If not set then only http_access is used. | |
1959 | DOC_END | |
1960 | ||
41bd17a4 | 1961 | NAME: http_reply_access |
1962 | TYPE: acl_access | |
1963 | LOC: Config.accessList.reply | |
1964 | DEFAULT: none | |
638402dd | 1965 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
41bd17a4 | 1966 | DOC_START |
1967 | Allow replies to client requests. This is complementary to http_access. | |
cccac0a2 | 1968 | |
41bd17a4 | 1969 | http_reply_access allow|deny [!] aclname ... |
cccac0a2 | 1970 | |
41bd17a4 | 1971 | NOTE: if there are no access lines present, the default is to allow |
638402dd | 1972 | all replies. |
1a224843 | 1973 | |
41bd17a4 | 1974 | If none of the access lines cause a match the opposite of the |
1975 | last line will apply. Thus it is good practice to end the rules | |
1976 | with an "allow all" or "deny all" entry. | |
b3567eb5 FC |
1977 | |
1978 | This clause supports both fast and slow acl types. | |
7409131e | 1979 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
cccac0a2 | 1980 | DOC_END |
1981 | ||
41bd17a4 | 1982 | NAME: icp_access |
1983 | TYPE: acl_access | |
1984 | LOC: Config.accessList.icp | |
638402dd AJ |
1985 | DEFAULT: none |
1986 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
5473c134 | 1987 | DOC_START |
41bd17a4 | 1988 | Allowing or Denying access to the ICP port based on defined |
1989 | access lists | |
5473c134 | 1990 | |
41bd17a4 | 1991 | icp_access allow|deny [!]aclname ... |
5473c134 | 1992 | |
638402dd AJ |
1993 | NOTE: The default if no icp_access lines are present is to |
1994 | deny all traffic. This default may cause problems with peers | |
1995 | using ICP. | |
41bd17a4 | 1996 | |
b3567eb5 | 1997 | This clause only supports fast acl types. |
7409131e | 1998 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
e0855596 AJ |
1999 | |
2000 | # Allow ICP queries from local networks only | |
df2eec10 AJ |
2001 | #icp_access allow localnet |
2002 | #icp_access deny all | |
5473c134 | 2003 | DOC_END |
2004 | ||
41bd17a4 | 2005 | NAME: htcp_access |
2006 | IFDEF: USE_HTCP | |
2007 | TYPE: acl_access | |
2008 | LOC: Config.accessList.htcp | |
638402dd AJ |
2009 | DEFAULT: none |
2010 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
5473c134 | 2011 | DOC_START |
41bd17a4 | 2012 | Allowing or Denying access to the HTCP port based on defined |
2013 | access lists | |
5473c134 | 2014 | |
41bd17a4 | 2015 | htcp_access allow|deny [!]aclname ... |
5473c134 | 2016 | |
638402dd AJ |
2017 | See also htcp_clr_access for details on access control for |
2018 | cache purge (CLR) HTCP messages. | |
5473c134 | 2019 | |
0b48417e | 2020 | NOTE: The default if no htcp_access lines are present is to |
2021 | deny all traffic. This default may cause problems with peers | |
18191440 | 2022 | using the htcp option. |
0b48417e | 2023 | |
b3567eb5 | 2024 | This clause only supports fast acl types. |
7409131e | 2025 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
e0855596 AJ |
2026 | |
2027 | # Allow HTCP queries from local networks only | |
df2eec10 AJ |
2028 | #htcp_access allow localnet |
2029 | #htcp_access deny all | |
41bd17a4 | 2030 | DOC_END |
5473c134 | 2031 | |
41bd17a4 | 2032 | NAME: htcp_clr_access |
2033 | IFDEF: USE_HTCP | |
2034 | TYPE: acl_access | |
2035 | LOC: Config.accessList.htcp_clr | |
638402dd AJ |
2036 | DEFAULT: none |
2037 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
41bd17a4 | 2038 | DOC_START |
2039 | Allowing or Denying access to purge content using HTCP based | |
638402dd AJ |
2040 | on defined access lists. |
2041 | See htcp_access for details on general HTCP access control. | |
5473c134 | 2042 | |
41bd17a4 | 2043 | htcp_clr_access allow|deny [!]aclname ... |
5473c134 | 2044 | |
b3567eb5 | 2045 | This clause only supports fast acl types. |
7409131e | 2046 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
e0855596 AJ |
2047 | |
2048 | # Allow HTCP CLR requests from trusted peers | |
638402dd | 2049 | acl htcp_clr_peer src 192.0.2.2 2001:DB8::2 |
41bd17a4 | 2050 | htcp_clr_access allow htcp_clr_peer |
638402dd | 2051 | htcp_clr_access deny all |
5473c134 | 2052 | DOC_END |
2053 | ||
41bd17a4 | 2054 | NAME: miss_access |
2055 | TYPE: acl_access | |
2056 | LOC: Config.accessList.miss | |
b8a25eaa | 2057 | DEFAULT: none |
638402dd | 2058 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
5473c134 | 2059 | DOC_START |
18d1eddf | 2060 | Determines whether network access is permitted when satisfying a request. |
0b4fb91a AJ |
2061 | |
2062 | For example; | |
2063 | to force your neighbors to use you as a sibling instead of | |
2064 | a parent. | |
5473c134 | 2065 | |
638402dd | 2066 | acl localclients src 192.0.2.0/24 2001:DB8::a:0/64 |
41bd17a4 | 2067 | miss_access deny !localclients |
638402dd | 2068 | miss_access allow all |
5473c134 | 2069 | |
0b4fb91a AJ |
2070 | This means only your local clients are allowed to fetch relayed/MISS |
2071 | replies from the network and all other clients can only fetch cached | |
2072 | objects (HITs). | |
2073 | ||
0b4fb91a AJ |
2074 | The default for this setting allows all clients who passed the |
2075 | http_access rules to relay via this proxy. | |
b3567eb5 FC |
2076 | |
2077 | This clause only supports fast acl types. | |
7409131e | 2078 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
41bd17a4 | 2079 | DOC_END |
2080 | ||
2081 | NAME: ident_lookup_access | |
2082 | TYPE: acl_access | |
2083 | IFDEF: USE_IDENT | |
638402dd AJ |
2084 | DEFAULT: none |
2085 | DEFAULT_DOC: Unless rules exist in squid.conf, IDENT is not fetched. | |
4daaf3cb | 2086 | LOC: Ident::TheConfig.identLookup |
5473c134 | 2087 | DOC_START |
41bd17a4 | 2088 | A list of ACL elements which, if matched, cause an ident |
2089 | (RFC 931) lookup to be performed for this request. For | |
2090 | example, you might choose to always perform ident lookups | |
2091 | for your main multi-user Unix boxes, but not for your Macs | |
2092 | and PCs. By default, ident lookups are not performed for | |
2093 | any requests. | |
5473c134 | 2094 | |
41bd17a4 | 2095 | To enable ident lookups for specific client addresses, you |
2096 | can follow this example: | |
5473c134 | 2097 | |
4daaf3cb | 2098 | acl ident_aware_hosts src 198.168.1.0/24 |
41bd17a4 | 2099 | ident_lookup_access allow ident_aware_hosts |
2100 | ident_lookup_access deny all | |
5473c134 | 2101 | |
4daaf3cb | 2102 | Only src type ACL checks are fully supported. A srcdomain |
41bd17a4 | 2103 | ACL might work at times, but it will not always provide |
2104 | the correct result. | |
b3567eb5 FC |
2105 | |
2106 | This clause only supports fast acl types. | |
7409131e | 2107 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
41bd17a4 | 2108 | DOC_END |
5473c134 | 2109 | |
5b0f5383 | 2110 | NAME: reply_body_max_size |
2111 | COMMENT: size [acl acl...] | |
2112 | TYPE: acl_b_size_t | |
2113 | DEFAULT: none | |
638402dd | 2114 | DEFAULT_DOC: No limit is applied. |
5b0f5383 | 2115 | LOC: Config.ReplyBodySize |
2116 | DOC_START | |
2117 | This option specifies the maximum size of a reply body. It can be | |
2118 | used to prevent users from downloading very large files, such as | |
2119 | MP3's and movies. When the reply headers are received, the | |
2120 | reply_body_max_size lines are processed, and the first line where | |
2121 | all (if any) listed ACLs are true is used as the maximum body size | |
2122 | for this reply. | |
2123 | ||
2124 | This size is checked twice. First when we get the reply headers, | |
2125 | we check the content-length value. If the content length value exists | |
2126 | and is larger than the allowed size, the request is denied and the | |
2127 | user receives an error message that says "the request or reply | |
2128 | is too large." If there is no content-length, and the reply | |
2129 | size exceeds this limit, the client's connection is just closed | |
2130 | and they will receive a partial reply. | |
2131 | ||
2132 | WARNING: downstream caches probably can not detect a partial reply | |
2133 | if there is no content-length header, so they will cache | |
2134 | partial responses and give them out as hits. You should NOT | |
2135 | use this option if you have downstream caches. | |
2136 | ||
2137 | WARNING: A maximum size smaller than the size of squid's error messages | |
2138 | will cause an infinite loop and crash squid. Ensure that the smallest | |
2139 | non-zero value you use is greater that the maximum header size plus | |
2140 | the size of your largest error page. | |
2141 | ||
2142 | If you set this parameter none (the default), there will be | |
2143 | no limit imposed. | |
3bc32f2f AJ |
2144 | |
2145 | Configuration Format is: | |
2146 | reply_body_max_size SIZE UNITS [acl ...] | |
2147 | ie. | |
2148 | reply_body_max_size 10 MB | |
2149 | ||
5b0f5383 | 2150 | DOC_END |
2151 | ||
3248e962 CT |
2152 | NAME: on_unsupported_protocol |
2153 | TYPE: on_unsupported_protocol | |
2154 | LOC: Config.accessList.on_unsupported_protocol | |
2155 | DEFAULT: none | |
2156 | DEFAULT_DOC: Respond with an error message to unidentifiable traffic | |
2157 | DOC_START | |
2158 | Determines Squid behavior when encountering strange requests at the | |
56d089f3 CT |
2159 | beginning of an accepted TCP connection or the beginning of a bumped |
2160 | CONNECT tunnel. Controlling Squid reaction to unexpected traffic is | |
2161 | especially useful in interception environments where Squid is likely | |
2162 | to see connections for unsupported protocols that Squid should either | |
2163 | terminate or tunnel at TCP level. | |
9603207d | 2164 | |
3248e962 | 2165 | on_unsupported_protocol <action> [!]acl ... |
9603207d | 2166 | |
56d089f3 | 2167 | The first matching action wins. Only fast ACLs are supported. |
3248e962 CT |
2168 | |
2169 | Supported actions are: | |
9603207d | 2170 | |
3248e962 CT |
2171 | tunnel: Establish a TCP connection with the intended server and |
2172 | blindly shovel TCP packets between the client and server. | |
2173 | ||
2174 | respond: Respond with an error message, using the transfer protocol | |
2175 | for the Squid port that received the request (e.g., HTTP | |
2176 | for connections intercepted at the http_port). This is the | |
2177 | default. | |
56d089f3 CT |
2178 | |
2179 | Squid expects the following traffic patterns: | |
2180 | ||
2181 | http_port: a plain HTTP request | |
2182 | https_port: SSL/TLS handshake followed by an [encrypted] HTTP request | |
2183 | ftp_port: a plain FTP command (no on_unsupported_protocol support yet!) | |
2184 | CONNECT tunnel on http_port: same as https_port | |
2185 | CONNECT tunnel on https_port: same as https_port | |
2186 | ||
9155253a | 2187 | Currently, this directive has effect on intercepted connections and |
56d089f3 CT |
2188 | bumped tunnels only. Other cases are not supported because Squid |
2189 | cannot know the intended destination of other traffic. | |
3248e962 CT |
2190 | |
2191 | For example: | |
2192 | # define what Squid errors indicate receiving non-HTTP traffic: | |
2193 | acl foreignProtocol squid_error ERR_PROTOCOL_UNKNOWN ERR_TOO_BIG | |
2194 | # define what Squid errors indicate receiving nothing: | |
2195 | acl serverTalksFirstProtocol squid_error ERR_REQUEST_START_TIMEOUT | |
2196 | # tunnel everything that does not look like HTTP: | |
2197 | on_unsupported_protocol tunnel foreignProtocol | |
2198 | # tunnel if we think the client waits for the server to talk first: | |
2199 | on_unsupported_protocol tunnel serverTalksFirstProtocol | |
2200 | # in all other error cases, just send an HTTP "error page" response: | |
2201 | on_unsupported_protocol respond all | |
2202 | ||
2203 | See also: squid_error ACL | |
2204 | DOC_END | |
2205 | ||
d6e94bda AJ |
2206 | NAME: auth_schemes |
2207 | TYPE: AuthSchemes | |
2208 | IFDEF: USE_AUTH | |
2209 | LOC: Auth::TheConfig.schemeAccess | |
2210 | DEFAULT: none | |
2211 | DEFAULT_DOC: use all auth_param schemes in their configuration order | |
2212 | DOC_START | |
2213 | Use this directive to customize authentication schemes presence and | |
2214 | order in Squid's Unauthorized and Authentication Required responses. | |
2215 | ||
2216 | auth_schemes scheme1,scheme2,... [!]aclname ... | |
2217 | ||
2218 | where schemeN is the name of one of the authentication schemes | |
2219 | configured using auth_param directives. At least one scheme name is | |
2220 | required. Multiple scheme names are separated by commas. Either | |
2221 | avoid whitespace or quote the entire schemes list. | |
2222 | ||
2223 | A special "ALL" scheme name expands to all auth_param-configured | |
2224 | schemes in their configuration order. This directive cannot be used | |
2225 | to configure Squid to offer no authentication schemes at all. | |
2226 | ||
2227 | The first matching auth_schemes rule determines the schemes order | |
2228 | for the current Authentication Required transaction. Note that the | |
2229 | future response is not yet available during auth_schemes evaluation. | |
2230 | ||
2231 | If this directive is not used or none of its rules match, then Squid | |
2232 | responds with all configured authentication schemes in the order of | |
2233 | auth_param directives in the configuration file. | |
2234 | ||
2235 | This directive does not determine when authentication is used or | |
2236 | how each authentication scheme authenticates clients. | |
2237 | ||
2238 | The following example sends basic and negotiate authentication | |
2239 | schemes, in that order, when requesting authentication of HTTP | |
2240 | requests matching the isIE ACL (not shown) while sending all | |
2241 | auth_param schemes in their configuration order to other clients: | |
2242 | ||
2243 | auth_schemes basic,negotiate isIE | |
2244 | auth_schemes ALL all # explicit default | |
2245 | ||
2246 | This directive supports fast ACLs only. | |
2247 | ||
2248 | See also: auth_param. | |
2249 | DOC_END | |
2250 | ||
5b0f5383 | 2251 | COMMENT_START |
2252 | NETWORK OPTIONS | |
2253 | ----------------------------------------------------------------------------- | |
2254 | COMMENT_END | |
2255 | ||
2256 | NAME: http_port ascii_port | |
65d448bc | 2257 | TYPE: PortCfg |
5b0f5383 | 2258 | DEFAULT: none |
fa720bfb | 2259 | LOC: HttpPortList |
5b0f5383 | 2260 | DOC_START |
c7b1dd5d AJ |
2261 | Usage: port [mode] [options] |
2262 | hostname:port [mode] [options] | |
2263 | 1.2.3.4:port [mode] [options] | |
5b0f5383 | 2264 | |
2265 | The socket addresses where Squid will listen for HTTP client | |
2266 | requests. You may specify multiple socket addresses. | |
2267 | There are three forms: port alone, hostname with port, and | |
2268 | IP address with port. If you specify a hostname or IP | |
2269 | address, Squid binds the socket to that specific | |
c7b1dd5d | 2270 | address. Most likely, you do not need to bind to a specific |
5b0f5383 | 2271 | address, so you can use the port number alone. |
2272 | ||
2273 | If you are running Squid in accelerator mode, you | |
2274 | probably want to listen on port 80 also, or instead. | |
2275 | ||
2276 | The -a command line option may be used to specify additional | |
2277 | port(s) where Squid listens for proxy request. Such ports will | |
2278 | be plain proxy ports with no options. | |
2279 | ||
2280 | You may specify multiple socket addresses on multiple lines. | |
2281 | ||
c7b1dd5d | 2282 | Modes: |
5b0f5383 | 2283 | |
16ae256c AJ |
2284 | intercept Support for IP-Layer NAT interception delivering |
2285 | traffic to this Squid port. | |
2286 | NP: disables authentication on the port. | |
5b0f5383 | 2287 | |
16ae256c AJ |
2288 | tproxy Support Linux TPROXY (or BSD divert-to) with spoofing |
2289 | of outgoing connections using the client IP address. | |
2290 | NP: disables authentication on the port. | |
5b0f5383 | 2291 | |
7f45065d | 2292 | accel Accelerator / reverse proxy mode |
5b0f5383 | 2293 | |
caf3666d | 2294 | ssl-bump For each CONNECT request allowed by ssl_bump ACLs, |
c7b1dd5d | 2295 | establish secure connection with the client and with |
caf3666d | 2296 | the server, decrypt HTTPS messages as they pass through |
c7b1dd5d AJ |
2297 | Squid, and treat them as unencrypted HTTP messages, |
2298 | becoming the man-in-the-middle. | |
2299 | ||
7a957a93 | 2300 | The ssl_bump option is required to fully enable |
caf3666d | 2301 | bumping of CONNECT requests. |
c7b1dd5d AJ |
2302 | |
2303 | Omitting the mode flag causes default forward proxy mode to be used. | |
2304 | ||
2305 | ||
2306 | Accelerator Mode Options: | |
2307 | ||
5b0f5383 | 2308 | defaultsite=domainname |
2309 | What to use for the Host: header if it is not present | |
2310 | in a request. Determines what site (not origin server) | |
2311 | accelerators should consider the default. | |
5b0f5383 | 2312 | |
cf673853 | 2313 | no-vhost Disable using HTTP/1.1 Host header for virtual domain support. |
5b0f5383 | 2314 | |
a9f60805 AJ |
2315 | protocol= Protocol to reconstruct accelerated and intercepted |
2316 | requests with. Defaults to HTTP/1.1 for http_port and | |
2317 | HTTPS/1.1 for https_port. | |
2318 | When an unsupported value is configured Squid will | |
2319 | produce a FATAL error. | |
2320 | Values: HTTP or HTTP/1.1, HTTPS or HTTPS/1.1 | |
5b0f5383 | 2321 | |
cf673853 AJ |
2322 | vport Virtual host port support. Using the http_port number |
2323 | instead of the port passed on Host: headers. | |
5b0f5383 | 2324 | |
cf673853 AJ |
2325 | vport=NN Virtual host port support. Using the specified port |
2326 | number instead of the port passed on Host: headers. | |
5b0f5383 | 2327 | |
7f45065d HN |
2328 | act-as-origin |
2329 | Act as if this Squid is the origin server. | |
2330 | This currently means generate new Date: and Expires: | |
2331 | headers on HIT instead of adding Age:. | |
5b0f5383 | 2332 | |
432bc83c HN |
2333 | ignore-cc Ignore request Cache-Control headers. |
2334 | ||
7f45065d | 2335 | WARNING: This option violates HTTP specifications if |
432bc83c HN |
2336 | used in non-accelerator setups. |
2337 | ||
7f45065d HN |
2338 | allow-direct Allow direct forwarding in accelerator mode. Normally |
2339 | accelerated requests are denied direct forwarding as if | |
2340 | never_direct was used. | |
2341 | ||
2342 | WARNING: this option opens accelerator mode to security | |
2343 | vulnerabilities usually only affecting in interception | |
2344 | mode. Make sure to protect forwarding with suitable | |
2345 | http_access rules when using this. | |
2346 | ||
c7b1dd5d AJ |
2347 | |
2348 | SSL Bump Mode Options: | |
859741ed AJ |
2349 | In addition to these options ssl-bump requires TLS/SSL options. |
2350 | ||
2351 | generate-host-certificates[=<on|off>] | |
2352 | Dynamically create SSL server certificates for the | |
9603207d | 2353 | destination hosts of bumped CONNECT requests.When |
859741ed AJ |
2354 | enabled, the cert and key options are used to sign |
2355 | generated certificates. Otherwise generated | |
2356 | certificate will be selfsigned. | |
9603207d | 2357 | If there is a CA certificate lifetime of the generated |
859741ed | 2358 | certificate equals lifetime of the CA certificate. If |
9603207d | 2359 | generated certificate is selfsigned lifetime is three |
859741ed AJ |
2360 | years. |
2361 | This option is enabled by default when ssl-bump is used. | |
2362 | See the ssl-bump option above for more information. | |
9603207d | 2363 | |
859741ed AJ |
2364 | dynamic_cert_mem_cache_size=SIZE |
2365 | Approximate total RAM size spent on cached generated | |
2366 | certificates. If set to zero, caching is disabled. The | |
23bb0ebf | 2367 | default value is 4MB. |
859741ed AJ |
2368 | |
2369 | TLS / SSL Options: | |
c7b1dd5d | 2370 | |
51e09c08 AJ |
2371 | tls-cert= Path to file containing an X.509 certificate (PEM format) |
2372 | to be used in the TLS handshake ServerHello. | |
c7b1dd5d | 2373 | |
51e09c08 AJ |
2374 | If this certificate is constrained by KeyUsage TLS |
2375 | feature it must allow HTTP server usage, along with | |
2376 | any additional restrictions imposed by your choice | |
2377 | of options= settings. | |
2378 | ||
2379 | When OpenSSL is used this file may also contain a | |
2380 | chain of intermediate CA certificates to send in the | |
2381 | TLS handshake. | |
2382 | ||
2383 | When GnuTLS is used this option (and any paired | |
2384 | tls-key= option) may be repeated to load multiple | |
2385 | certificates for different domains. | |
2386 | ||
2387 | Also, when generate-host-certificates=on is configured | |
2388 | the first tls-cert= option must be a CA certificate | |
2389 | capable of signing the automatically generated | |
2390 | certificates. | |
2391 | ||
2392 | tls-key= Path to a file containing private key file (PEM format) | |
2393 | for the previous tls-cert= option. | |
2394 | ||
2395 | If tls-key= is not specified tls-cert= is assumed to | |
2396 | reference a PEM file containing both the certificate | |
2397 | and private key. | |
c7b1dd5d | 2398 | |
c7b1dd5d | 2399 | cipher= Colon separated list of supported ciphers. |
bebdc6fb AJ |
2400 | NOTE: some ciphers such as EDH ciphers depend on |
2401 | additional settings. If those settings are | |
2402 | omitted the ciphers may be silently ignored | |
2403 | by the OpenSSL library. | |
c7b1dd5d | 2404 | |
943c5f16 | 2405 | options= Various SSL implementation options. The most important |
c7b1dd5d | 2406 | being: |
7905e7be | 2407 | |
3d96b0e8 | 2408 | NO_SSLv3 Disallow the use of SSLv3 |
1f1f29e8 | 2409 | |
3d96b0e8 | 2410 | NO_TLSv1 Disallow the use of TLSv1.0 |
1f1f29e8 | 2411 | |
3d96b0e8 | 2412 | NO_TLSv1_1 Disallow the use of TLSv1.1 |
1f1f29e8 | 2413 | |
3d96b0e8 | 2414 | NO_TLSv1_2 Disallow the use of TLSv1.2 |
1f1f29e8 | 2415 | |
7905e7be AJ |
2416 | SINGLE_DH_USE |
2417 | Always create a new key when using | |
c7b1dd5d | 2418 | temporary/ephemeral DH key exchanges |
1f1f29e8 | 2419 | |
54fbe371 PM |
2420 | SINGLE_ECDH_USE |
2421 | Enable ephemeral ECDH key exchange. | |
2422 | The adopted curve should be specified | |
2423 | using the tls-dh option. | |
2424 | ||
36092741 | 2425 | NO_TICKET |
1f1f29e8 AJ |
2426 | Disable use of RFC5077 session tickets. |
2427 | Some servers may have problems | |
2428 | understanding the TLS extension due | |
2429 | to ambiguous specification in RFC4507. | |
2430 | ||
943c5f16 HN |
2431 | ALL Enable various bug workarounds |
2432 | suggested as "harmless" by OpenSSL | |
2433 | Be warned that this reduces SSL/TLS | |
2434 | strength to some attacks. | |
7905e7be AJ |
2435 | |
2436 | See the OpenSSL SSL_CTX_set_options documentation for a | |
2437 | more complete list. | |
c7b1dd5d AJ |
2438 | |
2439 | clientca= File containing the list of CAs to use when | |
2440 | requesting a client certificate. | |
2441 | ||
86a84cc0 AJ |
2442 | tls-cafile= PEM file containing CA certificates to use when verifying |
2443 | client certificates. If not configured clientca will be | |
2444 | used. May be repeated to load multiple files. | |
c7b1dd5d AJ |
2445 | |
2446 | capath= Directory containing additional CA certificates | |
2447 | and CRL lists to use when verifying client certificates. | |
86a84cc0 | 2448 | Requires OpenSSL or LibreSSL. |
c7b1dd5d AJ |
2449 | |
2450 | crlfile= File of additional CRL lists to use when verifying | |
2451 | the client certificate, in addition to CRLs stored in | |
2452 | the capath. Implies VERIFY_CRL flag below. | |
2453 | ||
54fbe371 PM |
2454 | tls-dh=[curve:]file |
2455 | File containing DH parameters for temporary/ephemeral DH key | |
2456 | exchanges, optionally prefixed by a curve for ephemeral ECDH | |
2457 | key exchanges. | |
2458 | See OpenSSL documentation for details on how to create the | |
2459 | DH parameter file. Supported curves for ECDH can be listed | |
2460 | using the "openssl ecparam -list_curves" command. | |
2461 | WARNING: EDH and EECDH ciphers will be silently disabled if | |
2462 | this option is not set. | |
c7b1dd5d AJ |
2463 | |
2464 | sslflags= Various flags modifying the use of SSL: | |
2465 | DELAYED_AUTH | |
2466 | Don't request client certificates | |
2467 | immediately, but wait until acl processing | |
2468 | requires a certificate (not yet implemented). | |
983fab6e | 2469 | CONDITIONAL_AUTH |
2470 | Request a client certificate during the TLS | |
2471 | handshake, but ignore certificate absence in | |
2472 | the TLS client Hello. If the client does | |
2473 | supply a certificate, it is validated. | |
c7b1dd5d AJ |
2474 | NO_SESSION_REUSE |
2475 | Don't allow for session reuse. Each connection | |
2476 | will result in a new SSL session. | |
2477 | VERIFY_CRL | |
2478 | Verify CRL lists when accepting client | |
2479 | certificates. | |
2480 | VERIFY_CRL_ALL | |
2481 | Verify CRL lists for all certificates in the | |
2482 | client certificate chain. | |
2483 | ||
435c72b0 AJ |
2484 | tls-default-ca[=off] |
2485 | Whether to use the system Trusted CAs. Default is OFF. | |
8b253b83 | 2486 | |
b05d749d AJ |
2487 | tls-no-npn Do not use the TLS NPN extension to advertise HTTP/1.1. |
2488 | ||
c7b1dd5d AJ |
2489 | sslcontext= SSL session ID context identifier. |
2490 | ||
c7b1dd5d AJ |
2491 | Other Options: |
2492 | ||
6b185b50 | 2493 | connection-auth[=on|off] |
9603207d | 2494 | use connection-auth=off to tell Squid to prevent |
6b185b50 | 2495 | forwarding Microsoft connection oriented authentication |
d67acb4e AJ |
2496 | (NTLM, Negotiate and Kerberos) |
2497 | ||
5b0f5383 | 2498 | disable-pmtu-discovery= |
2499 | Control Path-MTU discovery usage: | |
2500 | off lets OS decide on what to do (default). | |
2501 | transparent disable PMTU discovery when transparent | |
2502 | support is enabled. | |
2503 | always disable always PMTU discovery. | |
2504 | ||
2505 | In many setups of transparently intercepting proxies | |
2506 | Path-MTU discovery can not work on traffic towards the | |
2507 | clients. This is the case when the intercepting device | |
2508 | does not fully track connections and fails to forward | |
2509 | ICMP must fragment messages to the cache server. If you | |
2510 | have such setup and experience that certain clients | |
2511 | sporadically hang or never complete requests set | |
2512 | disable-pmtu-discovery option to 'transparent'. | |
2513 | ||
81b6e9a7 | 2514 | name= Specifies a internal name for the port. Defaults to |
2515 | the port specification (port or addr:port) | |
2516 | ||
68924b6d | 2517 | tcpkeepalive[=idle,interval,timeout] |
fb6c6dbe AJ |
2518 | Enable TCP keepalive probes of idle connections. |
2519 | In seconds; idle is the initial time before TCP starts | |
2520 | probing the connection, interval how often to probe, and | |
b2130d58 | 2521 | timeout the time before giving up. |
2522 | ||
d3d92daa | 2523 | require-proxy-header |
151ba0d4 | 2524 | Require PROXY protocol version 1 or 2 connections. |
70d0ef18 | 2525 | The proxy_protocol_access is required to permit |
151ba0d4 AJ |
2526 | downstream proxies which can be trusted. |
2527 | ||
7d17a6a6 EB |
2528 | worker-queues |
2529 | Ask TCP stack to maintain a dedicated listening queue | |
2530 | for each worker accepting requests at this port. | |
2531 | Requires TCP stack that supports the SO_REUSEPORT socket | |
2532 | option. | |
2533 | ||
2534 | SECURITY WARNING: Enabling worker-specific queues | |
2535 | allows any process running as Squid's effective user to | |
2536 | easily accept requests destined to this port. | |
2537 | ||
5b0f5383 | 2538 | If you run Squid on a dual-homed machine with an internal |
2539 | and an external interface we recommend you to specify the | |
2540 | internal address:port in http_port. This way Squid will only be | |
2541 | visible on the internal address. | |
2542 | ||
47f0eaea | 2543 | CONFIG_START |
e0855596 | 2544 | |
5b0f5383 | 2545 | # Squid normally listens to port 3128 |
2546 | http_port @DEFAULT_HTTP_PORT@ | |
47f0eaea | 2547 | CONFIG_END |
5b0f5383 | 2548 | DOC_END |
2549 | ||
2550 | NAME: https_port | |
339e4d7a | 2551 | IFDEF: USE_GNUTLS||USE_OPENSSL |
65d448bc | 2552 | TYPE: PortCfg |
5b0f5383 | 2553 | DEFAULT: none |
339e4d7a | 2554 | LOC: HttpPortList |
5b0f5383 | 2555 | DOC_START |
51e09c08 | 2556 | Usage: [ip:]port [mode] tls-cert=certificate.pem [options] |
5b0f5383 | 2557 | |
859741ed AJ |
2558 | The socket address where Squid will listen for client requests made |
2559 | over TLS or SSL connections. Commonly referred to as HTTPS. | |
5b0f5383 | 2560 | |
859741ed | 2561 | This is most useful for situations where you are running squid in |
51e09c08 AJ |
2562 | accelerator mode and you want to do the TLS work at the accelerator |
2563 | level. | |
5b0f5383 | 2564 | |
2565 | You may specify multiple socket addresses on multiple lines, | |
9155253a | 2566 | each with their own certificate and/or options. |
5b0f5383 | 2567 | |
51e09c08 | 2568 | The tls-cert= option is mandatory on HTTPS ports. |
379e8c1c | 2569 | |
9155253a | 2570 | See http_port for a list of modes and options. |
5b0f5383 | 2571 | DOC_END |
2572 | ||
434a79b0 DK |
2573 | NAME: ftp_port |
2574 | TYPE: PortCfg | |
2575 | DEFAULT: none | |
8ea0d847 | 2576 | LOC: FtpPortList |
434a79b0 | 2577 | DOC_START |
8a2f40dd AR |
2578 | Enables Native FTP proxy by specifying the socket address where Squid |
2579 | listens for FTP client requests. See http_port directive for various | |
2580 | ways to specify the listening address and mode. | |
2581 | ||
2582 | Usage: ftp_port address [mode] [options] | |
2583 | ||
2584 | WARNING: This is a new, experimental, complex feature that has seen | |
2585 | limited production exposure. Some Squid modules (e.g., caching) do not | |
2586 | currently work with native FTP proxying, and many features have not | |
2587 | even been tested for compatibility. Test well before deploying! | |
2588 | ||
2589 | Native FTP proxying differs substantially from proxying HTTP requests | |
2590 | with ftp:// URIs because Squid works as an FTP server and receives | |
2591 | actual FTP commands (rather than HTTP requests with FTP URLs). | |
2592 | ||
2593 | Native FTP commands accepted at ftp_port are internally converted or | |
2594 | wrapped into HTTP-like messages. The same happens to Native FTP | |
2595 | responses received from FTP origin servers. Those HTTP-like messages | |
2596 | are shoveled through regular access control and adaptation layers | |
2597 | between the FTP client and the FTP origin server. This allows Squid to | |
2598 | examine, adapt, block, and log FTP exchanges. Squid reuses most HTTP | |
2599 | mechanisms when shoveling wrapped FTP messages. For example, | |
2600 | http_access and adaptation_access directives are used. | |
2601 | ||
2602 | Modes: | |
2603 | ||
3cc0f4e7 | 2604 | intercept Same as http_port intercept. The FTP origin address is |
8a2f40dd AR |
2605 | determined based on the intended destination of the |
2606 | intercepted connection. | |
2607 | ||
3cc0f4e7 AR |
2608 | tproxy Support Linux TPROXY for spoofing outgoing |
2609 | connections using the client IP address. | |
2610 | NP: disables authentication and maybe IPv6 on the port. | |
2611 | ||
8a2f40dd AR |
2612 | By default (i.e., without an explicit mode option), Squid extracts the |
2613 | FTP origin address from the login@origin parameter of the FTP USER | |
2614 | command. Many popular FTP clients support such native FTP proxying. | |
2615 | ||
2616 | Options: | |
2617 | ||
3cc0f4e7 AR |
2618 | name=token Specifies an internal name for the port. Defaults to |
2619 | the port address. Usable with myportname ACL. | |
2620 | ||
aea65fec | 2621 | ftp-track-dirs |
8a2f40dd AR |
2622 | Enables tracking of FTP directories by injecting extra |
2623 | PWD commands and adjusting Request-URI (in wrapping | |
2624 | HTTP requests) to reflect the current FTP server | |
aea65fec | 2625 | directory. Tracking is disabled by default. |
8a2f40dd | 2626 | |
3cc0f4e7 AR |
2627 | protocol=FTP Protocol to reconstruct accelerated and intercepted |
2628 | requests with. Defaults to FTP. No other accepted | |
2629 | values have been tested with. An unsupported value | |
2630 | results in a FATAL error. Accepted values are FTP, | |
2631 | HTTP (or HTTP/1.1), and HTTPS (or HTTPS/1.1). | |
2632 | ||
8a2f40dd AR |
2633 | Other http_port modes and options that are not specific to HTTP and |
2634 | HTTPS may also work. | |
2635 | DOC_END | |
434a79b0 | 2636 | |
41bd17a4 | 2637 | NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp |
2638 | TYPE: acl_tos | |
5473c134 | 2639 | DEFAULT: none |
425de4c8 | 2640 | LOC: Ip::Qos::TheConfig.tosToServer |
5473c134 | 2641 | DOC_START |
425de4c8 AJ |
2642 | Allows you to select a TOS/Diffserv value for packets outgoing |
2643 | on the server side, based on an ACL. | |
5473c134 | 2644 | |
41bd17a4 | 2645 | tcp_outgoing_tos ds-field [!]aclname ... |
cccac0a2 | 2646 | |
41bd17a4 | 2647 | Example where normal_service_net uses the TOS value 0x00 |
7def7206 | 2648 | and good_service_net uses 0x20 |
cccac0a2 | 2649 | |
864a62b5 AJ |
2650 | acl normal_service_net src 10.0.0.0/24 |
2651 | acl good_service_net src 10.0.1.0/24 | |
2c73de90 | 2652 | tcp_outgoing_tos 0x00 normal_service_net |
41bd17a4 | 2653 | tcp_outgoing_tos 0x20 good_service_net |
fa38076e | 2654 | |
41bd17a4 | 2655 | TOS/DSCP values really only have local significance - so you should |
575cb927 AJ |
2656 | know what you're specifying. For more information, see RFC2474, |
2657 | RFC2475, and RFC3260. | |
cccac0a2 | 2658 | |
41bd17a4 | 2659 | The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or |
5f53baab SM |
2660 | "default" to use whatever default your host has. |
2661 | Note that only multiples of 4 are usable as the two rightmost bits have | |
2662 | been redefined for use by ECN (RFC 3168 section 23.1). | |
2663 | The squid parser will enforce this by masking away the ECN bits. | |
cccac0a2 | 2664 | |
41bd17a4 | 2665 | Processing proceeds in the order specified, and stops at first fully |
2666 | matching line. | |
c6f168c1 CT |
2667 | |
2668 | Only fast ACLs are supported. | |
cccac0a2 | 2669 | DOC_END |
2670 | ||
41bd17a4 | 2671 | NAME: clientside_tos |
2672 | TYPE: acl_tos | |
cccac0a2 | 2673 | DEFAULT: none |
425de4c8 AJ |
2674 | LOC: Ip::Qos::TheConfig.tosToClient |
2675 | DOC_START | |
5f53baab | 2676 | Allows you to select a TOS/DSCP value for packets being transmitted |
425de4c8 AJ |
2677 | on the client-side, based on an ACL. |
2678 | ||
2679 | clientside_tos ds-field [!]aclname ... | |
2680 | ||
2681 | Example where normal_service_net uses the TOS value 0x00 | |
2682 | and good_service_net uses 0x20 | |
2683 | ||
2684 | acl normal_service_net src 10.0.0.0/24 | |
2685 | acl good_service_net src 10.0.1.0/24 | |
2686 | clientside_tos 0x00 normal_service_net | |
2687 | clientside_tos 0x20 good_service_net | |
2688 | ||
2689 | Note: This feature is incompatible with qos_flows. Any TOS values set here | |
2690 | will be overwritten by TOS values in qos_flows. | |
5f53baab SM |
2691 | |
2692 | The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or | |
2693 | "default" to use whatever default your host has. | |
2694 | Note that only multiples of 4 are usable as the two rightmost bits have | |
2695 | been redefined for use by ECN (RFC 3168 section 23.1). | |
2696 | The squid parser will enforce this by masking away the ECN bits. | |
2697 | ||
83a846a3 | 2698 | This clause only supports fast acl types. |
7409131e | 2699 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
425de4c8 AJ |
2700 | DOC_END |
2701 | ||
2702 | NAME: tcp_outgoing_mark | |
2703 | TYPE: acl_nfmark | |
11e8cfe3 | 2704 | IFDEF: SO_MARK&&USE_LIBCAP |
425de4c8 AJ |
2705 | DEFAULT: none |
2706 | LOC: Ip::Qos::TheConfig.nfmarkToServer | |
2707 | DOC_START | |
2708 | Allows you to apply a Netfilter mark value to outgoing packets | |
2709 | on the server side, based on an ACL. | |
2710 | ||
2711 | tcp_outgoing_mark mark-value [!]aclname ... | |
2712 | ||
2713 | Example where normal_service_net uses the mark value 0x00 | |
2714 | and good_service_net uses 0x20 | |
2715 | ||
2716 | acl normal_service_net src 10.0.0.0/24 | |
2717 | acl good_service_net src 10.0.1.0/24 | |
2718 | tcp_outgoing_mark 0x00 normal_service_net | |
2719 | tcp_outgoing_mark 0x20 good_service_net | |
c6f168c1 CT |
2720 | |
2721 | Only fast ACLs are supported. | |
425de4c8 AJ |
2722 | DOC_END |
2723 | ||
244da4ad | 2724 | NAME: mark_client_packet clientside_mark |
425de4c8 | 2725 | TYPE: acl_nfmark |
11e8cfe3 | 2726 | IFDEF: SO_MARK&&USE_LIBCAP |
425de4c8 AJ |
2727 | DEFAULT: none |
2728 | LOC: Ip::Qos::TheConfig.nfmarkToClient | |
cccac0a2 | 2729 | DOC_START |
244da4ad | 2730 | Allows you to apply a Netfilter MARK value to packets being transmitted |
425de4c8 AJ |
2731 | on the client-side, based on an ACL. |
2732 | ||
244da4ad | 2733 | mark_client_packet mark-value [!]aclname ... |
425de4c8 | 2734 | |
244da4ad | 2735 | Example where normal_service_net uses the MARK value 0x00 |
425de4c8 AJ |
2736 | and good_service_net uses 0x20 |
2737 | ||
2738 | acl normal_service_net src 10.0.0.0/24 | |
2739 | acl good_service_net src 10.0.1.0/24 | |
244da4ad AG |
2740 | mark_client_packet 0x00 normal_service_net |
2741 | mark_client_packet 0x20 good_service_net | |
425de4c8 AJ |
2742 | |
2743 | Note: This feature is incompatible with qos_flows. Any mark values set here | |
2744 | will be overwritten by mark values in qos_flows. | |
83a846a3 AR |
2745 | |
2746 | This clause only supports fast acl types. | |
7409131e | 2747 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
41bd17a4 | 2748 | DOC_END |
cccac0a2 | 2749 | |
244da4ad AG |
2750 | NAME: mark_client_connection |
2751 | TYPE: acl_nfmark | |
2752 | IFDEF: SO_MARK&&USE_LIBCAP | |
2753 | DEFAULT: none | |
2754 | LOC: Ip::Qos::TheConfig.nfConnmarkToClient | |
2755 | DOC_START | |
2756 | Allows you to apply a Netfilter CONNMARK value to a connection | |
2757 | on the client-side, based on an ACL. | |
2758 | ||
2759 | mark_client_connection mark-value[/mask] [!]aclname ... | |
2760 | ||
2761 | The mark-value and mask are unsigned integers (hex, octal, or decimal). | |
2762 | The mask may be used to preserve marking previously set by other agents | |
2763 | (e.g., iptables). | |
2764 | ||
2765 | A matching rule replaces the CONNMARK value. If a mask is also | |
2766 | specified, then the masked bits of the original value are zeroed, and | |
2767 | the configured mark-value is ORed with that adjusted value. | |
2768 | For example, applying a mark-value 0xAB/0xF to 0x5F CONNMARK, results | |
2769 | in a 0xFB marking (rather than a 0xAB or 0x5B). | |
2770 | ||
2771 | This directive semantics is similar to iptables --set-mark rather than | |
2772 | --set-xmark functionality. | |
2773 | ||
2774 | The directive does not interfere with qos_flows (which uses packet MARKs, | |
2775 | not CONNMARKs). | |
2776 | ||
2777 | Example where squid marks intercepted FTP connections: | |
2778 | ||
2779 | acl proto_ftp proto FTP | |
2780 | mark_client_connection 0x200/0xff00 proto_ftp | |
2781 | ||
2782 | This clause only supports fast acl types. | |
7409131e | 2783 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
244da4ad AG |
2784 | DOC_END |
2785 | ||
575cb927 AJ |
2786 | NAME: qos_flows |
2787 | TYPE: QosConfig | |
425de4c8 | 2788 | IFDEF: USE_QOS_TOS |
575cb927 | 2789 | DEFAULT: none |
b7ac5457 | 2790 | LOC: Ip::Qos::TheConfig |
7172612f | 2791 | DOC_START |
575cb927 | 2792 | Allows you to select a TOS/DSCP value to mark outgoing |
196a7776 AB |
2793 | connections to the client, based on where the reply was sourced. |
2794 | For platforms using netfilter, allows you to set a netfilter mark | |
425de4c8 | 2795 | value instead of, or in addition to, a TOS value. |
7172612f | 2796 | |
196a7776 AB |
2797 | By default this functionality is disabled. To enable it with the default |
2798 | settings simply use "qos_flows mark" or "qos_flows tos". Default | |
2799 | settings will result in the netfilter mark or TOS value being copied | |
2800 | from the upstream connection to the client. Note that it is the connection | |
2801 | CONNMARK value not the packet MARK value that is copied. | |
2802 | ||
2803 | It is not currently possible to copy the mark or TOS value from the | |
2804 | client to the upstream connection request. | |
2805 | ||
575cb927 AJ |
2806 | TOS values really only have local significance - so you should |
2807 | know what you're specifying. For more information, see RFC2474, | |
2808 | RFC2475, and RFC3260. | |
7172612f | 2809 | |
5f53baab SM |
2810 | The TOS/DSCP byte must be exactly that - a octet value 0 - 255. |
2811 | Note that only multiples of 4 are usable as the two rightmost bits have | |
2812 | been redefined for use by ECN (RFC 3168 section 23.1). | |
2813 | The squid parser will enforce this by masking away the ECN bits. | |
425de4c8 AJ |
2814 | |
2815 | Mark values can be any unsigned 32-bit integer value. | |
7172612f | 2816 | |
425de4c8 AJ |
2817 | This setting is configured by setting the following values: |
2818 | ||
2819 | tos|mark Whether to set TOS or netfilter mark values | |
575cb927 AJ |
2820 | |
2821 | local-hit=0xFF Value to mark local cache hits. | |
2822 | ||
2823 | sibling-hit=0xFF Value to mark hits from sibling peers. | |
2824 | ||
2825 | parent-hit=0xFF Value to mark hits from parent peers. | |
2826 | ||
a29d2a95 AB |
2827 | miss=0xFF[/mask] Value to mark cache misses. Takes precedence |
2828 | over the preserve-miss feature (see below), unless | |
2829 | mask is specified, in which case only the bits | |
2830 | specified in the mask are written. | |
575cb927 | 2831 | |
425de4c8 AJ |
2832 | The TOS variant of the following features are only possible on Linux |
2833 | and require your kernel to be patched with the TOS preserving ZPH | |
2834 | patch, available from http://zph.bratcheda.org | |
2835 | No patch is needed to preserve the netfilter mark, which will work | |
2836 | with all variants of netfilter. | |
575cb927 | 2837 | |
575cb927 | 2838 | disable-preserve-miss |
425de4c8 AJ |
2839 | This option disables the preservation of the TOS or netfilter |
2840 | mark. By default, the existing TOS or netfilter mark value of | |
2841 | the response coming from the remote server will be retained | |
2842 | and masked with miss-mark. | |
2843 | NOTE: in the case of a netfilter mark, the mark must be set on | |
2844 | the connection (using the CONNMARK target) not on the packet | |
2845 | (MARK target). | |
575cb927 AJ |
2846 | |
2847 | miss-mask=0xFF | |
425de4c8 AJ |
2848 | Allows you to mask certain bits in the TOS or mark value |
2849 | received from the remote server, before copying the value to | |
2850 | the TOS sent towards clients. | |
2851 | Default for tos: 0xFF (TOS from server is not changed). | |
2852 | Default for mark: 0xFFFFFFFF (mark from server is not changed). | |
2853 | ||
2854 | All of these features require the --enable-zph-qos compilation flag | |
2855 | (enabled by default). Netfilter marking also requires the | |
2856 | libnetfilter_conntrack libraries (--with-netfilter-conntrack) and | |
2857 | libcap 2.09+ (--with-libcap). | |
7172612f | 2858 | |
7172612f AJ |
2859 | DOC_END |
2860 | ||
41bd17a4 | 2861 | NAME: tcp_outgoing_address |
2862 | TYPE: acl_address | |
2863 | DEFAULT: none | |
638402dd | 2864 | DEFAULT_DOC: Address selection is performed by the operating system. |
41bd17a4 | 2865 | LOC: Config.accessList.outgoing_address |
2866 | DOC_START | |
2867 | Allows you to map requests to different outgoing IP addresses | |
2868 | based on the username or source address of the user making | |
2869 | the request. | |
7f7db318 | 2870 | |
41bd17a4 | 2871 | tcp_outgoing_address ipaddr [[!]aclname] ... |
c33aa074 | 2872 | |
2dd51400 AJ |
2873 | For example; |
2874 | Forwarding clients with dedicated IPs for certain subnets. | |
9197cd13 | 2875 | |
2dd51400 AJ |
2876 | acl normal_service_net src 10.0.0.0/24 |
2877 | acl good_service_net src 10.0.2.0/24 | |
2878 | ||
2879 | tcp_outgoing_address 2001:db8::c001 good_service_net | |
2880 | tcp_outgoing_address 10.1.0.2 good_service_net | |
2881 | ||
2882 | tcp_outgoing_address 2001:db8::beef normal_service_net | |
2883 | tcp_outgoing_address 10.1.0.1 normal_service_net | |
2884 | ||
2885 | tcp_outgoing_address 2001:db8::1 | |
2886 | tcp_outgoing_address 10.1.0.3 | |
9197cd13 | 2887 | |
41bd17a4 | 2888 | Processing proceeds in the order specified, and stops at first fully |
2889 | matching line. | |
cccac0a2 | 2890 | |
2dd51400 AJ |
2891 | Squid will add an implicit IP version test to each line. |
2892 | Requests going to IPv4 websites will use the outgoing 10.1.0.* addresses. | |
2893 | Requests going to IPv6 websites will use the outgoing 2001:db8:* addresses. | |
2894 | ||
2895 | ||
2896 | NOTE: The use of this directive using client dependent ACLs is | |
41bd17a4 | 2897 | incompatible with the use of server side persistent connections. To |
2898 | ensure correct results it is best to set server_persistent_connections | |
2899 | to off when using this directive in such configurations. | |
cc192b50 | 2900 | |
2dd51400 | 2901 | NOTE: The use of this directive to set a local IP on outgoing TCP links |
4ed968be | 2902 | is incompatible with using TPROXY to set client IP out outbound TCP links. |
2dd51400 AJ |
2903 | When needing to contact peers use the no-tproxy cache_peer option and the |
2904 | client_dst_passthru directive re-enable normal forwarding such as this. | |
cc192b50 | 2905 | |
83a846a3 | 2906 | This clause only supports fast acl types. |
7409131e | 2907 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
cccac0a2 | 2908 | DOC_END |
6db78a1a | 2909 | |
90529125 AJ |
2910 | NAME: host_verify_strict |
2911 | TYPE: onoff | |
2912 | DEFAULT: off | |
2913 | LOC: Config.onoff.hostStrictVerify | |
2914 | DOC_START | |
d8821934 AR |
2915 | Regardless of this option setting, when dealing with intercepted |
2916 | traffic, Squid always verifies that the destination IP address matches | |
2962f8b8 | 2917 | the Host header domain or IP (called 'authority form URL'). |
9603207d | 2918 | |
d8821934 AR |
2919 | This enforcement is performed to satisfy a MUST-level requirement in |
2920 | RFC 2616 section 14.23: "The Host field value MUST represent the naming | |
2921 | authority of the origin server or gateway given by the original URL". | |
9603207d | 2922 | |
2962f8b8 AJ |
2923 | When set to ON: |
2924 | Squid always responds with an HTTP 409 (Conflict) error | |
2925 | page and logs a security warning if there is no match. | |
9603207d | 2926 | |
2962f8b8 AJ |
2927 | Squid verifies that the destination IP address matches |
2928 | the Host header for forward-proxy and reverse-proxy traffic | |
2929 | as well. For those traffic types, Squid also enables the | |
2930 | following checks, comparing the corresponding Host header | |
2931 | and Request-URI components: | |
9603207d | 2932 | |
2962f8b8 AJ |
2933 | * The host names (domain or IP) must be identical, |
2934 | but valueless or missing Host header disables all checks. | |
2935 | For the two host names to match, both must be either IP | |
2936 | or FQDN. | |
9603207d | 2937 | |
2962f8b8 AJ |
2938 | * Port numbers must be identical, but if a port is missing |
2939 | the scheme-default port is assumed. | |
9603207d | 2940 | |
2941 | ||
2962f8b8 AJ |
2942 | When set to OFF (the default): |
2943 | Squid allows suspicious requests to continue but logs a | |
2944 | security warning and blocks caching of the response. | |
9603207d | 2945 | |
2962f8b8 | 2946 | * Forward-proxy traffic is not checked at all. |
9603207d | 2947 | |
2962f8b8 | 2948 | * Reverse-proxy traffic is not checked at all. |
9603207d | 2949 | |
2962f8b8 | 2950 | * Intercepted traffic which passes verification is handled |
32c32865 | 2951 | according to client_dst_passthru. |
9603207d | 2952 | |
7177edfb AJ |
2953 | * Intercepted requests which fail verification are sent |
2954 | to the client original destination instead of DIRECT. | |
2955 | This overrides 'client_dst_passthru off'. | |
9603207d | 2956 | |
2962f8b8 AJ |
2957 | For now suspicious intercepted CONNECT requests are always |
2958 | responded to with an HTTP 409 (Conflict) error page. | |
9603207d | 2959 | |
2960 | ||
7177edfb | 2961 | SECURITY NOTE: |
9603207d | 2962 | |
bfe4e2fe AJ |
2963 | As described in CVE-2009-0801 when the Host: header alone is used |
2964 | to determine the destination of a request it becomes trivial for | |
2965 | malicious scripts on remote websites to bypass browser same-origin | |
2966 | security policy and sandboxing protections. | |
9603207d | 2967 | |
bfe4e2fe AJ |
2968 | The cause of this is that such applets are allowed to perform their |
2969 | own HTTP stack, in which case the same-origin policy of the browser | |
2970 | sandbox only verifies that the applet tries to contact the same IP | |
2971 | as from where it was loaded at the IP level. The Host: header may | |
2972 | be different from the connected IP and approved origin. | |
9603207d | 2973 | |
7177edfb | 2974 | DOC_END |
6b185b50 | 2975 | |
7177edfb AJ |
2976 | NAME: client_dst_passthru |
2977 | TYPE: onoff | |
2978 | DEFAULT: on | |
2979 | LOC: Config.onoff.client_dst_passthru | |
2980 | DOC_START | |
2981 | With NAT or TPROXY intercepted traffic Squid may pass the request | |
2982 | directly to the original client destination IP or seek a faster | |
2983 | source using the HTTP Host header. | |
9603207d | 2984 | |
7177edfb AJ |
2985 | Using Host to locate alternative servers can provide faster |
2986 | connectivity with a range of failure recovery options. | |
2987 | But can also lead to connectivity trouble when the client and | |
2988 | server are attempting stateful interactions unaware of the proxy. | |
9603207d | 2989 | |
7177edfb AJ |
2990 | This option (on by default) prevents alternative DNS entries being |
2991 | located to send intercepted traffic DIRECT to an origin server. | |
2992 | The clients original destination IP and port will be used instead. | |
9603207d | 2993 | |
7177edfb AJ |
2994 | Regardless of this option setting, when dealing with intercepted |
2995 | traffic Squid will verify the Host: header and any traffic which | |
2996 | fails Host verification will be treated as if this option were ON. | |
9603207d | 2997 | |
7177edfb | 2998 | see host_verify_strict for details on the verification process. |
cccac0a2 | 2999 | DOC_END |
3000 | ||
195f8adb AJ |
3001 | COMMENT_START |
3002 | TLS OPTIONS | |
3003 | ----------------------------------------------------------------------------- | |
3004 | COMMENT_END | |
3005 | ||
3006 | NAME: tls_outgoing_options | |
3007 | IFDEF: USE_GNUTLS||USE_OPENSSL | |
3008 | TYPE: securePeerOptions | |
2fbb02b1 | 3009 | DEFAULT: min-version=1.0 |
7e62a74f | 3010 | LOC: Security::ProxyOutgoingConfig |
195f8adb AJ |
3011 | DOC_START |
3012 | disable Do not support https:// URLs. | |
9603207d | 3013 | |
195f8adb | 3014 | cert=/path/to/client/certificate |
51e09c08 | 3015 | A client X.509 certificate to use when connecting. |
9603207d | 3016 | |
195f8adb | 3017 | key=/path/to/client/private_key |
51e09c08 AJ |
3018 | The private key corresponding to the cert= above. |
3019 | ||
3020 | If key= is not specified cert= is assumed to | |
3021 | reference a PEM file containing both the certificate | |
3022 | and private key. | |
9603207d | 3023 | |
195f8adb | 3024 | cipher=... The list of valid TLS ciphers to use. |
1cc44095 AJ |
3025 | |
3026 | min-version=1.N | |
2fbb02b1 AJ |
3027 | The minimum TLS protocol version to permit. |
3028 | To control SSLv3 use the options= parameter. | |
d39e23a0 | 3029 | Supported Values: 1.0 (default), 1.1, 1.2, 1.3 |
1cc44095 | 3030 | |
3f5b28fe | 3031 | options=... Specify various TLS/SSL implementation options. |
195f8adb | 3032 | |
3f5b28fe | 3033 | OpenSSL options most important are: |
7905e7be | 3034 | |
3f5b28fe | 3035 | NO_SSLv3 Disallow the use of SSLv3 |
7905e7be | 3036 | |
195f8adb AJ |
3037 | SINGLE_DH_USE |
3038 | Always create a new key when using | |
3039 | temporary/ephemeral DH key exchanges | |
7905e7be | 3040 | |
ce0adf1a | 3041 | NO_TICKET |
7905e7be AJ |
3042 | Disable use of RFC5077 session tickets. |
3043 | Some servers may have problems | |
3044 | understanding the TLS extension due | |
3045 | to ambiguous specification in RFC4507. | |
3046 | ||
195f8adb AJ |
3047 | ALL Enable various bug workarounds |
3048 | suggested as "harmless" by OpenSSL | |
7905e7be | 3049 | Be warned that this reduces SSL/TLS |
195f8adb AJ |
3050 | strength to some attacks. |
3051 | ||
3f5b28fe AJ |
3052 | See the OpenSSL SSL_CTX_set_options documentation |
3053 | for a more complete list. | |
3054 | ||
3055 | GnuTLS options most important are: | |
3056 | ||
3057 | %NO_TICKETS | |
3058 | Disable use of RFC5077 session tickets. | |
3059 | Some servers may have problems | |
3060 | understanding the TLS extension due | |
3061 | to ambiguous specification in RFC4507. | |
3062 | ||
3063 | See the GnuTLS Priority Strings documentation | |
3064 | for a more complete list. | |
3065 | http://www.gnutls.org/manual/gnutls.html#Priority-Strings | |
3066 | ||
9603207d | 3067 | |
86a84cc0 AJ |
3068 | cafile= PEM file containing CA certificates to use when verifying |
3069 | the peer certificate. May be repeated to load multiple files. | |
3070 | ||
3071 | capath= A directory containing additional CA certificates to | |
195f8adb | 3072 | use when verifying the peer certificate. |
86a84cc0 | 3073 | Requires OpenSSL or LibreSSL. |
9603207d | 3074 | |
195f8adb AJ |
3075 | crlfile=... A certificate revocation list file to use when |
3076 | verifying the peer certificate. | |
9603207d | 3077 | |
195f8adb | 3078 | flags=... Specify various flags modifying the TLS implementation: |
9603207d | 3079 | |
195f8adb AJ |
3080 | DONT_VERIFY_PEER |
3081 | Accept certificates even if they fail to | |
3082 | verify. | |
195f8adb AJ |
3083 | DONT_VERIFY_DOMAIN |
3084 | Don't verify the peer certificate | |
3085 | matches the server name | |
9603207d | 3086 | |
435c72b0 AJ |
3087 | default-ca[=off] |
3088 | Whether to use the system Trusted CAs. Default is ON. | |
9603207d | 3089 | |
195f8adb AJ |
3090 | domain= The peer name as advertised in its certificate. |
3091 | Used for verifying the correctness of the received peer | |
3092 | certificate. If not specified the peer hostname will be | |
3093 | used. | |
3094 | DOC_END | |
3095 | ||
41bd17a4 | 3096 | COMMENT_START |
3097 | SSL OPTIONS | |
3098 | ----------------------------------------------------------------------------- | |
3099 | COMMENT_END | |
3100 | ||
3101 | NAME: ssl_unclean_shutdown | |
cb4f4424 | 3102 | IFDEF: USE_OPENSSL |
cccac0a2 | 3103 | TYPE: onoff |
3104 | DEFAULT: off | |
41bd17a4 | 3105 | LOC: Config.SSL.unclean_shutdown |
cccac0a2 | 3106 | DOC_START |
41bd17a4 | 3107 | Some browsers (especially MSIE) bugs out on SSL shutdown |
3108 | messages. | |
cccac0a2 | 3109 | DOC_END |
3110 | ||
41bd17a4 | 3111 | NAME: ssl_engine |
cb4f4424 | 3112 | IFDEF: USE_OPENSSL |
cccac0a2 | 3113 | TYPE: string |
41bd17a4 | 3114 | LOC: Config.SSL.ssl_engine |
3115 | DEFAULT: none | |
cccac0a2 | 3116 | DOC_START |
41bd17a4 | 3117 | The OpenSSL engine to use. You will need to set this if you |
3118 | would like to use hardware SSL acceleration for example. | |
742236c7 | 3119 | |
911833fc | 3120 | Not supported in builds with OpenSSL 3.0 or newer. |
cccac0a2 | 3121 | DOC_END |
3122 | ||
10a69fc0 | 3123 | NAME: sslproxy_session_ttl |
cb4f4424 | 3124 | IFDEF: USE_OPENSSL |
10a69fc0 CT |
3125 | DEFAULT: 300 |
3126 | LOC: Config.SSL.session_ttl | |
3127 | TYPE: int | |
3128 | DOC_START | |
3129 | Sets the timeout value for SSL sessions | |
3130 | DOC_END | |
3131 | ||
3132 | NAME: sslproxy_session_cache_size | |
cb4f4424 | 3133 | IFDEF: USE_OPENSSL |
10a69fc0 CT |
3134 | DEFAULT: 2 MB |
3135 | LOC: Config.SSL.sessionCacheSize | |
3136 | TYPE: b_size_t | |
3137 | DOC_START | |
3138 | Sets the cache size to use for ssl session | |
3139 | DOC_END | |
3140 | ||
866be11c CT |
3141 | NAME: sslproxy_foreign_intermediate_certs |
3142 | IFDEF: USE_OPENSSL | |
3143 | DEFAULT: none | |
3144 | LOC: Config.ssl_client.foreignIntermediateCertsPath | |
3145 | TYPE: string | |
3146 | DOC_START | |
3147 | Many origin servers fail to send their full server certificate | |
3148 | chain for verification, assuming the client already has or can | |
3149 | easily locate any missing intermediate certificates. | |
3150 | ||
3151 | Squid uses the certificates from the specified file to fill in | |
3152 | these missing chains when trying to validate origin server | |
3153 | certificate chains. | |
3154 | ||
3155 | The file is expected to contain zero or more PEM-encoded | |
3156 | intermediate certificates. These certificates are not treated | |
3157 | as trusted root certificates, and any self-signed certificate in | |
3158 | this file will be ignored. | |
866be11c CT |
3159 | DOC_END |
3160 | ||
3c26b00a CT |
3161 | NAME: sslproxy_cert_sign_hash |
3162 | IFDEF: USE_OPENSSL | |
3163 | DEFAULT: none | |
3164 | LOC: Config.SSL.certSignHash | |
3165 | TYPE: string | |
3166 | DOC_START | |
3167 | Sets the hashing algorithm to use when signing generated certificates. | |
3168 | Valid algorithm names depend on the OpenSSL library used. The following | |
3169 | names are usually available: sha1, sha256, sha512, and md5. Please see | |
3170 | your OpenSSL library manual for the available hashes. By default, Squids | |
3171 | that support this option use sha256 hashes. | |
3172 | ||
3173 | Squid does not forcefully purge cached certificates that were generated | |
3174 | with an algorithm other than the currently configured one. They remain | |
3175 | in the cache, subject to the regular cache eviction policy, and become | |
3176 | useful if the algorithm changes again. | |
3177 | DOC_END | |
3178 | ||
4c9da963 | 3179 | NAME: ssl_bump |
cb4f4424 | 3180 | IFDEF: USE_OPENSSL |
caf3666d | 3181 | TYPE: sslproxy_ssl_bump |
4c9da963 | 3182 | LOC: Config.accessList.ssl_bump |
8f165829 | 3183 | DEFAULT_DOC: Become a TCP tunnel without decrypting proxied traffic. |
4c9da963 | 3184 | DEFAULT: none |
3185 | DOC_START | |
caf3666d AR |
3186 | This option is consulted when a CONNECT request is received on |
3187 | an http_port (or a new connection is intercepted at an | |
3188 | https_port), provided that port was configured with an ssl-bump | |
3189 | flag. The subsequent data on the connection is either treated as | |
3190 | HTTPS and decrypted OR tunneled at TCP level without decryption, | |
8f165829 AR |
3191 | depending on the first matching bumping "action". |
3192 | ||
3193 | ssl_bump <action> [!]acl ... | |
caf3666d | 3194 | |
8f165829 | 3195 | The following bumping actions are currently supported: |
caf3666d | 3196 | |
5d65362c | 3197 | splice |
8f165829 AR |
3198 | Become a TCP tunnel without decrypting proxied traffic. |
3199 | This is the default action. | |
5d65362c CT |
3200 | |
3201 | bump | |
6e0516b3 CT |
3202 | When used on step SslBump1, establishes a secure connection |
3203 | with the client first, then connect to the server. | |
3204 | When used on step SslBump2 or SslBump3, establishes a secure | |
3205 | connection with the server and, using a mimicked server | |
3206 | certificate, with the client. | |
caf3666d | 3207 | |
5d65362c | 3208 | peek |
1110989a | 3209 | Receive client (step SslBump1) or server (step SslBump2) |
8f165829 AR |
3210 | certificate while preserving the possibility of splicing the |
3211 | connection. Peeking at the server certificate (during step 2) | |
3212 | usually precludes bumping of the connection at step 3. | |
caf3666d | 3213 | |
5d65362c | 3214 | stare |
1110989a | 3215 | Receive client (step SslBump1) or server (step SslBump2) |
8f165829 AR |
3216 | certificate while preserving the possibility of bumping the |
3217 | connection. Staring at the server certificate (during step 2) | |
3218 | usually precludes splicing of the connection at step 3. | |
5d65362c CT |
3219 | |
3220 | terminate | |
3221 | Close client and server connections. | |
3222 | ||
1110989a | 3223 | Backward compatibility actions available at step SslBump1: |
caf3666d AR |
3224 | |
3225 | client-first | |
8f165829 AR |
3226 | Bump the connection. Establish a secure connection with the |
3227 | client first, then connect to the server. This old mode does | |
3228 | not allow Squid to mimic server SSL certificate and does not | |
3229 | work with intercepted SSL connections. | |
caf3666d AR |
3230 | |
3231 | server-first | |
8f165829 AR |
3232 | Bump the connection. Establish a secure connection with the |
3233 | server first, then establish a secure connection with the | |
3234 | client, using a mimicked server certificate. Works with both | |
3235 | CONNECT requests and intercepted SSL connections, but does | |
3236 | not allow to make decisions based on SSL handshake info. | |
caf3666d | 3237 | |
8f165829 | 3238 | peek-and-splice |
9603207d | 3239 | Decide whether to bump or splice the connection based on |
d620ae0e | 3240 | client-to-squid and server-to-squid SSL hello messages. |
8f165829 | 3241 | XXX: Remove. |
caf3666d | 3242 | |
caf3666d | 3243 | none |
8f165829 | 3244 | Same as the "splice" action. |
caf3666d | 3245 | |
8f165829 AR |
3246 | All ssl_bump rules are evaluated at each of the supported bumping |
3247 | steps. Rules with actions that are impossible at the current step are | |
3248 | ignored. The first matching ssl_bump action wins and is applied at the | |
3249 | end of the current step. If no rules match, the splice action is used. | |
652fcffd | 3250 | See the at_step ACL for a list of the supported SslBump steps. |
4c9da963 | 3251 | |
e0c0d54c | 3252 | This clause supports both fast and slow acl types. |
7409131e | 3253 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
e0855596 | 3254 | |
652fcffd | 3255 | See also: http_port ssl-bump, https_port ssl-bump, and acl at_step. |
caf3666d | 3256 | |
e0855596 | 3257 | |
f3fece95 | 3258 | # Example: Bump all TLS connections except those originating from |
638402dd | 3259 | # localhost or those going to example.com. |
e0855596 | 3260 | |
f3fece95 | 3261 | acl broken_sites ssl::server_name .example.com |
8f165829 AR |
3262 | ssl_bump splice localhost |
3263 | ssl_bump splice broken_sites | |
3264 | ssl_bump bump all | |
4c9da963 | 3265 | DOC_END |
3266 | ||
4c9da963 | 3267 | NAME: sslproxy_cert_error |
cb4f4424 | 3268 | IFDEF: USE_OPENSSL |
4c9da963 | 3269 | DEFAULT: none |
638402dd | 3270 | DEFAULT_DOC: Server certificate errors terminate the transaction. |
4c9da963 | 3271 | LOC: Config.ssl_client.cert_error |
3272 | TYPE: acl_access | |
3273 | DOC_START | |
3274 | Use this ACL to bypass server certificate validation errors. | |
3275 | ||
3276 | For example, the following lines will bypass all validation errors | |
3b8f558c | 3277 | when talking to servers for example.com. All other |
4c9da963 | 3278 | validation errors will result in ERR_SECURE_CONNECT_FAIL error. |
3279 | ||
a87bfd3b AR |
3280 | acl BrokenButTrustedServers dstdomain example.com |
3281 | sslproxy_cert_error allow BrokenButTrustedServers | |
4c9da963 | 3282 | sslproxy_cert_error deny all |
3283 | ||
b3567eb5 | 3284 | This clause only supports fast acl types. |
7409131e | 3285 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
b3567eb5 | 3286 | Using slow acl types may result in server crashes |
4c9da963 | 3287 | |
3288 | Without this option, all server certificate validation errors | |
638402dd | 3289 | terminate the transaction to protect Squid and the client. |
4c9da963 | 3290 | |
0ad3ff51 CT |
3291 | SQUID_X509_V_ERR_INFINITE_VALIDATION error cannot be bypassed |
3292 | but should not happen unless your OpenSSL library is buggy. | |
3293 | ||
638402dd AJ |
3294 | SECURITY WARNING: |
3295 | Bypassing validation errors is dangerous because an | |
3296 | error usually implies that the server cannot be trusted | |
3297 | and the connection may be insecure. | |
4c9da963 | 3298 | |
638402dd | 3299 | See also: sslproxy_flags and DONT_VERIFY_PEER. |
4c9da963 | 3300 | DOC_END |
3301 | ||
aebe6888 | 3302 | NAME: sslproxy_cert_sign |
cb4f4424 | 3303 | IFDEF: USE_OPENSSL |
aebe6888 | 3304 | DEFAULT: none |
10d914f6 CT |
3305 | POSTSCRIPTUM: signUntrusted ssl::certUntrusted |
3306 | POSTSCRIPTUM: signSelf ssl::certSelfSigned | |
3307 | POSTSCRIPTUM: signTrusted all | |
aebe6888 CT |
3308 | TYPE: sslproxy_cert_sign |
3309 | LOC: Config.ssl_client.cert_sign | |
3310 | DOC_START | |
3311 | ||
69742b76 | 3312 | sslproxy_cert_sign <signing algorithm> acl ... |
aebe6888 | 3313 | |
69742b76 | 3314 | The following certificate signing algorithms are supported: |
638402dd | 3315 | |
aebe6888 | 3316 | signTrusted |
69742b76 AR |
3317 | Sign using the configured CA certificate which is usually |
3318 | placed in and trusted by end-user browsers. This is the | |
3319 | default for trusted origin server certificates. | |
638402dd | 3320 | |
aebe6888 | 3321 | signUntrusted |
69742b76 AR |
3322 | Sign to guarantee an X509_V_ERR_CERT_UNTRUSTED browser error. |
3323 | This is the default for untrusted origin server certificates | |
3324 | that are not self-signed (see ssl::certUntrusted). | |
638402dd | 3325 | |
aebe6888 | 3326 | signSelf |
69742b76 | 3327 | Sign using a self-signed certificate with the right CN to |
aebe6888 | 3328 | generate a X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT error in the |
69742b76 AR |
3329 | browser. This is the default for self-signed origin server |
3330 | certificates (see ssl::certSelfSigned). | |
aebe6888 | 3331 | |
cf1c09f6 CT |
3332 | This clause only supports fast acl types. |
3333 | ||
69742b76 AR |
3334 | When sslproxy_cert_sign acl(s) match, Squid uses the corresponding |
3335 | signing algorithm to generate the certificate and ignores all | |
3336 | subsequent sslproxy_cert_sign options (the first match wins). If no | |
3337 | acl(s) match, the default signing algorithm is determined by errors | |
3338 | detected when obtaining and validating the origin server certificate. | |
cf1c09f6 | 3339 | |
4b0d23b7 CT |
3340 | WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can |
3341 | be used with sslproxy_cert_adapt, but if and only if Squid is bumping a | |
3342 | CONNECT request that carries a domain name. In all other cases (CONNECT | |
3343 | to an IP address or an intercepted SSL connection), Squid cannot detect | |
3344 | the domain mismatch at certificate generation time when | |
3345 | bump-server-first is used. | |
aebe6888 CT |
3346 | DOC_END |
3347 | ||
638402dd | 3348 | NAME: sslproxy_cert_adapt |
cb4f4424 | 3349 | IFDEF: USE_OPENSSL |
fb2178bb CT |
3350 | DEFAULT: none |
3351 | TYPE: sslproxy_cert_adapt | |
3352 | LOC: Config.ssl_client.cert_adapt | |
3353 | DOC_START | |
9603207d | 3354 | |
fb2178bb CT |
3355 | sslproxy_cert_adapt <adaptation algorithm> acl ... |
3356 | ||
69742b76 | 3357 | The following certificate adaptation algorithms are supported: |
638402dd | 3358 | |
fb2178bb | 3359 | setValidAfter |
69742b76 AR |
3360 | Sets the "Not After" property to the "Not After" property of |
3361 | the CA certificate used to sign generated certificates. | |
638402dd | 3362 | |
fb2178bb | 3363 | setValidBefore |
69742b76 AR |
3364 | Sets the "Not Before" property to the "Not Before" property of |
3365 | the CA certificate used to sign generated certificates. | |
638402dd | 3366 | |
69742b76 | 3367 | setCommonName or setCommonName{CN} |
9603207d | 3368 | Sets Subject.CN property to the host name specified as a |
69742b76 AR |
3369 | CN parameter or, if no explicit CN parameter was specified, |
3370 | extracted from the CONNECT request. It is a misconfiguration | |
3371 | to use setCommonName without an explicit parameter for | |
3372 | intercepted or tproxied SSL connections. | |
9603207d | 3373 | |
cf1c09f6 CT |
3374 | This clause only supports fast acl types. |
3375 | ||
69742b76 AR |
3376 | Squid first groups sslproxy_cert_adapt options by adaptation algorithm. |
3377 | Within a group, when sslproxy_cert_adapt acl(s) match, Squid uses the | |
3378 | corresponding adaptation algorithm to generate the certificate and | |
3379 | ignores all subsequent sslproxy_cert_adapt options in that algorithm's | |
3380 | group (i.e., the first match wins within each algorithm group). If no | |
3381 | acl(s) match, the default mimicking action takes place. | |
cf1c09f6 | 3382 | |
4b0d23b7 CT |
3383 | WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can |
3384 | be used with sslproxy_cert_adapt, but if and only if Squid is bumping a | |
3385 | CONNECT request that carries a domain name. In all other cases (CONNECT | |
3386 | to an IP address or an intercepted SSL connection), Squid cannot detect | |
3387 | the domain mismatch at certificate generation time when | |
3388 | bump-server-first is used. | |
fb2178bb CT |
3389 | DOC_END |
3390 | ||
41bd17a4 | 3391 | NAME: sslpassword_program |
cb4f4424 | 3392 | IFDEF: USE_OPENSSL |
41bd17a4 | 3393 | DEFAULT: none |
3394 | LOC: Config.Program.ssl_password | |
3395 | TYPE: string | |
5473c134 | 3396 | DOC_START |
41bd17a4 | 3397 | Specify a program used for entering SSL key passphrases |
3398 | when using encrypted SSL certificate keys. If not specified | |
3399 | keys must either be unencrypted, or Squid started with the -N | |
3400 | option to allow it to query interactively for the passphrase. | |
7acb9ddd HN |
3401 | |
3402 | The key file name is given as argument to the program allowing | |
3403 | selection of the right password if you have multiple encrypted | |
3404 | keys. | |
5473c134 | 3405 | DOC_END |
3406 | ||
95d2589c | 3407 | COMMENT_START |
9603207d | 3408 | OPTIONS RELATING TO EXTERNAL SSL_CRTD |
95d2589c CT |
3409 | ----------------------------------------------------------------------------- |
3410 | COMMENT_END | |
3411 | ||
3412 | NAME: sslcrtd_program | |
9603207d | 3413 | TYPE: eol |
95d2589c CT |
3414 | IFDEF: USE_SSL_CRTD |
3415 | DEFAULT: @DEFAULT_SSL_CRTD@ -s @DEFAULT_SSL_DB_DIR@ -M 4MB | |
3416 | LOC: Ssl::TheConfig.ssl_crtd | |
3417 | DOC_START | |
cb0b3d63 AJ |
3418 | Specify the location and options of the executable for certificate |
3419 | generator. | |
a2a12dec MM |
3420 | |
3421 | @DEFAULT_SSL_CRTD@ program can use a disk cache to improve response | |
3422 | times on repeated requests. To enable caching, specify -s and -M | |
3423 | parameters. If those parameters are not given, the program generates | |
3424 | a new certificate on every request. | |
3425 | ||
95d2589c CT |
3426 | For more information use: |
3427 | @DEFAULT_SSL_CRTD@ -h | |
3428 | DOC_END | |
3429 | ||
3430 | NAME: sslcrtd_children | |
3431 | TYPE: HelperChildConfig | |
3432 | IFDEF: USE_SSL_CRTD | |
3433 | DEFAULT: 32 startup=5 idle=1 | |
3434 | LOC: Ssl::TheConfig.ssl_crtdChildren | |
3435 | DOC_START | |
79933cd6 AR |
3436 | Specifies the maximum number of certificate generation processes that |
3437 | Squid may spawn (numberofchildren) and several related options. Using | |
3438 | too few of these helper processes (a.k.a. "helpers") creates request | |
3439 | queues. Using too many helpers wastes your system resources. Squid | |
3440 | does not support spawning more than 32 helpers. | |
3441 | ||
3442 | Usage: numberofchildren [option]... | |
3443 | ||
95d2589c CT |
3444 | The startup= and idle= options allow some measure of skew in your |
3445 | tuning. | |
9603207d | 3446 | |
95d2589c | 3447 | startup=N |
9603207d | 3448 | |
95d2589c CT |
3449 | Sets the minimum number of processes to spawn when Squid |
3450 | starts or reconfigures. When set to zero the first request will | |
3451 | cause spawning of the first child process to handle it. | |
9603207d | 3452 | |
95d2589c CT |
3453 | Starting too few children temporary slows Squid under load while it |
3454 | tries to spawn enough additional processes to cope with traffic. | |
9603207d | 3455 | |
95d2589c | 3456 | idle=N |
9603207d | 3457 | |
95d2589c CT |
3458 | Sets a minimum of how many processes Squid is to try and keep available |
3459 | at all times. When traffic begins to rise above what the existing | |
3460 | processes can handle this many more will be spawned up to the maximum | |
3461 | configured. A minimum setting of 1 is required. | |
6825b101 CT |
3462 | |
3463 | queue-size=N | |
3464 | ||
79933cd6 AR |
3465 | Sets the maximum number of queued requests. A request is queued when |
3466 | no existing child is idle and no new child can be started due to | |
3467 | numberofchildren limit. If the queued requests exceed queue size for | |
3468 | more than 3 minutes squid aborts its operation. The default value is | |
3469 | set to 2*numberofchildren. | |
9603207d | 3470 | |
95d2589c CT |
3471 | You must have at least one ssl_crtd process. |
3472 | DOC_END | |
3473 | ||
2cef0ca6 AR |
3474 | NAME: sslcrtvalidator_program |
3475 | TYPE: eol | |
cb4f4424 | 3476 | IFDEF: USE_OPENSSL |
2cef0ca6 AR |
3477 | DEFAULT: none |
3478 | LOC: Ssl::TheConfig.ssl_crt_validator | |
3479 | DOC_START | |
3480 | Specify the location and options of the executable for ssl_crt_validator | |
638402dd AJ |
3481 | process. |
3482 | ||
72247610 | 3483 | Usage: sslcrtvalidator_program [ttl=...] [cache=n] path ... |
14798e73 CT |
3484 | |
3485 | Options: | |
72247610 AJ |
3486 | |
3487 | cache=bytes | |
3488 | Limits how much memory Squid can use for caching validator | |
3489 | responses. The default is 67108864 (i.e. 64 MB). | |
3490 | Reconfiguration purges any excess entries. To disable caching, | |
3491 | use cache=0. Currently, cache entry sizes are seriously | |
3492 | underestimated. Even with that bug, a typical estimate for a | |
3493 | single cache entry size would be at least a few kilobytes (the | |
3494 | size of the PEM certificates sent to the validator). | |
3495 | ||
3496 | ttl=<seconds|"infinity"> | |
3497 | Approximately how long Squid may reuse the validator results | |
3498 | for. The default is 3600 (i.e. 1 hour). Using ttl=infinity | |
3499 | disables TTL checks. Reconfiguration does not affect TTLs of | |
3500 | the already cached entries. To disable caching, use zero cache | |
3501 | size, not zero TTL -- zero TTL allows reuse for the remainder | |
3502 | of the second when the result was cached. | |
2cef0ca6 AR |
3503 | DOC_END |
3504 | ||
3505 | NAME: sslcrtvalidator_children | |
3506 | TYPE: HelperChildConfig | |
cb4f4424 | 3507 | IFDEF: USE_OPENSSL |
413bb969 | 3508 | DEFAULT: 32 startup=5 idle=1 concurrency=1 |
2cef0ca6 AR |
3509 | LOC: Ssl::TheConfig.ssl_crt_validator_Children |
3510 | DOC_START | |
79933cd6 AR |
3511 | Specifies the maximum number of certificate validation processes that |
3512 | Squid may spawn (numberofchildren) and several related options. Using | |
3513 | too few of these helper processes (a.k.a. "helpers") creates request | |
3514 | queues. Using too many helpers wastes your system resources. Squid | |
3515 | does not support spawning more than 32 helpers. | |
3516 | ||
3517 | Usage: numberofchildren [option]... | |
9603207d | 3518 | |
2cef0ca6 AR |
3519 | The startup= and idle= options allow some measure of skew in your |
3520 | tuning. | |
9603207d | 3521 | |
2cef0ca6 | 3522 | startup=N |
9603207d | 3523 | |
2cef0ca6 AR |
3524 | Sets the minimum number of processes to spawn when Squid |
3525 | starts or reconfigures. When set to zero the first request will | |
3526 | cause spawning of the first child process to handle it. | |
9603207d | 3527 | |
2cef0ca6 AR |
3528 | Starting too few children temporary slows Squid under load while it |
3529 | tries to spawn enough additional processes to cope with traffic. | |
9603207d | 3530 | |
2cef0ca6 | 3531 | idle=N |
9603207d | 3532 | |
2cef0ca6 AR |
3533 | Sets a minimum of how many processes Squid is to try and keep available |
3534 | at all times. When traffic begins to rise above what the existing | |
3535 | processes can handle this many more will be spawned up to the maximum | |
3536 | configured. A minimum setting of 1 is required. | |
4a77bb4e CT |
3537 | |
3538 | concurrency= | |
9603207d | 3539 | |
4a77bb4e | 3540 | The number of requests each certificate validator helper can handle in |
2f8abb64 | 3541 | parallel. A value of 0 indicates the certificate validator does not |
dffc462a | 3542 | support concurrency. Defaults to 1. |
9603207d | 3543 | |
4a77bb4e CT |
3544 | When this directive is set to a value >= 1 then the protocol |
3545 | used to communicate with the helper is modified to include | |
3546 | a request ID in front of the request/response. The request | |
3547 | ID from the request must be echoed back with the response | |
3548 | to that request. | |
6825b101 CT |
3549 | |
3550 | queue-size=N | |
3551 | ||
79933cd6 AR |
3552 | Sets the maximum number of queued requests. A request is queued when |
3553 | no existing child can accept it due to concurrency limit and no new | |
3554 | child can be started due to numberofchildren limit. If the queued | |
3555 | requests exceed queue size for more than 3 minutes squid aborts its | |
3556 | operation. The default value is set to 2*numberofchildren. | |
9603207d | 3557 | |
2cef0ca6 AR |
3558 | You must have at least one ssl_crt_validator process. |
3559 | DOC_END | |
3560 | ||
cccac0a2 | 3561 | COMMENT_START |
41bd17a4 | 3562 | OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM |
cccac0a2 | 3563 | ----------------------------------------------------------------------------- |
3564 | COMMENT_END | |
3565 | ||
41bd17a4 | 3566 | NAME: cache_peer |
3567 | TYPE: peer | |
3568 | DEFAULT: none | |
3569 | LOC: Config.peers | |
cccac0a2 | 3570 | DOC_START |
41bd17a4 | 3571 | To specify other caches in a hierarchy, use the format: |
9603207d | 3572 | |
41bd17a4 | 3573 | cache_peer hostname type http-port icp-port [options] |
9603207d | 3574 | |
41bd17a4 | 3575 | For example, |
9603207d | 3576 | |
41bd17a4 | 3577 | # proxy icp |
3578 | # hostname type port port options | |
3579 | # -------------------- -------- ----- ----- ----------- | |
2b94f655 | 3580 | cache_peer parent.foo.net parent 3128 3130 default |
41bd17a4 | 3581 | cache_peer sib1.foo.net sibling 3128 3130 proxy-only |
3582 | cache_peer sib2.foo.net sibling 3128 3130 proxy-only | |
2e9993e1 | 3583 | cache_peer example.com parent 80 0 default |
9603207d | 3584 | cache_peer cdn.example.com sibling 3128 0 |
3585 | ||
2b94f655 | 3586 | type: either 'parent', 'sibling', or 'multicast'. |
9603207d | 3587 | |
2b94f655 AJ |
3588 | proxy-port: The port number where the peer accept HTTP requests. |
3589 | For other Squid proxies this is usually 3128 | |
3590 | For web servers this is usually 80 | |
9603207d | 3591 | |
2b94f655 AJ |
3592 | icp-port: Used for querying neighbor caches about objects. |
3593 | Set to 0 if the peer does not support ICP or HTCP. | |
3594 | See ICP and HTCP options below for additional details. | |
9603207d | 3595 | |
3596 | ||
2b94f655 | 3597 | ==== ICP OPTIONS ==== |
9603207d | 3598 | |
2b94f655 AJ |
3599 | You MUST also set icp_port and icp_access explicitly when using these options. |
3600 | The defaults will prevent peer traffic using ICP. | |
9603207d | 3601 | |
3602 | ||
2b94f655 | 3603 | no-query Disable ICP queries to this neighbor. |
9603207d | 3604 | |
2b94f655 AJ |
3605 | multicast-responder |
3606 | Indicates the named peer is a member of a multicast group. | |
3607 | ICP queries will not be sent directly to the peer, but ICP | |
3608 | replies will be accepted from it. | |
9603207d | 3609 | |
2b94f655 AJ |
3610 | closest-only Indicates that, for ICP_OP_MISS replies, we'll only forward |
3611 | CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes. | |
9603207d | 3612 | |
2b94f655 AJ |
3613 | background-ping |
3614 | To only send ICP queries to this neighbor infrequently. | |
3615 | This is used to keep the neighbor round trip time updated | |
3616 | and is usually used in conjunction with weighted-round-robin. | |
9603207d | 3617 | |
3618 | ||
2b94f655 | 3619 | ==== HTCP OPTIONS ==== |
9603207d | 3620 | |
2b94f655 AJ |
3621 | You MUST also set htcp_port and htcp_access explicitly when using these options. |
3622 | The defaults will prevent peer traffic using HTCP. | |
9603207d | 3623 | |
3624 | ||
2b94f655 AJ |
3625 | htcp Send HTCP, instead of ICP, queries to the neighbor. |
3626 | You probably also want to set the "icp-port" to 4827 | |
18191440 AJ |
3627 | instead of 3130. This directive accepts a comma separated |
3628 | list of options described below. | |
9603207d | 3629 | |
18191440 | 3630 | htcp=oldsquid Send HTCP to old Squid versions (2.5 or earlier). |
9603207d | 3631 | |
18191440 | 3632 | htcp=no-clr Send HTCP to the neighbor but without |
2b94f655 | 3633 | sending any CLR requests. This cannot be used with |
18191440 | 3634 | only-clr. |
9603207d | 3635 | |
18191440 AJ |
3636 | htcp=only-clr Send HTCP to the neighbor but ONLY CLR requests. |
3637 | This cannot be used with no-clr. | |
9603207d | 3638 | |
18191440 | 3639 | htcp=no-purge-clr |
2b94f655 AJ |
3640 | Send HTCP to the neighbor including CLRs but only when |
3641 | they do not result from PURGE requests. | |
9603207d | 3642 | |
18191440 | 3643 | htcp=forward-clr |
2b94f655 | 3644 | Forward any HTCP CLR requests this proxy receives to the peer. |
9603207d | 3645 | |
3646 | ||
2b94f655 | 3647 | ==== PEER SELECTION METHODS ==== |
9603207d | 3648 | |
2b94f655 AJ |
3649 | The default peer selection method is ICP, with the first responding peer |
3650 | being used as source. These options can be used for better load balancing. | |
9603207d | 3651 | |
3652 | ||
2b94f655 AJ |
3653 | default This is a parent cache which can be used as a "last-resort" |
3654 | if a peer cannot be located by any of the peer-selection methods. | |
3655 | If specified more than once, only the first is used. | |
9603207d | 3656 | |
2b94f655 AJ |
3657 | round-robin Load-Balance parents which should be used in a round-robin |
3658 | fashion in the absence of any ICP queries. | |
3659 | weight=N can be used to add bias. | |
9603207d | 3660 | |
2b94f655 AJ |
3661 | weighted-round-robin |
3662 | Load-Balance parents which should be used in a round-robin | |
3663 | fashion with the frequency of each parent being based on the | |
3664 | round trip time. Closer parents are used more often. | |
3665 | Usually used for background-ping parents. | |
3666 | weight=N can be used to add bias. | |
9603207d | 3667 | |
2b94f655 AJ |
3668 | carp Load-Balance parents which should be used as a CARP array. |
3669 | The requests will be distributed among the parents based on the | |
3670 | CARP load balancing hash function based on their weight. | |
9603207d | 3671 | |
2b94f655 | 3672 | userhash Load-balance parents based on the client proxy_auth or ident username. |
9603207d | 3673 | |
2b94f655 | 3674 | sourcehash Load-balance parents based on the client source IP. |
8a368316 AJ |
3675 | |
3676 | multicast-siblings | |
3677 | To be used only for cache peers of type "multicast". | |
3678 | ALL members of this multicast group have "sibling" | |
2e9993e1 | 3679 | relationship with it, not "parent". This is to a multicast |
8a368316 AJ |
3680 | group when the requested object would be fetched only from |
3681 | a "parent" cache, anyway. It's useful, e.g., when | |
3682 | configuring a pool of redundant Squid proxies, being | |
3683 | members of the same multicast group. | |
9603207d | 3684 | |
3685 | ||
2b94f655 | 3686 | ==== PEER SELECTION OPTIONS ==== |
9603207d | 3687 | |
2b94f655 AJ |
3688 | weight=N use to affect the selection of a peer during any weighted |
3689 | peer-selection mechanisms. | |
3690 | The weight must be an integer; default is 1, | |
3691 | larger weights are favored more. | |
3692 | This option does not affect parent selection if a peering | |
3693 | protocol is not in use. | |
9603207d | 3694 | |
2b94f655 AJ |
3695 | basetime=N Specify a base amount to be subtracted from round trip |
3696 | times of parents. | |
3697 | It is subtracted before division by weight in calculating | |
3698 | which parent to fectch from. If the rtt is less than the | |
3699 | base time the rtt is set to a minimal value. | |
9603207d | 3700 | |
3c72389f AJ |
3701 | ttl=N Specify a TTL to use when sending multicast ICP queries |
3702 | to this address. | |
2b94f655 AJ |
3703 | Only useful when sending to a multicast group. |
3704 | Because we don't accept ICP replies from random | |
3705 | hosts, you must configure other group members as | |
3706 | peers with the 'multicast-responder' option. | |
9603207d | 3707 | |
2b94f655 AJ |
3708 | no-delay To prevent access to this neighbor from influencing the |
3709 | delay pools. | |
9603207d | 3710 | |
2b94f655 AJ |
3711 | digest-url=URL Tell Squid to fetch the cache digest (if digests are |
3712 | enabled) for this host from the specified URL rather | |
3713 | than the Squid default location. | |
9603207d | 3714 | |
3715 | ||
de03b596 | 3716 | ==== CARP OPTIONS ==== |
9603207d | 3717 | |
de03b596 FC |
3718 | carp-key=key-specification |
3719 | use a different key than the full URL to hash against the peer. | |
9603207d | 3720 | the key-specification is a comma-separated list of the keywords |
de03b596 FC |
3721 | scheme, host, port, path, params |
3722 | Order is not important. | |
9603207d | 3723 | |
2b94f655 | 3724 | ==== ACCELERATOR / REVERSE-PROXY OPTIONS ==== |
9603207d | 3725 | |
2b94f655 AJ |
3726 | originserver Causes this parent to be contacted as an origin server. |
3727 | Meant to be used in accelerator setups when the peer | |
3728 | is a web server. | |
9603207d | 3729 | |
2b94f655 AJ |
3730 | forceddomain=name |
3731 | Set the Host header of requests forwarded to this peer. | |
3732 | Useful in accelerator setups where the server (peer) | |
3733 | expects a certain domain name but clients may request | |
3734 | others. ie example.com or www.example.com | |
9603207d | 3735 | |
2b94f655 | 3736 | no-digest Disable request of cache digests. |
9603207d | 3737 | |
2b94f655 AJ |
3738 | no-netdb-exchange |
3739 | Disables requesting ICMP RTT database (NetDB). | |
9603207d | 3740 | |
3741 | ||
2b94f655 | 3742 | ==== AUTHENTICATION OPTIONS ==== |
9603207d | 3743 | |
2b94f655 AJ |
3744 | login=user:password |
3745 | If this is a personal/workgroup proxy and your parent | |
3746 | requires proxy authentication. | |
9603207d | 3747 | |
2b94f655 AJ |
3748 | Note: The string can include URL escapes (i.e. %20 for |
3749 | spaces). This also means % must be written as %%. | |
9603207d | 3750 | |
11e4c5e5 AJ |
3751 | login=PASSTHRU |
3752 | Send login details received from client to this peer. | |
3753 | Both Proxy- and WWW-Authorization headers are passed | |
3754 | without alteration to the peer. | |
3755 | Authentication is not required by Squid for this to work. | |
9603207d | 3756 | |
11e4c5e5 AJ |
3757 | Note: This will pass any form of authentication but |
3758 | only Basic auth will work through a proxy unless the | |
3759 | connection-auth options are also used. | |
ee0b94f4 | 3760 | |
2b94f655 AJ |
3761 | login=PASS Send login details received from client to this peer. |
3762 | Authentication is not required by this option. | |
9603207d | 3763 | |
2b94f655 AJ |
3764 | If there are no client-provided authentication headers |
3765 | to pass on, but username and password are available | |
ee0b94f4 HN |
3766 | from an external ACL user= and password= result tags |
3767 | they may be sent instead. | |
9603207d | 3768 | |
2b94f655 AJ |
3769 | Note: To combine this with proxy_auth both proxies must |
3770 | share the same user database as HTTP only allows for | |
3771 | a single login (one for proxy, one for origin server). | |
3772 | Also be warned this will expose your users proxy | |
3773 | password to the peer. USE WITH CAUTION | |
9603207d | 3774 | |
2b94f655 AJ |
3775 | login=*:password |
3776 | Send the username to the upstream cache, but with a | |
3777 | fixed password. This is meant to be used when the peer | |
3778 | is in another administrative domain, but it is still | |
3779 | needed to identify each user. | |
3780 | The star can optionally be followed by some extra | |
3781 | information which is added to the username. This can | |
3782 | be used to identify this proxy to the peer, similar to | |
3783 | the login=username:password option above. | |
9603207d | 3784 | |
9ca29d23 AJ |
3785 | login=NEGOTIATE |
3786 | If this is a personal/workgroup proxy and your parent | |
3787 | requires a secure proxy authentication. | |
3788 | The first principal from the default keytab or defined by | |
9603207d | 3789 | the environment variable KRB5_KTNAME will be used. |
3790 | ||
63f03f79 PL |
3791 | WARNING: The connection may transmit requests from multiple |
3792 | clients. Negotiate often assumes end-to-end authentication | |
3793 | and a single-client. Which is not strictly true here. | |
9603207d | 3794 | |
9ca29d23 AJ |
3795 | login=NEGOTIATE:principal_name |
3796 | If this is a personal/workgroup proxy and your parent | |
9603207d | 3797 | requires a secure proxy authentication. |
9ca29d23 AJ |
3798 | The principal principal_name from the default keytab or |
3799 | defined by the environment variable KRB5_KTNAME will be | |
3800 | used. | |
9603207d | 3801 | |
63f03f79 PL |
3802 | WARNING: The connection may transmit requests from multiple |
3803 | clients. Negotiate often assumes end-to-end authentication | |
3804 | and a single-client. Which is not strictly true here. | |
9603207d | 3805 | |
2b94f655 AJ |
3806 | connection-auth=on|off |
3807 | Tell Squid that this peer does or not support Microsoft | |
3808 | connection oriented authentication, and any such | |
3809 | challenges received from there should be ignored. | |
3810 | Default is auto to automatically determine the status | |
3811 | of the peer. | |
9603207d | 3812 | |
9825b398 AJ |
3813 | auth-no-keytab |
3814 | Do not use a keytab to authenticate to a peer when | |
3815 | login=NEGOTIATE is specified. Let the GSSAPI | |
3816 | implementation determine which already existing | |
3817 | credentials cache to use instead. | |
9603207d | 3818 | |
3819 | ||
2b94f655 | 3820 | ==== SSL / HTTPS / TLS OPTIONS ==== |
9603207d | 3821 | |
0ff7e52d | 3822 | tls Encrypt connections to this peer with TLS. |
9603207d | 3823 | |
2b94f655 | 3824 | sslcert=/path/to/ssl/certificate |
51e09c08 | 3825 | A client X.509 certificate to use when connecting to |
2b94f655 | 3826 | this peer. |
9603207d | 3827 | |
2b94f655 | 3828 | sslkey=/path/to/ssl/key |
51e09c08 AJ |
3829 | The private key corresponding to sslcert above. |
3830 | ||
3831 | If sslkey= is not specified sslcert= is assumed to | |
3832 | reference a PEM file containing both the certificate | |
3833 | and private key. | |
9603207d | 3834 | |
2b94f655 AJ |
3835 | sslcipher=... The list of valid SSL ciphers to use when connecting |
3836 | to this peer. | |
1cc44095 AJ |
3837 | |
3838 | tls-min-version=1.N | |
3839 | The minimum TLS protocol version to permit. To control | |
3f5b28fe | 3840 | SSLv3 use the tls-options= parameter. |
1cc44095 AJ |
3841 | Supported Values: 1.0 (default), 1.1, 1.2 |
3842 | ||
3f5b28fe | 3843 | tls-options=... Specify various TLS implementation options. |
943c5f16 | 3844 | |
3f5b28fe | 3845 | OpenSSL options most important are: |
1f1f29e8 | 3846 | |
3f5b28fe | 3847 | NO_SSLv3 Disallow the use of SSLv3 |
1f1f29e8 | 3848 | |
943c5f16 HN |
3849 | SINGLE_DH_USE |
3850 | Always create a new key when using | |
3851 | temporary/ephemeral DH key exchanges | |
1f1f29e8 | 3852 | |
ce0adf1a | 3853 | NO_TICKET |
1f1f29e8 AJ |
3854 | Disable use of RFC5077 session tickets. |
3855 | Some servers may have problems | |
3856 | understanding the TLS extension due | |
3857 | to ambiguous specification in RFC4507. | |
3858 | ||
943c5f16 HN |
3859 | ALL Enable various bug workarounds |
3860 | suggested as "harmless" by OpenSSL | |
3861 | Be warned that this reduces SSL/TLS | |
3862 | strength to some attacks. | |
3863 | ||
3864 | See the OpenSSL SSL_CTX_set_options documentation for a | |
3865 | more complete list. | |
3f5b28fe AJ |
3866 | |
3867 | GnuTLS options most important are: | |
3868 | ||
3869 | %NO_TICKETS | |
3870 | Disable use of RFC5077 session tickets. | |
3871 | Some servers may have problems | |
3872 | understanding the TLS extension due | |
3873 | to ambiguous specification in RFC4507. | |
3874 | ||
3875 | See the GnuTLS Priority Strings documentation | |
3876 | for a more complete list. | |
3877 | http://www.gnutls.org/manual/gnutls.html#Priority-Strings | |
3878 | ||
86a84cc0 AJ |
3879 | tls-cafile= PEM file containing CA certificates to use when verifying |
3880 | the peer certificate. May be repeated to load multiple files. | |
9603207d | 3881 | |
2b94f655 AJ |
3882 | sslcapath=... A directory containing additional CA certificates to |
3883 | use when verifying the peer certificate. | |
86a84cc0 | 3884 | Requires OpenSSL or LibreSSL. |
9603207d | 3885 | |
2b94f655 AJ |
3886 | sslcrlfile=... A certificate revocation list file to use when |
3887 | verifying the peer certificate. | |
9603207d | 3888 | |
2b94f655 | 3889 | sslflags=... Specify various flags modifying the SSL implementation: |
9603207d | 3890 | |
41bd17a4 | 3891 | DONT_VERIFY_PEER |
3892 | Accept certificates even if they fail to | |
3893 | verify. | |
1f1f29e8 | 3894 | |
41bd17a4 | 3895 | DONT_VERIFY_DOMAIN |
3896 | Don't verify the peer certificate | |
3897 | matches the server name | |
9603207d | 3898 | |
2b94f655 AJ |
3899 | ssldomain= The peer name as advertised in it's certificate. |
3900 | Used for verifying the correctness of the received peer | |
3901 | certificate. If not specified the peer hostname will be | |
3902 | used. | |
9603207d | 3903 | |
bad9c5e4 | 3904 | front-end-https[=off|on|auto] |
2b94f655 AJ |
3905 | Enable the "Front-End-Https: On" header needed when |
3906 | using Squid as a SSL frontend in front of Microsoft OWA. | |
3907 | See MS KB document Q307347 for details on this header. | |
3908 | If set to auto the header will only be added if the | |
3909 | request is forwarded as a https:// URL. | |
9603207d | 3910 | |
435c72b0 AJ |
3911 | tls-default-ca[=off] |
3912 | Whether to use the system Trusted CAs. Default is ON. | |
9603207d | 3913 | |
b05d749d AJ |
3914 | tls-no-npn Do not use the TLS NPN extension to advertise HTTP/1.1. |
3915 | ||
2b94f655 | 3916 | ==== GENERAL OPTIONS ==== |
9603207d | 3917 | |
2b94f655 AJ |
3918 | connect-timeout=N |
3919 | A peer-specific connect timeout. | |
3920 | Also see the peer_connect_timeout directive. | |
9603207d | 3921 | |
2b94f655 AJ |
3922 | connect-fail-limit=N |
3923 | How many times connecting to a peer must fail before | |
e8dca475 CT |
3924 | it is marked as down. Standby connection failures |
3925 | count towards this limit. Default is 10. | |
9603207d | 3926 | |
2b94f655 AJ |
3927 | allow-miss Disable Squid's use of only-if-cached when forwarding |
3928 | requests to siblings. This is primarily useful when | |
a5bb0c26 AR |
3929 | icp_hit_stale is used by the sibling. Excessive use |
3930 | of this option may result in forwarding loops. One way | |
3931 | to prevent peering loops when using this option, is to | |
3932 | deny cache peer usage on requests from a peer: | |
3933 | acl fromPeer ... | |
3934 | cache_peer_access peerName deny fromPeer | |
9603207d | 3935 | |
e8dca475 CT |
3936 | max-conn=N Limit the number of concurrent connections the Squid |
3937 | may open to this peer, including already opened idle | |
3938 | and standby connections. There is no peer-specific | |
3939 | connection limit by default. | |
9603207d | 3940 | |
e8dca475 CT |
3941 | A peer exceeding the limit is not used for new |
3942 | requests unless a standby connection is available. | |
9603207d | 3943 | |
e8dca475 CT |
3944 | max-conn currently works poorly with idle persistent |
3945 | connections: When a peer reaches its max-conn limit, | |
3946 | and there are idle persistent connections to the peer, | |
3947 | the peer may not be selected because the limiting code | |
3948 | does not know whether Squid can reuse those idle | |
3949 | connections. | |
9603207d | 3950 | |
e8dca475 CT |
3951 | standby=N Maintain a pool of N "hot standby" connections to an |
3952 | UP peer, available for requests when no idle | |
3953 | persistent connection is available (or safe) to use. | |
3954 | By default and with zero N, no such pool is maintained. | |
3955 | N must not exceed the max-conn limit (if any). | |
9603207d | 3956 | |
e8dca475 CT |
3957 | At start or after reconfiguration, Squid opens new TCP |
3958 | standby connections until there are N connections | |
3959 | available and then replenishes the standby pool as | |
3960 | opened connections are used up for requests. A used | |
3961 | connection never goes back to the standby pool, but | |
3962 | may go to the regular idle persistent connection pool | |
3963 | shared by all peers and origin servers. | |
9603207d | 3964 | |
e8dca475 CT |
3965 | Squid never opens multiple new standby connections |
3966 | concurrently. This one-at-a-time approach minimizes | |
3967 | flooding-like effect on peers. Furthermore, just a few | |
3968 | standby connections should be sufficient in most cases | |
3969 | to supply most new requests with a ready-to-use | |
3970 | connection. | |
9603207d | 3971 | |
e8dca475 CT |
3972 | Standby connections obey server_idle_pconn_timeout. |
3973 | For the feature to work as intended, the peer must be | |
3974 | configured to accept and keep them open longer than | |
3975 | the idle timeout at the connecting Squid, to minimize | |
3976 | race conditions typical to idle used persistent | |
3977 | connections. Default request_timeout and | |
3978 | server_idle_pconn_timeout values ensure such a | |
3979 | configuration. | |
9603207d | 3980 | |
2b94f655 | 3981 | name=xxx Unique name for the peer. |
a555a85b AR |
3982 | Required if you have multiple cache_peers with the same hostname. |
3983 | Defaults to cache_peer hostname when not explicitly specified. | |
3984 | ||
3985 | Other directives (e.g., cache_peer_access), cache manager reports, | |
3986 | and cache.log messages use this name to refer to this cache_peer. | |
3987 | ||
3988 | The cache_peer name value affects hashing-based peer selection | |
3989 | methods (e.g., carp and sourcehash). | |
3990 | ||
2b94f655 AJ |
3991 | Can be used by outgoing access controls through the |
3992 | peername ACL type. | |
9603207d | 3993 | |
a555a85b AR |
3994 | The name value preserves configured spelling, but name uniqueness |
3995 | checks and name-based search are case-insensitive. | |
3996 | ||
b0758e04 AJ |
3997 | no-tproxy Do not use the client-spoof TPROXY support when forwarding |
3998 | requests to this peer. Use normal address selection instead. | |
0d901ef4 | 3999 | This overrides the spoof_client_ip ACL. |
9603207d | 4000 | |
2b94f655 | 4001 | proxy-only objects fetched from the peer will not be stored locally. |
9603207d | 4002 | |
41bd17a4 | 4003 | DOC_END |
cccac0a2 | 4004 | |
41bd17a4 | 4005 | NAME: cache_peer_access |
4006 | TYPE: peer_access | |
4007 | DEFAULT: none | |
a5bb0c26 | 4008 | DEFAULT_DOC: No peer usage restrictions. |
41bd17a4 | 4009 | LOC: none |
4010 | DOC_START | |
a5bb0c26 | 4011 | Restricts usage of cache_peer proxies. |
cccac0a2 | 4012 | |
638402dd | 4013 | Usage: |
a5bb0c26 AR |
4014 | cache_peer_access peer-name allow|deny [!]aclname ... |
4015 | ||
4016 | For the required peer-name parameter, use either the value of the | |
4017 | cache_peer name=value parameter or, if name=value is missing, the | |
4018 | cache_peer hostname parameter. | |
4019 | ||
4020 | This directive narrows down the selection of peering candidates, but | |
4021 | does not determine the order in which the selected candidates are | |
4022 | contacted. That order is determined by the peer selection algorithms | |
4023 | (see PEER SELECTION sections in the cache_peer documentation). | |
4024 | ||
4025 | If a deny rule matches, the corresponding peer will not be contacted | |
4026 | for the current transaction -- Squid will not send ICP queries and | |
4027 | will not forward HTTP requests to that peer. An allow match leaves | |
4028 | the corresponding peer in the selection. The first match for a given | |
4029 | peer wins for that peer. | |
4030 | ||
4031 | The relative order of cache_peer_access directives for the same peer | |
4032 | matters. The relative order of any two cache_peer_access directives | |
4033 | for different peers does not matter. To ease interpretation, it is a | |
4034 | good idea to group cache_peer_access directives for the same peer | |
4035 | together. | |
4036 | ||
4037 | A single cache_peer_access directive may be evaluated multiple times | |
4038 | for a given transaction because individual peer selection algorithms | |
4039 | may check it independently from each other. These redundant checks | |
4040 | may be optimized away in future Squid versions. | |
4041 | ||
4042 | This clause only supports fast acl types. | |
7409131e | 4043 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
dd9b1776 | 4044 | |
41bd17a4 | 4045 | DOC_END |
dd9b1776 | 4046 | |
41bd17a4 | 4047 | NAME: neighbor_type_domain |
4048 | TYPE: hostdomaintype | |
4049 | DEFAULT: none | |
638402dd | 4050 | DEFAULT_DOC: The peer type from cache_peer directive is used for all requests to that peer. |
41bd17a4 | 4051 | LOC: none |
4052 | DOC_START | |
638402dd AJ |
4053 | Modify the cache_peer neighbor type when passing requests |
4054 | about specific domains to the peer. | |
cccac0a2 | 4055 | |
638402dd | 4056 | Usage: |
a555a85b AR |
4057 | neighbor_type_domain peer-name parent|sibling domain... |
4058 | ||
4059 | For the required peer-name parameter, use either the value of the | |
4060 | cache_peer name=value parameter or, if name=value is missing, the | |
4061 | cache_peer hostname parameter. | |
6bf4f823 | 4062 | |
638402dd AJ |
4063 | For example: |
4064 | cache_peer foo.example.com parent 3128 3130 | |
4065 | neighbor_type_domain foo.example.com sibling .au .de | |
6bf4f823 | 4066 | |
638402dd AJ |
4067 | The above configuration treats all requests to foo.example.com as a |
4068 | parent proxy unless the request is for a .au or .de ccTLD domain name. | |
41bd17a4 | 4069 | DOC_END |
6bf4f823 | 4070 | |
41bd17a4 | 4071 | NAME: dead_peer_timeout |
4072 | COMMENT: (seconds) | |
4073 | DEFAULT: 10 seconds | |
4074 | TYPE: time_t | |
4075 | LOC: Config.Timeout.deadPeer | |
4076 | DOC_START | |
4077 | This controls how long Squid waits to declare a peer cache | |
4078 | as "dead." If there are no ICP replies received in this | |
4079 | amount of time, Squid will declare the peer dead and not | |
4080 | expect to receive any further ICP replies. However, it | |
4081 | continues to send ICP queries, and will mark the peer as | |
4082 | alive upon receipt of the first subsequent ICP reply. | |
699acd19 | 4083 | |
41bd17a4 | 4084 | This timeout also affects when Squid expects to receive ICP |
4085 | replies from peers. If more than 'dead_peer' seconds have | |
4086 | passed since the last ICP reply was received, Squid will not | |
4087 | expect to receive an ICP reply on the next query. Thus, if | |
4088 | your time between requests is greater than this timeout, you | |
4089 | will see a lot of requests sent DIRECT to origin servers | |
4090 | instead of to your parents. | |
4091 | DOC_END | |
cccac0a2 | 4092 | |
437823b4 | 4093 | NAME: forward_max_tries |
6c367206 | 4094 | DEFAULT: 25 |
437823b4 AJ |
4095 | TYPE: int |
4096 | LOC: Config.forward_max_tries | |
4097 | DOC_START | |
3eebd267 EB |
4098 | Limits the number of attempts to forward the request. |
4099 | ||
4100 | For the purpose of this limit, Squid counts all high-level request | |
4101 | forwarding attempts, including any same-destination retries after | |
4102 | certain persistent connection failures and any attempts to use a | |
67a25c4a AR |
4103 | different peer. However, these low-level attempts are not counted: |
4104 | * connection reopening attempts (enabled using connect_retries) | |
4105 | * unfinished Happy Eyeballs connection attempts (prevented by setting | |
4106 | happy_eyeballs_connect_limit to 0) | |
9603207d | 4107 | |
e7a9b7a8 | 4108 | See also: forward_timeout, connect_retries, and %request_attempts. |
437823b4 AJ |
4109 | DOC_END |
4110 | ||
41bd17a4 | 4111 | COMMENT_START |
4112 | MEMORY CACHE OPTIONS | |
4113 | ----------------------------------------------------------------------------- | |
4114 | COMMENT_END | |
4115 | ||
4116 | NAME: cache_mem | |
4117 | COMMENT: (bytes) | |
4118 | TYPE: b_size_t | |
df2eec10 | 4119 | DEFAULT: 256 MB |
41bd17a4 | 4120 | LOC: Config.memMaxSize |
6b698a21 | 4121 | DOC_START |
41bd17a4 | 4122 | NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE. |
4123 | IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL | |
4124 | USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER | |
4125 | THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS. | |
4126 | ||
4127 | 'cache_mem' specifies the ideal amount of memory to be used | |
4128 | for: | |
4129 | * In-Transit objects | |
4130 | * Hot Objects | |
4131 | * Negative-Cached objects | |
4132 | ||
4133 | Data for these objects are stored in 4 KB blocks. This | |
4134 | parameter specifies the ideal upper limit on the total size of | |
4135 | 4 KB blocks allocated. In-Transit objects take the highest | |
4136 | priority. | |
4137 | ||
4138 | In-transit objects have priority over the others. When | |
4139 | additional space is needed for incoming data, negative-cached | |
4140 | and hot objects will be released. In other words, the | |
4141 | negative-cached and hot objects will fill up any unused space | |
4142 | not needed for in-transit objects. | |
4143 | ||
4144 | If circumstances require, this limit will be exceeded. | |
4145 | Specifically, if your incoming request rate requires more than | |
4146 | 'cache_mem' of memory to hold in-transit objects, Squid will | |
4147 | exceed this limit to satisfy the new requests. When the load | |
4148 | decreases, blocks will be freed until the high-water mark is | |
4149 | reached. Thereafter, blocks will be used to store hot | |
4150 | objects. | |
29f35ca5 AR |
4151 | |
4152 | If shared memory caching is enabled, Squid does not use the shared | |
4153 | cache space for in-transit objects, but they still consume as much | |
4154 | local memory as they need. For more details about the shared memory | |
4155 | cache, see memory_cache_shared. | |
6b698a21 | 4156 | DOC_END |
0976f8db | 4157 | |
41bd17a4 | 4158 | NAME: maximum_object_size_in_memory |
4159 | COMMENT: (bytes) | |
4160 | TYPE: b_size_t | |
df2eec10 | 4161 | DEFAULT: 512 KB |
41bd17a4 | 4162 | LOC: Config.Store.maxInMemObjSize |
6b698a21 | 4163 | DOC_START |
41bd17a4 | 4164 | Objects greater than this size will not be attempted to kept in |
4165 | the memory cache. This should be set high enough to keep objects | |
4166 | accessed frequently in memory to improve performance whilst low | |
4167 | enough to keep larger objects from hoarding cache_mem. | |
6b698a21 | 4168 | DOC_END |
0976f8db | 4169 | |
57af1e3f AR |
4170 | NAME: memory_cache_shared |
4171 | COMMENT: on|off | |
4172 | TYPE: YesNoNone | |
4173 | LOC: Config.memShared | |
4174 | DEFAULT: none | |
70f856bc | 4175 | DEFAULT_DOC: "on" where supported if doing memory caching with multiple SMP workers. |
57af1e3f AR |
4176 | DOC_START |
4177 | Controls whether the memory cache is shared among SMP workers. | |
4178 | ||
70f856bc AR |
4179 | The shared memory cache is meant to occupy cache_mem bytes and replace |
4180 | the non-shared memory cache, although some entities may still be | |
4181 | cached locally by workers for now (e.g., internal and in-transit | |
4182 | objects may be served from a local memory cache even if shared memory | |
4183 | caching is enabled). | |
4184 | ||
65b81b27 | 4185 | By default, the memory cache is shared if and only if all of the |
70f856bc AR |
4186 | following conditions are satisfied: Squid runs in SMP mode with |
4187 | multiple workers, cache_mem is positive, and Squid environment | |
4188 | supports required IPC primitives (e.g., POSIX shared memory segments | |
4189 | and GCC-style atomic operations). | |
4190 | ||
4191 | To avoid blocking locks, shared memory uses opportunistic algorithms | |
4192 | that do not guarantee that every cachable entity that could have been | |
4193 | shared among SMP workers will actually be shared. | |
57af1e3f AR |
4194 | DOC_END |
4195 | ||
ea21d497 HN |
4196 | NAME: memory_cache_mode |
4197 | TYPE: memcachemode | |
4198 | LOC: Config | |
4199 | DEFAULT: always | |
638402dd | 4200 | DEFAULT_DOC: Keep the most recently fetched objects in memory |
ff4b33f4 | 4201 | DOC_START |
ea21d497 | 4202 | Controls which objects to keep in the memory cache (cache_mem) |
ff4b33f4 | 4203 | |
ea21d497 HN |
4204 | always Keep most recently fetched objects in memory (default) |
4205 | ||
4206 | disk Only disk cache hits are kept in memory, which means | |
4207 | an object must first be cached on disk and then hit | |
4208 | a second time before cached in memory. | |
4209 | ||
4210 | network Only objects fetched from network is kept in memory | |
ff4b33f4 HN |
4211 | DOC_END |
4212 | ||
41bd17a4 | 4213 | NAME: memory_replacement_policy |
4214 | TYPE: removalpolicy | |
4215 | LOC: Config.memPolicy | |
4216 | DEFAULT: lru | |
6b698a21 | 4217 | DOC_START |
41bd17a4 | 4218 | The memory replacement policy parameter determines which |
4219 | objects are purged from memory when memory space is needed. | |
7f7db318 | 4220 | |
638402dd | 4221 | See cache_replacement_policy for details on algorithms. |
41bd17a4 | 4222 | DOC_END |
6b698a21 | 4223 | |
41bd17a4 | 4224 | COMMENT_START |
4225 | DISK CACHE OPTIONS | |
4226 | ----------------------------------------------------------------------------- | |
4227 | COMMENT_END | |
6b698a21 | 4228 | |
41bd17a4 | 4229 | NAME: cache_replacement_policy |
4230 | TYPE: removalpolicy | |
4231 | LOC: Config.replPolicy | |
4232 | DEFAULT: lru | |
4233 | DOC_START | |
4234 | The cache replacement policy parameter determines which | |
4235 | objects are evicted (replaced) when disk space is needed. | |
6b698a21 | 4236 | |
41bd17a4 | 4237 | lru : Squid's original list based LRU policy |
4238 | heap GDSF : Greedy-Dual Size Frequency | |
4239 | heap LFUDA: Least Frequently Used with Dynamic Aging | |
4240 | heap LRU : LRU policy implemented using a heap | |
6b698a21 | 4241 | |
638402dd | 4242 | Applies to any cache_dir lines listed below this directive. |
7f7db318 | 4243 | |
41bd17a4 | 4244 | The LRU policies keeps recently referenced objects. |
0976f8db | 4245 | |
41bd17a4 | 4246 | The heap GDSF policy optimizes object hit rate by keeping smaller |
4247 | popular objects in cache so it has a better chance of getting a | |
4248 | hit. It achieves a lower byte hit rate than LFUDA though since | |
4249 | it evicts larger (possibly popular) objects. | |
0976f8db | 4250 | |
41bd17a4 | 4251 | The heap LFUDA policy keeps popular objects in cache regardless of |
4252 | their size and thus optimizes byte hit rate at the expense of | |
4253 | hit rate since one large, popular object will prevent many | |
4254 | smaller, slightly less popular objects from being cached. | |
0976f8db | 4255 | |
41bd17a4 | 4256 | Both policies utilize a dynamic aging mechanism that prevents |
4257 | cache pollution that can otherwise occur with frequency-based | |
4258 | replacement policies. | |
7d90757b | 4259 | |
41bd17a4 | 4260 | NOTE: if using the LFUDA replacement policy you should increase |
b51ec8c8 | 4261 | the value of maximum_object_size above its default of 4 MB to |
41bd17a4 | 4262 | to maximize the potential byte hit rate improvement of LFUDA. |
dc1af3cf | 4263 | |
41bd17a4 | 4264 | For more information about the GDSF and LFUDA cache replacement |
4265 | policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html | |
4266 | and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html. | |
6b698a21 | 4267 | DOC_END |
0976f8db | 4268 | |
a345387f AJ |
4269 | NAME: minimum_object_size |
4270 | COMMENT: (bytes) | |
4271 | TYPE: b_int64_t | |
4272 | DEFAULT: 0 KB | |
4273 | DEFAULT_DOC: no limit | |
4274 | LOC: Config.Store.minObjectSize | |
4275 | DOC_START | |
4276 | Objects smaller than this size will NOT be saved on disk. The | |
4277 | value is specified in bytes, and the default is 0 KB, which | |
4278 | means all responses can be stored. | |
4279 | DOC_END | |
4280 | ||
4281 | NAME: maximum_object_size | |
4282 | COMMENT: (bytes) | |
4283 | TYPE: b_int64_t | |
4284 | DEFAULT: 4 MB | |
4285 | LOC: Config.Store.maxObjectSize | |
4286 | DOC_START | |
499f852c | 4287 | Set the default value for max-size parameter on any cache_dir. |
a345387f | 4288 | The value is specified in bytes, and the default is 4 MB. |
9603207d | 4289 | |
a345387f AJ |
4290 | If you wish to get a high BYTES hit ratio, you should probably |
4291 | increase this (one 32 MB object hit counts for 3200 10KB | |
4292 | hits). | |
9603207d | 4293 | |
a345387f AJ |
4294 | If you wish to increase hit ratio more than you want to |
4295 | save bandwidth you should leave this low. | |
9603207d | 4296 | |
a345387f AJ |
4297 | NOTE: if using the LFUDA replacement policy you should increase |
4298 | this value to maximize the byte hit rate improvement of LFUDA! | |
4299 | See cache_replacement_policy for a discussion of this policy. | |
4300 | DOC_END | |
4301 | ||
41bd17a4 | 4302 | NAME: cache_dir |
4303 | TYPE: cachedir | |
4304 | DEFAULT: none | |
2f8abb64 | 4305 | DEFAULT_DOC: No disk cache. Store cache objects only in memory. |
41bd17a4 | 4306 | LOC: Config.cacheSwap |
6b698a21 | 4307 | DOC_START |
638402dd AJ |
4308 | Format: |
4309 | cache_dir Type Directory-Name Fs-specific-data [options] | |
0976f8db | 4310 | |
41bd17a4 | 4311 | You can specify multiple cache_dir lines to spread the |
4312 | cache among different disk partitions. | |
0976f8db | 4313 | |
41bd17a4 | 4314 | Type specifies the kind of storage system to use. Only "ufs" |
4315 | is built by default. To enable any of the other storage systems | |
4316 | see the --enable-storeio configure option. | |
0976f8db | 4317 | |
41bd17a4 | 4318 | 'Directory' is a top-level directory where cache swap |
4319 | files will be stored. If you want to use an entire disk | |
4320 | for caching, this can be the mount-point directory. | |
4321 | The directory must exist and be writable by the Squid | |
4322 | process. Squid will NOT create this directory for you. | |
0976f8db | 4323 | |
62d711a8 AR |
4324 | Rock is currently the only SMP-aware cache_dir type. Using other |
4325 | store types in configurations with multiple workers is not | |
4326 | supported and may lead to HTTP violations or undefined behavior, | |
4327 | even when each such cache_dir is given a dedicated worker using | |
4328 | configuration conditionals. | |
acf69d74 | 4329 | |
638402dd AJ |
4330 | |
4331 | ==== The ufs store type ==== | |
0976f8db | 4332 | |
41bd17a4 | 4333 | "ufs" is the old well-known Squid storage format that has always |
4334 | been there. | |
0976f8db | 4335 | |
638402dd AJ |
4336 | Usage: |
4337 | cache_dir ufs Directory-Name Mbytes L1 L2 [options] | |
0976f8db | 4338 | |
41bd17a4 | 4339 | 'Mbytes' is the amount of disk space (MB) to use under this |
4340 | directory. The default is 100 MB. Change this to suit your | |
4341 | configuration. Do NOT put the size of your disk drive here. | |
4342 | Instead, if you want Squid to use the entire disk drive, | |
4343 | subtract 20% and use that value. | |
0976f8db | 4344 | |
56fba4d0 | 4345 | 'L1' is the number of first-level subdirectories which |
41bd17a4 | 4346 | will be created under the 'Directory'. The default is 16. |
0976f8db | 4347 | |
56fba4d0 | 4348 | 'L2' is the number of second-level subdirectories which |
41bd17a4 | 4349 | will be created under each first-level directory. The default |
4350 | is 256. | |
0976f8db | 4351 | |
638402dd AJ |
4352 | |
4353 | ==== The aufs store type ==== | |
7f7db318 | 4354 | |
41bd17a4 | 4355 | "aufs" uses the same storage format as "ufs", utilizing |
4356 | POSIX-threads to avoid blocking the main Squid process on | |
4357 | disk-I/O. This was formerly known in Squid as async-io. | |
38f9c547 | 4358 | |
638402dd AJ |
4359 | Usage: |
4360 | cache_dir aufs Directory-Name Mbytes L1 L2 [options] | |
38f9c547 | 4361 | |
41bd17a4 | 4362 | see argument descriptions under ufs above |
38f9c547 | 4363 | |
638402dd AJ |
4364 | |
4365 | ==== The diskd store type ==== | |
38f9c547 | 4366 | |
41bd17a4 | 4367 | "diskd" uses the same storage format as "ufs", utilizing a |
4368 | separate process to avoid blocking the main Squid process on | |
4369 | disk-I/O. | |
4c3ef9b2 | 4370 | |
638402dd AJ |
4371 | Usage: |
4372 | cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n] | |
0976f8db | 4373 | |
41bd17a4 | 4374 | see argument descriptions under ufs above |
0976f8db | 4375 | |
41bd17a4 | 4376 | Q1 specifies the number of unacknowledged I/O requests when Squid |
4377 | stops opening new files. If this many messages are in the queues, | |
4378 | Squid won't open new files. Default is 64 | |
0976f8db | 4379 | |
41bd17a4 | 4380 | Q2 specifies the number of unacknowledged messages when Squid |
4381 | starts blocking. If this many messages are in the queues, | |
4382 | Squid blocks until it receives some replies. Default is 72 | |
0976f8db | 4383 | |
41bd17a4 | 4384 | When Q1 < Q2 (the default), the cache directory is optimized |
4385 | for lower response time at the expense of a decrease in hit | |
4386 | ratio. If Q1 > Q2, the cache directory is optimized for | |
4387 | higher hit ratio at the expense of an increase in response | |
4388 | time. | |
0976f8db | 4389 | |
e2851fe7 | 4390 | |
638402dd AJ |
4391 | ==== The rock store type ==== |
4392 | ||
4393 | Usage: | |
e51ce7da | 4394 | cache_dir rock Directory-Name Mbytes [options] |
e2851fe7 | 4395 | |
2e55f083 | 4396 | The Rock Store type is a database-style storage. All cached |
e51ce7da AR |
4397 | entries are stored in a "database" file, using fixed-size slots. |
4398 | A single entry occupies one or more slots. | |
e2851fe7 | 4399 | |
3e1dfe3d AR |
4400 | If possible, Squid using Rock Store creates a dedicated kid |
4401 | process called "disker" to avoid blocking Squid worker(s) on disk | |
4402 | I/O. One disker kid is created for each rock cache_dir. Diskers | |
4403 | are created only when Squid, running in daemon mode, has support | |
4404 | for the IpcIo disk I/O module. | |
4405 | ||
43ebbac3 AR |
4406 | swap-timeout=msec: Squid will not start writing a miss to or |
4407 | reading a hit from disk if it estimates that the swap operation | |
4408 | will take more than the specified number of milliseconds. By | |
4409 | default and when set to zero, disables the disk I/O time limit | |
4410 | enforcement. Ignored when using blocking I/O module because | |
4411 | blocking synchronous I/O does not allow Squid to estimate the | |
4412 | expected swap wait time. | |
4413 | ||
df881a0f | 4414 | max-swap-rate=swaps/sec: Artificially limits disk access using |
1e614370 | 4415 | the specified I/O rate limit. Swap out requests that |
df881a0f | 4416 | would cause the average I/O rate to exceed the limit are |
1e614370 DK |
4417 | delayed. Individual swap in requests (i.e., hits or reads) are |
4418 | not delayed, but they do contribute to measured swap rate and | |
4419 | since they are placed in the same FIFO queue as swap out | |
4420 | requests, they may wait longer if max-swap-rate is smaller. | |
4421 | This is necessary on file systems that buffer "too | |
df881a0f AR |
4422 | many" writes and then start blocking Squid and other processes |
4423 | while committing those writes to disk. Usually used together | |
4424 | with swap-timeout to avoid excessive delays and queue overflows | |
4425 | when disk demand exceeds available disk "bandwidth". By default | |
4426 | and when set to zero, disables the disk I/O rate limit | |
4427 | enforcement. Currently supported by IpcIo module only. | |
4428 | ||
e51ce7da AR |
4429 | slot-size=bytes: The size of a database "record" used for |
4430 | storing cached responses. A cached response occupies at least | |
4431 | one slot and all database I/O is done using individual slots so | |
4432 | increasing this parameter leads to more disk space waste while | |
4433 | decreasing it leads to more disk I/O overheads. Should be a | |
4434 | multiple of your operating system I/O page size. Defaults to | |
4435 | 16KBytes. A housekeeping header is stored with each slot and | |
4436 | smaller slot-sizes will be rejected. The header is smaller than | |
4437 | 100 bytes. | |
4438 | ||
df881a0f | 4439 | |
638402dd | 4440 | ==== COMMON OPTIONS ==== |
0976f8db | 4441 | |
638402dd AJ |
4442 | no-store no new objects should be stored to this cache_dir. |
4443 | ||
4444 | min-size=n the minimum object size in bytes this cache_dir | |
4445 | will accept. It's used to restrict a cache_dir | |
4446 | to only store large objects (e.g. AUFS) while | |
4447 | other stores are optimized for smaller objects | |
73656056 | 4448 | (e.g. Rock). |
638402dd | 4449 | Defaults to 0. |
0976f8db | 4450 | |
638402dd AJ |
4451 | max-size=n the maximum object size in bytes this cache_dir |
4452 | supports. | |
499f852c A |
4453 | The value in maximum_object_size directive sets |
4454 | the default unless more specific details are | |
4455 | available (ie a small store capacity). | |
b6662ffd | 4456 | |
41bd17a4 | 4457 | Note: To make optimal use of the max-size limits you should order |
638402dd | 4458 | the cache_dir lines with the smallest max-size value first. |
0976f8db | 4459 | |
47f0eaea | 4460 | CONFIG_START |
e0855596 AJ |
4461 | |
4462 | # Uncomment and adjust the following to add a disk cache directory. | |
4463 | #cache_dir ufs @DEFAULT_SWAP_DIR@ 100 16 256 | |
47f0eaea | 4464 | CONFIG_END |
6b698a21 | 4465 | DOC_END |
0976f8db | 4466 | |
41bd17a4 | 4467 | NAME: store_dir_select_algorithm |
4468 | TYPE: string | |
4469 | LOC: Config.store_dir_select_algorithm | |
4470 | DEFAULT: least-load | |
6b698a21 | 4471 | DOC_START |
638402dd AJ |
4472 | How Squid selects which cache_dir to use when the response |
4473 | object will fit into more than one. | |
4474 | ||
4475 | Regardless of which algorithm is used the cache_dir min-size | |
4476 | and max-size parameters are obeyed. As such they can affect | |
4477 | the selection algorithm by limiting the set of considered | |
4478 | cache_dir. | |
4479 | ||
4480 | Algorithms: | |
4481 | ||
4482 | least-load | |
4483 | ||
4484 | This algorithm is suited to caches with similar cache_dir | |
4485 | sizes and disk speeds. | |
4486 | ||
4487 | The disk with the least I/O pending is selected. | |
4488 | When there are multiple disks with the same I/O load ranking | |
4489 | the cache_dir with most available capacity is selected. | |
4490 | ||
4491 | When a mix of cache_dir sizes are configured the faster disks | |
4492 | have a naturally lower I/O loading and larger disks have more | |
4493 | capacity. So space used to store objects and data throughput | |
4494 | may be very unbalanced towards larger disks. | |
4495 | ||
4496 | ||
4497 | round-robin | |
4498 | ||
4499 | This algorithm is suited to caches with unequal cache_dir | |
4500 | disk sizes. | |
4501 | ||
4502 | Each cache_dir is selected in a rotation. The next suitable | |
4503 | cache_dir is used. | |
4504 | ||
4505 | Available cache_dir capacity is only considered in relation | |
4506 | to whether the object will fit and meets the min-size and | |
4507 | max-size parameters. | |
4508 | ||
4509 | Disk I/O loading is only considered to prevent overload on slow | |
4510 | disks. This algorithm does not spread objects by size, so any | |
4511 | I/O loading per-disk may appear very unbalanced and volatile. | |
4512 | ||
29a238a3 AR |
4513 | If several cache_dirs use similar min-size, max-size, or other |
4514 | limits to to reject certain responses, then do not group such | |
4515 | cache_dir lines together, to avoid round-robin selection bias | |
4516 | towards the first cache_dir after the group. Instead, interleave | |
4517 | cache_dir lines from different groups. For example: | |
4518 | ||
4519 | store_dir_select_algorithm round-robin | |
4520 | cache_dir rock /hdd1 ... min-size=100000 | |
4521 | cache_dir rock /ssd1 ... max-size=99999 | |
4522 | cache_dir rock /hdd2 ... min-size=100000 | |
4523 | cache_dir rock /ssd2 ... max-size=99999 | |
4524 | cache_dir rock /hdd3 ... min-size=100000 | |
4525 | cache_dir rock /ssd3 ... max-size=99999 | |
6b698a21 | 4526 | DOC_END |
0976f8db | 4527 | |
b2aca62a EB |
4528 | NAME: paranoid_hit_validation |
4529 | COMMENT: time-units-small | |
4530 | TYPE: time_nanoseconds | |
4531 | DEFAULT: 0 | |
4532 | DEFAULT_DOC: validation disabled | |
4533 | LOC: Config.paranoid_hit_validation | |
4534 | DOC_START | |
4535 | Controls whether Squid should perform paranoid validation of cache entry | |
4536 | metadata integrity every time a cache entry is hit. This low-level | |
4537 | validation should always succeed. Each failed validation results in a | |
4538 | cache miss, a BUG line reported to cache.log, and the invalid entry | |
4539 | marked as unusable (and eventually purged from the cache). | |
4540 | ||
4541 | Squid can only validate shared cache memory and rock cache_dir entries. | |
4542 | ||
4543 | * Zero (default) value means that the validation is disabled. | |
4544 | ||
4545 | * Positive values enable validation: | |
4546 | - values less than 1 day approximate the maximum time that Squid is allowed | |
4547 | to spend validating a single cache hit. | |
4548 | - values greater or equal to 1 day are considered as no limitation: | |
4549 | in this case all checks will be performed, regardless of how much time | |
4550 | they take. | |
4551 | ||
4552 | Hits are usually stored using 16KB slots (for rock, the size is | |
4553 | configurable via cache_dir slot-size). Larger hits require scanning more | |
4554 | slots and, hence, take more time. When validation is enabled, at least one | |
4555 | slot is always validated, regardless of the configured time limit. | |
4556 | ||
4557 | A worker process validating an entry cannot do anything else (i.e. the | |
4558 | validation is blocking). The validation overhead is environment dependent, | |
4559 | but developers have observed Squid spending 3-10 microseconds to check each | |
4560 | slot of a Rock or shared memory hit entry. If Squid cuts validation short | |
4561 | because it runs out of configured time, it treats the entry as valid. | |
4562 | ||
4563 | When hit validation is enabled, its statistics is included in Cache | |
4564 | Manager mgr:counters, mgr:5min, and mgr:60min reports. | |
4565 | DOC_END | |
4566 | ||
41bd17a4 | 4567 | NAME: max_open_disk_fds |
4568 | TYPE: int | |
4569 | LOC: Config.max_open_disk_fds | |
4570 | DEFAULT: 0 | |
638402dd | 4571 | DEFAULT_DOC: no limit |
6b698a21 | 4572 | DOC_START |
41bd17a4 | 4573 | To avoid having disk as the I/O bottleneck Squid can optionally |
4574 | bypass the on-disk cache if more than this amount of disk file | |
4575 | descriptors are open. | |
4576 | ||
4577 | A value of 0 indicates no limit. | |
6b698a21 | 4578 | DOC_END |
0976f8db | 4579 | |
41bd17a4 | 4580 | NAME: cache_swap_low |
4581 | COMMENT: (percent, 0-100) | |
5473c134 | 4582 | TYPE: int |
41bd17a4 | 4583 | DEFAULT: 90 |
4584 | LOC: Config.Swap.lowWaterMark | |
638402dd | 4585 | DOC_START |
5f662601 AJ |
4586 | The low-water mark for AUFS/UFS/diskd cache object eviction by |
4587 | the cache_replacement_policy algorithm. | |
4588 | ||
4589 | Removal begins when the swap (disk) usage of a cache_dir is | |
4590 | above this low-water mark and attempts to maintain utilization | |
4591 | near the low-water mark. | |
4592 | ||
4593 | As swap utilization increases towards the high-water mark set | |
2f8abb64 | 4594 | by cache_swap_high object eviction becomes more aggressive. |
5f662601 AJ |
4595 | |
4596 | The value difference in percentages between low- and high-water | |
7bcaf76f | 4597 | marks represent an eviction rate of 300 objects per second and |
2f8abb64 | 4598 | the rate continues to scale in aggressiveness by multiples of |
5f662601 | 4599 | this above the high-water mark. |
638402dd AJ |
4600 | |
4601 | Defaults are 90% and 95%. If you have a large cache, 5% could be | |
4602 | hundreds of MB. If this is the case you may wish to set these | |
4603 | numbers closer together. | |
4604 | ||
5f662601 | 4605 | See also cache_swap_high and cache_replacement_policy |
638402dd | 4606 | DOC_END |
41bd17a4 | 4607 | |
4608 | NAME: cache_swap_high | |
4609 | COMMENT: (percent, 0-100) | |
4610 | TYPE: int | |
4611 | DEFAULT: 95 | |
4612 | LOC: Config.Swap.highWaterMark | |
6b698a21 | 4613 | DOC_START |
5f662601 AJ |
4614 | The high-water mark for AUFS/UFS/diskd cache object eviction by |
4615 | the cache_replacement_policy algorithm. | |
4616 | ||
4617 | Removal begins when the swap (disk) usage of a cache_dir is | |
4618 | above the low-water mark set by cache_swap_low and attempts to | |
4619 | maintain utilization near the low-water mark. | |
4620 | ||
4621 | As swap utilization increases towards this high-water mark object | |
2f8abb64 | 4622 | eviction becomes more aggressive. |
5f662601 AJ |
4623 | |
4624 | The value difference in percentages between low- and high-water | |
7bcaf76f | 4625 | marks represent an eviction rate of 300 objects per second and |
2f8abb64 | 4626 | the rate continues to scale in aggressiveness by multiples of |
5f662601 | 4627 | this above the high-water mark. |
41bd17a4 | 4628 | |
4629 | Defaults are 90% and 95%. If you have a large cache, 5% could be | |
4630 | hundreds of MB. If this is the case you may wish to set these | |
4631 | numbers closer together. | |
638402dd | 4632 | |
5f662601 | 4633 | See also cache_swap_low and cache_replacement_policy |
6b698a21 | 4634 | DOC_END |
0976f8db | 4635 | |
5473c134 | 4636 | COMMENT_START |
41bd17a4 | 4637 | LOGFILE OPTIONS |
5473c134 | 4638 | ----------------------------------------------------------------------------- |
4639 | COMMENT_END | |
0976f8db | 4640 | |
41bd17a4 | 4641 | NAME: logformat |
4642 | TYPE: logformat | |
20efa1c2 | 4643 | LOC: Log::TheConfig |
5473c134 | 4644 | DEFAULT: none |
638402dd | 4645 | DEFAULT_DOC: The format definitions squid, common, combined, referrer, useragent are built in. |
6b698a21 | 4646 | DOC_START |
41bd17a4 | 4647 | Usage: |
0976f8db | 4648 | |
41bd17a4 | 4649 | logformat <name> <format specification> |
0976f8db | 4650 | |
41bd17a4 | 4651 | Defines an access log format. |
6b698a21 | 4652 | |
41bd17a4 | 4653 | The <format specification> is a string with embedded % format codes |
5473c134 | 4654 | |
bec110e4 EB |
4655 | % format codes all follow the same basic structure where all |
4656 | components but the formatcode are optional and usually unnecessary, | |
4657 | especially when dealing with common codes. | |
6b698a21 | 4658 | |
bec110e4 | 4659 | % [encoding] [-] [[0]width] [{arg}] formatcode [{arg}] |
0976f8db | 4660 | |
bec110e4 EB |
4661 | encoding escapes or otherwise protects "special" characters: |
4662 | ||
4663 | " Quoted string encoding where quote(") and | |
4664 | backslash(\) characters are \-escaped while | |
4665 | CR, LF, and TAB characters are encoded as \r, | |
4666 | \n, and \t two-character sequences. | |
4667 | ||
4668 | [ Custom Squid encoding where percent(%), square | |
4669 | brackets([]), backslash(\) and characters with | |
4670 | codes outside of [32,126] range are %-encoded. | |
4671 | SP is not encoded. Used by log_mime_hdrs. | |
4672 | ||
4673 | # URL encoding (a.k.a. percent-encoding) where | |
4674 | all URL unsafe and control characters (per RFC | |
4675 | 1738) are %-encoded. | |
4676 | ||
4677 | / Shell-like encoding where quote(") and | |
4678 | backslash(\) characters are \-escaped while CR | |
4679 | and LF characters are encoded as \r and \n | |
4680 | two-character sequences. Values containing SP | |
4681 | character(s) are surrounded by quotes("). | |
4682 | ||
4683 | ' Raw/as-is encoding with no escaping/quoting. | |
4684 | ||
4685 | Default encoding: When no explicit encoding is | |
4686 | specified, each %code determines its own encoding. | |
4687 | Most %codes use raw/as-is encoding, but some codes use | |
4688 | a so called "pass-through URL encoding" where all URL | |
4689 | unsafe and control characters (per RFC 1738) are | |
4690 | %-encoded, but the percent character(%) is left as is. | |
5473c134 | 4691 | |
41bd17a4 | 4692 | - left aligned |
c32c6db7 AR |
4693 | |
4694 | width minimum and/or maximum field width: | |
4695 | [width_min][.width_max] | |
e2851fe7 AR |
4696 | When minimum starts with 0, the field is zero-padded. |
4697 | String values exceeding maximum width are truncated. | |
c32c6db7 | 4698 | |
4e56d7f6 AJ |
4699 | {arg} argument such as header name etc. This field may be |
4700 | placed before or after the token, but not both at once. | |
5473c134 | 4701 | |
41bd17a4 | 4702 | Format codes: |
5473c134 | 4703 | |
3ff65596 | 4704 | % a literal % character |
007cd686 EB |
4705 | |
4706 | byte{value} Adds a single byte with the given value (e.g., %byte{10} | |
4707 | adds an ASCII LF character a.k.a. "new line" or "\n"). The value | |
4708 | parameter is required and must be a positive decimal integer not | |
4709 | exceeding 255. Zero-valued bytes (i.e. ASCII NUL characters) are | |
4710 | not yet supported. | |
4711 | ||
f4b68e1a AJ |
4712 | sn Unique sequence number per log line entry |
4713 | err_code The ID of an error response served by Squid or | |
4714 | a similar internal error identifier. | |
ea3f56e2 AR |
4715 | |
4716 | err_detail Additional err_code-dependent error information. Multiple | |
4717 | details are separated by the plus sign ('+'). Admins should not | |
4718 | rely on a particular detail listing order, the uniqueness of the | |
4719 | entries, or individual detail text stability. All those properties | |
4720 | depend on many unstable factors, including external libraries. | |
4721 | ||
c7bcf010 | 4722 | note The annotation specified by the argument. Also |
d7f4a0b7 CT |
4723 | logs the adaptation meta headers set by the |
4724 | adaptation_meta configuration parameter. | |
c7bcf010 CT |
4725 | If no argument given all annotations logged. |
4726 | The argument may include a separator to use with | |
4727 | annotation values: | |
4728 | name[:separator] | |
4729 | By default, multiple note values are separated with "," | |
4730 | and multiple notes are separated with "\r\n". | |
4731 | When logging named notes with %{name}note, the | |
4732 | explicitly configured separator is used between note | |
4733 | values. When logging all notes with %note, the | |
4734 | explicitly configured separator is used between | |
4735 | individual notes. There is currently no way to | |
4736 | specify both value and notes separators when logging | |
4737 | all notes with %note. | |
7cfd3a41 EB |
4738 | master_xaction The master transaction identifier is an unsigned |
4739 | integer. These IDs are guaranteed to monotonically | |
4740 | increase within a single worker process lifetime, with | |
4741 | higher values corresponding to transactions that were | |
4742 | accepted or initiated later. Due to current implementation | |
4743 | deficiencies, some IDs are skipped (i.e. never logged). | |
4744 | Concurrent workers and restarted workers use similar, | |
4745 | overlapping sequences of master transaction IDs. | |
f4b68e1a AJ |
4746 | |
4747 | Connection related format codes: | |
4748 | ||
41bd17a4 | 4749 | >a Client source IP address |
4750 | >A Client FQDN | |
4751 | >p Client source port | |
8652f8e7 AJ |
4752 | >eui Client source EUI (MAC address, EUI-48 or EUI-64 identifier) |
4753 | >la Local IP address the client connected to | |
4754 | >lp Local port number the client connected to | |
f123f5e9 | 4755 | >qos Client connection TOS/DSCP value set by Squid |
244da4ad | 4756 | >nfmark Client connection netfilter packet MARK set by Squid |
8652f8e7 | 4757 | |
a120b7a8 CT |
4758 | transport::>connection_id Identifies a transport connection |
4759 | accepted by Squid (e.g., a connection carrying the | |
4760 | logged HTTP request). Currently, Squid only supports | |
4761 | TCP transport connections. | |
4762 | ||
4763 | The logged identifier is an unsigned integer. These | |
4764 | IDs are guaranteed to monotonically increase within a | |
4765 | single worker process lifetime, with higher values | |
4766 | corresponding to connections that were accepted later. | |
4767 | Many IDs are skipped (i.e. never logged). Concurrent | |
4768 | workers and restarted workers use similar, partially | |
4769 | overlapping sequences of IDs. | |
4770 | ||
28417506 CT |
4771 | la Local listening IP address the client connection was connected to. |
4772 | lp Local listening port number the client connection was connected to. | |
4773 | ||
8652f8e7 AJ |
4774 | <a Server IP address of the last server or peer connection |
4775 | <A Server FQDN or peer name | |
4776 | <p Server port number of the last server or peer connection | |
c3a082ae | 4777 | <la Local IP address of the last server or peer connection |
152e24b3 | 4778 | <lp Local port number of the last server or peer connection |
f123f5e9 | 4779 | <qos Server connection TOS/DSCP value set by Squid |
244da4ad | 4780 | <nfmark Server connection netfilter packet MARK set by Squid |
f4b68e1a | 4781 | |
6131103b CT |
4782 | >handshake Raw client handshake |
4783 | Initial client bytes received by Squid on a newly | |
4784 | accepted TCP connection or inside a just established | |
4785 | CONNECT tunnel. Squid stops accumulating handshake | |
4786 | bytes as soon as the handshake parser succeeds or | |
4787 | fails (determining whether the client is using the | |
4788 | expected protocol). | |
4789 | ||
4790 | For HTTP clients, the handshake is the request line. | |
4791 | For TLS clients, the handshake consists of all TLS | |
4792 | records up to and including the TLS record that | |
4793 | contains the last byte of the first ClientHello | |
4794 | message. For clients using an unsupported protocol, | |
4795 | this field contains the bytes received by Squid at the | |
4796 | time of the handshake parsing failure. | |
4797 | ||
4798 | See the on_unsupported_protocol directive for more | |
4799 | information on Squid handshake traffic expectations. | |
4800 | ||
4801 | Current support is limited to these contexts: | |
4802 | - http_port connections, but only when the | |
4803 | on_unsupported_protocol directive is in use. | |
4804 | - https_port connections (and CONNECT tunnels) that | |
4805 | are subject to the ssl_bump peek or stare action. | |
4806 | ||
4807 | To protect binary handshake data, this field is always | |
4808 | base64-encoded (RFC 4648 Section 4). If logformat | |
4809 | field encoding is configured, that encoding is applied | |
4810 | on top of base64. Otherwise, the computed base64 value | |
4811 | is recorded as is. | |
4812 | ||
f4b68e1a AJ |
4813 | Time related format codes: |
4814 | ||
41bd17a4 | 4815 | ts Seconds since epoch |
4816 | tu subsecond time (milliseconds) | |
4817 | tl Local time. Optional strftime format argument | |
3ff65596 | 4818 | default %d/%b/%Y:%H:%M:%S %z |
41bd17a4 | 4819 | tg GMT time. Optional strftime format argument |
3ff65596 | 4820 | default %d/%b/%Y:%H:%M:%S %z |
41bd17a4 | 4821 | tr Response time (milliseconds) |
3ff65596 | 4822 | dt Total time spent making DNS lookups (milliseconds) |
9603207d | 4823 | tS Approximate master transaction start time in |
af0ded40 CT |
4824 | <full seconds since epoch>.<fractional seconds> format. |
4825 | Currently, Squid considers the master transaction | |
4826 | started when a complete HTTP request header initiating | |
4827 | the transaction is received from the client. This is | |
4828 | the same value that Squid uses to calculate transaction | |
4829 | response time when logging %tr to access.log. Currently, | |
4830 | Squid uses millisecond resolution for %tS values, | |
4831 | similar to the default access.log "current time" field | |
4832 | (%ts.%03tu). | |
3ff65596 | 4833 | |
0cd2a1b6 AR |
4834 | busy_time Time spent in transaction-related code (nanoseconds) |
4835 | This cumulative measurement excludes periods of time when the | |
4836 | transaction was waiting (e.g., for a server or helper response) | |
4837 | while Squid worked on other transactions or was engaged in | |
4838 | transaction-unrelated activities (e.g., generating a cache index). | |
4839 | In other words, this measurement represents the total amount of | |
4840 | physical time when Squid was busy working on this transaction. | |
4841 | ||
4842 | WARNING: This measurement relies on Squid transaction context | |
4843 | tracking features that currently have known context leak bugs and | |
4844 | coverage gaps. Until those features are fully implemented, logged | |
4845 | values may significantly understate or exaggerate actual times. | |
4846 | Do not use this measurement unless you know it works in your case. | |
4847 | ||
8652f8e7 AJ |
4848 | Access Control related format codes: |
4849 | ||
4850 | et Tag returned by external acl | |
4851 | ea Log string returned by external acl | |
4852 | un User name (any available) | |
4853 | ul User name from authentication | |
4854 | ue User name from external acl helper | |
4855 | ui User name from ident | |
50b5c983 AJ |
4856 | un A user name. Expands to the first available name |
4857 | from the following list of information sources: | |
4858 | - authenticated user name, like %ul | |
4859 | - user name supplied by an external ACL, like %ue | |
4860 | - SSL client name, like %us | |
4861 | - ident user name, like %ui | |
d4806c91 CT |
4862 | credentials Client credentials. The exact meaning depends on |
4863 | the authentication scheme: For Basic authentication, | |
4864 | it is the password; for Digest, the realm sent by the | |
4865 | client; for NTLM and Negotiate, the client challenge | |
4866 | or client credentials prefixed with "YR " or "KK ". | |
8652f8e7 AJ |
4867 | |
4868 | HTTP related format codes: | |
3ff65596 | 4869 | |
d6df21d2 AJ |
4870 | REQUEST |
4871 | ||
4872 | [http::]rm Request method (GET/POST etc) | |
4873 | [http::]>rm Request method from client | |
4874 | [http::]<rm Request method sent to server or peer | |
bec110e4 EB |
4875 | |
4876 | [http::]ru Request URL received (or computed) and sanitized | |
4877 | ||
4878 | Logs request URI received from the client, a | |
4879 | request adaptation service, or a request | |
4880 | redirector (whichever was applied last). | |
4881 | ||
4882 | Computed URLs are URIs of internally generated | |
4883 | requests and various "error:..." URIs. | |
4884 | ||
4885 | Honors strip_query_terms and uri_whitespace. | |
4886 | ||
4887 | This field is not encoded by default. Encoding | |
4888 | this field using variants of %-encoding will | |
4889 | clash with uri_whitespace modifications that | |
4890 | also use %-encoding. | |
4891 | ||
4892 | [http::]>ru Request URL received from the client (or computed) | |
4893 | ||
4894 | Computed URLs are URIs of internally generated | |
4895 | requests and various "error:..." URIs. | |
4896 | ||
4897 | Unlike %ru, this request URI is not affected | |
4898 | by request adaptation, URL rewriting services, | |
4899 | and strip_query_terms. | |
4900 | ||
4901 | Honors uri_whitespace. | |
4902 | ||
4903 | This field is using pass-through URL encoding | |
4904 | by default. Encoding this field using other | |
4905 | variants of %-encoding will clash with | |
4906 | uri_whitespace modifications that also use | |
4907 | %-encoding. | |
4908 | ||
d6df21d2 | 4909 | [http::]<ru Request URL sent to server or peer |
5aca9cf2 AJ |
4910 | [http::]>rs Request URL scheme from client |
4911 | [http::]<rs Request URL scheme sent to server or peer | |
fa450988 | 4912 | [http::]>rd Request URL domain from client |
f42ac6e6 | 4913 | [http::]<rd Request URL domain sent to server or peer |
5aca9cf2 AJ |
4914 | [http::]>rP Request URL port from client |
4915 | [http::]<rP Request URL port sent to server or peer | |
4916 | [http::]rp Request URL path excluding hostname | |
4917 | [http::]>rp Request URL path excluding hostname from client | |
4918 | [http::]<rp Request URL path excluding hostname sent to server or peer | |
d6df21d2 AJ |
4919 | [http::]rv Request protocol version |
4920 | [http::]>rv Request protocol version from client | |
4921 | [http::]<rv Request protocol version sent to server or peer | |
4922 | ||
5aca9cf2 | 4923 | [http::]>h Original received request header. |
19483c50 AR |
4924 | Usually differs from the request header sent by |
4925 | Squid, although most fields are often preserved. | |
4926 | Accepts optional header field name/value filter | |
4927 | argument using name[:[separator]element] format. | |
4928 | [http::]>ha Received request header after adaptation and | |
4929 | redirection (pre-cache REQMOD vectoring point). | |
4930 | Usually differs from the request header sent by | |
4931 | Squid, although most fields are often preserved. | |
6fca33e0 | 4932 | Optional header name argument as for >h |
d6df21d2 | 4933 | |
d6df21d2 AJ |
4934 | RESPONSE |
4935 | ||
4936 | [http::]<Hs HTTP status code received from the next hop | |
4937 | [http::]>Hs HTTP status code sent to the client | |
4938 | ||
3ff65596 AR |
4939 | [http::]<h Reply header. Optional header name argument |
4940 | as for >h | |
d6df21d2 AJ |
4941 | |
4942 | [http::]mt MIME content type | |
4943 | ||
4944 | ||
4945 | SIZE COUNTERS | |
4946 | ||
4947 | [http::]st Total size of request + reply traffic with client | |
4948 | [http::]>st Total size of request received from client. | |
4949 | Excluding chunked encoding bytes. | |
4950 | [http::]<st Total size of reply sent to client (after adaptation) | |
4951 | ||
4952 | [http::]>sh Size of request headers received from client | |
4953 | [http::]<sh Size of reply headers sent to client (after adaptation) | |
4954 | ||
4955 | [http::]<sH Reply high offset sent | |
4956 | [http::]<sS Upstream object size | |
4957 | ||
9603207d | 4958 | [http::]<bs Number of HTTP-equivalent message body bytes |
bae917ac CT |
4959 | received from the next hop, excluding chunked |
4960 | transfer encoding and control messages. | |
6ea12e8f | 4961 | Generated FTP listings are treated as |
bae917ac | 4962 | received bodies. |
d6df21d2 | 4963 | |
d6df21d2 AJ |
4964 | TIMING |
4965 | ||
3ff65596 AR |
4966 | [http::]<pt Peer response time in milliseconds. The timer starts |
4967 | when the last request byte is sent to the next hop | |
4968 | and stops when the last response byte is received. | |
9603207d | 4969 | [http::]<tt Total time in milliseconds. The timer |
3ff65596 AR |
4970 | starts with the first connect request (or write I/O) |
4971 | sent to the first selected peer. The timer stops | |
4972 | with the last I/O with the last peer. | |
4973 | ||
8652f8e7 AJ |
4974 | Squid handling related format codes: |
4975 | ||
4976 | Ss Squid request status (TCP_MISS etc) | |
4977 | Sh Squid hierarchy status (DEFAULT_PARENT etc) | |
4978 | ||
e7a9b7a8 EB |
4979 | [http::]request_attempts Number of request forwarding attempts |
4980 | ||
4981 | See forward_max_tries documentation that details what Squid counts | |
4982 | as a forwarding attempt. Pure cache hits log zero, but cache hits | |
4983 | that triggered HTTP cache revalidation log the number of attempts | |
4984 | made when sending an internal revalidation request. DNS, ICMP, | |
4985 | ICP, HTCP, ESI, ICAP, eCAP, helper, and other secondary requests | |
4986 | sent by Squid as a part of a master transaction do not increment | |
4987 | the counter logged for the received request. | |
4988 | ||
08097970 AR |
4989 | SSL-related format codes: |
4990 | ||
4991 | ssl::bump_mode SslBump decision for the transaction: | |
4992 | ||
4993 | For CONNECT requests that initiated bumping of | |
4994 | a connection and for any request received on | |
4995 | an already bumped connection, Squid logs the | |
bf352fb2 CT |
4996 | corresponding SslBump mode ("splice", "bump", |
4997 | "peek", "stare", "terminate", "server-first" | |
9603207d | 4998 | or "client-first"). See the ssl_bump option |
bf352fb2 | 4999 | for more information about these modes. |
08097970 AR |
5000 | |
5001 | A "none" token is logged for requests that | |
5002 | triggered "ssl_bump" ACL evaluation matching | |
bf352fb2 | 5003 | a "none" rule. |
08097970 AR |
5004 | |
5005 | In all other cases, a single dash ("-") is | |
5006 | logged. | |
5007 | ||
4f6990ec | 5008 | ssl::>sni SSL client SNI sent to Squid. |
cedca6e7 | 5009 | |
c28b9a0e AJ |
5010 | ssl::>cert_subject |
5011 | The Subject field of the received client | |
5012 | SSL certificate or a dash ('-') if Squid has | |
5013 | received an invalid/malformed certificate or | |
5014 | no certificate at all. Consider encoding the | |
5015 | logged value because Subject often has spaces. | |
5016 | ||
5017 | ssl::>cert_issuer | |
5018 | The Issuer field of the received client | |
5019 | SSL certificate or a dash ('-') if Squid has | |
5020 | received an invalid/malformed certificate or | |
5021 | no certificate at all. Consider encoding the | |
5022 | logged value because Issuer often has spaces. | |
5023 | ||
e2e33acc CT |
5024 | ssl::<cert_subject |
5025 | The Subject field of the received server | |
5026 | TLS certificate or a dash ('-') if this is | |
5027 | not available. Consider encoding the logged | |
5028 | value because Subject often has spaces. | |
5029 | ||
8f1c6091 | 5030 | ssl::<cert_issuer |
e2e33acc CT |
5031 | The Issuer field of the received server |
5032 | TLS certificate or a dash ('-') if this is | |
5033 | not available. Consider encoding the logged | |
5034 | value because Issuer often has spaces. | |
5035 | ||
12b5040f DN |
5036 | ssl::<cert |
5037 | The received server x509 certificate in PEM | |
5038 | format, including BEGIN and END lines (or a | |
5039 | dash ('-') if the certificate is unavailable). | |
5040 | ||
5041 | WARNING: Large certificates will exceed the | |
5042 | current 8KB access.log record limit, resulting | |
5043 | in truncated records. Such truncation usually | |
5044 | happens in the middle of a record field. The | |
5045 | limit applies to all access logging modules. | |
5046 | ||
5047 | The logged certificate may have failed | |
5048 | validation and may not be trusted by Squid. | |
5049 | This field does not include any intermediate | |
5050 | certificates that may have been received from | |
5051 | the server or fetched during certificate | |
5052 | validation process. | |
5053 | ||
5054 | Currently, Squid only collects server | |
5055 | certificates during step3 of SslBump | |
5056 | processing; connections that were not subject | |
5057 | to ssl_bump rules or that did not match a peek | |
5058 | or stare rule at step2 will not have the | |
5059 | server certificate information. | |
5060 | ||
5061 | This field is using pass-through URL encoding | |
5062 | by default. | |
5063 | ||
c28b9a0e AJ |
5064 | ssl::<cert_errors |
5065 | The list of certificate validation errors | |
5066 | detected by Squid (including OpenSSL and | |
5067 | certificate validation helper components). The | |
5068 | errors are listed in the discovery order. By | |
5069 | default, the error codes are separated by ':'. | |
5070 | Accepts an optional separator argument. | |
5071 | ||
2bcab852 CT |
5072 | %ssl::>negotiated_version The negotiated TLS version of the |
5073 | client connection. | |
5074 | ||
5075 | %ssl::<negotiated_version The negotiated TLS version of the | |
5076 | last server or peer connection. | |
5077 | ||
5078 | %ssl::>received_hello_version The TLS version of the Hello | |
5079 | message received from TLS client. | |
5080 | ||
5081 | %ssl::<received_hello_version The TLS version of the Hello | |
5082 | message received from TLS server. | |
5083 | ||
5084 | %ssl::>received_supported_version The maximum TLS version | |
5085 | supported by the TLS client. | |
5086 | ||
5087 | %ssl::<received_supported_version The maximum TLS version | |
5088 | supported by the TLS server. | |
5089 | ||
5090 | %ssl::>negotiated_cipher The negotiated cipher of the | |
5091 | client connection. | |
5092 | ||
5093 | %ssl::<negotiated_cipher The negotiated cipher of the | |
5094 | last server or peer connection. | |
5095 | ||
5038f9d8 | 5096 | If ICAP is enabled, the following code becomes available (as |
3ff65596 AR |
5097 | well as ICAP log codes documented with the icap_log option): |
5098 | ||
40dc90df AR |
5099 | icap::tt Total ICAP "blocking" time for the HTTP transaction. The |
5100 | timer ticks while Squid checks adaptation_access and while | |
5101 | ICAP transaction(s) expect ICAP response headers, including | |
5102 | the embedded adapted HTTP message headers (where applicable). | |
5103 | This measurement is meant to estimate ICAP impact on HTTP | |
5104 | transaction response times, but it does not currently account | |
5105 | for slow ICAP response body delivery blocking HTTP progress. | |
5106 | ||
5107 | Once Squid receives the final ICAP response headers (e.g., | |
5108 | ICAP 200 or 204) and the associated adapted HTTP message | |
5109 | headers (if any) from the ICAP service, the corresponding ICAP | |
5110 | transaction stops affecting this measurement, even though the | |
5111 | transaction itself may continue for a long time (e.g., to | |
5112 | finish sending the ICAP request and/or to finish receiving the | |
5113 | ICAP response body). | |
5114 | ||
5115 | When "blocking" sections of multiple concurrent ICAP | |
5116 | transactions overlap in time, the overlapping segment is | |
5117 | counted only once. | |
5118 | ||
5119 | To see complete ICAP transaction response times (rather than | |
5120 | the cumulative effect of their blocking sections) use the | |
5121 | %adapt::all_trs logformat code or the icap_log directive. | |
3ff65596 | 5122 | |
c28b9a0e | 5123 | If adaptation is enabled the following codes become available: |
3ff65596 | 5124 | |
5038f9d8 AR |
5125 | adapt::<last_h The header of the last ICAP response or |
5126 | meta-information from the last eCAP | |
5127 | transaction related to the HTTP transaction. | |
5128 | Like <h, accepts an optional header name | |
5129 | argument. | |
3ff65596 AR |
5130 | |
5131 | adapt::sum_trs Summed adaptation transaction response | |
5132 | times recorded as a comma-separated list in | |
5133 | the order of transaction start time. Each time | |
5134 | value is recorded as an integer number, | |
5135 | representing response time of one or more | |
5136 | adaptation (ICAP or eCAP) transaction in | |
5137 | milliseconds. When a failed transaction is | |
5138 | being retried or repeated, its time is not | |
5139 | logged individually but added to the | |
40dc90df AR |
5140 | replacement (next) transaction. Lifetimes of individually |
5141 | listed adaptation transactions may overlap. | |
5142 | See also: %icap::tt and %adapt::all_trs. | |
3ff65596 AR |
5143 | |
5144 | adapt::all_trs All adaptation transaction response times. | |
40dc90df | 5145 | Same as %adapt::sum_trs but response times of |
3ff65596 AR |
5146 | individual transactions are never added |
5147 | together. Instead, all transaction response | |
5148 | times are recorded individually. | |
5149 | ||
5150 | You can prefix adapt::*_trs format codes with adaptation | |
5151 | service name in curly braces to record response time(s) specific | |
5152 | to that service. For example: %{my_service}adapt::sum_trs | |
5473c134 | 5153 | |
36c774f7 EB |
5154 | Format codes related to the PROXY protocol: |
5155 | ||
5156 | proxy_protocol::>h PROXY protocol header, including optional TLVs. | |
5157 | ||
5158 | Supports the same field and element reporting/extraction logic | |
5159 | as %http::>h. For configuration and reporting purposes, Squid | |
5160 | maps each PROXY TLV to an HTTP header field: the TLV type | |
5161 | (configured as a decimal integer) is the field name, and the | |
5162 | TLV value is the field value. All TLVs of "LOCAL" connections | |
5163 | (in PROXY protocol terminology) are currently skipped/ignored. | |
5164 | ||
5165 | Squid also maps the following standard PROXY protocol header | |
5166 | blocks to pseudo HTTP headers (their names use PROXY | |
5167 | terminology and start with a colon, following HTTP tradition | |
5168 | for pseudo headers): :command, :version, :src_addr, :dst_addr, | |
5169 | :src_port, and :dst_port. | |
5170 | ||
5171 | Without optional parameters, this logformat code logs | |
5172 | pseudo headers and TLVs. | |
5173 | ||
5174 | This format code uses pass-through URL encoding by default. | |
5175 | ||
5176 | Example: | |
5177 | # relay custom PROXY TLV #224 to adaptation services | |
5178 | adaptation_meta Client-Foo "%proxy_protocol::>h{224}" | |
5179 | ||
5180 | See also: %http::>h | |
5181 | ||
7d9acc3c AJ |
5182 | The default formats available (which do not need re-defining) are: |
5183 | ||
bd85ea1f AJ |
5184 | logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt |
5185 | logformat common %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh | |
5186 | logformat combined %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh | |
20efa1c2 AJ |
5187 | logformat referrer %ts.%03tu %>a %{Referer}>h %ru |
5188 | logformat useragent %>a [%tl] "%{User-Agent}>h" | |
5189 | ||
8652f8e7 AJ |
5190 | NOTE: When the log_mime_hdrs directive is set to ON. |
5191 | The squid, common and combined formats have a safely encoded copy | |
5192 | of the mime headers appended to each line within a pair of brackets. | |
5193 | ||
5194 | NOTE: The common and combined formats are not quite true to the Apache definition. | |
5195 | The logs from Squid contain an extra status and hierarchy code appended. | |
20efa1c2 | 5196 | |
5473c134 | 5197 | DOC_END |
5198 | ||
41bd17a4 | 5199 | NAME: access_log cache_access_log |
5200 | TYPE: access_log | |
5201 | LOC: Config.Log.accesslogs | |
82b7abe3 | 5202 | DEFAULT_IF_NONE: daemon:@DEFAULT_ACCESS_LOG@ squid |
5473c134 | 5203 | DOC_START |
fb0c2f17 | 5204 | Configures whether and how Squid logs HTTP and ICP transactions. |
9603207d | 5205 | If access logging is enabled, a single line is logged for every |
fb0c2f17 NH |
5206 | matching HTTP or ICP request. The recommended directive formats are: |
5207 | ||
5208 | access_log <module>:<place> [option ...] [acl acl ...] | |
5209 | access_log none [acl acl ...] | |
5210 | ||
5211 | The following directive format is accepted but may be deprecated: | |
82b7abe3 | 5212 | access_log <module>:<place> [<logformat name> [acl acl ...]] |
fb0c2f17 NH |
5213 | |
5214 | In most cases, the first ACL name must not contain the '=' character | |
5215 | and should not be equal to an existing logformat name. You can always | |
5216 | start with an 'all' ACL to work around those restrictions. | |
9603207d | 5217 | |
82b7abe3 | 5218 | Will log to the specified module:place using the specified format (which |
41bd17a4 | 5219 | must be defined in a logformat directive) those entries which match |
5220 | ALL the acl's specified (which must be defined in acl clauses). | |
82b7abe3 | 5221 | If no acl is specified, all requests will be logged to this destination. |
9603207d | 5222 | |
fb0c2f17 NH |
5223 | ===== Available options for the recommended directive format ===== |
5224 | ||
5225 | logformat=name Names log line format (either built-in or | |
5226 | defined by a logformat directive). Defaults | |
5227 | to 'squid'. | |
5228 | ||
5229 | buffer-size=64KB Defines approximate buffering limit for log | |
5230 | records (see buffered_logs). Squid should not | |
5231 | keep more than the specified size and, hence, | |
5232 | should flush records before the buffer becomes | |
5233 | full to avoid overflows under normal | |
5234 | conditions (the exact flushing algorithm is | |
5235 | module-dependent though). The on-error option | |
5236 | controls overflow handling. | |
5237 | ||
5238 | on-error=die|drop Defines action on unrecoverable errors. The | |
5239 | 'drop' action ignores (i.e., does not log) | |
5240 | affected log records. The default 'die' action | |
9603207d | 5241 | kills the affected worker. The drop action |
fb0c2f17 NH |
5242 | support has not been tested for modules other |
5243 | than tcp. | |
5244 | ||
efc23871 AJ |
5245 | rotate=N Specifies the number of log file rotations to |
5246 | make when you run 'squid -k rotate'. The default | |
5247 | is to obey the logfile_rotate directive. Setting | |
5248 | rotate=0 will disable the file name rotation, | |
5249 | but the log files are still closed and re-opened. | |
5250 | This will enable you to rename the logfiles | |
5251 | yourself just before sending the rotate signal. | |
5252 | Only supported by the stdio module. | |
5253 | ||
82b7abe3 | 5254 | ===== Modules Currently available ===== |
9603207d | 5255 | |
bb7a1781 | 5256 | none Do not log any requests matching these ACL. |
82b7abe3 | 5257 | Do not specify Place or logformat name. |
9603207d | 5258 | |
82b7abe3 AJ |
5259 | stdio Write each log line to disk immediately at the completion of |
5260 | each request. | |
5261 | Place: the filename and path to be written. | |
9603207d | 5262 | |
82b7abe3 AJ |
5263 | daemon Very similar to stdio. But instead of writing to disk the log |
5264 | line is passed to a daemon helper for asychronous handling instead. | |
5265 | Place: varies depending on the daemon. | |
9603207d | 5266 | |
82b7abe3 | 5267 | log_file_daemon Place: the file name and path to be written. |
9603207d | 5268 | |
82b7abe3 AJ |
5269 | syslog To log each request via syslog facility. |
5270 | Place: The syslog facility and priority level for these entries. | |
5271 | Place Format: facility.priority | |
5473c134 | 5272 | |
82b7abe3 AJ |
5273 | where facility could be any of: |
5274 | authpriv, daemon, local0 ... local7 or user. | |
5473c134 | 5275 | |
82b7abe3 AJ |
5276 | And priority could be any of: |
5277 | err, warning, notice, info, debug. | |
9603207d | 5278 | |
82b7abe3 AJ |
5279 | udp To send each log line as text data to a UDP receiver. |
5280 | Place: The destination host name or IP and port. | |
f4fc8610 | 5281 | Place Format: //host:port |
df2eec10 | 5282 | |
2bf4e8fa | 5283 | tcp To send each log line as text data to a TCP receiver. |
fb0c2f17 | 5284 | Lines may be accumulated before sending (see buffered_logs). |
2bf4e8fa | 5285 | Place: The destination host name or IP and port. |
f4fc8610 | 5286 | Place Format: //host:port |
df2eec10 AJ |
5287 | |
5288 | Default: | |
82b7abe3 | 5289 | access_log daemon:@DEFAULT_ACCESS_LOG@ squid |
41bd17a4 | 5290 | DOC_END |
5473c134 | 5291 | |
3ff65596 AR |
5292 | NAME: icap_log |
5293 | TYPE: access_log | |
5294 | IFDEF: ICAP_CLIENT | |
5295 | LOC: Config.Log.icaplogs | |
5296 | DEFAULT: none | |
5297 | DOC_START | |
5298 | ICAP log files record ICAP transaction summaries, one line per | |
5299 | transaction. | |
5300 | ||
5301 | The icap_log option format is: | |
5302 | icap_log <filepath> [<logformat name> [acl acl ...]] | |
5303 | icap_log none [acl acl ...]] | |
9603207d | 5304 | |
3ff65596 AR |
5305 | Please see access_log option documentation for details. The two |
5306 | kinds of logs share the overall configuration approach and many | |
5307 | features. | |
5308 | ||
5309 | ICAP processing of a single HTTP message or transaction may | |
5310 | require multiple ICAP transactions. In such cases, multiple | |
5311 | ICAP transaction log lines will correspond to a single access | |
5312 | log line. | |
5313 | ||
bd59d61c EB |
5314 | ICAP log supports many access.log logformat %codes. In ICAP context, |
5315 | HTTP message-related %codes are applied to the HTTP message embedded | |
5316 | in an ICAP message. Logformat "%http::>..." codes are used for HTTP | |
5317 | messages embedded in ICAP requests while "%http::<..." codes are used | |
5318 | for HTTP messages embedded in ICAP responses. For example: | |
5319 | ||
5320 | http::>h To-be-adapted HTTP message headers sent by Squid to | |
5321 | the ICAP service. For REQMOD transactions, these are | |
5322 | HTTP request headers. For RESPMOD, these are HTTP | |
5323 | response headers, but Squid currently cannot log them | |
5324 | (i.e., %http::>h will expand to "-" for RESPMOD). | |
5325 | ||
5326 | http::<h Adapted HTTP message headers sent by the ICAP | |
5327 | service to Squid (i.e., HTTP request headers in regular | |
5328 | REQMOD; HTTP response headers in RESPMOD and during | |
5329 | request satisfaction in REQMOD). | |
5330 | ||
5331 | ICAP OPTIONS transactions do not embed HTTP messages. | |
5332 | ||
5333 | Several logformat codes below deal with ICAP message bodies. An ICAP | |
5334 | message body, if any, typically includes a complete HTTP message | |
5335 | (required HTTP headers plus optional HTTP message body). When | |
5336 | computing HTTP message body size for these logformat codes, Squid | |
5337 | either includes or excludes chunked encoding overheads; see | |
5338 | code-specific documentation for details. | |
5339 | ||
5340 | For Secure ICAP services, all size-related information is currently | |
5341 | computed before/after TLS encryption/decryption, as if TLS was not | |
5342 | in use at all. | |
3ff65596 AR |
5343 | |
5344 | The following format codes are also available for ICAP logs: | |
5345 | ||
5346 | icap::<A ICAP server IP address. Similar to <A. | |
5347 | ||
5348 | icap::<service_name ICAP service name from the icap_service | |
5349 | option in Squid configuration file. | |
5350 | ||
5351 | icap::ru ICAP Request-URI. Similar to ru. | |
5352 | ||
9603207d | 5353 | icap::rm ICAP request method (REQMOD, RESPMOD, or |
3ff65596 AR |
5354 | OPTIONS). Similar to existing rm. |
5355 | ||
bd59d61c EB |
5356 | icap::>st The total size of the ICAP request sent to the ICAP |
5357 | server (ICAP headers + ICAP body), including chunking | |
5358 | metadata (if any). | |
3ff65596 | 5359 | |
bd59d61c EB |
5360 | icap::<st The total size of the ICAP response received from the |
5361 | ICAP server (ICAP headers + ICAP body), including | |
5362 | chunking metadata (if any). | |
3ff65596 | 5363 | |
bd59d61c EB |
5364 | icap::<bs The size of the ICAP response body received from the |
5365 | ICAP server, excluding chunking metadata (if any). | |
bae917ac | 5366 | |
3ff65596 AR |
5367 | icap::tr Transaction response time (in |
5368 | milliseconds). The timer starts when | |
5369 | the ICAP transaction is created and | |
5370 | stops when the transaction is completed. | |
5371 | Similar to tr. | |
5372 | ||
5373 | icap::tio Transaction I/O time (in milliseconds). The | |
5374 | timer starts when the first ICAP request | |
5375 | byte is scheduled for sending. The timers | |
5376 | stops when the last byte of the ICAP response | |
5377 | is received. | |
5378 | ||
5379 | icap::to Transaction outcome: ICAP_ERR* for all | |
5380 | transaction errors, ICAP_OPT for OPTION | |
5381 | transactions, ICAP_ECHO for 204 | |
5382 | responses, ICAP_MOD for message | |
5383 | modification, and ICAP_SAT for request | |
5384 | satisfaction. Similar to Ss. | |
5385 | ||
5386 | icap::Hs ICAP response status code. Similar to Hs. | |
5387 | ||
5388 | icap::>h ICAP request header(s). Similar to >h. | |
5389 | ||
5390 | icap::<h ICAP response header(s). Similar to <h. | |
5391 | ||
5392 | The default ICAP log format, which can be used without an explicit | |
5393 | definition, is called icap_squid: | |
5394 | ||
bd59d61c | 5395 | logformat icap_squid %ts.%03tu %6icap::tr %>A %icap::to/%03icap::Hs %icap::<st %icap::rm %icap::ru %un -/%icap::<A - |
3ff65596 | 5396 | |
bd59d61c | 5397 | See also: logformat and %adapt::<last_h |
3ff65596 AR |
5398 | DOC_END |
5399 | ||
82b7abe3 AJ |
5400 | NAME: logfile_daemon |
5401 | TYPE: string | |
5402 | DEFAULT: @DEFAULT_LOGFILED@ | |
5403 | LOC: Log::TheConfig.logfile_daemon | |
5404 | DOC_START | |
5405 | Specify the path to the logfile-writing daemon. This daemon is | |
5406 | used to write the access and store logs, if configured. | |
14b24caf HN |
5407 | |
5408 | Squid sends a number of commands to the log daemon: | |
5409 | L<data>\n - logfile data | |
5410 | R\n - rotate file | |
5411 | T\n - truncate file | |
dd68402f | 5412 | O\n - reopen file |
14b24caf HN |
5413 | F\n - flush file |
5414 | r<n>\n - set rotate count to <n> | |
5415 | b<n>\n - 1 = buffer output, 0 = don't buffer output | |
5416 | ||
5417 | No responses is expected. | |
82b7abe3 AJ |
5418 | DOC_END |
5419 | ||
8ebad780 | 5420 | NAME: stats_collection |
3ff65596 | 5421 | TYPE: acl_access |
8ebad780 | 5422 | LOC: Config.accessList.stats_collection |
3ff65596 | 5423 | DEFAULT: none |
638402dd | 5424 | DEFAULT_DOC: Allow logging for all transactions. |
5b0f5383 | 5425 | COMMENT: allow|deny acl acl... |
3ff65596 | 5426 | DOC_START |
8ebad780 CT |
5427 | This options allows you to control which requests gets accounted |
5428 | in performance counters. | |
b3567eb5 FC |
5429 | |
5430 | This clause only supports fast acl types. | |
7409131e | 5431 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
3ff65596 AR |
5432 | DOC_END |
5433 | ||
41bd17a4 | 5434 | NAME: cache_store_log |
5435 | TYPE: string | |
df2eec10 | 5436 | DEFAULT: none |
41bd17a4 | 5437 | LOC: Config.Log.store |
5438 | DOC_START | |
5439 | Logs the activities of the storage manager. Shows which | |
5440 | objects are ejected from the cache, and which objects are | |
6d1dfcfc | 5441 | saved and for how long. |
df2eec10 | 5442 | There are not really utilities to analyze this data, so you can safely |
6d1dfcfc | 5443 | disable it (the default). |
9603207d | 5444 | |
6d1dfcfc AJ |
5445 | Store log uses modular logging outputs. See access_log for the list |
5446 | of modules supported. | |
9603207d | 5447 | |
e0855596 | 5448 | Example: |
6d1dfcfc AJ |
5449 | cache_store_log stdio:@DEFAULT_STORE_LOG@ |
5450 | cache_store_log daemon:@DEFAULT_STORE_LOG@ | |
5473c134 | 5451 | DOC_END |
5452 | ||
41bd17a4 | 5453 | NAME: cache_swap_state cache_swap_log |
5454 | TYPE: string | |
5455 | LOC: Config.Log.swap | |
5473c134 | 5456 | DEFAULT: none |
638402dd | 5457 | DEFAULT_DOC: Store the journal inside its cache_dir |
5473c134 | 5458 | DOC_START |
41bd17a4 | 5459 | Location for the cache "swap.state" file. This index file holds |
5460 | the metadata of objects saved on disk. It is used to rebuild | |
5461 | the cache during startup. Normally this file resides in each | |
5462 | 'cache_dir' directory, but you may specify an alternate | |
5463 | pathname here. Note you must give a full filename, not just | |
5464 | a directory. Since this is the index for the whole object | |
5465 | list you CANNOT periodically rotate it! | |
5473c134 | 5466 | |
41bd17a4 | 5467 | If %s can be used in the file name it will be replaced with a |
5468 | a representation of the cache_dir name where each / is replaced | |
5469 | with '.'. This is needed to allow adding/removing cache_dir | |
5470 | lines when cache_swap_log is being used. | |
5473c134 | 5471 | |
41bd17a4 | 5472 | If have more than one 'cache_dir', and %s is not used in the name |
5473 | these swap logs will have names such as: | |
5473c134 | 5474 | |
41bd17a4 | 5475 | cache_swap_log.00 |
5476 | cache_swap_log.01 | |
5477 | cache_swap_log.02 | |
5473c134 | 5478 | |
41bd17a4 | 5479 | The numbered extension (which is added automatically) |
5480 | corresponds to the order of the 'cache_dir' lines in this | |
5481 | configuration file. If you change the order of the 'cache_dir' | |
5482 | lines in this file, these index files will NOT correspond to | |
5483 | the correct 'cache_dir' entry (unless you manually rename | |
5484 | them). We recommend you do NOT use this option. It is | |
5485 | better to keep these index files in each 'cache_dir' directory. | |
5473c134 | 5486 | DOC_END |
5487 | ||
41bd17a4 | 5488 | NAME: logfile_rotate |
5489 | TYPE: int | |
5490 | DEFAULT: 10 | |
5491 | LOC: Config.Log.rotateNumber | |
5473c134 | 5492 | DOC_START |
efc23871 | 5493 | Specifies the default number of logfile rotations to make when you |
41bd17a4 | 5494 | type 'squid -k rotate'. The default is 10, which will rotate |
5495 | with extensions 0 through 9. Setting logfile_rotate to 0 will | |
5496 | disable the file name rotation, but the logfiles are still closed | |
5497 | and re-opened. This will enable you to rename the logfiles | |
5498 | yourself just before sending the rotate signal. | |
5473c134 | 5499 | |
efc23871 AJ |
5500 | Note, from Squid-3.1 this option is only a default for cache.log, |
5501 | that log can be rotated separately by using debug_options. | |
5502 | ||
66f92ffc | 5503 | Note, from Squid-4 this option is only a default for access.log |
efc23871 AJ |
5504 | recorded by stdio: module. Those logs can be rotated separately by |
5505 | using the rotate=N option on their access_log directive. | |
5506 | ||
41bd17a4 | 5507 | Note, the 'squid -k rotate' command normally sends a USR1 |
5508 | signal to the running squid process. In certain situations | |
5509 | (e.g. on Linux with Async I/O), USR1 is used for other | |
5510 | purposes, so -k rotate uses another signal. It is best to get | |
5511 | in the habit of using 'squid -k rotate' instead of 'kill -USR1 | |
5512 | <pid>'. | |
62493678 | 5513 | |
41bd17a4 | 5514 | DOC_END |
5473c134 | 5515 | |
41bd17a4 | 5516 | NAME: mime_table |
5517 | TYPE: string | |
5518 | DEFAULT: @DEFAULT_MIME_TABLE@ | |
5519 | LOC: Config.mimeTablePathname | |
5520 | DOC_START | |
638402dd AJ |
5521 | Path to Squid's icon configuration file. |
5522 | ||
5523 | You shouldn't need to change this, but the default file contains | |
5524 | examples and formatting information if you do. | |
5473c134 | 5525 | DOC_END |
5526 | ||
41bd17a4 | 5527 | NAME: log_mime_hdrs |
5528 | COMMENT: on|off | |
5529 | TYPE: onoff | |
5530 | LOC: Config.onoff.log_mime_hdrs | |
5531 | DEFAULT: off | |
5532 | DOC_START | |
5533 | The Cache can record both the request and the response MIME | |
5534 | headers for each HTTP transaction. The headers are encoded | |
5535 | safely and will appear as two bracketed fields at the end of | |
5536 | the access log (for either the native or httpd-emulated log | |
5537 | formats). To enable this logging set log_mime_hdrs to 'on'. | |
5538 | DOC_END | |
5473c134 | 5539 | |
41bd17a4 | 5540 | NAME: pid_filename |
5541 | TYPE: string | |
5542 | DEFAULT: @DEFAULT_PID_FILE@ | |
5543 | LOC: Config.pidFilename | |
5473c134 | 5544 | DOC_START |
41bd17a4 | 5545 | A filename to write the process-id to. To disable, enter "none". |
5473c134 | 5546 | DOC_END |
5547 | ||
41bd17a4 | 5548 | NAME: client_netmask |
5549 | TYPE: address | |
5550 | LOC: Config.Addrs.client_netmask | |
0eb08770 | 5551 | DEFAULT: no_addr |
638402dd | 5552 | DEFAULT_DOC: Log full client IP address |
5473c134 | 5553 | DOC_START |
41bd17a4 | 5554 | A netmask for client addresses in logfiles and cachemgr output. |
5555 | Change this to protect the privacy of your cache clients. | |
5556 | A netmask of 255.255.255.0 will log all IP's in that range with | |
5557 | the last digit set to '0'. | |
5473c134 | 5558 | DOC_END |
5559 | ||
41bd17a4 | 5560 | NAME: strip_query_terms |
5473c134 | 5561 | TYPE: onoff |
41bd17a4 | 5562 | LOC: Config.onoff.strip_query_terms |
5473c134 | 5563 | DEFAULT: on |
5564 | DOC_START | |
41bd17a4 | 5565 | By default, Squid strips query terms from requested URLs before |
638402dd AJ |
5566 | logging. This protects your user's privacy and reduces log size. |
5567 | ||
5568 | When investigating HIT/MISS or other caching behaviour you | |
5569 | will need to disable this to see the full URL used by Squid. | |
5473c134 | 5570 | DOC_END |
5571 | ||
41bd17a4 | 5572 | NAME: buffered_logs |
5573 | COMMENT: on|off | |
5574 | TYPE: onoff | |
5575 | DEFAULT: off | |
5576 | LOC: Config.onoff.buffered_logs | |
5473c134 | 5577 | DOC_START |
638402dd AJ |
5578 | Whether to write/send access_log records ASAP or accumulate them and |
5579 | then write/send them in larger chunks. Buffering may improve | |
5580 | performance because it decreases the number of I/Os. However, | |
5581 | buffering increases the delay before log records become available to | |
5582 | the final recipient (e.g., a disk file or logging daemon) and, | |
5583 | hence, increases the risk of log records loss. | |
5584 | ||
5585 | Note that even when buffered_logs are off, Squid may have to buffer | |
5586 | records if it cannot write/send them immediately due to pending I/Os | |
5587 | (e.g., the I/O writing the previous log record) or connectivity loss. | |
5588 | ||
dc797de0 | 5589 | Currently honored by 'daemon', 'tcp' and 'udp' access_log modules only. |
6b698a21 | 5590 | DOC_END |
0976f8db | 5591 | |
2b753521 | 5592 | NAME: netdb_filename |
5593 | TYPE: string | |
221faecb | 5594 | DEFAULT: stdio:@DEFAULT_NETDB_FILE@ |
2b753521 | 5595 | LOC: Config.netdbFilename |
fb6a61d1 | 5596 | IFDEF: USE_ICMP |
2b753521 | 5597 | DOC_START |
638402dd AJ |
5598 | Where Squid stores it's netdb journal. |
5599 | When enabled this journal preserves netdb state between restarts. | |
5600 | ||
2b753521 | 5601 | To disable, enter "none". |
5602 | DOC_END | |
5603 | ||
e227da8d AR |
5604 | NAME: tls_key_log |
5605 | TYPE: Security::KeyLog* | |
5606 | DEFAULT: none | |
5607 | LOC: Config.Log.tlsKeys | |
5608 | IFDEF: USE_OPENSSL | |
5609 | DOC_START | |
5610 | Configures whether and where Squid records pre-master secret and | |
5611 | related encryption details for TLS connections accepted or established | |
5612 | by Squid. These connections include connections accepted at | |
5613 | https_port, TLS connections opened to origin servers/cache_peers/ICAP | |
5614 | services, and TLS tunnels bumped by Squid using the SslBump feature. | |
5615 | This log (a.k.a. SSLKEYLOGFILE) is meant for triage with traffic | |
5616 | inspection tools like Wireshark. | |
5617 | ||
5618 | tls_key_log <destination> [options] [if [!]<acl>...] | |
5619 | ||
5620 | WARNING: This log allows anybody to decrypt the corresponding | |
5621 | encrypted TLS connections, both in-flight and postmortem. | |
5622 | ||
5623 | At most one log file is supported at this time. Repeated tls_key_log | |
5624 | directives are treated as fatal configuration errors. By default, no | |
5625 | log is created or updated. | |
5626 | ||
5627 | If the log file does not exist, Squid creates it. Otherwise, Squid | |
5628 | appends an existing log file. | |
5629 | ||
5630 | The directive is consulted whenever a TLS connection is accepted or | |
5631 | established by Squid. TLS connections that fail the handshake may be | |
5632 | logged if Squid got enough information to form a log record. A record | |
5633 | is logged only if all of the configured ACLs match. | |
5634 | ||
5635 | While transport-related ACLs like src and dst should work, Squid may | |
5636 | not have access to higher-level information. For example, when logging | |
5637 | accepted https_port connections, Squid does not yet have access to the | |
5638 | expected HTTPS request. Similarly, an HTTPS response is not available | |
5639 | when logging most TLS connections established by Squid. | |
5640 | ||
5641 | The log record format is meant to be compatible with TLS deciphering | |
5642 | features of Wireshark which relies on fields like CLIENT_RANDOM and | |
5643 | RSA Master-Key. A single log record usually spans multiple lines. | |
5644 | Technical documentation for that format is maintained inside the | |
5645 | Wireshark code (e.g., see tls_keylog_process_lines() comments as of | |
5646 | Wireshark commit e3d44136f0f0026c5e893fa249f458073f3b7328). TLS key | |
5647 | log does not support custom record formats. | |
5648 | ||
5649 | This clause only supports fast acl types. | |
7409131e | 5650 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
e227da8d AR |
5651 | |
5652 | See access_log's <module>:<place> parameter for a list of supported | |
5653 | logging destinations. | |
5654 | ||
5655 | TLS key log supports all access_log key=value options with the | |
5656 | exception of logformat=name. | |
5657 | ||
5658 | Requires Squid built with OpenSSL support. | |
5659 | DOC_END | |
5660 | ||
5661 | ||
62493678 AJ |
5662 | COMMENT_START |
5663 | OPTIONS FOR TROUBLESHOOTING | |
5664 | ----------------------------------------------------------------------------- | |
5665 | COMMENT_END | |
5666 | ||
5667 | NAME: cache_log | |
5668 | TYPE: string | |
62493678 AJ |
5669 | DEFAULT_IF_NONE: @DEFAULT_CACHE_LOG@ |
5670 | LOC: Debug::cache_log | |
5671 | DOC_START | |
638402dd AJ |
5672 | Squid administrative logging file. |
5673 | ||
5674 | This is where general information about Squid behavior goes. You can | |
5675 | increase the amount of data logged to this file and how often it is | |
5676 | rotated with "debug_options" | |
62493678 AJ |
5677 | DOC_END |
5678 | ||
c59baaa8 EB |
5679 | NAME: cache_log_message |
5680 | TYPE: cache_log_message | |
5681 | DEFAULT: none | |
5682 | DEFAULT_DOC: Use debug_options. | |
9259c796 | 5683 | LOC: DebugMessagesConfig |
c59baaa8 EB |
5684 | DOC_START |
5685 | Configures logging of individual cache.log messages. | |
5686 | ||
5687 | cache_log_message id=<number> option... | |
5688 | cache_log_message ids=<number>-<number> option... | |
5689 | ||
5690 | Most messages have _not_ been instrumented to support this directive | |
5691 | yet. For the list of instrumented messages and their IDs, please see | |
5692 | the doc/debug-messages.txt file. | |
5693 | ||
5694 | Message ID corresponds to the message semantics rather than message | |
5695 | text or source code location. The ID is stable across Squid | |
5696 | instances and versions. Substantial changes in message semantics | |
5697 | result in a new ID assignment. To reduce the danger of suppressing | |
5698 | an important log message, the old IDs of removed (or substantially | |
5699 | changed) messages are never reused. | |
5700 | ||
5701 | If more than one cache_log_message directive refers to the same | |
5702 | message ID, the last directive wins. | |
5703 | ||
5704 | Use ids=min-max syntax to apply the same message configuration to an | |
5705 | inclusive range of message IDs. An ID range with N values has | |
5706 | exactly the same effect as typing N cache_log_message lines. | |
5707 | ||
5708 | At least one option is required. Supported options are: | |
5709 | ||
5710 | level=<number>: The logging level to use for the message. Squid | |
5711 | command line options (-s and -d) as well as the debug_options | |
5712 | directive control which levels go to syslog, stderr, and/or | |
5713 | cache.log. In most environments, using level=2 or higher stops | |
5714 | Squid from logging the message anywhere. By default, the | |
5715 | hard-coded message-specific level is used. | |
5716 | ||
5717 | limit=<number>: After logging the specified number of messages at | |
5718 | the configured (or default) debugging level DL, start using | |
5719 | level 3 (for DL 0 and 1) or 8 (for higher DL values). Usually, | |
5720 | level-3+ messages are not logged anywhere so this option can | |
5721 | often be used to effectively suppress the message. Each SMP | |
5722 | Squid process gets the same limit. | |
5723 | DOC_END | |
5724 | ||
62493678 AJ |
5725 | NAME: debug_options |
5726 | TYPE: eol | |
47df1aa7 | 5727 | DEFAULT: ALL,1 |
638402dd | 5728 | DEFAULT_DOC: Log all critical and important messages. |
62493678 AJ |
5729 | LOC: Debug::debugOptions |
5730 | DOC_START | |
5731 | Logging options are set as section,level where each source file | |
5732 | is assigned a unique section. Lower levels result in less | |
5733 | output, Full debugging (level 9) can result in a very large | |
5734 | log file, so be careful. | |
5735 | ||
5736 | The magic word "ALL" sets debugging levels for all sections. | |
638402dd | 5737 | The default is to run with "ALL,1" to record important warnings. |
62493678 | 5738 | |
47df1aa7 AJ |
5739 | The rotate=N option can be used to keep more or less of these logs |
5740 | than would otherwise be kept by logfile_rotate. | |
62493678 AJ |
5741 | For most uses a single log should be enough to monitor current |
5742 | events affecting Squid. | |
5743 | DOC_END | |
5744 | ||
5745 | NAME: coredump_dir | |
5746 | TYPE: string | |
5747 | LOC: Config.coredump_dir | |
62493678 | 5748 | DEFAULT_IF_NONE: none |
638402dd | 5749 | DEFAULT_DOC: Use the directory from where Squid was started. |
62493678 AJ |
5750 | DOC_START |
5751 | By default Squid leaves core files in the directory from where | |
5752 | it was started. If you set 'coredump_dir' to a directory | |
5753 | that exists, Squid will chdir() to that directory at startup | |
5754 | and coredump files will be left there. | |
5755 | ||
321223fe DC |
5756 | In addition to changing the directory, the process permissions are updated |
5757 | to enable process tracing and/or coredump file generation. The details are | |
5758 | OS-specific, but look for prctl(2) PR_SET_DUMPABLE and procctl(2) | |
5759 | PROC_TRACE_CTL documentation as guiding examples. | |
5760 | ||
47f0eaea | 5761 | CONFIG_START |
e0855596 | 5762 | |
62493678 AJ |
5763 | # Leave coredumps in the first cache dir |
5764 | coredump_dir @DEFAULT_SWAP_DIR@ | |
47f0eaea | 5765 | CONFIG_END |
62493678 AJ |
5766 | DOC_END |
5767 | ||
5768 | ||
41bd17a4 | 5769 | COMMENT_START |
5770 | OPTIONS FOR FTP GATEWAYING | |
5771 | ----------------------------------------------------------------------------- | |
5772 | COMMENT_END | |
5773 | ||
5774 | NAME: ftp_user | |
5775 | TYPE: string | |
5776 | DEFAULT: Squid@ | |
5777 | LOC: Config.Ftp.anon_user | |
6b698a21 | 5778 | DOC_START |
41bd17a4 | 5779 | If you want the anonymous login password to be more informative |
638402dd | 5780 | (and enable the use of picky FTP servers), set this to something |
41bd17a4 | 5781 | reasonable for your domain, like wwwuser@somewhere.net |
7f7db318 | 5782 | |
41bd17a4 | 5783 | The reason why this is domainless by default is the |
5784 | request can be made on the behalf of a user in any domain, | |
5785 | depending on how the cache is used. | |
638402dd | 5786 | Some FTP server also validate the email address is valid |
41bd17a4 | 5787 | (for example perl.com). |
6b698a21 | 5788 | DOC_END |
0976f8db | 5789 | |
41bd17a4 | 5790 | NAME: ftp_passive |
5791 | TYPE: onoff | |
5792 | DEFAULT: on | |
5793 | LOC: Config.Ftp.passive | |
6b698a21 | 5794 | DOC_START |
41bd17a4 | 5795 | If your firewall does not allow Squid to use passive |
5796 | connections, turn off this option. | |
a689bd4e | 5797 | |
5798 | Use of ftp_epsv_all option requires this to be ON. | |
5799 | DOC_END | |
5800 | ||
5801 | NAME: ftp_epsv_all | |
5802 | TYPE: onoff | |
5803 | DEFAULT: off | |
5804 | LOC: Config.Ftp.epsv_all | |
5805 | DOC_START | |
5806 | FTP Protocol extensions permit the use of a special "EPSV ALL" command. | |
5807 | ||
5808 | NATs may be able to put the connection on a "fast path" through the | |
5809 | translator, as the EPRT command will never be used and therefore, | |
5810 | translation of the data portion of the segments will never be needed. | |
5811 | ||
b3567eb5 FC |
5812 | When a client only expects to do two-way FTP transfers this may be |
5813 | useful. | |
a689bd4e | 5814 | If squid finds that it must do a three-way FTP transfer after issuing |
5815 | an EPSV ALL command, the FTP session will fail. | |
5816 | ||
5817 | If you have any doubts about this option do not use it. | |
5818 | Squid will nicely attempt all other connection methods. | |
5819 | ||
51ee534d AJ |
5820 | Requires ftp_passive to be ON (default) for any effect. |
5821 | DOC_END | |
5822 | ||
5823 | NAME: ftp_epsv | |
ddf5aa2b CT |
5824 | TYPE: ftp_epsv |
5825 | DEFAULT: none | |
5826 | LOC: Config.accessList.ftp_epsv | |
51ee534d AJ |
5827 | DOC_START |
5828 | FTP Protocol extensions permit the use of a special "EPSV" command. | |
5829 | ||
5830 | NATs may be able to put the connection on a "fast path" through the | |
b3567eb5 | 5831 | translator using EPSV, as the EPRT command will never be used |
9603207d | 5832 | and therefore, translation of the data portion of the segments |
b3567eb5 | 5833 | will never be needed. |
51ee534d | 5834 | |
ddf5aa2b CT |
5835 | EPSV is often required to interoperate with FTP servers on IPv6 |
5836 | networks. On the other hand, it may break some IPv4 servers. | |
5837 | ||
5838 | By default, EPSV may try EPSV with any FTP server. To fine tune | |
5839 | that decision, you may restrict EPSV to certain clients or servers | |
5840 | using ACLs: | |
5841 | ||
5842 | ftp_epsv allow|deny al1 acl2 ... | |
5843 | ||
5844 | WARNING: Disabling EPSV may cause problems with external NAT and IPv6. | |
51ee534d | 5845 | |
ddf5aa2b | 5846 | Only fast ACLs are supported. |
51ee534d | 5847 | Requires ftp_passive to be ON (default) for any effect. |
41bd17a4 | 5848 | DOC_END |
9e7dbc51 | 5849 | |
63ee5443 AJ |
5850 | NAME: ftp_eprt |
5851 | TYPE: onoff | |
5852 | DEFAULT: on | |
5853 | LOC: Config.Ftp.eprt | |
5854 | DOC_START | |
5855 | FTP Protocol extensions permit the use of a special "EPRT" command. | |
5856 | ||
5857 | This extension provides a protocol neutral alternative to the | |
5858 | IPv4-only PORT command. When supported it enables active FTP data | |
5859 | channels over IPv6 and efficient NAT handling. | |
5860 | ||
5861 | Turning this OFF will prevent EPRT being attempted and will skip | |
5862 | straight to using PORT for IPv4 servers. | |
5863 | ||
5864 | Some devices are known to not handle this extension correctly and | |
2f8abb64 | 5865 | may result in crashes. Devices which support EPRT enough to fail |
63ee5443 AJ |
5866 | cleanly will result in Squid attempting PORT anyway. This directive |
5867 | should only be disabled when EPRT results in device failures. | |
5868 | ||
5869 | WARNING: Doing so will convert Squid back to the old behavior with all | |
5870 | the related problems with external NAT devices/layers and IPv4-only FTP. | |
5871 | DOC_END | |
5872 | ||
41bd17a4 | 5873 | NAME: ftp_sanitycheck |
5874 | TYPE: onoff | |
5875 | DEFAULT: on | |
5876 | LOC: Config.Ftp.sanitycheck | |
5877 | DOC_START | |
5878 | For security and data integrity reasons Squid by default performs | |
5879 | sanity checks of the addresses of FTP data connections ensure the | |
5880 | data connection is to the requested server. If you need to allow | |
5881 | FTP connections to servers using another IP address for the data | |
5882 | connection turn this off. | |
5883 | DOC_END | |
9e7dbc51 | 5884 | |
41bd17a4 | 5885 | NAME: ftp_telnet_protocol |
5886 | TYPE: onoff | |
5887 | DEFAULT: on | |
5888 | LOC: Config.Ftp.telnet | |
5889 | DOC_START | |
5890 | The FTP protocol is officially defined to use the telnet protocol | |
5891 | as transport channel for the control connection. However, many | |
5892 | implementations are broken and does not respect this aspect of | |
5893 | the FTP protocol. | |
5894 | ||
5895 | If you have trouble accessing files with ASCII code 255 in the | |
5896 | path or similar problems involving this ASCII code you can | |
5897 | try setting this directive to off. If that helps, report to the | |
5898 | operator of the FTP server in question that their FTP server | |
5899 | is broken and does not follow the FTP standard. | |
5900 | DOC_END | |
5901 | ||
5902 | COMMENT_START | |
5903 | OPTIONS FOR EXTERNAL SUPPORT PROGRAMS | |
5904 | ----------------------------------------------------------------------------- | |
5905 | COMMENT_END | |
5906 | ||
5907 | NAME: diskd_program | |
5908 | TYPE: string | |
5909 | DEFAULT: @DEFAULT_DISKD@ | |
5910 | LOC: Config.Program.diskd | |
5911 | DOC_START | |
5912 | Specify the location of the diskd executable. | |
5913 | Note this is only useful if you have compiled in | |
5914 | diskd as one of the store io modules. | |
5915 | DOC_END | |
5916 | ||
5917 | NAME: unlinkd_program | |
5918 | IFDEF: USE_UNLINKD | |
5919 | TYPE: string | |
5920 | DEFAULT: @DEFAULT_UNLINKD@ | |
5921 | LOC: Config.Program.unlinkd | |
5922 | DOC_START | |
5923 | Specify the location of the executable for file deletion process. | |
5924 | DOC_END | |
5925 | ||
5926 | NAME: pinger_program | |
41bd17a4 | 5927 | IFDEF: USE_ICMP |
7a9d36e3 AJ |
5928 | TYPE: icmp |
5929 | DEFAULT: @DEFAULT_PINGER@ | |
5930 | LOC: IcmpCfg | |
41bd17a4 | 5931 | DOC_START |
5932 | Specify the location of the executable for the pinger process. | |
5933 | DOC_END | |
5934 | ||
cc192b50 | 5935 | NAME: pinger_enable |
5936 | TYPE: onoff | |
5937 | DEFAULT: on | |
7a9d36e3 | 5938 | LOC: IcmpCfg.enable |
cc192b50 | 5939 | IFDEF: USE_ICMP |
5940 | DOC_START | |
5941 | Control whether the pinger is active at run-time. | |
b3567eb5 FC |
5942 | Enables turning ICMP pinger on and off with a simple |
5943 | squid -k reconfigure. | |
cc192b50 | 5944 | DOC_END |
5945 | ||
5946 | ||
41bd17a4 | 5947 | COMMENT_START |
5948 | OPTIONS FOR URL REWRITING | |
5949 | ----------------------------------------------------------------------------- | |
5950 | COMMENT_END | |
5951 | ||
5952 | NAME: url_rewrite_program redirect_program | |
5953 | TYPE: wordlist | |
5954 | LOC: Config.Program.redirect | |
5955 | DEFAULT: none | |
5956 | DOC_START | |
32f90fcf PSB |
5957 | The name and command line parameters of an admin-provided executable |
5958 | for redirecting clients or adjusting/replacing client request URLs. | |
41bd17a4 | 5959 | |
32f90fcf PSB |
5960 | This helper is consulted after the received request is cleared by |
5961 | http_access and adapted using eICAP/ICAP services (if any). If the | |
5962 | helper does not redirect the client, Squid checks adapted_http_access | |
5963 | and may consult the cache or forward the request to the next hop. | |
41bd17a4 | 5964 | |
5269ec0e | 5965 | |
32f90fcf | 5966 | For each request, the helper gets one line in the following format: |
5269ec0e | 5967 | |
32f90fcf | 5968 | [channel-ID <SP>] request-URL [<SP> extras] <NL> |
5269ec0e | 5969 | |
32f90fcf | 5970 | Use url_rewrite_extras to configure what Squid sends as 'extras'. |
5269ec0e | 5971 | |
32f90fcf PSB |
5972 | |
5973 | The helper must reply to each query using a single line: | |
5974 | ||
5975 | [channel-ID <SP>] result [<SP> kv-pairs] <NL> | |
5976 | ||
5977 | The result section must match exactly one of the following outcomes: | |
5978 | ||
5979 | OK [status=30N] url="..." | |
5980 | ||
5981 | Redirect the client to a URL supplied in the 'url' parameter. | |
5982 | Optional 'status' specifies the status code to send to the | |
5983 | client in Squid's HTTP redirect response. It must be one of | |
5984 | the standard HTTP redirect status codes: 301, 302, 303, 307, | |
5985 | or 308. When no specific status is requested, Squid uses 302. | |
c71adec1 | 5986 | |
5269ec0e | 5987 | OK rewrite-url="..." |
32f90fcf PSB |
5988 | |
5989 | Replace the current request URL with the one supplied in the | |
5990 | 'rewrite-url' parameter. Squid fetches the resource specified | |
5991 | by the new URL and forwards the received response (or its | |
5992 | cached copy) to the client. | |
5993 | ||
5994 | WARNING: Avoid rewriting URLs! When possible, redirect the | |
5995 | client using an "OK url=..." helper response instead. | |
5996 | Rewriting URLs may create inconsistent requests and/or break | |
5997 | synchronization between internal client and origin server | |
5998 | states, especially when URLs or other message parts contain | |
5999 | snippets of that state. For example, Squid does not adjust | |
6000 | Location headers and embedded URLs after the helper rewrites | |
6001 | the request URL. | |
5269ec0e | 6002 | |
c2cbbb02 | 6003 | OK |
32f90fcf | 6004 | Keep the client request intact. |
c2cbbb02 | 6005 | |
5269ec0e | 6006 | ERR |
32f90fcf | 6007 | Keep the client request intact. |
5269ec0e | 6008 | |
32f90fcf PSB |
6009 | BH [message="..."] |
6010 | A helper problem that should be reported to the Squid admin | |
6011 | via a level-1 cache.log message. The 'message' parameter is | |
6012 | reserved for specifying the log message. | |
5269ec0e | 6013 | |
32f90fcf PSB |
6014 | In addition to the kv-pairs mentioned above, Squid also understands |
6015 | the following optional kv-pairs in URL rewriter responses: | |
5269ec0e | 6016 | |
457857fe CT |
6017 | clt_conn_tag=TAG |
6018 | Associates a TAG with the client TCP connection. | |
41bd17a4 | 6019 | |
32f90fcf PSB |
6020 | The clt_conn_tag=TAG pair is treated as a regular transaction |
6021 | annotation for the current request and also annotates future | |
6022 | requests on the same client connection. A helper may update | |
6023 | the TAG during subsequent requests by returning a new kv-pair. | |
5269ec0e | 6024 | |
41bd17a4 | 6025 | |
32f90fcf PSB |
6026 | Helper messages contain the channel-ID part if and only if the |
6027 | url_rewrite_children directive specifies positive concurrency. As a | |
6028 | channel-ID value, Squid sends a number between 0 and concurrency-1. | |
6029 | The helper must echo back the received channel-ID in its response. | |
41bd17a4 | 6030 | |
32f90fcf | 6031 | By default, Squid does not use a URL rewriter. |
41bd17a4 | 6032 | DOC_END |
6033 | ||
6034 | NAME: url_rewrite_children redirect_children | |
48d54e4d | 6035 | TYPE: HelperChildConfig |
5b708d95 | 6036 | DEFAULT: 20 startup=0 idle=1 concurrency=0 |
41bd17a4 | 6037 | LOC: Config.redirectChildren |
6038 | DOC_START | |
79933cd6 AR |
6039 | Specifies the maximum number of redirector processes that Squid may |
6040 | spawn (numberofchildren) and several related options. Using too few of | |
6041 | these helper processes (a.k.a. "helpers") creates request queues. | |
6042 | Using too many helpers wastes your system resources. | |
6043 | ||
6044 | Usage: numberofchildren [option]... | |
6045 | ||
48d54e4d AJ |
6046 | The startup= and idle= options allow some measure of skew in your |
6047 | tuning. | |
9603207d | 6048 | |
48d54e4d | 6049 | startup= |
9603207d | 6050 | |
48d54e4d AJ |
6051 | Sets a minimum of how many processes are to be spawned when Squid |
6052 | starts or reconfigures. When set to zero the first request will | |
6053 | cause spawning of the first child process to handle it. | |
9603207d | 6054 | |
48d54e4d AJ |
6055 | Starting too few will cause an initial slowdown in traffic as Squid |
6056 | attempts to simultaneously spawn enough processes to cope. | |
9603207d | 6057 | |
48d54e4d | 6058 | idle= |
9603207d | 6059 | |
48d54e4d AJ |
6060 | Sets a minimum of how many processes Squid is to try and keep available |
6061 | at all times. When traffic begins to rise above what the existing | |
6062 | processes can handle this many more will be spawned up to the maximum | |
6063 | configured. A minimum setting of 1 is required. | |
6064 | ||
6065 | concurrency= | |
41bd17a4 | 6066 | |
41bd17a4 | 6067 | The number of requests each redirector helper can handle in |
6068 | parallel. Defaults to 0 which indicates the redirector | |
6069 | is a old-style single threaded redirector. | |
6a171502 AJ |
6070 | |
6071 | When this directive is set to a value >= 1 then the protocol | |
6072 | used to communicate with the helper is modified to include | |
9bef05b1 AJ |
6073 | an ID in front of the request/response. The ID from the request |
6074 | must be echoed back with the response to that request. | |
6825b101 CT |
6075 | |
6076 | queue-size=N | |
6077 | ||
79933cd6 AR |
6078 | Sets the maximum number of queued requests. A request is queued when |
6079 | no existing child can accept it due to concurrency limit and no new | |
6080 | child can be started due to numberofchildren limit. The default | |
6081 | maximum is zero if url_rewrite_bypass is enabled and | |
6082 | 2*numberofchildren otherwise. If the queued requests exceed queue size | |
6083 | and redirector_bypass configuration option is set, then redirector is | |
6084 | bypassed. Otherwise, Squid is allowed to temporarily exceed the | |
6085 | configured maximum, marking the affected helper as "overloaded". If | |
6086 | the helper overload lasts more than 3 minutes, the action prescribed | |
6087 | by the on-persistent-overload option applies. | |
6082a0e2 EB |
6088 | |
6089 | on-persistent-overload=action | |
6090 | ||
6091 | Specifies Squid reaction to a new helper request arriving when the helper | |
6092 | has been overloaded for more that 3 minutes already. The number of queued | |
6093 | requests determines whether the helper is overloaded (see the queue-size | |
6094 | option). | |
6095 | ||
6096 | Two actions are supported: | |
6097 | ||
6098 | die Squid worker quits. This is the default behavior. | |
6099 | ||
6100 | ERR Squid treats the helper request as if it was | |
6101 | immediately submitted, and the helper immediately | |
6102 | replied with an ERR response. This action has no effect | |
6103 | on the already queued and in-progress helper requests. | |
41bd17a4 | 6104 | DOC_END |
6105 | ||
6106 | NAME: url_rewrite_host_header redirect_rewrites_host_header | |
6107 | TYPE: onoff | |
6108 | DEFAULT: on | |
6109 | LOC: Config.onoff.redir_rewrites_host | |
6110 | DOC_START | |
3ce33807 AJ |
6111 | To preserve same-origin security policies in browsers and |
6112 | prevent Host: header forgery by redirectors Squid rewrites | |
6113 | any Host: header in redirected requests. | |
9603207d | 6114 | |
3ce33807 AJ |
6115 | If you are running an accelerator this may not be a wanted |
6116 | effect of a redirector. This directive enables you disable | |
6117 | Host: alteration in reverse-proxy traffic. | |
9603207d | 6118 | |
41bd17a4 | 6119 | WARNING: Entries are cached on the result of the URL rewriting |
6120 | process, so be careful if you have domain-virtual hosts. | |
9603207d | 6121 | |
3ce33807 AJ |
6122 | WARNING: Squid and other software verifies the URL and Host |
6123 | are matching, so be careful not to relay through other proxies | |
6124 | or inspecting firewalls with this disabled. | |
41bd17a4 | 6125 | DOC_END |
6126 | ||
6127 | NAME: url_rewrite_access redirector_access | |
6128 | TYPE: acl_access | |
6129 | DEFAULT: none | |
638402dd | 6130 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
41bd17a4 | 6131 | LOC: Config.accessList.redirector |
6132 | DOC_START | |
6133 | If defined, this access list specifies which requests are | |
638402dd | 6134 | sent to the redirector processes. |
b3567eb5 FC |
6135 | |
6136 | This clause supports both fast and slow acl types. | |
7409131e | 6137 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
41bd17a4 | 6138 | DOC_END |
6139 | ||
6140 | NAME: url_rewrite_bypass redirector_bypass | |
6141 | TYPE: onoff | |
6142 | LOC: Config.onoff.redirector_bypass | |
6143 | DEFAULT: off | |
6144 | DOC_START | |
6145 | When this is 'on', a request will not go through the | |
6082a0e2 EB |
6146 | redirector if all the helpers are busy. If this is 'off' and the |
6147 | redirector queue grows too large, the action is prescribed by the | |
6148 | on-persistent-overload option. You should only enable this if the | |
6149 | redirectors are not critical to your caching system. If you use | |
41bd17a4 | 6150 | redirectors for access control, and you enable this option, |
6151 | users may have access to pages they should not | |
6152 | be allowed to request. | |
79933cd6 AR |
6153 | |
6154 | Enabling this option sets the default url_rewrite_children queue-size | |
6155 | option value to 0. | |
41bd17a4 | 6156 | DOC_END |
6157 | ||
fe7966ec | 6158 | NAME: url_rewrite_extras |
b11724bb CT |
6159 | TYPE: TokenOrQuotedString |
6160 | LOC: Config.redirector_extras | |
6161 | DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp" | |
6162 | DOC_START | |
6163 | Specifies a string to be append to request line format for the | |
6164 | rewriter helper. "Quoted" format values may contain spaces and | |
6165 | logformat %macros. In theory, any logformat %macro can be used. | |
6166 | In practice, a %macro expands as a dash (-) if the helper request is | |
6167 | sent before the required macro information is available to Squid. | |
6168 | DOC_END | |
6169 | ||
32fd6d8a | 6170 | NAME: url_rewrite_timeout |
ced8def3 AJ |
6171 | TYPE: UrlHelperTimeout |
6172 | LOC: Config.onUrlRewriteTimeout | |
32fd6d8a CT |
6173 | DEFAULT: none |
6174 | DEFAULT_DOC: Squid waits for the helper response forever | |
6175 | DOC_START | |
6176 | Squid times active requests to redirector. The timeout value and Squid | |
6177 | reaction to a timed out request are configurable using the following | |
6178 | format: | |
6179 | ||
ced8def3 | 6180 | url_rewrite_timeout timeout time-units on_timeout=<action> [response=<quoted-response>] |
32fd6d8a CT |
6181 | |
6182 | supported timeout actions: | |
ced8def3 | 6183 | fail Squid return a ERR_GATEWAY_FAILURE error page |
32fd6d8a | 6184 | |
ced8def3 | 6185 | bypass Do not re-write the URL |
32fd6d8a | 6186 | |
ced8def3 | 6187 | retry Send the lookup to the helper again |
32fd6d8a | 6188 | |
ced8def3 AJ |
6189 | use_configured_response |
6190 | Use the <quoted-response> as helper response | |
32fd6d8a CT |
6191 | DOC_END |
6192 | ||
a8a0b1c2 EC |
6193 | COMMENT_START |
6194 | OPTIONS FOR STORE ID | |
6195 | ----------------------------------------------------------------------------- | |
6196 | COMMENT_END | |
6197 | ||
6198 | NAME: store_id_program storeurl_rewrite_program | |
6199 | TYPE: wordlist | |
6200 | LOC: Config.Program.store_id | |
6201 | DEFAULT: none | |
6202 | DOC_START | |
6203 | Specify the location of the executable StoreID helper to use. | |
6204 | Since they can perform almost any function there isn't one included. | |
6205 | ||
6206 | For each requested URL, the helper will receive one line with the format | |
6207 | ||
b11724bb | 6208 | [channel-ID <SP>] URL [<SP> extras]<NL> |
a8a0b1c2 EC |
6209 | |
6210 | ||
6211 | After processing the request the helper must reply using the following format: | |
6212 | ||
6213 | [channel-ID <SP>] result [<SP> kv-pairs] | |
6214 | ||
6215 | The result code can be: | |
6216 | ||
6217 | OK store-id="..." | |
6218 | Use the StoreID supplied in 'store-id='. | |
6219 | ||
6220 | ERR | |
6221 | The default is to use HTTP request URL as the store ID. | |
6222 | ||
6223 | BH | |
61beade2 | 6224 | An internal error occurred in the helper, preventing |
a8a0b1c2 EC |
6225 | a result being identified. |
6226 | ||
457857fe CT |
6227 | In addition to the above kv-pairs Squid also understands the following |
6228 | optional kv-pairs received from URL rewriters: | |
6229 | clt_conn_tag=TAG | |
6230 | Associates a TAG with the client TCP connection. | |
6231 | Please see url_rewrite_program related documentation for this | |
6232 | kv-pair | |
a8a0b1c2 | 6233 | |
b11724bb CT |
6234 | Helper programs should be prepared to receive and possibly ignore |
6235 | additional whitespace-separated tokens on each input line. | |
a8a0b1c2 EC |
6236 | |
6237 | When using the concurrency= option the protocol is changed by | |
6238 | introducing a query channel tag in front of the request/response. | |
6239 | The query channel tag is a number between 0 and concurrency-1. | |
6240 | This value must be echoed back unchanged to Squid as the first part | |
6241 | of the response relating to its request. | |
6242 | ||
6243 | NOTE: when using StoreID refresh_pattern will apply to the StoreID | |
6244 | returned from the helper and not the URL. | |
6245 | ||
6246 | WARNING: Wrong StoreID value returned by a careless helper may result | |
6247 | in the wrong cached response returned to the user. | |
6248 | ||
6249 | By default, a StoreID helper is not used. | |
6250 | DOC_END | |
6251 | ||
fe7966ec | 6252 | NAME: store_id_extras |
b11724bb CT |
6253 | TYPE: TokenOrQuotedString |
6254 | LOC: Config.storeId_extras | |
6255 | DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp" | |
6256 | DOC_START | |
6257 | Specifies a string to be append to request line format for the | |
6258 | StoreId helper. "Quoted" format values may contain spaces and | |
6259 | logformat %macros. In theory, any logformat %macro can be used. | |
6260 | In practice, a %macro expands as a dash (-) if the helper request is | |
6261 | sent before the required macro information is available to Squid. | |
6262 | DOC_END | |
6263 | ||
a8a0b1c2 EC |
6264 | NAME: store_id_children storeurl_rewrite_children |
6265 | TYPE: HelperChildConfig | |
6266 | DEFAULT: 20 startup=0 idle=1 concurrency=0 | |
6267 | LOC: Config.storeIdChildren | |
6268 | DOC_START | |
79933cd6 AR |
6269 | Specifies the maximum number of StoreID helper processes that Squid |
6270 | may spawn (numberofchildren) and several related options. Using | |
6271 | too few of these helper processes (a.k.a. "helpers") creates request | |
6272 | queues. Using too many helpers wastes your system resources. | |
6273 | ||
6274 | Usage: numberofchildren [option]... | |
9603207d | 6275 | |
a8a0b1c2 EC |
6276 | The startup= and idle= options allow some measure of skew in your |
6277 | tuning. | |
9603207d | 6278 | |
a8a0b1c2 | 6279 | startup= |
9603207d | 6280 | |
a8a0b1c2 EC |
6281 | Sets a minimum of how many processes are to be spawned when Squid |
6282 | starts or reconfigures. When set to zero the first request will | |
6283 | cause spawning of the first child process to handle it. | |
9603207d | 6284 | |
a8a0b1c2 EC |
6285 | Starting too few will cause an initial slowdown in traffic as Squid |
6286 | attempts to simultaneously spawn enough processes to cope. | |
9603207d | 6287 | |
a8a0b1c2 | 6288 | idle= |
9603207d | 6289 | |
a8a0b1c2 EC |
6290 | Sets a minimum of how many processes Squid is to try and keep available |
6291 | at all times. When traffic begins to rise above what the existing | |
6292 | processes can handle this many more will be spawned up to the maximum | |
6293 | configured. A minimum setting of 1 is required. | |
6294 | ||
6295 | concurrency= | |
6296 | ||
6297 | The number of requests each storeID helper can handle in | |
6298 | parallel. Defaults to 0 which indicates the helper | |
6299 | is a old-style single threaded program. | |
6300 | ||
6301 | When this directive is set to a value >= 1 then the protocol | |
6302 | used to communicate with the helper is modified to include | |
6303 | an ID in front of the request/response. The ID from the request | |
6304 | must be echoed back with the response to that request. | |
6825b101 CT |
6305 | |
6306 | queue-size=N | |
6307 | ||
79933cd6 AR |
6308 | Sets the maximum number of queued requests to N. A request is queued |
6309 | when no existing child can accept it due to concurrency limit and no | |
6310 | new child can be started due to numberofchildren limit. The default | |
6311 | maximum is 2*numberofchildren. If the queued requests exceed queue | |
6312 | size and redirector_bypass configuration option is set, then | |
6313 | redirector is bypassed. Otherwise, Squid is allowed to temporarily | |
6314 | exceed the configured maximum, marking the affected helper as | |
6315 | "overloaded". If the helper overload lasts more than 3 minutes, the | |
6316 | action prescribed by the on-persistent-overload option applies. | |
6082a0e2 EB |
6317 | |
6318 | on-persistent-overload=action | |
6319 | ||
6320 | Specifies Squid reaction to a new helper request arriving when the helper | |
6321 | has been overloaded for more that 3 minutes already. The number of queued | |
6322 | requests determines whether the helper is overloaded (see the queue-size | |
6323 | option). | |
6324 | ||
6325 | Two actions are supported: | |
6326 | ||
6327 | die Squid worker quits. This is the default behavior. | |
6328 | ||
6329 | ERR Squid treats the helper request as if it was | |
6330 | immediately submitted, and the helper immediately | |
6331 | replied with an ERR response. This action has no effect | |
6332 | on the already queued and in-progress helper requests. | |
a8a0b1c2 EC |
6333 | DOC_END |
6334 | ||
6335 | NAME: store_id_access storeurl_rewrite_access | |
6336 | TYPE: acl_access | |
6337 | DEFAULT: none | |
638402dd | 6338 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
a8a0b1c2 EC |
6339 | LOC: Config.accessList.store_id |
6340 | DOC_START | |
6341 | If defined, this access list specifies which requests are | |
6342 | sent to the StoreID processes. By default all requests | |
6343 | are sent. | |
6344 | ||
6345 | This clause supports both fast and slow acl types. | |
7409131e | 6346 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
a8a0b1c2 EC |
6347 | DOC_END |
6348 | ||
6349 | NAME: store_id_bypass storeurl_rewrite_bypass | |
6350 | TYPE: onoff | |
6351 | LOC: Config.onoff.store_id_bypass | |
6352 | DEFAULT: on | |
6353 | DOC_START | |
6354 | When this is 'on', a request will not go through the | |
6082a0e2 EB |
6355 | helper if all helpers are busy. If this is 'off' and the helper |
6356 | queue grows too large, the action is prescribed by the | |
6357 | on-persistent-overload option. You should only enable this if the | |
6358 | helpers are not critical to your caching system. If you use | |
9603207d | 6359 | helpers for critical caching components, and you enable this |
a8a0b1c2 | 6360 | option, users may not get objects from cache. |
6825b101 CT |
6361 | This options sets default queue-size option of the store_id_children |
6362 | to 0. | |
a8a0b1c2 EC |
6363 | DOC_END |
6364 | ||
41bd17a4 | 6365 | COMMENT_START |
6366 | OPTIONS FOR TUNING THE CACHE | |
6367 | ----------------------------------------------------------------------------- | |
6368 | COMMENT_END | |
6369 | ||
f04b37d8 | 6370 | NAME: cache no_cache |
6371 | TYPE: acl_access | |
6372 | DEFAULT: none | |
70706149 | 6373 | DEFAULT_DOC: By default, this directive is unused and has no effect. |
f04b37d8 | 6374 | LOC: Config.accessList.noCache |
41bd17a4 | 6375 | DOC_START |
70706149 AR |
6376 | Requests denied by this directive will not be served from the cache |
6377 | and their responses will not be stored in the cache. This directive | |
6378 | has no effect on other transactions and on already cached responses. | |
f04b37d8 | 6379 | |
b3567eb5 | 6380 | This clause supports both fast and slow acl types. |
7409131e | 6381 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
70706149 AR |
6382 | |
6383 | This and the two other similar caching directives listed below are | |
6384 | checked at different transaction processing stages, have different | |
6385 | access to response information, affect different cache operations, | |
6386 | and differ in slow ACLs support: | |
6387 | ||
6388 | * cache: Checked before Squid makes a hit/miss determination. | |
6389 | No access to reply information! | |
6390 | Denies both serving a hit and storing a miss. | |
6391 | Supports both fast and slow ACLs. | |
6392 | * send_hit: Checked after a hit was detected. | |
6393 | Has access to reply (hit) information. | |
6394 | Denies serving a hit only. | |
6395 | Supports fast ACLs only. | |
6396 | * store_miss: Checked before storing a cachable miss. | |
6397 | Has access to reply (miss) information. | |
6398 | Denies storing a miss only. | |
6399 | Supports fast ACLs only. | |
6400 | ||
6401 | If you are not sure which of the three directives to use, apply the | |
6402 | following decision logic: | |
6403 | ||
6404 | * If your ACL(s) are of slow type _and_ need response info, redesign. | |
6405 | Squid does not support that particular combination at this time. | |
6406 | Otherwise: | |
6407 | * If your directive ACL(s) are of slow type, use "cache"; and/or | |
6408 | * if your directive ACL(s) need no response info, use "cache". | |
6409 | Otherwise: | |
6410 | * If you do not want the response cached, use store_miss; and/or | |
6411 | * if you do not want a hit on a cached response, use send_hit. | |
6412 | DOC_END | |
6413 | ||
6414 | NAME: send_hit | |
6415 | TYPE: acl_access | |
6416 | DEFAULT: none | |
6417 | DEFAULT_DOC: By default, this directive is unused and has no effect. | |
6418 | LOC: Config.accessList.sendHit | |
6419 | DOC_START | |
6420 | Responses denied by this directive will not be served from the cache | |
6421 | (but may still be cached, see store_miss). This directive has no | |
6422 | effect on the responses it allows and on the cached objects. | |
6423 | ||
6424 | Please see the "cache" directive for a summary of differences among | |
6425 | store_miss, send_hit, and cache directives. | |
6426 | ||
6427 | Unlike the "cache" directive, send_hit only supports fast acl | |
7409131e | 6428 | types. See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
70706149 AR |
6429 | |
6430 | For example: | |
6431 | ||
6432 | # apply custom Store ID mapping to some URLs | |
6433 | acl MapMe dstdomain .c.example.com | |
6434 | store_id_program ... | |
6435 | store_id_access allow MapMe | |
6436 | ||
6437 | # but prevent caching of special responses | |
6438 | # such as 302 redirects that cause StoreID loops | |
6439 | acl Ordinary http_status 200-299 | |
6440 | store_miss deny MapMe !Ordinary | |
6441 | ||
6442 | # and do not serve any previously stored special responses | |
6443 | # from the cache (in case they were already cached before | |
6444 | # the above store_miss rule was in effect). | |
6445 | send_hit deny MapMe !Ordinary | |
6446 | DOC_END | |
6447 | ||
6448 | NAME: store_miss | |
6449 | TYPE: acl_access | |
6450 | DEFAULT: none | |
6451 | DEFAULT_DOC: By default, this directive is unused and has no effect. | |
6452 | LOC: Config.accessList.storeMiss | |
6453 | DOC_START | |
6454 | Responses denied by this directive will not be cached (but may still | |
6455 | be served from the cache, see send_hit). This directive has no | |
6456 | effect on the responses it allows and on the already cached responses. | |
6457 | ||
6458 | Please see the "cache" directive for a summary of differences among | |
6459 | store_miss, send_hit, and cache directives. See the | |
6460 | send_hit directive for a usage example. | |
6461 | ||
6462 | Unlike the "cache" directive, store_miss only supports fast acl | |
7409131e | 6463 | types. See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
41bd17a4 | 6464 | DOC_END |
6465 | ||
570d3f75 AJ |
6466 | NAME: max_stale |
6467 | COMMENT: time-units | |
6468 | TYPE: time_t | |
6469 | LOC: Config.maxStale | |
6470 | DEFAULT: 1 week | |
6471 | DOC_START | |
6472 | This option puts an upper limit on how stale content Squid | |
6473 | will serve from the cache if cache validation fails. | |
2f8abb64 | 6474 | Can be overridden by the refresh_pattern max-stale option. |
570d3f75 AJ |
6475 | DOC_END |
6476 | ||
41bd17a4 | 6477 | NAME: refresh_pattern |
6478 | TYPE: refreshpattern | |
6479 | LOC: Config.Refresh | |
6480 | DEFAULT: none | |
6481 | DOC_START | |
6482 | usage: refresh_pattern [-i] regex min percent max [options] | |
9e7dbc51 | 6483 | |
6b698a21 | 6484 | By default, regular expressions are CASE-SENSITIVE. To make |
6485 | them case-insensitive, use the -i option. | |
9e7dbc51 | 6486 | |
41bd17a4 | 6487 | 'Min' is the time (in minutes) an object without an explicit |
6488 | expiry time should be considered fresh. The recommended | |
6489 | value is 0, any higher values may cause dynamic applications | |
6490 | to be erroneously cached unless the application designer | |
6491 | has taken the appropriate actions. | |
9e7dbc51 | 6492 | |
0a3427b8 AJ |
6493 | 'Percent' is used to compute the max-age value for responses |
6494 | with a Last-Modified header and no Cache-Control:max-age nor Expires. | |
6495 | Cache-Control:max-age = ( Date - Last-Modified ) * percent | |
5b807763 | 6496 | |
41bd17a4 | 6497 | 'Max' is an upper limit on how long objects without an explicit |
6d612a9d GD |
6498 | expiry time will be considered fresh. The value is also used |
6499 | to form Cache-Control: max-age header for a request sent from | |
6500 | Squid to origin/parent. | |
9e7dbc51 | 6501 | |
41bd17a4 | 6502 | options: override-expire |
6503 | override-lastmod | |
6504 | reload-into-ims | |
6505 | ignore-reload | |
41bd17a4 | 6506 | ignore-no-store |
6507 | ignore-private | |
570d3f75 | 6508 | max-stale=NN |
41bd17a4 | 6509 | refresh-ims |
3d8b6ba4 | 6510 | store-stale |
a0ec9f68 | 6511 | |
41bd17a4 | 6512 | override-expire enforces min age even if the server |
9b2ad080 HN |
6513 | sent an explicit expiry time (e.g., with the |
6514 | Expires: header or Cache-Control: max-age). Doing this | |
6515 | VIOLATES the HTTP standard. Enabling this feature | |
6516 | could make you liable for problems which it causes. | |
6468fe10 | 6517 | |
04925576 AJ |
6518 | Note: override-expire does not enforce staleness - it only extends |
6519 | freshness / min. If the server returns a Expires time which | |
6520 | is longer than your max time, Squid will still consider | |
6521 | the object fresh for that period of time. | |
6522 | ||
41bd17a4 | 6523 | override-lastmod enforces min age even on objects |
6524 | that were modified recently. | |
934b03fc | 6525 | |
46017fdd CT |
6526 | reload-into-ims changes a client no-cache or ``reload'' |
6527 | request for a cached entry into a conditional request using | |
6528 | If-Modified-Since and/or If-None-Match headers, provided the | |
6529 | cached entry has a Last-Modified and/or a strong ETag header. | |
6530 | Doing this VIOLATES the HTTP standard. Enabling this feature | |
6531 | could make you liable for problems which it causes. | |
dba79ac5 | 6532 | |
41bd17a4 | 6533 | ignore-reload ignores a client no-cache or ``reload'' |
6534 | header. Doing this VIOLATES the HTTP standard. Enabling | |
6535 | this feature could make you liable for problems which | |
6536 | it causes. | |
9bc73deb | 6537 | |
41bd17a4 | 6538 | ignore-no-store ignores any ``Cache-control: no-store'' |
6539 | headers received from a server. Doing this VIOLATES | |
6540 | the HTTP standard. Enabling this feature could make you | |
6541 | liable for problems which it causes. | |
6542 | ||
6543 | ignore-private ignores any ``Cache-control: private'' | |
6544 | headers received from a server. Doing this VIOLATES | |
6545 | the HTTP standard. Enabling this feature could make you | |
6546 | liable for problems which it causes. | |
6547 | ||
41bd17a4 | 6548 | refresh-ims causes squid to contact the origin server |
6549 | when a client issues an If-Modified-Since request. This | |
6550 | ensures that the client will receive an updated version | |
6551 | if one is available. | |
6552 | ||
9603207d | 6553 | store-stale stores responses even if they don't have explicit |
6554 | freshness or a validator (i.e., Last-Modified or an ETag) | |
6555 | present, or if they're already stale. By default, Squid will | |
3d8b6ba4 AJ |
6556 | not cache such responses because they usually can't be |
6557 | reused. Note that such responses will be stale by default. | |
6558 | ||
570d3f75 AJ |
6559 | max-stale=NN provide a maximum staleness factor. Squid won't |
6560 | serve objects more stale than this even if it failed to | |
6561 | validate the object. Default: use the max_stale global limit. | |
6562 | ||
41bd17a4 | 6563 | Basically a cached object is: |
6564 | ||
fb41bbb2 | 6565 | FRESH if expire > now, else STALE |
41bd17a4 | 6566 | STALE if age > max |
6567 | FRESH if lm-factor < percent, else STALE | |
6568 | FRESH if age < min | |
6569 | else STALE | |
6570 | ||
6571 | The refresh_pattern lines are checked in the order listed here. | |
6572 | The first entry which matches is used. If none of the entries | |
6573 | match the default will be used. | |
6574 | ||
6575 | Note, you must uncomment all the default lines if you want | |
6576 | to change one. The default setting is only active if none is | |
6577 | used. | |
6578 | ||
47f0eaea | 6579 | CONFIG_START |
e0855596 | 6580 | |
638402dd | 6581 | # |
e0855596 | 6582 | # Add any of your own refresh_pattern entries above these. |
638402dd | 6583 | # |
41bd17a4 | 6584 | refresh_pattern ^ftp: 1440 20% 10080 |
89db45fa | 6585 | refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 |
41bd17a4 | 6586 | refresh_pattern . 0 20% 4320 |
47f0eaea | 6587 | CONFIG_END |
41bd17a4 | 6588 | DOC_END |
6589 | ||
6590 | NAME: quick_abort_min | |
6591 | COMMENT: (KB) | |
6592 | TYPE: kb_int64_t | |
6593 | DEFAULT: 16 KB | |
6594 | LOC: Config.quickAbort.min | |
6595 | DOC_NONE | |
6596 | ||
6597 | NAME: quick_abort_max | |
6598 | COMMENT: (KB) | |
6599 | TYPE: kb_int64_t | |
6600 | DEFAULT: 16 KB | |
6601 | LOC: Config.quickAbort.max | |
6602 | DOC_NONE | |
6603 | ||
6604 | NAME: quick_abort_pct | |
6605 | COMMENT: (percent) | |
6606 | TYPE: int | |
6607 | DEFAULT: 95 | |
6608 | LOC: Config.quickAbort.pct | |
6609 | DOC_START | |
6610 | The cache by default continues downloading aborted requests | |
6611 | which are almost completed (less than 16 KB remaining). This | |
6612 | may be undesirable on slow (e.g. SLIP) links and/or very busy | |
6613 | caches. Impatient users may tie up file descriptors and | |
6614 | bandwidth by repeatedly requesting and immediately aborting | |
6615 | downloads. | |
6616 | ||
6617 | When the user aborts a request, Squid will check the | |
2d4eefd9 | 6618 | quick_abort values to the amount of data transferred until |
41bd17a4 | 6619 | then. |
6620 | ||
6621 | If the transfer has less than 'quick_abort_min' KB remaining, | |
6622 | it will finish the retrieval. | |
6623 | ||
6624 | If the transfer has more than 'quick_abort_max' KB remaining, | |
6625 | it will abort the retrieval. | |
6626 | ||
6627 | If more than 'quick_abort_pct' of the transfer has completed, | |
6628 | it will finish the retrieval. | |
6629 | ||
6630 | If you do not want any retrieval to continue after the client | |
6631 | has aborted, set both 'quick_abort_min' and 'quick_abort_max' | |
6632 | to '0 KB'. | |
6633 | ||
6634 | If you want retrievals to always continue if they are being | |
6635 | cached set 'quick_abort_min' to '-1 KB'. | |
6636 | DOC_END | |
60d096f4 | 6637 | |
41bd17a4 | 6638 | NAME: read_ahead_gap |
6639 | COMMENT: buffer-size | |
6640 | TYPE: b_int64_t | |
6641 | LOC: Config.readAheadGap | |
6642 | DEFAULT: 16 KB | |
6643 | DOC_START | |
6644 | The amount of data the cache will buffer ahead of what has been | |
6645 | sent to the client when retrieving an object from another server. | |
6646 | DOC_END | |
53e738c6 | 6647 | |
41bd17a4 | 6648 | NAME: negative_ttl |
626096be | 6649 | IFDEF: USE_HTTP_VIOLATIONS |
41bd17a4 | 6650 | COMMENT: time-units |
6651 | TYPE: time_t | |
6652 | LOC: Config.negativeTtl | |
ac9cc053 | 6653 | DEFAULT: 0 seconds |
41bd17a4 | 6654 | DOC_START |
ac9cc053 AJ |
6655 | Set the Default Time-to-Live (TTL) for failed requests. |
6656 | Certain types of failures (such as "connection refused" and | |
6657 | "404 Not Found") are able to be negatively-cached for a short time. | |
6658 | Modern web servers should provide Expires: header, however if they | |
6659 | do not this can provide a minimum TTL. | |
6660 | The default is not to cache errors with unknown expiry details. | |
6661 | ||
6662 | Note that this is different from negative caching of DNS lookups. | |
39956c7c AJ |
6663 | |
6664 | WARNING: Doing this VIOLATES the HTTP standard. Enabling | |
6665 | this feature could make you liable for problems which it | |
6666 | causes. | |
41bd17a4 | 6667 | DOC_END |
53e738c6 | 6668 | |
41bd17a4 | 6669 | NAME: positive_dns_ttl |
6670 | COMMENT: time-units | |
6671 | TYPE: time_t | |
6672 | LOC: Config.positiveDnsTtl | |
6673 | DEFAULT: 6 hours | |
6674 | DOC_START | |
6675 | Upper limit on how long Squid will cache positive DNS responses. | |
6676 | Default is 6 hours (360 minutes). This directive must be set | |
6677 | larger than negative_dns_ttl. | |
6678 | DOC_END | |
c4ab8329 | 6679 | |
41bd17a4 | 6680 | NAME: negative_dns_ttl |
6681 | COMMENT: time-units | |
6682 | TYPE: time_t | |
6683 | LOC: Config.negativeDnsTtl | |
6684 | DEFAULT: 1 minutes | |
6685 | DOC_START | |
6686 | Time-to-Live (TTL) for negative caching of failed DNS lookups. | |
6687 | This also sets the lower cache limit on positive lookups. | |
6688 | Minimum value is 1 second, and it is not recommendable to go | |
6689 | much below 10 seconds. | |
6690 | DOC_END | |
7df0bfd7 | 6691 | |
41bd17a4 | 6692 | NAME: range_offset_limit |
11e3fa1c AJ |
6693 | COMMENT: size [acl acl...] |
6694 | TYPE: acl_b_size_t | |
41bd17a4 | 6695 | LOC: Config.rangeOffsetLimit |
11e3fa1c | 6696 | DEFAULT: none |
41bd17a4 | 6697 | DOC_START |
11e3fa1c | 6698 | usage: (size) [units] [[!]aclname] |
9603207d | 6699 | |
6700 | Sets an upper limit on how far (number of bytes) into the file | |
6701 | a Range request may be to cause Squid to prefetch the whole file. | |
6702 | If beyond this limit, Squid forwards the Range request as it is and | |
11e3fa1c | 6703 | the result is NOT cached. |
9603207d | 6704 | |
41bd17a4 | 6705 | This is to stop a far ahead range request (lets say start at 17MB) |
6706 | from making Squid fetch the whole object up to that point before | |
6707 | sending anything to the client. | |
9603207d | 6708 | |
6709 | Multiple range_offset_limit lines may be specified, and they will | |
6710 | be searched from top to bottom on each request until a match is found. | |
6711 | The first match found will be used. If no line matches a request, the | |
11e3fa1c | 6712 | default limit of 0 bytes will be used. |
9603207d | 6713 | |
11e3fa1c | 6714 | 'size' is the limit specified as a number of units. |
9603207d | 6715 | |
11e3fa1c AJ |
6716 | 'units' specifies whether to use bytes, KB, MB, etc. |
6717 | If no units are specified bytes are assumed. | |
9603207d | 6718 | |
11e3fa1c | 6719 | A size of 0 causes Squid to never fetch more than the |
ab275c7b | 6720 | client requested. (default) |
9603207d | 6721 | |
11e3fa1c | 6722 | A size of 'none' causes Squid to always fetch the object from the |
41bd17a4 | 6723 | beginning so it may cache the result. (2.0 style) |
9603207d | 6724 | |
11e3fa1c | 6725 | 'aclname' is the name of a defined ACL. |
9603207d | 6726 | |
6727 | NP: Using 'none' as the byte value here will override any quick_abort settings | |
11e3fa1c | 6728 | that may otherwise apply to the range request. The range request will |
ab275c7b AJ |
6729 | be fully fetched from start to finish regardless of the client |
6730 | actions. This affects bandwidth usage. | |
41bd17a4 | 6731 | DOC_END |
d95b862f | 6732 | |
41bd17a4 | 6733 | NAME: minimum_expiry_time |
6734 | COMMENT: (seconds) | |
6735 | TYPE: time_t | |
6736 | LOC: Config.minimum_expiry_time | |
6737 | DEFAULT: 60 seconds | |
6738 | DOC_START | |
6739 | The minimum caching time according to (Expires - Date) | |
638402dd AJ |
6740 | headers Squid honors if the object can't be revalidated. |
6741 | The default is 60 seconds. | |
6742 | ||
6743 | In reverse proxy environments it might be desirable to honor | |
6744 | shorter object lifetimes. It is most likely better to make | |
6745 | your server return a meaningful Last-Modified header however. | |
6746 | ||
6747 | In ESI environments where page fragments often have short | |
6748 | lifetimes, this will often be best set to 0. | |
41bd17a4 | 6749 | DOC_END |
c68e9c6b | 6750 | |
41bd17a4 | 6751 | NAME: store_avg_object_size |
58d5c5dd DK |
6752 | COMMENT: (bytes) |
6753 | TYPE: b_int64_t | |
41bd17a4 | 6754 | DEFAULT: 13 KB |
6755 | LOC: Config.Store.avgObjectSize | |
6756 | DOC_START | |
6757 | Average object size, used to estimate number of objects your | |
6758 | cache can hold. The default is 13 KB. | |
638402dd AJ |
6759 | |
6760 | This is used to pre-seed the cache index memory allocation to | |
6761 | reduce expensive reallocate operations while handling clients | |
6762 | traffic. Too-large values may result in memory allocation during | |
6763 | peak traffic, too-small values will result in wasted memory. | |
6764 | ||
6765 | Check the cache manager 'info' report metrics for the real | |
6766 | object sizes seen by your Squid before tuning this. | |
cccac0a2 | 6767 | DOC_END |
6768 | ||
41bd17a4 | 6769 | NAME: store_objects_per_bucket |
6770 | TYPE: int | |
6771 | DEFAULT: 20 | |
6772 | LOC: Config.Store.objectsPerBucket | |
6773 | DOC_START | |
6774 | Target number of objects per bucket in the store hash table. | |
6775 | Lowering this value increases the total number of buckets and | |
6776 | also the storage maintenance rate. The default is 20. | |
6777 | DOC_END | |
6778 | ||
6779 | COMMENT_START | |
6780 | HTTP OPTIONS | |
6781 | ----------------------------------------------------------------------------- | |
6782 | COMMENT_END | |
6783 | ||
f04b37d8 | 6784 | NAME: request_header_max_size |
6785 | COMMENT: (KB) | |
6786 | TYPE: b_size_t | |
df2eec10 | 6787 | DEFAULT: 64 KB |
f04b37d8 | 6788 | LOC: Config.maxRequestHeaderSize |
6789 | DOC_START | |
801593a9 AR |
6790 | This directives limits the header size of a received HTTP request |
6791 | (including request-line). Increasing this limit beyond its 64 KB default | |
6792 | exposes certain old Squid code to various denial-of-service attacks. This | |
6793 | limit also applies to received FTP commands. | |
6794 | ||
6795 | This limit has no direct affect on Squid memory consumption. | |
6796 | ||
6797 | Squid does not check this limit when sending requests. | |
f04b37d8 | 6798 | DOC_END |
6799 | ||
6800 | NAME: reply_header_max_size | |
6801 | COMMENT: (KB) | |
6802 | TYPE: b_size_t | |
df2eec10 | 6803 | DEFAULT: 64 KB |
f04b37d8 | 6804 | LOC: Config.maxReplyHeaderSize |
6805 | DOC_START | |
801593a9 AR |
6806 | This directives limits the header size of a received HTTP response |
6807 | (including status-line). Increasing this limit beyond its 64 KB default | |
6808 | exposes certain old Squid code to various denial-of-service attacks. This | |
6809 | limit also applies to FTP command responses. | |
6810 | ||
6811 | Squid also checks this limit when loading hit responses from disk cache. | |
6812 | ||
6813 | Squid does not check this limit when sending responses. | |
f04b37d8 | 6814 | DOC_END |
6815 | ||
6816 | NAME: request_body_max_size | |
6817 | COMMENT: (bytes) | |
6818 | TYPE: b_int64_t | |
6819 | DEFAULT: 0 KB | |
638402dd | 6820 | DEFAULT_DOC: No limit. |
f04b37d8 | 6821 | LOC: Config.maxRequestBodySize |
6822 | DOC_START | |
6823 | This specifies the maximum size for an HTTP request body. | |
6824 | In other words, the maximum size of a PUT/POST request. | |
6825 | A user who attempts to send a request with a body larger | |
6826 | than this limit receives an "Invalid Request" error message. | |
6827 | If you set this parameter to a zero (the default), there will | |
6828 | be no limit imposed. | |
638402dd AJ |
6829 | |
6830 | See also client_request_buffer_max_size for an alternative | |
6831 | limitation on client uploads which can be configured. | |
f04b37d8 | 6832 | DOC_END |
6833 | ||
1368d115 CT |
6834 | NAME: client_request_buffer_max_size |
6835 | COMMENT: (bytes) | |
6836 | TYPE: b_size_t | |
6837 | DEFAULT: 512 KB | |
6838 | LOC: Config.maxRequestBufferSize | |
6839 | DOC_START | |
6840 | This specifies the maximum buffer size of a client request. | |
6841 | It prevents squid eating too much memory when somebody uploads | |
6842 | a large file. | |
6843 | DOC_END | |
6844 | ||
41bd17a4 | 6845 | NAME: broken_posts |
626096be | 6846 | IFDEF: USE_HTTP_VIOLATIONS |
cccac0a2 | 6847 | TYPE: acl_access |
cccac0a2 | 6848 | DEFAULT: none |
638402dd | 6849 | DEFAULT_DOC: Obey RFC 2616. |
41bd17a4 | 6850 | LOC: Config.accessList.brokenPosts |
cccac0a2 | 6851 | DOC_START |
41bd17a4 | 6852 | A list of ACL elements which, if matched, causes Squid to send |
6853 | an extra CRLF pair after the body of a PUT/POST request. | |
cccac0a2 | 6854 | |
41bd17a4 | 6855 | Some HTTP servers has broken implementations of PUT/POST, |
6856 | and rely on an extra CRLF pair sent by some WWW clients. | |
cccac0a2 | 6857 | |
41bd17a4 | 6858 | Quote from RFC2616 section 4.1 on this matter: |
cccac0a2 | 6859 | |
41bd17a4 | 6860 | Note: certain buggy HTTP/1.0 client implementations generate an |
6861 | extra CRLF's after a POST request. To restate what is explicitly | |
6862 | forbidden by the BNF, an HTTP/1.1 client must not preface or follow | |
6863 | a request with an extra CRLF. | |
cccac0a2 | 6864 | |
b3567eb5 | 6865 | This clause only supports fast acl types. |
7409131e | 6866 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
b3567eb5 | 6867 | |
41bd17a4 | 6868 | Example: |
6869 | acl buggy_server url_regex ^http://.... | |
6870 | broken_posts allow buggy_server | |
6871 | DOC_END | |
cccac0a2 | 6872 | |
22fff3bf | 6873 | NAME: adaptation_uses_indirect_client icap_uses_indirect_client |
57d76dd4 AJ |
6874 | COMMENT: on|off |
6875 | TYPE: onoff | |
22fff3bf | 6876 | IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_ADAPTATION |
57d76dd4 | 6877 | DEFAULT: on |
22fff3bf | 6878 | LOC: Adaptation::Config::use_indirect_client |
57d76dd4 | 6879 | DOC_START |
ea3ae478 AR |
6880 | Controls whether the indirect client IP address (instead of the direct |
6881 | client IP address) is passed to adaptation services. | |
6882 | ||
6883 | See also: follow_x_forwarded_for adaptation_send_client_ip | |
57d76dd4 AJ |
6884 | DOC_END |
6885 | ||
41bd17a4 | 6886 | NAME: via |
626096be | 6887 | IFDEF: USE_HTTP_VIOLATIONS |
41bd17a4 | 6888 | COMMENT: on|off |
6889 | TYPE: onoff | |
6890 | DEFAULT: on | |
6891 | LOC: Config.onoff.via | |
6892 | DOC_START | |
6893 | If set (default), Squid will include a Via header in requests and | |
6894 | replies as required by RFC2616. | |
6895 | DOC_END | |
4cc6eb12 | 6896 | |
41bd17a4 | 6897 | NAME: vary_ignore_expire |
6898 | COMMENT: on|off | |
6899 | TYPE: onoff | |
6900 | LOC: Config.onoff.vary_ignore_expire | |
6901 | DEFAULT: off | |
6902 | DOC_START | |
6903 | Many HTTP servers supporting Vary gives such objects | |
6904 | immediate expiry time with no cache-control header | |
6905 | when requested by a HTTP/1.0 client. This option | |
6906 | enables Squid to ignore such expiry times until | |
6907 | HTTP/1.1 is fully implemented. | |
7e73cd78 AJ |
6908 | |
6909 | WARNING: If turned on this may eventually cause some | |
6910 | varying objects not intended for caching to get cached. | |
cccac0a2 | 6911 | DOC_END |
c4ab8329 | 6912 | |
41bd17a4 | 6913 | NAME: request_header_access |
626096be | 6914 | IFDEF: USE_HTTP_VIOLATIONS |
3b07476b | 6915 | TYPE: http_header_access |
41bd17a4 | 6916 | LOC: Config.request_header_access |
cccac0a2 | 6917 | DEFAULT: none |
638402dd | 6918 | DEFAULT_DOC: No limits. |
cccac0a2 | 6919 | DOC_START |
41bd17a4 | 6920 | Usage: request_header_access header_name allow|deny [!]aclname ... |
0976f8db | 6921 | |
41bd17a4 | 6922 | WARNING: Doing this VIOLATES the HTTP standard. Enabling |
6923 | this feature could make you liable for problems which it | |
6924 | causes. | |
0976f8db | 6925 | |
41bd17a4 | 6926 | This option replaces the old 'anonymize_headers' and the |
6927 | older 'http_anonymizer' option with something that is much | |
3b07476b CT |
6928 | more configurable. A list of ACLs for each header name allows |
6929 | removal of specific header fields under specific conditions. | |
6930 | ||
6931 | This option only applies to outgoing HTTP request headers (i.e., | |
6932 | headers sent by Squid to the next HTTP hop such as a cache peer | |
6933 | or an origin server). The option has no effect during cache hit | |
6934 | detection. The equivalent adaptation vectoring point in ICAP | |
6935 | terminology is post-cache REQMOD. | |
6936 | ||
6937 | The option is applied to individual outgoing request header | |
6938 | fields. For each request header field F, Squid uses the first | |
6939 | qualifying sets of request_header_access rules: | |
6940 | ||
6941 | 1. Rules with header_name equal to F's name. | |
6942 | 2. Rules with header_name 'Other', provided F's name is not | |
6943 | on the hard-coded list of commonly used HTTP header names. | |
6944 | 3. Rules with header_name 'All'. | |
6945 | ||
6946 | Within that qualifying rule set, rule ACLs are checked as usual. | |
6947 | If ACLs of an "allow" rule match, the header field is allowed to | |
6948 | go through as is. If ACLs of a "deny" rule match, the header is | |
6949 | removed and request_header_replace is then checked to identify | |
6950 | if the removed header has a replacement. If no rules within the | |
6951 | set have matching ACLs, the header field is left as is. | |
5401aa8d | 6952 | |
41bd17a4 | 6953 | For example, to achieve the same behavior as the old |
6954 | 'http_anonymizer standard' option, you should use: | |
5401aa8d | 6955 | |
41bd17a4 | 6956 | request_header_access From deny all |
6957 | request_header_access Referer deny all | |
41bd17a4 | 6958 | request_header_access User-Agent deny all |
5401aa8d | 6959 | |
41bd17a4 | 6960 | Or, to reproduce the old 'http_anonymizer paranoid' feature |
6961 | you should use: | |
5401aa8d | 6962 | |
41bd17a4 | 6963 | request_header_access Authorization allow all |
41bd17a4 | 6964 | request_header_access Proxy-Authorization allow all |
41bd17a4 | 6965 | request_header_access Cache-Control allow all |
41bd17a4 | 6966 | request_header_access Content-Length allow all |
6967 | request_header_access Content-Type allow all | |
6968 | request_header_access Date allow all | |
41bd17a4 | 6969 | request_header_access Host allow all |
6970 | request_header_access If-Modified-Since allow all | |
41bd17a4 | 6971 | request_header_access Pragma allow all |
6972 | request_header_access Accept allow all | |
6973 | request_header_access Accept-Charset allow all | |
6974 | request_header_access Accept-Encoding allow all | |
6975 | request_header_access Accept-Language allow all | |
41bd17a4 | 6976 | request_header_access Connection allow all |
41bd17a4 | 6977 | request_header_access All deny all |
5401aa8d | 6978 | |
638402dd | 6979 | HTTP reply headers are controlled with the reply_header_access directive. |
5401aa8d | 6980 | |
638402dd | 6981 | By default, all headers are allowed (no anonymizing is performed). |
5401aa8d | 6982 | DOC_END |
6983 | ||
41bd17a4 | 6984 | NAME: reply_header_access |
626096be | 6985 | IFDEF: USE_HTTP_VIOLATIONS |
3b07476b | 6986 | TYPE: http_header_access |
41bd17a4 | 6987 | LOC: Config.reply_header_access |
cccac0a2 | 6988 | DEFAULT: none |
638402dd | 6989 | DEFAULT_DOC: No limits. |
cccac0a2 | 6990 | DOC_START |
41bd17a4 | 6991 | Usage: reply_header_access header_name allow|deny [!]aclname ... |
934b03fc | 6992 | |
41bd17a4 | 6993 | WARNING: Doing this VIOLATES the HTTP standard. Enabling |
6994 | this feature could make you liable for problems which it | |
6995 | causes. | |
934b03fc | 6996 | |
41bd17a4 | 6997 | This option only applies to reply headers, i.e., from the |
6998 | server to the client. | |
934b03fc | 6999 | |
41bd17a4 | 7000 | This is the same as request_header_access, but in the other |
3b07476b CT |
7001 | direction. Please see request_header_access for detailed |
7002 | documentation. | |
cccac0a2 | 7003 | |
41bd17a4 | 7004 | For example, to achieve the same behavior as the old |
7005 | 'http_anonymizer standard' option, you should use: | |
cccac0a2 | 7006 | |
41bd17a4 | 7007 | reply_header_access Server deny all |
41bd17a4 | 7008 | reply_header_access WWW-Authenticate deny all |
7009 | reply_header_access Link deny all | |
cccac0a2 | 7010 | |
41bd17a4 | 7011 | Or, to reproduce the old 'http_anonymizer paranoid' feature |
7012 | you should use: | |
cccac0a2 | 7013 | |
41bd17a4 | 7014 | reply_header_access Allow allow all |
41bd17a4 | 7015 | reply_header_access WWW-Authenticate allow all |
41bd17a4 | 7016 | reply_header_access Proxy-Authenticate allow all |
7017 | reply_header_access Cache-Control allow all | |
7018 | reply_header_access Content-Encoding allow all | |
7019 | reply_header_access Content-Length allow all | |
7020 | reply_header_access Content-Type allow all | |
7021 | reply_header_access Date allow all | |
7022 | reply_header_access Expires allow all | |
41bd17a4 | 7023 | reply_header_access Last-Modified allow all |
7024 | reply_header_access Location allow all | |
7025 | reply_header_access Pragma allow all | |
41bd17a4 | 7026 | reply_header_access Content-Language allow all |
41bd17a4 | 7027 | reply_header_access Retry-After allow all |
7028 | reply_header_access Title allow all | |
638402dd | 7029 | reply_header_access Content-Disposition allow all |
41bd17a4 | 7030 | reply_header_access Connection allow all |
41bd17a4 | 7031 | reply_header_access All deny all |
cccac0a2 | 7032 | |
638402dd | 7033 | HTTP request headers are controlled with the request_header_access directive. |
cccac0a2 | 7034 | |
41bd17a4 | 7035 | By default, all headers are allowed (no anonymizing is |
7036 | performed). | |
cccac0a2 | 7037 | DOC_END |
7038 | ||
75e4f2ea | 7039 | NAME: request_header_replace header_replace |
626096be | 7040 | IFDEF: USE_HTTP_VIOLATIONS |
3b07476b | 7041 | TYPE: http_header_replace |
41bd17a4 | 7042 | LOC: Config.request_header_access |
cccac0a2 | 7043 | DEFAULT: none |
41bd17a4 | 7044 | DOC_START |
75e4f2ea MB |
7045 | Usage: request_header_replace header_name message |
7046 | Example: request_header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit) | |
cccac0a2 | 7047 | |
41bd17a4 | 7048 | This option allows you to change the contents of headers |
75e4f2ea | 7049 | denied with request_header_access above, by replacing them |
638402dd | 7050 | with some fixed string. |
cccac0a2 | 7051 | |
41bd17a4 | 7052 | This only applies to request headers, not reply headers. |
cccac0a2 | 7053 | |
41bd17a4 | 7054 | By default, headers are removed if denied. |
7055 | DOC_END | |
cccac0a2 | 7056 | |
75e4f2ea MB |
7057 | NAME: reply_header_replace |
7058 | IFDEF: USE_HTTP_VIOLATIONS | |
3b07476b | 7059 | TYPE: http_header_replace |
75e4f2ea MB |
7060 | LOC: Config.reply_header_access |
7061 | DEFAULT: none | |
7062 | DOC_START | |
7063 | Usage: reply_header_replace header_name message | |
7064 | Example: reply_header_replace Server Foo/1.0 | |
7065 | ||
7066 | This option allows you to change the contents of headers | |
7067 | denied with reply_header_access above, by replacing them | |
7068 | with some fixed string. | |
7069 | ||
7070 | This only applies to reply headers, not request headers. | |
7071 | ||
7072 | By default, headers are removed if denied. | |
7073 | DOC_END | |
7074 | ||
f4698e0b CT |
7075 | NAME: request_header_add |
7076 | TYPE: HeaderWithAclList | |
7077 | LOC: Config.request_header_add | |
7078 | DEFAULT: none | |
7079 | DOC_START | |
cde8f31b | 7080 | Usage: request_header_add field-name field-value [ acl ... ] |
f4698e0b CT |
7081 | Example: request_header_add X-Client-CA "CA=%ssl::>cert_issuer" all |
7082 | ||
7083 | This option adds header fields to outgoing HTTP requests (i.e., | |
7084 | request headers sent by Squid to the next HTTP hop such as a | |
7085 | cache peer or an origin server). The option has no effect during | |
7086 | cache hit detection. The equivalent adaptation vectoring point | |
7087 | in ICAP terminology is post-cache REQMOD. | |
7088 | ||
7089 | Field-name is a token specifying an HTTP header name. If a | |
7090 | standard HTTP header name is used, Squid does not check whether | |
7091 | the new header conflicts with any existing headers or violates | |
7092 | HTTP rules. If the request to be modified already contains a | |
7093 | field with the same name, the old field is preserved but the | |
7094 | header field values are not merged. | |
7095 | ||
7096 | Field-value is either a token or a quoted string. If quoted | |
7097 | string format is used, then the surrounding quotes are removed | |
7098 | while escape sequences and %macros are processed. | |
7099 | ||
f4698e0b CT |
7100 | One or more Squid ACLs may be specified to restrict header |
7101 | injection to matching requests. As always in squid.conf, all | |
cde8f31b NH |
7102 | ACLs in the ACL list must be satisfied for the insertion to |
7103 | happen. The request_header_add supports fast ACLs only. | |
7104 | ||
7105 | See also: reply_header_add. | |
7106 | DOC_END | |
7107 | ||
7108 | NAME: reply_header_add | |
7109 | TYPE: HeaderWithAclList | |
7110 | LOC: Config.reply_header_add | |
7111 | DEFAULT: none | |
7112 | DOC_START | |
7113 | Usage: reply_header_add field-name field-value [ acl ... ] | |
7114 | Example: reply_header_add X-Client-CA "CA=%ssl::>cert_issuer" all | |
7115 | ||
7116 | This option adds header fields to outgoing HTTP responses (i.e., response | |
7117 | headers delivered by Squid to the client). This option has no effect on | |
7118 | cache hit detection. The equivalent adaptation vectoring point in | |
7119 | ICAP terminology is post-cache RESPMOD. This option does not apply to | |
7120 | successful CONNECT replies. | |
7121 | ||
7122 | Field-name is a token specifying an HTTP header name. If a | |
7123 | standard HTTP header name is used, Squid does not check whether | |
7124 | the new header conflicts with any existing headers or violates | |
7125 | HTTP rules. If the response to be modified already contains a | |
7126 | field with the same name, the old field is preserved but the | |
7127 | header field values are not merged. | |
7128 | ||
7129 | Field-value is either a token or a quoted string. If quoted | |
7130 | string format is used, then the surrounding quotes are removed | |
7131 | while escape sequences and %macros are processed. | |
7132 | ||
7133 | One or more Squid ACLs may be specified to restrict header | |
7134 | injection to matching responses. As always in squid.conf, all | |
7135 | ACLs in the ACL list must be satisfied for the insertion to | |
7136 | happen. The reply_header_add option supports fast ACLs only. | |
7137 | ||
7138 | See also: request_header_add. | |
f4698e0b CT |
7139 | DOC_END |
7140 | ||
d7f4a0b7 CT |
7141 | NAME: note |
7142 | TYPE: note | |
7143 | LOC: Config.notes | |
7144 | DEFAULT: none | |
7145 | DOC_START | |
7146 | This option used to log custom information about the master | |
7147 | transaction. For example, an admin may configure Squid to log | |
7148 | which "user group" the transaction belongs to, where "user group" | |
7149 | will be determined based on a set of ACLs and not [just] | |
7150 | authentication information. | |
7151 | Values of key/value pairs can be logged using %{key}note macros: | |
7152 | ||
7153 | note key value acl ... | |
7154 | logformat myFormat ... %{key}note ... | |
480926bd EB |
7155 | |
7156 | This clause only supports fast acl types. | |
7409131e | 7157 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
d7f4a0b7 CT |
7158 | DOC_END |
7159 | ||
41bd17a4 | 7160 | NAME: relaxed_header_parser |
7161 | COMMENT: on|off|warn | |
7162 | TYPE: tristate | |
7163 | LOC: Config.onoff.relaxed_header_parser | |
7164 | DEFAULT: on | |
7165 | DOC_START | |
7166 | In the default "on" setting Squid accepts certain forms | |
7167 | of non-compliant HTTP messages where it is unambiguous | |
7168 | what the sending application intended even if the message | |
7169 | is not correctly formatted. The messages is then normalized | |
7170 | to the correct form when forwarded by Squid. | |
cccac0a2 | 7171 | |
41bd17a4 | 7172 | If set to "warn" then a warning will be emitted in cache.log |
7173 | each time such HTTP error is encountered. | |
cccac0a2 | 7174 | |
41bd17a4 | 7175 | If set to "off" then such HTTP errors will cause the request |
7176 | or response to be rejected. | |
7177 | DOC_END | |
7d90757b | 7178 | |
55eae904 AR |
7179 | NAME: collapsed_forwarding |
7180 | COMMENT: (on|off) | |
7181 | TYPE: onoff | |
7182 | LOC: Config.onoff.collapsed_forwarding | |
7183 | DEFAULT: off | |
7184 | DOC_START | |
7185 | This option controls whether Squid is allowed to merge multiple | |
7186 | potentially cachable requests for the same URI before Squid knows | |
7187 | whether the response is going to be cachable. | |
7188 | ||
1a210de4 EB |
7189 | When enabled, instead of forwarding each concurrent request for |
7190 | the same URL, Squid just sends the first of them. The other, so | |
7191 | called "collapsed" requests, wait for the response to the first | |
7192 | request and, if it happens to be cachable, use that response. | |
7193 | Here, "concurrent requests" means "received after the first | |
7194 | request headers were parsed and before the corresponding response | |
7195 | headers were parsed". | |
7196 | ||
7197 | This feature is disabled by default: enabling collapsed | |
7198 | forwarding needlessly delays forwarding requests that look | |
7199 | cachable (when they are collapsed) but then need to be forwarded | |
7200 | individually anyway because they end up being for uncachable | |
7201 | content. However, in some cases, such as acceleration of highly | |
7202 | cachable content with periodic or grouped expiration times, the | |
7203 | gains from collapsing [large volumes of simultaneous refresh | |
7204 | requests] outweigh losses from such delays. | |
7205 | ||
7206 | Squid collapses two kinds of requests: regular client requests | |
7207 | received on one of the listening ports and internal "cache | |
7208 | revalidation" requests which are triggered by those regular | |
7209 | requests hitting a stale cached object. Revalidation collapsing | |
7210 | is currently disabled for Squid instances containing SMP-aware | |
7211 | disk or memory caches and for Vary-controlled cached objects. | |
55eae904 AR |
7212 | DOC_END |
7213 | ||
819be284 EB |
7214 | NAME: collapsed_forwarding_access |
7215 | TYPE: acl_access | |
7216 | DEFAULT: none | |
7217 | DEFAULT_DOC: Requests may be collapsed if collapsed_forwarding is on. | |
7218 | LOC: Config.accessList.collapsedForwardingAccess | |
7219 | DOC_START | |
7220 | Use this directive to restrict collapsed forwarding to a subset of | |
7221 | eligible requests. The directive is checked for regular HTTP | |
7222 | requests, internal revalidation requests, and HTCP/ICP requests. | |
7223 | ||
7224 | collapsed_forwarding_access allow|deny [!]aclname ... | |
7225 | ||
7226 | This directive cannot force collapsing. It has no effect on | |
7227 | collapsing unless collapsed_forwarding is 'on', and all other | |
7228 | collapsing preconditions are satisfied. | |
7229 | ||
7230 | * A denied request will not collapse, and future transactions will | |
7231 | not collapse on it (even if they are allowed to collapse). | |
7232 | ||
7233 | * An allowed request may collapse, or future transactions may | |
7234 | collapse on it (provided they are allowed to collapse). | |
7235 | ||
7236 | This directive is evaluated before receiving HTTP response headers | |
7237 | and without access to Squid-to-peer connection (if any). | |
7238 | ||
7239 | Only fast ACLs are supported. | |
7240 | ||
7241 | See also: collapsed_forwarding. | |
7242 | DOC_END | |
7243 | ||
daed75a9 | 7244 | NAME: shared_transient_entries_limit collapsed_forwarding_shared_entries_limit |
8f7dbf74 DD |
7245 | COMMENT: (number of entries) |
7246 | TYPE: int64_t | |
daed75a9 | 7247 | LOC: Config.shared_transient_entries_limit |
8f7dbf74 DD |
7248 | DEFAULT: 16384 |
7249 | DOC_START | |
daed75a9 EB |
7250 | This directive limits the size of a table used for sharing current |
7251 | transaction information among SMP workers. A table entry stores meta | |
7252 | information about a single cache entry being delivered to Squid | |
7253 | client(s) by one or more SMP workers. A single table entry consumes | |
7254 | less than 128 shared memory bytes. | |
8f7dbf74 | 7255 | |
daed75a9 EB |
7256 | The limit should be significantly larger than the number of |
7257 | concurrent non-collapsed cachable responses leaving Squid. For a | |
7258 | cache that handles less than 5000 concurrent requests, the default | |
8f7dbf74 DD |
7259 | setting of 16384 should be plenty. |
7260 | ||
daed75a9 EB |
7261 | Using excessively large values wastes shared memory. Limiting the |
7262 | table size too much results in hash collisions, leading to lower hit | |
7263 | ratio and missed SMP request collapsing opportunities: Transactions | |
7264 | left without a table entry cannot cache their responses and are | |
7265 | invisible to other concurrent requests for the same resource. | |
7266 | ||
7267 | A zero limit is allowed but unsupported. A positive small limit | |
7268 | lowers hit ratio, but zero limit disables a lot of essential | |
7269 | synchronization among SMP workers, leading to HTTP violations (e.g., | |
7270 | stale hit responses). It also disables shared collapsed forwarding: | |
7271 | A worker becomes unable to collapse its requests on transactions in | |
7272 | other workers, resulting in more trips to the origin server and more | |
7273 | cache thrashing. | |
8f7dbf74 DD |
7274 | DOC_END |
7275 | ||
41bd17a4 | 7276 | COMMENT_START |
7277 | TIMEOUTS | |
7278 | ----------------------------------------------------------------------------- | |
7279 | COMMENT_END | |
7280 | ||
7281 | NAME: forward_timeout | |
7282 | COMMENT: time-units | |
7283 | TYPE: time_t | |
7284 | LOC: Config.Timeout.forward | |
7285 | DEFAULT: 4 minutes | |
7286 | DOC_START | |
7287 | This parameter specifies how long Squid should at most attempt in | |
7288 | finding a forwarding path for the request before giving up. | |
cccac0a2 | 7289 | DOC_END |
7290 | ||
41bd17a4 | 7291 | NAME: connect_timeout |
7292 | COMMENT: time-units | |
7293 | TYPE: time_t | |
7294 | LOC: Config.Timeout.connect | |
7295 | DEFAULT: 1 minute | |
057f5854 | 7296 | DOC_START |
41bd17a4 | 7297 | This parameter specifies how long to wait for the TCP connect to |
7298 | the requested server or peer to complete before Squid should | |
7299 | attempt to find another path where to forward the request. | |
057f5854 | 7300 | DOC_END |
7301 | ||
41bd17a4 | 7302 | NAME: peer_connect_timeout |
7303 | COMMENT: time-units | |
7304 | TYPE: time_t | |
7305 | LOC: Config.Timeout.peer_connect | |
7306 | DEFAULT: 30 seconds | |
cccac0a2 | 7307 | DOC_START |
41bd17a4 | 7308 | This parameter specifies how long to wait for a pending TCP |
7309 | connection to a peer cache. The default is 30 seconds. You | |
7310 | may also set different timeout values for individual neighbors | |
7311 | with the 'connect-timeout' option on a 'cache_peer' line. | |
7312 | DOC_END | |
7f7db318 | 7313 | |
41bd17a4 | 7314 | NAME: read_timeout |
7315 | COMMENT: time-units | |
7316 | TYPE: time_t | |
7317 | LOC: Config.Timeout.read | |
7318 | DEFAULT: 15 minutes | |
7319 | DOC_START | |
d5430dc8 AJ |
7320 | Applied on peer server connections. |
7321 | ||
7322 | After each successful read(), the timeout will be extended by this | |
41bd17a4 | 7323 | amount. If no data is read again after this amount of time, |
d5430dc8 AJ |
7324 | the request is aborted and logged with ERR_READ_TIMEOUT. |
7325 | ||
7326 | The default is 15 minutes. | |
41bd17a4 | 7327 | DOC_END |
cccac0a2 | 7328 | |
5ef5e5cc AJ |
7329 | NAME: write_timeout |
7330 | COMMENT: time-units | |
7331 | TYPE: time_t | |
7332 | LOC: Config.Timeout.write | |
7333 | DEFAULT: 15 minutes | |
7334 | DOC_START | |
7335 | This timeout is tracked for all connections that have data | |
7336 | available for writing and are waiting for the socket to become | |
7337 | ready. After each successful write, the timeout is extended by | |
7338 | the configured amount. If Squid has data to write but the | |
7339 | connection is not ready for the configured duration, the | |
7340 | transaction associated with the connection is terminated. The | |
7341 | default is 15 minutes. | |
7342 | DOC_END | |
7343 | ||
41bd17a4 | 7344 | NAME: request_timeout |
7345 | TYPE: time_t | |
7346 | LOC: Config.Timeout.request | |
7347 | DEFAULT: 5 minutes | |
7348 | DOC_START | |
6b2a2108 | 7349 | How long to wait for complete HTTP request headers after initial |
41bd17a4 | 7350 | connection establishment. |
7351 | DOC_END | |
cccac0a2 | 7352 | |
3248e962 CT |
7353 | NAME: request_start_timeout |
7354 | TYPE: time_t | |
7355 | LOC: Config.Timeout.request_start_timeout | |
7356 | DEFAULT: 5 minutes | |
7357 | DOC_START | |
7358 | How long to wait for the first request byte after initial | |
7359 | connection establishment. | |
7360 | DOC_END | |
7361 | ||
97b32442 | 7362 | NAME: client_idle_pconn_timeout persistent_request_timeout |
41bd17a4 | 7363 | TYPE: time_t |
97b32442 | 7364 | LOC: Config.Timeout.clientIdlePconn |
41bd17a4 | 7365 | DEFAULT: 2 minutes |
7366 | DOC_START | |
7367 | How long to wait for the next HTTP request on a persistent | |
97b32442 | 7368 | client connection after the previous request completes. |
41bd17a4 | 7369 | DOC_END |
cccac0a2 | 7370 | |
f6e8754a AR |
7371 | NAME: ftp_client_idle_timeout |
7372 | TYPE: time_t | |
7373 | LOC: Config.Timeout.ftpClientIdle | |
7374 | DEFAULT: 30 minutes | |
7375 | DOC_START | |
7376 | How long to wait for an FTP request on a connection to Squid ftp_port. | |
7377 | Many FTP clients do not deal with idle connection closures well, | |
7378 | necessitating a longer default timeout than client_idle_pconn_timeout | |
7379 | used for incoming HTTP requests. | |
7380 | DOC_END | |
7381 | ||
41bd17a4 | 7382 | NAME: client_lifetime |
7383 | COMMENT: time-units | |
7384 | TYPE: time_t | |
7385 | LOC: Config.Timeout.lifetime | |
7386 | DEFAULT: 1 day | |
7387 | DOC_START | |
7388 | The maximum amount of time a client (browser) is allowed to | |
7389 | remain connected to the cache process. This protects the Cache | |
7390 | from having a lot of sockets (and hence file descriptors) tied up | |
7391 | in a CLOSE_WAIT state from remote clients that go away without | |
7392 | properly shutting down (either because of a network failure or | |
7393 | because of a poor client implementation). The default is one | |
7394 | day, 1440 minutes. | |
7d90757b | 7395 | |
41bd17a4 | 7396 | NOTE: The default value is intended to be much larger than any |
7397 | client would ever need to be connected to your cache. You | |
7398 | should probably change client_lifetime only as a last resort. | |
7399 | If you seem to have many client connections tying up | |
7400 | filedescriptors, we recommend first tuning the read_timeout, | |
7401 | request_timeout, persistent_request_timeout and quick_abort values. | |
cccac0a2 | 7402 | DOC_END |
7403 | ||
c5c06f02 CT |
7404 | NAME: pconn_lifetime |
7405 | COMMENT: time-units | |
7406 | TYPE: time_t | |
7407 | LOC: Config.Timeout.pconnLifetime | |
7408 | DEFAULT: 0 seconds | |
7409 | DOC_START | |
7410 | Desired maximum lifetime of a persistent connection. | |
7411 | When set, Squid will close a now-idle persistent connection that | |
7412 | exceeded configured lifetime instead of moving the connection into | |
7413 | the idle connection pool (or equivalent). No effect on ongoing/active | |
7414 | transactions. Connection lifetime is the time period from the | |
7415 | connection acceptance or opening time until "now". | |
9603207d | 7416 | |
c5c06f02 CT |
7417 | This limit is useful in environments with long-lived connections |
7418 | where Squid configuration or environmental factors change during a | |
7419 | single connection lifetime. If unrestricted, some connections may | |
7420 | last for hours and even days, ignoring those changes that should | |
7421 | have affected their behavior or their existence. | |
9603207d | 7422 | |
c5c06f02 CT |
7423 | Currently, a new lifetime value supplied via Squid reconfiguration |
7424 | has no effect on already idle connections unless they become busy. | |
9603207d | 7425 | |
c5c06f02 CT |
7426 | When set to '0' this limit is not used. |
7427 | DOC_END | |
7428 | ||
41bd17a4 | 7429 | NAME: half_closed_clients |
7430 | TYPE: onoff | |
7431 | LOC: Config.onoff.half_closed_clients | |
0c2f5c4f | 7432 | DEFAULT: off |
4eb368f9 | 7433 | DOC_START |
41bd17a4 | 7434 | Some clients may shutdown the sending side of their TCP |
7435 | connections, while leaving their receiving sides open. Sometimes, | |
7436 | Squid can not tell the difference between a half-closed and a | |
0c2f5c4f AJ |
7437 | fully-closed TCP connection. |
7438 | ||
7439 | By default, Squid will immediately close client connections when | |
7440 | read(2) returns "no more data to read." | |
7441 | ||
abdf1651 | 7442 | Change this option to 'on' and Squid will keep open connections |
0c2f5c4f AJ |
7443 | until a read(2) or write(2) on the socket returns an error. |
7444 | This may show some benefits for reverse proxies. But if not | |
7445 | it is recommended to leave OFF. | |
4eb368f9 | 7446 | DOC_END |
7447 | ||
97b32442 | 7448 | NAME: server_idle_pconn_timeout pconn_timeout |
41bd17a4 | 7449 | TYPE: time_t |
97b32442 | 7450 | LOC: Config.Timeout.serverIdlePconn |
41bd17a4 | 7451 | DEFAULT: 1 minute |
cccac0a2 | 7452 | DOC_START |
41bd17a4 | 7453 | Timeout for idle persistent connections to servers and other |
7454 | proxies. | |
7455 | DOC_END | |
cccac0a2 | 7456 | |
41bd17a4 | 7457 | NAME: ident_timeout |
7458 | TYPE: time_t | |
7459 | IFDEF: USE_IDENT | |
4daaf3cb | 7460 | LOC: Ident::TheConfig.timeout |
41bd17a4 | 7461 | DEFAULT: 10 seconds |
7462 | DOC_START | |
7463 | Maximum time to wait for IDENT lookups to complete. | |
cccac0a2 | 7464 | |
41bd17a4 | 7465 | If this is too high, and you enabled IDENT lookups from untrusted |
7466 | users, you might be susceptible to denial-of-service by having | |
7467 | many ident requests going at once. | |
cccac0a2 | 7468 | DOC_END |
7469 | ||
41bd17a4 | 7470 | NAME: shutdown_lifetime |
7471 | COMMENT: time-units | |
7472 | TYPE: time_t | |
7473 | LOC: Config.shutdownLifetime | |
7474 | DEFAULT: 30 seconds | |
cccac0a2 | 7475 | DOC_START |
41bd17a4 | 7476 | When SIGTERM or SIGHUP is received, the cache is put into |
7477 | "shutdown pending" mode until all active sockets are closed. | |
7478 | This value is the lifetime to set for all open descriptors | |
7479 | during shutdown mode. Any active clients after this many | |
7480 | seconds will receive a 'timeout' message. | |
cccac0a2 | 7481 | DOC_END |
0976f8db | 7482 | |
cccac0a2 | 7483 | COMMENT_START |
7484 | ADMINISTRATIVE PARAMETERS | |
7485 | ----------------------------------------------------------------------------- | |
7486 | COMMENT_END | |
7487 | ||
7488 | NAME: cache_mgr | |
7489 | TYPE: string | |
7490 | DEFAULT: webmaster | |
7491 | LOC: Config.adminEmail | |
7492 | DOC_START | |
7493 | Email-address of local cache manager who will receive | |
638402dd | 7494 | mail if the cache dies. The default is "webmaster". |
cccac0a2 | 7495 | DOC_END |
7496 | ||
abacf776 | 7497 | NAME: mail_from |
7498 | TYPE: string | |
7499 | DEFAULT: none | |
7500 | LOC: Config.EmailFrom | |
7501 | DOC_START | |
7502 | From: email-address for mail sent when the cache dies. | |
638402dd AJ |
7503 | The default is to use 'squid@unique_hostname'. |
7504 | ||
7505 | See also: unique_hostname directive. | |
abacf776 | 7506 | DOC_END |
7507 | ||
d084bf20 | 7508 | NAME: mail_program |
7509 | TYPE: eol | |
7510 | DEFAULT: mail | |
7511 | LOC: Config.EmailProgram | |
7512 | DOC_START | |
7513 | Email program used to send mail if the cache dies. | |
846a5e31 | 7514 | The default is "mail". The specified program must comply |
d084bf20 | 7515 | with the standard Unix mail syntax: |
846a5e31 | 7516 | mail-program recipient < mailfile |
7517 | ||
d084bf20 | 7518 | Optional command line options can be specified. |
7519 | DOC_END | |
7520 | ||
cccac0a2 | 7521 | NAME: cache_effective_user |
7522 | TYPE: string | |
5483d916 | 7523 | DEFAULT: @DEFAULT_CACHE_EFFECTIVE_USER@ |
cccac0a2 | 7524 | LOC: Config.effectiveUser |
e3d74828 | 7525 | DOC_START |
7526 | If you start Squid as root, it will change its effective/real | |
7527 | UID/GID to the user specified below. The default is to change | |
5483d916 | 7528 | to UID of @DEFAULT_CACHE_EFFECTIVE_USER@. |
64e288bd | 7529 | see also; cache_effective_group |
e3d74828 | 7530 | DOC_END |
7531 | ||
cccac0a2 | 7532 | NAME: cache_effective_group |
7533 | TYPE: string | |
7534 | DEFAULT: none | |
638402dd | 7535 | DEFAULT_DOC: Use system group memberships of the cache_effective_user account |
cccac0a2 | 7536 | LOC: Config.effectiveGroup |
7537 | DOC_START | |
64e288bd | 7538 | Squid sets the GID to the effective user's default group ID |
7539 | (taken from the password file) and supplementary group list | |
7540 | from the groups membership. | |
7541 | ||
e3d74828 | 7542 | If you want Squid to run with a specific GID regardless of |
7543 | the group memberships of the effective user then set this | |
7544 | to the group (or GID) you want Squid to run as. When set | |
64e288bd | 7545 | all other group privileges of the effective user are ignored |
e3d74828 | 7546 | and only this GID is effective. If Squid is not started as |
64e288bd | 7547 | root the user starting Squid MUST be member of the specified |
e3d74828 | 7548 | group. |
64e288bd | 7549 | |
7550 | This option is not recommended by the Squid Team. | |
7551 | Our preference is for administrators to configure a secure | |
7552 | user account for squid with UID/GID matching system policies. | |
cccac0a2 | 7553 | DOC_END |
7554 | ||
d3caee79 | 7555 | NAME: httpd_suppress_version_string |
7556 | COMMENT: on|off | |
7557 | TYPE: onoff | |
7558 | DEFAULT: off | |
7559 | LOC: Config.onoff.httpd_suppress_version_string | |
7560 | DOC_START | |
c81de627 AR |
7561 | Do not send Squid version string in HTTP metadata and generated content |
7562 | such as HTML error pages. Squid version string is still present in certain | |
d554eaad AJ |
7563 | SNMP responses, HTTP(S) Server response header field, |
7564 | various console output, and cache.log. | |
d3caee79 | 7565 | DOC_END |
7566 | ||
cccac0a2 | 7567 | NAME: visible_hostname |
7568 | TYPE: string | |
7569 | LOC: Config.visibleHostname | |
7570 | DEFAULT: none | |
638402dd | 7571 | DEFAULT_DOC: Automatically detect the system host name |
cccac0a2 | 7572 | DOC_START |
7573 | If you want to present a special hostname in error messages, etc, | |
7f7db318 | 7574 | define this. Otherwise, the return value of gethostname() |
cccac0a2 | 7575 | will be used. If you have multiple caches in a cluster and |
7576 | get errors about IP-forwarding you must set them to have individual | |
7577 | names with this setting. | |
7578 | DOC_END | |
7579 | ||
cccac0a2 | 7580 | NAME: unique_hostname |
7581 | TYPE: string | |
7582 | LOC: Config.uniqueHostname | |
7583 | DEFAULT: none | |
638402dd | 7584 | DEFAULT_DOC: Copy the value from visible_hostname |
cccac0a2 | 7585 | DOC_START |
7586 | If you want to have multiple machines with the same | |
7f7db318 | 7587 | 'visible_hostname' you must give each machine a different |
7588 | 'unique_hostname' so forwarding loops can be detected. | |
cccac0a2 | 7589 | DOC_END |
7590 | ||
cccac0a2 | 7591 | NAME: hostname_aliases |
7592 | TYPE: wordlist | |
7593 | LOC: Config.hostnameAliases | |
7594 | DEFAULT: none | |
7595 | DOC_START | |
7f7db318 | 7596 | A list of other DNS names your cache has. |
cccac0a2 | 7597 | DOC_END |
0976f8db | 7598 | |
c642c141 AJ |
7599 | NAME: umask |
7600 | TYPE: int | |
7601 | LOC: Config.umask | |
7602 | DEFAULT: 027 | |
7603 | DOC_START | |
7604 | Minimum umask which should be enforced while the proxy | |
7605 | is running, in addition to the umask set at startup. | |
7606 | ||
7607 | For a traditional octal representation of umasks, start | |
7608 | your value with 0. | |
7609 | DOC_END | |
7610 | ||
8d6275c0 | 7611 | COMMENT_START |
7612 | HTTPD-ACCELERATOR OPTIONS | |
7613 | ----------------------------------------------------------------------------- | |
7614 | COMMENT_END | |
7615 | ||
cccac0a2 | 7616 | NAME: httpd_accel_surrogate_id |
cccac0a2 | 7617 | TYPE: string |
b2b40d8c | 7618 | DEFAULT: none |
638402dd | 7619 | DEFAULT_DOC: visible_hostname is used if no specific ID is set. |
cccac0a2 | 7620 | LOC: Config.Accel.surrogate_id |
cccac0a2 | 7621 | DOC_START |
7622 | Surrogates (http://www.esi.org/architecture_spec_1.0.html) | |
7623 | need an identification token to allow control targeting. Because | |
7624 | a farm of surrogates may all perform the same tasks, they may share | |
7625 | an identification token. | |
609d5e06 AJ |
7626 | |
7627 | When the surrogate is a reverse-proxy, this ID is also | |
7628 | used as cdn-id for CDN-Loop detection (RFC 8586). | |
cccac0a2 | 7629 | DOC_END |
7630 | ||
7631 | NAME: http_accel_surrogate_remote | |
cccac0a2 | 7632 | COMMENT: on|off |
7633 | TYPE: onoff | |
7634 | DEFAULT: off | |
7635 | LOC: Config.onoff.surrogate_is_remote | |
7636 | DOC_START | |
638402dd AJ |
7637 | Remote surrogates (such as those in a CDN) honour the header |
7638 | "Surrogate-Control: no-store-remote". | |
7639 | ||
cccac0a2 | 7640 | Set this to on to have squid behave as a remote surrogate. |
7641 | DOC_END | |
7642 | ||
7643 | NAME: esi_parser | |
f41735ea | 7644 | IFDEF: USE_SQUID_ESI |
799b66d1 | 7645 | COMMENT: libxml2|expat |
cccac0a2 | 7646 | TYPE: string |
7647 | LOC: ESIParser::Type | |
799b66d1 AJ |
7648 | DEFAULT: auto |
7649 | DEFAULT_DOC: Selects libxml2 if available at ./configure time or libexpat otherwise. | |
cccac0a2 | 7650 | DOC_START |
799b66d1 AJ |
7651 | Selects the XML parsing library to use when interpreting responses with |
7652 | Edge Side Includes. | |
7653 | ||
7654 | To disable ESI handling completely, ./configure Squid with --disable-esi. | |
cccac0a2 | 7655 | DOC_END |
0976f8db | 7656 | |
9edd9041 | 7657 | COMMENT_START |
8d6275c0 | 7658 | DELAY POOL PARAMETERS |
9edd9041 | 7659 | ----------------------------------------------------------------------------- |
7660 | COMMENT_END | |
7661 | ||
7662 | NAME: delay_pools | |
7663 | TYPE: delay_pool_count | |
7664 | DEFAULT: 0 | |
9a0a18de | 7665 | IFDEF: USE_DELAY_POOLS |
9edd9041 | 7666 | LOC: Config.Delay |
7667 | DOC_START | |
7668 | This represents the number of delay pools to be used. For example, | |
7669 | if you have one class 2 delay pool and one class 3 delays pool, you | |
7670 | have a total of 2 delay pools. | |
638402dd AJ |
7671 | |
7672 | See also delay_parameters, delay_class, delay_access for pool | |
7673 | configuration details. | |
9edd9041 | 7674 | DOC_END |
7675 | ||
7676 | NAME: delay_class | |
7677 | TYPE: delay_pool_class | |
7678 | DEFAULT: none | |
9a0a18de | 7679 | IFDEF: USE_DELAY_POOLS |
9edd9041 | 7680 | LOC: Config.Delay |
7681 | DOC_START | |
7682 | This defines the class of each delay pool. There must be exactly one | |
7683 | delay_class line for each delay pool. For example, to define two | |
7684 | delay pools, one of class 2 and one of class 3, the settings above | |
7685 | and here would be: | |
7686 | ||
b1fb3348 AJ |
7687 | Example: |
7688 | delay_pools 4 # 4 delay pools | |
7689 | delay_class 1 2 # pool 1 is a class 2 pool | |
7690 | delay_class 2 3 # pool 2 is a class 3 pool | |
7691 | delay_class 3 4 # pool 3 is a class 4 pool | |
7692 | delay_class 4 5 # pool 4 is a class 5 pool | |
9edd9041 | 7693 | |
7694 | The delay pool classes are: | |
7695 | ||
7696 | class 1 Everything is limited by a single aggregate | |
7697 | bucket. | |
7698 | ||
7699 | class 2 Everything is limited by a single aggregate | |
7700 | bucket as well as an "individual" bucket chosen | |
b1fb3348 | 7701 | from bits 25 through 32 of the IPv4 address. |
9edd9041 | 7702 | |
7703 | class 3 Everything is limited by a single aggregate | |
7704 | bucket as well as a "network" bucket chosen | |
7705 | from bits 17 through 24 of the IP address and a | |
7706 | "individual" bucket chosen from bits 17 through | |
b1fb3348 | 7707 | 32 of the IPv4 address. |
9edd9041 | 7708 | |
7709 | class 4 Everything in a class 3 delay pool, with an | |
7710 | additional limit on a per user basis. This | |
7711 | only takes effect if the username is established | |
7712 | in advance - by forcing authentication in your | |
7713 | http_access rules. | |
7714 | ||
7715 | class 5 Requests are grouped according their tag (see | |
7716 | external_acl's tag= reply). | |
7717 | ||
0b68481a AJ |
7718 | |
7719 | Each pool also requires a delay_parameters directive to configure the pool size | |
7720 | and speed limits used whenever the pool is applied to a request. Along with | |
7721 | a set of delay_access directives to determine when it is used. | |
7722 | ||
9edd9041 | 7723 | NOTE: If an IP address is a.b.c.d |
7724 | -> bits 25 through 32 are "d" | |
7725 | -> bits 17 through 24 are "c" | |
7726 | -> bits 17 through 32 are "c * 256 + d" | |
b1fb3348 AJ |
7727 | |
7728 | NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to | |
7729 | IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic. | |
638402dd AJ |
7730 | |
7731 | This clause only supports fast acl types. | |
7409131e | 7732 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
638402dd AJ |
7733 | |
7734 | See also delay_parameters and delay_access. | |
9edd9041 | 7735 | DOC_END |
7736 | ||
7737 | NAME: delay_access | |
7738 | TYPE: delay_pool_access | |
7739 | DEFAULT: none | |
638402dd | 7740 | DEFAULT_DOC: Deny using the pool, unless allow rules exist in squid.conf for the pool. |
9a0a18de | 7741 | IFDEF: USE_DELAY_POOLS |
9edd9041 | 7742 | LOC: Config.Delay |
7743 | DOC_START | |
7744 | This is used to determine which delay pool a request falls into. | |
7745 | ||
7746 | delay_access is sorted per pool and the matching starts with pool 1, | |
7747 | then pool 2, ..., and finally pool N. The first delay pool where the | |
7748 | request is allowed is selected for the request. If it does not allow | |
7749 | the request to any pool then the request is not delayed (default). | |
7750 | ||
7751 | For example, if you want some_big_clients in delay | |
7752 | pool 1 and lotsa_little_clients in delay pool 2: | |
7753 | ||
638402dd AJ |
7754 | delay_access 1 allow some_big_clients |
7755 | delay_access 1 deny all | |
7756 | delay_access 2 allow lotsa_little_clients | |
7757 | delay_access 2 deny all | |
7758 | delay_access 3 allow authenticated_clients | |
7759 | ||
7760 | See also delay_parameters and delay_class. | |
7761 | ||
9edd9041 | 7762 | DOC_END |
7763 | ||
7764 | NAME: delay_parameters | |
7765 | TYPE: delay_pool_rates | |
7766 | DEFAULT: none | |
9a0a18de | 7767 | IFDEF: USE_DELAY_POOLS |
9edd9041 | 7768 | LOC: Config.Delay |
7769 | DOC_START | |
7770 | This defines the parameters for a delay pool. Each delay pool has | |
7771 | a number of "buckets" associated with it, as explained in the | |
0b68481a | 7772 | description of delay_class. |
9edd9041 | 7773 | |
0b68481a | 7774 | For a class 1 delay pool, the syntax is: |
6e7502cc | 7775 | delay_class pool 1 |
0b68481a | 7776 | delay_parameters pool aggregate |
9edd9041 | 7777 | |
7778 | For a class 2 delay pool: | |
6e7502cc | 7779 | delay_class pool 2 |
0b68481a | 7780 | delay_parameters pool aggregate individual |
9edd9041 | 7781 | |
7782 | For a class 3 delay pool: | |
6e7502cc | 7783 | delay_class pool 3 |
0b68481a | 7784 | delay_parameters pool aggregate network individual |
9edd9041 | 7785 | |
7786 | For a class 4 delay pool: | |
6e7502cc | 7787 | delay_class pool 4 |
0b68481a | 7788 | delay_parameters pool aggregate network individual user |
9edd9041 | 7789 | |
7790 | For a class 5 delay pool: | |
6e7502cc | 7791 | delay_class pool 5 |
0b68481a | 7792 | delay_parameters pool tagrate |
9edd9041 | 7793 | |
0b68481a | 7794 | The option variables are: |
9edd9041 | 7795 | |
7796 | pool a pool number - ie, a number between 1 and the | |
7797 | number specified in delay_pools as used in | |
7798 | delay_class lines. | |
7799 | ||
fdb47ac6 | 7800 | aggregate the speed limit parameters for the aggregate bucket |
9edd9041 | 7801 | (class 1, 2, 3). |
7802 | ||
fdb47ac6 | 7803 | individual the speed limit parameters for the individual |
9edd9041 | 7804 | buckets (class 2, 3). |
7805 | ||
fdb47ac6 | 7806 | network the speed limit parameters for the network buckets |
9edd9041 | 7807 | (class 3). |
7808 | ||
fdb47ac6 | 7809 | user the speed limit parameters for the user buckets |
9edd9041 | 7810 | (class 4). |
7811 | ||
fdb47ac6 | 7812 | tagrate the speed limit parameters for the tag buckets |
9edd9041 | 7813 | (class 5). |
7814 | ||
7815 | A pair of delay parameters is written restore/maximum, where restore is | |
7816 | the number of bytes (not bits - modem and network speeds are usually | |
7817 | quoted in bits) per second placed into the bucket, and maximum is the | |
7818 | maximum number of bytes which can be in the bucket at any time. | |
7819 | ||
0b68481a AJ |
7820 | There must be one delay_parameters line for each delay pool. |
7821 | ||
7822 | ||
9edd9041 | 7823 | For example, if delay pool number 1 is a class 2 delay pool as in the |
0b68481a | 7824 | above example, and is being used to strictly limit each host to 64Kbit/sec |
9edd9041 | 7825 | (plus overheads), with no overall limit, the line is: |
7826 | ||
6e7502cc | 7827 | delay_parameters 1 none 8000/8000 |
0b68481a | 7828 | |
c3e31a3a | 7829 | Note that 8 x 8K Byte/sec -> 64K bit/sec. |
9edd9041 | 7830 | |
6e7502cc | 7831 | Note that the word 'none' is used to represent no limit. |
9edd9041 | 7832 | |
0b68481a | 7833 | |
9edd9041 | 7834 | And, if delay pool number 2 is a class 3 delay pool as in the above |
0b68481a AJ |
7835 | example, and you want to limit it to a total of 256Kbit/sec (strict limit) |
7836 | with each 8-bit network permitted 64Kbit/sec (strict limit) and each | |
7837 | individual host permitted 4800bit/sec with a bucket maximum size of 64Kbits | |
9edd9041 | 7838 | to permit a decent web page to be downloaded at a decent speed |
7839 | (if the network is not being limited due to overuse) but slow down | |
7840 | large downloads more significantly: | |
7841 | ||
0b68481a AJ |
7842 | delay_parameters 2 32000/32000 8000/8000 600/8000 |
7843 | ||
c3e31a3a AJ |
7844 | Note that 8 x 32K Byte/sec -> 256K bit/sec. |
7845 | 8 x 8K Byte/sec -> 64K bit/sec. | |
7846 | 8 x 600 Byte/sec -> 4800 bit/sec. | |
9edd9041 | 7847 | |
9edd9041 | 7848 | |
7849 | Finally, for a class 4 delay pool as in the example - each user will | |
0b68481a | 7850 | be limited to 128Kbits/sec no matter how many workstations they are logged into.: |
9edd9041 | 7851 | |
0b68481a | 7852 | delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000 |
638402dd AJ |
7853 | |
7854 | ||
7855 | See also delay_class and delay_access. | |
7856 | ||
9edd9041 | 7857 | DOC_END |
7858 | ||
7859 | NAME: delay_initial_bucket_level | |
7860 | COMMENT: (percent, 0-100) | |
ae870270 | 7861 | TYPE: u_short |
9edd9041 | 7862 | DEFAULT: 50 |
9a0a18de | 7863 | IFDEF: USE_DELAY_POOLS |
9edd9041 | 7864 | LOC: Config.Delay.initial |
7865 | DOC_START | |
7866 | The initial bucket percentage is used to determine how much is put | |
7867 | in each bucket when squid starts, is reconfigured, or first notices | |
7868 | a host accessing it (in class 2 and class 3, individual hosts and | |
7869 | networks only have buckets associated with them once they have been | |
7870 | "seen" by squid). | |
7871 | DOC_END | |
7872 | ||
b4cd430a CT |
7873 | COMMENT_START |
7874 | CLIENT DELAY POOL PARAMETERS | |
7875 | ----------------------------------------------------------------------------- | |
7876 | COMMENT_END | |
7877 | ||
7878 | NAME: client_delay_pools | |
7879 | TYPE: client_delay_pool_count | |
7880 | DEFAULT: 0 | |
9a0a18de | 7881 | IFDEF: USE_DELAY_POOLS |
b4cd430a CT |
7882 | LOC: Config.ClientDelay |
7883 | DOC_START | |
7884 | This option specifies the number of client delay pools used. It must | |
7885 | preceed other client_delay_* options. | |
7886 | ||
638402dd AJ |
7887 | Example: |
7888 | client_delay_pools 2 | |
7889 | ||
7890 | See also client_delay_parameters and client_delay_access. | |
b4cd430a CT |
7891 | DOC_END |
7892 | ||
7893 | NAME: client_delay_initial_bucket_level | |
7894 | COMMENT: (percent, 0-no_limit) | |
ae870270 | 7895 | TYPE: u_short |
b4cd430a | 7896 | DEFAULT: 50 |
9a0a18de | 7897 | IFDEF: USE_DELAY_POOLS |
b4cd430a CT |
7898 | LOC: Config.ClientDelay.initial |
7899 | DOC_START | |
7900 | This option determines the initial bucket size as a percentage of | |
7901 | max_bucket_size from client_delay_parameters. Buckets are created | |
7902 | at the time of the "first" connection from the matching IP. Idle | |
7903 | buckets are periodically deleted up. | |
7904 | ||
7905 | You can specify more than 100 percent but note that such "oversized" | |
7906 | buckets are not refilled until their size goes down to max_bucket_size | |
7907 | from client_delay_parameters. | |
7908 | ||
638402dd AJ |
7909 | Example: |
7910 | client_delay_initial_bucket_level 50 | |
b4cd430a CT |
7911 | DOC_END |
7912 | ||
7913 | NAME: client_delay_parameters | |
7914 | TYPE: client_delay_pool_rates | |
7915 | DEFAULT: none | |
9a0a18de | 7916 | IFDEF: USE_DELAY_POOLS |
b4cd430a CT |
7917 | LOC: Config.ClientDelay |
7918 | DOC_START | |
7919 | ||
7920 | This option configures client-side bandwidth limits using the | |
7921 | following format: | |
7922 | ||
7923 | client_delay_parameters pool speed_limit max_bucket_size | |
7924 | ||
7925 | pool is an integer ID used for client_delay_access matching. | |
7926 | ||
7927 | speed_limit is bytes added to the bucket per second. | |
7928 | ||
7929 | max_bucket_size is the maximum size of a bucket, enforced after any | |
7930 | speed_limit additions. | |
7931 | ||
7932 | Please see the delay_parameters option for more information and | |
7933 | examples. | |
7934 | ||
638402dd AJ |
7935 | Example: |
7936 | client_delay_parameters 1 1024 2048 | |
7937 | client_delay_parameters 2 51200 16384 | |
7938 | ||
7939 | See also client_delay_access. | |
7940 | ||
b4cd430a CT |
7941 | DOC_END |
7942 | ||
7943 | NAME: client_delay_access | |
7944 | TYPE: client_delay_pool_access | |
7945 | DEFAULT: none | |
638402dd | 7946 | DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool. |
9a0a18de | 7947 | IFDEF: USE_DELAY_POOLS |
b4cd430a CT |
7948 | LOC: Config.ClientDelay |
7949 | DOC_START | |
b4cd430a CT |
7950 | This option determines the client-side delay pool for the |
7951 | request: | |
7952 | ||
7953 | client_delay_access pool_ID allow|deny acl_name | |
7954 | ||
7955 | All client_delay_access options are checked in their pool ID | |
7956 | order, starting with pool 1. The first checked pool with allowed | |
7957 | request is selected for the request. If no ACL matches or there | |
7958 | are no client_delay_access options, the request bandwidth is not | |
7959 | limited. | |
7960 | ||
7961 | The ACL-selected pool is then used to find the | |
7962 | client_delay_parameters for the request. Client-side pools are | |
7963 | not used to aggregate clients. Clients are always aggregated | |
7964 | based on their source IP addresses (one bucket per source IP). | |
7965 | ||
638402dd | 7966 | This clause only supports fast acl types. |
7409131e | 7967 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
638402dd AJ |
7968 | Additionally, only the client TCP connection details are available. |
7969 | ACLs testing HTTP properties will not work. | |
7970 | ||
b4cd430a CT |
7971 | Please see delay_access for more examples. |
7972 | ||
638402dd AJ |
7973 | Example: |
7974 | client_delay_access 1 allow low_rate_network | |
7975 | client_delay_access 2 allow vips_network | |
7976 | ||
7977 | ||
7978 | See also client_delay_parameters and client_delay_pools. | |
b4cd430a CT |
7979 | DOC_END |
7980 | ||
b27668ec EB |
7981 | NAME: response_delay_pool |
7982 | TYPE: response_delay_pool_parameters | |
7983 | DEFAULT: none | |
7984 | IFDEF: USE_DELAY_POOLS | |
7985 | LOC: Config.MessageDelay | |
7986 | DOC_START | |
7987 | This option configures client response bandwidth limits using the | |
7988 | following format: | |
7989 | ||
7990 | response_delay_pool name [option=value] ... | |
7991 | ||
7992 | name the response delay pool name | |
7993 | ||
7994 | available options: | |
7995 | ||
7996 | individual-restore The speed limit of an individual | |
7997 | bucket(bytes/s). To be used in conjunction | |
7998 | with 'individual-maximum'. | |
7999 | ||
8000 | individual-maximum The maximum number of bytes which can | |
8001 | be placed into the individual bucket. To be used | |
8002 | in conjunction with 'individual-restore'. | |
8003 | ||
8004 | aggregate-restore The speed limit for the aggregate | |
8005 | bucket(bytes/s). To be used in conjunction with | |
8006 | 'aggregate-maximum'. | |
8007 | ||
8008 | aggregate-maximum The maximum number of bytes which can | |
8009 | be placed into the aggregate bucket. To be used | |
8010 | in conjunction with 'aggregate-restore'. | |
8011 | ||
8012 | initial-bucket-level The initial bucket size as a percentage | |
8013 | of individual-maximum. | |
8014 | ||
8015 | Individual and(or) aggregate bucket options may not be specified, | |
8016 | meaning no individual and(or) aggregate speed limitation. | |
8017 | See also response_delay_pool_access and delay_parameters for | |
8018 | terminology details. | |
8019 | DOC_END | |
8020 | ||
8021 | NAME: response_delay_pool_access | |
8022 | TYPE: response_delay_pool_access | |
8023 | DEFAULT: none | |
8024 | DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool. | |
8025 | IFDEF: USE_DELAY_POOLS | |
8026 | LOC: Config.MessageDelay | |
8027 | DOC_START | |
8028 | Determines whether a specific named response delay pool is used | |
8029 | for the transaction. The syntax for this directive is: | |
8030 | ||
8031 | response_delay_pool_access pool_name allow|deny acl_name | |
8032 | ||
8033 | All response_delay_pool_access options are checked in the order | |
8034 | they appear in this configuration file. The first rule with a | |
8035 | matching ACL wins. If (and only if) an "allow" rule won, Squid | |
8036 | assigns the response to the corresponding named delay pool. | |
8037 | DOC_END | |
8038 | ||
cccac0a2 | 8039 | COMMENT_START |
8d6275c0 | 8040 | WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS |
cccac0a2 | 8041 | ----------------------------------------------------------------------------- |
8042 | COMMENT_END | |
8043 | ||
8d6275c0 | 8044 | NAME: wccp_router |
8045 | TYPE: address | |
8046 | LOC: Config.Wccp.router | |
0eb08770 | 8047 | DEFAULT: any_addr |
638402dd | 8048 | DEFAULT_DOC: WCCP disabled. |
8d6275c0 | 8049 | IFDEF: USE_WCCP |
e313ab0a AJ |
8050 | DOC_START |
8051 | Use this option to define your WCCP ``home'' router for | |
8052 | Squid. | |
8053 | ||
8054 | wccp_router supports a single WCCP(v1) router | |
8055 | ||
8056 | wccp2_router supports multiple WCCPv2 routers | |
8057 | ||
8058 | only one of the two may be used at the same time and defines | |
8059 | which version of WCCP to use. | |
8060 | DOC_END | |
df2eec10 | 8061 | |
8d6275c0 | 8062 | NAME: wccp2_router |
9fb4efad | 8063 | TYPE: IpAddress_list |
8d6275c0 | 8064 | LOC: Config.Wccp2.router |
cccac0a2 | 8065 | DEFAULT: none |
638402dd | 8066 | DEFAULT_DOC: WCCPv2 disabled. |
8d6275c0 | 8067 | IFDEF: USE_WCCPv2 |
cccac0a2 | 8068 | DOC_START |
8d6275c0 | 8069 | Use this option to define your WCCP ``home'' router for |
8070 | Squid. | |
cccac0a2 | 8071 | |
8d6275c0 | 8072 | wccp_router supports a single WCCP(v1) router |
cccac0a2 | 8073 | |
8d6275c0 | 8074 | wccp2_router supports multiple WCCPv2 routers |
cccac0a2 | 8075 | |
8d6275c0 | 8076 | only one of the two may be used at the same time and defines |
8077 | which version of WCCP to use. | |
8078 | DOC_END | |
8079 | ||
8080 | NAME: wccp_version | |
cccac0a2 | 8081 | TYPE: int |
8d6275c0 | 8082 | LOC: Config.Wccp.version |
8083 | DEFAULT: 4 | |
8084 | IFDEF: USE_WCCP | |
cccac0a2 | 8085 | DOC_START |
8d6275c0 | 8086 | This directive is only relevant if you need to set up WCCP(v1) |
8087 | to some very old and end-of-life Cisco routers. In all other | |
8088 | setups it must be left unset or at the default setting. | |
8089 | It defines an internal version in the WCCP(v1) protocol, | |
8090 | with version 4 being the officially documented protocol. | |
cccac0a2 | 8091 | |
8d6275c0 | 8092 | According to some users, Cisco IOS 11.2 and earlier only |
8093 | support WCCP version 3. If you're using that or an earlier | |
8094 | version of IOS, you may need to change this value to 3, otherwise | |
8095 | do not specify this parameter. | |
cccac0a2 | 8096 | DOC_END |
8097 | ||
8d6275c0 | 8098 | NAME: wccp2_rebuild_wait |
8099 | TYPE: onoff | |
8100 | LOC: Config.Wccp2.rebuildwait | |
8101 | DEFAULT: on | |
8102 | IFDEF: USE_WCCPv2 | |
8103 | DOC_START | |
8104 | If this is enabled Squid will wait for the cache dir rebuild to finish | |
8105 | before sending the first wccp2 HereIAm packet | |
8106 | DOC_END | |
cccac0a2 | 8107 | |
8d6275c0 | 8108 | NAME: wccp2_forwarding_method |
e313ab0a | 8109 | TYPE: wccp2_method |
8d6275c0 | 8110 | LOC: Config.Wccp2.forwarding_method |
451c4786 | 8111 | DEFAULT: gre |
8d6275c0 | 8112 | IFDEF: USE_WCCPv2 |
cccac0a2 | 8113 | DOC_START |
699acd19 | 8114 | WCCP2 allows the setting of forwarding methods between the |
8d6275c0 | 8115 | router/switch and the cache. Valid values are as follows: |
cccac0a2 | 8116 | |
451c4786 AJ |
8117 | gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel) |
8118 | l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting) | |
cccac0a2 | 8119 | |
8d6275c0 | 8120 | Currently (as of IOS 12.4) cisco routers only support GRE. |
8121 | Cisco switches only support the L2 redirect assignment method. | |
cccac0a2 | 8122 | DOC_END |
8123 | ||
8d6275c0 | 8124 | NAME: wccp2_return_method |
e313ab0a | 8125 | TYPE: wccp2_method |
8d6275c0 | 8126 | LOC: Config.Wccp2.return_method |
451c4786 | 8127 | DEFAULT: gre |
8d6275c0 | 8128 | IFDEF: USE_WCCPv2 |
cccac0a2 | 8129 | DOC_START |
699acd19 | 8130 | WCCP2 allows the setting of return methods between the |
8d6275c0 | 8131 | router/switch and the cache for packets that the cache |
8132 | decides not to handle. Valid values are as follows: | |
cccac0a2 | 8133 | |
451c4786 AJ |
8134 | gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel) |
8135 | l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting) | |
cccac0a2 | 8136 | |
8d6275c0 | 8137 | Currently (as of IOS 12.4) cisco routers only support GRE. |
8138 | Cisco switches only support the L2 redirect assignment. | |
cccac0a2 | 8139 | |
699acd19 | 8140 | If the "ip wccp redirect exclude in" command has been |
8d6275c0 | 8141 | enabled on the cache interface, then it is still safe for |
8142 | the proxy server to use a l2 redirect method even if this | |
8143 | option is set to GRE. | |
cccac0a2 | 8144 | DOC_END |
8145 | ||
8d6275c0 | 8146 | NAME: wccp2_assignment_method |
451c4786 | 8147 | TYPE: wccp2_amethod |
8d6275c0 | 8148 | LOC: Config.Wccp2.assignment_method |
451c4786 | 8149 | DEFAULT: hash |
8d6275c0 | 8150 | IFDEF: USE_WCCPv2 |
cccac0a2 | 8151 | DOC_START |
8d6275c0 | 8152 | WCCP2 allows the setting of methods to assign the WCCP hash |
8153 | Valid values are as follows: | |
cccac0a2 | 8154 | |
451c4786 | 8155 | hash - Hash assignment |
bb7a1781 | 8156 | mask - Mask assignment |
cccac0a2 | 8157 | |
8d6275c0 | 8158 | As a general rule, cisco routers support the hash assignment method |
8159 | and cisco switches support the mask assignment method. | |
8160 | DOC_END | |
cccac0a2 | 8161 | |
8d6275c0 | 8162 | NAME: wccp2_service |
8163 | TYPE: wccp2_service | |
8164 | LOC: Config.Wccp2.info | |
8d6275c0 | 8165 | DEFAULT_IF_NONE: standard 0 |
638402dd | 8166 | DEFAULT_DOC: Use the 'web-cache' standard service. |
8d6275c0 | 8167 | IFDEF: USE_WCCPv2 |
8168 | DOC_START | |
8169 | WCCP2 allows for multiple traffic services. There are two | |
8170 | types: "standard" and "dynamic". The standard type defines | |
8171 | one service id - http (id 0). The dynamic service ids can be from | |
8172 | 51 to 255 inclusive. In order to use a dynamic service id | |
8173 | one must define the type of traffic to be redirected; this is done | |
8174 | using the wccp2_service_info option. | |
8175 | ||
8176 | The "standard" type does not require a wccp2_service_info option, | |
8177 | just specifying the service id will suffice. | |
8178 | ||
8179 | MD5 service authentication can be enabled by adding | |
8180 | "password=<password>" to the end of this service declaration. | |
8181 | ||
8182 | Examples: | |
8183 | ||
8184 | wccp2_service standard 0 # for the 'web-cache' standard service | |
8185 | wccp2_service dynamic 80 # a dynamic service type which will be | |
8186 | # fleshed out with subsequent options. | |
8187 | wccp2_service standard 0 password=foo | |
8d6275c0 | 8188 | DOC_END |
8189 | ||
8190 | NAME: wccp2_service_info | |
8191 | TYPE: wccp2_service_info | |
8192 | LOC: Config.Wccp2.info | |
8193 | DEFAULT: none | |
8194 | IFDEF: USE_WCCPv2 | |
8195 | DOC_START | |
8196 | Dynamic WCCPv2 services require further information to define the | |
8197 | traffic you wish to have diverted. | |
8198 | ||
8199 | The format is: | |
8200 | ||
8201 | wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>.. | |
8202 | priority=<priority> ports=<port>,<port>.. | |
8203 | ||
8204 | The relevant WCCPv2 flags: | |
8205 | + src_ip_hash, dst_ip_hash | |
005fe566 | 8206 | + source_port_hash, dst_port_hash |
8d6275c0 | 8207 | + src_ip_alt_hash, dst_ip_alt_hash |
8208 | + src_port_alt_hash, dst_port_alt_hash | |
8209 | + ports_source | |
8210 | ||
8211 | The port list can be one to eight entries. | |
8212 | ||
8213 | Example: | |
8214 | ||
8215 | wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source | |
8216 | priority=240 ports=80 | |
8217 | ||
8218 | Note: the service id must have been defined by a previous | |
8219 | 'wccp2_service dynamic <id>' entry. | |
8220 | DOC_END | |
8221 | ||
8222 | NAME: wccp2_weight | |
8223 | TYPE: int | |
8224 | LOC: Config.Wccp2.weight | |
8225 | DEFAULT: 10000 | |
8226 | IFDEF: USE_WCCPv2 | |
8227 | DOC_START | |
8228 | Each cache server gets assigned a set of the destination | |
8229 | hash proportional to their weight. | |
8230 | DOC_END | |
8231 | ||
8232 | NAME: wccp_address | |
8233 | TYPE: address | |
8234 | LOC: Config.Wccp.address | |
8235 | DEFAULT: 0.0.0.0 | |
638402dd | 8236 | DEFAULT_DOC: Address selected by the operating system. |
8d6275c0 | 8237 | IFDEF: USE_WCCP |
638402dd | 8238 | DOC_START |
dfd5ce0a | 8239 | Use this option if you require WCCP(v1) to use a specific |
638402dd AJ |
8240 | interface address. |
8241 | ||
8242 | The default behavior is to not bind to any specific address. | |
8243 | DOC_END | |
df2eec10 | 8244 | |
8d6275c0 | 8245 | NAME: wccp2_address |
8246 | TYPE: address | |
8247 | LOC: Config.Wccp2.address | |
8248 | DEFAULT: 0.0.0.0 | |
638402dd | 8249 | DEFAULT_DOC: Address selected by the operating system. |
8d6275c0 | 8250 | IFDEF: USE_WCCPv2 |
8251 | DOC_START | |
dfd5ce0a | 8252 | Use this option if you require WCCPv2 to use a specific |
8d6275c0 | 8253 | interface address. |
8254 | ||
8255 | The default behavior is to not bind to any specific address. | |
8256 | DOC_END | |
8257 | ||
8258 | COMMENT_START | |
8259 | PERSISTENT CONNECTION HANDLING | |
8260 | ----------------------------------------------------------------------------- | |
8261 | ||
8262 | Also see "pconn_timeout" in the TIMEOUTS section | |
8263 | COMMENT_END | |
8264 | ||
8265 | NAME: client_persistent_connections | |
8266 | TYPE: onoff | |
8267 | LOC: Config.onoff.client_pconns | |
8268 | DEFAULT: on | |
638402dd AJ |
8269 | DOC_START |
8270 | Persistent connection support for clients. | |
8271 | Squid uses persistent connections (when allowed). You can use | |
8272 | this option to disable persistent connections with clients. | |
8273 | DOC_END | |
8d6275c0 | 8274 | |
8275 | NAME: server_persistent_connections | |
8276 | TYPE: onoff | |
8277 | LOC: Config.onoff.server_pconns | |
8278 | DEFAULT: on | |
8279 | DOC_START | |
638402dd AJ |
8280 | Persistent connection support for servers. |
8281 | Squid uses persistent connections (when allowed). You can use | |
8282 | this option to disable persistent connections with servers. | |
8d6275c0 | 8283 | DOC_END |
8284 | ||
8285 | NAME: persistent_connection_after_error | |
8286 | TYPE: onoff | |
8287 | LOC: Config.onoff.error_pconns | |
0fccfb7f | 8288 | DEFAULT: on |
8d6275c0 | 8289 | DOC_START |
8290 | With this directive the use of persistent connections after | |
8291 | HTTP errors can be disabled. Useful if you have clients | |
8292 | who fail to handle errors on persistent connections proper. | |
8293 | DOC_END | |
8294 | ||
8295 | NAME: detect_broken_pconn | |
8296 | TYPE: onoff | |
8297 | LOC: Config.onoff.detect_broken_server_pconns | |
8298 | DEFAULT: off | |
8299 | DOC_START | |
8300 | Some servers have been found to incorrectly signal the use | |
8301 | of HTTP/1.0 persistent connections even on replies not | |
8302 | compatible, causing significant delays. This server problem | |
8303 | has mostly been seen on redirects. | |
8304 | ||
8305 | By enabling this directive Squid attempts to detect such | |
8306 | broken replies and automatically assume the reply is finished | |
8307 | after 10 seconds timeout. | |
8308 | DOC_END | |
8309 | ||
8310 | COMMENT_START | |
8311 | CACHE DIGEST OPTIONS | |
8312 | ----------------------------------------------------------------------------- | |
8313 | COMMENT_END | |
8314 | ||
8315 | NAME: digest_generation | |
8316 | IFDEF: USE_CACHE_DIGESTS | |
8317 | TYPE: onoff | |
8318 | LOC: Config.onoff.digest_generation | |
8319 | DEFAULT: on | |
8320 | DOC_START | |
8321 | This controls whether the server will generate a Cache Digest | |
8322 | of its contents. By default, Cache Digest generation is | |
13e917b5 | 8323 | enabled if Squid is compiled with --enable-cache-digests defined. |
8d6275c0 | 8324 | DOC_END |
8325 | ||
8326 | NAME: digest_bits_per_entry | |
8327 | IFDEF: USE_CACHE_DIGESTS | |
8328 | TYPE: int | |
8329 | LOC: Config.digest.bits_per_entry | |
8330 | DEFAULT: 5 | |
8331 | DOC_START | |
8332 | This is the number of bits of the server's Cache Digest which | |
8333 | will be associated with the Digest entry for a given HTTP | |
8334 | Method and URL (public key) combination. The default is 5. | |
8335 | DOC_END | |
8336 | ||
8337 | NAME: digest_rebuild_period | |
8338 | IFDEF: USE_CACHE_DIGESTS | |
8339 | COMMENT: (seconds) | |
8340 | TYPE: time_t | |
8341 | LOC: Config.digest.rebuild_period | |
8342 | DEFAULT: 1 hour | |
8343 | DOC_START | |
749ceff8 | 8344 | This is the wait time between Cache Digest rebuilds. |
8d6275c0 | 8345 | DOC_END |
8346 | ||
8347 | NAME: digest_rewrite_period | |
8348 | COMMENT: (seconds) | |
8349 | IFDEF: USE_CACHE_DIGESTS | |
8350 | TYPE: time_t | |
8351 | LOC: Config.digest.rewrite_period | |
8352 | DEFAULT: 1 hour | |
8353 | DOC_START | |
749ceff8 | 8354 | This is the wait time between Cache Digest writes to |
8d6275c0 | 8355 | disk. |
8356 | DOC_END | |
8357 | ||
8358 | NAME: digest_swapout_chunk_size | |
8359 | COMMENT: (bytes) | |
8360 | TYPE: b_size_t | |
8361 | IFDEF: USE_CACHE_DIGESTS | |
8362 | LOC: Config.digest.swapout_chunk_size | |
8363 | DEFAULT: 4096 bytes | |
8364 | DOC_START | |
8365 | This is the number of bytes of the Cache Digest to write to | |
8366 | disk at a time. It defaults to 4096 bytes (4KB), the Squid | |
8367 | default swap page. | |
8368 | DOC_END | |
8369 | ||
8370 | NAME: digest_rebuild_chunk_percentage | |
8371 | COMMENT: (percent, 0-100) | |
8372 | IFDEF: USE_CACHE_DIGESTS | |
8373 | TYPE: int | |
8374 | LOC: Config.digest.rebuild_chunk_percentage | |
8375 | DEFAULT: 10 | |
8376 | DOC_START | |
8377 | This is the percentage of the Cache Digest to be scanned at a | |
8378 | time. By default it is set to 10% of the Cache Digest. | |
8379 | DOC_END | |
8380 | ||
1db9eacd | 8381 | COMMENT_START |
5473c134 | 8382 | SNMP OPTIONS |
1db9eacd | 8383 | ----------------------------------------------------------------------------- |
8384 | COMMENT_END | |
8385 | ||
5473c134 | 8386 | NAME: snmp_port |
ae870270 | 8387 | TYPE: u_short |
5473c134 | 8388 | LOC: Config.Port.snmp |
87630341 | 8389 | DEFAULT: 0 |
638402dd | 8390 | DEFAULT_DOC: SNMP disabled. |
5473c134 | 8391 | IFDEF: SQUID_SNMP |
8d6275c0 | 8392 | DOC_START |
87630341 | 8393 | The port number where Squid listens for SNMP requests. To enable |
8394 | SNMP support set this to a suitable port number. Port number | |
8395 | 3401 is often used for the Squid SNMP agent. By default it's | |
8396 | set to "0" (disabled) | |
e0855596 AJ |
8397 | |
8398 | Example: | |
8399 | snmp_port 3401 | |
8d6275c0 | 8400 | DOC_END |
8401 | ||
5473c134 | 8402 | NAME: snmp_access |
8403 | TYPE: acl_access | |
8404 | LOC: Config.accessList.snmp | |
638402dd AJ |
8405 | DEFAULT: none |
8406 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
5473c134 | 8407 | IFDEF: SQUID_SNMP |
8d6275c0 | 8408 | DOC_START |
5473c134 | 8409 | Allowing or denying access to the SNMP port. |
8d6275c0 | 8410 | |
5473c134 | 8411 | All access to the agent is denied by default. |
8412 | usage: | |
8d6275c0 | 8413 | |
5473c134 | 8414 | snmp_access allow|deny [!]aclname ... |
8d6275c0 | 8415 | |
b3567eb5 | 8416 | This clause only supports fast acl types. |
7409131e | 8417 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
638402dd | 8418 | |
5473c134 | 8419 | Example: |
8420 | snmp_access allow snmppublic localhost | |
8421 | snmp_access deny all | |
cccac0a2 | 8422 | DOC_END |
8423 | ||
5473c134 | 8424 | NAME: snmp_incoming_address |
8425 | TYPE: address | |
8426 | LOC: Config.Addrs.snmp_incoming | |
0eb08770 | 8427 | DEFAULT: any_addr |
638402dd | 8428 | DEFAULT_DOC: Accept SNMP packets from all machine interfaces. |
5473c134 | 8429 | IFDEF: SQUID_SNMP |
638402dd AJ |
8430 | DOC_START |
8431 | Just like 'udp_incoming_address', but for the SNMP port. | |
8432 | ||
8433 | snmp_incoming_address is used for the SNMP socket receiving | |
8434 | messages from SNMP agents. | |
8435 | ||
8436 | The default snmp_incoming_address is to listen on all | |
8437 | available network interfaces. | |
8438 | DOC_END | |
df2eec10 | 8439 | |
5473c134 | 8440 | NAME: snmp_outgoing_address |
8441 | TYPE: address | |
8442 | LOC: Config.Addrs.snmp_outgoing | |
0eb08770 | 8443 | DEFAULT: no_addr |
638402dd | 8444 | DEFAULT_DOC: Use snmp_incoming_address or an address selected by the operating system. |
5473c134 | 8445 | IFDEF: SQUID_SNMP |
cccac0a2 | 8446 | DOC_START |
638402dd | 8447 | Just like 'udp_outgoing_address', but for the SNMP port. |
cccac0a2 | 8448 | |
5473c134 | 8449 | snmp_outgoing_address is used for SNMP packets returned to SNMP |
8450 | agents. | |
cccac0a2 | 8451 | |
0eb08770 HN |
8452 | If snmp_outgoing_address is not set it will use the same socket |
8453 | as snmp_incoming_address. Only change this if you want to have | |
8454 | SNMP replies sent using another address than where this Squid | |
8455 | listens for SNMP queries. | |
cccac0a2 | 8456 | |
5473c134 | 8457 | NOTE, snmp_incoming_address and snmp_outgoing_address can not have |
638402dd | 8458 | the same value since they both use the same port. |
cccac0a2 | 8459 | DOC_END |
8460 | ||
5473c134 | 8461 | COMMENT_START |
8462 | ICP OPTIONS | |
8463 | ----------------------------------------------------------------------------- | |
8464 | COMMENT_END | |
8465 | ||
8466 | NAME: icp_port udp_port | |
ae870270 | 8467 | TYPE: u_short |
5473c134 | 8468 | DEFAULT: 0 |
638402dd | 8469 | DEFAULT_DOC: ICP disabled. |
5473c134 | 8470 | LOC: Config.Port.icp |
cccac0a2 | 8471 | DOC_START |
5473c134 | 8472 | The port number where Squid sends and receives ICP queries to |
8473 | and from neighbor caches. The standard UDP port for ICP is 3130. | |
e0855596 AJ |
8474 | |
8475 | Example: | |
8476 | icp_port @DEFAULT_ICP_PORT@ | |
cccac0a2 | 8477 | DOC_END |
8478 | ||
5473c134 | 8479 | NAME: htcp_port |
8480 | IFDEF: USE_HTCP | |
ae870270 | 8481 | TYPE: u_short |
87630341 | 8482 | DEFAULT: 0 |
638402dd | 8483 | DEFAULT_DOC: HTCP disabled. |
5473c134 | 8484 | LOC: Config.Port.htcp |
cccac0a2 | 8485 | DOC_START |
5473c134 | 8486 | The port number where Squid sends and receives HTCP queries to |
87630341 | 8487 | and from neighbor caches. To turn it on you want to set it to |
638402dd | 8488 | 4827. |
e0855596 AJ |
8489 | |
8490 | Example: | |
8491 | htcp_port 4827 | |
cccac0a2 | 8492 | DOC_END |
8493 | ||
8494 | NAME: log_icp_queries | |
8495 | COMMENT: on|off | |
8496 | TYPE: onoff | |
8497 | DEFAULT: on | |
8498 | LOC: Config.onoff.log_udp | |
8499 | DOC_START | |
8500 | If set, ICP queries are logged to access.log. You may wish | |
8501 | do disable this if your ICP load is VERY high to speed things | |
8502 | up or to simplify log analysis. | |
8503 | DOC_END | |
8504 | ||
5473c134 | 8505 | NAME: udp_incoming_address |
8506 | TYPE: address | |
8507 | LOC:Config.Addrs.udp_incoming | |
0eb08770 | 8508 | DEFAULT: any_addr |
638402dd | 8509 | DEFAULT_DOC: Accept packets from all machine interfaces. |
8524d4b2 | 8510 | DOC_START |
8511 | udp_incoming_address is used for UDP packets received from other | |
8512 | caches. | |
8513 | ||
8514 | The default behavior is to not bind to any specific address. | |
8515 | ||
8516 | Only change this if you want to have all UDP queries received on | |
8517 | a specific interface/address. | |
8518 | ||
8519 | NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS | |
8520 | modules. Altering it will affect all of them in the same manner. | |
8521 | ||
8522 | see also; udp_outgoing_address | |
8523 | ||
8524 | NOTE, udp_incoming_address and udp_outgoing_address can not | |
8525 | have the same value since they both use the same port. | |
8526 | DOC_END | |
cccac0a2 | 8527 | |
5473c134 | 8528 | NAME: udp_outgoing_address |
8529 | TYPE: address | |
8530 | LOC: Config.Addrs.udp_outgoing | |
0eb08770 | 8531 | DEFAULT: no_addr |
638402dd | 8532 | DEFAULT_DOC: Use udp_incoming_address or an address selected by the operating system. |
cccac0a2 | 8533 | DOC_START |
8524d4b2 | 8534 | udp_outgoing_address is used for UDP packets sent out to other |
5473c134 | 8535 | caches. |
cccac0a2 | 8536 | |
5473c134 | 8537 | The default behavior is to not bind to any specific address. |
cccac0a2 | 8538 | |
8524d4b2 | 8539 | Instead it will use the same socket as udp_incoming_address. |
8540 | Only change this if you want to have UDP queries sent using another | |
8541 | address than where this Squid listens for UDP queries from other | |
5473c134 | 8542 | caches. |
8543 | ||
8524d4b2 | 8544 | NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS |
8545 | modules. Altering it will affect all of them in the same manner. | |
8546 | ||
8547 | see also; udp_incoming_address | |
8548 | ||
5473c134 | 8549 | NOTE, udp_incoming_address and udp_outgoing_address can not |
8524d4b2 | 8550 | have the same value since they both use the same port. |
cccac0a2 | 8551 | DOC_END |
8552 | ||
3d1e3e43 | 8553 | NAME: icp_hit_stale |
8554 | COMMENT: on|off | |
8555 | TYPE: onoff | |
8556 | DEFAULT: off | |
8557 | LOC: Config.onoff.icp_hit_stale | |
8558 | DOC_START | |
8559 | If you want to return ICP_HIT for stale cache objects, set this | |
8560 | option to 'on'. If you have sibling relationships with caches | |
8561 | in other administrative domains, this should be 'off'. If you only | |
8562 | have sibling relationships with caches under your control, | |
8563 | it is probably okay to set this to 'on'. | |
8564 | If set to 'on', your siblings should use the option "allow-miss" | |
8565 | on their cache_peer lines for connecting to you. | |
8566 | DOC_END | |
8567 | ||
5473c134 | 8568 | NAME: minimum_direct_hops |
cccac0a2 | 8569 | TYPE: int |
5473c134 | 8570 | DEFAULT: 4 |
8571 | LOC: Config.minDirectHops | |
cccac0a2 | 8572 | DOC_START |
5473c134 | 8573 | If using the ICMP pinging stuff, do direct fetches for sites |
8574 | which are no more than this many hops away. | |
cccac0a2 | 8575 | DOC_END |
8576 | ||
5473c134 | 8577 | NAME: minimum_direct_rtt |
638402dd | 8578 | COMMENT: (msec) |
5473c134 | 8579 | TYPE: int |
8580 | DEFAULT: 400 | |
8581 | LOC: Config.minDirectRtt | |
cccac0a2 | 8582 | DOC_START |
5473c134 | 8583 | If using the ICMP pinging stuff, do direct fetches for sites |
8584 | which are no more than this many rtt milliseconds away. | |
cccac0a2 | 8585 | DOC_END |
8586 | ||
cccac0a2 | 8587 | NAME: netdb_low |
8588 | TYPE: int | |
8589 | DEFAULT: 900 | |
8590 | LOC: Config.Netdb.low | |
638402dd AJ |
8591 | DOC_START |
8592 | The low water mark for the ICMP measurement database. | |
8593 | ||
8594 | Note: high watermark controlled by netdb_high directive. | |
8595 | ||
8596 | These watermarks are counts, not percents. The defaults are | |
8597 | (low) 900 and (high) 1000. When the high water mark is | |
8598 | reached, database entries will be deleted until the low | |
8599 | mark is reached. | |
8600 | DOC_END | |
cccac0a2 | 8601 | |
8602 | NAME: netdb_high | |
8603 | TYPE: int | |
8604 | DEFAULT: 1000 | |
8605 | LOC: Config.Netdb.high | |
8606 | DOC_START | |
638402dd AJ |
8607 | The high water mark for the ICMP measurement database. |
8608 | ||
8609 | Note: low watermark controlled by netdb_low directive. | |
8610 | ||
8611 | These watermarks are counts, not percents. The defaults are | |
8612 | (low) 900 and (high) 1000. When the high water mark is | |
8613 | reached, database entries will be deleted until the low | |
8614 | mark is reached. | |
cccac0a2 | 8615 | DOC_END |
8616 | ||
cccac0a2 | 8617 | NAME: netdb_ping_period |
8618 | TYPE: time_t | |
8619 | LOC: Config.Netdb.period | |
8620 | DEFAULT: 5 minutes | |
8621 | DOC_START | |
8622 | The minimum period for measuring a site. There will be at | |
8623 | least this much delay between successive pings to the same | |
8624 | network. The default is five minutes. | |
8625 | DOC_END | |
8626 | ||
cccac0a2 | 8627 | NAME: query_icmp |
8628 | COMMENT: on|off | |
8629 | TYPE: onoff | |
8630 | DEFAULT: off | |
8631 | LOC: Config.onoff.query_icmp | |
8632 | DOC_START | |
8633 | If you want to ask your peers to include ICMP data in their ICP | |
8634 | replies, enable this option. | |
8635 | ||
8636 | If your peer has configured Squid (during compilation) with | |
7f7db318 | 8637 | '--enable-icmp' that peer will send ICMP pings to origin server |
8638 | sites of the URLs it receives. If you enable this option the | |
cccac0a2 | 8639 | ICP replies from that peer will include the ICMP data (if available). |
8640 | Then, when choosing a parent cache, Squid will choose the parent with | |
8641 | the minimal RTT to the origin server. When this happens, the | |
8642 | hierarchy field of the access.log will be | |
8643 | "CLOSEST_PARENT_MISS". This option is off by default. | |
8644 | DOC_END | |
8645 | ||
8646 | NAME: test_reachability | |
8647 | COMMENT: on|off | |
8648 | TYPE: onoff | |
8649 | DEFAULT: off | |
8650 | LOC: Config.onoff.test_reachability | |
8651 | DOC_START | |
8652 | When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH | |
8653 | instead of ICP_MISS if the target host is NOT in the ICMP | |
8654 | database, or has a zero RTT. | |
8655 | DOC_END | |
8656 | ||
5473c134 | 8657 | NAME: icp_query_timeout |
8658 | COMMENT: (msec) | |
8659 | DEFAULT: 0 | |
638402dd | 8660 | DEFAULT_DOC: Dynamic detection. |
5473c134 | 8661 | TYPE: int |
8662 | LOC: Config.Timeout.icp_query | |
4c3ef9b2 | 8663 | DOC_START |
5473c134 | 8664 | Normally Squid will automatically determine an optimal ICP |
8665 | query timeout value based on the round-trip-time of recent ICP | |
8666 | queries. If you want to override the value determined by | |
8667 | Squid, set this 'icp_query_timeout' to a non-zero value. This | |
8668 | value is specified in MILLISECONDS, so, to use a 2-second | |
8669 | timeout (the old default), you would write: | |
4c3ef9b2 | 8670 | |
5473c134 | 8671 | icp_query_timeout 2000 |
4c3ef9b2 | 8672 | DOC_END |
8673 | ||
5473c134 | 8674 | NAME: maximum_icp_query_timeout |
8675 | COMMENT: (msec) | |
8676 | DEFAULT: 2000 | |
8677 | TYPE: int | |
8678 | LOC: Config.Timeout.icp_query_max | |
cccac0a2 | 8679 | DOC_START |
5473c134 | 8680 | Normally the ICP query timeout is determined dynamically. But |
8681 | sometimes it can lead to very large values (say 5 seconds). | |
8682 | Use this option to put an upper limit on the dynamic timeout | |
8683 | value. Do NOT use this option to always use a fixed (instead | |
8684 | of a dynamic) timeout value. To set a fixed timeout see the | |
8685 | 'icp_query_timeout' directive. | |
cccac0a2 | 8686 | DOC_END |
8687 | ||
5473c134 | 8688 | NAME: minimum_icp_query_timeout |
8689 | COMMENT: (msec) | |
8690 | DEFAULT: 5 | |
8691 | TYPE: int | |
8692 | LOC: Config.Timeout.icp_query_min | |
cccac0a2 | 8693 | DOC_START |
5473c134 | 8694 | Normally the ICP query timeout is determined dynamically. But |
8695 | sometimes it can lead to very small timeouts, even lower than | |
8696 | the normal latency variance on your link due to traffic. | |
8697 | Use this option to put an lower limit on the dynamic timeout | |
8698 | value. Do NOT use this option to always use a fixed (instead | |
8699 | of a dynamic) timeout value. To set a fixed timeout see the | |
8700 | 'icp_query_timeout' directive. | |
cccac0a2 | 8701 | DOC_END |
8702 | ||
5473c134 | 8703 | NAME: background_ping_rate |
8704 | COMMENT: time-units | |
8705 | TYPE: time_t | |
8706 | DEFAULT: 10 seconds | |
8707 | LOC: Config.backgroundPingRate | |
cccac0a2 | 8708 | DOC_START |
5473c134 | 8709 | Controls how often the ICP pings are sent to siblings that |
8710 | have background-ping set. | |
cccac0a2 | 8711 | DOC_END |
8712 | ||
5473c134 | 8713 | COMMENT_START |
8714 | MULTICAST ICP OPTIONS | |
8715 | ----------------------------------------------------------------------------- | |
8716 | COMMENT_END | |
8717 | ||
8718 | NAME: mcast_groups | |
8719 | TYPE: wordlist | |
8720 | LOC: Config.mcast_group_list | |
8c01ada0 | 8721 | DEFAULT: none |
8722 | DOC_START | |
5473c134 | 8723 | This tag specifies a list of multicast groups which your server |
8724 | should join to receive multicasted ICP queries. | |
8c01ada0 | 8725 | |
5473c134 | 8726 | NOTE! Be very careful what you put here! Be sure you |
8727 | understand the difference between an ICP _query_ and an ICP | |
8728 | _reply_. This option is to be set only if you want to RECEIVE | |
8729 | multicast queries. Do NOT set this option to SEND multicast | |
8730 | ICP (use cache_peer for that). ICP replies are always sent via | |
8731 | unicast, so this option does not affect whether or not you will | |
8732 | receive replies from multicast group members. | |
8c01ada0 | 8733 | |
5473c134 | 8734 | You must be very careful to NOT use a multicast address which |
8735 | is already in use by another group of caches. | |
8c01ada0 | 8736 | |
5473c134 | 8737 | If you are unsure about multicast, please read the Multicast |
8738 | chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/). | |
8c01ada0 | 8739 | |
5473c134 | 8740 | Usage: mcast_groups 239.128.16.128 224.0.1.20 |
8c01ada0 | 8741 | |
5473c134 | 8742 | By default, Squid doesn't listen on any multicast groups. |
8743 | DOC_END | |
8c01ada0 | 8744 | |
5473c134 | 8745 | NAME: mcast_icp_query_timeout |
8746 | COMMENT: (msec) | |
8747 | DEFAULT: 2000 | |
8748 | TYPE: int | |
8749 | LOC: Config.Timeout.mcast_icp_query | |
8750 | DOC_START | |
8751 | For multicast peers, Squid regularly sends out ICP "probes" to | |
8752 | count how many other peers are listening on the given multicast | |
8753 | address. This value specifies how long Squid should wait to | |
8754 | count all the replies. The default is 2000 msec, or 2 | |
8755 | seconds. | |
cccac0a2 | 8756 | DOC_END |
8757 | ||
5473c134 | 8758 | COMMENT_START |
8759 | INTERNAL ICON OPTIONS | |
8760 | ----------------------------------------------------------------------------- | |
8761 | COMMENT_END | |
8762 | ||
cccac0a2 | 8763 | NAME: icon_directory |
8764 | TYPE: string | |
8765 | LOC: Config.icons.directory | |
8766 | DEFAULT: @DEFAULT_ICON_DIR@ | |
8767 | DOC_START | |
8768 | Where the icons are stored. These are normally kept in | |
8769 | @DEFAULT_ICON_DIR@ | |
8770 | DOC_END | |
8771 | ||
f024c970 | 8772 | NAME: global_internal_static |
8773 | TYPE: onoff | |
8774 | LOC: Config.onoff.global_internal_static | |
8775 | DEFAULT: on | |
8776 | DOC_START | |
8777 | This directive controls is Squid should intercept all requests for | |
8778 | /squid-internal-static/ no matter which host the URL is requesting | |
8779 | (default on setting), or if nothing special should be done for | |
8780 | such URLs (off setting). The purpose of this directive is to make | |
8781 | icons etc work better in complex cache hierarchies where it may | |
8782 | not always be possible for all corners in the cache mesh to reach | |
8783 | the server generating a directory listing. | |
8784 | DOC_END | |
8785 | ||
5473c134 | 8786 | NAME: short_icon_urls |
8787 | TYPE: onoff | |
8788 | LOC: Config.icons.use_short_names | |
8789 | DEFAULT: on | |
8790 | DOC_START | |
8791 | If this is enabled Squid will use short URLs for icons. | |
8792 | If disabled it will revert to the old behavior of including | |
8793 | it's own name and port in the URL. | |
8794 | ||
8795 | If you run a complex cache hierarchy with a mix of Squid and | |
8796 | other proxies you may need to disable this directive. | |
8797 | DOC_END | |
8798 | ||
8799 | COMMENT_START | |
8800 | ERROR PAGE OPTIONS | |
8801 | ----------------------------------------------------------------------------- | |
8802 | COMMENT_END | |
8803 | ||
8804 | NAME: error_directory | |
8805 | TYPE: string | |
8806 | LOC: Config.errorDirectory | |
43000484 | 8807 | DEFAULT: none |
638402dd | 8808 | DEFAULT_DOC: Send error pages in the clients preferred language |
5473c134 | 8809 | DOC_START |
8810 | If you wish to create your own versions of the default | |
43000484 AJ |
8811 | error files to customize them to suit your company copy |
8812 | the error/template files to another directory and point | |
8813 | this tag at them. | |
8814 | ||
8815 | WARNING: This option will disable multi-language support | |
8816 | on error pages if used. | |
5473c134 | 8817 | |
8818 | The squid developers are interested in making squid available in | |
8819 | a wide variety of languages. If you are making translations for a | |
43000484 | 8820 | language that Squid does not currently provide please consider |
5473c134 | 8821 | contributing your translation back to the project. |
7409131e | 8822 | https://wiki.squid-cache.org/Translations |
43000484 AJ |
8823 | |
8824 | The squid developers working on translations are happy to supply drop-in | |
8825 | translated error files in exchange for any new language contributions. | |
8826 | DOC_END | |
8827 | ||
8828 | NAME: error_default_language | |
8829 | IFDEF: USE_ERR_LOCALES | |
8830 | TYPE: string | |
8831 | LOC: Config.errorDefaultLanguage | |
8832 | DEFAULT: none | |
638402dd | 8833 | DEFAULT_DOC: Generate English language pages. |
43000484 AJ |
8834 | DOC_START |
8835 | Set the default language which squid will send error pages in | |
8836 | if no existing translation matches the clients language | |
8837 | preferences. | |
8838 | ||
8839 | If unset (default) generic English will be used. | |
8840 | ||
8841 | The squid developers are interested in making squid available in | |
8842 | a wide variety of languages. If you are interested in making | |
8843 | translations for any language see the squid wiki for details. | |
7409131e | 8844 | https://wiki.squid-cache.org/Translations |
5473c134 | 8845 | DOC_END |
8846 | ||
c411820c AJ |
8847 | NAME: error_log_languages |
8848 | IFDEF: USE_ERR_LOCALES | |
8849 | TYPE: onoff | |
8850 | LOC: Config.errorLogMissingLanguages | |
8851 | DEFAULT: on | |
8852 | DOC_START | |
8853 | Log to cache.log what languages users are attempting to | |
8854 | auto-negotiate for translations. | |
8855 | ||
8856 | Successful negotiations are not logged. Only failures | |
8857 | have meaning to indicate that Squid may need an upgrade | |
0c49f10e | 8858 | of its error page translations. |
c411820c AJ |
8859 | DOC_END |
8860 | ||
5b52cb6c AJ |
8861 | NAME: err_page_stylesheet |
8862 | TYPE: string | |
8863 | LOC: Config.errorStylesheet | |
8864 | DEFAULT: @DEFAULT_CONFIG_DIR@/errorpage.css | |
8865 | DOC_START | |
8866 | CSS Stylesheet to pattern the display of Squid default error pages. | |
8867 | ||
8868 | For information on CSS see http://www.w3.org/Style/CSS/ | |
8869 | DOC_END | |
8870 | ||
5473c134 | 8871 | NAME: err_html_text |
8872 | TYPE: eol | |
8873 | LOC: Config.errHtmlText | |
8874 | DEFAULT: none | |
8875 | DOC_START | |
8876 | HTML text to include in error messages. Make this a "mailto" | |
8877 | URL to your admin address, or maybe just a link to your | |
8878 | organizations Web page. | |
8879 | ||
8880 | To include this in your error messages, you must rewrite | |
8881 | the error template files (found in the "errors" directory). | |
8882 | Wherever you want the 'err_html_text' line to appear, | |
8883 | insert a %L tag in the error template file. | |
8884 | DOC_END | |
8885 | ||
8886 | NAME: email_err_data | |
8887 | COMMENT: on|off | |
8888 | TYPE: onoff | |
8889 | LOC: Config.onoff.emailErrData | |
8890 | DEFAULT: on | |
8891 | DOC_START | |
8892 | If enabled, information about the occurred error will be | |
8893 | included in the mailto links of the ERR pages (if %W is set) | |
8894 | so that the email body contains the data. | |
8895 | Syntax is <A HREF="mailto:%w%W">%w</A> | |
8896 | DOC_END | |
8897 | ||
8898 | NAME: deny_info | |
8899 | TYPE: denyinfo | |
8900 | LOC: Config.denyInfoList | |
8901 | DEFAULT: none | |
8902 | DOC_START | |
8903 | Usage: deny_info err_page_name acl | |
8904 | or deny_info http://... acl | |
43000484 | 8905 | or deny_info TCP_RESET acl |
5473c134 | 8906 | |
8907 | This can be used to return a ERR_ page for requests which | |
8908 | do not pass the 'http_access' rules. Squid remembers the last | |
8909 | acl it evaluated in http_access, and if a 'deny_info' line exists | |
8910 | for that ACL Squid returns a corresponding error page. | |
8911 | ||
8912 | The acl is typically the last acl on the http_access deny line which | |
8913 | denied access. The exceptions to this rule are: | |
8914 | - When Squid needs to request authentication credentials. It's then | |
8915 | the first authentication related acl encountered | |
8916 | - When none of the http_access lines matches. It's then the last | |
8917 | acl processed on the last http_access line. | |
3af10ac0 AR |
8918 | - When the decision to deny access was made by an adaptation service, |
8919 | the acl name is the corresponding eCAP or ICAP service_name. | |
5473c134 | 8920 | |
43000484 AJ |
8921 | NP: If providing your own custom error pages with error_directory |
8922 | you may also specify them by your custom file name: | |
8923 | Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys | |
5473c134 | 8924 | |
2f8abb64 | 8925 | By default Squid will send "403 Forbidden". A different 4xx or 5xx |
aed9a15b AJ |
8926 | may be specified by prefixing the file name with the code and a colon. |
8927 | e.g. 404:ERR_CUSTOM_ACCESS_DENIED | |
8928 | ||
5473c134 | 8929 | Alternatively you can tell Squid to reset the TCP connection |
8930 | by specifying TCP_RESET. | |
15b02e9a AJ |
8931 | |
8932 | Or you can specify an error URL or URL pattern. The browsers will | |
aed9a15b AJ |
8933 | get redirected to the specified URL after formatting tags have |
8934 | been replaced. Redirect will be done with 302 or 307 according to | |
8935 | HTTP/1.1 specs. A different 3xx code may be specified by prefixing | |
8936 | the URL. e.g. 303:http://example.com/ | |
15b02e9a AJ |
8937 | |
8938 | URL FORMAT TAGS: | |
8939 | %a - username (if available. Password NOT included) | |
ea35939b | 8940 | %A - Local listening IP address the client connection was connected to |
15b02e9a AJ |
8941 | %B - FTP path URL |
8942 | %e - Error number | |
8943 | %E - Error description | |
8944 | %h - Squid hostname | |
8945 | %H - Request domain name | |
8946 | %i - Client IP Address | |
8947 | %M - Request Method | |
05dbf66c | 8948 | %O - Unescaped message result from external ACL helper |
15b02e9a AJ |
8949 | %o - Message result from external ACL helper |
8950 | %p - Request Port number | |
8951 | %P - Request Protocol name | |
8952 | %R - Request URL path | |
8953 | %T - Timestamp in RFC 1123 format | |
8954 | %U - Full canonical URL from client | |
8955 | (HTTPS URLs terminate with *) | |
8956 | %u - Full canonical URL from client | |
8957 | %w - Admin email from squid.conf | |
e4a8468d | 8958 | %x - Error name |
15b02e9a AJ |
8959 | %% - Literal percent (%) code |
8960 | ||
5473c134 | 8961 | DOC_END |
8962 | ||
8963 | COMMENT_START | |
9603207d | 8964 | OPTIONS INFLUENCING REQUEST FORWARDING |
5473c134 | 8965 | ----------------------------------------------------------------------------- |
8966 | COMMENT_END | |
8967 | ||
8968 | NAME: nonhierarchical_direct | |
e72a0ec0 | 8969 | TYPE: onoff |
5473c134 | 8970 | LOC: Config.onoff.nonhierarchical_direct |
e72a0ec0 | 8971 | DEFAULT: on |
8972 | DOC_START | |
5473c134 | 8973 | By default, Squid will send any non-hierarchical requests |
9967aef6 | 8974 | (not cacheable request type) direct to origin servers. |
e72a0ec0 | 8975 | |
638402dd | 8976 | When this is set to "off", Squid will prefer to send these |
5473c134 | 8977 | requests to parents. |
0b0cfcf2 | 8978 | |
5473c134 | 8979 | Note that in most configurations, by turning this off you will only |
8980 | add latency to these request without any improvement in global hit | |
8981 | ratio. | |
0b0cfcf2 | 8982 | |
638402dd AJ |
8983 | This option only sets a preference. If the parent is unavailable a |
8984 | direct connection to the origin server may still be attempted. To | |
8985 | completely prevent direct connections use never_direct. | |
8d6275c0 | 8986 | DOC_END |
0b0cfcf2 | 8987 | |
5473c134 | 8988 | NAME: prefer_direct |
8d6275c0 | 8989 | TYPE: onoff |
5473c134 | 8990 | LOC: Config.onoff.prefer_direct |
8d6275c0 | 8991 | DEFAULT: off |
8992 | DOC_START | |
5473c134 | 8993 | Normally Squid tries to use parents for most requests. If you for some |
8994 | reason like it to first try going direct and only use a parent if | |
8995 | going direct fails set this to on. | |
0b0cfcf2 | 8996 | |
5473c134 | 8997 | By combining nonhierarchical_direct off and prefer_direct on you |
8998 | can set up Squid to use a parent as a backup path if going direct | |
8999 | fails. | |
9000 | ||
9001 | Note: If you want Squid to use parents for all requests see | |
9002 | the never_direct directive. prefer_direct only modifies how Squid | |
9003 | acts on cacheable requests. | |
cccac0a2 | 9004 | DOC_END |
9005 | ||
96598f93 AJ |
9006 | NAME: cache_miss_revalidate |
9007 | COMMENT: on|off | |
9008 | TYPE: onoff | |
9009 | DEFAULT: on | |
9010 | LOC: Config.onoff.cache_miss_revalidate | |
9011 | DOC_START | |
2d4eefd9 AJ |
9012 | RFC 7232 defines a conditional request mechanism to prevent |
9013 | response objects being unnecessarily transferred over the network. | |
9014 | If that mechanism is used by the client and a cache MISS occurs | |
9015 | it can prevent new cache entries being created. | |
9016 | ||
9017 | This option determines whether Squid on cache MISS will pass the | |
9018 | client revalidation request to the server or tries to fetch new | |
9019 | content for caching. It can be useful while the cache is mostly | |
9020 | empty to more quickly have the cache populated by generating | |
9021 | non-conditional GETs. | |
96598f93 AJ |
9022 | |
9023 | When set to 'on' (default), Squid will pass all client If-* headers | |
2d4eefd9 AJ |
9024 | to the server. This permits server responses without a cacheable |
9025 | payload to be delivered and on MISS no new cache entry is created. | |
96598f93 AJ |
9026 | |
9027 | When set to 'off' and if the request is cacheable, Squid will | |
9028 | remove the clients If-Modified-Since and If-None-Match headers from | |
2d4eefd9 AJ |
9029 | the request sent to the server. This requests a 200 status response |
9030 | from the server to create a new cache entry with. | |
96598f93 AJ |
9031 | DOC_END |
9032 | ||
5473c134 | 9033 | NAME: always_direct |
8d6275c0 | 9034 | TYPE: acl_access |
5473c134 | 9035 | LOC: Config.accessList.AlwaysDirect |
0b0cfcf2 | 9036 | DEFAULT: none |
638402dd | 9037 | DEFAULT_DOC: Prevent any cache_peer being used for this request. |
0b0cfcf2 | 9038 | DOC_START |
5473c134 | 9039 | Usage: always_direct allow|deny [!]aclname ... |
0b0cfcf2 | 9040 | |
5473c134 | 9041 | Here you can use ACL elements to specify requests which should |
9042 | ALWAYS be forwarded by Squid to the origin servers without using | |
9043 | any peers. For example, to always directly forward requests for | |
9044 | local servers ignoring any parents or siblings you may have use | |
9045 | something like: | |
0b0cfcf2 | 9046 | |
5473c134 | 9047 | acl local-servers dstdomain my.domain.net |
9048 | always_direct allow local-servers | |
0b0cfcf2 | 9049 | |
5473c134 | 9050 | To always forward FTP requests directly, use |
f16fbc82 | 9051 | |
5473c134 | 9052 | acl FTP proto FTP |
9053 | always_direct allow FTP | |
cccac0a2 | 9054 | |
5473c134 | 9055 | NOTE: There is a similar, but opposite option named |
9056 | 'never_direct'. You need to be aware that "always_direct deny | |
9057 | foo" is NOT the same thing as "never_direct allow foo". You | |
9058 | may need to use a deny rule to exclude a more-specific case of | |
9059 | some other rule. Example: | |
8d6275c0 | 9060 | |
5473c134 | 9061 | acl local-external dstdomain external.foo.net |
9062 | acl local-servers dstdomain .foo.net | |
9063 | always_direct deny local-external | |
9064 | always_direct allow local-servers | |
8d6275c0 | 9065 | |
5473c134 | 9066 | NOTE: If your goal is to make the client forward the request |
9067 | directly to the origin server bypassing Squid then this needs | |
9068 | to be done in the client configuration. Squid configuration | |
9069 | can only tell Squid how Squid should fetch the object. | |
8d6275c0 | 9070 | |
5473c134 | 9071 | NOTE: This directive is not related to caching. The replies |
9072 | is cached as usual even if you use always_direct. To not cache | |
b3567eb5 | 9073 | the replies see the 'cache' directive. |
5473c134 | 9074 | |
b3567eb5 | 9075 | This clause supports both fast and slow acl types. |
7409131e | 9076 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
cccac0a2 | 9077 | DOC_END |
0976f8db | 9078 | |
5473c134 | 9079 | NAME: never_direct |
9080 | TYPE: acl_access | |
9081 | LOC: Config.accessList.NeverDirect | |
9082 | DEFAULT: none | |
638402dd | 9083 | DEFAULT_DOC: Allow DNS results to be used for this request. |
8d6275c0 | 9084 | DOC_START |
5473c134 | 9085 | Usage: never_direct allow|deny [!]aclname ... |
9086 | ||
9087 | never_direct is the opposite of always_direct. Please read | |
9088 | the description for always_direct if you have not already. | |
9089 | ||
9090 | With 'never_direct' you can use ACL elements to specify | |
9091 | requests which should NEVER be forwarded directly to origin | |
9092 | servers. For example, to force the use of a proxy for all | |
9093 | requests, except those in your local domain use something like: | |
9094 | ||
9095 | acl local-servers dstdomain .foo.net | |
5473c134 | 9096 | never_direct deny local-servers |
9097 | never_direct allow all | |
9098 | ||
9099 | or if Squid is inside a firewall and there are local intranet | |
9100 | servers inside the firewall use something like: | |
9101 | ||
9102 | acl local-intranet dstdomain .foo.net | |
9103 | acl local-external dstdomain external.foo.net | |
9104 | always_direct deny local-external | |
9105 | always_direct allow local-intranet | |
9106 | never_direct allow all | |
9107 | ||
b3567eb5 | 9108 | This clause supports both fast and slow acl types. |
7409131e | 9109 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
8d6275c0 | 9110 | DOC_END |
0976f8db | 9111 | |
5473c134 | 9112 | COMMENT_START |
9113 | ADVANCED NETWORKING OPTIONS | |
9114 | ----------------------------------------------------------------------------- | |
9115 | COMMENT_END | |
9116 | ||
65d448bc | 9117 | NAME: incoming_udp_average incoming_icp_average |
cccac0a2 | 9118 | TYPE: int |
9119 | DEFAULT: 6 | |
65d448bc AJ |
9120 | LOC: Config.comm_incoming.udp.average |
9121 | DOC_START | |
9122 | Heavy voodoo here. I can't even believe you are reading this. | |
9123 | Are you crazy? Don't even think about adjusting these unless | |
9124 | you understand the algorithms in comm_select.c first! | |
9125 | DOC_END | |
cccac0a2 | 9126 | |
65d448bc | 9127 | NAME: incoming_tcp_average incoming_http_average |
cccac0a2 | 9128 | TYPE: int |
9129 | DEFAULT: 4 | |
65d448bc AJ |
9130 | LOC: Config.comm_incoming.tcp.average |
9131 | DOC_START | |
9132 | Heavy voodoo here. I can't even believe you are reading this. | |
9133 | Are you crazy? Don't even think about adjusting these unless | |
9134 | you understand the algorithms in comm_select.c first! | |
9135 | DOC_END | |
cccac0a2 | 9136 | |
9137 | NAME: incoming_dns_average | |
9138 | TYPE: int | |
9139 | DEFAULT: 4 | |
65d448bc AJ |
9140 | LOC: Config.comm_incoming.dns.average |
9141 | DOC_START | |
9142 | Heavy voodoo here. I can't even believe you are reading this. | |
9143 | Are you crazy? Don't even think about adjusting these unless | |
9144 | you understand the algorithms in comm_select.c first! | |
9145 | DOC_END | |
cccac0a2 | 9146 | |
65d448bc | 9147 | NAME: min_udp_poll_cnt min_icp_poll_cnt |
cccac0a2 | 9148 | TYPE: int |
9149 | DEFAULT: 8 | |
65d448bc AJ |
9150 | LOC: Config.comm_incoming.udp.min_poll |
9151 | DOC_START | |
9152 | Heavy voodoo here. I can't even believe you are reading this. | |
9153 | Are you crazy? Don't even think about adjusting these unless | |
9154 | you understand the algorithms in comm_select.c first! | |
9155 | DOC_END | |
cccac0a2 | 9156 | |
9157 | NAME: min_dns_poll_cnt | |
9158 | TYPE: int | |
9159 | DEFAULT: 8 | |
65d448bc AJ |
9160 | LOC: Config.comm_incoming.dns.min_poll |
9161 | DOC_START | |
9162 | Heavy voodoo here. I can't even believe you are reading this. | |
9163 | Are you crazy? Don't even think about adjusting these unless | |
9164 | you understand the algorithms in comm_select.c first! | |
9165 | DOC_END | |
cccac0a2 | 9166 | |
65d448bc | 9167 | NAME: min_tcp_poll_cnt min_http_poll_cnt |
cccac0a2 | 9168 | TYPE: int |
9169 | DEFAULT: 8 | |
65d448bc | 9170 | LOC: Config.comm_incoming.tcp.min_poll |
cccac0a2 | 9171 | DOC_START |
5473c134 | 9172 | Heavy voodoo here. I can't even believe you are reading this. |
9173 | Are you crazy? Don't even think about adjusting these unless | |
9174 | you understand the algorithms in comm_select.c first! | |
9175 | DOC_END | |
9176 | ||
9177 | NAME: accept_filter | |
5473c134 | 9178 | TYPE: string |
9179 | DEFAULT: none | |
9180 | LOC: Config.accept_filter | |
9181 | DOC_START | |
0b4d4be5 | 9182 | FreeBSD: |
9183 | ||
5473c134 | 9184 | The name of an accept(2) filter to install on Squid's |
9185 | listen socket(s). This feature is perhaps specific to | |
9186 | FreeBSD and requires support in the kernel. | |
9187 | ||
9188 | The 'httpready' filter delays delivering new connections | |
2324cda2 | 9189 | to Squid until a full HTTP request has been received. |
0b4d4be5 | 9190 | See the accf_http(9) man page for details. |
9191 | ||
9192 | The 'dataready' filter delays delivering new connections | |
9193 | to Squid until there is some data to process. | |
9194 | See the accf_dataready(9) man page for details. | |
9195 | ||
9196 | Linux: | |
9603207d | 9197 | |
0b4d4be5 | 9198 | The 'data' filter delays delivering of new connections |
9199 | to Squid until there is some data to process by TCP_ACCEPT_DEFER. | |
9200 | You may optionally specify a number of seconds to wait by | |
9201 | 'data=N' where N is the number of seconds. Defaults to 30 | |
9202 | if not specified. See the tcp(7) man page for details. | |
5473c134 | 9203 | EXAMPLE: |
0b4d4be5 | 9204 | # FreeBSD |
5473c134 | 9205 | accept_filter httpready |
0b4d4be5 | 9206 | # Linux |
9207 | accept_filter data | |
5473c134 | 9208 | DOC_END |
9209 | ||
ab2ecb0e AJ |
9210 | NAME: client_ip_max_connections |
9211 | TYPE: int | |
9212 | LOC: Config.client_ip_max_connections | |
9213 | DEFAULT: -1 | |
638402dd | 9214 | DEFAULT_DOC: No limit. |
ab2ecb0e AJ |
9215 | DOC_START |
9216 | Set an absolute limit on the number of connections a single | |
9217 | client IP can use. Any more than this and Squid will begin to drop | |
9218 | new connections from the client until it closes some links. | |
9219 | ||
6ea12e8f | 9220 | Note that this is a global limit. It affects all HTTP, HTCP, and FTP |
ab2ecb0e AJ |
9221 | connections from the client. For finer control use the ACL access controls. |
9222 | ||
9223 | Requires client_db to be enabled (the default). | |
9224 | ||
2f8abb64 | 9225 | WARNING: This may noticeably slow down traffic received via external proxies |
ab2ecb0e AJ |
9226 | or NAT devices and cause them to rebound error messages back to their clients. |
9227 | DOC_END | |
9228 | ||
5473c134 | 9229 | NAME: tcp_recv_bufsize |
9230 | COMMENT: (bytes) | |
9231 | TYPE: b_size_t | |
9232 | DEFAULT: 0 bytes | |
638402dd | 9233 | DEFAULT_DOC: Use operating system TCP defaults. |
5473c134 | 9234 | LOC: Config.tcpRcvBufsz |
9235 | DOC_START | |
9236 | Size of receive buffer to set for TCP sockets. Probably just | |
638402dd AJ |
9237 | as easy to change your kernel's default. |
9238 | Omit from squid.conf to use the default buffer size. | |
5473c134 | 9239 | DOC_END |
9240 | ||
9241 | COMMENT_START | |
9242 | ICAP OPTIONS | |
9243 | ----------------------------------------------------------------------------- | |
9244 | COMMENT_END | |
9245 | ||
9246 | NAME: icap_enable | |
9247 | TYPE: onoff | |
9248 | IFDEF: ICAP_CLIENT | |
9249 | COMMENT: on|off | |
26cc52cb | 9250 | LOC: Adaptation::Icap::TheConfig.onoff |
5473c134 | 9251 | DEFAULT: off |
9252 | DOC_START | |
53e738c6 | 9253 | If you want to enable the ICAP module support, set this to on. |
5473c134 | 9254 | DOC_END |
9255 | ||
9256 | NAME: icap_connect_timeout | |
9257 | TYPE: time_t | |
9258 | DEFAULT: none | |
26cc52cb | 9259 | LOC: Adaptation::Icap::TheConfig.connect_timeout_raw |
5473c134 | 9260 | IFDEF: ICAP_CLIENT |
9261 | DOC_START | |
9262 | This parameter specifies how long to wait for the TCP connect to | |
9263 | the requested ICAP server to complete before giving up and either | |
9264 | terminating the HTTP transaction or bypassing the failure. | |
9265 | ||
9266 | The default for optional services is peer_connect_timeout. | |
9267 | The default for essential services is connect_timeout. | |
9268 | If this option is explicitly set, its value applies to all services. | |
9269 | DOC_END | |
9270 | ||
9271 | NAME: icap_io_timeout | |
9272 | COMMENT: time-units | |
9273 | TYPE: time_t | |
9274 | DEFAULT: none | |
638402dd | 9275 | DEFAULT_DOC: Use read_timeout. |
26cc52cb | 9276 | LOC: Adaptation::Icap::TheConfig.io_timeout_raw |
5473c134 | 9277 | IFDEF: ICAP_CLIENT |
9278 | DOC_START | |
9279 | This parameter specifies how long to wait for an I/O activity on | |
9280 | an established, active ICAP connection before giving up and | |
9281 | either terminating the HTTP transaction or bypassing the | |
9282 | failure. | |
5473c134 | 9283 | DOC_END |
9284 | ||
9285 | NAME: icap_service_failure_limit | |
8277060a CT |
9286 | COMMENT: limit [in memory-depth time-units] |
9287 | TYPE: icap_service_failure_limit | |
5473c134 | 9288 | IFDEF: ICAP_CLIENT |
8277060a | 9289 | LOC: Adaptation::Icap::TheConfig |
5473c134 | 9290 | DEFAULT: 10 |
9291 | DOC_START | |
9292 | The limit specifies the number of failures that Squid tolerates | |
9293 | when establishing a new TCP connection with an ICAP service. If | |
9294 | the number of failures exceeds the limit, the ICAP service is | |
9295 | not used for new ICAP requests until it is time to refresh its | |
8277060a | 9296 | OPTIONS. |
5473c134 | 9297 | |
9298 | A negative value disables the limit. Without the limit, an ICAP | |
9299 | service will not be considered down due to connectivity failures | |
9300 | between ICAP OPTIONS requests. | |
8277060a CT |
9301 | |
9302 | Squid forgets ICAP service failures older than the specified | |
9603207d | 9303 | value of memory-depth. The memory fading algorithm |
9304 | is approximate because Squid does not remember individual | |
8277060a CT |
9305 | errors but groups them instead, splitting the option |
9306 | value into ten time slots of equal length. | |
9307 | ||
9603207d | 9308 | When memory-depth is 0 and by default this option has no |
8277060a CT |
9309 | effect on service failure expiration. |
9310 | ||
9311 | Squid always forgets failures when updating service settings | |
9312 | using an ICAP OPTIONS transaction, regardless of this option | |
9313 | setting. | |
9314 | ||
9315 | For example, | |
9316 | # suspend service usage after 10 failures in 5 seconds: | |
9317 | icap_service_failure_limit 10 in 5 seconds | |
cccac0a2 | 9318 | DOC_END |
9319 | ||
5473c134 | 9320 | NAME: icap_service_revival_delay |
cccac0a2 | 9321 | TYPE: int |
5473c134 | 9322 | IFDEF: ICAP_CLIENT |
26cc52cb | 9323 | LOC: Adaptation::Icap::TheConfig.service_revival_delay |
5473c134 | 9324 | DEFAULT: 180 |
cccac0a2 | 9325 | DOC_START |
5473c134 | 9326 | The delay specifies the number of seconds to wait after an ICAP |
9327 | OPTIONS request failure before requesting the options again. The | |
9328 | failed ICAP service is considered "down" until fresh OPTIONS are | |
9329 | fetched. | |
cccac0a2 | 9330 | |
5473c134 | 9331 | The actual delay cannot be smaller than the hardcoded minimum |
9332 | delay of 30 seconds. | |
cccac0a2 | 9333 | DOC_END |
9334 | ||
5473c134 | 9335 | NAME: icap_preview_enable |
cccac0a2 | 9336 | TYPE: onoff |
5473c134 | 9337 | IFDEF: ICAP_CLIENT |
9338 | COMMENT: on|off | |
26cc52cb | 9339 | LOC: Adaptation::Icap::TheConfig.preview_enable |
ac7a62f9 | 9340 | DEFAULT: on |
cccac0a2 | 9341 | DOC_START |
ac7a62f9 | 9342 | The ICAP Preview feature allows the ICAP server to handle the |
9343 | HTTP message by looking only at the beginning of the message body | |
9603207d | 9344 | or even without receiving the body at all. In some environments, |
ac7a62f9 | 9345 | previews greatly speedup ICAP processing. |
9346 | ||
9347 | During an ICAP OPTIONS transaction, the server may tell Squid what | |
9348 | HTTP messages should be previewed and how big the preview should be. | |
9349 | Squid will not use Preview if the server did not request one. | |
9350 | ||
9351 | To disable ICAP Preview for all ICAP services, regardless of | |
9352 | individual ICAP server OPTIONS responses, set this option to "off". | |
9353 | Example: | |
9354 | icap_preview_enable off | |
cccac0a2 | 9355 | DOC_END |
9356 | ||
5473c134 | 9357 | NAME: icap_preview_size |
9358 | TYPE: int | |
9359 | IFDEF: ICAP_CLIENT | |
26cc52cb | 9360 | LOC: Adaptation::Icap::TheConfig.preview_size |
5473c134 | 9361 | DEFAULT: -1 |
638402dd | 9362 | DEFAULT_DOC: No preview sent. |
cccac0a2 | 9363 | DOC_START |
53e738c6 | 9364 | The default size of preview data to be sent to the ICAP server. |
638402dd | 9365 | This value might be overwritten on a per server basis by OPTIONS requests. |
cccac0a2 | 9366 | DOC_END |
9367 | ||
83c51da9 CT |
9368 | NAME: icap_206_enable |
9369 | TYPE: onoff | |
9370 | IFDEF: ICAP_CLIENT | |
9371 | COMMENT: on|off | |
9372 | LOC: Adaptation::Icap::TheConfig.allow206_enable | |
9373 | DEFAULT: on | |
9374 | DOC_START | |
9375 | 206 (Partial Content) responses is an ICAP extension that allows the | |
9376 | ICAP agents to optionally combine adapted and original HTTP message | |
9377 | content. The decision to combine is postponed until the end of the | |
9378 | ICAP response. Squid supports Partial Content extension by default. | |
9379 | ||
9380 | Activation of the Partial Content extension is negotiated with each | |
9381 | ICAP service during OPTIONS exchange. Most ICAP servers should handle | |
2f8abb64 | 9382 | negotiation correctly even if they do not support the extension, but |
83c51da9 CT |
9383 | some might fail. To disable Partial Content support for all ICAP |
9384 | services and to avoid any negotiation, set this option to "off". | |
9385 | ||
9386 | Example: | |
9387 | icap_206_enable off | |
9388 | DOC_END | |
9389 | ||
5473c134 | 9390 | NAME: icap_default_options_ttl |
9391 | TYPE: int | |
9392 | IFDEF: ICAP_CLIENT | |
26cc52cb | 9393 | LOC: Adaptation::Icap::TheConfig.default_options_ttl |
5473c134 | 9394 | DEFAULT: 60 |
cccac0a2 | 9395 | DOC_START |
53e738c6 | 9396 | The default TTL value for ICAP OPTIONS responses that don't have |
5473c134 | 9397 | an Options-TTL header. |
cccac0a2 | 9398 | DOC_END |
9399 | ||
5473c134 | 9400 | NAME: icap_persistent_connections |
9401 | TYPE: onoff | |
9402 | IFDEF: ICAP_CLIENT | |
9403 | COMMENT: on|off | |
26cc52cb | 9404 | LOC: Adaptation::Icap::TheConfig.reuse_connections |
5473c134 | 9405 | DEFAULT: on |
cccac0a2 | 9406 | DOC_START |
5473c134 | 9407 | Whether or not Squid should use persistent connections to |
9408 | an ICAP server. | |
cccac0a2 | 9409 | DOC_END |
9410 | ||
22fff3bf | 9411 | NAME: adaptation_send_client_ip icap_send_client_ip |
5473c134 | 9412 | TYPE: onoff |
22fff3bf | 9413 | IFDEF: USE_ADAPTATION |
5473c134 | 9414 | COMMENT: on|off |
22fff3bf | 9415 | LOC: Adaptation::Config::send_client_ip |
5473c134 | 9416 | DEFAULT: off |
cccac0a2 | 9417 | DOC_START |
ea3ae478 AR |
9418 | If enabled, Squid shares HTTP client IP information with adaptation |
9419 | services. For ICAP, Squid adds the X-Client-IP header to ICAP requests. | |
9420 | For eCAP, Squid sets the libecap::metaClientIp transaction option. | |
9421 | ||
9422 | See also: adaptation_uses_indirect_client | |
cccac0a2 | 9423 | DOC_END |
9424 | ||
22fff3bf | 9425 | NAME: adaptation_send_username icap_send_client_username |
5473c134 | 9426 | TYPE: onoff |
22fff3bf | 9427 | IFDEF: USE_ADAPTATION |
5473c134 | 9428 | COMMENT: on|off |
22fff3bf | 9429 | LOC: Adaptation::Config::send_username |
5473c134 | 9430 | DEFAULT: off |
cccac0a2 | 9431 | DOC_START |
5473c134 | 9432 | This sends authenticated HTTP client username (if available) to |
22fff3bf AR |
9433 | the adaptation service. |
9434 | ||
9435 | For ICAP, the username value is encoded based on the | |
5473c134 | 9436 | icap_client_username_encode option and is sent using the header |
9437 | specified by the icap_client_username_header option. | |
cccac0a2 | 9438 | DOC_END |
9439 | ||
5473c134 | 9440 | NAME: icap_client_username_header |
cccac0a2 | 9441 | TYPE: string |
5473c134 | 9442 | IFDEF: ICAP_CLIENT |
26cc52cb | 9443 | LOC: Adaptation::Icap::TheConfig.client_username_header |
5473c134 | 9444 | DEFAULT: X-Client-Username |
cccac0a2 | 9445 | DOC_START |
db49f682 | 9446 | ICAP request header name to use for adaptation_send_username. |
cccac0a2 | 9447 | DOC_END |
9448 | ||
5473c134 | 9449 | NAME: icap_client_username_encode |
cccac0a2 | 9450 | TYPE: onoff |
5473c134 | 9451 | IFDEF: ICAP_CLIENT |
9452 | COMMENT: on|off | |
26cc52cb | 9453 | LOC: Adaptation::Icap::TheConfig.client_username_encode |
5473c134 | 9454 | DEFAULT: off |
cccac0a2 | 9455 | DOC_START |
5473c134 | 9456 | Whether to base64 encode the authenticated client username. |
cccac0a2 | 9457 | DOC_END |
9458 | ||
5473c134 | 9459 | NAME: icap_service |
9460 | TYPE: icap_service_type | |
9461 | IFDEF: ICAP_CLIENT | |
26cc52cb | 9462 | LOC: Adaptation::Icap::TheConfig |
5473c134 | 9463 | DEFAULT: none |
cccac0a2 | 9464 | DOC_START |
a22e6cd3 | 9465 | Defines a single ICAP service using the following format: |
cccac0a2 | 9466 | |
c25c2836 | 9467 | icap_service id vectoring_point uri [option ...] |
7d90757b | 9468 | |
c25c2836 CT |
9469 | id: ID |
9470 | an opaque identifier or name which is used to direct traffic to | |
9471 | this specific service. Must be unique among all adaptation | |
9472 | services in squid.conf. | |
a22e6cd3 AR |
9473 | |
9474 | vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache | |
f3db09e2 | 9475 | This specifies at which point of transaction processing the |
9476 | ICAP service should be activated. *_postcache vectoring points | |
9477 | are not yet supported. | |
a22e6cd3 | 9478 | |
c25c2836 | 9479 | uri: icap://servername:port/servicepath |
a22e6cd3 | 9480 | ICAP server and service location. |
1b091aec CT |
9481 | icaps://servername:port/servicepath |
9482 | The "icap:" URI scheme is used for traditional ICAP server and | |
9483 | service location (default port is 1344, connections are not | |
9484 | encrypted). The "icaps:" URI scheme is for Secure ICAP | |
9485 | services that use SSL/TLS-encrypted ICAP connections (by | |
9486 | default, on port 11344). | |
a22e6cd3 AR |
9487 | |
9488 | ICAP does not allow a single service to handle both REQMOD and RESPMOD | |
9489 | transactions. Squid does not enforce that requirement. You can specify | |
9490 | services with the same service_url and different vectoring_points. You | |
9491 | can even specify multiple identical services as long as their | |
9492 | service_names differ. | |
9493 | ||
3caa16d2 AR |
9494 | To activate a service, use the adaptation_access directive. To group |
9495 | services, use adaptation_service_chain and adaptation_service_set. | |
a22e6cd3 AR |
9496 | |
9497 | Service options are separated by white space. ICAP services support | |
9498 | the following name=value options: | |
9499 | ||
9500 | bypass=on|off|1|0 | |
9501 | If set to 'on' or '1', the ICAP service is treated as | |
9502 | optional. If the service cannot be reached or malfunctions, | |
9503 | Squid will try to ignore any errors and process the message as | |
9504 | if the service was not enabled. No all ICAP errors can be | |
9505 | bypassed. If set to 0, the ICAP service is treated as | |
9506 | essential and all ICAP errors will result in an error page | |
9507 | returned to the HTTP client. | |
9508 | ||
9509 | Bypass is off by default: services are treated as essential. | |
9510 | ||
9511 | routing=on|off|1|0 | |
9512 | If set to 'on' or '1', the ICAP service is allowed to | |
9513 | dynamically change the current message adaptation plan by | |
9514 | returning a chain of services to be used next. The services | |
9515 | are specified using the X-Next-Services ICAP response header | |
9516 | value, formatted as a comma-separated list of service names. | |
e2851fe7 AR |
9517 | Each named service should be configured in squid.conf. Other |
9518 | services are ignored. An empty X-Next-Services value results | |
9519 | in an empty plan which ends the current adaptation. | |
9520 | ||
9521 | Dynamic adaptation plan may cross or cover multiple supported | |
9522 | vectoring points in their natural processing order. | |
a22e6cd3 AR |
9523 | |
9524 | Routing is not allowed by default: the ICAP X-Next-Services | |
9525 | response header is ignored. | |
9526 | ||
e6713f4e AJ |
9527 | ipv6=on|off |
9528 | Only has effect on split-stack systems. The default on those systems | |
9529 | is to use IPv4-only connections. When set to 'on' this option will | |
9530 | make Squid use IPv6-only connections to contact this ICAP service. | |
9531 | ||
2dba5b8e CT |
9532 | on-overload=block|bypass|wait|force |
9533 | If the service Max-Connections limit has been reached, do | |
9534 | one of the following for each new ICAP transaction: | |
9535 | * block: send an HTTP error response to the client | |
9536 | * bypass: ignore the "over-connected" ICAP service | |
9537 | * wait: wait (in a FIFO queue) for an ICAP connection slot | |
9603207d | 9538 | * force: proceed, ignoring the Max-Connections limit |
2dba5b8e CT |
9539 | |
9540 | In SMP mode with N workers, each worker assumes the service | |
9541 | connection limit is Max-Connections/N, even though not all | |
9542 | workers may use a given service. | |
9543 | ||
9544 | The default value is "bypass" if service is bypassable, | |
9545 | otherwise it is set to "wait". | |
9603207d | 9546 | |
2dba5b8e CT |
9547 | |
9548 | max-conn=number | |
9549 | Use the given number as the Max-Connections limit, regardless | |
9550 | of the Max-Connections value given by the service, if any. | |
9551 | ||
88df846b CT |
9552 | connection-encryption=on|off |
9553 | Determines the ICAP service effect on the connections_encrypted | |
9554 | ACL. | |
9555 | ||
9556 | The default is "on" for Secure ICAP services (i.e., those | |
9557 | with the icaps:// service URIs scheme) and "off" for plain ICAP | |
9558 | services. | |
9559 | ||
9560 | Does not affect ICAP connections (e.g., does not turn Secure | |
9561 | ICAP on or off). | |
9562 | ||
4dd2c9d6 | 9563 | ==== ICAPS / TLS OPTIONS ==== |
1b091aec CT |
9564 | |
9565 | These options are used for Secure ICAP (icaps://....) services only. | |
9566 | ||
4dd2c9d6 | 9567 | tls-cert=/path/to/ssl/certificate |
51e09c08 AJ |
9568 | A client X.509 certificate to use when connecting to |
9569 | this ICAP server. | |
1b091aec | 9570 | |
4dd2c9d6 | 9571 | tls-key=/path/to/ssl/key |
51e09c08 AJ |
9572 | The private key corresponding to the previous |
9573 | tls-cert= option. | |
9574 | ||
9575 | If tls-key= is not specified tls-cert= is assumed to | |
9576 | reference a PEM file containing both the certificate | |
9577 | and private key. | |
1b091aec | 9578 | |
4dd2c9d6 | 9579 | tls-cipher=... The list of valid TLS/SSL ciphers to use when connecting |
1b091aec CT |
9580 | to this icap server. |
9581 | ||
1cc44095 AJ |
9582 | tls-min-version=1.N |
9583 | The minimum TLS protocol version to permit. To control | |
3f5b28fe | 9584 | SSLv3 use the tls-options= parameter. |
1cc44095 AJ |
9585 | Supported Values: 1.0 (default), 1.1, 1.2 |
9586 | ||
4dd2c9d6 | 9587 | tls-options=... Specify various OpenSSL library options: |
1b091aec CT |
9588 | |
9589 | NO_SSLv3 Disallow the use of SSLv3 | |
4dd2c9d6 | 9590 | |
1b091aec CT |
9591 | SINGLE_DH_USE |
9592 | Always create a new key when using | |
9593 | temporary/ephemeral DH key exchanges | |
4dd2c9d6 | 9594 | |
1b091aec | 9595 | ALL Enable various bug workarounds |
4dd2c9d6 AJ |
9596 | suggested as "harmless" by OpenSSL |
9597 | Be warned that this reduces SSL/TLS | |
9598 | strength to some attacks. | |
1b091aec CT |
9599 | |
9600 | See the OpenSSL SSL_CTX_set_options documentation for a | |
4dd2c9d6 AJ |
9601 | more complete list. Options relevant only to SSLv2 are |
9602 | not supported. | |
1b091aec | 9603 | |
86a84cc0 AJ |
9604 | tls-cafile= PEM file containing CA certificates to use when verifying |
9605 | the icap server certificate. | |
9606 | Use to specify intermediate CA certificate(s) if not sent | |
9607 | by the server. Or the full CA chain for the server when | |
435c72b0 | 9608 | using the tls-default-ca=off flag. |
86a84cc0 | 9609 | May be repeated to load multiple files. |
1b091aec | 9610 | |
4dd2c9d6 | 9611 | tls-capath=... A directory containing additional CA certificates to |
1b091aec | 9612 | use when verifying the icap server certificate. |
86a84cc0 | 9613 | Requires OpenSSL or LibreSSL. |
1b091aec | 9614 | |
4dd2c9d6 | 9615 | tls-crlfile=... A certificate revocation list file to use when |
1b091aec CT |
9616 | verifying the icap server certificate. |
9617 | ||
4dd2c9d6 | 9618 | tls-flags=... Specify various flags modifying the Squid TLS implementation: |
1b091aec CT |
9619 | |
9620 | DONT_VERIFY_PEER | |
9621 | Accept certificates even if they fail to | |
9622 | verify. | |
1b091aec CT |
9623 | DONT_VERIFY_DOMAIN |
9624 | Don't verify the icap server certificate | |
9625 | matches the server name | |
9626 | ||
435c72b0 AJ |
9627 | tls-default-ca[=off] |
9628 | Whether to use the system Trusted CAs. Default is ON. | |
8b253b83 | 9629 | |
4dd2c9d6 | 9630 | tls-domain= The icap server name as advertised in it's certificate. |
1b091aec CT |
9631 | Used for verifying the correctness of the received icap |
9632 | server certificate. If not specified the icap server | |
9633 | hostname extracted from ICAP URI will be used. | |
9634 | ||
a22e6cd3 AR |
9635 | Older icap_service format without optional named parameters is |
9636 | deprecated but supported for backward compatibility. | |
5473c134 | 9637 | |
5473c134 | 9638 | Example: |
c25c2836 | 9639 | icap_service svcBlocker reqmod_precache icap://icap1.mydomain.net:1344/reqmod bypass=0 |
1b091aec | 9640 | icap_service svcLogger reqmod_precache icaps://icap2.mydomain.net:11344/reqmod routing=on |
cccac0a2 | 9641 | DOC_END |
9642 | ||
5473c134 | 9643 | NAME: icap_class |
9644 | TYPE: icap_class_type | |
9645 | IFDEF: ICAP_CLIENT | |
21a26d31 | 9646 | LOC: none |
5473c134 | 9647 | DEFAULT: none |
cccac0a2 | 9648 | DOC_START |
a22e6cd3 | 9649 | This deprecated option was documented to define an ICAP service |
62c7f90e | 9650 | chain, even though it actually defined a set of similar, redundant |
9603207d | 9651 | services, and the chains were not supported. |
5473c134 | 9652 | |
62c7f90e | 9653 | To define a set of redundant services, please use the |
a22e6cd3 AR |
9654 | adaptation_service_set directive. For service chains, use |
9655 | adaptation_service_chain. | |
cccac0a2 | 9656 | DOC_END |
9657 | ||
5473c134 | 9658 | NAME: icap_access |
9659 | TYPE: icap_access_type | |
9660 | IFDEF: ICAP_CLIENT | |
21a26d31 | 9661 | LOC: none |
cccac0a2 | 9662 | DEFAULT: none |
cccac0a2 | 9663 | DOC_START |
a22e6cd3 | 9664 | This option is deprecated. Please use adaptation_access, which |
62c7f90e AR |
9665 | has the same ICAP functionality, but comes with better |
9666 | documentation, and eCAP support. | |
cccac0a2 | 9667 | DOC_END |
9668 | ||
57afc994 AR |
9669 | COMMENT_START |
9670 | eCAP OPTIONS | |
9671 | ----------------------------------------------------------------------------- | |
9672 | COMMENT_END | |
9673 | ||
21a26d31 AR |
9674 | NAME: ecap_enable |
9675 | TYPE: onoff | |
9676 | IFDEF: USE_ECAP | |
9677 | COMMENT: on|off | |
574b508c | 9678 | LOC: Adaptation::Ecap::TheConfig.onoff |
21a26d31 AR |
9679 | DEFAULT: off |
9680 | DOC_START | |
9681 | Controls whether eCAP support is enabled. | |
9682 | DOC_END | |
9683 | ||
9684 | NAME: ecap_service | |
9685 | TYPE: ecap_service_type | |
9686 | IFDEF: USE_ECAP | |
574b508c | 9687 | LOC: Adaptation::Ecap::TheConfig |
21a26d31 AR |
9688 | DEFAULT: none |
9689 | DOC_START | |
9690 | Defines a single eCAP service | |
9691 | ||
c25c2836 | 9692 | ecap_service id vectoring_point uri [option ...] |
21a26d31 | 9693 | |
c25c2836 CT |
9694 | id: ID |
9695 | an opaque identifier or name which is used to direct traffic to | |
9696 | this specific service. Must be unique among all adaptation | |
9697 | services in squid.conf. | |
9698 | ||
9699 | vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache | |
21a26d31 AR |
9700 | This specifies at which point of transaction processing the |
9701 | eCAP service should be activated. *_postcache vectoring points | |
9702 | are not yet supported. | |
c25c2836 CT |
9703 | |
9704 | uri: ecap://vendor/service_name?custom&cgi=style¶meters=optional | |
9705 | Squid uses the eCAP service URI to match this configuration | |
9706 | line with one of the dynamically loaded services. Each loaded | |
9707 | eCAP service must have a unique URI. Obtain the right URI from | |
9708 | the service provider. | |
9709 | ||
3caa16d2 AR |
9710 | To activate a service, use the adaptation_access directive. To group |
9711 | services, use adaptation_service_chain and adaptation_service_set. | |
c25c2836 CT |
9712 | |
9713 | Service options are separated by white space. eCAP services support | |
9714 | the following name=value options: | |
9715 | ||
9716 | bypass=on|off|1|0 | |
9717 | If set to 'on' or '1', the eCAP service is treated as optional. | |
9718 | If the service cannot be reached or malfunctions, Squid will try | |
9719 | to ignore any errors and process the message as if the service | |
21a26d31 | 9720 | was not enabled. No all eCAP errors can be bypassed. |
c25c2836 CT |
9721 | If set to 'off' or '0', the eCAP service is treated as essential |
9722 | and all eCAP errors will result in an error page returned to the | |
21a26d31 | 9723 | HTTP client. |
c25c2836 CT |
9724 | |
9725 | Bypass is off by default: services are treated as essential. | |
9726 | ||
9727 | routing=on|off|1|0 | |
9728 | If set to 'on' or '1', the eCAP service is allowed to | |
9729 | dynamically change the current message adaptation plan by | |
9730 | returning a chain of services to be used next. | |
9731 | ||
9732 | Dynamic adaptation plan may cross or cover multiple supported | |
9733 | vectoring points in their natural processing order. | |
9734 | ||
9735 | Routing is not allowed by default. | |
9736 | ||
88df846b CT |
9737 | connection-encryption=on|off |
9738 | Determines the eCAP service effect on the connections_encrypted | |
9603207d | 9739 | ACL. |
88df846b CT |
9740 | |
9741 | Defaults to "on", which does not taint the master transaction | |
9742 | w.r.t. that ACL. | |
9743 | ||
9744 | Does not affect eCAP API calls. | |
9745 | ||
c25c2836 CT |
9746 | Older ecap_service format without optional named parameters is |
9747 | deprecated but supported for backward compatibility. | |
9748 | ||
21a26d31 AR |
9749 | |
9750 | Example: | |
c25c2836 CT |
9751 | ecap_service s1 reqmod_precache ecap://filters.R.us/leakDetector?on_error=block bypass=off |
9752 | ecap_service s2 respmod_precache ecap://filters.R.us/virusFilter config=/etc/vf.cfg bypass=on | |
21a26d31 AR |
9753 | DOC_END |
9754 | ||
57afc994 AR |
9755 | NAME: loadable_modules |
9756 | TYPE: wordlist | |
9757 | IFDEF: USE_LOADABLE_MODULES | |
9758 | LOC: Config.loadable_module_names | |
9759 | DEFAULT: none | |
9760 | DOC_START | |
9761 | Instructs Squid to load the specified dynamic module(s) or activate | |
9762 | preloaded module(s). | |
9763 | Example: | |
9764 | loadable_modules @DEFAULT_PREFIX@/lib/MinimalAdapter.so | |
9765 | DOC_END | |
9766 | ||
62c7f90e AR |
9767 | COMMENT_START |
9768 | MESSAGE ADAPTATION OPTIONS | |
9769 | ----------------------------------------------------------------------------- | |
9770 | COMMENT_END | |
9771 | ||
9772 | NAME: adaptation_service_set | |
9773 | TYPE: adaptation_service_set_type | |
9774 | IFDEF: USE_ADAPTATION | |
9775 | LOC: none | |
9776 | DEFAULT: none | |
9777 | DOC_START | |
9778 | ||
a22e6cd3 AR |
9779 | Configures an ordered set of similar, redundant services. This is |
9780 | useful when hot standby or backup adaptation servers are available. | |
9781 | ||
9782 | adaptation_service_set set_name service_name1 service_name2 ... | |
9783 | ||
9784 | The named services are used in the set declaration order. The first | |
9785 | applicable adaptation service from the set is used first. The next | |
9786 | applicable service is tried if and only if the transaction with the | |
9787 | previous service fails and the message waiting to be adapted is still | |
9788 | intact. | |
62c7f90e | 9789 | |
a22e6cd3 AR |
9790 | When adaptation starts, broken services are ignored as if they were |
9791 | not a part of the set. A broken service is a down optional service. | |
62c7f90e | 9792 | |
a22e6cd3 AR |
9793 | The services in a set must be attached to the same vectoring point |
9794 | (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD). | |
9795 | ||
9796 | If all services in a set are optional then adaptation failures are | |
9797 | bypassable. If all services in the set are essential, then a | |
9798 | transaction failure with one service may still be retried using | |
9799 | another service from the set, but when all services fail, the master | |
9800 | transaction fails as well. | |
9801 | ||
9802 | A set may contain a mix of optional and essential services, but that | |
9803 | is likely to lead to surprising results because broken services become | |
9804 | ignored (see above), making previously bypassable failures fatal. | |
9805 | Technically, it is the bypassability of the last failed service that | |
9806 | matters. | |
9807 | ||
9808 | See also: adaptation_access adaptation_service_chain | |
62c7f90e AR |
9809 | |
9810 | Example: | |
9811 | adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup | |
9812 | adaptation service_set svcLogger loggerLocal loggerRemote | |
9813 | DOC_END | |
9814 | ||
a22e6cd3 AR |
9815 | NAME: adaptation_service_chain |
9816 | TYPE: adaptation_service_chain_type | |
9817 | IFDEF: USE_ADAPTATION | |
9818 | LOC: none | |
9819 | DEFAULT: none | |
9820 | DOC_START | |
9821 | ||
9822 | Configures a list of complementary services that will be applied | |
9823 | one-by-one, forming an adaptation chain or pipeline. This is useful | |
9824 | when Squid must perform different adaptations on the same message. | |
9825 | ||
9826 | adaptation_service_chain chain_name service_name1 svc_name2 ... | |
9827 | ||
9828 | The named services are used in the chain declaration order. The first | |
9829 | applicable adaptation service from the chain is used first. The next | |
9830 | applicable service is applied to the successful adaptation results of | |
9831 | the previous service in the chain. | |
9832 | ||
9833 | When adaptation starts, broken services are ignored as if they were | |
9834 | not a part of the chain. A broken service is a down optional service. | |
9835 | ||
9836 | Request satisfaction terminates the adaptation chain because Squid | |
9837 | does not currently allow declaration of RESPMOD services at the | |
9838 | "reqmod_precache" vectoring point (see icap_service or ecap_service). | |
9839 | ||
9840 | The services in a chain must be attached to the same vectoring point | |
9841 | (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD). | |
9842 | ||
9843 | A chain may contain a mix of optional and essential services. If an | |
9844 | essential adaptation fails (or the failure cannot be bypassed for | |
9845 | other reasons), the master transaction fails. Otherwise, the failure | |
9846 | is bypassed as if the failed adaptation service was not in the chain. | |
9847 | ||
9848 | See also: adaptation_access adaptation_service_set | |
9849 | ||
9850 | Example: | |
9851 | adaptation_service_chain svcRequest requestLogger urlFilter leakDetector | |
9852 | DOC_END | |
9853 | ||
62c7f90e AR |
9854 | NAME: adaptation_access |
9855 | TYPE: adaptation_access_type | |
9856 | IFDEF: USE_ADAPTATION | |
9857 | LOC: none | |
9858 | DEFAULT: none | |
638402dd | 9859 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
62c7f90e AR |
9860 | DOC_START |
9861 | Sends an HTTP transaction to an ICAP or eCAP adaptation service. | |
9862 | ||
9863 | adaptation_access service_name allow|deny [!]aclname... | |
9864 | adaptation_access set_name allow|deny [!]aclname... | |
9865 | ||
9866 | At each supported vectoring point, the adaptation_access | |
9867 | statements are processed in the order they appear in this | |
9868 | configuration file. Statements pointing to the following services | |
9869 | are ignored (i.e., skipped without checking their ACL): | |
9870 | ||
9871 | - services serving different vectoring points | |
9872 | - "broken-but-bypassable" services | |
9873 | - "up" services configured to ignore such transactions | |
9874 | (e.g., based on the ICAP Transfer-Ignore header). | |
9875 | ||
9876 | When a set_name is used, all services in the set are checked | |
9877 | using the same rules, to find the first applicable one. See | |
9878 | adaptation_service_set for details. | |
9879 | ||
9880 | If an access list is checked and there is a match, the | |
9881 | processing stops: For an "allow" rule, the corresponding | |
9882 | adaptation service is used for the transaction. For a "deny" | |
9883 | rule, no adaptation service is activated. | |
9884 | ||
9885 | It is currently not possible to apply more than one adaptation | |
9886 | service at the same vectoring point to the same HTTP transaction. | |
9887 | ||
9888 | See also: icap_service and ecap_service | |
9889 | ||
9890 | Example: | |
9891 | adaptation_access service_1 allow all | |
9892 | DOC_END | |
9893 | ||
a22e6cd3 AR |
9894 | NAME: adaptation_service_iteration_limit |
9895 | TYPE: int | |
9896 | IFDEF: USE_ADAPTATION | |
9897 | LOC: Adaptation::Config::service_iteration_limit | |
9898 | DEFAULT: 16 | |
9899 | DOC_START | |
9900 | Limits the number of iterations allowed when applying adaptation | |
9901 | services to a message. If your longest adaptation set or chain | |
9902 | may have more than 16 services, increase the limit beyond its | |
9903 | default value of 16. If detecting infinite iteration loops sooner | |
9904 | is critical, make the iteration limit match the actual number | |
9905 | of services in your longest adaptation set or chain. | |
9906 | ||
9907 | Infinite adaptation loops are most likely with routing services. | |
9908 | ||
9909 | See also: icap_service routing=1 | |
9910 | DOC_END | |
9911 | ||
3ff65596 AR |
9912 | NAME: adaptation_masterx_shared_names |
9913 | TYPE: string | |
9914 | IFDEF: USE_ADAPTATION | |
9915 | LOC: Adaptation::Config::masterx_shared_name | |
9916 | DEFAULT: none | |
9917 | DOC_START | |
9918 | For each master transaction (i.e., the HTTP request and response | |
9919 | sequence, including all related ICAP and eCAP exchanges), Squid | |
9920 | maintains a table of metadata. The table entries are (name, value) | |
9921 | pairs shared among eCAP and ICAP exchanges. The table is destroyed | |
9922 | with the master transaction. | |
9923 | ||
9924 | This option specifies the table entry names that Squid must accept | |
9925 | from and forward to the adaptation transactions. | |
9926 | ||
9603207d | 9927 | An ICAP REQMOD or RESPMOD transaction may set an entry in the |
9928 | shared table by returning an ICAP header field with a name | |
6666da11 AR |
9929 | specified in adaptation_masterx_shared_names. |
9930 | ||
9931 | An eCAP REQMOD or RESPMOD transaction may set an entry in the | |
9932 | shared table by implementing the libecap::visitEachOption() API | |
9933 | to provide an option with a name specified in | |
9934 | adaptation_masterx_shared_names. | |
5038f9d8 AR |
9935 | |
9936 | Squid will store and forward the set entry to subsequent adaptation | |
3ff65596 AR |
9937 | transactions within the same master transaction scope. |
9938 | ||
9939 | Only one shared entry name is supported at this time. | |
9940 | ||
9941 | Example: | |
9942 | # share authentication information among ICAP services | |
9943 | adaptation_masterx_shared_names X-Subscriber-ID | |
9944 | DOC_END | |
9945 | ||
71be37e0 | 9946 | NAME: adaptation_meta |
d7f4a0b7 | 9947 | TYPE: note |
71be37e0 CT |
9948 | IFDEF: USE_ADAPTATION |
9949 | LOC: Adaptation::Config::metaHeaders | |
9950 | DEFAULT: none | |
9951 | DOC_START | |
9952 | This option allows Squid administrator to add custom ICAP request | |
9953 | headers or eCAP options to Squid ICAP requests or eCAP transactions. | |
9954 | Use it to pass custom authentication tokens and other | |
9955 | transaction-state related meta information to an ICAP/eCAP service. | |
9603207d | 9956 | |
71be37e0 CT |
9957 | The addition of a meta header is ACL-driven: |
9958 | adaptation_meta name value [!]aclname ... | |
9603207d | 9959 | |
71be37e0 CT |
9960 | Processing for a given header name stops after the first ACL list match. |
9961 | Thus, it is impossible to add two headers with the same name. If no ACL | |
9603207d | 9962 | lists match for a given header name, no such header is added. For |
71be37e0 | 9963 | example: |
9603207d | 9964 | |
71be37e0 CT |
9965 | # do not debug transactions except for those that need debugging |
9966 | adaptation_meta X-Debug 1 needs_debugging | |
9603207d | 9967 | |
71be37e0 CT |
9968 | # log all transactions except for those that must remain secret |
9969 | adaptation_meta X-Log 1 !keep_secret | |
9603207d | 9970 | |
71be37e0 CT |
9971 | # mark transactions from users in the "G 1" group |
9972 | adaptation_meta X-Authenticated-Groups "G 1" authed_as_G1 | |
9603207d | 9973 | |
71be37e0 CT |
9974 | The "value" parameter may be a regular squid.conf token or a "double |
9975 | quoted string". Within the quoted string, use backslash (\) to escape | |
9976 | any character, which is currently only useful for escaping backslashes | |
9977 | and double quotes. For example, | |
9978 | "this string has one backslash (\\) and two \"quotes\"" | |
d7f4a0b7 CT |
9979 | |
9980 | Used adaptation_meta header values may be logged via %note | |
9981 | logformat code. If multiple adaptation_meta headers with the same name | |
9982 | are used during master transaction lifetime, the header values are | |
9983 | logged in the order they were used and duplicate values are ignored | |
9984 | (only the first repeated value will be logged). | |
71be37e0 CT |
9985 | DOC_END |
9986 | ||
3ff65596 AR |
9987 | NAME: icap_retry |
9988 | TYPE: acl_access | |
9989 | IFDEF: ICAP_CLIENT | |
9990 | LOC: Adaptation::Icap::TheConfig.repeat | |
3ff65596 AR |
9991 | DEFAULT_IF_NONE: deny all |
9992 | DOC_START | |
9993 | This ACL determines which retriable ICAP transactions are | |
9994 | retried. Transactions that received a complete ICAP response | |
9995 | and did not have to consume or produce HTTP bodies to receive | |
9996 | that response are usually retriable. | |
9997 | ||
9998 | icap_retry allow|deny [!]aclname ... | |
9999 | ||
10000 | Squid automatically retries some ICAP I/O timeouts and errors | |
10001 | due to persistent connection race conditions. | |
10002 | ||
10003 | See also: icap_retry_limit | |
10004 | DOC_END | |
10005 | ||
10006 | NAME: icap_retry_limit | |
10007 | TYPE: int | |
10008 | IFDEF: ICAP_CLIENT | |
10009 | LOC: Adaptation::Icap::TheConfig.repeat_limit | |
10010 | DEFAULT: 0 | |
638402dd | 10011 | DEFAULT_DOC: No retries are allowed. |
3ff65596 | 10012 | DOC_START |
638402dd | 10013 | Limits the number of retries allowed. |
3ff65596 AR |
10014 | |
10015 | Communication errors due to persistent connection race | |
10016 | conditions are unavoidable, automatically retried, and do not | |
10017 | count against this limit. | |
10018 | ||
10019 | See also: icap_retry | |
10020 | DOC_END | |
10021 | ||
10022 | ||
5473c134 | 10023 | COMMENT_START |
10024 | DNS OPTIONS | |
10025 | ----------------------------------------------------------------------------- | |
10026 | COMMENT_END | |
10027 | ||
10028 | NAME: check_hostnames | |
cccac0a2 | 10029 | TYPE: onoff |
cccac0a2 | 10030 | DEFAULT: off |
5473c134 | 10031 | LOC: Config.onoff.check_hostnames |
cccac0a2 | 10032 | DOC_START |
5473c134 | 10033 | For security and stability reasons Squid can check |
10034 | hostnames for Internet standard RFC compliance. If you want | |
10035 | Squid to perform these checks turn this directive on. | |
cccac0a2 | 10036 | DOC_END |
10037 | ||
5473c134 | 10038 | NAME: allow_underscore |
cccac0a2 | 10039 | TYPE: onoff |
cccac0a2 | 10040 | DEFAULT: on |
5473c134 | 10041 | LOC: Config.onoff.allow_underscore |
cccac0a2 | 10042 | DOC_START |
5473c134 | 10043 | Underscore characters is not strictly allowed in Internet hostnames |
10044 | but nevertheless used by many sites. Set this to off if you want | |
10045 | Squid to be strict about the standard. | |
10046 | This check is performed only when check_hostnames is set to on. | |
cccac0a2 | 10047 | DOC_END |
10048 | ||
5473c134 | 10049 | NAME: dns_retransmit_interval |
fd0f51c4 | 10050 | TYPE: time_msec |
5473c134 | 10051 | DEFAULT: 5 seconds |
10052 | LOC: Config.Timeout.idns_retransmit | |
cccac0a2 | 10053 | DOC_START |
5473c134 | 10054 | Initial retransmit interval for DNS queries. The interval is |
10055 | doubled each time all configured DNS servers have been tried. | |
cccac0a2 | 10056 | DOC_END |
10057 | ||
5473c134 | 10058 | NAME: dns_timeout |
fd0f51c4 | 10059 | TYPE: time_msec |
a541c34e | 10060 | DEFAULT: 30 seconds |
5473c134 | 10061 | LOC: Config.Timeout.idns_query |
cccac0a2 | 10062 | DOC_START |
5473c134 | 10063 | DNS Query timeout. If no response is received to a DNS query |
10064 | within this time all DNS servers for the queried domain | |
10065 | are assumed to be unavailable. | |
cccac0a2 | 10066 | DOC_END |
10067 | ||
e210930b AJ |
10068 | NAME: dns_packet_max |
10069 | TYPE: b_ssize_t | |
638402dd | 10070 | DEFAULT_DOC: EDNS disabled |
e210930b AJ |
10071 | DEFAULT: none |
10072 | LOC: Config.dns.packet_max | |
e210930b AJ |
10073 | DOC_START |
10074 | Maximum number of bytes packet size to advertise via EDNS. | |
10075 | Set to "none" to disable EDNS large packet support. | |
9603207d | 10076 | |
e210930b AJ |
10077 | For legacy reasons DNS UDP replies will default to 512 bytes which |
10078 | is too small for many responses. EDNS provides a means for Squid to | |
10079 | negotiate receiving larger responses back immediately without having | |
10080 | to failover with repeat requests. Responses larger than this limit | |
10081 | will retain the old behaviour of failover to TCP DNS. | |
9603207d | 10082 | |
e210930b AJ |
10083 | Squid has no real fixed limit internally, but allowing packet sizes |
10084 | over 1500 bytes requires network jumbogram support and is usually not | |
10085 | necessary. | |
9603207d | 10086 | |
e210930b AJ |
10087 | WARNING: The RFC also indicates that some older resolvers will reply |
10088 | with failure of the whole request if the extension is added. Some | |
10089 | resolvers have already been identified which will reply with mangled | |
10090 | EDNS response on occasion. Usually in response to many-KB jumbogram | |
10091 | sizes being advertised by Squid. | |
10092 | Squid will currently treat these both as an unable-to-resolve domain | |
10093 | even if it would be resolvable without EDNS. | |
10094 | DOC_END | |
10095 | ||
5473c134 | 10096 | NAME: dns_defnames |
10097 | COMMENT: on|off | |
cccac0a2 | 10098 | TYPE: onoff |
cccac0a2 | 10099 | DEFAULT: off |
638402dd | 10100 | DEFAULT_DOC: Search for single-label domain names is disabled. |
5473c134 | 10101 | LOC: Config.onoff.res_defnames |
cccac0a2 | 10102 | DOC_START |
5473c134 | 10103 | Normally the RES_DEFNAMES resolver option is disabled |
10104 | (see res_init(3)). This prevents caches in a hierarchy | |
10105 | from interpreting single-component hostnames locally. To allow | |
10106 | Squid to handle single-component names, enable this option. | |
cccac0a2 | 10107 | DOC_END |
10108 | ||
bce61b00 AJ |
10109 | NAME: dns_multicast_local |
10110 | COMMENT: on|off | |
10111 | TYPE: onoff | |
10112 | DEFAULT: off | |
10113 | DEFAULT_DOC: Search for .local and .arpa names is disabled. | |
10114 | LOC: Config.onoff.dns_mdns | |
10115 | DOC_START | |
10116 | When set to on, Squid sends multicast DNS lookups on the local | |
10117 | network for domains ending in .local and .arpa. | |
10118 | This enables local servers and devices to be contacted in an | |
10119 | ad-hoc or zero-configuration network environment. | |
10120 | DOC_END | |
10121 | ||
5473c134 | 10122 | NAME: dns_nameservers |
5a1098fb | 10123 | TYPE: SBufList |
5473c134 | 10124 | DEFAULT: none |
638402dd | 10125 | DEFAULT_DOC: Use operating system definitions |
5a1098fb | 10126 | LOC: Config.dns.nameservers |
cccac0a2 | 10127 | DOC_START |
5473c134 | 10128 | Use this if you want to specify a list of DNS name servers |
10129 | (IP addresses) to use instead of those given in your | |
10130 | /etc/resolv.conf file. | |
638402dd | 10131 | |
5473c134 | 10132 | On Windows platforms, if no value is specified here or in |
10133 | the /etc/resolv.conf file, the list of DNS name servers are | |
10134 | taken from the Windows registry, both static and dynamic DHCP | |
10135 | configurations are supported. | |
cccac0a2 | 10136 | |
5473c134 | 10137 | Example: dns_nameservers 10.0.0.1 192.172.0.4 |
cccac0a2 | 10138 | DOC_END |
10139 | ||
5473c134 | 10140 | NAME: hosts_file |
cccac0a2 | 10141 | TYPE: string |
5473c134 | 10142 | DEFAULT: @DEFAULT_HOSTS@ |
10143 | LOC: Config.etcHostsPath | |
cccac0a2 | 10144 | DOC_START |
5473c134 | 10145 | Location of the host-local IP name-address associations |
10146 | database. Most Operating Systems have such a file on different | |
10147 | default locations: | |
10148 | - Un*X & Linux: /etc/hosts | |
10149 | - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts | |
10150 | (%SystemRoot% value install default is c:\winnt) | |
10151 | - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts | |
10152 | (%SystemRoot% value install default is c:\windows) | |
10153 | - Windows 9x/Me: %windir%\hosts | |
10154 | (%windir% value is usually c:\windows) | |
10155 | - Cygwin: /etc/hosts | |
cccac0a2 | 10156 | |
5473c134 | 10157 | The file contains newline-separated definitions, in the |
10158 | form ip_address_in_dotted_form name [name ...] names are | |
10159 | whitespace-separated. Lines beginning with an hash (#) | |
10160 | character are comments. | |
cccac0a2 | 10161 | |
5473c134 | 10162 | The file is checked at startup and upon configuration. |
10163 | If set to 'none', it won't be checked. | |
10164 | If append_domain is used, that domain will be added to | |
10165 | domain-local (i.e. not containing any dot character) host | |
10166 | definitions. | |
cccac0a2 | 10167 | DOC_END |
10168 | ||
5473c134 | 10169 | NAME: append_domain |
10170 | TYPE: string | |
10171 | LOC: Config.appendDomain | |
10172 | DEFAULT: none | |
638402dd | 10173 | DEFAULT_DOC: Use operating system definitions |
6a2f3fcf | 10174 | DOC_START |
5473c134 | 10175 | Appends local domain name to hostnames without any dots in |
10176 | them. append_domain must begin with a period. | |
10177 | ||
10178 | Be warned there are now Internet names with no dots in | |
10179 | them using only top-domain names, so setting this may | |
10180 | cause some Internet sites to become unavailable. | |
10181 | ||
10182 | Example: | |
10183 | append_domain .yourdomain.com | |
6a2f3fcf | 10184 | DOC_END |
10185 | ||
5473c134 | 10186 | NAME: ignore_unknown_nameservers |
10187 | TYPE: onoff | |
10188 | LOC: Config.onoff.ignore_unknown_nameservers | |
df6fd596 | 10189 | DEFAULT: on |
10190 | DOC_START | |
5473c134 | 10191 | By default Squid checks that DNS responses are received |
10192 | from the same IP addresses they are sent to. If they | |
10193 | don't match, Squid ignores the response and writes a warning | |
10194 | message to cache.log. You can allow responses from unknown | |
10195 | nameservers by setting this option to 'off'. | |
df6fd596 | 10196 | DOC_END |
10197 | ||
6bc15a4f | 10198 | NAME: ipcache_size |
10199 | COMMENT: (number of entries) | |
10200 | TYPE: int | |
10201 | DEFAULT: 1024 | |
10202 | LOC: Config.ipcache.size | |
638402dd AJ |
10203 | DOC_START |
10204 | Maximum number of DNS IP cache entries. | |
10205 | DOC_END | |
6bc15a4f | 10206 | |
10207 | NAME: ipcache_low | |
10208 | COMMENT: (percent) | |
10209 | TYPE: int | |
10210 | DEFAULT: 90 | |
10211 | LOC: Config.ipcache.low | |
10212 | DOC_NONE | |
10213 | ||
10214 | NAME: ipcache_high | |
10215 | COMMENT: (percent) | |
10216 | TYPE: int | |
10217 | DEFAULT: 95 | |
10218 | LOC: Config.ipcache.high | |
10219 | DOC_START | |
10220 | The size, low-, and high-water marks for the IP cache. | |
10221 | DOC_END | |
10222 | ||
10223 | NAME: fqdncache_size | |
10224 | COMMENT: (number of entries) | |
10225 | TYPE: int | |
10226 | DEFAULT: 1024 | |
10227 | LOC: Config.fqdncache.size | |
10228 | DOC_START | |
10229 | Maximum number of FQDN cache entries. | |
10230 | DOC_END | |
10231 | ||
a58ff010 | 10232 | COMMENT_START |
5473c134 | 10233 | MISCELLANEOUS |
a58ff010 | 10234 | ----------------------------------------------------------------------------- |
10235 | COMMENT_END | |
10236 | ||
2eceb328 CT |
10237 | NAME: configuration_includes_quoted_values |
10238 | COMMENT: on|off | |
bde7a8ce CT |
10239 | TYPE: configuration_includes_quoted_values |
10240 | DEFAULT: off | |
2eceb328 CT |
10241 | LOC: ConfigParser::RecognizeQuotedValues |
10242 | DOC_START | |
10243 | If set, Squid will recognize each "quoted string" after a configuration | |
10244 | directive as a single parameter. The quotes are stripped before the | |
10245 | parameter value is interpreted or used. | |
10246 | See "Values with spaces, quotes, and other special characters" | |
10247 | section for more details. | |
10248 | DOC_END | |
10249 | ||
5473c134 | 10250 | NAME: memory_pools |
a58ff010 | 10251 | COMMENT: on|off |
5473c134 | 10252 | TYPE: onoff |
10253 | DEFAULT: on | |
10254 | LOC: Config.onoff.mem_pools | |
a58ff010 | 10255 | DOC_START |
5473c134 | 10256 | If set, Squid will keep pools of allocated (but unused) memory |
10257 | available for future use. If memory is a premium on your | |
10258 | system and you believe your malloc library outperforms Squid | |
10259 | routines, disable this. | |
a58ff010 | 10260 | DOC_END |
10261 | ||
5473c134 | 10262 | NAME: memory_pools_limit |
10263 | COMMENT: (bytes) | |
70be1349 | 10264 | TYPE: b_int64_t |
5473c134 | 10265 | DEFAULT: 5 MB |
10266 | LOC: Config.MemPools.limit | |
ec1245f8 | 10267 | DOC_START |
5473c134 | 10268 | Used only with memory_pools on: |
10269 | memory_pools_limit 50 MB | |
ec1245f8 | 10270 | |
5473c134 | 10271 | If set to a non-zero value, Squid will keep at most the specified |
10272 | limit of allocated (but unused) memory in memory pools. All free() | |
10273 | requests that exceed this limit will be handled by your malloc | |
10274 | library. Squid does not pre-allocate any memory, just safe-keeps | |
10275 | objects that otherwise would be free()d. Thus, it is safe to set | |
10276 | memory_pools_limit to a reasonably high value even if your | |
10277 | configuration will use less memory. | |
ec1245f8 | 10278 | |
89646bd7 | 10279 | If set to none, Squid will keep all memory it can. That is, there |
5473c134 | 10280 | will be no limit on the total amount of memory used for safe-keeping. |
ec1245f8 | 10281 | |
5473c134 | 10282 | To disable memory allocation optimization, do not set |
70be1349 | 10283 | memory_pools_limit to 0 or none. Set memory_pools to "off" instead. |
5473c134 | 10284 | |
10285 | An overhead for maintaining memory pools is not taken into account | |
10286 | when the limit is checked. This overhead is close to four bytes per | |
10287 | object kept. However, pools may actually _save_ memory because of | |
10288 | reduced memory thrashing in your malloc library. | |
ec1245f8 | 10289 | DOC_END |
10290 | ||
5473c134 | 10291 | NAME: forwarded_for |
67c06f0d AJ |
10292 | COMMENT: on|off|transparent|truncate|delete |
10293 | TYPE: string | |
5473c134 | 10294 | DEFAULT: on |
10295 | LOC: opt_forwarded_for | |
5f8252d2 | 10296 | DOC_START |
67c06f0d AJ |
10297 | If set to "on", Squid will append your client's IP address |
10298 | in the HTTP requests it forwards. By default it looks like: | |
5f8252d2 | 10299 | |
5473c134 | 10300 | X-Forwarded-For: 192.1.2.3 |
10301 | ||
67c06f0d | 10302 | If set to "off", it will appear as |
5473c134 | 10303 | |
10304 | X-Forwarded-For: unknown | |
67c06f0d AJ |
10305 | |
10306 | If set to "transparent", Squid will not alter the | |
10307 | X-Forwarded-For header in any way. | |
10308 | ||
10309 | If set to "delete", Squid will delete the entire | |
10310 | X-Forwarded-For header. | |
10311 | ||
10312 | If set to "truncate", Squid will remove all existing | |
dd68402f | 10313 | X-Forwarded-For entries, and place the client IP as the sole entry. |
5f8252d2 | 10314 | DOC_END |
10315 | ||
5473c134 | 10316 | NAME: cachemgr_passwd |
10317 | TYPE: cachemgrpasswd | |
10318 | DEFAULT: none | |
638402dd | 10319 | DEFAULT_DOC: No password. Actions which require password are denied. |
5473c134 | 10320 | LOC: Config.passwd_list |
5f8252d2 | 10321 | DOC_START |
5473c134 | 10322 | Specify passwords for cachemgr operations. |
5f8252d2 | 10323 | |
5473c134 | 10324 | Usage: cachemgr_passwd password action action ... |
10325 | ||
10326 | Some valid actions are (see cache manager menu for a full list): | |
10327 | 5min | |
10328 | 60min | |
10329 | asndb | |
10330 | authenticator | |
10331 | cbdata | |
10332 | client_list | |
10333 | comm_incoming | |
10334 | config * | |
10335 | counters | |
10336 | delay | |
10337 | digest_stats | |
10338 | dns | |
10339 | events | |
10340 | filedescriptors | |
10341 | fqdncache | |
10342 | histograms | |
10343 | http_headers | |
10344 | info | |
10345 | io | |
10346 | ipcache | |
10347 | mem | |
10348 | menu | |
10349 | netdb | |
5473c134 | 10350 | objects |
10351 | offline_toggle * | |
10352 | pconn | |
10353 | peer_select | |
b360c477 | 10354 | reconfigure * |
5473c134 | 10355 | redirector |
10356 | refresh | |
10357 | server_list | |
10358 | shutdown * | |
10359 | store_digest | |
10360 | storedir | |
10361 | utilization | |
10362 | via_headers | |
10363 | vm_objects | |
10364 | ||
10365 | * Indicates actions which will not be performed without a | |
10366 | valid password, others can be performed if not listed here. | |
10367 | ||
10368 | To disable an action, set the password to "disable". | |
10369 | To allow performing an action without a password, set the | |
10370 | password to "none". | |
10371 | ||
10372 | Use the keyword "all" to set the same password for all actions. | |
10373 | ||
10374 | Example: | |
10375 | cachemgr_passwd secret shutdown | |
10376 | cachemgr_passwd lesssssssecret info stats/objects | |
10377 | cachemgr_passwd disable all | |
5f8252d2 | 10378 | DOC_END |
10379 | ||
5473c134 | 10380 | NAME: client_db |
a58ff010 | 10381 | COMMENT: on|off |
5473c134 | 10382 | TYPE: onoff |
10383 | DEFAULT: on | |
10384 | LOC: Config.onoff.client_db | |
a58ff010 | 10385 | DOC_START |
5473c134 | 10386 | If you want to disable collecting per-client statistics, |
10387 | turn off client_db here. | |
a58ff010 | 10388 | DOC_END |
10389 | ||
5473c134 | 10390 | NAME: refresh_all_ims |
10391 | COMMENT: on|off | |
10392 | TYPE: onoff | |
10393 | DEFAULT: off | |
10394 | LOC: Config.onoff.refresh_all_ims | |
a58ff010 | 10395 | DOC_START |
5473c134 | 10396 | When you enable this option, squid will always check |
10397 | the origin server for an update when a client sends an | |
10398 | If-Modified-Since request. Many browsers use IMS | |
10399 | requests when the user requests a reload, and this | |
10400 | ensures those clients receive the latest version. | |
a58ff010 | 10401 | |
5473c134 | 10402 | By default (off), squid may return a Not Modified response |
10403 | based on the age of the cached version. | |
78e8cfc4 | 10404 | DOC_END |
10405 | ||
5473c134 | 10406 | NAME: reload_into_ims |
626096be | 10407 | IFDEF: USE_HTTP_VIOLATIONS |
12b91c99 | 10408 | COMMENT: on|off |
5473c134 | 10409 | TYPE: onoff |
10410 | DEFAULT: off | |
10411 | LOC: Config.onoff.reload_into_ims | |
12b91c99 | 10412 | DOC_START |
5473c134 | 10413 | When you enable this option, client no-cache or ``reload'' |
10414 | requests will be changed to If-Modified-Since requests. | |
10415 | Doing this VIOLATES the HTTP standard. Enabling this | |
10416 | feature could make you liable for problems which it | |
10417 | causes. | |
10418 | ||
10419 | see also refresh_pattern for a more selective approach. | |
12b91c99 | 10420 | DOC_END |
10421 | ||
31ef19cd | 10422 | NAME: connect_retries |
5473c134 | 10423 | TYPE: int |
31ef19cd AJ |
10424 | LOC: Config.connect_retries |
10425 | DEFAULT: 0 | |
638402dd | 10426 | DEFAULT_DOC: Do not retry failed connections. |
a58ff010 | 10427 | DOC_START |
3eebd267 EB |
10428 | Limits the number of reopening attempts when establishing a single |
10429 | TCP connection. All these attempts must still complete before the | |
10430 | applicable connection opening timeout expires. | |
10431 | ||
10432 | By default and when connect_retries is set to zero, Squid does not | |
10433 | retry failed connection opening attempts. | |
31ef19cd | 10434 | |
3eebd267 EB |
10435 | The (not recommended) maximum is 10 tries. An attempt to configure a |
10436 | higher value results in the value of 10 being used (with a warning). | |
5473c134 | 10437 | |
3eebd267 EB |
10438 | Squid may open connections to retry various high-level forwarding |
10439 | failures. For an outside observer, that activity may look like a | |
10440 | low-level connection reopening attempt, but those high-level retries | |
10441 | are governed by forward_max_tries instead. | |
5473c134 | 10442 | |
3eebd267 EB |
10443 | See also: connect_timeout, forward_timeout, icap_connect_timeout, |
10444 | ident_timeout, and forward_max_tries. | |
a58ff010 | 10445 | DOC_END |
10446 | ||
5473c134 | 10447 | NAME: retry_on_error |
a58ff010 | 10448 | TYPE: onoff |
5473c134 | 10449 | LOC: Config.retry.onerror |
a58ff010 | 10450 | DEFAULT: off |
10451 | DOC_START | |
aea8548b AJ |
10452 | If set to ON Squid will automatically retry requests when |
10453 | receiving an error response with status 403 (Forbidden), | |
10454 | 500 (Internal Error), 501 or 503 (Service not available). | |
10455 | Status 502 and 504 (Gateway errors) are always retried. | |
9603207d | 10456 | |
aea8548b AJ |
10457 | This is mainly useful if you are in a complex cache hierarchy to |
10458 | work around access control errors. | |
9603207d | 10459 | |
aea8548b AJ |
10460 | NOTE: This retry will attempt to find another working destination. |
10461 | Which is different from the server which just failed. | |
5f8252d2 | 10462 | DOC_END |
10463 | ||
5473c134 | 10464 | NAME: as_whois_server |
5f8252d2 | 10465 | TYPE: string |
5473c134 | 10466 | LOC: Config.as_whois_server |
10467 | DEFAULT: whois.ra.net | |
5f8252d2 | 10468 | DOC_START |
5473c134 | 10469 | WHOIS server to query for AS numbers. NOTE: AS numbers are |
10470 | queried only when Squid starts up, not for every request. | |
5f8252d2 | 10471 | DOC_END |
10472 | ||
5473c134 | 10473 | NAME: offline_mode |
5f8252d2 | 10474 | TYPE: onoff |
5473c134 | 10475 | LOC: Config.onoff.offline |
5f8252d2 | 10476 | DEFAULT: off |
10477 | DOC_START | |
5473c134 | 10478 | Enable this option and Squid will never try to validate cached |
10479 | objects. | |
a58ff010 | 10480 | DOC_END |
10481 | ||
5473c134 | 10482 | NAME: uri_whitespace |
10483 | TYPE: uri_whitespace | |
10484 | LOC: Config.uri_whitespace | |
10485 | DEFAULT: strip | |
a58ff010 | 10486 | DOC_START |
5473c134 | 10487 | What to do with requests that have whitespace characters in the |
10488 | URI. Options: | |
a58ff010 | 10489 | |
5473c134 | 10490 | strip: The whitespace characters are stripped out of the URL. |
82806837 AJ |
10491 | This is the behavior recommended by RFC2396 and RFC3986 |
10492 | for tolerant handling of generic URI. | |
10493 | NOTE: This is one difference between generic URI and HTTP URLs. | |
10494 | ||
5473c134 | 10495 | deny: The request is denied. The user receives an "Invalid |
10496 | Request" message. | |
82806837 AJ |
10497 | This is the behaviour recommended by RFC2616 for safe |
10498 | handling of HTTP request URL. | |
10499 | ||
5473c134 | 10500 | allow: The request is allowed and the URI is not changed. The |
10501 | whitespace characters remain in the URI. Note the | |
10502 | whitespace is passed to redirector processes if they | |
10503 | are in use. | |
82806837 AJ |
10504 | Note this may be considered a violation of RFC2616 |
10505 | request parsing where whitespace is prohibited in the | |
10506 | URL field. | |
10507 | ||
5473c134 | 10508 | encode: The request is allowed and the whitespace characters are |
82806837 AJ |
10509 | encoded according to RFC1738. |
10510 | ||
5473c134 | 10511 | chop: The request is allowed and the URI is chopped at the |
82806837 AJ |
10512 | first whitespace. |
10513 | ||
10514 | ||
10515 | NOTE the current Squid implementation of encode and chop violates | |
10516 | RFC2616 by not using a 301 redirect after altering the URL. | |
5473c134 | 10517 | DOC_END |
a58ff010 | 10518 | |
5473c134 | 10519 | NAME: chroot |
10520 | TYPE: string | |
10521 | LOC: Config.chroot_dir | |
a58ff010 | 10522 | DEFAULT: none |
10523 | DOC_START | |
9f37c18a | 10524 | Specifies a directory where Squid should do a chroot() while |
2d89f399 HN |
10525 | initializing. This also causes Squid to fully drop root |
10526 | privileges after initializing. This means, for example, if you | |
10527 | use a HTTP port less than 1024 and try to reconfigure, you may | |
10528 | get an error saying that Squid can not open the port. | |
5473c134 | 10529 | DOC_END |
a58ff010 | 10530 | |
5473c134 | 10531 | NAME: pipeline_prefetch |
079a8480 AJ |
10532 | TYPE: pipelinePrefetch |
10533 | LOC: Config.pipeline_max_prefetch | |
10534 | DEFAULT: 0 | |
10535 | DEFAULT_DOC: Do not pre-parse pipelined requests. | |
a58ff010 | 10536 | DOC_START |
079a8480 AJ |
10537 | HTTP clients may send a pipeline of 1+N requests to Squid using a |
10538 | single connection, without waiting for Squid to respond to the first | |
10539 | of those requests. This option limits the number of concurrent | |
10540 | requests Squid will try to handle in parallel. If set to N, Squid | |
10541 | will try to receive and process up to 1+N requests on the same | |
10542 | connection concurrently. | |
a58ff010 | 10543 | |
079a8480 | 10544 | Defaults to 0 (off) for bandwidth management and access logging |
5473c134 | 10545 | reasons. |
a0e23afd | 10546 | |
079a8480 AJ |
10547 | NOTE: pipelining requires persistent connections to clients. |
10548 | ||
a0e23afd | 10549 | WARNING: pipelining breaks NTLM and Negotiate/Kerberos authentication. |
5473c134 | 10550 | DOC_END |
a58ff010 | 10551 | |
5473c134 | 10552 | NAME: high_response_time_warning |
10553 | TYPE: int | |
10554 | COMMENT: (msec) | |
10555 | LOC: Config.warnings.high_rptm | |
10556 | DEFAULT: 0 | |
638402dd | 10557 | DEFAULT_DOC: disabled. |
5473c134 | 10558 | DOC_START |
10559 | If the one-minute median response time exceeds this value, | |
10560 | Squid prints a WARNING with debug level 0 to get the | |
10561 | administrators attention. The value is in milliseconds. | |
a58ff010 | 10562 | DOC_END |
10563 | ||
5473c134 | 10564 | NAME: high_page_fault_warning |
10565 | TYPE: int | |
10566 | LOC: Config.warnings.high_pf | |
10567 | DEFAULT: 0 | |
638402dd | 10568 | DEFAULT_DOC: disabled. |
cc9f92d4 | 10569 | DOC_START |
5473c134 | 10570 | If the one-minute average page fault rate exceeds this |
10571 | value, Squid prints a WARNING with debug level 0 to get | |
10572 | the administrators attention. The value is in page faults | |
10573 | per second. | |
10574 | DOC_END | |
cc9f92d4 | 10575 | |
5473c134 | 10576 | NAME: high_memory_warning |
10577 | TYPE: b_size_t | |
10578 | LOC: Config.warnings.high_memory | |
f2228f3b | 10579 | IFDEF: HAVE_MSTATS&&HAVE_GNUMALLOC_H |
904971da | 10580 | DEFAULT: 0 KB |
638402dd | 10581 | DEFAULT_DOC: disabled. |
5473c134 | 10582 | DOC_START |
4bf2a476 FC |
10583 | If the memory usage (as determined by gnumalloc, if available and used) |
10584 | exceeds this amount, Squid prints a WARNING with debug level 0 to get | |
5473c134 | 10585 | the administrators attention. |
10586 | DOC_END | |
4bf2a476 | 10587 | # TODO: link high_memory_warning to mempools? |
cc9f92d4 | 10588 | |
5473c134 | 10589 | NAME: sleep_after_fork |
10590 | COMMENT: (microseconds) | |
10591 | TYPE: int | |
10592 | LOC: Config.sleep_after_fork | |
10593 | DEFAULT: 0 | |
10594 | DOC_START | |
10595 | When this is set to a non-zero value, the main Squid process | |
10596 | sleeps the specified number of microseconds after a fork() | |
10597 | system call. This sleep may help the situation where your | |
10598 | system reports fork() failures due to lack of (virtual) | |
10599 | memory. Note, however, if you have a lot of child | |
10600 | processes, these sleep delays will add up and your | |
10601 | Squid will not service requests for some amount of time | |
10602 | until all the child processes have been started. | |
cc9f92d4 | 10603 | DOC_END |
10604 | ||
b6696974 | 10605 | NAME: windows_ipaddrchangemonitor |
7aa9bb3e | 10606 | IFDEF: _SQUID_WINDOWS_ |
b6696974 GS |
10607 | COMMENT: on|off |
10608 | TYPE: onoff | |
10609 | DEFAULT: on | |
10610 | LOC: Config.onoff.WIN32_IpAddrChangeMonitor | |
10611 | DOC_START | |
9603207d | 10612 | On Windows Squid by default will monitor IP address changes and will |
b6696974 GS |
10613 | reconfigure itself after any detected event. This is very useful for |
10614 | proxies connected to internet with dial-up interfaces. | |
10615 | In some cases (a Proxy server acting as VPN gateway is one) it could be | |
10616 | desiderable to disable this behaviour setting this to 'off'. | |
10617 | Note: after changing this, Squid service must be restarted. | |
10618 | DOC_END | |
10619 | ||
a98c2da5 AJ |
10620 | NAME: eui_lookup |
10621 | TYPE: onoff | |
10622 | IFDEF: USE_SQUID_EUI | |
10623 | DEFAULT: on | |
10624 | LOC: Eui::TheConfig.euiLookup | |
10625 | DOC_START | |
10626 | Whether to lookup the EUI or MAC address of a connected client. | |
10627 | DOC_END | |
10628 | ||
f3f0f563 AJ |
10629 | NAME: max_filedescriptors max_filedesc |
10630 | TYPE: int | |
10631 | DEFAULT: 0 | |
cfab2c11 | 10632 | DEFAULT_DOC: Use operating system soft limit set by ulimit. |
f3f0f563 AJ |
10633 | LOC: Config.max_filedescriptors |
10634 | DOC_START | |
cfab2c11 D |
10635 | Set the maximum number of filedescriptors, either below the |
10636 | operating system default or up to the hard limit. | |
f3f0f563 | 10637 | |
cfab2c11 D |
10638 | Remove from squid.conf to inherit the current ulimit soft |
10639 | limit setting. | |
f3f0f563 AJ |
10640 | |
10641 | Note: Changing this requires a restart of Squid. Also | |
638402dd | 10642 | not all I/O types supports large values (eg on Windows). |
f3f0f563 AJ |
10643 | DOC_END |
10644 | ||
ec69bdb2 CT |
10645 | NAME: force_request_body_continuation |
10646 | TYPE: acl_access | |
10647 | LOC: Config.accessList.forceRequestBodyContinuation | |
10648 | DEFAULT: none | |
10649 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
10650 | DOC_START | |
10651 | This option controls how Squid handles data upload requests from HTTP | |
10652 | and FTP agents that require a "Please Continue" control message response | |
10653 | to actually send the request body to Squid. It is mostly useful in | |
10654 | adaptation environments. | |
9603207d | 10655 | |
ec69bdb2 CT |
10656 | When Squid receives an HTTP request with an "Expect: 100-continue" |
10657 | header or an FTP upload command (e.g., STOR), Squid normally sends the | |
10658 | request headers or FTP command information to an adaptation service (or | |
10659 | peer) and waits for a response. Most adaptation services (and some | |
10660 | broken peers) may not respond to Squid at that stage because they may | |
10661 | decide to wait for the HTTP request body or FTP data transfer. However, | |
10662 | that request body or data transfer may never come because Squid has not | |
10663 | responded with the HTTP 100 or FTP 150 (Please Continue) control message | |
10664 | to the request sender yet! | |
9603207d | 10665 | |
ec69bdb2 CT |
10666 | An allow match tells Squid to respond with the HTTP 100 or FTP 150 |
10667 | (Please Continue) control message on its own, before forwarding the | |
10668 | request to an adaptation service or peer. Such a response usually forces | |
10669 | the request sender to proceed with sending the body. A deny match tells | |
10670 | Squid to delay that control response until the origin server confirms | |
10671 | that the request body is needed. Delaying is the default behavior. | |
10672 | DOC_END | |
1c2b4465 CT |
10673 | |
10674 | NAME: http_upgrade_request_protocols | |
10675 | TYPE: http_upgrade_request_protocols | |
10676 | LOC: Config.http_upgrade_request_protocols | |
10677 | DEFAULT: none | |
10678 | DEFAULT_DOC: Upgrade header dropped, effectively blocking an upgrade attempt. | |
10679 | DOC_START | |
10680 | Controls client-initiated and server-confirmed switching from HTTP to | |
10681 | another protocol (or to several protocols) using HTTP Upgrade mechanism | |
10682 | defined in RFC 7230 Section 6.7. Squid itself does not understand the | |
10683 | protocols being upgraded to and participates in the upgraded | |
10684 | communication only as a dumb TCP proxy. Admins should not allow | |
10685 | upgrading to protocols that require a more meaningful proxy | |
10686 | participation. | |
10687 | ||
10688 | Usage: http_upgrade_request_protocols <protocol> allow|deny [!]acl ... | |
10689 | ||
10690 | The required "protocol" parameter is either an all-caps word OTHER or an | |
10691 | explicit protocol name (e.g. "WebSocket") optionally followed by a slash | |
10692 | and a version token (e.g. "HTTP/3"). Explicit protocol names and | |
10693 | versions are case sensitive. | |
10694 | ||
10695 | When an HTTP client sends an Upgrade request header, Squid iterates over | |
10696 | the client-offered protocols and, for each protocol P (with an optional | |
10697 | version V), evaluates the first non-empty set of | |
10698 | http_upgrade_request_protocols rules (if any) from the following list: | |
10699 | ||
10700 | * All rules with an explicit protocol name equal to P. | |
10701 | * All rules that use OTHER instead of a protocol name. | |
10702 | ||
10703 | In other words, rules using OTHER are considered for protocol P if and | |
10704 | only if there are no rules mentioning P by name. | |
10705 | ||
10706 | If both of the above sets are empty, then Squid removes protocol P from | |
10707 | the Upgrade offer. | |
10708 | ||
10709 | If the client sent a versioned protocol offer P/X, then explicit rules | |
10710 | referring to the same-name but different-version protocol P/Y are | |
10711 | declared inapplicable. Inapplicable rules are not evaluated (i.e. are | |
10712 | ignored). However, inapplicable rules still belong to the first set of | |
10713 | rules for P. | |
10714 | ||
10715 | Within the applicable rule subset, individual rules are evaluated in | |
10716 | their configuration order. If all ACLs of an applicable "allow" rule | |
10717 | match, then the protocol offered by the client is forwarded to the next | |
10718 | hop as is. If all ACLs of an applicable "deny" rule match, then the | |
10719 | offer is dropped. If no applicable rules have matching ACLs, then the | |
10720 | offer is also dropped. The first matching rule also ends rules | |
10721 | evaluation for the offered protocol. | |
10722 | ||
10723 | If all client-offered protocols are removed, then Squid forwards the | |
10724 | client request without the Upgrade header. Squid never sends an empty | |
10725 | Upgrade request header. | |
10726 | ||
10727 | An Upgrade request header with a value violating HTTP syntax is dropped | |
10728 | and ignored without an attempt to use extractable individual protocol | |
10729 | offers. | |
10730 | ||
10731 | Upon receiving an HTTP 101 (Switching Protocols) control message, Squid | |
10732 | checks that the server listed at least one protocol name and sent a | |
10733 | Connection:upgrade response header. Squid does not understand individual | |
10734 | protocol naming and versioning concepts enough to implement stricter | |
10735 | checks, but an admin can restrict HTTP 101 (Switching Protocols) | |
10736 | responses further using http_reply_access. Responses denied by | |
10737 | http_reply_access rules and responses flagged by the internal Upgrade | |
10738 | checks result in HTTP 502 (Bad Gateway) ERR_INVALID_RESP errors and | |
10739 | Squid-to-server connection closures. | |
10740 | ||
10741 | If Squid sends an Upgrade request header, and the next hop (e.g., the | |
10742 | origin server) responds with an acceptable HTTP 101 (Switching | |
10743 | Protocols), then Squid forwards that message to the client and becomes | |
10744 | a TCP tunnel. | |
10745 | ||
10746 | The presence of an Upgrade request header alone does not preclude cache | |
10747 | lookups. In other words, an Upgrade request might be satisfied from the | |
10748 | cache, using regular HTTP caching rules. | |
10749 | ||
10750 | This clause only supports fast acl types. | |
7409131e | 10751 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
1c2b4465 CT |
10752 | |
10753 | Each of the following groups of configuration lines represents a | |
10754 | separate configuration example: | |
10755 | ||
10756 | # never upgrade to protocol Foo; all others are OK | |
10757 | http_upgrade_request_protocols Foo deny all | |
10758 | http_upgrade_request_protocols OTHER allow all | |
10759 | ||
10760 | # only allow upgrades to protocol Bar (except for its first version) | |
10761 | http_upgrade_request_protocols Bar/1 deny all | |
10762 | http_upgrade_request_protocols Bar allow all | |
10763 | http_upgrade_request_protocols OTHER deny all # this rule is optional | |
10764 | ||
10765 | # only allow upgrades to protocol Baz, and only if Baz is the only offer | |
10766 | acl UpgradeHeaderHasMultipleOffers ... | |
10767 | http_upgrade_request_protocols Baz deny UpgradeHeaderHasMultipleOffers | |
10768 | http_upgrade_request_protocols Baz allow all | |
10769 | DOC_END | |
ec69bdb2 | 10770 | |
afc753f3 EB |
10771 | NAME: server_pconn_for_nonretriable |
10772 | TYPE: acl_access | |
10773 | DEFAULT: none | |
10774 | DEFAULT_DOC: Open new connections for forwarding requests Squid cannot retry safely. | |
10775 | LOC: Config.accessList.serverPconnForNonretriable | |
10776 | DOC_START | |
10777 | This option provides fine-grained control over persistent connection | |
10778 | reuse when forwarding HTTP requests that Squid cannot retry. It is useful | |
10779 | in environments where opening new connections is very expensive | |
10780 | (e.g., all connections are secured with TLS with complex client and server | |
10781 | certificate validation) and race conditions associated with persistent | |
10782 | connections are very rare and/or only cause minor problems. | |
10783 | ||
10784 | HTTP prohibits retrying unsafe and non-idempotent requests (e.g., POST). | |
10785 | Squid limitations also prohibit retrying all requests with bodies (e.g., PUT). | |
10786 | By default, when forwarding such "risky" requests, Squid opens a new | |
10787 | connection to the server or cache_peer, even if there is an idle persistent | |
10788 | connection available. When Squid is configured to risk sending a non-retriable | |
10789 | request on a previously used persistent connection, and the server closes | |
10790 | the connection before seeing that risky request, the user gets an error response | |
10791 | from Squid. In most cases, that error response will be HTTP 502 (Bad Gateway) | |
10792 | with ERR_ZERO_SIZE_OBJECT or ERR_WRITE_ERROR (peer connection reset) error detail. | |
10793 | ||
10794 | If an allow rule matches, Squid reuses an available idle persistent connection | |
10795 | (if any) for the request that Squid cannot retry. If a deny rule matches, then | |
10796 | Squid opens a new connection for the request that Squid cannot retry. | |
10797 | ||
10798 | This option does not affect requests that Squid can retry. They will reuse idle | |
10799 | persistent connections (if any). | |
10800 | ||
10801 | This clause only supports fast acl types. | |
7409131e | 10802 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
afc753f3 EB |
10803 | |
10804 | Example: | |
10805 | acl SpeedIsWorthTheRisk method POST | |
10806 | server_pconn_for_nonretriable allow SpeedIsWorthTheRisk | |
10807 | DOC_END | |
10808 | ||
55622953 CT |
10809 | NAME: happy_eyeballs_connect_timeout |
10810 | COMMENT: (msec) | |
10811 | TYPE: int | |
10812 | DEFAULT: 250 | |
10813 | LOC: Config.happyEyeballs.connect_timeout | |
10814 | DOC_START | |
10815 | This Happy Eyeballs (RFC 8305) tuning directive specifies the minimum | |
10816 | delay between opening a primary to-server connection and opening a | |
10817 | spare to-server connection for the same master transaction. This delay | |
10818 | is similar to the Connection Attempt Delay in RFC 8305, but it is only | |
10819 | applied to the first spare connection attempt. Subsequent spare | |
10820 | connection attempts use happy_eyeballs_connect_gap, and primary | |
10821 | connection attempts are not artificially delayed at all. | |
10822 | ||
10823 | Terminology: The "primary" and "spare" designations are determined by | |
10824 | the order of DNS answers received by Squid: If Squid DNS AAAA query | |
10825 | was answered first, then primary connections are connections to IPv6 | |
10826 | peer addresses (while spare connections use IPv4 addresses). | |
10827 | Similarly, if Squid DNS A query was answered first, then primary | |
10828 | connections are connections to IPv4 peer addresses (while spare | |
10829 | connections use IPv6 addresses). | |
10830 | ||
10831 | Shorter happy_eyeballs_connect_timeout values reduce master | |
10832 | transaction response time, potentially improving user-perceived | |
10833 | response times (i.e., making user eyeballs happier). Longer delays | |
10834 | reduce both concurrent connection level and server bombardment with | |
10835 | connection requests, potentially improving overall Squid performance | |
10836 | and reducing the chance of being blocked by servers for opening too | |
10837 | many unused connections. | |
10838 | ||
10839 | RFC 8305 prohibits happy_eyeballs_connect_timeout values smaller than | |
10840 | 10 (milliseconds) to "avoid congestion collapse in the presence of | |
10841 | high packet-loss rates". | |
10842 | ||
10843 | The following Happy Eyeballs directives place additional connection | |
10844 | opening restrictions: happy_eyeballs_connect_gap and | |
10845 | happy_eyeballs_connect_limit. | |
10846 | DOC_END | |
10847 | ||
10848 | NAME: happy_eyeballs_connect_gap | |
10849 | COMMENT: (msec) | |
10850 | TYPE: int | |
10851 | DEFAULT: -1 | |
10852 | DEFAULT_DOC: no artificial delays between spare attempts | |
10853 | LOC: Config.happyEyeballs.connect_gap | |
10854 | DOC_START | |
10855 | This Happy Eyeballs (RFC 8305) tuning directive specifies the | |
10856 | minimum delay between opening spare to-server connections (to any | |
10857 | server; i.e. across all concurrent master transactions in a Squid | |
10858 | instance). Each SMP worker currently multiplies the configured gap | |
10859 | by the total number of workers so that the combined spare connection | |
10860 | opening rate of a Squid instance obeys the configured limit. The | |
10861 | workers do not coordinate connection openings yet; a micro burst | |
10862 | of spare connection openings may violate the configured gap. | |
10863 | ||
10864 | This directive has similar trade-offs as | |
10865 | happy_eyeballs_connect_timeout, but its focus is on limiting traffic | |
10866 | amplification effects for Squid as a whole, while | |
10867 | happy_eyeballs_connect_timeout works on an individual master | |
10868 | transaction level. | |
10869 | ||
10870 | The following Happy Eyeballs directives place additional connection | |
10871 | opening restrictions: happy_eyeballs_connect_timeout and | |
10872 | happy_eyeballs_connect_limit. See the former for related terminology. | |
10873 | DOC_END | |
10874 | ||
10875 | NAME: happy_eyeballs_connect_limit | |
10876 | TYPE: int | |
10877 | DEFAULT: -1 | |
10878 | DEFAULT_DOC: no artificial limit on the number of concurrent spare attempts | |
10879 | LOC: Config.happyEyeballs.connect_limit | |
10880 | DOC_START | |
10881 | This Happy Eyeballs (RFC 8305) tuning directive specifies the | |
10882 | maximum number of spare to-server connections (to any server; i.e. | |
10883 | across all concurrent master transactions in a Squid instance). | |
10884 | Each SMP worker gets an equal share of the total limit. However, | |
10885 | the workers do not share the actual connection counts yet, so one | |
10886 | (busier) worker cannot "borrow" spare connection slots from another | |
10887 | (less loaded) worker. | |
10888 | ||
10889 | Setting this limit to zero disables concurrent use of primary and | |
10890 | spare TCP connections: Spare connection attempts are made only after | |
10891 | all primary attempts fail. However, Squid would still use the | |
10892 | DNS-related optimizations of the Happy Eyeballs approach. | |
10893 | ||
10894 | This directive has similar trade-offs as happy_eyeballs_connect_gap, | |
10895 | but its focus is on limiting Squid overheads, while | |
10896 | happy_eyeballs_connect_gap focuses on the origin server and peer | |
10897 | overheads. | |
10898 | ||
10899 | The following Happy Eyeballs directives place additional connection | |
10900 | opening restrictions: happy_eyeballs_connect_timeout and | |
10901 | happy_eyeballs_connect_gap. See the former for related terminology. | |
10902 | DOC_END | |
10903 | ||
cccac0a2 | 10904 | EOF |