]>
Commit | Line | Data |
---|---|---|
4ac4a490 | 1 | ## Copyright (C) 1996-2017 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 | ---------------------------- |
5945964d AJ |
11 | |
12 | This is the documentation for the Squid configuration file. | |
13 | This documentation can also be found online at: | |
14 | http://www.squid-cache.org/Doc/config/ | |
15 | ||
16 | You may wish to look at the Squid home page and wiki for the | |
17 | FAQ and other documentation: | |
18 | http://www.squid-cache.org/ | |
19 | http://wiki.squid-cache.org/SquidFaq | |
20 | http://wiki.squid-cache.org/ConfigExamples | |
21 | ||
22 | This documentation shows what the defaults for various directives | |
23 | happen to be. If you don't need to change the default, you should | |
24 | leave the line out of your squid.conf in most cases. | |
25 | ||
26 | In some cases "none" refers to no default setting at all, | |
27 | while in other cases it refers to the value of the option | |
28 | - the comments for that keyword indicate if this is the case. | |
debd9a31 | 29 | |
cccac0a2 | 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 | |
2eceb328 CT |
58 | Values with spaces, quotes, and other special characters |
59 | ||
60 | Squid supports directive parameters with spaces, quotes, and other | |
61 | special characters. Surround such parameters with "double quotes". Use | |
62 | the configuration_includes_quoted_values directive to enable or | |
63 | disable that support. | |
64 | ||
65 | Squid supports reading configuration option parameters from external | |
66 | files using the syntax: | |
67 | parameters("/path/filename") | |
68 | For example: | |
69 | acl whitelist dstdomain parameters("/etc/squid/whitelist.txt") | |
70 | ||
5735d30b AR |
71 | Conditional configuration |
72 | ||
73 | If-statements can be used to make configuration directives | |
74 | depend on conditions: | |
75 | ||
76 | if <CONDITION> | |
77 | ... regular configuration directives ... | |
78 | [else | |
79 | ... regular configuration directives ...] | |
80 | endif | |
81 | ||
82 | The else part is optional. The keywords "if", "else", and "endif" | |
83 | must be typed on their own lines, as if they were regular | |
84 | configuration directives. | |
85 | ||
5945964d AJ |
86 | NOTE: An else-if condition is not supported. |
87 | ||
5735d30b AR |
88 | These individual conditions types are supported: |
89 | ||
90 | true | |
91 | Always evaluates to true. | |
92 | false | |
93 | Always evaluates to false. | |
94 | <integer> = <integer> | |
95 | Equality comparison of two integer numbers. | |
96 | ||
97 | ||
d4a3e179 AR |
98 | SMP-Related Macros |
99 | ||
100 | The following SMP-related preprocessor macros can be used. | |
101 | ||
102 | ${process_name} expands to the current Squid process "name" | |
103 | (e.g., squid1, squid2, or cache1). | |
104 | ||
105 | ${process_number} expands to the current Squid process | |
106 | identifier, which is an integer number (e.g., 1, 2, 3) unique | |
6fe8c876 AJ |
107 | across all Squid processes of the current service instance. |
108 | ||
109 | ${service_name} expands into the current Squid service instance | |
110 | name identifier which is provided by -n on the command line. | |
111 | ||
cde8f31b NH |
112 | Logformat Macros |
113 | ||
114 | Logformat macros can be used in many places outside of the logformat | |
115 | directive. In theory, all of the logformat codes can be used as %macros, | |
116 | where they are supported. In practice, a %macro expands as a dash (-) when | |
117 | the transaction does not yet have enough information and a value is needed. | |
118 | ||
119 | There is no definitive list of what tokens are available at the various | |
120 | stages of the transaction. | |
121 | ||
122 | And some information may already be available to Squid but not yet | |
123 | committed where the macro expansion code can access it (report | |
124 | such instances!). The macro will be expanded into a single dash | |
125 | ('-') in such cases. Not all macros have been tested. | |
126 | ||
592a09dc | 127 | COMMENT_END |
128 | ||
25234ebd AJ |
129 | # options still not yet ported from 2.7 to 3.x |
130 | NAME: broken_vary_encoding | |
131 | TYPE: obsolete | |
132 | DOC_START | |
133 | This option is not yet supported by Squid-3. | |
134 | DOC_END | |
135 | ||
136 | NAME: cache_vary | |
137 | TYPE: obsolete | |
138 | DOC_START | |
139 | This option is not yet supported by Squid-3. | |
140 | DOC_END | |
141 | ||
25234ebd AJ |
142 | NAME: error_map |
143 | TYPE: obsolete | |
144 | DOC_START | |
145 | This option is not yet supported by Squid-3. | |
146 | DOC_END | |
147 | ||
148 | NAME: external_refresh_check | |
149 | TYPE: obsolete | |
150 | DOC_START | |
151 | This option is not yet supported by Squid-3. | |
152 | DOC_END | |
153 | ||
96598f93 | 154 | NAME: location_rewrite_program location_rewrite_access location_rewrite_children location_rewrite_concurrency |
25234ebd AJ |
155 | TYPE: obsolete |
156 | DOC_START | |
157 | This option is not yet supported by Squid-3. | |
158 | DOC_END | |
159 | ||
96598f93 | 160 | NAME: refresh_stale_hit |
25234ebd AJ |
161 | TYPE: obsolete |
162 | DOC_START | |
163 | This option is not yet supported by Squid-3. | |
164 | DOC_END | |
165 | ||
6eb545bc | 166 | # Options removed in 4.x |
f1a5d071 AJ |
167 | NAME: cache_peer_domain cache_host_domain |
168 | TYPE: obsolete | |
169 | DOC_START | |
170 | Replace with dstdomain ACLs and cache_peer_access. | |
171 | DOC_END | |
172 | ||
6eb545bc AJ |
173 | NAME: ie_refresh |
174 | TYPE: obsolete | |
175 | DOC_START | |
176 | Remove this line. The behaviour enabled by this is no longer needed. | |
177 | DOC_END | |
178 | ||
7e62a74f AJ |
179 | NAME: sslproxy_cafile |
180 | TYPE: obsolete | |
181 | DOC_START | |
182 | Remove this line. Use tls_outgoing_options cafile= instead. | |
183 | DOC_END | |
184 | ||
185 | NAME: sslproxy_capath | |
186 | TYPE: obsolete | |
187 | DOC_START | |
188 | Remove this line. Use tls_outgoing_options capath= instead. | |
189 | DOC_END | |
190 | ||
191 | NAME: sslproxy_cipher | |
192 | TYPE: obsolete | |
193 | DOC_START | |
194 | Remove this line. Use tls_outgoing_options cipher= instead. | |
195 | DOC_END | |
196 | ||
197 | NAME: sslproxy_client_certificate | |
198 | TYPE: obsolete | |
199 | DOC_START | |
200 | Remove this line. Use tls_outgoing_options cert= instead. | |
201 | DOC_END | |
202 | ||
203 | NAME: sslproxy_client_key | |
204 | TYPE: obsolete | |
205 | DOC_START | |
206 | Remove this line. Use tls_outgoing_options key= instead. | |
207 | DOC_END | |
208 | ||
209 | NAME: sslproxy_flags | |
210 | TYPE: obsolete | |
211 | DOC_START | |
212 | Remove this line. Use tls_outgoing_options flags= instead. | |
213 | DOC_END | |
214 | ||
215 | NAME: sslproxy_options | |
216 | TYPE: obsolete | |
217 | DOC_START | |
218 | Remove this line. Use tls_outgoing_options options= instead. | |
219 | DOC_END | |
220 | ||
221 | NAME: sslproxy_version | |
222 | TYPE: obsolete | |
223 | DOC_START | |
1cc44095 | 224 | Remove this line. Use tls_outgoing_options options= instead. |
7e62a74f AJ |
225 | DOC_END |
226 | ||
9967aef6 AJ |
227 | # Options removed in 3.5 |
228 | NAME: hierarchy_stoplist | |
229 | TYPE: obsolete | |
230 | DOC_START | |
231 | Remove this line. Use always_direct or cache_peer_access ACLs instead if you need to prevent cache_peer use. | |
232 | DOC_END | |
233 | ||
a8f70484 | 234 | # Options removed in 3.4 |
74d81220 AJ |
235 | NAME: log_access |
236 | TYPE: obsolete | |
237 | DOC_START | |
238 | Remove this line. Use acls with access_log directives to control access logging | |
239 | DOC_END | |
240 | ||
241 | NAME: log_icap | |
242 | TYPE: obsolete | |
243 | DOC_START | |
244 | Remove this line. Use acls with icap_log directives to control icap logging | |
245 | DOC_END | |
246 | ||
96598f93 AJ |
247 | # Options Removed in 3.3 |
248 | NAME: ignore_ims_on_miss | |
25234ebd AJ |
249 | TYPE: obsolete |
250 | DOC_START | |
2d4eefd9 | 251 | Remove this line. The HTTP/1.1 feature is now configured by 'cache_miss_revalidate'. |
25234ebd AJ |
252 | DOC_END |
253 | ||
76f44481 | 254 | # Options Removed in 3.2 |
16cd62b7 AJ |
255 | NAME: chunked_request_body_max_size |
256 | TYPE: obsolete | |
257 | DOC_START | |
258 | Remove this line. Squid is now HTTP/1.1 compliant. | |
259 | DOC_END | |
260 | ||
74d81220 | 261 | NAME: dns_v4_fallback |
76f44481 AJ |
262 | TYPE: obsolete |
263 | DOC_START | |
74d81220 | 264 | Remove this line. Squid performs a 'Happy Eyeballs' algorithm, the 'fallback' algorithm is no longer relevant. |
76f44481 AJ |
265 | DOC_END |
266 | ||
74d81220 | 267 | NAME: emulate_httpd_log |
6e095b46 AJ |
268 | TYPE: obsolete |
269 | DOC_START | |
74d81220 AJ |
270 | Replace this with an access_log directive using the format 'common' or 'combined'. |
271 | DOC_END | |
272 | ||
273 | NAME: forward_log | |
274 | TYPE: obsolete | |
275 | DOC_START | |
276 | Use a regular access.log with ACL limiting it to MISS events. | |
6e095b46 AJ |
277 | DOC_END |
278 | ||
76f44481 AJ |
279 | NAME: ftp_list_width |
280 | TYPE: obsolete | |
281 | DOC_START | |
282 | Remove this line. Configure FTP page display using the CSS controls in errorpages.css instead. | |
283 | DOC_END | |
284 | ||
74d81220 AJ |
285 | NAME: ignore_expect_100 |
286 | TYPE: obsolete | |
287 | DOC_START | |
288 | Remove this line. The HTTP/1.1 feature is now fully supported by default. | |
289 | DOC_END | |
290 | ||
291 | NAME: log_fqdn | |
292 | TYPE: obsolete | |
293 | DOC_START | |
294 | Remove this option from your config. To log FQDN use %>A in the log format. | |
295 | DOC_END | |
296 | ||
297 | NAME: log_ip_on_direct | |
298 | TYPE: obsolete | |
299 | DOC_START | |
300 | Remove this option from your config. To log server or peer names use %<A in the log format. | |
301 | DOC_END | |
302 | ||
38493d67 AJ |
303 | NAME: maximum_single_addr_tries |
304 | TYPE: obsolete | |
305 | DOC_START | |
306 | Replaced by connect_retries. The behaviour has changed, please read the documentation before altering. | |
307 | DOC_END | |
308 | ||
74d81220 AJ |
309 | NAME: referer_log referrer_log |
310 | TYPE: obsolete | |
311 | DOC_START | |
312 | Replace this with an access_log directive using the format 'referrer'. | |
313 | DOC_END | |
314 | ||
4ded749e AJ |
315 | NAME: update_headers |
316 | TYPE: obsolete | |
317 | DOC_START | |
318 | Remove this line. The feature is supported by default in storage types where update is implemented. | |
319 | DOC_END | |
320 | ||
76f44481 AJ |
321 | NAME: url_rewrite_concurrency |
322 | TYPE: obsolete | |
323 | DOC_START | |
324 | Remove this line. Set the 'concurrency=' option of url_rewrite_children instead. | |
325 | DOC_END | |
326 | ||
74d81220 AJ |
327 | NAME: useragent_log |
328 | TYPE: obsolete | |
329 | DOC_START | |
330 | Replace this with an access_log directive using the format 'useragent'. | |
331 | DOC_END | |
332 | ||
76f44481 AJ |
333 | # Options Removed in 3.1 |
334 | NAME: dns_testnames | |
335 | TYPE: obsolete | |
336 | DOC_START | |
337 | Remove this line. DNS is no longer tested on startup. | |
338 | DOC_END | |
339 | ||
340 | NAME: extension_methods | |
341 | TYPE: obsolete | |
342 | DOC_START | |
343 | Remove this line. All valid methods for HTTP are accepted by default. | |
344 | DOC_END | |
345 | ||
c72a2049 AJ |
346 | # 2.7 Options Removed/Replaced in 3.2 |
347 | NAME: zero_buffers | |
348 | TYPE: obsolete | |
349 | DOC_NONE | |
350 | ||
76f44481 AJ |
351 | # 2.7 Options Removed/Replaced in 3.1 |
352 | NAME: incoming_rate | |
353 | TYPE: obsolete | |
354 | DOC_NONE | |
355 | ||
356 | NAME: server_http11 | |
357 | TYPE: obsolete | |
358 | DOC_START | |
359 | Remove this line. HTTP/1.1 is supported by default. | |
360 | DOC_END | |
361 | ||
362 | NAME: upgrade_http0.9 | |
363 | TYPE: obsolete | |
364 | DOC_START | |
365 | Remove this line. ICY/1.0 streaming protocol is supported by default. | |
366 | DOC_END | |
367 | ||
368 | NAME: zph_local zph_mode zph_option zph_parent zph_sibling | |
369 | TYPE: obsolete | |
370 | DOC_START | |
371 | Alter these entries. Use the qos_flows directive instead. | |
372 | DOC_END | |
373 | ||
374 | # Options Removed in 3.0 | |
375 | NAME: header_access | |
376 | TYPE: obsolete | |
377 | DOC_START | |
378 | Since squid-3.0 replace with request_header_access or reply_header_access | |
379 | depending on whether you wish to match client requests or server replies. | |
380 | DOC_END | |
381 | ||
382 | NAME: httpd_accel_no_pmtu_disc | |
383 | TYPE: obsolete | |
384 | DOC_START | |
385 | Since squid-3.0 use the 'disable-pmtu-discovery' flag on http_port instead. | |
386 | DOC_END | |
387 | ||
3b31a711 AJ |
388 | NAME: wais_relay_host |
389 | TYPE: obsolete | |
390 | DOC_START | |
391 | Replace this line with 'cache_peer' configuration. | |
392 | DOC_END | |
393 | ||
394 | NAME: wais_relay_port | |
395 | TYPE: obsolete | |
396 | DOC_START | |
397 | Replace this line with 'cache_peer' configuration. | |
398 | DOC_END | |
399 | ||
50ff42a2 AJ |
400 | COMMENT_START |
401 | OPTIONS FOR SMP | |
402 | ----------------------------------------------------------------------------- | |
403 | COMMENT_END | |
404 | ||
405 | NAME: workers | |
406 | TYPE: int | |
407 | LOC: Config.workers | |
408 | DEFAULT: 1 | |
409 | DEFAULT_DOC: SMP support disabled. | |
410 | DOC_START | |
411 | Number of main Squid processes or "workers" to fork and maintain. | |
412 | 0: "no daemon" mode, like running "squid -N ..." | |
413 | 1: "no SMP" mode, start one main Squid process daemon (default) | |
414 | N: start N main Squid process daemons (i.e., SMP mode) | |
415 | ||
416 | In SMP mode, each worker does nearly all what a single Squid daemon | |
417 | does (e.g., listen on http_port and forward HTTP requests). | |
418 | DOC_END | |
419 | ||
420 | NAME: cpu_affinity_map | |
421 | TYPE: CpuAffinityMap | |
422 | LOC: Config.cpuAffinityMap | |
423 | DEFAULT: none | |
424 | DEFAULT_DOC: Let operating system decide. | |
425 | DOC_START | |
426 | Usage: cpu_affinity_map process_numbers=P1,P2,... cores=C1,C2,... | |
427 | ||
428 | Sets 1:1 mapping between Squid processes and CPU cores. For example, | |
429 | ||
430 | cpu_affinity_map process_numbers=1,2,3,4 cores=1,3,5,7 | |
431 | ||
432 | affects processes 1 through 4 only and places them on the first | |
433 | four even cores, starting with core #1. | |
434 | ||
435 | CPU cores are numbered starting from 1. Requires support for | |
436 | sched_getaffinity(2) and sched_setaffinity(2) system calls. | |
437 | ||
438 | Multiple cpu_affinity_map options are merged. | |
439 | ||
440 | See also: workers | |
441 | DOC_END | |
442 | ||
c756d517 AR |
443 | NAME: shared_memory_locking |
444 | TYPE: YesNoNone | |
445 | COMMENT: on|off | |
446 | LOC: Config.shmLocking | |
447 | DEFAULT: off | |
448 | DOC_START | |
449 | Whether to ensure that all required shared memory is available by | |
450 | "locking" that shared memory into RAM when Squid starts. The | |
451 | alternative is faster startup time followed by slightly slower | |
452 | performance and, if not enough RAM is actually available during | |
453 | runtime, mysterious crashes. | |
454 | ||
455 | SMP Squid uses many shared memory segments. These segments are | |
456 | brought into Squid memory space using an mmap(2) system call. During | |
457 | Squid startup, the mmap() call often succeeds regardless of whether | |
458 | the system has enough RAM. In general, Squid cannot tell whether the | |
459 | kernel applies this "optimistic" memory allocation policy (but | |
460 | popular modern kernels usually use it). | |
461 | ||
462 | Later, if Squid attempts to actually access the mapped memory | |
463 | regions beyond what the kernel is willing to allocate, the | |
464 | "optimistic" kernel simply kills Squid kid with a SIGBUS signal. | |
465 | Some of the memory limits enforced by the kernel are currently | |
466 | poorly understood: We do not know how to detect and check them. This | |
467 | option ensures that the mapped memory will be available. | |
468 | ||
469 | This option may have a positive performance side-effect: Locking | |
470 | memory at start avoids runtime paging I/O. Paging slows Squid down. | |
471 | ||
472 | Locking memory may require a large enough RLIMIT_MEMLOCK OS limit, | |
473 | CAP_IPC_LOCK capability, or equivalent. | |
474 | DOC_END | |
475 | ||
5473c134 | 476 | COMMENT_START |
41bd17a4 | 477 | OPTIONS FOR AUTHENTICATION |
5473c134 | 478 | ----------------------------------------------------------------------------- |
479 | COMMENT_END | |
480 | ||
41bd17a4 | 481 | NAME: auth_param |
482 | TYPE: authparam | |
2f1431ea | 483 | IFDEF: USE_AUTH |
5c112575 | 484 | LOC: Auth::TheConfig.schemes |
cccac0a2 | 485 | DEFAULT: none |
486 | DOC_START | |
41bd17a4 | 487 | This is used to define parameters for the various authentication |
488 | schemes supported by Squid. | |
cccac0a2 | 489 | |
66c583dc | 490 | format: auth_param scheme parameter [setting] |
cccac0a2 | 491 | |
41bd17a4 | 492 | The order in which authentication schemes are presented to the client is |
493 | dependent on the order the scheme first appears in config file. IE | |
494 | has a bug (it's not RFC 2617 compliant) in that it will use the basic | |
495 | scheme if basic is the first entry presented, even if more secure | |
496 | schemes are presented. For now use the order in the recommended | |
497 | settings section below. If other browsers have difficulties (don't | |
498 | recognize the schemes offered even if you are using basic) either | |
499 | put basic first, or disable the other schemes (by commenting out their | |
500 | program entry). | |
cccac0a2 | 501 | |
41bd17a4 | 502 | Once an authentication scheme is fully configured, it can only be |
503 | shutdown by shutting squid down and restarting. Changes can be made on | |
504 | the fly and activated with a reconfigure. I.E. You can change to a | |
505 | different helper, but not unconfigure the helper completely. | |
cccac0a2 | 506 | |
41bd17a4 | 507 | Please note that while this directive defines how Squid processes |
508 | authentication it does not automatically activate authentication. | |
509 | To use authentication you must in addition make use of ACLs based | |
510 | on login name in http_access (proxy_auth, proxy_auth_regex or | |
511 | external with %LOGIN used in the format tag). The browser will be | |
512 | challenged for authentication on the first such acl encountered | |
513 | in http_access processing and will also be re-challenged for new | |
514 | login credentials if the request is being denied by a proxy_auth | |
515 | type acl. | |
cccac0a2 | 516 | |
41bd17a4 | 517 | WARNING: authentication can't be used in a transparently intercepting |
518 | proxy as the client then thinks it is talking to an origin server and | |
519 | not the proxy. This is a limitation of bending the TCP/IP protocol to | |
520 | transparently intercepting port 80, not a limitation in Squid. | |
b3567eb5 FC |
521 | Ports flagged 'transparent', 'intercept', or 'tproxy' have |
522 | authentication disabled. | |
cccac0a2 | 523 | |
d4806c91 CT |
524 | === Parameters common to all schemes. === |
525 | ||
526 | "program" cmdline | |
66c583dc | 527 | Specifies the command for the external authenticator. |
d4806c91 | 528 | |
66c583dc AJ |
529 | By default, each authentication scheme is not used unless a |
530 | program is specified. | |
cccac0a2 | 531 | |
66c583dc AJ |
532 | See http://wiki.squid-cache.org/Features/AddonHelpers for |
533 | more details on helper operations and creating your own. | |
5269ec0e | 534 | |
66c583dc AJ |
535 | "key_extras" format |
536 | Specifies a string to be append to request line format for | |
537 | the authentication helper. "Quoted" format values may contain | |
538 | spaces and logformat %macros. In theory, any logformat %macro | |
539 | can be used. In practice, a %macro expands as a dash (-) if | |
540 | the helper request is sent before the required macro | |
541 | information is available to Squid. | |
542 | ||
543 | By default, Squid uses request formats provided in | |
544 | scheme-specific examples below (search for %credentials). | |
545 | ||
546 | The expanded key_extras value is added to the Squid credentials | |
547 | cache and, hence, will affect authentication. It can be used to | |
548 | autenticate different users with identical user names (e.g., | |
549 | when user authentication depends on http_port). | |
550 | ||
551 | Avoid adding frequently changing information to key_extras. For | |
552 | example, if you add user source IP, and it changes frequently | |
553 | in your environment, then max_user_ip ACL is going to treat | |
554 | every user+IP combination as a unique "user", breaking the ACL | |
555 | and wasting a lot of memory on those user records. It will also | |
556 | force users to authenticate from scratch whenever their IP | |
557 | changes. | |
558 | ||
559 | "realm" string | |
560 | Specifies the protection scope (aka realm name) which is to be | |
561 | reported to the client for the authentication scheme. It is | |
562 | commonly part of the text the user will see when prompted for | |
563 | their username and password. | |
564 | ||
565 | For Basic the default is "Squid proxy-caching web server". | |
566 | For Digest there is no default, this parameter is mandatory. | |
567 | For NTLM and Negotiate this parameter is ignored. | |
5269ec0e | 568 | |
6082a0e2 EB |
569 | "children" numberofchildren [startup=N] [idle=N] [concurrency=N] |
570 | [queue-size=N] [on-persistent-overload=action] | |
5269ec0e | 571 | |
66c583dc AJ |
572 | The maximum number of authenticator processes to spawn. If |
573 | you start too few Squid will have to wait for them to process | |
574 | a backlog of credential verifications, slowing it down. When | |
575 | password verifications are done via a (slow) network you are | |
576 | likely to need lots of authenticator processes. | |
5269ec0e | 577 | |
66c583dc AJ |
578 | The startup= and idle= options permit some skew in the exact |
579 | amount run. A minimum of startup=N will begin during startup | |
580 | and reconfigure. Squid will start more in groups of up to | |
581 | idle=N in an attempt to meet traffic needs and to keep idle=N | |
582 | free above those traffic needs up to the maximum. | |
5269ec0e | 583 | |
66c583dc AJ |
584 | The concurrency= option sets the number of concurrent requests |
585 | the helper can process. The default of 0 is used for helpers | |
586 | who only supports one request at a time. Setting this to a | |
587 | number greater than 0 changes the protocol used to include a | |
588 | channel ID field first on the request/response line, allowing | |
589 | multiple requests to be sent to the same helper in parallel | |
590 | without waiting for the response. | |
cccac0a2 | 591 | |
66c583dc AJ |
592 | Concurrency must not be set unless it's known the helper |
593 | supports the input format with channel-ID fields. | |
cccac0a2 | 594 | |
6082a0e2 EB |
595 | The queue-size=N option sets the maximum number of queued |
596 | requests to N. The default maximum is 2*numberofchildren. Squid | |
597 | is allowed to temporarily exceed the configured maximum, marking | |
598 | the affected helper as "overloaded". If the helper overload | |
599 | lasts more than 3 minutes, the action prescribed by the | |
600 | on-persistent-overload option applies. | |
601 | ||
602 | The on-persistent-overload=action option specifies Squid | |
603 | reaction to a new helper request arriving when the helper | |
604 | has been overloaded for more that 3 minutes already. The number | |
605 | of queued requests determines whether the helper is overloaded | |
606 | (see the queue-size option). | |
607 | ||
608 | Two actions are supported: | |
609 | ||
610 | die Squid worker quits. This is the default behavior. | |
611 | ||
612 | ERR Squid treats the helper request as if it was | |
613 | immediately submitted, and the helper immediately | |
614 | replied with an ERR response. This action has no effect | |
615 | on the already queued and in-progress helper requests. | |
6825b101 | 616 | |
66c583dc AJ |
617 | NOTE: NTLM and Negotiate schemes do not support concurrency |
618 | in the Squid code module even though some helpers can. | |
307b83b7 | 619 | |
b2b09838 AJ |
620 | "keep_alive" on|off |
621 | If you experience problems with PUT/POST requests when using | |
622 | the NTLM or Negotiate schemes then you can try setting this | |
623 | to off. This will cause Squid to forcibly close the connection | |
624 | on the initial request where the browser asks which schemes | |
625 | are supported by the proxy. | |
9e7dbc51 | 626 | |
b2b09838 | 627 | For Basic and Digest this parameter is ignored. |
d2a89ac1 | 628 | |
66c583dc AJ |
629 | "utf8" on|off |
630 | HTTP uses iso-latin-1 as character set, while some | |
631 | authentication backends such as LDAP expects UTF-8. If this is | |
632 | set to on Squid will translate the HTTP iso-latin-1 charset to | |
633 | UTF-8 before sending the username and password to the helper. | |
d1b63fc8 | 634 | |
b2b09838 AJ |
635 | For NTLM and Negotiate this parameter is ignored. |
636 | ||
637 | IF HAVE_AUTH_MODULE_BASIC | |
638 | === Basic authentication parameters === | |
639 | ||
41bd17a4 | 640 | "credentialsttl" timetolive |
66c583dc AJ |
641 | Specifies how long squid assumes an externally validated |
642 | username:password pair is valid for - in other words how | |
643 | often the helper program is called for that user. Set this | |
644 | low to force revalidation with short lived passwords. | |
cccac0a2 | 645 | |
66c583dc AJ |
646 | NOTE: setting this high does not impact your susceptibility |
647 | to replay attacks unless you are using an one-time password | |
648 | system (such as SecureID). If you are using such a system, | |
649 | you will be vulnerable to replay attacks unless you also | |
650 | use the max_user_ip ACL in an http_access rule. | |
cccac0a2 | 651 | |
66c583dc AJ |
652 | "casesensitive" on|off |
653 | Specifies if usernames are case sensitive. Most user databases | |
654 | are case insensitive allowing the same username to be spelled | |
655 | using both lower and upper case letters, but some are case | |
656 | sensitive. This makes a big difference for user_max_ip ACL | |
657 | processing and similar. | |
cccac0a2 | 658 | |
66c583dc AJ |
659 | ENDIF |
660 | IF HAVE_AUTH_MODULE_DIGEST | |
661 | === Digest authentication parameters === | |
cccac0a2 | 662 | |
41bd17a4 | 663 | "nonce_garbage_interval" timeinterval |
66c583dc AJ |
664 | Specifies the interval that nonces that have been issued |
665 | to client_agent's are checked for validity. | |
cccac0a2 | 666 | |
41bd17a4 | 667 | "nonce_max_duration" timeinterval |
66c583dc AJ |
668 | Specifies the maximum length of time a given nonce will be |
669 | valid for. | |
cccac0a2 | 670 | |
41bd17a4 | 671 | "nonce_max_count" number |
66c583dc AJ |
672 | Specifies the maximum number of times a given nonce can be |
673 | used. | |
cccac0a2 | 674 | |
41bd17a4 | 675 | "nonce_strictness" on|off |
66c583dc AJ |
676 | Determines if squid requires strict increment-by-1 behavior |
677 | for nonce counts, or just incrementing (off - for use when | |
678 | user agents generate nonce counts that occasionally miss 1 | |
679 | (ie, 1,2,4,6)). Default off. | |
cccac0a2 | 680 | |
41bd17a4 | 681 | "check_nonce_count" on|off |
66c583dc AJ |
682 | This directive if set to off can disable the nonce count check |
683 | completely to work around buggy digest qop implementations in | |
684 | certain mainstream browser versions. Default on to check the | |
685 | nonce count to protect from authentication replay attacks. | |
cccac0a2 | 686 | |
41bd17a4 | 687 | "post_workaround" on|off |
66c583dc AJ |
688 | This is a workaround to certain buggy browsers who send an |
689 | incorrect request digest in POST requests when reusing the | |
690 | same nonce as acquired earlier on a GET request. | |
cccac0a2 | 691 | |
66c583dc | 692 | ENDIF |
527ee50d | 693 | |
66c583dc AJ |
694 | === Example Configuration === |
695 | ||
696 | This configuration displays the recommended authentication scheme | |
697 | order from most to least secure with recommended minimum configuration | |
698 | settings for each scheme: | |
e0855596 | 699 | |
41bd17a4 | 700 | #auth_param negotiate program <uncomment and complete this line to activate> |
48d54e4d | 701 | #auth_param negotiate children 20 startup=0 idle=1 |
e0855596 | 702 | # |
66c583dc | 703 | #auth_param digest program <uncomment and complete this line to activate> |
48d54e4d | 704 | #auth_param digest children 20 startup=0 idle=1 |
41bd17a4 | 705 | #auth_param digest realm Squid proxy-caching web server |
706 | #auth_param digest nonce_garbage_interval 5 minutes | |
707 | #auth_param digest nonce_max_duration 30 minutes | |
708 | #auth_param digest nonce_max_count 50 | |
e0855596 | 709 | # |
66c583dc AJ |
710 | #auth_param ntlm program <uncomment and complete this line to activate> |
711 | #auth_param ntlm children 20 startup=0 idle=1 | |
66c583dc | 712 | # |
41bd17a4 | 713 | #auth_param basic program <uncomment and complete this line> |
6f4d3ed6 | 714 | #auth_param basic children 5 startup=5 idle=1 |
41bd17a4 | 715 | #auth_param basic credentialsttl 2 hours |
41bd17a4 | 716 | DOC_END |
cccac0a2 | 717 | |
41bd17a4 | 718 | NAME: authenticate_cache_garbage_interval |
5db226c8 | 719 | IFDEF: USE_AUTH |
41bd17a4 | 720 | TYPE: time_t |
721 | DEFAULT: 1 hour | |
00ef8d82 | 722 | LOC: Auth::TheConfig.garbageCollectInterval |
41bd17a4 | 723 | DOC_START |
724 | The time period between garbage collection across the username cache. | |
4ded749e | 725 | This is a trade-off between memory utilization (long intervals - say |
41bd17a4 | 726 | 2 days) and CPU (short intervals - say 1 minute). Only change if you |
727 | have good reason to. | |
728 | DOC_END | |
cccac0a2 | 729 | |
41bd17a4 | 730 | NAME: authenticate_ttl |
5db226c8 | 731 | IFDEF: USE_AUTH |
41bd17a4 | 732 | TYPE: time_t |
733 | DEFAULT: 1 hour | |
00ef8d82 | 734 | LOC: Auth::TheConfig.credentialsTtl |
41bd17a4 | 735 | DOC_START |
736 | The time a user & their credentials stay in the logged in | |
737 | user cache since their last request. When the garbage | |
738 | interval passes, all user credentials that have passed their | |
739 | TTL are removed from memory. | |
740 | DOC_END | |
cccac0a2 | 741 | |
41bd17a4 | 742 | NAME: authenticate_ip_ttl |
5db226c8 | 743 | IFDEF: USE_AUTH |
41bd17a4 | 744 | TYPE: time_t |
00ef8d82 | 745 | LOC: Auth::TheConfig.ipTtl |
c35dd848 | 746 | DEFAULT: 1 second |
41bd17a4 | 747 | DOC_START |
748 | If you use proxy authentication and the 'max_user_ip' ACL, | |
749 | this directive controls how long Squid remembers the IP | |
750 | addresses associated with each user. Use a small value | |
751 | (e.g., 60 seconds) if your users might change addresses | |
4ded749e | 752 | quickly, as is the case with dialup. You might be safe |
41bd17a4 | 753 | using a larger value (e.g., 2 hours) in a corporate LAN |
754 | environment with relatively static address assignments. | |
755 | DOC_END | |
cccac0a2 | 756 | |
3d1e3e43 | 757 | COMMENT_START |
758 | ACCESS CONTROLS | |
759 | ----------------------------------------------------------------------------- | |
760 | COMMENT_END | |
761 | ||
41bd17a4 | 762 | NAME: external_acl_type |
763 | TYPE: externalAclHelper | |
764 | LOC: Config.externalAclHelperList | |
cccac0a2 | 765 | DEFAULT: none |
cccac0a2 | 766 | DOC_START |
41bd17a4 | 767 | This option defines external acl classes using a helper program |
768 | to look up the status | |
cccac0a2 | 769 | |
262eaf9a | 770 | external_acl_type name [options] FORMAT /path/to/helper [helper arguments] |
cccac0a2 | 771 | |
41bd17a4 | 772 | Options: |
cccac0a2 | 773 | |
41bd17a4 | 774 | ttl=n TTL in seconds for cached results (defaults to 3600 |
cd0fd8a9 | 775 | for 1 hour) |
4f8d0a65 | 776 | |
41bd17a4 | 777 | negative_ttl=n |
cd0fd8a9 AJ |
778 | TTL for cached negative lookups (default same |
779 | as ttl) | |
4f8d0a65 AJ |
780 | |
781 | grace=n Percentage remaining of TTL where a refresh of a | |
782 | cached entry should be initiated without needing to | |
783 | wait for a new reply. (default is for no grace period) | |
784 | ||
eef8bf2d AR |
785 | cache=n The maximum number of entries in the result cache. The |
786 | default limit is 262144 entries. Each cache entry usually | |
787 | consumes at least 256 bytes. Squid currently does not remove | |
788 | expired cache entries until the limit is reached, so a proxy | |
789 | will sooner or later reach the limit. The expanded FORMAT | |
790 | value is used as the cache key, so if the details in FORMAT | |
791 | are highly variable, a larger cache may be needed to produce | |
792 | reduction in helper load. | |
4f8d0a65 | 793 | |
48d54e4d AJ |
794 | children-max=n |
795 | Maximum number of acl helper processes spawned to service | |
2ccfb9a7 | 796 | external acl lookups of this type. (default 5) |
4f8d0a65 | 797 | |
48d54e4d AJ |
798 | children-startup=n |
799 | Minimum number of acl helper processes to spawn during | |
800 | startup and reconfigure to service external acl lookups | |
801 | of this type. (default 0) | |
4f8d0a65 | 802 | |
48d54e4d AJ |
803 | children-idle=n |
804 | Number of acl helper processes to keep ahead of traffic | |
805 | loads. Squid will spawn this many at once whenever load | |
806 | rises above the capabilities of existing processes. | |
807 | Up to the value of children-max. (default 1) | |
4f8d0a65 | 808 | |
41bd17a4 | 809 | concurrency=n concurrency level per process. Only used with helpers |
810 | capable of processing more than one query at a time. | |
4f8d0a65 | 811 | |
6825b101 CT |
812 | queue-size=N The queue-size= option sets the maximum number of queued |
813 | requests. If the queued requests exceed queue size | |
4f8d0a65 | 814 | the acl is ignored. |
6825b101 | 815 | The default value is set to 2*children-max. |
4f8d0a65 AJ |
816 | |
817 | protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers. | |
818 | ||
91e64de9 AJ |
819 | ipv4 / ipv6 IP protocol used to communicate with this helper. |
820 | The default is to auto-detect IPv6 and use it when available. | |
cccac0a2 | 821 | |
4f8d0a65 | 822 | |
cd0fd8a9 AJ |
823 | FORMAT is a series of %macro codes. See logformat directive for a full list |
824 | of the accepted codes. Although note that at the time of any external ACL | |
825 | being tested data may not be available and thus some %macro expand to '-'. | |
826 | ||
827 | In addition to the logformat codes; when processing external ACLs these | |
828 | additional macros are made available: | |
7b0ca1e8 | 829 | |
ec2d5242 | 830 | %ACL The name of the ACL being tested. |
ec2d5242 | 831 | |
0638f4a2 AJ |
832 | %DATA The ACL arguments specified in the referencing config |
833 | 'acl ... external' line, separated by spaces (an | |
834 | "argument string"). see acl external. | |
835 | ||
836 | If there are no ACL arguments %DATA expands to '-'. | |
837 | ||
838 | If you do not specify a DATA macro inside FORMAT, | |
839 | Squid automatically appends %DATA to your FORMAT. | |
cd0fd8a9 | 840 | |
262eaf9a CT |
841 | By default, Squid applies URL-encoding to each ACL |
842 | argument inside the argument string. If an explicit | |
843 | encoding modifier is used (e.g., %#DATA), then Squid | |
844 | encodes the whole argument string as a single token | |
845 | (e.g., with %#DATA, spaces between arguments become | |
846 | %20). | |
847 | ||
cd0fd8a9 AJ |
848 | If SSL is enabled, the following formating codes become available: |
849 | ||
850 | %USER_CERT SSL User certificate in PEM format | |
851 | %USER_CERTCHAIN SSL User certificate chain in PEM format | |
852 | %USER_CERT_xx SSL User certificate subject attribute xx | |
853 | %USER_CA_CERT_xx SSL User certificate issuer attribute xx | |
854 | ||
855 | ||
856 | NOTE: all other format codes accepted by older Squid versions | |
857 | are deprecated. | |
0db8942f | 858 | |
cccac0a2 | 859 | |
5269ec0e AJ |
860 | General request syntax: |
861 | ||
0638f4a2 | 862 | [channel-ID] FORMAT-values |
5269ec0e AJ |
863 | |
864 | ||
865 | FORMAT-values consists of transaction details expanded with | |
866 | whitespace separation per the config file FORMAT specification | |
867 | using the FORMAT macros listed above. | |
868 | ||
5269ec0e AJ |
869 | Request values sent to the helper are URL escaped to protect |
870 | each value in requests against whitespaces. | |
871 | ||
872 | If using protocol=2.5 then the request sent to the helper is not | |
873 | URL escaped to protect against whitespace. | |
874 | ||
875 | NOTE: protocol=3.0 is deprecated as no longer necessary. | |
876 | ||
877 | When using the concurrency= option the protocol is changed by | |
878 | introducing a query channel tag in front of the request/response. | |
879 | The query channel tag is a number between 0 and concurrency-1. | |
880 | This value must be echoed back unchanged to Squid as the first part | |
881 | of the response relating to its request. | |
882 | ||
883 | ||
884 | The helper receives lines expanded per the above format specification | |
885 | and for each input line returns 1 line starting with OK/ERR/BH result | |
886 | code and optionally followed by additional keywords with more details. | |
887 | ||
cccac0a2 | 888 | |
41bd17a4 | 889 | General result syntax: |
cccac0a2 | 890 | |
5269ec0e AJ |
891 | [channel-ID] result keyword=value ... |
892 | ||
893 | Result consists of one of the codes: | |
894 | ||
895 | OK | |
896 | the ACL test produced a match. | |
897 | ||
898 | ERR | |
899 | the ACL test does not produce a match. | |
900 | ||
901 | BH | |
4ded749e | 902 | An internal error occurred in the helper, preventing |
5269ec0e AJ |
903 | a result being identified. |
904 | ||
905 | The meaning of 'a match' is determined by your squid.conf | |
906 | access control configuration. See the Squid wiki for details. | |
cccac0a2 | 907 | |
41bd17a4 | 908 | Defined keywords: |
cccac0a2 | 909 | |
41bd17a4 | 910 | user= The users name (login) |
5269ec0e | 911 | |
41bd17a4 | 912 | password= The users password (for login= cache_peer option) |
5269ec0e | 913 | |
05e52854 | 914 | message= Message describing the reason for this response. |
5269ec0e AJ |
915 | Available as %o in error pages. |
916 | Useful on (ERR and BH results). | |
917 | ||
05e52854 AJ |
918 | tag= Apply a tag to a request. Only sets a tag once, |
919 | does not alter existing tags. | |
5269ec0e | 920 | |
41bd17a4 | 921 | log= String to be logged in access.log. Available as |
cd0fd8a9 | 922 | %ea in logformat specifications. |
934b03fc | 923 | |
cd0fd8a9 | 924 | clt_conn_tag= Associates a TAG with the client TCP connection. |
4f8d0a65 AJ |
925 | Please see url_rewrite_program related documentation |
926 | for this kv-pair. | |
457857fe | 927 | |
05e52854 | 928 | Any keywords may be sent on any response whether OK, ERR or BH. |
6a566b9c | 929 | |
05e52854 AJ |
930 | All response keyword values need to be a single token with URL |
931 | escaping, or enclosed in double quotes (") and escaped using \ on | |
24eac830 AJ |
932 | any double quotes or \ characters within the value. The wrapping |
933 | double quotes are removed before the value is interpreted by Squid. | |
934 | \r and \n are also replace by CR and LF. | |
1e5562e3 | 935 | |
24eac830 AJ |
936 | Some example key values: |
937 | ||
5269ec0e | 938 | user=John%20Smith |
24eac830 AJ |
939 | user="John Smith" |
940 | user="J. \"Bob\" Smith" | |
cccac0a2 | 941 | DOC_END |
942 | ||
41bd17a4 | 943 | NAME: acl |
944 | TYPE: acl | |
945 | LOC: Config.aclList | |
cb4f4424 | 946 | IF USE_OPENSSL |
cf1c09f6 CT |
947 | DEFAULT: ssl::certHasExpired ssl_error X509_V_ERR_CERT_HAS_EXPIRED |
948 | DEFAULT: ssl::certNotYetValid ssl_error X509_V_ERR_CERT_NOT_YET_VALID | |
949 | DEFAULT: ssl::certDomainMismatch ssl_error SQUID_X509_V_ERR_DOMAIN_MISMATCH | |
950 | 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 | |
951 | DEFAULT: ssl::certSelfSigned ssl_error X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT | |
952 | ENDIF | |
1f5bd0a4 | 953 | DEFAULT: all src all |
b8a25eaa AJ |
954 | DEFAULT: manager url_regex -i ^cache_object:// +i ^https?://[^/]+/squid-internal-mgr/ |
955 | DEFAULT: localhost src 127.0.0.1/32 ::1 | |
956 | DEFAULT: to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 | |
29503899 AJ |
957 | DEFAULT: acl CONNECT method CONNECT |
958 | DEFAULT_DOC: ACLs all, manager, localhost, to_localhost, and CONNECT are predefined. | |
cccac0a2 | 959 | DOC_START |
41bd17a4 | 960 | Defining an Access List |
cccac0a2 | 961 | |
375eeb3b AJ |
962 | Every access list definition must begin with an aclname and acltype, |
963 | followed by either type-specific arguments or a quoted filename that | |
964 | they are read from. | |
cccac0a2 | 965 | |
375eeb3b AJ |
966 | acl aclname acltype argument ... |
967 | acl aclname acltype "file" ... | |
cccac0a2 | 968 | |
375eeb3b | 969 | When using "file", the file should contain one item per line. |
cccac0a2 | 970 | |
76ee67ac CT |
971 | |
972 | ACL Options | |
973 | ||
974 | Some acl types supports options which changes their default behaviour: | |
0f987978 CT |
975 | |
976 | -i,+i By default, regular expressions are CASE-SENSITIVE. To make them | |
977 | case-insensitive, use the -i option. To return case-sensitive | |
978 | use the +i option between patterns, or make a new ACL line | |
979 | without -i. | |
980 | ||
981 | -n Disable lookups and address type conversions. If lookup or | |
982 | conversion is required because the parameter type (IP or | |
983 | domain name) does not match the message address type (domain | |
984 | name or IP), then the ACL would immediately declare a mismatch | |
985 | without any warnings or lookups. | |
986 | ||
76ee67ac CT |
987 | -m[=delimiters] |
988 | Perform a list membership test, interpreting values as | |
989 | comma-separated token lists and matching against individual | |
990 | tokens instead of whole values. | |
991 | The optional "delimiters" parameter specifies one or more | |
992 | alternative non-alphanumeric delimiter characters. | |
993 | non-alphanumeric delimiter characters. | |
994 | ||
0f987978 CT |
995 | -- Used to stop processing all options, in the case the first acl |
996 | value has '-' character as first character (for example the '-' | |
997 | is a valid domain name) | |
cccac0a2 | 998 | |
b3567eb5 FC |
999 | Some acl types require suspending the current request in order |
1000 | to access some external data source. | |
1001 | Those which do are marked with the tag [slow], those which | |
1002 | don't are marked as [fast]. | |
1003 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl | |
1004 | for further information | |
e988aa40 AJ |
1005 | |
1006 | ***** ACL TYPES AVAILABLE ***** | |
1007 | ||
1e40905d AJ |
1008 | acl aclname src ip-address/mask ... # clients IP address [fast] |
1009 | acl aclname src addr1-addr2/mask ... # range of addresses [fast] | |
0f987978 | 1010 | acl aclname dst [-n] ip-address/mask ... # URL host's IP address [slow] |
1e40905d | 1011 | acl aclname localip ip-address/mask ... # IP address the client connected to [fast] |
cccac0a2 | 1012 | |
41bd17a4 | 1013 | acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation) |
b3567eb5 | 1014 | # [fast] |
abe01913 AJ |
1015 | # The 'arp' ACL code is not portable to all operating systems. |
1016 | # It works on Linux, Solaris, Windows, FreeBSD, and some other | |
1017 | # BSD variants. | |
41bd17a4 | 1018 | # |
abe01913 AJ |
1019 | # NOTE: Squid can only determine the MAC/EUI address for IPv4 |
1020 | # clients that are on the same subnet. If the client is on a | |
1021 | # different subnet, then Squid cannot find out its address. | |
1022 | # | |
1023 | # NOTE 2: IPv6 protocol does not contain ARP. MAC/EUI is either | |
1024 | # encoded directly in the IPv6 address or not available. | |
b3567eb5 FC |
1025 | |
1026 | acl aclname srcdomain .foo.com ... | |
1027 | # reverse lookup, from client IP [slow] | |
0f987978 | 1028 | acl aclname dstdomain [-n] .foo.com ... |
e38c7724 | 1029 | # Destination server from URL [fast] |
b3567eb5 FC |
1030 | acl aclname srcdom_regex [-i] \.foo\.com ... |
1031 | # regex matching client name [slow] | |
0f987978 | 1032 | acl aclname dstdom_regex [-n] [-i] \.foo\.com ... |
e38c7724 | 1033 | # regex matching server [fast] |
b3567eb5 | 1034 | # |
41bd17a4 | 1035 | # For dstdomain and dstdom_regex a reverse lookup is tried if a IP |
1036 | # based URL is used and no match is found. The name "none" is used | |
1037 | # if the reverse lookup fails. | |
9bc73deb | 1038 | |
375eeb3b AJ |
1039 | acl aclname src_as number ... |
1040 | acl aclname dst_as number ... | |
b3567eb5 | 1041 | # [fast] |
e988aa40 AJ |
1042 | # Except for access control, AS numbers can be used for |
1043 | # routing of requests to specific caches. Here's an | |
1044 | # example for routing all requests for AS#1241 and only | |
1045 | # those to mycache.mydomain.net: | |
1046 | # acl asexample dst_as 1241 | |
1047 | # cache_peer_access mycache.mydomain.net allow asexample | |
1048 | # cache_peer_access mycache_mydomain.net deny all | |
7f7db318 | 1049 | |
6db78a1a | 1050 | acl aclname peername myPeer ... |
b3567eb5 | 1051 | # [fast] |
6db78a1a AJ |
1052 | # match against a named cache_peer entry |
1053 | # set unique name= on cache_peer lines for reliable use. | |
1054 | ||
375eeb3b | 1055 | acl aclname time [day-abbrevs] [h1:m1-h2:m2] |
b3567eb5 | 1056 | # [fast] |
375eeb3b AJ |
1057 | # day-abbrevs: |
1058 | # S - Sunday | |
1059 | # M - Monday | |
1060 | # T - Tuesday | |
1061 | # W - Wednesday | |
1062 | # H - Thursday | |
1063 | # F - Friday | |
1064 | # A - Saturday | |
1065 | # h1:m1 must be less than h2:m2 | |
1066 | ||
b3567eb5 FC |
1067 | acl aclname url_regex [-i] ^http:// ... |
1068 | # regex matching on whole URL [fast] | |
9d35fe37 AJ |
1069 | acl aclname urllogin [-i] [^a-zA-Z0-9] ... |
1070 | # regex matching on URL login field | |
b3567eb5 FC |
1071 | acl aclname urlpath_regex [-i] \.gif$ ... |
1072 | # regex matching on URL path [fast] | |
e988aa40 | 1073 | |
b3567eb5 FC |
1074 | acl aclname port 80 70 21 0-1024... # destination TCP port [fast] |
1075 | # ranges are alloed | |
1e40905d AJ |
1076 | acl aclname localport 3128 ... # TCP port the client connected to [fast] |
1077 | # NP: for interception mode this is usually '80' | |
1078 | ||
3cc0f4e7 | 1079 | acl aclname myportname 3128 ... # *_port name [fast] |
e988aa40 | 1080 | |
b3567eb5 FC |
1081 | acl aclname proto HTTP FTP ... # request protocol [fast] |
1082 | ||
1083 | acl aclname method GET POST ... # HTTP request method [fast] | |
e988aa40 | 1084 | |
b3567eb5 FC |
1085 | acl aclname http_status 200 301 500- 400-403 ... |
1086 | # status code in reply [fast] | |
e988aa40 | 1087 | |
375eeb3b | 1088 | acl aclname browser [-i] regexp ... |
b3567eb5 | 1089 | # pattern match on User-Agent header (see also req_header below) [fast] |
e988aa40 | 1090 | |
375eeb3b | 1091 | acl aclname referer_regex [-i] regexp ... |
b3567eb5 | 1092 | # pattern match on Referer header [fast] |
41bd17a4 | 1093 | # Referer is highly unreliable, so use with care |
e988aa40 | 1094 | |
375eeb3b | 1095 | acl aclname ident username ... |
41bd17a4 | 1096 | acl aclname ident_regex [-i] pattern ... |
b3567eb5 | 1097 | # string match on ident output [slow] |
41bd17a4 | 1098 | # use REQUIRED to accept any non-null ident. |
cf5cc17e | 1099 | |
41bd17a4 | 1100 | acl aclname proxy_auth [-i] username ... |
1101 | acl aclname proxy_auth_regex [-i] pattern ... | |
b3567eb5 FC |
1102 | # perform http authentication challenge to the client and match against |
1103 | # supplied credentials [slow] | |
1104 | # | |
1105 | # takes a list of allowed usernames. | |
41bd17a4 | 1106 | # use REQUIRED to accept any valid username. |
1107 | # | |
b3567eb5 FC |
1108 | # Will use proxy authentication in forward-proxy scenarios, and plain |
1109 | # http authenticaiton in reverse-proxy scenarios | |
1110 | # | |
41bd17a4 | 1111 | # NOTE: when a Proxy-Authentication header is sent but it is not |
1112 | # needed during ACL checking the username is NOT logged | |
1113 | # in access.log. | |
1114 | # | |
1115 | # NOTE: proxy_auth requires a EXTERNAL authentication program | |
1116 | # to check username/password combinations (see | |
1117 | # auth_param directive). | |
1118 | # | |
e988aa40 AJ |
1119 | # NOTE: proxy_auth can't be used in a transparent/intercepting proxy |
1120 | # as the browser needs to be configured for using a proxy in order | |
41bd17a4 | 1121 | # to respond to proxy authentication. |
8e8d4f30 | 1122 | |
41bd17a4 | 1123 | acl aclname snmp_community string ... |
b3567eb5 | 1124 | # A community string to limit access to your SNMP Agent [fast] |
41bd17a4 | 1125 | # Example: |
1126 | # | |
1127 | # acl snmppublic snmp_community public | |
934b03fc | 1128 | |
41bd17a4 | 1129 | acl aclname maxconn number |
1130 | # This will be matched when the client's IP address has | |
55d0fae8 AJ |
1131 | # more than <number> TCP connections established. [fast] |
1132 | # NOTE: This only measures direct TCP links so X-Forwarded-For | |
1133 | # indirect clients are not counted. | |
1e5562e3 | 1134 | |
41bd17a4 | 1135 | acl aclname max_user_ip [-s] number |
1136 | # This will be matched when the user attempts to log in from more | |
1137 | # than <number> different ip addresses. The authenticate_ip_ttl | |
b3567eb5 | 1138 | # parameter controls the timeout on the ip entries. [fast] |
41bd17a4 | 1139 | # If -s is specified the limit is strict, denying browsing |
1140 | # from any further IP addresses until the ttl has expired. Without | |
1141 | # -s Squid will just annoy the user by "randomly" denying requests. | |
1142 | # (the counter is reset each time the limit is reached and a | |
1143 | # request is denied) | |
1144 | # NOTE: in acceleration mode or where there is mesh of child proxies, | |
1145 | # clients may appear to come from multiple addresses if they are | |
1146 | # going through proxy farms, so a limit of 1 may cause user problems. | |
cccac0a2 | 1147 | |
cb1b906f AJ |
1148 | acl aclname random probability |
1149 | # Pseudo-randomly match requests. Based on the probability given. | |
1150 | # Probability may be written as a decimal (0.333), fraction (1/3) | |
1151 | # or ratio of matches:non-matches (3:5). | |
1152 | ||
375eeb3b | 1153 | acl aclname req_mime_type [-i] mime-type ... |
41bd17a4 | 1154 | # regex match against the mime type of the request generated |
1155 | # by the client. Can be used to detect file upload or some | |
b3567eb5 | 1156 | # types HTTP tunneling requests [fast] |
41bd17a4 | 1157 | # NOTE: This does NOT match the reply. You cannot use this |
1158 | # to match the returned file type. | |
cccac0a2 | 1159 | |
41bd17a4 | 1160 | acl aclname req_header header-name [-i] any\.regex\.here |
1161 | # regex match against any of the known request headers. May be | |
1162 | # thought of as a superset of "browser", "referer" and "mime-type" | |
b3567eb5 | 1163 | # ACL [fast] |
cccac0a2 | 1164 | |
375eeb3b | 1165 | acl aclname rep_mime_type [-i] mime-type ... |
41bd17a4 | 1166 | # regex match against the mime type of the reply received by |
1167 | # squid. Can be used to detect file download or some | |
b3567eb5 | 1168 | # types HTTP tunneling requests. [fast] |
41bd17a4 | 1169 | # NOTE: This has no effect in http_access rules. It only has |
1170 | # effect in rules that affect the reply data stream such as | |
1171 | # http_reply_access. | |
cccac0a2 | 1172 | |
41bd17a4 | 1173 | acl aclname rep_header header-name [-i] any\.regex\.here |
1174 | # regex match against any of the known reply headers. May be | |
1175 | # thought of as a superset of "browser", "referer" and "mime-type" | |
b3567eb5 | 1176 | # ACLs [fast] |
cccac0a2 | 1177 | |
375eeb3b | 1178 | acl aclname external class_name [arguments...] |
41bd17a4 | 1179 | # external ACL lookup via a helper class defined by the |
b3567eb5 | 1180 | # external_acl_type directive [slow] |
cccac0a2 | 1181 | |
41bd17a4 | 1182 | acl aclname user_cert attribute values... |
1183 | # match against attributes in a user SSL certificate | |
2927ae41 | 1184 | # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast] |
cccac0a2 | 1185 | |
41bd17a4 | 1186 | acl aclname ca_cert attribute values... |
1187 | # match against attributes a users issuing CA SSL certificate | |
2927ae41 | 1188 | # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast] |
cccac0a2 | 1189 | |
41bd17a4 | 1190 | acl aclname ext_user username ... |
1191 | acl aclname ext_user_regex [-i] pattern ... | |
b3567eb5 | 1192 | # string match on username returned by external acl helper [slow] |
41bd17a4 | 1193 | # use REQUIRED to accept any non-null user name. |
b3567eb5 | 1194 | |
0ab50441 | 1195 | acl aclname tag tagvalue ... |
94da12c8 AJ |
1196 | # string match on tag returned by external acl helper [fast] |
1197 | # DEPRECATED. Only the first tag will match with this ACL. | |
1198 | # Use the 'note' ACL instead for handling multiple tag values. | |
cccac0a2 | 1199 | |
bbaf2685 AJ |
1200 | acl aclname hier_code codename ... |
1201 | # string match against squid hierarchy code(s); [fast] | |
1202 | # e.g., DIRECT, PARENT_HIT, NONE, etc. | |
1203 | # | |
1204 | # NOTE: This has no effect in http_access rules. It only has | |
1205 | # effect in rules that affect the reply data stream such as | |
1206 | # http_reply_access. | |
1207 | ||
76ee67ac | 1208 | acl aclname note [-m[=delimiters]] name [value ...] |
39baccc8 CT |
1209 | # match transaction annotation [fast] |
1210 | # Without values, matches any annotation with a given name. | |
1211 | # With value(s), matches any annotation with a given name that | |
1212 | # also has one of the given values. | |
76ee67ac CT |
1213 | # If the -m flag is used, then the value of the named |
1214 | # annotation is interpreted as a list of tokens, and the ACL | |
1215 | # matches individual name=token pairs rather than whole | |
1216 | # name=value pairs. See "ACL Options" above for more info. | |
39baccc8 CT |
1217 | # Annotation sources include note and adaptation_meta directives |
1218 | # as well as helper and eCAP responses. | |
1219 | ||
c302ddb5 CT |
1220 | acl aclname adaptation_service service ... |
1221 | # Matches the name of any icap_service, ecap_service, | |
1222 | # adaptation_service_set, or adaptation_service_chain that Squid | |
1223 | # has used (or attempted to use) for the master transaction. | |
1224 | # This ACL must be defined after the corresponding adaptation | |
1225 | # service is named in squid.conf. This ACL is usable with | |
1226 | # adaptation_meta because it starts matching immediately after | |
1227 | # the service has been selected for adaptation. | |
1228 | ||
cb4f4424 | 1229 | IF USE_OPENSSL |
cf1c09f6 CT |
1230 | acl aclname ssl_error errorname |
1231 | # match against SSL certificate validation error [fast] | |
cf1c09f6 | 1232 | # |
7a957a93 AR |
1233 | # For valid error names see in @DEFAULT_ERROR_DIR@/templates/error-details.txt |
1234 | # template file. | |
cf1c09f6 | 1235 | # |
7a957a93 AR |
1236 | # The following can be used as shortcuts for certificate properties: |
1237 | # [ssl::]certHasExpired: the "not after" field is in the past | |
1238 | # [ssl::]certNotYetValid: the "not before" field is in the future | |
1239 | # [ssl::]certUntrusted: The certificate issuer is not to be trusted. | |
1240 | # [ssl::]certSelfSigned: The certificate is self signed. | |
1241 | # [ssl::]certDomainMismatch: The certificate CN domain does not | |
1242 | # match the name the name of the host we are connecting to. | |
1243 | # | |
1244 | # The ssl::certHasExpired, ssl::certNotYetValid, ssl::certDomainMismatch, | |
1245 | # ssl::certUntrusted, and ssl::certSelfSigned can also be used as | |
1246 | # predefined ACLs, just like the 'all' ACL. | |
1247 | # | |
1248 | # NOTE: The ssl_error ACL is only supported with sslproxy_cert_error, | |
1249 | # sslproxy_cert_sign, and sslproxy_cert_adapt options. | |
00352183 | 1250 | |
72b12f9e | 1251 | acl aclname server_cert_fingerprint [-sha1] fingerprint |
00352183 AR |
1252 | # match against server SSL certificate fingerprint [fast] |
1253 | # | |
1254 | # The fingerprint is the digest of the DER encoded version | |
1255 | # of the whole certificate. The user should use the form: XX:XX:... | |
1256 | # Optional argument specifies the digest algorithm to use. | |
1257 | # The SHA1 digest algorithm is the default and is currently | |
1258 | # the only algorithm supported (-sha1). | |
5d65362c | 1259 | |
652fcffd | 1260 | acl aclname at_step step |
8f165829 AR |
1261 | # match against the current step during ssl_bump evaluation [fast] |
1262 | # Never matches and should not be used outside the ssl_bump context. | |
1263 | # | |
1264 | # At each SslBump step, Squid evaluates ssl_bump directives to find | |
1265 | # the next bumping action (e.g., peek or splice). Valid SslBump step | |
1266 | # values and the corresponding ssl_bump evaluation moments are: | |
1110989a CT |
1267 | # SslBump1: After getting TCP-level and HTTP CONNECT info. |
1268 | # SslBump2: After getting SSL Client Hello info. | |
1269 | # SslBump3: After getting SSL Server Hello info. | |
69f69080 CT |
1270 | |
1271 | acl aclname ssl::server_name .foo.com ... | |
1272 | # matches server name obtained from various sources [fast] | |
1273 | # | |
1274 | # The server name is obtained during Ssl-Bump steps from such sources | |
1275 | # as CONNECT request URI, client SNI, and SSL server certificate CN. | |
1276 | # During each Ssl-Bump step, Squid may improve its understanding of a | |
1277 | # "true server name". Unlike dstdomain, this ACL does not perform | |
1278 | # DNS lookups. | |
8d9e6d7f CT |
1279 | # The "none" name can be used to match transactions where Squid |
1280 | # could not compute the server name using any information source | |
1281 | # already available at the ACL evaluation time. | |
69f69080 CT |
1282 | |
1283 | acl aclname ssl::server_name_regex [-i] \.foo\.com ... | |
1284 | # regex matches server name obtained from various sources [fast] | |
88df846b CT |
1285 | |
1286 | acl aclname connections_encrypted | |
1287 | # matches transactions with all HTTP messages received over TLS | |
1288 | # transport connections. [fast] | |
1289 | # | |
1290 | # The master transaction deals with HTTP messages received from | |
1291 | # various sources. All sources used by the master transaction in the | |
1292 | # past are considered by the ACL. The following rules define whether | |
1293 | # a given message source taints the entire master transaction, | |
1294 | # resulting in ACL mismatches: | |
1295 | # | |
1296 | # * The HTTP client transport connection is not TLS. | |
1297 | # * An adaptation service connection-encryption flag is off. | |
1298 | # * The peer or origin server transport connection is not TLS. | |
1299 | # | |
1300 | # Caching currently does not affect these rules. This cache ignorance | |
1301 | # implies that only the current HTTP client transport and REQMOD | |
1302 | # services status determine whether this ACL matches a from-cache | |
1303 | # transaction. The source of the cached response does not have any | |
1304 | # effect on future transaction that use the cached response without | |
1305 | # revalidation. This may change. | |
1306 | # | |
1307 | # DNS, ICP, and HTCP exchanges during the master transaction do not | |
1308 | # affect these rules. | |
cf1c09f6 | 1309 | ENDIF |
6f58d7d7 AR |
1310 | acl aclname any-of acl1 acl2 ... |
1311 | # match any one of the acls [fast or slow] | |
1312 | # The first matching ACL stops further ACL evaluation. | |
1313 | # | |
1314 | # ACLs from multiple any-of lines with the same name are ORed. | |
1315 | # For example, A = (a1 or a2) or (a3 or a4) can be written as | |
1316 | # acl A any-of a1 a2 | |
1317 | # acl A any-of a3 a4 | |
1318 | # | |
1319 | # This group ACL is fast if all evaluated ACLs in the group are fast | |
1320 | # and slow otherwise. | |
1321 | ||
1322 | acl aclname all-of acl1 acl2 ... | |
1323 | # match all of the acls [fast or slow] | |
1324 | # The first mismatching ACL stops further ACL evaluation. | |
1325 | # | |
1326 | # ACLs from multiple all-of lines with the same name are ORed. | |
1327 | # For example, B = (b1 and b2) or (b3 and b4) can be written as | |
1328 | # acl B all-of b1 b2 | |
1329 | # acl B all-of b3 b4 | |
1330 | # | |
1331 | # This group ACL is fast if all evaluated ACLs in the group are fast | |
1332 | # and slow otherwise. | |
cf1c09f6 | 1333 | |
e0855596 AJ |
1334 | Examples: |
1335 | acl macaddress arp 09:00:2b:23:45:67 | |
1336 | acl myexample dst_as 1241 | |
1337 | acl password proxy_auth REQUIRED | |
1338 | acl fileupload req_mime_type -i ^multipart/form-data$ | |
1339 | acl javascript rep_mime_type -i ^application/x-javascript$ | |
cccac0a2 | 1340 | |
41bd17a4 | 1341 | NOCOMMENT_START |
e0855596 AJ |
1342 | # |
1343 | # Recommended minimum configuration: | |
1344 | # | |
e0855596 | 1345 | |
ee776778 | 1346 | # Example rule allowing access from your local networks. |
1347 | # Adapt to list your (internal) IP networks from where browsing | |
1348 | # should be allowed | |
fe204e1d AJ |
1349 | acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN) |
1350 | acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN) | |
1351 | acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN) | |
1352 | acl localhet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines | |
1353 | acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN) | |
1354 | acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN) | |
1355 | acl localnet src fc00::/7 # RFC 4193 local private network range | |
1356 | acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines | |
e0855596 | 1357 | |
41bd17a4 | 1358 | acl SSL_ports port 443 |
1359 | acl Safe_ports port 80 # http | |
1360 | acl Safe_ports port 21 # ftp | |
1361 | acl Safe_ports port 443 # https | |
1362 | acl Safe_ports port 70 # gopher | |
1363 | acl Safe_ports port 210 # wais | |
1364 | acl Safe_ports port 1025-65535 # unregistered ports | |
1365 | acl Safe_ports port 280 # http-mgmt | |
1366 | acl Safe_ports port 488 # gss-http | |
1367 | acl Safe_ports port 591 # filemaker | |
1368 | acl Safe_ports port 777 # multiling http | |
41bd17a4 | 1369 | NOCOMMENT_END |
1370 | DOC_END | |
cccac0a2 | 1371 | |
d3d92daa | 1372 | NAME: proxy_protocol_access |
3d674977 | 1373 | TYPE: acl_access |
d3d92daa AJ |
1374 | LOC: Config.accessList.proxyProtocol |
1375 | DEFAULT: none | |
c390580b | 1376 | DEFAULT_DOC: all TCP connections to ports with require-proxy-header will be denied |
d3d92daa AJ |
1377 | DOC_START |
1378 | Determine which client proxies can be trusted to provide correct | |
1379 | information regarding real client IP address using PROXY protocol. | |
1380 | ||
1381 | Requests may pass through a chain of several other proxies | |
1382 | before reaching us. The original source details may by sent in: | |
1383 | * HTTP message Forwarded header, or | |
1384 | * HTTP message X-Forwarded-For header, or | |
1385 | * PROXY protocol connection header. | |
1386 | ||
1387 | This directive is solely for validating new PROXY protocol | |
1388 | connections received from a port flagged with require-proxy-header. | |
1389 | It is checked only once after TCP connection setup. | |
1390 | ||
1391 | A deny match results in TCP connection closure. | |
1392 | ||
1393 | An allow match is required for Squid to permit the corresponding | |
1394 | TCP connection, before Squid even looks for HTTP request headers. | |
1395 | If there is an allow match, Squid starts using PROXY header information | |
1396 | to determine the source address of the connection for all future ACL | |
1397 | checks, logging, etc. | |
1398 | ||
1399 | SECURITY CONSIDERATIONS: | |
1400 | ||
c390580b | 1401 | Any host from which we accept client IP details can place |
d3d92daa AJ |
1402 | incorrect information in the relevant header, and Squid |
1403 | will use the incorrect information as if it were the | |
1404 | source address of the request. This may enable remote | |
1405 | hosts to bypass any access control restrictions that are | |
1406 | based on the client's source addresses. | |
1407 | ||
1408 | This clause only supports fast acl types. | |
1409 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
1410 | DOC_END | |
1411 | ||
1412 | NAME: follow_x_forwarded_for | |
1413 | TYPE: acl_access | |
1414 | IFDEF: FOLLOW_X_FORWARDED_FOR | |
3d674977 | 1415 | LOC: Config.accessList.followXFF |
3d674977 | 1416 | DEFAULT_IF_NONE: deny all |
9353df52 | 1417 | DEFAULT_DOC: X-Forwarded-For header will be ignored. |
3d674977 | 1418 | DOC_START |
00d0ce87 AJ |
1419 | Determine which client proxies can be trusted to provide correct |
1420 | information regarding real client IP address. | |
1421 | ||
3d674977 | 1422 | Requests may pass through a chain of several other proxies |
70a16fea AJ |
1423 | before reaching us. The original source details may by sent in: |
1424 | * HTTP message Forwarded header, or | |
1425 | * HTTP message X-Forwarded-For header, or | |
1426 | * PROXY protocol connection header. | |
3d674977 | 1427 | |
d3d92daa AJ |
1428 | PROXY protocol connections are controlled by the proxy_protocol_access |
1429 | directive which is checked before this. | |
1430 | ||
3d674977 | 1431 | If a request reaches us from a source that is allowed by this |
70a16fea AJ |
1432 | directive, then we trust the information it provides regarding |
1433 | the IP of the client it received from (if any). | |
1434 | ||
1435 | For the purpose of ACLs used in this directive the src ACL type always | |
1436 | matches the address we are testing and srcdomain matches its rDNS. | |
1437 | ||
70a16fea AJ |
1438 | On each HTTP request Squid checks for X-Forwarded-For header fields. |
1439 | If found the header values are iterated in reverse order and an allow | |
1440 | match is required for Squid to continue on to the next value. | |
1441 | The verification ends when a value receives a deny match, cannot be | |
1442 | tested, or there are no more values to test. | |
1443 | NOTE: Squid does not yet follow the Forwarded HTTP header. | |
3d674977 AJ |
1444 | |
1445 | The end result of this process is an IP address that we will | |
1446 | refer to as the indirect client address. This address may | |
57d76dd4 | 1447 | be treated as the client address for access control, ICAP, delay |
3d674977 | 1448 | pools and logging, depending on the acl_uses_indirect_client, |
96d64448 AJ |
1449 | icap_uses_indirect_client, delay_pool_uses_indirect_client, |
1450 | log_uses_indirect_client and tproxy_uses_indirect_client options. | |
3d674977 | 1451 | |
b3567eb5 FC |
1452 | This clause only supports fast acl types. |
1453 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
1454 | ||
3d674977 AJ |
1455 | SECURITY CONSIDERATIONS: |
1456 | ||
c390580b | 1457 | Any host from which we accept client IP details can place |
70a16fea | 1458 | incorrect information in the relevant header, and Squid |
3d674977 AJ |
1459 | will use the incorrect information as if it were the |
1460 | source address of the request. This may enable remote | |
1461 | hosts to bypass any access control restrictions that are | |
1462 | based on the client's source addresses. | |
1463 | ||
1464 | For example: | |
1465 | ||
1466 | acl localhost src 127.0.0.1 | |
1467 | acl my_other_proxy srcdomain .proxy.example.com | |
1468 | follow_x_forwarded_for allow localhost | |
1469 | follow_x_forwarded_for allow my_other_proxy | |
1470 | DOC_END | |
1471 | ||
1472 | NAME: acl_uses_indirect_client | |
1473 | COMMENT: on|off | |
1474 | TYPE: onoff | |
1475 | IFDEF: FOLLOW_X_FORWARDED_FOR | |
1476 | DEFAULT: on | |
1477 | LOC: Config.onoff.acl_uses_indirect_client | |
1478 | DOC_START | |
1479 | Controls whether the indirect client address | |
1480 | (see follow_x_forwarded_for) is used instead of the | |
1481 | direct client address in acl matching. | |
55d0fae8 AJ |
1482 | |
1483 | NOTE: maxconn ACL considers direct TCP links and indirect | |
1484 | clients will always have zero. So no match. | |
3d674977 AJ |
1485 | DOC_END |
1486 | ||
1487 | NAME: delay_pool_uses_indirect_client | |
1488 | COMMENT: on|off | |
1489 | TYPE: onoff | |
9a0a18de | 1490 | IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_DELAY_POOLS |
3d674977 AJ |
1491 | DEFAULT: on |
1492 | LOC: Config.onoff.delay_pool_uses_indirect_client | |
1493 | DOC_START | |
1494 | Controls whether the indirect client address | |
1495 | (see follow_x_forwarded_for) is used instead of the | |
1496 | direct client address in delay pools. | |
1497 | DOC_END | |
1498 | ||
1499 | NAME: log_uses_indirect_client | |
1500 | COMMENT: on|off | |
1501 | TYPE: onoff | |
1502 | IFDEF: FOLLOW_X_FORWARDED_FOR | |
1503 | DEFAULT: on | |
1504 | LOC: Config.onoff.log_uses_indirect_client | |
1505 | DOC_START | |
1506 | Controls whether the indirect client address | |
1507 | (see follow_x_forwarded_for) is used instead of the | |
1508 | direct client address in the access log. | |
1509 | DOC_END | |
1510 | ||
96d64448 AJ |
1511 | NAME: tproxy_uses_indirect_client |
1512 | COMMENT: on|off | |
1513 | TYPE: onoff | |
1514 | IFDEF: FOLLOW_X_FORWARDED_FOR&&LINUX_NETFILTER | |
4d7ab5a2 | 1515 | DEFAULT: off |
96d64448 AJ |
1516 | LOC: Config.onoff.tproxy_uses_indirect_client |
1517 | DOC_START | |
1518 | Controls whether the indirect client address | |
1519 | (see follow_x_forwarded_for) is used instead of the | |
1520 | direct client address when spoofing the outgoing client. | |
4d7ab5a2 AJ |
1521 | |
1522 | This has no effect on requests arriving in non-tproxy | |
1523 | mode ports. | |
1524 | ||
1525 | SECURITY WARNING: Usage of this option is dangerous | |
1526 | and should not be used trivially. Correct configuration | |
16ae256c | 1527 | of follow_x_forwarded_for with a limited set of trusted |
4d7ab5a2 | 1528 | sources is required to prevent abuse of your proxy. |
96d64448 AJ |
1529 | DOC_END |
1530 | ||
0d901ef4 SH |
1531 | NAME: spoof_client_ip |
1532 | TYPE: acl_access | |
1533 | LOC: Config.accessList.spoof_client_ip | |
1534 | DEFAULT: none | |
1535 | DEFAULT_DOC: Allow spoofing on all TPROXY traffic. | |
1536 | DOC_START | |
1537 | Control client IP address spoofing of TPROXY traffic based on | |
1538 | defined access lists. | |
1539 | ||
1540 | spoof_client_ip allow|deny [!]aclname ... | |
1541 | ||
1542 | If there are no "spoof_client_ip" lines present, the default | |
1543 | is to "allow" spoofing of any suitable request. | |
1544 | ||
1545 | Note that the cache_peer "no-tproxy" option overrides this ACL. | |
1546 | ||
1547 | This clause supports fast acl types. | |
1548 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
1549 | DOC_END | |
1550 | ||
41bd17a4 | 1551 | NAME: http_access |
1552 | TYPE: acl_access | |
1553 | LOC: Config.accessList.http | |
41bd17a4 | 1554 | DEFAULT_IF_NONE: deny all |
638402dd | 1555 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. |
41bd17a4 | 1556 | DOC_START |
1557 | Allowing or Denying access based on defined access lists | |
cccac0a2 | 1558 | |
8a2f40dd | 1559 | To allow or deny a message received on an HTTP, HTTPS, or FTP port: |
41bd17a4 | 1560 | http_access allow|deny [!]aclname ... |
cccac0a2 | 1561 | |
41bd17a4 | 1562 | NOTE on default values: |
cccac0a2 | 1563 | |
41bd17a4 | 1564 | If there are no "access" lines present, the default is to deny |
1565 | the request. | |
cccac0a2 | 1566 | |
41bd17a4 | 1567 | If none of the "access" lines cause a match, the default is the |
1568 | opposite of the last line in the list. If the last line was | |
1569 | deny, the default is allow. Conversely, if the last line | |
1570 | is allow, the default will be deny. For these reasons, it is a | |
51ae86b2 HN |
1571 | good idea to have an "deny all" entry at the end of your access |
1572 | lists to avoid potential confusion. | |
cccac0a2 | 1573 | |
b3567eb5 FC |
1574 | This clause supports both fast and slow acl types. |
1575 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
1576 | ||
41bd17a4 | 1577 | NOCOMMENT_START |
e0855596 AJ |
1578 | |
1579 | # | |
1580 | # Recommended minimum Access Permission configuration: | |
41bd17a4 | 1581 | # |
e0855596 | 1582 | # Deny requests to certain unsafe ports |
41bd17a4 | 1583 | http_access deny !Safe_ports |
e0855596 AJ |
1584 | |
1585 | # Deny CONNECT to other than secure SSL ports | |
41bd17a4 | 1586 | http_access deny CONNECT !SSL_ports |
e0855596 | 1587 | |
baa3ea7e AJ |
1588 | # Only allow cachemgr access from localhost |
1589 | http_access allow localhost manager | |
1590 | http_access deny manager | |
1591 | ||
41bd17a4 | 1592 | # We strongly recommend the following be uncommented to protect innocent |
1593 | # web applications running on the proxy server who think the only | |
1594 | # one who can access services on "localhost" is a local user | |
1595 | #http_access deny to_localhost | |
e0855596 | 1596 | |
41bd17a4 | 1597 | # |
1598 | # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS | |
e0855596 | 1599 | # |
c8f4eac4 | 1600 | |
ee776778 | 1601 | # Example rule allowing access from your local networks. |
1602 | # Adapt localnet in the ACL section to list your (internal) IP networks | |
1603 | # from where browsing should be allowed | |
1604 | http_access allow localnet | |
afb33856 | 1605 | http_access allow localhost |
7d90757b | 1606 | |
41bd17a4 | 1607 | # And finally deny all other access to this proxy |
1608 | http_access deny all | |
1609 | NOCOMMENT_END | |
1610 | DOC_END | |
7d90757b | 1611 | |
533493da AJ |
1612 | NAME: adapted_http_access http_access2 |
1613 | TYPE: acl_access | |
1614 | LOC: Config.accessList.adapted_http | |
1615 | DEFAULT: none | |
638402dd | 1616 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
533493da AJ |
1617 | DOC_START |
1618 | Allowing or Denying access based on defined access lists | |
1619 | ||
1620 | Essentially identical to http_access, but runs after redirectors | |
1621 | and ICAP/eCAP adaptation. Allowing access control based on their | |
1622 | output. | |
1623 | ||
1624 | If not set then only http_access is used. | |
1625 | DOC_END | |
1626 | ||
41bd17a4 | 1627 | NAME: http_reply_access |
1628 | TYPE: acl_access | |
1629 | LOC: Config.accessList.reply | |
1630 | DEFAULT: none | |
638402dd | 1631 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
41bd17a4 | 1632 | DOC_START |
1633 | Allow replies to client requests. This is complementary to http_access. | |
cccac0a2 | 1634 | |
41bd17a4 | 1635 | http_reply_access allow|deny [!] aclname ... |
cccac0a2 | 1636 | |
41bd17a4 | 1637 | NOTE: if there are no access lines present, the default is to allow |
638402dd | 1638 | all replies. |
1a224843 | 1639 | |
41bd17a4 | 1640 | If none of the access lines cause a match the opposite of the |
1641 | last line will apply. Thus it is good practice to end the rules | |
1642 | with an "allow all" or "deny all" entry. | |
b3567eb5 FC |
1643 | |
1644 | This clause supports both fast and slow acl types. | |
1645 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
cccac0a2 | 1646 | DOC_END |
1647 | ||
41bd17a4 | 1648 | NAME: icp_access |
1649 | TYPE: acl_access | |
1650 | LOC: Config.accessList.icp | |
638402dd AJ |
1651 | DEFAULT: none |
1652 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
5473c134 | 1653 | DOC_START |
41bd17a4 | 1654 | Allowing or Denying access to the ICP port based on defined |
1655 | access lists | |
5473c134 | 1656 | |
41bd17a4 | 1657 | icp_access allow|deny [!]aclname ... |
5473c134 | 1658 | |
638402dd AJ |
1659 | NOTE: The default if no icp_access lines are present is to |
1660 | deny all traffic. This default may cause problems with peers | |
1661 | using ICP. | |
41bd17a4 | 1662 | |
b3567eb5 FC |
1663 | This clause only supports fast acl types. |
1664 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
e0855596 AJ |
1665 | |
1666 | # Allow ICP queries from local networks only | |
df2eec10 AJ |
1667 | #icp_access allow localnet |
1668 | #icp_access deny all | |
5473c134 | 1669 | DOC_END |
1670 | ||
41bd17a4 | 1671 | NAME: htcp_access |
1672 | IFDEF: USE_HTCP | |
1673 | TYPE: acl_access | |
1674 | LOC: Config.accessList.htcp | |
638402dd AJ |
1675 | DEFAULT: none |
1676 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
5473c134 | 1677 | DOC_START |
41bd17a4 | 1678 | Allowing or Denying access to the HTCP port based on defined |
1679 | access lists | |
5473c134 | 1680 | |
41bd17a4 | 1681 | htcp_access allow|deny [!]aclname ... |
5473c134 | 1682 | |
638402dd AJ |
1683 | See also htcp_clr_access for details on access control for |
1684 | cache purge (CLR) HTCP messages. | |
5473c134 | 1685 | |
0b48417e | 1686 | NOTE: The default if no htcp_access lines are present is to |
1687 | deny all traffic. This default may cause problems with peers | |
18191440 | 1688 | using the htcp option. |
0b48417e | 1689 | |
b3567eb5 FC |
1690 | This clause only supports fast acl types. |
1691 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
e0855596 AJ |
1692 | |
1693 | # Allow HTCP queries from local networks only | |
df2eec10 AJ |
1694 | #htcp_access allow localnet |
1695 | #htcp_access deny all | |
41bd17a4 | 1696 | DOC_END |
5473c134 | 1697 | |
41bd17a4 | 1698 | NAME: htcp_clr_access |
1699 | IFDEF: USE_HTCP | |
1700 | TYPE: acl_access | |
1701 | LOC: Config.accessList.htcp_clr | |
638402dd AJ |
1702 | DEFAULT: none |
1703 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
41bd17a4 | 1704 | DOC_START |
1705 | Allowing or Denying access to purge content using HTCP based | |
638402dd AJ |
1706 | on defined access lists. |
1707 | See htcp_access for details on general HTCP access control. | |
5473c134 | 1708 | |
41bd17a4 | 1709 | htcp_clr_access allow|deny [!]aclname ... |
5473c134 | 1710 | |
b3567eb5 FC |
1711 | This clause only supports fast acl types. |
1712 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
e0855596 AJ |
1713 | |
1714 | # Allow HTCP CLR requests from trusted peers | |
638402dd | 1715 | acl htcp_clr_peer src 192.0.2.2 2001:DB8::2 |
41bd17a4 | 1716 | htcp_clr_access allow htcp_clr_peer |
638402dd | 1717 | htcp_clr_access deny all |
5473c134 | 1718 | DOC_END |
1719 | ||
41bd17a4 | 1720 | NAME: miss_access |
1721 | TYPE: acl_access | |
1722 | LOC: Config.accessList.miss | |
b8a25eaa | 1723 | DEFAULT: none |
638402dd | 1724 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
5473c134 | 1725 | DOC_START |
18d1eddf | 1726 | Determines whether network access is permitted when satisfying a request. |
0b4fb91a AJ |
1727 | |
1728 | For example; | |
1729 | to force your neighbors to use you as a sibling instead of | |
1730 | a parent. | |
5473c134 | 1731 | |
638402dd | 1732 | acl localclients src 192.0.2.0/24 2001:DB8::a:0/64 |
41bd17a4 | 1733 | miss_access deny !localclients |
638402dd | 1734 | miss_access allow all |
5473c134 | 1735 | |
0b4fb91a AJ |
1736 | This means only your local clients are allowed to fetch relayed/MISS |
1737 | replies from the network and all other clients can only fetch cached | |
1738 | objects (HITs). | |
1739 | ||
0b4fb91a AJ |
1740 | The default for this setting allows all clients who passed the |
1741 | http_access rules to relay via this proxy. | |
b3567eb5 FC |
1742 | |
1743 | This clause only supports fast acl types. | |
1744 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
41bd17a4 | 1745 | DOC_END |
1746 | ||
1747 | NAME: ident_lookup_access | |
1748 | TYPE: acl_access | |
1749 | IFDEF: USE_IDENT | |
638402dd AJ |
1750 | DEFAULT: none |
1751 | DEFAULT_DOC: Unless rules exist in squid.conf, IDENT is not fetched. | |
4daaf3cb | 1752 | LOC: Ident::TheConfig.identLookup |
5473c134 | 1753 | DOC_START |
41bd17a4 | 1754 | A list of ACL elements which, if matched, cause an ident |
1755 | (RFC 931) lookup to be performed for this request. For | |
1756 | example, you might choose to always perform ident lookups | |
1757 | for your main multi-user Unix boxes, but not for your Macs | |
1758 | and PCs. By default, ident lookups are not performed for | |
1759 | any requests. | |
5473c134 | 1760 | |
41bd17a4 | 1761 | To enable ident lookups for specific client addresses, you |
1762 | can follow this example: | |
5473c134 | 1763 | |
4daaf3cb | 1764 | acl ident_aware_hosts src 198.168.1.0/24 |
41bd17a4 | 1765 | ident_lookup_access allow ident_aware_hosts |
1766 | ident_lookup_access deny all | |
5473c134 | 1767 | |
4daaf3cb | 1768 | Only src type ACL checks are fully supported. A srcdomain |
41bd17a4 | 1769 | ACL might work at times, but it will not always provide |
1770 | the correct result. | |
b3567eb5 FC |
1771 | |
1772 | This clause only supports fast acl types. | |
1773 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
41bd17a4 | 1774 | DOC_END |
5473c134 | 1775 | |
5b0f5383 | 1776 | NAME: reply_body_max_size |
1777 | COMMENT: size [acl acl...] | |
1778 | TYPE: acl_b_size_t | |
1779 | DEFAULT: none | |
638402dd | 1780 | DEFAULT_DOC: No limit is applied. |
5b0f5383 | 1781 | LOC: Config.ReplyBodySize |
1782 | DOC_START | |
1783 | This option specifies the maximum size of a reply body. It can be | |
1784 | used to prevent users from downloading very large files, such as | |
1785 | MP3's and movies. When the reply headers are received, the | |
1786 | reply_body_max_size lines are processed, and the first line where | |
1787 | all (if any) listed ACLs are true is used as the maximum body size | |
1788 | for this reply. | |
1789 | ||
1790 | This size is checked twice. First when we get the reply headers, | |
1791 | we check the content-length value. If the content length value exists | |
1792 | and is larger than the allowed size, the request is denied and the | |
1793 | user receives an error message that says "the request or reply | |
1794 | is too large." If there is no content-length, and the reply | |
1795 | size exceeds this limit, the client's connection is just closed | |
1796 | and they will receive a partial reply. | |
1797 | ||
1798 | WARNING: downstream caches probably can not detect a partial reply | |
1799 | if there is no content-length header, so they will cache | |
1800 | partial responses and give them out as hits. You should NOT | |
1801 | use this option if you have downstream caches. | |
1802 | ||
1803 | WARNING: A maximum size smaller than the size of squid's error messages | |
1804 | will cause an infinite loop and crash squid. Ensure that the smallest | |
1805 | non-zero value you use is greater that the maximum header size plus | |
1806 | the size of your largest error page. | |
1807 | ||
1808 | If you set this parameter none (the default), there will be | |
1809 | no limit imposed. | |
3bc32f2f AJ |
1810 | |
1811 | Configuration Format is: | |
1812 | reply_body_max_size SIZE UNITS [acl ...] | |
1813 | ie. | |
1814 | reply_body_max_size 10 MB | |
1815 | ||
5b0f5383 | 1816 | DOC_END |
1817 | ||
3248e962 CT |
1818 | NAME: on_unsupported_protocol |
1819 | TYPE: on_unsupported_protocol | |
1820 | LOC: Config.accessList.on_unsupported_protocol | |
1821 | DEFAULT: none | |
1822 | DEFAULT_DOC: Respond with an error message to unidentifiable traffic | |
1823 | DOC_START | |
1824 | Determines Squid behavior when encountering strange requests at the | |
56d089f3 CT |
1825 | beginning of an accepted TCP connection or the beginning of a bumped |
1826 | CONNECT tunnel. Controlling Squid reaction to unexpected traffic is | |
1827 | especially useful in interception environments where Squid is likely | |
1828 | to see connections for unsupported protocols that Squid should either | |
1829 | terminate or tunnel at TCP level. | |
3248e962 CT |
1830 | |
1831 | on_unsupported_protocol <action> [!]acl ... | |
1832 | ||
56d089f3 | 1833 | The first matching action wins. Only fast ACLs are supported. |
3248e962 CT |
1834 | |
1835 | Supported actions are: | |
1836 | ||
1837 | tunnel: Establish a TCP connection with the intended server and | |
1838 | blindly shovel TCP packets between the client and server. | |
1839 | ||
1840 | respond: Respond with an error message, using the transfer protocol | |
1841 | for the Squid port that received the request (e.g., HTTP | |
1842 | for connections intercepted at the http_port). This is the | |
1843 | default. | |
56d089f3 CT |
1844 | |
1845 | Squid expects the following traffic patterns: | |
1846 | ||
1847 | http_port: a plain HTTP request | |
1848 | https_port: SSL/TLS handshake followed by an [encrypted] HTTP request | |
1849 | ftp_port: a plain FTP command (no on_unsupported_protocol support yet!) | |
1850 | CONNECT tunnel on http_port: same as https_port | |
1851 | CONNECT tunnel on https_port: same as https_port | |
1852 | ||
9155253a | 1853 | Currently, this directive has effect on intercepted connections and |
56d089f3 CT |
1854 | bumped tunnels only. Other cases are not supported because Squid |
1855 | cannot know the intended destination of other traffic. | |
3248e962 CT |
1856 | |
1857 | For example: | |
1858 | # define what Squid errors indicate receiving non-HTTP traffic: | |
1859 | acl foreignProtocol squid_error ERR_PROTOCOL_UNKNOWN ERR_TOO_BIG | |
1860 | # define what Squid errors indicate receiving nothing: | |
1861 | acl serverTalksFirstProtocol squid_error ERR_REQUEST_START_TIMEOUT | |
1862 | # tunnel everything that does not look like HTTP: | |
1863 | on_unsupported_protocol tunnel foreignProtocol | |
1864 | # tunnel if we think the client waits for the server to talk first: | |
1865 | on_unsupported_protocol tunnel serverTalksFirstProtocol | |
1866 | # in all other error cases, just send an HTTP "error page" response: | |
1867 | on_unsupported_protocol respond all | |
1868 | ||
1869 | See also: squid_error ACL | |
1870 | DOC_END | |
1871 | ||
d6e94bda AJ |
1872 | NAME: auth_schemes |
1873 | TYPE: AuthSchemes | |
1874 | IFDEF: USE_AUTH | |
1875 | LOC: Auth::TheConfig.schemeAccess | |
1876 | DEFAULT: none | |
1877 | DEFAULT_DOC: use all auth_param schemes in their configuration order | |
1878 | DOC_START | |
1879 | Use this directive to customize authentication schemes presence and | |
1880 | order in Squid's Unauthorized and Authentication Required responses. | |
1881 | ||
1882 | auth_schemes scheme1,scheme2,... [!]aclname ... | |
1883 | ||
1884 | where schemeN is the name of one of the authentication schemes | |
1885 | configured using auth_param directives. At least one scheme name is | |
1886 | required. Multiple scheme names are separated by commas. Either | |
1887 | avoid whitespace or quote the entire schemes list. | |
1888 | ||
1889 | A special "ALL" scheme name expands to all auth_param-configured | |
1890 | schemes in their configuration order. This directive cannot be used | |
1891 | to configure Squid to offer no authentication schemes at all. | |
1892 | ||
1893 | The first matching auth_schemes rule determines the schemes order | |
1894 | for the current Authentication Required transaction. Note that the | |
1895 | future response is not yet available during auth_schemes evaluation. | |
1896 | ||
1897 | If this directive is not used or none of its rules match, then Squid | |
1898 | responds with all configured authentication schemes in the order of | |
1899 | auth_param directives in the configuration file. | |
1900 | ||
1901 | This directive does not determine when authentication is used or | |
1902 | how each authentication scheme authenticates clients. | |
1903 | ||
1904 | The following example sends basic and negotiate authentication | |
1905 | schemes, in that order, when requesting authentication of HTTP | |
1906 | requests matching the isIE ACL (not shown) while sending all | |
1907 | auth_param schemes in their configuration order to other clients: | |
1908 | ||
1909 | auth_schemes basic,negotiate isIE | |
1910 | auth_schemes ALL all # explicit default | |
1911 | ||
1912 | This directive supports fast ACLs only. | |
1913 | ||
1914 | See also: auth_param. | |
1915 | DOC_END | |
1916 | ||
5b0f5383 | 1917 | COMMENT_START |
1918 | NETWORK OPTIONS | |
1919 | ----------------------------------------------------------------------------- | |
1920 | COMMENT_END | |
1921 | ||
1922 | NAME: http_port ascii_port | |
65d448bc | 1923 | TYPE: PortCfg |
5b0f5383 | 1924 | DEFAULT: none |
fa720bfb | 1925 | LOC: HttpPortList |
5b0f5383 | 1926 | DOC_START |
c7b1dd5d AJ |
1927 | Usage: port [mode] [options] |
1928 | hostname:port [mode] [options] | |
1929 | 1.2.3.4:port [mode] [options] | |
5b0f5383 | 1930 | |
1931 | The socket addresses where Squid will listen for HTTP client | |
1932 | requests. You may specify multiple socket addresses. | |
1933 | There are three forms: port alone, hostname with port, and | |
1934 | IP address with port. If you specify a hostname or IP | |
1935 | address, Squid binds the socket to that specific | |
c7b1dd5d | 1936 | address. Most likely, you do not need to bind to a specific |
5b0f5383 | 1937 | address, so you can use the port number alone. |
1938 | ||
1939 | If you are running Squid in accelerator mode, you | |
1940 | probably want to listen on port 80 also, or instead. | |
1941 | ||
1942 | The -a command line option may be used to specify additional | |
1943 | port(s) where Squid listens for proxy request. Such ports will | |
1944 | be plain proxy ports with no options. | |
1945 | ||
1946 | You may specify multiple socket addresses on multiple lines. | |
1947 | ||
c7b1dd5d | 1948 | Modes: |
5b0f5383 | 1949 | |
16ae256c AJ |
1950 | intercept Support for IP-Layer NAT interception delivering |
1951 | traffic to this Squid port. | |
1952 | NP: disables authentication on the port. | |
5b0f5383 | 1953 | |
16ae256c AJ |
1954 | tproxy Support Linux TPROXY (or BSD divert-to) with spoofing |
1955 | of outgoing connections using the client IP address. | |
1956 | NP: disables authentication on the port. | |
5b0f5383 | 1957 | |
7f45065d | 1958 | accel Accelerator / reverse proxy mode |
5b0f5383 | 1959 | |
caf3666d | 1960 | ssl-bump For each CONNECT request allowed by ssl_bump ACLs, |
c7b1dd5d | 1961 | establish secure connection with the client and with |
caf3666d | 1962 | the server, decrypt HTTPS messages as they pass through |
c7b1dd5d AJ |
1963 | Squid, and treat them as unencrypted HTTP messages, |
1964 | becoming the man-in-the-middle. | |
1965 | ||
7a957a93 | 1966 | The ssl_bump option is required to fully enable |
caf3666d | 1967 | bumping of CONNECT requests. |
c7b1dd5d AJ |
1968 | |
1969 | Omitting the mode flag causes default forward proxy mode to be used. | |
1970 | ||
1971 | ||
1972 | Accelerator Mode Options: | |
1973 | ||
5b0f5383 | 1974 | defaultsite=domainname |
1975 | What to use for the Host: header if it is not present | |
1976 | in a request. Determines what site (not origin server) | |
1977 | accelerators should consider the default. | |
5b0f5383 | 1978 | |
cf673853 | 1979 | no-vhost Disable using HTTP/1.1 Host header for virtual domain support. |
5b0f5383 | 1980 | |
a9f60805 AJ |
1981 | protocol= Protocol to reconstruct accelerated and intercepted |
1982 | requests with. Defaults to HTTP/1.1 for http_port and | |
1983 | HTTPS/1.1 for https_port. | |
1984 | When an unsupported value is configured Squid will | |
1985 | produce a FATAL error. | |
1986 | Values: HTTP or HTTP/1.1, HTTPS or HTTPS/1.1 | |
5b0f5383 | 1987 | |
cf673853 AJ |
1988 | vport Virtual host port support. Using the http_port number |
1989 | instead of the port passed on Host: headers. | |
5b0f5383 | 1990 | |
cf673853 AJ |
1991 | vport=NN Virtual host port support. Using the specified port |
1992 | number instead of the port passed on Host: headers. | |
5b0f5383 | 1993 | |
7f45065d HN |
1994 | act-as-origin |
1995 | Act as if this Squid is the origin server. | |
1996 | This currently means generate new Date: and Expires: | |
1997 | headers on HIT instead of adding Age:. | |
5b0f5383 | 1998 | |
432bc83c HN |
1999 | ignore-cc Ignore request Cache-Control headers. |
2000 | ||
7f45065d | 2001 | WARNING: This option violates HTTP specifications if |
432bc83c HN |
2002 | used in non-accelerator setups. |
2003 | ||
7f45065d HN |
2004 | allow-direct Allow direct forwarding in accelerator mode. Normally |
2005 | accelerated requests are denied direct forwarding as if | |
2006 | never_direct was used. | |
2007 | ||
2008 | WARNING: this option opens accelerator mode to security | |
2009 | vulnerabilities usually only affecting in interception | |
2010 | mode. Make sure to protect forwarding with suitable | |
2011 | http_access rules when using this. | |
2012 | ||
c7b1dd5d AJ |
2013 | |
2014 | SSL Bump Mode Options: | |
859741ed AJ |
2015 | In addition to these options ssl-bump requires TLS/SSL options. |
2016 | ||
2017 | generate-host-certificates[=<on|off>] | |
2018 | Dynamically create SSL server certificates for the | |
2019 | destination hosts of bumped CONNECT requests.When | |
2020 | enabled, the cert and key options are used to sign | |
2021 | generated certificates. Otherwise generated | |
2022 | certificate will be selfsigned. | |
2023 | If there is a CA certificate lifetime of the generated | |
2024 | certificate equals lifetime of the CA certificate. If | |
2025 | generated certificate is selfsigned lifetime is three | |
2026 | years. | |
2027 | This option is enabled by default when ssl-bump is used. | |
2028 | See the ssl-bump option above for more information. | |
2029 | ||
2030 | dynamic_cert_mem_cache_size=SIZE | |
2031 | Approximate total RAM size spent on cached generated | |
2032 | certificates. If set to zero, caching is disabled. The | |
23bb0ebf | 2033 | default value is 4MB. |
859741ed AJ |
2034 | |
2035 | TLS / SSL Options: | |
c7b1dd5d AJ |
2036 | |
2037 | cert= Path to SSL certificate (PEM format). | |
2038 | ||
2039 | key= Path to SSL private key file (PEM format) | |
2040 | if not specified, the certificate file is | |
2041 | assumed to be a combined certificate and | |
2042 | key file. | |
2043 | ||
c7b1dd5d | 2044 | cipher= Colon separated list of supported ciphers. |
bebdc6fb AJ |
2045 | NOTE: some ciphers such as EDH ciphers depend on |
2046 | additional settings. If those settings are | |
2047 | omitted the ciphers may be silently ignored | |
2048 | by the OpenSSL library. | |
c7b1dd5d | 2049 | |
943c5f16 | 2050 | options= Various SSL implementation options. The most important |
c7b1dd5d | 2051 | being: |
7905e7be | 2052 | |
3d96b0e8 | 2053 | NO_SSLv3 Disallow the use of SSLv3 |
1f1f29e8 | 2054 | |
3d96b0e8 | 2055 | NO_TLSv1 Disallow the use of TLSv1.0 |
1f1f29e8 | 2056 | |
3d96b0e8 | 2057 | NO_TLSv1_1 Disallow the use of TLSv1.1 |
1f1f29e8 | 2058 | |
3d96b0e8 | 2059 | NO_TLSv1_2 Disallow the use of TLSv1.2 |
1f1f29e8 | 2060 | |
7905e7be AJ |
2061 | SINGLE_DH_USE |
2062 | Always create a new key when using | |
c7b1dd5d | 2063 | temporary/ephemeral DH key exchanges |
1f1f29e8 | 2064 | |
54fbe371 PM |
2065 | SINGLE_ECDH_USE |
2066 | Enable ephemeral ECDH key exchange. | |
2067 | The adopted curve should be specified | |
2068 | using the tls-dh option. | |
2069 | ||
36092741 | 2070 | NO_TICKET |
1f1f29e8 AJ |
2071 | Disable use of RFC5077 session tickets. |
2072 | Some servers may have problems | |
2073 | understanding the TLS extension due | |
2074 | to ambiguous specification in RFC4507. | |
2075 | ||
943c5f16 HN |
2076 | ALL Enable various bug workarounds |
2077 | suggested as "harmless" by OpenSSL | |
2078 | Be warned that this reduces SSL/TLS | |
2079 | strength to some attacks. | |
7905e7be AJ |
2080 | |
2081 | See the OpenSSL SSL_CTX_set_options documentation for a | |
2082 | more complete list. | |
c7b1dd5d AJ |
2083 | |
2084 | clientca= File containing the list of CAs to use when | |
2085 | requesting a client certificate. | |
2086 | ||
86a84cc0 AJ |
2087 | tls-cafile= PEM file containing CA certificates to use when verifying |
2088 | client certificates. If not configured clientca will be | |
2089 | used. May be repeated to load multiple files. | |
c7b1dd5d AJ |
2090 | |
2091 | capath= Directory containing additional CA certificates | |
2092 | and CRL lists to use when verifying client certificates. | |
86a84cc0 | 2093 | Requires OpenSSL or LibreSSL. |
c7b1dd5d AJ |
2094 | |
2095 | crlfile= File of additional CRL lists to use when verifying | |
2096 | the client certificate, in addition to CRLs stored in | |
2097 | the capath. Implies VERIFY_CRL flag below. | |
2098 | ||
54fbe371 PM |
2099 | tls-dh=[curve:]file |
2100 | File containing DH parameters for temporary/ephemeral DH key | |
2101 | exchanges, optionally prefixed by a curve for ephemeral ECDH | |
2102 | key exchanges. | |
2103 | See OpenSSL documentation for details on how to create the | |
2104 | DH parameter file. Supported curves for ECDH can be listed | |
2105 | using the "openssl ecparam -list_curves" command. | |
2106 | WARNING: EDH and EECDH ciphers will be silently disabled if | |
2107 | this option is not set. | |
c7b1dd5d AJ |
2108 | |
2109 | sslflags= Various flags modifying the use of SSL: | |
2110 | DELAYED_AUTH | |
2111 | Don't request client certificates | |
2112 | immediately, but wait until acl processing | |
2113 | requires a certificate (not yet implemented). | |
c7b1dd5d AJ |
2114 | NO_SESSION_REUSE |
2115 | Don't allow for session reuse. Each connection | |
2116 | will result in a new SSL session. | |
2117 | VERIFY_CRL | |
2118 | Verify CRL lists when accepting client | |
2119 | certificates. | |
2120 | VERIFY_CRL_ALL | |
2121 | Verify CRL lists for all certificates in the | |
2122 | client certificate chain. | |
2123 | ||
435c72b0 AJ |
2124 | tls-default-ca[=off] |
2125 | Whether to use the system Trusted CAs. Default is OFF. | |
8b253b83 | 2126 | |
b05d749d AJ |
2127 | tls-no-npn Do not use the TLS NPN extension to advertise HTTP/1.1. |
2128 | ||
c7b1dd5d AJ |
2129 | sslcontext= SSL session ID context identifier. |
2130 | ||
c7b1dd5d AJ |
2131 | Other Options: |
2132 | ||
6b185b50 AJ |
2133 | connection-auth[=on|off] |
2134 | use connection-auth=off to tell Squid to prevent | |
2135 | forwarding Microsoft connection oriented authentication | |
d67acb4e AJ |
2136 | (NTLM, Negotiate and Kerberos) |
2137 | ||
5b0f5383 | 2138 | disable-pmtu-discovery= |
2139 | Control Path-MTU discovery usage: | |
2140 | off lets OS decide on what to do (default). | |
2141 | transparent disable PMTU discovery when transparent | |
2142 | support is enabled. | |
2143 | always disable always PMTU discovery. | |
2144 | ||
2145 | In many setups of transparently intercepting proxies | |
2146 | Path-MTU discovery can not work on traffic towards the | |
2147 | clients. This is the case when the intercepting device | |
2148 | does not fully track connections and fails to forward | |
2149 | ICMP must fragment messages to the cache server. If you | |
2150 | have such setup and experience that certain clients | |
2151 | sporadically hang or never complete requests set | |
2152 | disable-pmtu-discovery option to 'transparent'. | |
2153 | ||
81b6e9a7 | 2154 | name= Specifies a internal name for the port. Defaults to |
2155 | the port specification (port or addr:port) | |
2156 | ||
68924b6d | 2157 | tcpkeepalive[=idle,interval,timeout] |
fb6c6dbe AJ |
2158 | Enable TCP keepalive probes of idle connections. |
2159 | In seconds; idle is the initial time before TCP starts | |
2160 | probing the connection, interval how often to probe, and | |
b2130d58 | 2161 | timeout the time before giving up. |
2162 | ||
d3d92daa | 2163 | require-proxy-header |
151ba0d4 | 2164 | Require PROXY protocol version 1 or 2 connections. |
d3d92daa | 2165 | The proxy_protocol_access is required to whitelist |
151ba0d4 AJ |
2166 | downstream proxies which can be trusted. |
2167 | ||
5b0f5383 | 2168 | If you run Squid on a dual-homed machine with an internal |
2169 | and an external interface we recommend you to specify the | |
2170 | internal address:port in http_port. This way Squid will only be | |
2171 | visible on the internal address. | |
2172 | ||
2173 | NOCOMMENT_START | |
e0855596 | 2174 | |
5b0f5383 | 2175 | # Squid normally listens to port 3128 |
2176 | http_port @DEFAULT_HTTP_PORT@ | |
2177 | NOCOMMENT_END | |
2178 | DOC_END | |
2179 | ||
2180 | NAME: https_port | |
339e4d7a | 2181 | IFDEF: USE_GNUTLS||USE_OPENSSL |
65d448bc | 2182 | TYPE: PortCfg |
5b0f5383 | 2183 | DEFAULT: none |
339e4d7a | 2184 | LOC: HttpPortList |
5b0f5383 | 2185 | DOC_START |
9155253a | 2186 | Usage: [ip:]port [mode] cert=certificate.pem [options] |
5b0f5383 | 2187 | |
859741ed AJ |
2188 | The socket address where Squid will listen for client requests made |
2189 | over TLS or SSL connections. Commonly referred to as HTTPS. | |
5b0f5383 | 2190 | |
859741ed | 2191 | This is most useful for situations where you are running squid in |
9155253a | 2192 | accelerator mode and you want to do the TLS work at the accelerator level. |
5b0f5383 | 2193 | |
2194 | You may specify multiple socket addresses on multiple lines, | |
9155253a | 2195 | each with their own certificate and/or options. |
5b0f5383 | 2196 | |
9155253a | 2197 | The TLS cert= option is mandatory on HTTPS ports. |
379e8c1c | 2198 | |
9155253a | 2199 | See http_port for a list of modes and options. |
5b0f5383 | 2200 | DOC_END |
2201 | ||
434a79b0 DK |
2202 | NAME: ftp_port |
2203 | TYPE: PortCfg | |
2204 | DEFAULT: none | |
8ea0d847 | 2205 | LOC: FtpPortList |
434a79b0 | 2206 | DOC_START |
8a2f40dd AR |
2207 | Enables Native FTP proxy by specifying the socket address where Squid |
2208 | listens for FTP client requests. See http_port directive for various | |
2209 | ways to specify the listening address and mode. | |
2210 | ||
2211 | Usage: ftp_port address [mode] [options] | |
2212 | ||
2213 | WARNING: This is a new, experimental, complex feature that has seen | |
2214 | limited production exposure. Some Squid modules (e.g., caching) do not | |
2215 | currently work with native FTP proxying, and many features have not | |
2216 | even been tested for compatibility. Test well before deploying! | |
2217 | ||
2218 | Native FTP proxying differs substantially from proxying HTTP requests | |
2219 | with ftp:// URIs because Squid works as an FTP server and receives | |
2220 | actual FTP commands (rather than HTTP requests with FTP URLs). | |
2221 | ||
2222 | Native FTP commands accepted at ftp_port are internally converted or | |
2223 | wrapped into HTTP-like messages. The same happens to Native FTP | |
2224 | responses received from FTP origin servers. Those HTTP-like messages | |
2225 | are shoveled through regular access control and adaptation layers | |
2226 | between the FTP client and the FTP origin server. This allows Squid to | |
2227 | examine, adapt, block, and log FTP exchanges. Squid reuses most HTTP | |
2228 | mechanisms when shoveling wrapped FTP messages. For example, | |
2229 | http_access and adaptation_access directives are used. | |
2230 | ||
2231 | Modes: | |
2232 | ||
3cc0f4e7 | 2233 | intercept Same as http_port intercept. The FTP origin address is |
8a2f40dd AR |
2234 | determined based on the intended destination of the |
2235 | intercepted connection. | |
2236 | ||
3cc0f4e7 AR |
2237 | tproxy Support Linux TPROXY for spoofing outgoing |
2238 | connections using the client IP address. | |
2239 | NP: disables authentication and maybe IPv6 on the port. | |
2240 | ||
8a2f40dd AR |
2241 | By default (i.e., without an explicit mode option), Squid extracts the |
2242 | FTP origin address from the login@origin parameter of the FTP USER | |
2243 | command. Many popular FTP clients support such native FTP proxying. | |
2244 | ||
2245 | Options: | |
2246 | ||
3cc0f4e7 AR |
2247 | name=token Specifies an internal name for the port. Defaults to |
2248 | the port address. Usable with myportname ACL. | |
2249 | ||
aea65fec | 2250 | ftp-track-dirs |
8a2f40dd AR |
2251 | Enables tracking of FTP directories by injecting extra |
2252 | PWD commands and adjusting Request-URI (in wrapping | |
2253 | HTTP requests) to reflect the current FTP server | |
aea65fec | 2254 | directory. Tracking is disabled by default. |
8a2f40dd | 2255 | |
3cc0f4e7 AR |
2256 | protocol=FTP Protocol to reconstruct accelerated and intercepted |
2257 | requests with. Defaults to FTP. No other accepted | |
2258 | values have been tested with. An unsupported value | |
2259 | results in a FATAL error. Accepted values are FTP, | |
2260 | HTTP (or HTTP/1.1), and HTTPS (or HTTPS/1.1). | |
2261 | ||
8a2f40dd AR |
2262 | Other http_port modes and options that are not specific to HTTP and |
2263 | HTTPS may also work. | |
2264 | DOC_END | |
434a79b0 | 2265 | |
41bd17a4 | 2266 | NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp |
2267 | TYPE: acl_tos | |
5473c134 | 2268 | DEFAULT: none |
425de4c8 | 2269 | LOC: Ip::Qos::TheConfig.tosToServer |
5473c134 | 2270 | DOC_START |
425de4c8 AJ |
2271 | Allows you to select a TOS/Diffserv value for packets outgoing |
2272 | on the server side, based on an ACL. | |
5473c134 | 2273 | |
41bd17a4 | 2274 | tcp_outgoing_tos ds-field [!]aclname ... |
cccac0a2 | 2275 | |
41bd17a4 | 2276 | Example where normal_service_net uses the TOS value 0x00 |
7def7206 | 2277 | and good_service_net uses 0x20 |
cccac0a2 | 2278 | |
864a62b5 AJ |
2279 | acl normal_service_net src 10.0.0.0/24 |
2280 | acl good_service_net src 10.0.1.0/24 | |
2c73de90 | 2281 | tcp_outgoing_tos 0x00 normal_service_net |
41bd17a4 | 2282 | tcp_outgoing_tos 0x20 good_service_net |
fa38076e | 2283 | |
41bd17a4 | 2284 | TOS/DSCP values really only have local significance - so you should |
575cb927 AJ |
2285 | know what you're specifying. For more information, see RFC2474, |
2286 | RFC2475, and RFC3260. | |
cccac0a2 | 2287 | |
41bd17a4 | 2288 | The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or |
5f53baab SM |
2289 | "default" to use whatever default your host has. |
2290 | Note that only multiples of 4 are usable as the two rightmost bits have | |
2291 | been redefined for use by ECN (RFC 3168 section 23.1). | |
2292 | The squid parser will enforce this by masking away the ECN bits. | |
cccac0a2 | 2293 | |
41bd17a4 | 2294 | Processing proceeds in the order specified, and stops at first fully |
2295 | matching line. | |
c6f168c1 CT |
2296 | |
2297 | Only fast ACLs are supported. | |
cccac0a2 | 2298 | DOC_END |
2299 | ||
41bd17a4 | 2300 | NAME: clientside_tos |
2301 | TYPE: acl_tos | |
cccac0a2 | 2302 | DEFAULT: none |
425de4c8 AJ |
2303 | LOC: Ip::Qos::TheConfig.tosToClient |
2304 | DOC_START | |
5f53baab | 2305 | Allows you to select a TOS/DSCP value for packets being transmitted |
425de4c8 AJ |
2306 | on the client-side, based on an ACL. |
2307 | ||
2308 | clientside_tos ds-field [!]aclname ... | |
2309 | ||
2310 | Example where normal_service_net uses the TOS value 0x00 | |
2311 | and good_service_net uses 0x20 | |
2312 | ||
2313 | acl normal_service_net src 10.0.0.0/24 | |
2314 | acl good_service_net src 10.0.1.0/24 | |
2315 | clientside_tos 0x00 normal_service_net | |
2316 | clientside_tos 0x20 good_service_net | |
2317 | ||
2318 | Note: This feature is incompatible with qos_flows. Any TOS values set here | |
2319 | will be overwritten by TOS values in qos_flows. | |
5f53baab SM |
2320 | |
2321 | The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or | |
2322 | "default" to use whatever default your host has. | |
2323 | Note that only multiples of 4 are usable as the two rightmost bits have | |
2324 | been redefined for use by ECN (RFC 3168 section 23.1). | |
2325 | The squid parser will enforce this by masking away the ECN bits. | |
2326 | ||
425de4c8 AJ |
2327 | DOC_END |
2328 | ||
2329 | NAME: tcp_outgoing_mark | |
2330 | TYPE: acl_nfmark | |
11e8cfe3 | 2331 | IFDEF: SO_MARK&&USE_LIBCAP |
425de4c8 AJ |
2332 | DEFAULT: none |
2333 | LOC: Ip::Qos::TheConfig.nfmarkToServer | |
2334 | DOC_START | |
2335 | Allows you to apply a Netfilter mark value to outgoing packets | |
2336 | on the server side, based on an ACL. | |
2337 | ||
2338 | tcp_outgoing_mark mark-value [!]aclname ... | |
2339 | ||
2340 | Example where normal_service_net uses the mark value 0x00 | |
2341 | and good_service_net uses 0x20 | |
2342 | ||
2343 | acl normal_service_net src 10.0.0.0/24 | |
2344 | acl good_service_net src 10.0.1.0/24 | |
2345 | tcp_outgoing_mark 0x00 normal_service_net | |
2346 | tcp_outgoing_mark 0x20 good_service_net | |
c6f168c1 CT |
2347 | |
2348 | Only fast ACLs are supported. | |
425de4c8 AJ |
2349 | DOC_END |
2350 | ||
2351 | NAME: clientside_mark | |
2352 | TYPE: acl_nfmark | |
11e8cfe3 | 2353 | IFDEF: SO_MARK&&USE_LIBCAP |
425de4c8 AJ |
2354 | DEFAULT: none |
2355 | LOC: Ip::Qos::TheConfig.nfmarkToClient | |
cccac0a2 | 2356 | DOC_START |
425de4c8 AJ |
2357 | Allows you to apply a Netfilter mark value to packets being transmitted |
2358 | on the client-side, based on an ACL. | |
2359 | ||
2360 | clientside_mark mark-value [!]aclname ... | |
2361 | ||
2362 | Example where normal_service_net uses the mark value 0x00 | |
2363 | and good_service_net uses 0x20 | |
2364 | ||
2365 | acl normal_service_net src 10.0.0.0/24 | |
2366 | acl good_service_net src 10.0.1.0/24 | |
2367 | clientside_mark 0x00 normal_service_net | |
2368 | clientside_mark 0x20 good_service_net | |
2369 | ||
2370 | Note: This feature is incompatible with qos_flows. Any mark values set here | |
2371 | will be overwritten by mark values in qos_flows. | |
41bd17a4 | 2372 | DOC_END |
cccac0a2 | 2373 | |
575cb927 AJ |
2374 | NAME: qos_flows |
2375 | TYPE: QosConfig | |
425de4c8 | 2376 | IFDEF: USE_QOS_TOS |
575cb927 | 2377 | DEFAULT: none |
b7ac5457 | 2378 | LOC: Ip::Qos::TheConfig |
7172612f | 2379 | DOC_START |
575cb927 | 2380 | Allows you to select a TOS/DSCP value to mark outgoing |
196a7776 AB |
2381 | connections to the client, based on where the reply was sourced. |
2382 | For platforms using netfilter, allows you to set a netfilter mark | |
425de4c8 | 2383 | value instead of, or in addition to, a TOS value. |
7172612f | 2384 | |
196a7776 AB |
2385 | By default this functionality is disabled. To enable it with the default |
2386 | settings simply use "qos_flows mark" or "qos_flows tos". Default | |
2387 | settings will result in the netfilter mark or TOS value being copied | |
2388 | from the upstream connection to the client. Note that it is the connection | |
2389 | CONNMARK value not the packet MARK value that is copied. | |
2390 | ||
2391 | It is not currently possible to copy the mark or TOS value from the | |
2392 | client to the upstream connection request. | |
2393 | ||
575cb927 AJ |
2394 | TOS values really only have local significance - so you should |
2395 | know what you're specifying. For more information, see RFC2474, | |
2396 | RFC2475, and RFC3260. | |
7172612f | 2397 | |
5f53baab SM |
2398 | The TOS/DSCP byte must be exactly that - a octet value 0 - 255. |
2399 | Note that only multiples of 4 are usable as the two rightmost bits have | |
2400 | been redefined for use by ECN (RFC 3168 section 23.1). | |
2401 | The squid parser will enforce this by masking away the ECN bits. | |
425de4c8 AJ |
2402 | |
2403 | Mark values can be any unsigned 32-bit integer value. | |
7172612f | 2404 | |
425de4c8 AJ |
2405 | This setting is configured by setting the following values: |
2406 | ||
2407 | tos|mark Whether to set TOS or netfilter mark values | |
575cb927 AJ |
2408 | |
2409 | local-hit=0xFF Value to mark local cache hits. | |
2410 | ||
2411 | sibling-hit=0xFF Value to mark hits from sibling peers. | |
2412 | ||
2413 | parent-hit=0xFF Value to mark hits from parent peers. | |
2414 | ||
a29d2a95 AB |
2415 | miss=0xFF[/mask] Value to mark cache misses. Takes precedence |
2416 | over the preserve-miss feature (see below), unless | |
2417 | mask is specified, in which case only the bits | |
2418 | specified in the mask are written. | |
575cb927 | 2419 | |
425de4c8 AJ |
2420 | The TOS variant of the following features are only possible on Linux |
2421 | and require your kernel to be patched with the TOS preserving ZPH | |
2422 | patch, available from http://zph.bratcheda.org | |
2423 | No patch is needed to preserve the netfilter mark, which will work | |
2424 | with all variants of netfilter. | |
575cb927 | 2425 | |
575cb927 | 2426 | disable-preserve-miss |
425de4c8 AJ |
2427 | This option disables the preservation of the TOS or netfilter |
2428 | mark. By default, the existing TOS or netfilter mark value of | |
2429 | the response coming from the remote server will be retained | |
2430 | and masked with miss-mark. | |
2431 | NOTE: in the case of a netfilter mark, the mark must be set on | |
2432 | the connection (using the CONNMARK target) not on the packet | |
2433 | (MARK target). | |
575cb927 AJ |
2434 | |
2435 | miss-mask=0xFF | |
425de4c8 AJ |
2436 | Allows you to mask certain bits in the TOS or mark value |
2437 | received from the remote server, before copying the value to | |
2438 | the TOS sent towards clients. | |
2439 | Default for tos: 0xFF (TOS from server is not changed). | |
2440 | Default for mark: 0xFFFFFFFF (mark from server is not changed). | |
2441 | ||
2442 | All of these features require the --enable-zph-qos compilation flag | |
2443 | (enabled by default). Netfilter marking also requires the | |
2444 | libnetfilter_conntrack libraries (--with-netfilter-conntrack) and | |
2445 | libcap 2.09+ (--with-libcap). | |
7172612f | 2446 | |
7172612f AJ |
2447 | DOC_END |
2448 | ||
41bd17a4 | 2449 | NAME: tcp_outgoing_address |
2450 | TYPE: acl_address | |
2451 | DEFAULT: none | |
638402dd | 2452 | DEFAULT_DOC: Address selection is performed by the operating system. |
41bd17a4 | 2453 | LOC: Config.accessList.outgoing_address |
2454 | DOC_START | |
2455 | Allows you to map requests to different outgoing IP addresses | |
2456 | based on the username or source address of the user making | |
2457 | the request. | |
7f7db318 | 2458 | |
41bd17a4 | 2459 | tcp_outgoing_address ipaddr [[!]aclname] ... |
c33aa074 | 2460 | |
2dd51400 AJ |
2461 | For example; |
2462 | Forwarding clients with dedicated IPs for certain subnets. | |
9197cd13 | 2463 | |
2dd51400 AJ |
2464 | acl normal_service_net src 10.0.0.0/24 |
2465 | acl good_service_net src 10.0.2.0/24 | |
2466 | ||
2467 | tcp_outgoing_address 2001:db8::c001 good_service_net | |
2468 | tcp_outgoing_address 10.1.0.2 good_service_net | |
2469 | ||
2470 | tcp_outgoing_address 2001:db8::beef normal_service_net | |
2471 | tcp_outgoing_address 10.1.0.1 normal_service_net | |
2472 | ||
2473 | tcp_outgoing_address 2001:db8::1 | |
2474 | tcp_outgoing_address 10.1.0.3 | |
9197cd13 | 2475 | |
41bd17a4 | 2476 | Processing proceeds in the order specified, and stops at first fully |
2477 | matching line. | |
cccac0a2 | 2478 | |
2dd51400 AJ |
2479 | Squid will add an implicit IP version test to each line. |
2480 | Requests going to IPv4 websites will use the outgoing 10.1.0.* addresses. | |
2481 | Requests going to IPv6 websites will use the outgoing 2001:db8:* addresses. | |
2482 | ||
2483 | ||
2484 | NOTE: The use of this directive using client dependent ACLs is | |
41bd17a4 | 2485 | incompatible with the use of server side persistent connections. To |
2486 | ensure correct results it is best to set server_persistent_connections | |
2487 | to off when using this directive in such configurations. | |
cc192b50 | 2488 | |
2dd51400 | 2489 | NOTE: The use of this directive to set a local IP on outgoing TCP links |
4ed968be | 2490 | is incompatible with using TPROXY to set client IP out outbound TCP links. |
2dd51400 AJ |
2491 | When needing to contact peers use the no-tproxy cache_peer option and the |
2492 | client_dst_passthru directive re-enable normal forwarding such as this. | |
cc192b50 | 2493 | |
cccac0a2 | 2494 | DOC_END |
6db78a1a | 2495 | |
90529125 AJ |
2496 | NAME: host_verify_strict |
2497 | TYPE: onoff | |
2498 | DEFAULT: off | |
2499 | LOC: Config.onoff.hostStrictVerify | |
2500 | DOC_START | |
d8821934 AR |
2501 | Regardless of this option setting, when dealing with intercepted |
2502 | traffic, Squid always verifies that the destination IP address matches | |
2962f8b8 | 2503 | the Host header domain or IP (called 'authority form URL'). |
d8821934 AR |
2504 | |
2505 | This enforcement is performed to satisfy a MUST-level requirement in | |
2506 | RFC 2616 section 14.23: "The Host field value MUST represent the naming | |
2507 | authority of the origin server or gateway given by the original URL". | |
2962f8b8 AJ |
2508 | |
2509 | When set to ON: | |
2510 | Squid always responds with an HTTP 409 (Conflict) error | |
2511 | page and logs a security warning if there is no match. | |
2512 | ||
2513 | Squid verifies that the destination IP address matches | |
2514 | the Host header for forward-proxy and reverse-proxy traffic | |
2515 | as well. For those traffic types, Squid also enables the | |
2516 | following checks, comparing the corresponding Host header | |
2517 | and Request-URI components: | |
2518 | ||
2519 | * The host names (domain or IP) must be identical, | |
2520 | but valueless or missing Host header disables all checks. | |
2521 | For the two host names to match, both must be either IP | |
2522 | or FQDN. | |
2523 | ||
2524 | * Port numbers must be identical, but if a port is missing | |
2525 | the scheme-default port is assumed. | |
2526 | ||
2527 | ||
2528 | When set to OFF (the default): | |
2529 | Squid allows suspicious requests to continue but logs a | |
2530 | security warning and blocks caching of the response. | |
2531 | ||
2532 | * Forward-proxy traffic is not checked at all. | |
2533 | ||
2534 | * Reverse-proxy traffic is not checked at all. | |
2535 | ||
2536 | * Intercepted traffic which passes verification is handled | |
32c32865 | 2537 | according to client_dst_passthru. |
2962f8b8 | 2538 | |
7177edfb AJ |
2539 | * Intercepted requests which fail verification are sent |
2540 | to the client original destination instead of DIRECT. | |
2541 | This overrides 'client_dst_passthru off'. | |
2962f8b8 AJ |
2542 | |
2543 | For now suspicious intercepted CONNECT requests are always | |
2544 | responded to with an HTTP 409 (Conflict) error page. | |
bfe4e2fe | 2545 | |
bfe4e2fe | 2546 | |
7177edfb | 2547 | SECURITY NOTE: |
bfe4e2fe AJ |
2548 | |
2549 | As described in CVE-2009-0801 when the Host: header alone is used | |
2550 | to determine the destination of a request it becomes trivial for | |
2551 | malicious scripts on remote websites to bypass browser same-origin | |
2552 | security policy and sandboxing protections. | |
2553 | ||
2554 | The cause of this is that such applets are allowed to perform their | |
2555 | own HTTP stack, in which case the same-origin policy of the browser | |
2556 | sandbox only verifies that the applet tries to contact the same IP | |
2557 | as from where it was loaded at the IP level. The Host: header may | |
2558 | be different from the connected IP and approved origin. | |
7177edfb AJ |
2559 | |
2560 | DOC_END | |
6b185b50 | 2561 | |
7177edfb AJ |
2562 | NAME: client_dst_passthru |
2563 | TYPE: onoff | |
2564 | DEFAULT: on | |
2565 | LOC: Config.onoff.client_dst_passthru | |
2566 | DOC_START | |
2567 | With NAT or TPROXY intercepted traffic Squid may pass the request | |
2568 | directly to the original client destination IP or seek a faster | |
2569 | source using the HTTP Host header. | |
2570 | ||
2571 | Using Host to locate alternative servers can provide faster | |
2572 | connectivity with a range of failure recovery options. | |
2573 | But can also lead to connectivity trouble when the client and | |
2574 | server are attempting stateful interactions unaware of the proxy. | |
2575 | ||
2576 | This option (on by default) prevents alternative DNS entries being | |
2577 | located to send intercepted traffic DIRECT to an origin server. | |
2578 | The clients original destination IP and port will be used instead. | |
2579 | ||
2580 | Regardless of this option setting, when dealing with intercepted | |
2581 | traffic Squid will verify the Host: header and any traffic which | |
2582 | fails Host verification will be treated as if this option were ON. | |
2583 | ||
2584 | see host_verify_strict for details on the verification process. | |
cccac0a2 | 2585 | DOC_END |
2586 | ||
195f8adb AJ |
2587 | COMMENT_START |
2588 | TLS OPTIONS | |
2589 | ----------------------------------------------------------------------------- | |
2590 | COMMENT_END | |
2591 | ||
2592 | NAME: tls_outgoing_options | |
2593 | IFDEF: USE_GNUTLS||USE_OPENSSL | |
2594 | TYPE: securePeerOptions | |
2fbb02b1 | 2595 | DEFAULT: min-version=1.0 |
7e62a74f | 2596 | LOC: Security::ProxyOutgoingConfig |
195f8adb AJ |
2597 | DOC_START |
2598 | disable Do not support https:// URLs. | |
2599 | ||
2600 | cert=/path/to/client/certificate | |
2601 | A client TLS certificate to use when connecting. | |
2602 | ||
2603 | key=/path/to/client/private_key | |
2604 | The private TLS key corresponding to the cert= above. | |
2605 | If key= is not specified cert= is assumed to reference | |
2606 | a PEM file containing both the certificate and the key. | |
2607 | ||
195f8adb | 2608 | cipher=... The list of valid TLS ciphers to use. |
1cc44095 AJ |
2609 | |
2610 | min-version=1.N | |
2fbb02b1 AJ |
2611 | The minimum TLS protocol version to permit. |
2612 | To control SSLv3 use the options= parameter. | |
1cc44095 AJ |
2613 | Supported Values: 1.0 (default), 1.1, 1.2 |
2614 | ||
195f8adb AJ |
2615 | options=... Specify various TLS/SSL implementation options: |
2616 | ||
2617 | NO_SSLv3 Disallow the use of SSLv3 | |
7905e7be | 2618 | |
195f8adb | 2619 | NO_TLSv1 Disallow the use of TLSv1.0 |
7905e7be | 2620 | |
195f8adb | 2621 | NO_TLSv1_1 Disallow the use of TLSv1.1 |
7905e7be | 2622 | |
195f8adb | 2623 | NO_TLSv1_2 Disallow the use of TLSv1.2 |
7905e7be | 2624 | |
195f8adb AJ |
2625 | SINGLE_DH_USE |
2626 | Always create a new key when using | |
2627 | temporary/ephemeral DH key exchanges | |
7905e7be | 2628 | |
ce0adf1a | 2629 | NO_TICKET |
7905e7be AJ |
2630 | Disable use of RFC5077 session tickets. |
2631 | Some servers may have problems | |
2632 | understanding the TLS extension due | |
2633 | to ambiguous specification in RFC4507. | |
2634 | ||
195f8adb AJ |
2635 | ALL Enable various bug workarounds |
2636 | suggested as "harmless" by OpenSSL | |
7905e7be | 2637 | Be warned that this reduces SSL/TLS |
195f8adb AJ |
2638 | strength to some attacks. |
2639 | ||
2640 | See the OpenSSL SSL_CTX_set_options documentation for a | |
2641 | more complete list. | |
2642 | ||
86a84cc0 AJ |
2643 | cafile= PEM file containing CA certificates to use when verifying |
2644 | the peer certificate. May be repeated to load multiple files. | |
2645 | ||
2646 | capath= A directory containing additional CA certificates to | |
195f8adb | 2647 | use when verifying the peer certificate. |
86a84cc0 | 2648 | Requires OpenSSL or LibreSSL. |
195f8adb AJ |
2649 | |
2650 | crlfile=... A certificate revocation list file to use when | |
2651 | verifying the peer certificate. | |
2652 | ||
2653 | flags=... Specify various flags modifying the TLS implementation: | |
2654 | ||
2655 | DONT_VERIFY_PEER | |
2656 | Accept certificates even if they fail to | |
2657 | verify. | |
195f8adb AJ |
2658 | DONT_VERIFY_DOMAIN |
2659 | Don't verify the peer certificate | |
2660 | matches the server name | |
2661 | ||
435c72b0 AJ |
2662 | default-ca[=off] |
2663 | Whether to use the system Trusted CAs. Default is ON. | |
8b253b83 | 2664 | |
195f8adb AJ |
2665 | domain= The peer name as advertised in its certificate. |
2666 | Used for verifying the correctness of the received peer | |
2667 | certificate. If not specified the peer hostname will be | |
2668 | used. | |
2669 | DOC_END | |
2670 | ||
41bd17a4 | 2671 | COMMENT_START |
2672 | SSL OPTIONS | |
2673 | ----------------------------------------------------------------------------- | |
2674 | COMMENT_END | |
2675 | ||
2676 | NAME: ssl_unclean_shutdown | |
cb4f4424 | 2677 | IFDEF: USE_OPENSSL |
cccac0a2 | 2678 | TYPE: onoff |
2679 | DEFAULT: off | |
41bd17a4 | 2680 | LOC: Config.SSL.unclean_shutdown |
cccac0a2 | 2681 | DOC_START |
41bd17a4 | 2682 | Some browsers (especially MSIE) bugs out on SSL shutdown |
2683 | messages. | |
cccac0a2 | 2684 | DOC_END |
2685 | ||
41bd17a4 | 2686 | NAME: ssl_engine |
cb4f4424 | 2687 | IFDEF: USE_OPENSSL |
cccac0a2 | 2688 | TYPE: string |
41bd17a4 | 2689 | LOC: Config.SSL.ssl_engine |
2690 | DEFAULT: none | |
cccac0a2 | 2691 | DOC_START |
41bd17a4 | 2692 | The OpenSSL engine to use. You will need to set this if you |
2693 | would like to use hardware SSL acceleration for example. | |
cccac0a2 | 2694 | DOC_END |
2695 | ||
10a69fc0 | 2696 | NAME: sslproxy_session_ttl |
cb4f4424 | 2697 | IFDEF: USE_OPENSSL |
10a69fc0 CT |
2698 | DEFAULT: 300 |
2699 | LOC: Config.SSL.session_ttl | |
2700 | TYPE: int | |
2701 | DOC_START | |
2702 | Sets the timeout value for SSL sessions | |
2703 | DOC_END | |
2704 | ||
2705 | NAME: sslproxy_session_cache_size | |
cb4f4424 | 2706 | IFDEF: USE_OPENSSL |
10a69fc0 CT |
2707 | DEFAULT: 2 MB |
2708 | LOC: Config.SSL.sessionCacheSize | |
2709 | TYPE: b_size_t | |
2710 | DOC_START | |
2711 | Sets the cache size to use for ssl session | |
2712 | DOC_END | |
2713 | ||
866be11c CT |
2714 | NAME: sslproxy_foreign_intermediate_certs |
2715 | IFDEF: USE_OPENSSL | |
2716 | DEFAULT: none | |
2717 | LOC: Config.ssl_client.foreignIntermediateCertsPath | |
2718 | TYPE: string | |
2719 | DOC_START | |
2720 | Many origin servers fail to send their full server certificate | |
2721 | chain for verification, assuming the client already has or can | |
2722 | easily locate any missing intermediate certificates. | |
2723 | ||
2724 | Squid uses the certificates from the specified file to fill in | |
2725 | these missing chains when trying to validate origin server | |
2726 | certificate chains. | |
2727 | ||
2728 | The file is expected to contain zero or more PEM-encoded | |
2729 | intermediate certificates. These certificates are not treated | |
2730 | as trusted root certificates, and any self-signed certificate in | |
2731 | this file will be ignored. | |
866be11c CT |
2732 | DOC_END |
2733 | ||
3c26b00a CT |
2734 | NAME: sslproxy_cert_sign_hash |
2735 | IFDEF: USE_OPENSSL | |
2736 | DEFAULT: none | |
2737 | LOC: Config.SSL.certSignHash | |
2738 | TYPE: string | |
2739 | DOC_START | |
2740 | Sets the hashing algorithm to use when signing generated certificates. | |
2741 | Valid algorithm names depend on the OpenSSL library used. The following | |
2742 | names are usually available: sha1, sha256, sha512, and md5. Please see | |
2743 | your OpenSSL library manual for the available hashes. By default, Squids | |
2744 | that support this option use sha256 hashes. | |
2745 | ||
2746 | Squid does not forcefully purge cached certificates that were generated | |
2747 | with an algorithm other than the currently configured one. They remain | |
2748 | in the cache, subject to the regular cache eviction policy, and become | |
2749 | useful if the algorithm changes again. | |
2750 | DOC_END | |
2751 | ||
4c9da963 | 2752 | NAME: ssl_bump |
cb4f4424 | 2753 | IFDEF: USE_OPENSSL |
caf3666d | 2754 | TYPE: sslproxy_ssl_bump |
4c9da963 | 2755 | LOC: Config.accessList.ssl_bump |
8f165829 | 2756 | DEFAULT_DOC: Become a TCP tunnel without decrypting proxied traffic. |
4c9da963 | 2757 | DEFAULT: none |
2758 | DOC_START | |
caf3666d AR |
2759 | This option is consulted when a CONNECT request is received on |
2760 | an http_port (or a new connection is intercepted at an | |
2761 | https_port), provided that port was configured with an ssl-bump | |
2762 | flag. The subsequent data on the connection is either treated as | |
2763 | HTTPS and decrypted OR tunneled at TCP level without decryption, | |
8f165829 AR |
2764 | depending on the first matching bumping "action". |
2765 | ||
2766 | ssl_bump <action> [!]acl ... | |
caf3666d | 2767 | |
8f165829 | 2768 | The following bumping actions are currently supported: |
caf3666d | 2769 | |
5d65362c | 2770 | splice |
8f165829 AR |
2771 | Become a TCP tunnel without decrypting proxied traffic. |
2772 | This is the default action. | |
5d65362c CT |
2773 | |
2774 | bump | |
2775 | Establish a secure connection with the server and, using a | |
2776 | mimicked server certificate, with the client. | |
caf3666d | 2777 | |
5d65362c | 2778 | peek |
1110989a | 2779 | Receive client (step SslBump1) or server (step SslBump2) |
8f165829 AR |
2780 | certificate while preserving the possibility of splicing the |
2781 | connection. Peeking at the server certificate (during step 2) | |
2782 | usually precludes bumping of the connection at step 3. | |
caf3666d | 2783 | |
5d65362c | 2784 | stare |
1110989a | 2785 | Receive client (step SslBump1) or server (step SslBump2) |
8f165829 AR |
2786 | certificate while preserving the possibility of bumping the |
2787 | connection. Staring at the server certificate (during step 2) | |
2788 | usually precludes splicing of the connection at step 3. | |
5d65362c CT |
2789 | |
2790 | terminate | |
2791 | Close client and server connections. | |
2792 | ||
1110989a | 2793 | Backward compatibility actions available at step SslBump1: |
caf3666d AR |
2794 | |
2795 | client-first | |
8f165829 AR |
2796 | Bump the connection. Establish a secure connection with the |
2797 | client first, then connect to the server. This old mode does | |
2798 | not allow Squid to mimic server SSL certificate and does not | |
2799 | work with intercepted SSL connections. | |
caf3666d AR |
2800 | |
2801 | server-first | |
8f165829 AR |
2802 | Bump the connection. Establish a secure connection with the |
2803 | server first, then establish a secure connection with the | |
2804 | client, using a mimicked server certificate. Works with both | |
2805 | CONNECT requests and intercepted SSL connections, but does | |
2806 | not allow to make decisions based on SSL handshake info. | |
caf3666d | 2807 | |
8f165829 AR |
2808 | peek-and-splice |
2809 | Decide whether to bump or splice the connection based on | |
d620ae0e | 2810 | client-to-squid and server-to-squid SSL hello messages. |
8f165829 | 2811 | XXX: Remove. |
caf3666d | 2812 | |
caf3666d | 2813 | none |
8f165829 | 2814 | Same as the "splice" action. |
caf3666d | 2815 | |
8f165829 AR |
2816 | All ssl_bump rules are evaluated at each of the supported bumping |
2817 | steps. Rules with actions that are impossible at the current step are | |
2818 | ignored. The first matching ssl_bump action wins and is applied at the | |
2819 | end of the current step. If no rules match, the splice action is used. | |
652fcffd | 2820 | See the at_step ACL for a list of the supported SslBump steps. |
4c9da963 | 2821 | |
e0c0d54c | 2822 | This clause supports both fast and slow acl types. |
b3567eb5 | 2823 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
e0855596 | 2824 | |
652fcffd | 2825 | See also: http_port ssl-bump, https_port ssl-bump, and acl at_step. |
caf3666d | 2826 | |
e0855596 | 2827 | |
f3fece95 | 2828 | # Example: Bump all TLS connections except those originating from |
638402dd | 2829 | # localhost or those going to example.com. |
e0855596 | 2830 | |
f3fece95 | 2831 | acl broken_sites ssl::server_name .example.com |
8f165829 AR |
2832 | ssl_bump splice localhost |
2833 | ssl_bump splice broken_sites | |
2834 | ssl_bump bump all | |
4c9da963 | 2835 | DOC_END |
2836 | ||
4c9da963 | 2837 | NAME: sslproxy_cert_error |
cb4f4424 | 2838 | IFDEF: USE_OPENSSL |
4c9da963 | 2839 | DEFAULT: none |
638402dd | 2840 | DEFAULT_DOC: Server certificate errors terminate the transaction. |
4c9da963 | 2841 | LOC: Config.ssl_client.cert_error |
2842 | TYPE: acl_access | |
2843 | DOC_START | |
2844 | Use this ACL to bypass server certificate validation errors. | |
2845 | ||
2846 | For example, the following lines will bypass all validation errors | |
3b8f558c | 2847 | when talking to servers for example.com. All other |
4c9da963 | 2848 | validation errors will result in ERR_SECURE_CONNECT_FAIL error. |
2849 | ||
a87bfd3b AR |
2850 | acl BrokenButTrustedServers dstdomain example.com |
2851 | sslproxy_cert_error allow BrokenButTrustedServers | |
4c9da963 | 2852 | sslproxy_cert_error deny all |
2853 | ||
b3567eb5 FC |
2854 | This clause only supports fast acl types. |
2855 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
2856 | Using slow acl types may result in server crashes | |
4c9da963 | 2857 | |
2858 | Without this option, all server certificate validation errors | |
638402dd | 2859 | terminate the transaction to protect Squid and the client. |
4c9da963 | 2860 | |
0ad3ff51 CT |
2861 | SQUID_X509_V_ERR_INFINITE_VALIDATION error cannot be bypassed |
2862 | but should not happen unless your OpenSSL library is buggy. | |
2863 | ||
638402dd AJ |
2864 | SECURITY WARNING: |
2865 | Bypassing validation errors is dangerous because an | |
2866 | error usually implies that the server cannot be trusted | |
2867 | and the connection may be insecure. | |
4c9da963 | 2868 | |
638402dd | 2869 | See also: sslproxy_flags and DONT_VERIFY_PEER. |
4c9da963 | 2870 | DOC_END |
2871 | ||
aebe6888 | 2872 | NAME: sslproxy_cert_sign |
cb4f4424 | 2873 | IFDEF: USE_OPENSSL |
aebe6888 | 2874 | DEFAULT: none |
10d914f6 CT |
2875 | POSTSCRIPTUM: signUntrusted ssl::certUntrusted |
2876 | POSTSCRIPTUM: signSelf ssl::certSelfSigned | |
2877 | POSTSCRIPTUM: signTrusted all | |
aebe6888 CT |
2878 | TYPE: sslproxy_cert_sign |
2879 | LOC: Config.ssl_client.cert_sign | |
2880 | DOC_START | |
2881 | ||
69742b76 | 2882 | sslproxy_cert_sign <signing algorithm> acl ... |
aebe6888 | 2883 | |
69742b76 | 2884 | The following certificate signing algorithms are supported: |
638402dd | 2885 | |
aebe6888 | 2886 | signTrusted |
69742b76 AR |
2887 | Sign using the configured CA certificate which is usually |
2888 | placed in and trusted by end-user browsers. This is the | |
2889 | default for trusted origin server certificates. | |
638402dd | 2890 | |
aebe6888 | 2891 | signUntrusted |
69742b76 AR |
2892 | Sign to guarantee an X509_V_ERR_CERT_UNTRUSTED browser error. |
2893 | This is the default for untrusted origin server certificates | |
2894 | that are not self-signed (see ssl::certUntrusted). | |
638402dd | 2895 | |
aebe6888 | 2896 | signSelf |
69742b76 | 2897 | Sign using a self-signed certificate with the right CN to |
aebe6888 | 2898 | generate a X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT error in the |
69742b76 AR |
2899 | browser. This is the default for self-signed origin server |
2900 | certificates (see ssl::certSelfSigned). | |
aebe6888 | 2901 | |
cf1c09f6 CT |
2902 | This clause only supports fast acl types. |
2903 | ||
69742b76 AR |
2904 | When sslproxy_cert_sign acl(s) match, Squid uses the corresponding |
2905 | signing algorithm to generate the certificate and ignores all | |
2906 | subsequent sslproxy_cert_sign options (the first match wins). If no | |
2907 | acl(s) match, the default signing algorithm is determined by errors | |
2908 | detected when obtaining and validating the origin server certificate. | |
cf1c09f6 | 2909 | |
4b0d23b7 CT |
2910 | WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can |
2911 | be used with sslproxy_cert_adapt, but if and only if Squid is bumping a | |
2912 | CONNECT request that carries a domain name. In all other cases (CONNECT | |
2913 | to an IP address or an intercepted SSL connection), Squid cannot detect | |
2914 | the domain mismatch at certificate generation time when | |
2915 | bump-server-first is used. | |
aebe6888 CT |
2916 | DOC_END |
2917 | ||
638402dd | 2918 | NAME: sslproxy_cert_adapt |
cb4f4424 | 2919 | IFDEF: USE_OPENSSL |
fb2178bb CT |
2920 | DEFAULT: none |
2921 | TYPE: sslproxy_cert_adapt | |
2922 | LOC: Config.ssl_client.cert_adapt | |
2923 | DOC_START | |
2924 | ||
2925 | sslproxy_cert_adapt <adaptation algorithm> acl ... | |
2926 | ||
69742b76 | 2927 | The following certificate adaptation algorithms are supported: |
638402dd | 2928 | |
fb2178bb | 2929 | setValidAfter |
69742b76 AR |
2930 | Sets the "Not After" property to the "Not After" property of |
2931 | the CA certificate used to sign generated certificates. | |
638402dd | 2932 | |
fb2178bb | 2933 | setValidBefore |
69742b76 AR |
2934 | Sets the "Not Before" property to the "Not Before" property of |
2935 | the CA certificate used to sign generated certificates. | |
638402dd | 2936 | |
69742b76 AR |
2937 | setCommonName or setCommonName{CN} |
2938 | Sets Subject.CN property to the host name specified as a | |
2939 | CN parameter or, if no explicit CN parameter was specified, | |
2940 | extracted from the CONNECT request. It is a misconfiguration | |
2941 | to use setCommonName without an explicit parameter for | |
2942 | intercepted or tproxied SSL connections. | |
fb2178bb | 2943 | |
cf1c09f6 CT |
2944 | This clause only supports fast acl types. |
2945 | ||
69742b76 AR |
2946 | Squid first groups sslproxy_cert_adapt options by adaptation algorithm. |
2947 | Within a group, when sslproxy_cert_adapt acl(s) match, Squid uses the | |
2948 | corresponding adaptation algorithm to generate the certificate and | |
2949 | ignores all subsequent sslproxy_cert_adapt options in that algorithm's | |
2950 | group (i.e., the first match wins within each algorithm group). If no | |
2951 | acl(s) match, the default mimicking action takes place. | |
cf1c09f6 | 2952 | |
4b0d23b7 CT |
2953 | WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can |
2954 | be used with sslproxy_cert_adapt, but if and only if Squid is bumping a | |
2955 | CONNECT request that carries a domain name. In all other cases (CONNECT | |
2956 | to an IP address or an intercepted SSL connection), Squid cannot detect | |
2957 | the domain mismatch at certificate generation time when | |
2958 | bump-server-first is used. | |
fb2178bb CT |
2959 | DOC_END |
2960 | ||
41bd17a4 | 2961 | NAME: sslpassword_program |
cb4f4424 | 2962 | IFDEF: USE_OPENSSL |
41bd17a4 | 2963 | DEFAULT: none |
2964 | LOC: Config.Program.ssl_password | |
2965 | TYPE: string | |
5473c134 | 2966 | DOC_START |
41bd17a4 | 2967 | Specify a program used for entering SSL key passphrases |
2968 | when using encrypted SSL certificate keys. If not specified | |
2969 | keys must either be unencrypted, or Squid started with the -N | |
2970 | option to allow it to query interactively for the passphrase. | |
7acb9ddd HN |
2971 | |
2972 | The key file name is given as argument to the program allowing | |
2973 | selection of the right password if you have multiple encrypted | |
2974 | keys. | |
5473c134 | 2975 | DOC_END |
2976 | ||
95d2589c CT |
2977 | COMMENT_START |
2978 | OPTIONS RELATING TO EXTERNAL SSL_CRTD | |
2979 | ----------------------------------------------------------------------------- | |
2980 | COMMENT_END | |
2981 | ||
2982 | NAME: sslcrtd_program | |
2983 | TYPE: eol | |
2984 | IFDEF: USE_SSL_CRTD | |
2985 | DEFAULT: @DEFAULT_SSL_CRTD@ -s @DEFAULT_SSL_DB_DIR@ -M 4MB | |
2986 | LOC: Ssl::TheConfig.ssl_crtd | |
2987 | DOC_START | |
cb0b3d63 AJ |
2988 | Specify the location and options of the executable for certificate |
2989 | generator. | |
95d2589c CT |
2990 | @DEFAULT_SSL_CRTD@ program requires -s and -M parameters |
2991 | For more information use: | |
2992 | @DEFAULT_SSL_CRTD@ -h | |
2993 | DOC_END | |
2994 | ||
2995 | NAME: sslcrtd_children | |
2996 | TYPE: HelperChildConfig | |
2997 | IFDEF: USE_SSL_CRTD | |
2998 | DEFAULT: 32 startup=5 idle=1 | |
2999 | LOC: Ssl::TheConfig.ssl_crtdChildren | |
3000 | DOC_START | |
3001 | The maximum number of processes spawn to service ssl server. | |
3002 | The maximum this may be safely set to is 32. | |
3003 | ||
3004 | The startup= and idle= options allow some measure of skew in your | |
3005 | tuning. | |
3006 | ||
3007 | startup=N | |
3008 | ||
3009 | Sets the minimum number of processes to spawn when Squid | |
3010 | starts or reconfigures. When set to zero the first request will | |
3011 | cause spawning of the first child process to handle it. | |
3012 | ||
3013 | Starting too few children temporary slows Squid under load while it | |
3014 | tries to spawn enough additional processes to cope with traffic. | |
3015 | ||
3016 | idle=N | |
3017 | ||
3018 | Sets a minimum of how many processes Squid is to try and keep available | |
3019 | at all times. When traffic begins to rise above what the existing | |
3020 | processes can handle this many more will be spawned up to the maximum | |
3021 | configured. A minimum setting of 1 is required. | |
6825b101 CT |
3022 | |
3023 | queue-size=N | |
3024 | ||
3025 | Sets the maximum number of queued requests. | |
3026 | If the queued requests exceed queue size for more than 3 minutes | |
3027 | squid aborts its operation. | |
3028 | The default value is set to 2*numberofchildren. | |
95d2589c CT |
3029 | |
3030 | You must have at least one ssl_crtd process. | |
3031 | DOC_END | |
3032 | ||
2cef0ca6 AR |
3033 | NAME: sslcrtvalidator_program |
3034 | TYPE: eol | |
cb4f4424 | 3035 | IFDEF: USE_OPENSSL |
2cef0ca6 AR |
3036 | DEFAULT: none |
3037 | LOC: Ssl::TheConfig.ssl_crt_validator | |
3038 | DOC_START | |
3039 | Specify the location and options of the executable for ssl_crt_validator | |
638402dd AJ |
3040 | process. |
3041 | ||
3042 | Usage: sslcrtvalidator_program [ttl=n] [cache=n] path ... | |
14798e73 CT |
3043 | |
3044 | Options: | |
638402dd | 3045 | ttl=n TTL in seconds for cached results. The default is 60 secs |
14798e73 | 3046 | cache=n limit the result cache size. The default value is 2048 |
2cef0ca6 AR |
3047 | DOC_END |
3048 | ||
3049 | NAME: sslcrtvalidator_children | |
3050 | TYPE: HelperChildConfig | |
cb4f4424 | 3051 | IFDEF: USE_OPENSSL |
413bb969 | 3052 | DEFAULT: 32 startup=5 idle=1 concurrency=1 |
2cef0ca6 AR |
3053 | LOC: Ssl::TheConfig.ssl_crt_validator_Children |
3054 | DOC_START | |
638402dd | 3055 | The maximum number of processes spawn to service SSL server. |
2cef0ca6 AR |
3056 | The maximum this may be safely set to is 32. |
3057 | ||
3058 | The startup= and idle= options allow some measure of skew in your | |
3059 | tuning. | |
3060 | ||
3061 | startup=N | |
3062 | ||
3063 | Sets the minimum number of processes to spawn when Squid | |
3064 | starts or reconfigures. When set to zero the first request will | |
3065 | cause spawning of the first child process to handle it. | |
3066 | ||
3067 | Starting too few children temporary slows Squid under load while it | |
3068 | tries to spawn enough additional processes to cope with traffic. | |
3069 | ||
3070 | idle=N | |
3071 | ||
3072 | Sets a minimum of how many processes Squid is to try and keep available | |
3073 | at all times. When traffic begins to rise above what the existing | |
3074 | processes can handle this many more will be spawned up to the maximum | |
3075 | configured. A minimum setting of 1 is required. | |
4a77bb4e CT |
3076 | |
3077 | concurrency= | |
3078 | ||
3079 | The number of requests each certificate validator helper can handle in | |
dffc462a CT |
3080 | parallel. A value of 0 indicates the certficate validator does not |
3081 | support concurrency. Defaults to 1. | |
4a77bb4e CT |
3082 | |
3083 | When this directive is set to a value >= 1 then the protocol | |
3084 | used to communicate with the helper is modified to include | |
3085 | a request ID in front of the request/response. The request | |
3086 | ID from the request must be echoed back with the response | |
3087 | to that request. | |
6825b101 CT |
3088 | |
3089 | queue-size=N | |
3090 | ||
3091 | Sets the maximum number of queued requests. | |
3092 | If the queued requests exceed queue size for more than 3 minutes | |
3093 | squid aborts its operation. | |
3094 | The default value is set to 2*numberofchildren. | |
2cef0ca6 AR |
3095 | |
3096 | You must have at least one ssl_crt_validator process. | |
3097 | DOC_END | |
3098 | ||
cccac0a2 | 3099 | COMMENT_START |
41bd17a4 | 3100 | OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM |
cccac0a2 | 3101 | ----------------------------------------------------------------------------- |
3102 | COMMENT_END | |
3103 | ||
41bd17a4 | 3104 | NAME: cache_peer |
3105 | TYPE: peer | |
3106 | DEFAULT: none | |
3107 | LOC: Config.peers | |
cccac0a2 | 3108 | DOC_START |
41bd17a4 | 3109 | To specify other caches in a hierarchy, use the format: |
2b94f655 | 3110 | |
41bd17a4 | 3111 | cache_peer hostname type http-port icp-port [options] |
2b94f655 | 3112 | |
41bd17a4 | 3113 | For example, |
2b94f655 | 3114 | |
41bd17a4 | 3115 | # proxy icp |
3116 | # hostname type port port options | |
3117 | # -------------------- -------- ----- ----- ----------- | |
2b94f655 | 3118 | cache_peer parent.foo.net parent 3128 3130 default |
41bd17a4 | 3119 | cache_peer sib1.foo.net sibling 3128 3130 proxy-only |
3120 | cache_peer sib2.foo.net sibling 3128 3130 proxy-only | |
2e9993e1 | 3121 | cache_peer example.com parent 80 0 default |
2b94f655 AJ |
3122 | cache_peer cdn.example.com sibling 3128 0 |
3123 | ||
3124 | type: either 'parent', 'sibling', or 'multicast'. | |
3125 | ||
3126 | proxy-port: The port number where the peer accept HTTP requests. | |
3127 | For other Squid proxies this is usually 3128 | |
3128 | For web servers this is usually 80 | |
3129 | ||
3130 | icp-port: Used for querying neighbor caches about objects. | |
3131 | Set to 0 if the peer does not support ICP or HTCP. | |
3132 | See ICP and HTCP options below for additional details. | |
3133 | ||
3134 | ||
3135 | ==== ICP OPTIONS ==== | |
3136 | ||
3137 | You MUST also set icp_port and icp_access explicitly when using these options. | |
3138 | The defaults will prevent peer traffic using ICP. | |
3139 | ||
3140 | ||
3141 | no-query Disable ICP queries to this neighbor. | |
3142 | ||
3143 | multicast-responder | |
3144 | Indicates the named peer is a member of a multicast group. | |
3145 | ICP queries will not be sent directly to the peer, but ICP | |
3146 | replies will be accepted from it. | |
3147 | ||
3148 | closest-only Indicates that, for ICP_OP_MISS replies, we'll only forward | |
3149 | CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes. | |
3150 | ||
3151 | background-ping | |
3152 | To only send ICP queries to this neighbor infrequently. | |
3153 | This is used to keep the neighbor round trip time updated | |
3154 | and is usually used in conjunction with weighted-round-robin. | |
3155 | ||
3156 | ||
3157 | ==== HTCP OPTIONS ==== | |
3158 | ||
3159 | You MUST also set htcp_port and htcp_access explicitly when using these options. | |
3160 | The defaults will prevent peer traffic using HTCP. | |
3161 | ||
3162 | ||
3163 | htcp Send HTCP, instead of ICP, queries to the neighbor. | |
3164 | You probably also want to set the "icp-port" to 4827 | |
18191440 AJ |
3165 | instead of 3130. This directive accepts a comma separated |
3166 | list of options described below. | |
2b94f655 | 3167 | |
18191440 | 3168 | htcp=oldsquid Send HTCP to old Squid versions (2.5 or earlier). |
2b94f655 | 3169 | |
18191440 | 3170 | htcp=no-clr Send HTCP to the neighbor but without |
2b94f655 | 3171 | sending any CLR requests. This cannot be used with |
18191440 | 3172 | only-clr. |
2b94f655 | 3173 | |
18191440 AJ |
3174 | htcp=only-clr Send HTCP to the neighbor but ONLY CLR requests. |
3175 | This cannot be used with no-clr. | |
2b94f655 | 3176 | |
18191440 | 3177 | htcp=no-purge-clr |
2b94f655 AJ |
3178 | Send HTCP to the neighbor including CLRs but only when |
3179 | they do not result from PURGE requests. | |
3180 | ||
18191440 | 3181 | htcp=forward-clr |
2b94f655 AJ |
3182 | Forward any HTCP CLR requests this proxy receives to the peer. |
3183 | ||
3184 | ||
3185 | ==== PEER SELECTION METHODS ==== | |
3186 | ||
3187 | The default peer selection method is ICP, with the first responding peer | |
3188 | being used as source. These options can be used for better load balancing. | |
3189 | ||
3190 | ||
3191 | default This is a parent cache which can be used as a "last-resort" | |
3192 | if a peer cannot be located by any of the peer-selection methods. | |
3193 | If specified more than once, only the first is used. | |
3194 | ||
3195 | round-robin Load-Balance parents which should be used in a round-robin | |
3196 | fashion in the absence of any ICP queries. | |
3197 | weight=N can be used to add bias. | |
3198 | ||
3199 | weighted-round-robin | |
3200 | Load-Balance parents which should be used in a round-robin | |
3201 | fashion with the frequency of each parent being based on the | |
3202 | round trip time. Closer parents are used more often. | |
3203 | Usually used for background-ping parents. | |
3204 | weight=N can be used to add bias. | |
3205 | ||
3206 | carp Load-Balance parents which should be used as a CARP array. | |
3207 | The requests will be distributed among the parents based on the | |
3208 | CARP load balancing hash function based on their weight. | |
3209 | ||
3210 | userhash Load-balance parents based on the client proxy_auth or ident username. | |
3211 | ||
3212 | sourcehash Load-balance parents based on the client source IP. | |
8a368316 AJ |
3213 | |
3214 | multicast-siblings | |
3215 | To be used only for cache peers of type "multicast". | |
3216 | ALL members of this multicast group have "sibling" | |
2e9993e1 | 3217 | relationship with it, not "parent". This is to a multicast |
8a368316 AJ |
3218 | group when the requested object would be fetched only from |
3219 | a "parent" cache, anyway. It's useful, e.g., when | |
3220 | configuring a pool of redundant Squid proxies, being | |
3221 | members of the same multicast group. | |
2b94f655 AJ |
3222 | |
3223 | ||
3224 | ==== PEER SELECTION OPTIONS ==== | |
3225 | ||
3226 | weight=N use to affect the selection of a peer during any weighted | |
3227 | peer-selection mechanisms. | |
3228 | The weight must be an integer; default is 1, | |
3229 | larger weights are favored more. | |
3230 | This option does not affect parent selection if a peering | |
3231 | protocol is not in use. | |
3232 | ||
3233 | basetime=N Specify a base amount to be subtracted from round trip | |
3234 | times of parents. | |
3235 | It is subtracted before division by weight in calculating | |
3236 | which parent to fectch from. If the rtt is less than the | |
3237 | base time the rtt is set to a minimal value. | |
3238 | ||
3c72389f AJ |
3239 | ttl=N Specify a TTL to use when sending multicast ICP queries |
3240 | to this address. | |
2b94f655 AJ |
3241 | Only useful when sending to a multicast group. |
3242 | Because we don't accept ICP replies from random | |
3243 | hosts, you must configure other group members as | |
3244 | peers with the 'multicast-responder' option. | |
3245 | ||
3246 | no-delay To prevent access to this neighbor from influencing the | |
3247 | delay pools. | |
3248 | ||
3249 | digest-url=URL Tell Squid to fetch the cache digest (if digests are | |
3250 | enabled) for this host from the specified URL rather | |
3251 | than the Squid default location. | |
3252 | ||
3253 | ||
de03b596 FC |
3254 | ==== CARP OPTIONS ==== |
3255 | ||
3256 | carp-key=key-specification | |
3257 | use a different key than the full URL to hash against the peer. | |
3258 | the key-specification is a comma-separated list of the keywords | |
3259 | scheme, host, port, path, params | |
3260 | Order is not important. | |
3261 | ||
2b94f655 AJ |
3262 | ==== ACCELERATOR / REVERSE-PROXY OPTIONS ==== |
3263 | ||
3264 | originserver Causes this parent to be contacted as an origin server. | |
3265 | Meant to be used in accelerator setups when the peer | |
3266 | is a web server. | |
3267 | ||
3268 | forceddomain=name | |
3269 | Set the Host header of requests forwarded to this peer. | |
3270 | Useful in accelerator setups where the server (peer) | |
3271 | expects a certain domain name but clients may request | |
3272 | others. ie example.com or www.example.com | |
3273 | ||
3274 | no-digest Disable request of cache digests. | |
3275 | ||
3276 | no-netdb-exchange | |
3277 | Disables requesting ICMP RTT database (NetDB). | |
3278 | ||
3279 | ||
3280 | ==== AUTHENTICATION OPTIONS ==== | |
3281 | ||
3282 | login=user:password | |
3283 | If this is a personal/workgroup proxy and your parent | |
3284 | requires proxy authentication. | |
3285 | ||
3286 | Note: The string can include URL escapes (i.e. %20 for | |
3287 | spaces). This also means % must be written as %%. | |
3288 | ||
11e4c5e5 AJ |
3289 | login=PASSTHRU |
3290 | Send login details received from client to this peer. | |
3291 | Both Proxy- and WWW-Authorization headers are passed | |
3292 | without alteration to the peer. | |
3293 | Authentication is not required by Squid for this to work. | |
3294 | ||
3295 | Note: This will pass any form of authentication but | |
3296 | only Basic auth will work through a proxy unless the | |
3297 | connection-auth options are also used. | |
ee0b94f4 | 3298 | |
2b94f655 AJ |
3299 | login=PASS Send login details received from client to this peer. |
3300 | Authentication is not required by this option. | |
11e4c5e5 | 3301 | |
2b94f655 AJ |
3302 | If there are no client-provided authentication headers |
3303 | to pass on, but username and password are available | |
ee0b94f4 HN |
3304 | from an external ACL user= and password= result tags |
3305 | they may be sent instead. | |
2b94f655 AJ |
3306 | |
3307 | Note: To combine this with proxy_auth both proxies must | |
3308 | share the same user database as HTTP only allows for | |
3309 | a single login (one for proxy, one for origin server). | |
3310 | Also be warned this will expose your users proxy | |
3311 | password to the peer. USE WITH CAUTION | |
3312 | ||
3313 | login=*:password | |
3314 | Send the username to the upstream cache, but with a | |
3315 | fixed password. This is meant to be used when the peer | |
3316 | is in another administrative domain, but it is still | |
3317 | needed to identify each user. | |
3318 | The star can optionally be followed by some extra | |
3319 | information which is added to the username. This can | |
3320 | be used to identify this proxy to the peer, similar to | |
3321 | the login=username:password option above. | |
3322 | ||
9ca29d23 AJ |
3323 | login=NEGOTIATE |
3324 | If this is a personal/workgroup proxy and your parent | |
3325 | requires a secure proxy authentication. | |
3326 | The first principal from the default keytab or defined by | |
3327 | the environment variable KRB5_KTNAME will be used. | |
3328 | ||
63f03f79 PL |
3329 | WARNING: The connection may transmit requests from multiple |
3330 | clients. Negotiate often assumes end-to-end authentication | |
3331 | and a single-client. Which is not strictly true here. | |
3332 | ||
9ca29d23 AJ |
3333 | login=NEGOTIATE:principal_name |
3334 | If this is a personal/workgroup proxy and your parent | |
3335 | requires a secure proxy authentication. | |
3336 | The principal principal_name from the default keytab or | |
3337 | defined by the environment variable KRB5_KTNAME will be | |
3338 | used. | |
3339 | ||
63f03f79 PL |
3340 | WARNING: The connection may transmit requests from multiple |
3341 | clients. Negotiate often assumes end-to-end authentication | |
3342 | and a single-client. Which is not strictly true here. | |
3343 | ||
2b94f655 AJ |
3344 | connection-auth=on|off |
3345 | Tell Squid that this peer does or not support Microsoft | |
3346 | connection oriented authentication, and any such | |
3347 | challenges received from there should be ignored. | |
3348 | Default is auto to automatically determine the status | |
3349 | of the peer. | |
3350 | ||
9825b398 AJ |
3351 | auth-no-keytab |
3352 | Do not use a keytab to authenticate to a peer when | |
3353 | login=NEGOTIATE is specified. Let the GSSAPI | |
3354 | implementation determine which already existing | |
3355 | credentials cache to use instead. | |
3356 | ||
2b94f655 AJ |
3357 | |
3358 | ==== SSL / HTTPS / TLS OPTIONS ==== | |
3359 | ||
0ff7e52d | 3360 | tls Encrypt connections to this peer with TLS. |
2b94f655 AJ |
3361 | |
3362 | sslcert=/path/to/ssl/certificate | |
3363 | A client SSL certificate to use when connecting to | |
3364 | this peer. | |
3365 | ||
3366 | sslkey=/path/to/ssl/key | |
3367 | The private SSL key corresponding to sslcert above. | |
3368 | If 'sslkey' is not specified 'sslcert' is assumed to | |
3369 | reference a combined file containing both the | |
3370 | certificate and the key. | |
3371 | ||
2b94f655 AJ |
3372 | sslcipher=... The list of valid SSL ciphers to use when connecting |
3373 | to this peer. | |
1cc44095 AJ |
3374 | |
3375 | tls-min-version=1.N | |
3376 | The minimum TLS protocol version to permit. To control | |
3377 | SSLv3 use the ssloptions= parameter. | |
3378 | Supported Values: 1.0 (default), 1.1, 1.2 | |
3379 | ||
943c5f16 HN |
3380 | ssloptions=... Specify various SSL implementation options: |
3381 | ||
3d96b0e8 | 3382 | NO_SSLv3 Disallow the use of SSLv3 |
1f1f29e8 | 3383 | |
3d96b0e8 | 3384 | NO_TLSv1 Disallow the use of TLSv1.0 |
1f1f29e8 | 3385 | |
3d96b0e8 | 3386 | NO_TLSv1_1 Disallow the use of TLSv1.1 |
1f1f29e8 | 3387 | |
3d96b0e8 | 3388 | NO_TLSv1_2 Disallow the use of TLSv1.2 |
1f1f29e8 | 3389 | |
943c5f16 HN |
3390 | SINGLE_DH_USE |
3391 | Always create a new key when using | |
3392 | temporary/ephemeral DH key exchanges | |
1f1f29e8 | 3393 | |
ce0adf1a | 3394 | NO_TICKET |
1f1f29e8 AJ |
3395 | Disable use of RFC5077 session tickets. |
3396 | Some servers may have problems | |
3397 | understanding the TLS extension due | |
3398 | to ambiguous specification in RFC4507. | |
3399 | ||
943c5f16 HN |
3400 | ALL Enable various bug workarounds |
3401 | suggested as "harmless" by OpenSSL | |
3402 | Be warned that this reduces SSL/TLS | |
3403 | strength to some attacks. | |
3404 | ||
3405 | See the OpenSSL SSL_CTX_set_options documentation for a | |
3406 | more complete list. | |
2b94f655 | 3407 | |
86a84cc0 AJ |
3408 | tls-cafile= PEM file containing CA certificates to use when verifying |
3409 | the peer certificate. May be repeated to load multiple files. | |
2b94f655 AJ |
3410 | |
3411 | sslcapath=... A directory containing additional CA certificates to | |
3412 | use when verifying the peer certificate. | |
86a84cc0 | 3413 | Requires OpenSSL or LibreSSL. |
2b94f655 AJ |
3414 | |
3415 | sslcrlfile=... A certificate revocation list file to use when | |
3416 | verifying the peer certificate. | |
3417 | ||
3418 | sslflags=... Specify various flags modifying the SSL implementation: | |
3419 | ||
41bd17a4 | 3420 | DONT_VERIFY_PEER |
3421 | Accept certificates even if they fail to | |
3422 | verify. | |
1f1f29e8 | 3423 | |
41bd17a4 | 3424 | DONT_VERIFY_DOMAIN |
3425 | Don't verify the peer certificate | |
3426 | matches the server name | |
2b94f655 AJ |
3427 | |
3428 | ssldomain= The peer name as advertised in it's certificate. | |
3429 | Used for verifying the correctness of the received peer | |
3430 | certificate. If not specified the peer hostname will be | |
3431 | used. | |
3432 | ||
bad9c5e4 | 3433 | front-end-https[=off|on|auto] |
2b94f655 AJ |
3434 | Enable the "Front-End-Https: On" header needed when |
3435 | using Squid as a SSL frontend in front of Microsoft OWA. | |
3436 | See MS KB document Q307347 for details on this header. | |
3437 | If set to auto the header will only be added if the | |
3438 | request is forwarded as a https:// URL. | |
435c72b0 AJ |
3439 | |
3440 | tls-default-ca[=off] | |
3441 | Whether to use the system Trusted CAs. Default is ON. | |
2b94f655 | 3442 | |
b05d749d AJ |
3443 | tls-no-npn Do not use the TLS NPN extension to advertise HTTP/1.1. |
3444 | ||
2b94f655 AJ |
3445 | ==== GENERAL OPTIONS ==== |
3446 | ||
3447 | connect-timeout=N | |
3448 | A peer-specific connect timeout. | |
3449 | Also see the peer_connect_timeout directive. | |
3450 | ||
3451 | connect-fail-limit=N | |
3452 | How many times connecting to a peer must fail before | |
e8dca475 CT |
3453 | it is marked as down. Standby connection failures |
3454 | count towards this limit. Default is 10. | |
2b94f655 AJ |
3455 | |
3456 | allow-miss Disable Squid's use of only-if-cached when forwarding | |
3457 | requests to siblings. This is primarily useful when | |
a5bb0c26 AR |
3458 | icp_hit_stale is used by the sibling. Excessive use |
3459 | of this option may result in forwarding loops. One way | |
3460 | to prevent peering loops when using this option, is to | |
3461 | deny cache peer usage on requests from a peer: | |
3462 | acl fromPeer ... | |
3463 | cache_peer_access peerName deny fromPeer | |
2b94f655 | 3464 | |
e8dca475 CT |
3465 | max-conn=N Limit the number of concurrent connections the Squid |
3466 | may open to this peer, including already opened idle | |
3467 | and standby connections. There is no peer-specific | |
3468 | connection limit by default. | |
3469 | ||
3470 | A peer exceeding the limit is not used for new | |
3471 | requests unless a standby connection is available. | |
3472 | ||
3473 | max-conn currently works poorly with idle persistent | |
3474 | connections: When a peer reaches its max-conn limit, | |
3475 | and there are idle persistent connections to the peer, | |
3476 | the peer may not be selected because the limiting code | |
3477 | does not know whether Squid can reuse those idle | |
3478 | connections. | |
3479 | ||
3480 | standby=N Maintain a pool of N "hot standby" connections to an | |
3481 | UP peer, available for requests when no idle | |
3482 | persistent connection is available (or safe) to use. | |
3483 | By default and with zero N, no such pool is maintained. | |
3484 | N must not exceed the max-conn limit (if any). | |
3485 | ||
3486 | At start or after reconfiguration, Squid opens new TCP | |
3487 | standby connections until there are N connections | |
3488 | available and then replenishes the standby pool as | |
3489 | opened connections are used up for requests. A used | |
3490 | connection never goes back to the standby pool, but | |
3491 | may go to the regular idle persistent connection pool | |
3492 | shared by all peers and origin servers. | |
3493 | ||
3494 | Squid never opens multiple new standby connections | |
3495 | concurrently. This one-at-a-time approach minimizes | |
3496 | flooding-like effect on peers. Furthermore, just a few | |
3497 | standby connections should be sufficient in most cases | |
3498 | to supply most new requests with a ready-to-use | |
3499 | connection. | |
3500 | ||
3501 | Standby connections obey server_idle_pconn_timeout. | |
3502 | For the feature to work as intended, the peer must be | |
3503 | configured to accept and keep them open longer than | |
3504 | the idle timeout at the connecting Squid, to minimize | |
3505 | race conditions typical to idle used persistent | |
3506 | connections. Default request_timeout and | |
3507 | server_idle_pconn_timeout values ensure such a | |
3508 | configuration. | |
2b94f655 AJ |
3509 | |
3510 | name=xxx Unique name for the peer. | |
3511 | Required if you have multiple peers on the same host | |
3512 | but different ports. | |
3513 | This name can be used in cache_peer_access and similar | |
a5bb0c26 | 3514 | directives to identify the peer. |
2b94f655 AJ |
3515 | Can be used by outgoing access controls through the |
3516 | peername ACL type. | |
3517 | ||
b0758e04 AJ |
3518 | no-tproxy Do not use the client-spoof TPROXY support when forwarding |
3519 | requests to this peer. Use normal address selection instead. | |
0d901ef4 | 3520 | This overrides the spoof_client_ip ACL. |
b0758e04 | 3521 | |
2b94f655 AJ |
3522 | proxy-only objects fetched from the peer will not be stored locally. |
3523 | ||
41bd17a4 | 3524 | DOC_END |
cccac0a2 | 3525 | |
41bd17a4 | 3526 | NAME: cache_peer_access |
3527 | TYPE: peer_access | |
3528 | DEFAULT: none | |
a5bb0c26 | 3529 | DEFAULT_DOC: No peer usage restrictions. |
41bd17a4 | 3530 | LOC: none |
3531 | DOC_START | |
a5bb0c26 | 3532 | Restricts usage of cache_peer proxies. |
cccac0a2 | 3533 | |
638402dd | 3534 | Usage: |
a5bb0c26 AR |
3535 | cache_peer_access peer-name allow|deny [!]aclname ... |
3536 | ||
3537 | For the required peer-name parameter, use either the value of the | |
3538 | cache_peer name=value parameter or, if name=value is missing, the | |
3539 | cache_peer hostname parameter. | |
3540 | ||
3541 | This directive narrows down the selection of peering candidates, but | |
3542 | does not determine the order in which the selected candidates are | |
3543 | contacted. That order is determined by the peer selection algorithms | |
3544 | (see PEER SELECTION sections in the cache_peer documentation). | |
3545 | ||
3546 | If a deny rule matches, the corresponding peer will not be contacted | |
3547 | for the current transaction -- Squid will not send ICP queries and | |
3548 | will not forward HTTP requests to that peer. An allow match leaves | |
3549 | the corresponding peer in the selection. The first match for a given | |
3550 | peer wins for that peer. | |
3551 | ||
3552 | The relative order of cache_peer_access directives for the same peer | |
3553 | matters. The relative order of any two cache_peer_access directives | |
3554 | for different peers does not matter. To ease interpretation, it is a | |
3555 | good idea to group cache_peer_access directives for the same peer | |
3556 | together. | |
3557 | ||
3558 | A single cache_peer_access directive may be evaluated multiple times | |
3559 | for a given transaction because individual peer selection algorithms | |
3560 | may check it independently from each other. These redundant checks | |
3561 | may be optimized away in future Squid versions. | |
3562 | ||
3563 | This clause only supports fast acl types. | |
3564 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
dd9b1776 | 3565 | |
41bd17a4 | 3566 | DOC_END |
dd9b1776 | 3567 | |
41bd17a4 | 3568 | NAME: neighbor_type_domain |
3569 | TYPE: hostdomaintype | |
3570 | DEFAULT: none | |
638402dd | 3571 | DEFAULT_DOC: The peer type from cache_peer directive is used for all requests to that peer. |
41bd17a4 | 3572 | LOC: none |
3573 | DOC_START | |
638402dd AJ |
3574 | Modify the cache_peer neighbor type when passing requests |
3575 | about specific domains to the peer. | |
cccac0a2 | 3576 | |
638402dd AJ |
3577 | Usage: |
3578 | neighbor_type_domain neighbor parent|sibling domain domain ... | |
6bf4f823 | 3579 | |
638402dd AJ |
3580 | For example: |
3581 | cache_peer foo.example.com parent 3128 3130 | |
3582 | neighbor_type_domain foo.example.com sibling .au .de | |
6bf4f823 | 3583 | |
638402dd AJ |
3584 | The above configuration treats all requests to foo.example.com as a |
3585 | parent proxy unless the request is for a .au or .de ccTLD domain name. | |
41bd17a4 | 3586 | DOC_END |
6bf4f823 | 3587 | |
41bd17a4 | 3588 | NAME: dead_peer_timeout |
3589 | COMMENT: (seconds) | |
3590 | DEFAULT: 10 seconds | |
3591 | TYPE: time_t | |
3592 | LOC: Config.Timeout.deadPeer | |
3593 | DOC_START | |
3594 | This controls how long Squid waits to declare a peer cache | |
3595 | as "dead." If there are no ICP replies received in this | |
3596 | amount of time, Squid will declare the peer dead and not | |
3597 | expect to receive any further ICP replies. However, it | |
3598 | continues to send ICP queries, and will mark the peer as | |
3599 | alive upon receipt of the first subsequent ICP reply. | |
699acd19 | 3600 | |
41bd17a4 | 3601 | This timeout also affects when Squid expects to receive ICP |
3602 | replies from peers. If more than 'dead_peer' seconds have | |
3603 | passed since the last ICP reply was received, Squid will not | |
3604 | expect to receive an ICP reply on the next query. Thus, if | |
3605 | your time between requests is greater than this timeout, you | |
3606 | will see a lot of requests sent DIRECT to origin servers | |
3607 | instead of to your parents. | |
3608 | DOC_END | |
cccac0a2 | 3609 | |
437823b4 | 3610 | NAME: forward_max_tries |
6c367206 | 3611 | DEFAULT: 25 |
437823b4 AJ |
3612 | TYPE: int |
3613 | LOC: Config.forward_max_tries | |
3614 | DOC_START | |
3615 | Controls how many different forward paths Squid will try | |
3616 | before giving up. See also forward_timeout. | |
31ef19cd AJ |
3617 | |
3618 | NOTE: connect_retries (default: none) can make each of these | |
3619 | possible forwarding paths be tried multiple times. | |
437823b4 AJ |
3620 | DOC_END |
3621 | ||
41bd17a4 | 3622 | COMMENT_START |
3623 | MEMORY CACHE OPTIONS | |
3624 | ----------------------------------------------------------------------------- | |
3625 | COMMENT_END | |
3626 | ||
3627 | NAME: cache_mem | |
3628 | COMMENT: (bytes) | |
3629 | TYPE: b_size_t | |
df2eec10 | 3630 | DEFAULT: 256 MB |
41bd17a4 | 3631 | LOC: Config.memMaxSize |
6b698a21 | 3632 | DOC_START |
41bd17a4 | 3633 | NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE. |
3634 | IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL | |
3635 | USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER | |
3636 | THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS. | |
3637 | ||
3638 | 'cache_mem' specifies the ideal amount of memory to be used | |
3639 | for: | |
3640 | * In-Transit objects | |
3641 | * Hot Objects | |
3642 | * Negative-Cached objects | |
3643 | ||
3644 | Data for these objects are stored in 4 KB blocks. This | |
3645 | parameter specifies the ideal upper limit on the total size of | |
3646 | 4 KB blocks allocated. In-Transit objects take the highest | |
3647 | priority. | |
3648 | ||
3649 | In-transit objects have priority over the others. When | |
3650 | additional space is needed for incoming data, negative-cached | |
3651 | and hot objects will be released. In other words, the | |
3652 | negative-cached and hot objects will fill up any unused space | |
3653 | not needed for in-transit objects. | |
3654 | ||
3655 | If circumstances require, this limit will be exceeded. | |
3656 | Specifically, if your incoming request rate requires more than | |
3657 | 'cache_mem' of memory to hold in-transit objects, Squid will | |
3658 | exceed this limit to satisfy the new requests. When the load | |
3659 | decreases, blocks will be freed until the high-water mark is | |
3660 | reached. Thereafter, blocks will be used to store hot | |
3661 | objects. | |
29f35ca5 AR |
3662 | |
3663 | If shared memory caching is enabled, Squid does not use the shared | |
3664 | cache space for in-transit objects, but they still consume as much | |
3665 | local memory as they need. For more details about the shared memory | |
3666 | cache, see memory_cache_shared. | |
6b698a21 | 3667 | DOC_END |
0976f8db | 3668 | |
41bd17a4 | 3669 | NAME: maximum_object_size_in_memory |
3670 | COMMENT: (bytes) | |
3671 | TYPE: b_size_t | |
df2eec10 | 3672 | DEFAULT: 512 KB |
41bd17a4 | 3673 | LOC: Config.Store.maxInMemObjSize |
6b698a21 | 3674 | DOC_START |
41bd17a4 | 3675 | Objects greater than this size will not be attempted to kept in |
3676 | the memory cache. This should be set high enough to keep objects | |
3677 | accessed frequently in memory to improve performance whilst low | |
3678 | enough to keep larger objects from hoarding cache_mem. | |
6b698a21 | 3679 | DOC_END |
0976f8db | 3680 | |
57af1e3f AR |
3681 | NAME: memory_cache_shared |
3682 | COMMENT: on|off | |
3683 | TYPE: YesNoNone | |
3684 | LOC: Config.memShared | |
3685 | DEFAULT: none | |
70f856bc | 3686 | DEFAULT_DOC: "on" where supported if doing memory caching with multiple SMP workers. |
57af1e3f AR |
3687 | DOC_START |
3688 | Controls whether the memory cache is shared among SMP workers. | |
3689 | ||
70f856bc AR |
3690 | The shared memory cache is meant to occupy cache_mem bytes and replace |
3691 | the non-shared memory cache, although some entities may still be | |
3692 | cached locally by workers for now (e.g., internal and in-transit | |
3693 | objects may be served from a local memory cache even if shared memory | |
3694 | caching is enabled). | |
3695 | ||
65b81b27 | 3696 | By default, the memory cache is shared if and only if all of the |
70f856bc AR |
3697 | following conditions are satisfied: Squid runs in SMP mode with |
3698 | multiple workers, cache_mem is positive, and Squid environment | |
3699 | supports required IPC primitives (e.g., POSIX shared memory segments | |
3700 | and GCC-style atomic operations). | |
3701 | ||
3702 | To avoid blocking locks, shared memory uses opportunistic algorithms | |
3703 | that do not guarantee that every cachable entity that could have been | |
3704 | shared among SMP workers will actually be shared. | |
57af1e3f AR |
3705 | DOC_END |
3706 | ||
ea21d497 HN |
3707 | NAME: memory_cache_mode |
3708 | TYPE: memcachemode | |
3709 | LOC: Config | |
3710 | DEFAULT: always | |
638402dd | 3711 | DEFAULT_DOC: Keep the most recently fetched objects in memory |
ff4b33f4 | 3712 | DOC_START |
ea21d497 | 3713 | Controls which objects to keep in the memory cache (cache_mem) |
ff4b33f4 | 3714 | |
ea21d497 HN |
3715 | always Keep most recently fetched objects in memory (default) |
3716 | ||
3717 | disk Only disk cache hits are kept in memory, which means | |
3718 | an object must first be cached on disk and then hit | |
3719 | a second time before cached in memory. | |
3720 | ||
3721 | network Only objects fetched from network is kept in memory | |
ff4b33f4 HN |
3722 | DOC_END |
3723 | ||
41bd17a4 | 3724 | NAME: memory_replacement_policy |
3725 | TYPE: removalpolicy | |
3726 | LOC: Config.memPolicy | |
3727 | DEFAULT: lru | |
6b698a21 | 3728 | DOC_START |
41bd17a4 | 3729 | The memory replacement policy parameter determines which |
3730 | objects are purged from memory when memory space is needed. | |
7f7db318 | 3731 | |
638402dd | 3732 | See cache_replacement_policy for details on algorithms. |
41bd17a4 | 3733 | DOC_END |
6b698a21 | 3734 | |
41bd17a4 | 3735 | COMMENT_START |
3736 | DISK CACHE OPTIONS | |
3737 | ----------------------------------------------------------------------------- | |
3738 | COMMENT_END | |
6b698a21 | 3739 | |
41bd17a4 | 3740 | NAME: cache_replacement_policy |
3741 | TYPE: removalpolicy | |
3742 | LOC: Config.replPolicy | |
3743 | DEFAULT: lru | |
3744 | DOC_START | |
3745 | The cache replacement policy parameter determines which | |
3746 | objects are evicted (replaced) when disk space is needed. | |
6b698a21 | 3747 | |
41bd17a4 | 3748 | lru : Squid's original list based LRU policy |
3749 | heap GDSF : Greedy-Dual Size Frequency | |
3750 | heap LFUDA: Least Frequently Used with Dynamic Aging | |
3751 | heap LRU : LRU policy implemented using a heap | |
6b698a21 | 3752 | |
638402dd | 3753 | Applies to any cache_dir lines listed below this directive. |
7f7db318 | 3754 | |
41bd17a4 | 3755 | The LRU policies keeps recently referenced objects. |
0976f8db | 3756 | |
41bd17a4 | 3757 | The heap GDSF policy optimizes object hit rate by keeping smaller |
3758 | popular objects in cache so it has a better chance of getting a | |
3759 | hit. It achieves a lower byte hit rate than LFUDA though since | |
3760 | it evicts larger (possibly popular) objects. | |
0976f8db | 3761 | |
41bd17a4 | 3762 | The heap LFUDA policy keeps popular objects in cache regardless of |
3763 | their size and thus optimizes byte hit rate at the expense of | |
3764 | hit rate since one large, popular object will prevent many | |
3765 | smaller, slightly less popular objects from being cached. | |
0976f8db | 3766 | |
41bd17a4 | 3767 | Both policies utilize a dynamic aging mechanism that prevents |
3768 | cache pollution that can otherwise occur with frequency-based | |
3769 | replacement policies. | |
7d90757b | 3770 | |
41bd17a4 | 3771 | NOTE: if using the LFUDA replacement policy you should increase |
b51ec8c8 | 3772 | the value of maximum_object_size above its default of 4 MB to |
41bd17a4 | 3773 | to maximize the potential byte hit rate improvement of LFUDA. |
dc1af3cf | 3774 | |
41bd17a4 | 3775 | For more information about the GDSF and LFUDA cache replacement |
3776 | policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html | |
3777 | and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html. | |
6b698a21 | 3778 | DOC_END |
0976f8db | 3779 | |
a345387f AJ |
3780 | NAME: minimum_object_size |
3781 | COMMENT: (bytes) | |
3782 | TYPE: b_int64_t | |
3783 | DEFAULT: 0 KB | |
3784 | DEFAULT_DOC: no limit | |
3785 | LOC: Config.Store.minObjectSize | |
3786 | DOC_START | |
3787 | Objects smaller than this size will NOT be saved on disk. The | |
3788 | value is specified in bytes, and the default is 0 KB, which | |
3789 | means all responses can be stored. | |
3790 | DOC_END | |
3791 | ||
3792 | NAME: maximum_object_size | |
3793 | COMMENT: (bytes) | |
3794 | TYPE: b_int64_t | |
3795 | DEFAULT: 4 MB | |
3796 | LOC: Config.Store.maxObjectSize | |
3797 | DOC_START | |
499f852c | 3798 | Set the default value for max-size parameter on any cache_dir. |
a345387f AJ |
3799 | The value is specified in bytes, and the default is 4 MB. |
3800 | ||
3801 | If you wish to get a high BYTES hit ratio, you should probably | |
3802 | increase this (one 32 MB object hit counts for 3200 10KB | |
3803 | hits). | |
3804 | ||
3805 | If you wish to increase hit ratio more than you want to | |
3806 | save bandwidth you should leave this low. | |
3807 | ||
3808 | NOTE: if using the LFUDA replacement policy you should increase | |
3809 | this value to maximize the byte hit rate improvement of LFUDA! | |
3810 | See cache_replacement_policy for a discussion of this policy. | |
3811 | DOC_END | |
3812 | ||
41bd17a4 | 3813 | NAME: cache_dir |
3814 | TYPE: cachedir | |
3815 | DEFAULT: none | |
638402dd | 3816 | DEFAULT_DOC: No disk cache. Store cache ojects only in memory. |
41bd17a4 | 3817 | LOC: Config.cacheSwap |
6b698a21 | 3818 | DOC_START |
638402dd AJ |
3819 | Format: |
3820 | cache_dir Type Directory-Name Fs-specific-data [options] | |
0976f8db | 3821 | |
41bd17a4 | 3822 | You can specify multiple cache_dir lines to spread the |
3823 | cache among different disk partitions. | |
0976f8db | 3824 | |
41bd17a4 | 3825 | Type specifies the kind of storage system to use. Only "ufs" |
3826 | is built by default. To enable any of the other storage systems | |
3827 | see the --enable-storeio configure option. | |
0976f8db | 3828 | |
41bd17a4 | 3829 | 'Directory' is a top-level directory where cache swap |
3830 | files will be stored. If you want to use an entire disk | |
3831 | for caching, this can be the mount-point directory. | |
3832 | The directory must exist and be writable by the Squid | |
3833 | process. Squid will NOT create this directory for you. | |
0976f8db | 3834 | |
acf69d74 AJ |
3835 | In SMP configurations, cache_dir must not precede the workers option |
3836 | and should use configuration macros or conditionals to give each | |
3837 | worker interested in disk caching a dedicated cache directory. | |
3838 | ||
638402dd AJ |
3839 | |
3840 | ==== The ufs store type ==== | |
0976f8db | 3841 | |
41bd17a4 | 3842 | "ufs" is the old well-known Squid storage format that has always |
3843 | been there. | |
0976f8db | 3844 | |
638402dd AJ |
3845 | Usage: |
3846 | cache_dir ufs Directory-Name Mbytes L1 L2 [options] | |
0976f8db | 3847 | |
41bd17a4 | 3848 | 'Mbytes' is the amount of disk space (MB) to use under this |
3849 | directory. The default is 100 MB. Change this to suit your | |
3850 | configuration. Do NOT put the size of your disk drive here. | |
3851 | Instead, if you want Squid to use the entire disk drive, | |
3852 | subtract 20% and use that value. | |
0976f8db | 3853 | |
56fba4d0 | 3854 | 'L1' is the number of first-level subdirectories which |
41bd17a4 | 3855 | will be created under the 'Directory'. The default is 16. |
0976f8db | 3856 | |
56fba4d0 | 3857 | 'L2' is the number of second-level subdirectories which |
41bd17a4 | 3858 | will be created under each first-level directory. The default |
3859 | is 256. | |
0976f8db | 3860 | |
638402dd AJ |
3861 | |
3862 | ==== The aufs store type ==== | |
7f7db318 | 3863 | |
41bd17a4 | 3864 | "aufs" uses the same storage format as "ufs", utilizing |
3865 | POSIX-threads to avoid blocking the main Squid process on | |
3866 | disk-I/O. This was formerly known in Squid as async-io. | |
38f9c547 | 3867 | |
638402dd AJ |
3868 | Usage: |
3869 | cache_dir aufs Directory-Name Mbytes L1 L2 [options] | |
38f9c547 | 3870 | |
41bd17a4 | 3871 | see argument descriptions under ufs above |
38f9c547 | 3872 | |
638402dd AJ |
3873 | |
3874 | ==== The diskd store type ==== | |
38f9c547 | 3875 | |
41bd17a4 | 3876 | "diskd" uses the same storage format as "ufs", utilizing a |
3877 | separate process to avoid blocking the main Squid process on | |
3878 | disk-I/O. | |
4c3ef9b2 | 3879 | |
638402dd AJ |
3880 | Usage: |
3881 | cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n] | |
0976f8db | 3882 | |
41bd17a4 | 3883 | see argument descriptions under ufs above |
0976f8db | 3884 | |
41bd17a4 | 3885 | Q1 specifies the number of unacknowledged I/O requests when Squid |
3886 | stops opening new files. If this many messages are in the queues, | |
3887 | Squid won't open new files. Default is 64 | |
0976f8db | 3888 | |
41bd17a4 | 3889 | Q2 specifies the number of unacknowledged messages when Squid |
3890 | starts blocking. If this many messages are in the queues, | |
3891 | Squid blocks until it receives some replies. Default is 72 | |
0976f8db | 3892 | |
41bd17a4 | 3893 | When Q1 < Q2 (the default), the cache directory is optimized |
3894 | for lower response time at the expense of a decrease in hit | |
3895 | ratio. If Q1 > Q2, the cache directory is optimized for | |
3896 | higher hit ratio at the expense of an increase in response | |
3897 | time. | |
0976f8db | 3898 | |
e2851fe7 | 3899 | |
638402dd AJ |
3900 | ==== The rock store type ==== |
3901 | ||
3902 | Usage: | |
e51ce7da | 3903 | cache_dir rock Directory-Name Mbytes [options] |
e2851fe7 | 3904 | |
2e55f083 | 3905 | The Rock Store type is a database-style storage. All cached |
e51ce7da AR |
3906 | entries are stored in a "database" file, using fixed-size slots. |
3907 | A single entry occupies one or more slots. | |
e2851fe7 | 3908 | |
3e1dfe3d AR |
3909 | If possible, Squid using Rock Store creates a dedicated kid |
3910 | process called "disker" to avoid blocking Squid worker(s) on disk | |
3911 | I/O. One disker kid is created for each rock cache_dir. Diskers | |
3912 | are created only when Squid, running in daemon mode, has support | |
3913 | for the IpcIo disk I/O module. | |
3914 | ||
43ebbac3 AR |
3915 | swap-timeout=msec: Squid will not start writing a miss to or |
3916 | reading a hit from disk if it estimates that the swap operation | |
3917 | will take more than the specified number of milliseconds. By | |
3918 | default and when set to zero, disables the disk I/O time limit | |
3919 | enforcement. Ignored when using blocking I/O module because | |
3920 | blocking synchronous I/O does not allow Squid to estimate the | |
3921 | expected swap wait time. | |
3922 | ||
df881a0f | 3923 | max-swap-rate=swaps/sec: Artificially limits disk access using |
1e614370 | 3924 | the specified I/O rate limit. Swap out requests that |
df881a0f | 3925 | would cause the average I/O rate to exceed the limit are |
1e614370 DK |
3926 | delayed. Individual swap in requests (i.e., hits or reads) are |
3927 | not delayed, but they do contribute to measured swap rate and | |
3928 | since they are placed in the same FIFO queue as swap out | |
3929 | requests, they may wait longer if max-swap-rate is smaller. | |
3930 | This is necessary on file systems that buffer "too | |
df881a0f AR |
3931 | many" writes and then start blocking Squid and other processes |
3932 | while committing those writes to disk. Usually used together | |
3933 | with swap-timeout to avoid excessive delays and queue overflows | |
3934 | when disk demand exceeds available disk "bandwidth". By default | |
3935 | and when set to zero, disables the disk I/O rate limit | |
3936 | enforcement. Currently supported by IpcIo module only. | |
3937 | ||
e51ce7da AR |
3938 | slot-size=bytes: The size of a database "record" used for |
3939 | storing cached responses. A cached response occupies at least | |
3940 | one slot and all database I/O is done using individual slots so | |
3941 | increasing this parameter leads to more disk space waste while | |
3942 | decreasing it leads to more disk I/O overheads. Should be a | |
3943 | multiple of your operating system I/O page size. Defaults to | |
3944 | 16KBytes. A housekeeping header is stored with each slot and | |
3945 | smaller slot-sizes will be rejected. The header is smaller than | |
3946 | 100 bytes. | |
3947 | ||
df881a0f | 3948 | |
638402dd | 3949 | ==== COMMON OPTIONS ==== |
0976f8db | 3950 | |
638402dd AJ |
3951 | no-store no new objects should be stored to this cache_dir. |
3952 | ||
3953 | min-size=n the minimum object size in bytes this cache_dir | |
3954 | will accept. It's used to restrict a cache_dir | |
3955 | to only store large objects (e.g. AUFS) while | |
3956 | other stores are optimized for smaller objects | |
73656056 | 3957 | (e.g. Rock). |
638402dd | 3958 | Defaults to 0. |
0976f8db | 3959 | |
638402dd AJ |
3960 | max-size=n the maximum object size in bytes this cache_dir |
3961 | supports. | |
499f852c A |
3962 | The value in maximum_object_size directive sets |
3963 | the default unless more specific details are | |
3964 | available (ie a small store capacity). | |
b6662ffd | 3965 | |
41bd17a4 | 3966 | Note: To make optimal use of the max-size limits you should order |
638402dd | 3967 | the cache_dir lines with the smallest max-size value first. |
0976f8db | 3968 | |
bebc043b | 3969 | NOCOMMENT_START |
e0855596 AJ |
3970 | |
3971 | # Uncomment and adjust the following to add a disk cache directory. | |
3972 | #cache_dir ufs @DEFAULT_SWAP_DIR@ 100 16 256 | |
bebc043b | 3973 | NOCOMMENT_END |
6b698a21 | 3974 | DOC_END |
0976f8db | 3975 | |
41bd17a4 | 3976 | NAME: store_dir_select_algorithm |
3977 | TYPE: string | |
3978 | LOC: Config.store_dir_select_algorithm | |
3979 | DEFAULT: least-load | |
6b698a21 | 3980 | DOC_START |
638402dd AJ |
3981 | How Squid selects which cache_dir to use when the response |
3982 | object will fit into more than one. | |
3983 | ||
3984 | Regardless of which algorithm is used the cache_dir min-size | |
3985 | and max-size parameters are obeyed. As such they can affect | |
3986 | the selection algorithm by limiting the set of considered | |
3987 | cache_dir. | |
3988 | ||
3989 | Algorithms: | |
3990 | ||
3991 | least-load | |
3992 | ||
3993 | This algorithm is suited to caches with similar cache_dir | |
3994 | sizes and disk speeds. | |
3995 | ||
3996 | The disk with the least I/O pending is selected. | |
3997 | When there are multiple disks with the same I/O load ranking | |
3998 | the cache_dir with most available capacity is selected. | |
3999 | ||
4000 | When a mix of cache_dir sizes are configured the faster disks | |
4001 | have a naturally lower I/O loading and larger disks have more | |
4002 | capacity. So space used to store objects and data throughput | |
4003 | may be very unbalanced towards larger disks. | |
4004 | ||
4005 | ||
4006 | round-robin | |
4007 | ||
4008 | This algorithm is suited to caches with unequal cache_dir | |
4009 | disk sizes. | |
4010 | ||
4011 | Each cache_dir is selected in a rotation. The next suitable | |
4012 | cache_dir is used. | |
4013 | ||
4014 | Available cache_dir capacity is only considered in relation | |
4015 | to whether the object will fit and meets the min-size and | |
4016 | max-size parameters. | |
4017 | ||
4018 | Disk I/O loading is only considered to prevent overload on slow | |
4019 | disks. This algorithm does not spread objects by size, so any | |
4020 | I/O loading per-disk may appear very unbalanced and volatile. | |
4021 | ||
29a238a3 AR |
4022 | If several cache_dirs use similar min-size, max-size, or other |
4023 | limits to to reject certain responses, then do not group such | |
4024 | cache_dir lines together, to avoid round-robin selection bias | |
4025 | towards the first cache_dir after the group. Instead, interleave | |
4026 | cache_dir lines from different groups. For example: | |
4027 | ||
4028 | store_dir_select_algorithm round-robin | |
4029 | cache_dir rock /hdd1 ... min-size=100000 | |
4030 | cache_dir rock /ssd1 ... max-size=99999 | |
4031 | cache_dir rock /hdd2 ... min-size=100000 | |
4032 | cache_dir rock /ssd2 ... max-size=99999 | |
4033 | cache_dir rock /hdd3 ... min-size=100000 | |
4034 | cache_dir rock /ssd3 ... max-size=99999 | |
6b698a21 | 4035 | DOC_END |
0976f8db | 4036 | |
41bd17a4 | 4037 | NAME: max_open_disk_fds |
4038 | TYPE: int | |
4039 | LOC: Config.max_open_disk_fds | |
4040 | DEFAULT: 0 | |
638402dd | 4041 | DEFAULT_DOC: no limit |
6b698a21 | 4042 | DOC_START |
41bd17a4 | 4043 | To avoid having disk as the I/O bottleneck Squid can optionally |
4044 | bypass the on-disk cache if more than this amount of disk file | |
4045 | descriptors are open. | |
4046 | ||
4047 | A value of 0 indicates no limit. | |
6b698a21 | 4048 | DOC_END |
0976f8db | 4049 | |
41bd17a4 | 4050 | NAME: cache_swap_low |
4051 | COMMENT: (percent, 0-100) | |
5473c134 | 4052 | TYPE: int |
41bd17a4 | 4053 | DEFAULT: 90 |
4054 | LOC: Config.Swap.lowWaterMark | |
638402dd | 4055 | DOC_START |
5f662601 AJ |
4056 | The low-water mark for AUFS/UFS/diskd cache object eviction by |
4057 | the cache_replacement_policy algorithm. | |
4058 | ||
4059 | Removal begins when the swap (disk) usage of a cache_dir is | |
4060 | above this low-water mark and attempts to maintain utilization | |
4061 | near the low-water mark. | |
4062 | ||
4063 | As swap utilization increases towards the high-water mark set | |
4064 | by cache_swap_high object eviction becomes more agressive. | |
4065 | ||
4066 | The value difference in percentages between low- and high-water | |
7bcaf76f | 4067 | marks represent an eviction rate of 300 objects per second and |
5f662601 AJ |
4068 | the rate continues to scale in agressiveness by multiples of |
4069 | this above the high-water mark. | |
638402dd AJ |
4070 | |
4071 | Defaults are 90% and 95%. If you have a large cache, 5% could be | |
4072 | hundreds of MB. If this is the case you may wish to set these | |
4073 | numbers closer together. | |
4074 | ||
5f662601 | 4075 | See also cache_swap_high and cache_replacement_policy |
638402dd | 4076 | DOC_END |
41bd17a4 | 4077 | |
4078 | NAME: cache_swap_high | |
4079 | COMMENT: (percent, 0-100) | |
4080 | TYPE: int | |
4081 | DEFAULT: 95 | |
4082 | LOC: Config.Swap.highWaterMark | |
6b698a21 | 4083 | DOC_START |
5f662601 AJ |
4084 | The high-water mark for AUFS/UFS/diskd cache object eviction by |
4085 | the cache_replacement_policy algorithm. | |
4086 | ||
4087 | Removal begins when the swap (disk) usage of a cache_dir is | |
4088 | above the low-water mark set by cache_swap_low and attempts to | |
4089 | maintain utilization near the low-water mark. | |
4090 | ||
4091 | As swap utilization increases towards this high-water mark object | |
4092 | eviction becomes more agressive. | |
4093 | ||
4094 | The value difference in percentages between low- and high-water | |
7bcaf76f | 4095 | marks represent an eviction rate of 300 objects per second and |
5f662601 AJ |
4096 | the rate continues to scale in agressiveness by multiples of |
4097 | this above the high-water mark. | |
41bd17a4 | 4098 | |
4099 | Defaults are 90% and 95%. If you have a large cache, 5% could be | |
4100 | hundreds of MB. If this is the case you may wish to set these | |
4101 | numbers closer together. | |
638402dd | 4102 | |
5f662601 | 4103 | See also cache_swap_low and cache_replacement_policy |
6b698a21 | 4104 | DOC_END |
0976f8db | 4105 | |
5473c134 | 4106 | COMMENT_START |
41bd17a4 | 4107 | LOGFILE OPTIONS |
5473c134 | 4108 | ----------------------------------------------------------------------------- |
4109 | COMMENT_END | |
0976f8db | 4110 | |
41bd17a4 | 4111 | NAME: logformat |
4112 | TYPE: logformat | |
20efa1c2 | 4113 | LOC: Log::TheConfig |
5473c134 | 4114 | DEFAULT: none |
638402dd | 4115 | DEFAULT_DOC: The format definitions squid, common, combined, referrer, useragent are built in. |
6b698a21 | 4116 | DOC_START |
41bd17a4 | 4117 | Usage: |
0976f8db | 4118 | |
41bd17a4 | 4119 | logformat <name> <format specification> |
0976f8db | 4120 | |
41bd17a4 | 4121 | Defines an access log format. |
6b698a21 | 4122 | |
41bd17a4 | 4123 | The <format specification> is a string with embedded % format codes |
5473c134 | 4124 | |
41bd17a4 | 4125 | % format codes all follow the same basic structure where all but |
4126 | the formatcode is optional. Output strings are automatically escaped | |
4127 | as required according to their context and the output format | |
4128 | modifiers are usually not needed, but can be specified if an explicit | |
4129 | output format is desired. | |
6b698a21 | 4130 | |
95d78f10 | 4131 | % ["|[|'|#|/] [-] [[0]width] [{arg}] formatcode [{arg}] |
0976f8db | 4132 | |
41bd17a4 | 4133 | " output in quoted string format |
4134 | [ output in squid text log format as used by log_mime_hdrs | |
4135 | # output in URL quoted format | |
95d78f10 | 4136 | / output in shell \-escaped format |
41bd17a4 | 4137 | ' output as-is |
5473c134 | 4138 | |
41bd17a4 | 4139 | - left aligned |
c32c6db7 AR |
4140 | |
4141 | width minimum and/or maximum field width: | |
4142 | [width_min][.width_max] | |
e2851fe7 AR |
4143 | When minimum starts with 0, the field is zero-padded. |
4144 | String values exceeding maximum width are truncated. | |
c32c6db7 | 4145 | |
4e56d7f6 AJ |
4146 | {arg} argument such as header name etc. This field may be |
4147 | placed before or after the token, but not both at once. | |
5473c134 | 4148 | |
41bd17a4 | 4149 | Format codes: |
5473c134 | 4150 | |
3ff65596 | 4151 | % a literal % character |
f4b68e1a AJ |
4152 | sn Unique sequence number per log line entry |
4153 | err_code The ID of an error response served by Squid or | |
4154 | a similar internal error identifier. | |
4155 | err_detail Additional err_code-dependent error information. | |
c7bcf010 | 4156 | note The annotation specified by the argument. Also |
d7f4a0b7 CT |
4157 | logs the adaptation meta headers set by the |
4158 | adaptation_meta configuration parameter. | |
c7bcf010 CT |
4159 | If no argument given all annotations logged. |
4160 | The argument may include a separator to use with | |
4161 | annotation values: | |
4162 | name[:separator] | |
4163 | By default, multiple note values are separated with "," | |
4164 | and multiple notes are separated with "\r\n". | |
4165 | When logging named notes with %{name}note, the | |
4166 | explicitly configured separator is used between note | |
4167 | values. When logging all notes with %note, the | |
4168 | explicitly configured separator is used between | |
4169 | individual notes. There is currently no way to | |
4170 | specify both value and notes separators when logging | |
4171 | all notes with %note. | |
f4b68e1a AJ |
4172 | |
4173 | Connection related format codes: | |
4174 | ||
41bd17a4 | 4175 | >a Client source IP address |
4176 | >A Client FQDN | |
4177 | >p Client source port | |
8652f8e7 AJ |
4178 | >eui Client source EUI (MAC address, EUI-48 or EUI-64 identifier) |
4179 | >la Local IP address the client connected to | |
4180 | >lp Local port number the client connected to | |
f123f5e9 CT |
4181 | >qos Client connection TOS/DSCP value set by Squid |
4182 | >nfmark Client connection netfilter mark set by Squid | |
8652f8e7 | 4183 | |
28417506 CT |
4184 | la Local listening IP address the client connection was connected to. |
4185 | lp Local listening port number the client connection was connected to. | |
4186 | ||
8652f8e7 AJ |
4187 | <a Server IP address of the last server or peer connection |
4188 | <A Server FQDN or peer name | |
4189 | <p Server port number of the last server or peer connection | |
c3a082ae | 4190 | <la Local IP address of the last server or peer connection |
152e24b3 | 4191 | <lp Local port number of the last server or peer connection |
f123f5e9 CT |
4192 | <qos Server connection TOS/DSCP value set by Squid |
4193 | <nfmark Server connection netfilter mark set by Squid | |
f4b68e1a AJ |
4194 | |
4195 | Time related format codes: | |
4196 | ||
41bd17a4 | 4197 | ts Seconds since epoch |
4198 | tu subsecond time (milliseconds) | |
4199 | tl Local time. Optional strftime format argument | |
3ff65596 | 4200 | default %d/%b/%Y:%H:%M:%S %z |
41bd17a4 | 4201 | tg GMT time. Optional strftime format argument |
3ff65596 | 4202 | default %d/%b/%Y:%H:%M:%S %z |
41bd17a4 | 4203 | tr Response time (milliseconds) |
3ff65596 | 4204 | dt Total time spent making DNS lookups (milliseconds) |
af0ded40 CT |
4205 | tS Approximate master transaction start time in |
4206 | <full seconds since epoch>.<fractional seconds> format. | |
4207 | Currently, Squid considers the master transaction | |
4208 | started when a complete HTTP request header initiating | |
4209 | the transaction is received from the client. This is | |
4210 | the same value that Squid uses to calculate transaction | |
4211 | response time when logging %tr to access.log. Currently, | |
4212 | Squid uses millisecond resolution for %tS values, | |
4213 | similar to the default access.log "current time" field | |
4214 | (%ts.%03tu). | |
3ff65596 | 4215 | |
8652f8e7 AJ |
4216 | Access Control related format codes: |
4217 | ||
4218 | et Tag returned by external acl | |
4219 | ea Log string returned by external acl | |
4220 | un User name (any available) | |
4221 | ul User name from authentication | |
4222 | ue User name from external acl helper | |
4223 | ui User name from ident | |
50b5c983 AJ |
4224 | un A user name. Expands to the first available name |
4225 | from the following list of information sources: | |
4226 | - authenticated user name, like %ul | |
4227 | - user name supplied by an external ACL, like %ue | |
4228 | - SSL client name, like %us | |
4229 | - ident user name, like %ui | |
d4806c91 CT |
4230 | credentials Client credentials. The exact meaning depends on |
4231 | the authentication scheme: For Basic authentication, | |
4232 | it is the password; for Digest, the realm sent by the | |
4233 | client; for NTLM and Negotiate, the client challenge | |
4234 | or client credentials prefixed with "YR " or "KK ". | |
8652f8e7 AJ |
4235 | |
4236 | HTTP related format codes: | |
3ff65596 | 4237 | |
d6df21d2 AJ |
4238 | REQUEST |
4239 | ||
4240 | [http::]rm Request method (GET/POST etc) | |
4241 | [http::]>rm Request method from client | |
4242 | [http::]<rm Request method sent to server or peer | |
4243 | [http::]ru Request URL from client (historic, filtered for logging) | |
4244 | [http::]>ru Request URL from client | |
4245 | [http::]<ru Request URL sent to server or peer | |
5aca9cf2 AJ |
4246 | [http::]>rs Request URL scheme from client |
4247 | [http::]<rs Request URL scheme sent to server or peer | |
fa450988 | 4248 | [http::]>rd Request URL domain from client |
f42ac6e6 | 4249 | [http::]<rd Request URL domain sent to server or peer |
5aca9cf2 AJ |
4250 | [http::]>rP Request URL port from client |
4251 | [http::]<rP Request URL port sent to server or peer | |
4252 | [http::]rp Request URL path excluding hostname | |
4253 | [http::]>rp Request URL path excluding hostname from client | |
4254 | [http::]<rp Request URL path excluding hostname sent to server or peer | |
d6df21d2 AJ |
4255 | [http::]rv Request protocol version |
4256 | [http::]>rv Request protocol version from client | |
4257 | [http::]<rv Request protocol version sent to server or peer | |
4258 | ||
5aca9cf2 | 4259 | [http::]>h Original received request header. |
19483c50 AR |
4260 | Usually differs from the request header sent by |
4261 | Squid, although most fields are often preserved. | |
4262 | Accepts optional header field name/value filter | |
4263 | argument using name[:[separator]element] format. | |
4264 | [http::]>ha Received request header after adaptation and | |
4265 | redirection (pre-cache REQMOD vectoring point). | |
4266 | Usually differs from the request header sent by | |
4267 | Squid, although most fields are often preserved. | |
6fca33e0 | 4268 | Optional header name argument as for >h |
d6df21d2 | 4269 | |
d6df21d2 AJ |
4270 | RESPONSE |
4271 | ||
4272 | [http::]<Hs HTTP status code received from the next hop | |
4273 | [http::]>Hs HTTP status code sent to the client | |
4274 | ||
3ff65596 AR |
4275 | [http::]<h Reply header. Optional header name argument |
4276 | as for >h | |
d6df21d2 AJ |
4277 | |
4278 | [http::]mt MIME content type | |
4279 | ||
4280 | ||
4281 | SIZE COUNTERS | |
4282 | ||
4283 | [http::]st Total size of request + reply traffic with client | |
4284 | [http::]>st Total size of request received from client. | |
4285 | Excluding chunked encoding bytes. | |
4286 | [http::]<st Total size of reply sent to client (after adaptation) | |
4287 | ||
4288 | [http::]>sh Size of request headers received from client | |
4289 | [http::]<sh Size of reply headers sent to client (after adaptation) | |
4290 | ||
4291 | [http::]<sH Reply high offset sent | |
4292 | [http::]<sS Upstream object size | |
4293 | ||
bae917ac CT |
4294 | [http::]<bs Number of HTTP-equivalent message body bytes |
4295 | received from the next hop, excluding chunked | |
4296 | transfer encoding and control messages. | |
4297 | Generated FTP/Gopher listings are treated as | |
4298 | received bodies. | |
d6df21d2 | 4299 | |
d6df21d2 AJ |
4300 | TIMING |
4301 | ||
3ff65596 AR |
4302 | [http::]<pt Peer response time in milliseconds. The timer starts |
4303 | when the last request byte is sent to the next hop | |
4304 | and stops when the last response byte is received. | |
d5430dc8 | 4305 | [http::]<tt Total time in milliseconds. The timer |
3ff65596 AR |
4306 | starts with the first connect request (or write I/O) |
4307 | sent to the first selected peer. The timer stops | |
4308 | with the last I/O with the last peer. | |
4309 | ||
8652f8e7 AJ |
4310 | Squid handling related format codes: |
4311 | ||
4312 | Ss Squid request status (TCP_MISS etc) | |
4313 | Sh Squid hierarchy status (DEFAULT_PARENT etc) | |
4314 | ||
08097970 AR |
4315 | SSL-related format codes: |
4316 | ||
4317 | ssl::bump_mode SslBump decision for the transaction: | |
4318 | ||
4319 | For CONNECT requests that initiated bumping of | |
4320 | a connection and for any request received on | |
4321 | an already bumped connection, Squid logs the | |
4322 | corresponding SslBump mode ("server-first" or | |
4323 | "client-first"). See the ssl_bump option for | |
4324 | more information about these modes. | |
4325 | ||
4326 | A "none" token is logged for requests that | |
4327 | triggered "ssl_bump" ACL evaluation matching | |
4328 | either a "none" rule or no rules at all. | |
4329 | ||
4330 | In all other cases, a single dash ("-") is | |
4331 | logged. | |
4332 | ||
cedca6e7 CT |
4333 | ssl::>sni SSL client SNI sent to Squid. Available only |
4334 | after the peek, stare, or splice SSL bumping | |
4335 | actions. | |
4336 | ||
c28b9a0e AJ |
4337 | ssl::>cert_subject |
4338 | The Subject field of the received client | |
4339 | SSL certificate or a dash ('-') if Squid has | |
4340 | received an invalid/malformed certificate or | |
4341 | no certificate at all. Consider encoding the | |
4342 | logged value because Subject often has spaces. | |
4343 | ||
4344 | ssl::>cert_issuer | |
4345 | The Issuer field of the received client | |
4346 | SSL certificate or a dash ('-') if Squid has | |
4347 | received an invalid/malformed certificate or | |
4348 | no certificate at all. Consider encoding the | |
4349 | logged value because Issuer often has spaces. | |
4350 | ||
4351 | ssl::<cert_errors | |
4352 | The list of certificate validation errors | |
4353 | detected by Squid (including OpenSSL and | |
4354 | certificate validation helper components). The | |
4355 | errors are listed in the discovery order. By | |
4356 | default, the error codes are separated by ':'. | |
4357 | Accepts an optional separator argument. | |
4358 | ||
2bcab852 CT |
4359 | %ssl::>negotiated_version The negotiated TLS version of the |
4360 | client connection. | |
4361 | ||
4362 | %ssl::<negotiated_version The negotiated TLS version of the | |
4363 | last server or peer connection. | |
4364 | ||
4365 | %ssl::>received_hello_version The TLS version of the Hello | |
4366 | message received from TLS client. | |
4367 | ||
4368 | %ssl::<received_hello_version The TLS version of the Hello | |
4369 | message received from TLS server. | |
4370 | ||
4371 | %ssl::>received_supported_version The maximum TLS version | |
4372 | supported by the TLS client. | |
4373 | ||
4374 | %ssl::<received_supported_version The maximum TLS version | |
4375 | supported by the TLS server. | |
4376 | ||
4377 | %ssl::>negotiated_cipher The negotiated cipher of the | |
4378 | client connection. | |
4379 | ||
4380 | %ssl::<negotiated_cipher The negotiated cipher of the | |
4381 | last server or peer connection. | |
4382 | ||
5038f9d8 | 4383 | If ICAP is enabled, the following code becomes available (as |
3ff65596 AR |
4384 | well as ICAP log codes documented with the icap_log option): |
4385 | ||
4386 | icap::tt Total ICAP processing time for the HTTP | |
4387 | transaction. The timer ticks when ICAP | |
4388 | ACLs are checked and when ICAP | |
4389 | transaction is in progress. | |
4390 | ||
c28b9a0e | 4391 | If adaptation is enabled the following codes become available: |
3ff65596 | 4392 | |
5038f9d8 AR |
4393 | adapt::<last_h The header of the last ICAP response or |
4394 | meta-information from the last eCAP | |
4395 | transaction related to the HTTP transaction. | |
4396 | Like <h, accepts an optional header name | |
4397 | argument. | |
3ff65596 AR |
4398 | |
4399 | adapt::sum_trs Summed adaptation transaction response | |
4400 | times recorded as a comma-separated list in | |
4401 | the order of transaction start time. Each time | |
4402 | value is recorded as an integer number, | |
4403 | representing response time of one or more | |
4404 | adaptation (ICAP or eCAP) transaction in | |
4405 | milliseconds. When a failed transaction is | |
4406 | being retried or repeated, its time is not | |
4407 | logged individually but added to the | |
4408 | replacement (next) transaction. See also: | |
4409 | adapt::all_trs. | |
4410 | ||
4411 | adapt::all_trs All adaptation transaction response times. | |
4412 | Same as adaptation_strs but response times of | |
4413 | individual transactions are never added | |
4414 | together. Instead, all transaction response | |
4415 | times are recorded individually. | |
4416 | ||
4417 | You can prefix adapt::*_trs format codes with adaptation | |
4418 | service name in curly braces to record response time(s) specific | |
4419 | to that service. For example: %{my_service}adapt::sum_trs | |
5473c134 | 4420 | |
7d9acc3c AJ |
4421 | The default formats available (which do not need re-defining) are: |
4422 | ||
bd85ea1f AJ |
4423 | logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt |
4424 | logformat common %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh | |
4425 | logformat combined %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh | |
20efa1c2 AJ |
4426 | logformat referrer %ts.%03tu %>a %{Referer}>h %ru |
4427 | logformat useragent %>a [%tl] "%{User-Agent}>h" | |
4428 | ||
8652f8e7 AJ |
4429 | NOTE: When the log_mime_hdrs directive is set to ON. |
4430 | The squid, common and combined formats have a safely encoded copy | |
4431 | of the mime headers appended to each line within a pair of brackets. | |
4432 | ||
4433 | NOTE: The common and combined formats are not quite true to the Apache definition. | |
4434 | The logs from Squid contain an extra status and hierarchy code appended. | |
20efa1c2 | 4435 | |
5473c134 | 4436 | DOC_END |
4437 | ||
41bd17a4 | 4438 | NAME: access_log cache_access_log |
4439 | TYPE: access_log | |
4440 | LOC: Config.Log.accesslogs | |
82b7abe3 | 4441 | DEFAULT_IF_NONE: daemon:@DEFAULT_ACCESS_LOG@ squid |
5473c134 | 4442 | DOC_START |
fb0c2f17 NH |
4443 | Configures whether and how Squid logs HTTP and ICP transactions. |
4444 | If access logging is enabled, a single line is logged for every | |
4445 | matching HTTP or ICP request. The recommended directive formats are: | |
4446 | ||
4447 | access_log <module>:<place> [option ...] [acl acl ...] | |
4448 | access_log none [acl acl ...] | |
4449 | ||
4450 | The following directive format is accepted but may be deprecated: | |
82b7abe3 | 4451 | access_log <module>:<place> [<logformat name> [acl acl ...]] |
fb0c2f17 NH |
4452 | |
4453 | In most cases, the first ACL name must not contain the '=' character | |
4454 | and should not be equal to an existing logformat name. You can always | |
4455 | start with an 'all' ACL to work around those restrictions. | |
82b7abe3 AJ |
4456 | |
4457 | Will log to the specified module:place using the specified format (which | |
41bd17a4 | 4458 | must be defined in a logformat directive) those entries which match |
4459 | ALL the acl's specified (which must be defined in acl clauses). | |
82b7abe3 AJ |
4460 | If no acl is specified, all requests will be logged to this destination. |
4461 | ||
fb0c2f17 NH |
4462 | ===== Available options for the recommended directive format ===== |
4463 | ||
4464 | logformat=name Names log line format (either built-in or | |
4465 | defined by a logformat directive). Defaults | |
4466 | to 'squid'. | |
4467 | ||
4468 | buffer-size=64KB Defines approximate buffering limit for log | |
4469 | records (see buffered_logs). Squid should not | |
4470 | keep more than the specified size and, hence, | |
4471 | should flush records before the buffer becomes | |
4472 | full to avoid overflows under normal | |
4473 | conditions (the exact flushing algorithm is | |
4474 | module-dependent though). The on-error option | |
4475 | controls overflow handling. | |
4476 | ||
4477 | on-error=die|drop Defines action on unrecoverable errors. The | |
4478 | 'drop' action ignores (i.e., does not log) | |
4479 | affected log records. The default 'die' action | |
4480 | kills the affected worker. The drop action | |
4481 | support has not been tested for modules other | |
4482 | than tcp. | |
4483 | ||
efc23871 AJ |
4484 | rotate=N Specifies the number of log file rotations to |
4485 | make when you run 'squid -k rotate'. The default | |
4486 | is to obey the logfile_rotate directive. Setting | |
4487 | rotate=0 will disable the file name rotation, | |
4488 | but the log files are still closed and re-opened. | |
4489 | This will enable you to rename the logfiles | |
4490 | yourself just before sending the rotate signal. | |
4491 | Only supported by the stdio module. | |
4492 | ||
82b7abe3 AJ |
4493 | ===== Modules Currently available ===== |
4494 | ||
bb7a1781 | 4495 | none Do not log any requests matching these ACL. |
82b7abe3 AJ |
4496 | Do not specify Place or logformat name. |
4497 | ||
4498 | stdio Write each log line to disk immediately at the completion of | |
4499 | each request. | |
4500 | Place: the filename and path to be written. | |
4501 | ||
4502 | daemon Very similar to stdio. But instead of writing to disk the log | |
4503 | line is passed to a daemon helper for asychronous handling instead. | |
4504 | Place: varies depending on the daemon. | |
4505 | ||
4506 | log_file_daemon Place: the file name and path to be written. | |
4507 | ||
4508 | syslog To log each request via syslog facility. | |
4509 | Place: The syslog facility and priority level for these entries. | |
4510 | Place Format: facility.priority | |
5473c134 | 4511 | |
82b7abe3 AJ |
4512 | where facility could be any of: |
4513 | authpriv, daemon, local0 ... local7 or user. | |
5473c134 | 4514 | |
82b7abe3 AJ |
4515 | And priority could be any of: |
4516 | err, warning, notice, info, debug. | |
4517 | ||
4518 | udp To send each log line as text data to a UDP receiver. | |
4519 | Place: The destination host name or IP and port. | |
f4fc8610 | 4520 | Place Format: //host:port |
df2eec10 | 4521 | |
2bf4e8fa | 4522 | tcp To send each log line as text data to a TCP receiver. |
fb0c2f17 | 4523 | Lines may be accumulated before sending (see buffered_logs). |
2bf4e8fa | 4524 | Place: The destination host name or IP and port. |
f4fc8610 | 4525 | Place Format: //host:port |
df2eec10 AJ |
4526 | |
4527 | Default: | |
82b7abe3 | 4528 | access_log daemon:@DEFAULT_ACCESS_LOG@ squid |
41bd17a4 | 4529 | DOC_END |
5473c134 | 4530 | |
3ff65596 AR |
4531 | NAME: icap_log |
4532 | TYPE: access_log | |
4533 | IFDEF: ICAP_CLIENT | |
4534 | LOC: Config.Log.icaplogs | |
4535 | DEFAULT: none | |
4536 | DOC_START | |
4537 | ICAP log files record ICAP transaction summaries, one line per | |
4538 | transaction. | |
4539 | ||
4540 | The icap_log option format is: | |
4541 | icap_log <filepath> [<logformat name> [acl acl ...]] | |
4542 | icap_log none [acl acl ...]] | |
4543 | ||
4544 | Please see access_log option documentation for details. The two | |
4545 | kinds of logs share the overall configuration approach and many | |
4546 | features. | |
4547 | ||
4548 | ICAP processing of a single HTTP message or transaction may | |
4549 | require multiple ICAP transactions. In such cases, multiple | |
4550 | ICAP transaction log lines will correspond to a single access | |
4551 | log line. | |
4552 | ||
bd59d61c EB |
4553 | ICAP log supports many access.log logformat %codes. In ICAP context, |
4554 | HTTP message-related %codes are applied to the HTTP message embedded | |
4555 | in an ICAP message. Logformat "%http::>..." codes are used for HTTP | |
4556 | messages embedded in ICAP requests while "%http::<..." codes are used | |
4557 | for HTTP messages embedded in ICAP responses. For example: | |
4558 | ||
4559 | http::>h To-be-adapted HTTP message headers sent by Squid to | |
4560 | the ICAP service. For REQMOD transactions, these are | |
4561 | HTTP request headers. For RESPMOD, these are HTTP | |
4562 | response headers, but Squid currently cannot log them | |
4563 | (i.e., %http::>h will expand to "-" for RESPMOD). | |
4564 | ||
4565 | http::<h Adapted HTTP message headers sent by the ICAP | |
4566 | service to Squid (i.e., HTTP request headers in regular | |
4567 | REQMOD; HTTP response headers in RESPMOD and during | |
4568 | request satisfaction in REQMOD). | |
4569 | ||
4570 | ICAP OPTIONS transactions do not embed HTTP messages. | |
4571 | ||
4572 | Several logformat codes below deal with ICAP message bodies. An ICAP | |
4573 | message body, if any, typically includes a complete HTTP message | |
4574 | (required HTTP headers plus optional HTTP message body). When | |
4575 | computing HTTP message body size for these logformat codes, Squid | |
4576 | either includes or excludes chunked encoding overheads; see | |
4577 | code-specific documentation for details. | |
4578 | ||
4579 | For Secure ICAP services, all size-related information is currently | |
4580 | computed before/after TLS encryption/decryption, as if TLS was not | |
4581 | in use at all. | |
3ff65596 AR |
4582 | |
4583 | The following format codes are also available for ICAP logs: | |
4584 | ||
4585 | icap::<A ICAP server IP address. Similar to <A. | |
4586 | ||
4587 | icap::<service_name ICAP service name from the icap_service | |
4588 | option in Squid configuration file. | |
4589 | ||
4590 | icap::ru ICAP Request-URI. Similar to ru. | |
4591 | ||
4592 | icap::rm ICAP request method (REQMOD, RESPMOD, or | |
4593 | OPTIONS). Similar to existing rm. | |
4594 | ||
bd59d61c EB |
4595 | icap::>st The total size of the ICAP request sent to the ICAP |
4596 | server (ICAP headers + ICAP body), including chunking | |
4597 | metadata (if any). | |
3ff65596 | 4598 | |
bd59d61c EB |
4599 | icap::<st The total size of the ICAP response received from the |
4600 | ICAP server (ICAP headers + ICAP body), including | |
4601 | chunking metadata (if any). | |
3ff65596 | 4602 | |
bd59d61c EB |
4603 | icap::<bs The size of the ICAP response body received from the |
4604 | ICAP server, excluding chunking metadata (if any). | |
bae917ac | 4605 | |
3ff65596 AR |
4606 | icap::tr Transaction response time (in |
4607 | milliseconds). The timer starts when | |
4608 | the ICAP transaction is created and | |
4609 | stops when the transaction is completed. | |
4610 | Similar to tr. | |
4611 | ||
4612 | icap::tio Transaction I/O time (in milliseconds). The | |
4613 | timer starts when the first ICAP request | |
4614 | byte is scheduled for sending. The timers | |
4615 | stops when the last byte of the ICAP response | |
4616 | is received. | |
4617 | ||
4618 | icap::to Transaction outcome: ICAP_ERR* for all | |
4619 | transaction errors, ICAP_OPT for OPTION | |
4620 | transactions, ICAP_ECHO for 204 | |
4621 | responses, ICAP_MOD for message | |
4622 | modification, and ICAP_SAT for request | |
4623 | satisfaction. Similar to Ss. | |
4624 | ||
4625 | icap::Hs ICAP response status code. Similar to Hs. | |
4626 | ||
4627 | icap::>h ICAP request header(s). Similar to >h. | |
4628 | ||
4629 | icap::<h ICAP response header(s). Similar to <h. | |
4630 | ||
4631 | The default ICAP log format, which can be used without an explicit | |
4632 | definition, is called icap_squid: | |
4633 | ||
bd59d61c | 4634 | logformat icap_squid %ts.%03tu %6icap::tr %>A %icap::to/%03icap::Hs %icap::<st %icap::rm %icap::ru %un -/%icap::<A - |
3ff65596 | 4635 | |
bd59d61c | 4636 | See also: logformat and %adapt::<last_h |
3ff65596 AR |
4637 | DOC_END |
4638 | ||
82b7abe3 AJ |
4639 | NAME: logfile_daemon |
4640 | TYPE: string | |
4641 | DEFAULT: @DEFAULT_LOGFILED@ | |
4642 | LOC: Log::TheConfig.logfile_daemon | |
4643 | DOC_START | |
4644 | Specify the path to the logfile-writing daemon. This daemon is | |
4645 | used to write the access and store logs, if configured. | |
14b24caf HN |
4646 | |
4647 | Squid sends a number of commands to the log daemon: | |
4648 | L<data>\n - logfile data | |
4649 | R\n - rotate file | |
4650 | T\n - truncate file | |
dd68402f | 4651 | O\n - reopen file |
14b24caf HN |
4652 | F\n - flush file |
4653 | r<n>\n - set rotate count to <n> | |
4654 | b<n>\n - 1 = buffer output, 0 = don't buffer output | |
4655 | ||
4656 | No responses is expected. | |
82b7abe3 AJ |
4657 | DOC_END |
4658 | ||
8ebad780 | 4659 | NAME: stats_collection |
3ff65596 | 4660 | TYPE: acl_access |
8ebad780 | 4661 | LOC: Config.accessList.stats_collection |
3ff65596 | 4662 | DEFAULT: none |
638402dd | 4663 | DEFAULT_DOC: Allow logging for all transactions. |
5b0f5383 | 4664 | COMMENT: allow|deny acl acl... |
3ff65596 | 4665 | DOC_START |
8ebad780 CT |
4666 | This options allows you to control which requests gets accounted |
4667 | in performance counters. | |
b3567eb5 FC |
4668 | |
4669 | This clause only supports fast acl types. | |
4670 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
3ff65596 AR |
4671 | DOC_END |
4672 | ||
41bd17a4 | 4673 | NAME: cache_store_log |
4674 | TYPE: string | |
df2eec10 | 4675 | DEFAULT: none |
41bd17a4 | 4676 | LOC: Config.Log.store |
4677 | DOC_START | |
4678 | Logs the activities of the storage manager. Shows which | |
4679 | objects are ejected from the cache, and which objects are | |
6d1dfcfc | 4680 | saved and for how long. |
df2eec10 | 4681 | There are not really utilities to analyze this data, so you can safely |
6d1dfcfc AJ |
4682 | disable it (the default). |
4683 | ||
4684 | Store log uses modular logging outputs. See access_log for the list | |
4685 | of modules supported. | |
4686 | ||
e0855596 | 4687 | Example: |
6d1dfcfc AJ |
4688 | cache_store_log stdio:@DEFAULT_STORE_LOG@ |
4689 | cache_store_log daemon:@DEFAULT_STORE_LOG@ | |
5473c134 | 4690 | DOC_END |
4691 | ||
41bd17a4 | 4692 | NAME: cache_swap_state cache_swap_log |
4693 | TYPE: string | |
4694 | LOC: Config.Log.swap | |
5473c134 | 4695 | DEFAULT: none |
638402dd | 4696 | DEFAULT_DOC: Store the journal inside its cache_dir |
5473c134 | 4697 | DOC_START |
41bd17a4 | 4698 | Location for the cache "swap.state" file. This index file holds |
4699 | the metadata of objects saved on disk. It is used to rebuild | |
4700 | the cache during startup. Normally this file resides in each | |
4701 | 'cache_dir' directory, but you may specify an alternate | |
4702 | pathname here. Note you must give a full filename, not just | |
4703 | a directory. Since this is the index for the whole object | |
4704 | list you CANNOT periodically rotate it! | |
5473c134 | 4705 | |
41bd17a4 | 4706 | If %s can be used in the file name it will be replaced with a |
4707 | a representation of the cache_dir name where each / is replaced | |
4708 | with '.'. This is needed to allow adding/removing cache_dir | |
4709 | lines when cache_swap_log is being used. | |
5473c134 | 4710 | |
41bd17a4 | 4711 | If have more than one 'cache_dir', and %s is not used in the name |
4712 | these swap logs will have names such as: | |
5473c134 | 4713 | |
41bd17a4 | 4714 | cache_swap_log.00 |
4715 | cache_swap_log.01 | |
4716 | cache_swap_log.02 | |
5473c134 | 4717 | |
41bd17a4 | 4718 | The numbered extension (which is added automatically) |
4719 | corresponds to the order of the 'cache_dir' lines in this | |
4720 | configuration file. If you change the order of the 'cache_dir' | |
4721 | lines in this file, these index files will NOT correspond to | |
4722 | the correct 'cache_dir' entry (unless you manually rename | |
4723 | them). We recommend you do NOT use this option. It is | |
4724 | better to keep these index files in each 'cache_dir' directory. | |
5473c134 | 4725 | DOC_END |
4726 | ||
41bd17a4 | 4727 | NAME: logfile_rotate |
4728 | TYPE: int | |
4729 | DEFAULT: 10 | |
4730 | LOC: Config.Log.rotateNumber | |
5473c134 | 4731 | DOC_START |
efc23871 | 4732 | Specifies the default number of logfile rotations to make when you |
41bd17a4 | 4733 | type 'squid -k rotate'. The default is 10, which will rotate |
4734 | with extensions 0 through 9. Setting logfile_rotate to 0 will | |
4735 | disable the file name rotation, but the logfiles are still closed | |
4736 | and re-opened. This will enable you to rename the logfiles | |
4737 | yourself just before sending the rotate signal. | |
5473c134 | 4738 | |
efc23871 AJ |
4739 | Note, from Squid-3.1 this option is only a default for cache.log, |
4740 | that log can be rotated separately by using debug_options. | |
4741 | ||
4742 | Note, from Squid-3.6 this option is only a default for access.log | |
4743 | recorded by stdio: module. Those logs can be rotated separately by | |
4744 | using the rotate=N option on their access_log directive. | |
4745 | ||
41bd17a4 | 4746 | Note, the 'squid -k rotate' command normally sends a USR1 |
4747 | signal to the running squid process. In certain situations | |
4748 | (e.g. on Linux with Async I/O), USR1 is used for other | |
4749 | purposes, so -k rotate uses another signal. It is best to get | |
4750 | in the habit of using 'squid -k rotate' instead of 'kill -USR1 | |
4751 | <pid>'. | |
62493678 | 4752 | |
41bd17a4 | 4753 | DOC_END |
5473c134 | 4754 | |
41bd17a4 | 4755 | NAME: mime_table |
4756 | TYPE: string | |
4757 | DEFAULT: @DEFAULT_MIME_TABLE@ | |
4758 | LOC: Config.mimeTablePathname | |
4759 | DOC_START | |
638402dd AJ |
4760 | Path to Squid's icon configuration file. |
4761 | ||
4762 | You shouldn't need to change this, but the default file contains | |
4763 | examples and formatting information if you do. | |
5473c134 | 4764 | DOC_END |
4765 | ||
41bd17a4 | 4766 | NAME: log_mime_hdrs |
4767 | COMMENT: on|off | |
4768 | TYPE: onoff | |
4769 | LOC: Config.onoff.log_mime_hdrs | |
4770 | DEFAULT: off | |
4771 | DOC_START | |
4772 | The Cache can record both the request and the response MIME | |
4773 | headers for each HTTP transaction. The headers are encoded | |
4774 | safely and will appear as two bracketed fields at the end of | |
4775 | the access log (for either the native or httpd-emulated log | |
4776 | formats). To enable this logging set log_mime_hdrs to 'on'. | |
4777 | DOC_END | |
5473c134 | 4778 | |
41bd17a4 | 4779 | NAME: pid_filename |
4780 | TYPE: string | |
4781 | DEFAULT: @DEFAULT_PID_FILE@ | |
4782 | LOC: Config.pidFilename | |
5473c134 | 4783 | DOC_START |
41bd17a4 | 4784 | A filename to write the process-id to. To disable, enter "none". |
5473c134 | 4785 | DOC_END |
4786 | ||
41bd17a4 | 4787 | NAME: client_netmask |
4788 | TYPE: address | |
4789 | LOC: Config.Addrs.client_netmask | |
0eb08770 | 4790 | DEFAULT: no_addr |
638402dd | 4791 | DEFAULT_DOC: Log full client IP address |
5473c134 | 4792 | DOC_START |
41bd17a4 | 4793 | A netmask for client addresses in logfiles and cachemgr output. |
4794 | Change this to protect the privacy of your cache clients. | |
4795 | A netmask of 255.255.255.0 will log all IP's in that range with | |
4796 | the last digit set to '0'. | |
5473c134 | 4797 | DOC_END |
4798 | ||
41bd17a4 | 4799 | NAME: strip_query_terms |
5473c134 | 4800 | TYPE: onoff |
41bd17a4 | 4801 | LOC: Config.onoff.strip_query_terms |
5473c134 | 4802 | DEFAULT: on |
4803 | DOC_START | |
41bd17a4 | 4804 | By default, Squid strips query terms from requested URLs before |
638402dd AJ |
4805 | logging. This protects your user's privacy and reduces log size. |
4806 | ||
4807 | When investigating HIT/MISS or other caching behaviour you | |
4808 | will need to disable this to see the full URL used by Squid. | |
5473c134 | 4809 | DOC_END |
4810 | ||
41bd17a4 | 4811 | NAME: buffered_logs |
4812 | COMMENT: on|off | |
4813 | TYPE: onoff | |
4814 | DEFAULT: off | |
4815 | LOC: Config.onoff.buffered_logs | |
5473c134 | 4816 | DOC_START |
638402dd AJ |
4817 | Whether to write/send access_log records ASAP or accumulate them and |
4818 | then write/send them in larger chunks. Buffering may improve | |
4819 | performance because it decreases the number of I/Os. However, | |
4820 | buffering increases the delay before log records become available to | |
4821 | the final recipient (e.g., a disk file or logging daemon) and, | |
4822 | hence, increases the risk of log records loss. | |
4823 | ||
4824 | Note that even when buffered_logs are off, Squid may have to buffer | |
4825 | records if it cannot write/send them immediately due to pending I/Os | |
4826 | (e.g., the I/O writing the previous log record) or connectivity loss. | |
4827 | ||
fb0c2f17 | 4828 | Currently honored by 'daemon' and 'tcp' access_log modules only. |
6b698a21 | 4829 | DOC_END |
0976f8db | 4830 | |
2b753521 | 4831 | NAME: netdb_filename |
4832 | TYPE: string | |
221faecb | 4833 | DEFAULT: stdio:@DEFAULT_NETDB_FILE@ |
2b753521 | 4834 | LOC: Config.netdbFilename |
fb6a61d1 | 4835 | IFDEF: USE_ICMP |
2b753521 | 4836 | DOC_START |
638402dd AJ |
4837 | Where Squid stores it's netdb journal. |
4838 | When enabled this journal preserves netdb state between restarts. | |
4839 | ||
2b753521 | 4840 | To disable, enter "none". |
4841 | DOC_END | |
4842 | ||
62493678 AJ |
4843 | COMMENT_START |
4844 | OPTIONS FOR TROUBLESHOOTING | |
4845 | ----------------------------------------------------------------------------- | |
4846 | COMMENT_END | |
4847 | ||
4848 | NAME: cache_log | |
4849 | TYPE: string | |
62493678 AJ |
4850 | DEFAULT_IF_NONE: @DEFAULT_CACHE_LOG@ |
4851 | LOC: Debug::cache_log | |
4852 | DOC_START | |
638402dd AJ |
4853 | Squid administrative logging file. |
4854 | ||
4855 | This is where general information about Squid behavior goes. You can | |
4856 | increase the amount of data logged to this file and how often it is | |
4857 | rotated with "debug_options" | |
62493678 AJ |
4858 | DOC_END |
4859 | ||
4860 | NAME: debug_options | |
4861 | TYPE: eol | |
47df1aa7 | 4862 | DEFAULT: ALL,1 |
638402dd | 4863 | DEFAULT_DOC: Log all critical and important messages. |
62493678 AJ |
4864 | LOC: Debug::debugOptions |
4865 | DOC_START | |
4866 | Logging options are set as section,level where each source file | |
4867 | is assigned a unique section. Lower levels result in less | |
4868 | output, Full debugging (level 9) can result in a very large | |
4869 | log file, so be careful. | |
4870 | ||
4871 | The magic word "ALL" sets debugging levels for all sections. | |
638402dd | 4872 | The default is to run with "ALL,1" to record important warnings. |
62493678 | 4873 | |
47df1aa7 AJ |
4874 | The rotate=N option can be used to keep more or less of these logs |
4875 | than would otherwise be kept by logfile_rotate. | |
62493678 AJ |
4876 | For most uses a single log should be enough to monitor current |
4877 | events affecting Squid. | |
4878 | DOC_END | |
4879 | ||
4880 | NAME: coredump_dir | |
4881 | TYPE: string | |
4882 | LOC: Config.coredump_dir | |
62493678 | 4883 | DEFAULT_IF_NONE: none |
638402dd | 4884 | DEFAULT_DOC: Use the directory from where Squid was started. |
62493678 AJ |
4885 | DOC_START |
4886 | By default Squid leaves core files in the directory from where | |
4887 | it was started. If you set 'coredump_dir' to a directory | |
4888 | that exists, Squid will chdir() to that directory at startup | |
4889 | and coredump files will be left there. | |
4890 | ||
4891 | NOCOMMENT_START | |
e0855596 | 4892 | |
62493678 AJ |
4893 | # Leave coredumps in the first cache dir |
4894 | coredump_dir @DEFAULT_SWAP_DIR@ | |
4895 | NOCOMMENT_END | |
4896 | DOC_END | |
4897 | ||
4898 | ||
41bd17a4 | 4899 | COMMENT_START |
4900 | OPTIONS FOR FTP GATEWAYING | |
4901 | ----------------------------------------------------------------------------- | |
4902 | COMMENT_END | |
4903 | ||
4904 | NAME: ftp_user | |
4905 | TYPE: string | |
4906 | DEFAULT: Squid@ | |
4907 | LOC: Config.Ftp.anon_user | |
6b698a21 | 4908 | DOC_START |
41bd17a4 | 4909 | If you want the anonymous login password to be more informative |
638402dd | 4910 | (and enable the use of picky FTP servers), set this to something |
41bd17a4 | 4911 | reasonable for your domain, like wwwuser@somewhere.net |
7f7db318 | 4912 | |
41bd17a4 | 4913 | The reason why this is domainless by default is the |
4914 | request can be made on the behalf of a user in any domain, | |
4915 | depending on how the cache is used. | |
638402dd | 4916 | Some FTP server also validate the email address is valid |
41bd17a4 | 4917 | (for example perl.com). |
6b698a21 | 4918 | DOC_END |
0976f8db | 4919 | |
41bd17a4 | 4920 | NAME: ftp_passive |
4921 | TYPE: onoff | |
4922 | DEFAULT: on | |
4923 | LOC: Config.Ftp.passive | |
6b698a21 | 4924 | DOC_START |
41bd17a4 | 4925 | If your firewall does not allow Squid to use passive |
4926 | connections, turn off this option. | |
a689bd4e | 4927 | |
4928 | Use of ftp_epsv_all option requires this to be ON. | |
4929 | DOC_END | |
4930 | ||
4931 | NAME: ftp_epsv_all | |
4932 | TYPE: onoff | |
4933 | DEFAULT: off | |
4934 | LOC: Config.Ftp.epsv_all | |
4935 | DOC_START | |
4936 | FTP Protocol extensions permit the use of a special "EPSV ALL" command. | |
4937 | ||
4938 | NATs may be able to put the connection on a "fast path" through the | |
4939 | translator, as the EPRT command will never be used and therefore, | |
4940 | translation of the data portion of the segments will never be needed. | |
4941 | ||
b3567eb5 FC |
4942 | When a client only expects to do two-way FTP transfers this may be |
4943 | useful. | |
a689bd4e | 4944 | If squid finds that it must do a three-way FTP transfer after issuing |
4945 | an EPSV ALL command, the FTP session will fail. | |
4946 | ||
4947 | If you have any doubts about this option do not use it. | |
4948 | Squid will nicely attempt all other connection methods. | |
4949 | ||
51ee534d AJ |
4950 | Requires ftp_passive to be ON (default) for any effect. |
4951 | DOC_END | |
4952 | ||
4953 | NAME: ftp_epsv | |
ddf5aa2b CT |
4954 | TYPE: ftp_epsv |
4955 | DEFAULT: none | |
4956 | LOC: Config.accessList.ftp_epsv | |
51ee534d AJ |
4957 | DOC_START |
4958 | FTP Protocol extensions permit the use of a special "EPSV" command. | |
4959 | ||
4960 | NATs may be able to put the connection on a "fast path" through the | |
b3567eb5 FC |
4961 | translator using EPSV, as the EPRT command will never be used |
4962 | and therefore, translation of the data portion of the segments | |
4963 | will never be needed. | |
51ee534d | 4964 | |
ddf5aa2b CT |
4965 | EPSV is often required to interoperate with FTP servers on IPv6 |
4966 | networks. On the other hand, it may break some IPv4 servers. | |
4967 | ||
4968 | By default, EPSV may try EPSV with any FTP server. To fine tune | |
4969 | that decision, you may restrict EPSV to certain clients or servers | |
4970 | using ACLs: | |
4971 | ||
4972 | ftp_epsv allow|deny al1 acl2 ... | |
4973 | ||
4974 | WARNING: Disabling EPSV may cause problems with external NAT and IPv6. | |
51ee534d | 4975 | |
ddf5aa2b | 4976 | Only fast ACLs are supported. |
51ee534d | 4977 | Requires ftp_passive to be ON (default) for any effect. |
41bd17a4 | 4978 | DOC_END |
9e7dbc51 | 4979 | |
63ee5443 AJ |
4980 | NAME: ftp_eprt |
4981 | TYPE: onoff | |
4982 | DEFAULT: on | |
4983 | LOC: Config.Ftp.eprt | |
4984 | DOC_START | |
4985 | FTP Protocol extensions permit the use of a special "EPRT" command. | |
4986 | ||
4987 | This extension provides a protocol neutral alternative to the | |
4988 | IPv4-only PORT command. When supported it enables active FTP data | |
4989 | channels over IPv6 and efficient NAT handling. | |
4990 | ||
4991 | Turning this OFF will prevent EPRT being attempted and will skip | |
4992 | straight to using PORT for IPv4 servers. | |
4993 | ||
4994 | Some devices are known to not handle this extension correctly and | |
4995 | may result in crashes. Devices which suport EPRT enough to fail | |
4996 | cleanly will result in Squid attempting PORT anyway. This directive | |
4997 | should only be disabled when EPRT results in device failures. | |
4998 | ||
4999 | WARNING: Doing so will convert Squid back to the old behavior with all | |
5000 | the related problems with external NAT devices/layers and IPv4-only FTP. | |
5001 | DOC_END | |
5002 | ||
41bd17a4 | 5003 | NAME: ftp_sanitycheck |
5004 | TYPE: onoff | |
5005 | DEFAULT: on | |
5006 | LOC: Config.Ftp.sanitycheck | |
5007 | DOC_START | |
5008 | For security and data integrity reasons Squid by default performs | |
5009 | sanity checks of the addresses of FTP data connections ensure the | |
5010 | data connection is to the requested server. If you need to allow | |
5011 | FTP connections to servers using another IP address for the data | |
5012 | connection turn this off. | |
5013 | DOC_END | |
9e7dbc51 | 5014 | |
41bd17a4 | 5015 | NAME: ftp_telnet_protocol |
5016 | TYPE: onoff | |
5017 | DEFAULT: on | |
5018 | LOC: Config.Ftp.telnet | |
5019 | DOC_START | |
5020 | The FTP protocol is officially defined to use the telnet protocol | |
5021 | as transport channel for the control connection. However, many | |
5022 | implementations are broken and does not respect this aspect of | |
5023 | the FTP protocol. | |
5024 | ||
5025 | If you have trouble accessing files with ASCII code 255 in the | |
5026 | path or similar problems involving this ASCII code you can | |
5027 | try setting this directive to off. If that helps, report to the | |
5028 | operator of the FTP server in question that their FTP server | |
5029 | is broken and does not follow the FTP standard. | |
5030 | DOC_END | |
5031 | ||
5032 | COMMENT_START | |
5033 | OPTIONS FOR EXTERNAL SUPPORT PROGRAMS | |
5034 | ----------------------------------------------------------------------------- | |
5035 | COMMENT_END | |
5036 | ||
5037 | NAME: diskd_program | |
5038 | TYPE: string | |
5039 | DEFAULT: @DEFAULT_DISKD@ | |
5040 | LOC: Config.Program.diskd | |
5041 | DOC_START | |
5042 | Specify the location of the diskd executable. | |
5043 | Note this is only useful if you have compiled in | |
5044 | diskd as one of the store io modules. | |
5045 | DOC_END | |
5046 | ||
5047 | NAME: unlinkd_program | |
5048 | IFDEF: USE_UNLINKD | |
5049 | TYPE: string | |
5050 | DEFAULT: @DEFAULT_UNLINKD@ | |
5051 | LOC: Config.Program.unlinkd | |
5052 | DOC_START | |
5053 | Specify the location of the executable for file deletion process. | |
5054 | DOC_END | |
5055 | ||
5056 | NAME: pinger_program | |
41bd17a4 | 5057 | IFDEF: USE_ICMP |
7a9d36e3 AJ |
5058 | TYPE: icmp |
5059 | DEFAULT: @DEFAULT_PINGER@ | |
5060 | LOC: IcmpCfg | |
41bd17a4 | 5061 | DOC_START |
5062 | Specify the location of the executable for the pinger process. | |
5063 | DOC_END | |
5064 | ||
cc192b50 | 5065 | NAME: pinger_enable |
5066 | TYPE: onoff | |
5067 | DEFAULT: on | |
7a9d36e3 | 5068 | LOC: IcmpCfg.enable |
cc192b50 | 5069 | IFDEF: USE_ICMP |
5070 | DOC_START | |
5071 | Control whether the pinger is active at run-time. | |
b3567eb5 FC |
5072 | Enables turning ICMP pinger on and off with a simple |
5073 | squid -k reconfigure. | |
cc192b50 | 5074 | DOC_END |
5075 | ||
5076 | ||
41bd17a4 | 5077 | COMMENT_START |
5078 | OPTIONS FOR URL REWRITING | |
5079 | ----------------------------------------------------------------------------- | |
5080 | COMMENT_END | |
5081 | ||
5082 | NAME: url_rewrite_program redirect_program | |
5083 | TYPE: wordlist | |
5084 | LOC: Config.Program.redirect | |
5085 | DEFAULT: none | |
5086 | DOC_START | |
2c7aad89 | 5087 | Specify the location of the executable URL rewriter to use. |
41bd17a4 | 5088 | Since they can perform almost any function there isn't one included. |
5089 | ||
2c7aad89 | 5090 | For each requested URL, the rewriter will receive on line with the format |
41bd17a4 | 5091 | |
b11724bb | 5092 | [channel-ID <SP>] URL [<SP> extras]<NL> |
5269ec0e | 5093 | |
457857fe CT |
5094 | See url_rewrite_extras on how to send "extras" with optional values to |
5095 | the helper. | |
5269ec0e AJ |
5096 | After processing the request the helper must reply using the following format: |
5097 | ||
24eac830 | 5098 | [channel-ID <SP>] result [<SP> kv-pairs] |
5269ec0e AJ |
5099 | |
5100 | The result code can be: | |
5101 | ||
5102 | OK status=30N url="..." | |
5103 | Redirect the URL to the one supplied in 'url='. | |
5104 | 'status=' is optional and contains the status code to send | |
5105 | the client in Squids HTTP response. It must be one of the | |
5106 | HTTP redirect status codes: 301, 302, 303, 307, 308. | |
5107 | When no status is given Squid will use 302. | |
c71adec1 | 5108 | |
5269ec0e AJ |
5109 | OK rewrite-url="..." |
5110 | Rewrite the URL to the one supplied in 'rewrite-url='. | |
5111 | The new URL is fetched directly by Squid and returned to | |
5112 | the client as the response to its request. | |
5113 | ||
c2cbbb02 AJ |
5114 | OK |
5115 | When neither of url= and rewrite-url= are sent Squid does | |
5116 | not change the URL. | |
5117 | ||
5269ec0e AJ |
5118 | ERR |
5119 | Do not change the URL. | |
5120 | ||
5121 | BH | |
4ded749e | 5122 | An internal error occurred in the helper, preventing |
c2cbbb02 AJ |
5123 | a result being identified. The 'message=' key name is |
5124 | reserved for delivering a log message. | |
5269ec0e AJ |
5125 | |
5126 | ||
457857fe CT |
5127 | In addition to the above kv-pairs Squid also understands the following |
5128 | optional kv-pairs received from URL rewriters: | |
5129 | clt_conn_tag=TAG | |
5130 | Associates a TAG with the client TCP connection. | |
5131 | The TAG is treated as a regular annotation but persists across | |
5132 | future requests on the client connection rather than just the | |
5133 | current request. A helper may update the TAG during subsequent | |
5134 | requests be returning a new kv-pair. | |
41bd17a4 | 5135 | |
5269ec0e AJ |
5136 | When using the concurrency= option the protocol is changed by |
5137 | introducing a query channel tag in front of the request/response. | |
5138 | The query channel tag is a number between 0 and concurrency-1. | |
5139 | This value must be echoed back unchanged to Squid as the first part | |
5140 | of the response relating to its request. | |
5141 | ||
5142 | WARNING: URL re-writing ability should be avoided whenever possible. | |
5143 | Use the URL redirect form of response instead. | |
41bd17a4 | 5144 | |
5269ec0e AJ |
5145 | Re-write creates a difference in the state held by the client |
5146 | and server. Possibly causing confusion when the server response | |
5147 | contains snippets of its view state. Embeded URLs, response | |
5148 | and content Location headers, etc. are not re-written by this | |
5149 | interface. | |
41bd17a4 | 5150 | |
5151 | By default, a URL rewriter is not used. | |
5152 | DOC_END | |
5153 | ||
5154 | NAME: url_rewrite_children redirect_children | |
48d54e4d | 5155 | TYPE: HelperChildConfig |
5b708d95 | 5156 | DEFAULT: 20 startup=0 idle=1 concurrency=0 |
41bd17a4 | 5157 | LOC: Config.redirectChildren |
5158 | DOC_START | |
48d54e4d AJ |
5159 | The maximum number of redirector processes to spawn. If you limit |
5160 | it too few Squid will have to wait for them to process a backlog of | |
5161 | URLs, slowing it down. If you allow too many they will use RAM | |
5162 | and other system resources noticably. | |
5163 | ||
5164 | The startup= and idle= options allow some measure of skew in your | |
5165 | tuning. | |
5166 | ||
5167 | startup= | |
5168 | ||
5169 | Sets a minimum of how many processes are to be spawned when Squid | |
5170 | starts or reconfigures. When set to zero the first request will | |
5171 | cause spawning of the first child process to handle it. | |
5172 | ||
5173 | Starting too few will cause an initial slowdown in traffic as Squid | |
5174 | attempts to simultaneously spawn enough processes to cope. | |
5175 | ||
5176 | idle= | |
5177 | ||
5178 | Sets a minimum of how many processes Squid is to try and keep available | |
5179 | at all times. When traffic begins to rise above what the existing | |
5180 | processes can handle this many more will be spawned up to the maximum | |
5181 | configured. A minimum setting of 1 is required. | |
5182 | ||
5183 | concurrency= | |
41bd17a4 | 5184 | |
41bd17a4 | 5185 | The number of requests each redirector helper can handle in |
5186 | parallel. Defaults to 0 which indicates the redirector | |
5187 | is a old-style single threaded redirector. | |
6a171502 AJ |
5188 | |
5189 | When this directive is set to a value >= 1 then the protocol | |
5190 | used to communicate with the helper is modified to include | |
9bef05b1 AJ |
5191 | an ID in front of the request/response. The ID from the request |
5192 | must be echoed back with the response to that request. | |
6825b101 CT |
5193 | |
5194 | queue-size=N | |
5195 | ||
6082a0e2 EB |
5196 | Sets the maximum number of queued requests to N. The default maximum |
5197 | is 2*numberofchildren. If the queued requests exceed queue size and | |
5198 | redirector_bypass configuration option is set, then redirector is bypassed. | |
5199 | Otherwise, Squid is allowed to temporarily exceed the configured maximum, | |
5200 | marking the affected helper as "overloaded". If the helper overload lasts | |
5201 | more than 3 minutes, the action prescribed by the on-persistent-overload | |
5202 | option applies. | |
5203 | ||
5204 | on-persistent-overload=action | |
5205 | ||
5206 | Specifies Squid reaction to a new helper request arriving when the helper | |
5207 | has been overloaded for more that 3 minutes already. The number of queued | |
5208 | requests determines whether the helper is overloaded (see the queue-size | |
5209 | option). | |
5210 | ||
5211 | Two actions are supported: | |
5212 | ||
5213 | die Squid worker quits. This is the default behavior. | |
5214 | ||
5215 | ERR Squid treats the helper request as if it was | |
5216 | immediately submitted, and the helper immediately | |
5217 | replied with an ERR response. This action has no effect | |
5218 | on the already queued and in-progress helper requests. | |
41bd17a4 | 5219 | DOC_END |
5220 | ||
5221 | NAME: url_rewrite_host_header redirect_rewrites_host_header | |
5222 | TYPE: onoff | |
5223 | DEFAULT: on | |
5224 | LOC: Config.onoff.redir_rewrites_host | |
5225 | DOC_START | |
3ce33807 AJ |
5226 | To preserve same-origin security policies in browsers and |
5227 | prevent Host: header forgery by redirectors Squid rewrites | |
5228 | any Host: header in redirected requests. | |
5229 | ||
5230 | If you are running an accelerator this may not be a wanted | |
5231 | effect of a redirector. This directive enables you disable | |
5232 | Host: alteration in reverse-proxy traffic. | |
5233 | ||
41bd17a4 | 5234 | WARNING: Entries are cached on the result of the URL rewriting |
5235 | process, so be careful if you have domain-virtual hosts. | |
3ce33807 AJ |
5236 | |
5237 | WARNING: Squid and other software verifies the URL and Host | |
5238 | are matching, so be careful not to relay through other proxies | |
5239 | or inspecting firewalls with this disabled. | |
41bd17a4 | 5240 | DOC_END |
5241 | ||
5242 | NAME: url_rewrite_access redirector_access | |
5243 | TYPE: acl_access | |
5244 | DEFAULT: none | |
638402dd | 5245 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
41bd17a4 | 5246 | LOC: Config.accessList.redirector |
5247 | DOC_START | |
5248 | If defined, this access list specifies which requests are | |
638402dd | 5249 | sent to the redirector processes. |
b3567eb5 FC |
5250 | |
5251 | This clause supports both fast and slow acl types. | |
5252 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
41bd17a4 | 5253 | DOC_END |
5254 | ||
5255 | NAME: url_rewrite_bypass redirector_bypass | |
5256 | TYPE: onoff | |
5257 | LOC: Config.onoff.redirector_bypass | |
5258 | DEFAULT: off | |
5259 | DOC_START | |
5260 | When this is 'on', a request will not go through the | |
6082a0e2 EB |
5261 | redirector if all the helpers are busy. If this is 'off' and the |
5262 | redirector queue grows too large, the action is prescribed by the | |
5263 | on-persistent-overload option. You should only enable this if the | |
5264 | redirectors are not critical to your caching system. If you use | |
41bd17a4 | 5265 | redirectors for access control, and you enable this option, |
5266 | users may have access to pages they should not | |
5267 | be allowed to request. | |
6825b101 CT |
5268 | This options sets default queue-size option of the url_rewrite_children |
5269 | to 0. | |
41bd17a4 | 5270 | DOC_END |
5271 | ||
fe7966ec | 5272 | NAME: url_rewrite_extras |
b11724bb CT |
5273 | TYPE: TokenOrQuotedString |
5274 | LOC: Config.redirector_extras | |
5275 | DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp" | |
5276 | DOC_START | |
5277 | Specifies a string to be append to request line format for the | |
5278 | rewriter helper. "Quoted" format values may contain spaces and | |
5279 | logformat %macros. In theory, any logformat %macro can be used. | |
5280 | In practice, a %macro expands as a dash (-) if the helper request is | |
5281 | sent before the required macro information is available to Squid. | |
5282 | DOC_END | |
5283 | ||
32fd6d8a | 5284 | NAME: url_rewrite_timeout |
ced8def3 AJ |
5285 | TYPE: UrlHelperTimeout |
5286 | LOC: Config.onUrlRewriteTimeout | |
32fd6d8a CT |
5287 | DEFAULT: none |
5288 | DEFAULT_DOC: Squid waits for the helper response forever | |
5289 | DOC_START | |
5290 | Squid times active requests to redirector. The timeout value and Squid | |
5291 | reaction to a timed out request are configurable using the following | |
5292 | format: | |
5293 | ||
ced8def3 | 5294 | url_rewrite_timeout timeout time-units on_timeout=<action> [response=<quoted-response>] |
32fd6d8a CT |
5295 | |
5296 | supported timeout actions: | |
ced8def3 | 5297 | fail Squid return a ERR_GATEWAY_FAILURE error page |
32fd6d8a | 5298 | |
ced8def3 | 5299 | bypass Do not re-write the URL |
32fd6d8a | 5300 | |
ced8def3 | 5301 | retry Send the lookup to the helper again |
32fd6d8a | 5302 | |
ced8def3 AJ |
5303 | use_configured_response |
5304 | Use the <quoted-response> as helper response | |
32fd6d8a CT |
5305 | DOC_END |
5306 | ||
a8a0b1c2 EC |
5307 | COMMENT_START |
5308 | OPTIONS FOR STORE ID | |
5309 | ----------------------------------------------------------------------------- | |
5310 | COMMENT_END | |
5311 | ||
5312 | NAME: store_id_program storeurl_rewrite_program | |
5313 | TYPE: wordlist | |
5314 | LOC: Config.Program.store_id | |
5315 | DEFAULT: none | |
5316 | DOC_START | |
5317 | Specify the location of the executable StoreID helper to use. | |
5318 | Since they can perform almost any function there isn't one included. | |
5319 | ||
5320 | For each requested URL, the helper will receive one line with the format | |
5321 | ||
b11724bb | 5322 | [channel-ID <SP>] URL [<SP> extras]<NL> |
a8a0b1c2 EC |
5323 | |
5324 | ||
5325 | After processing the request the helper must reply using the following format: | |
5326 | ||
5327 | [channel-ID <SP>] result [<SP> kv-pairs] | |
5328 | ||
5329 | The result code can be: | |
5330 | ||
5331 | OK store-id="..." | |
5332 | Use the StoreID supplied in 'store-id='. | |
5333 | ||
5334 | ERR | |
5335 | The default is to use HTTP request URL as the store ID. | |
5336 | ||
5337 | BH | |
5338 | An internal error occured in the helper, preventing | |
5339 | a result being identified. | |
5340 | ||
457857fe CT |
5341 | In addition to the above kv-pairs Squid also understands the following |
5342 | optional kv-pairs received from URL rewriters: | |
5343 | clt_conn_tag=TAG | |
5344 | Associates a TAG with the client TCP connection. | |
5345 | Please see url_rewrite_program related documentation for this | |
5346 | kv-pair | |
a8a0b1c2 | 5347 | |
b11724bb CT |
5348 | Helper programs should be prepared to receive and possibly ignore |
5349 | additional whitespace-separated tokens on each input line. | |
a8a0b1c2 EC |
5350 | |
5351 | When using the concurrency= option the protocol is changed by | |
5352 | introducing a query channel tag in front of the request/response. | |
5353 | The query channel tag is a number between 0 and concurrency-1. | |
5354 | This value must be echoed back unchanged to Squid as the first part | |
5355 | of the response relating to its request. | |
5356 | ||
5357 | NOTE: when using StoreID refresh_pattern will apply to the StoreID | |
5358 | returned from the helper and not the URL. | |
5359 | ||
5360 | WARNING: Wrong StoreID value returned by a careless helper may result | |
5361 | in the wrong cached response returned to the user. | |
5362 | ||
5363 | By default, a StoreID helper is not used. | |
5364 | DOC_END | |
5365 | ||
fe7966ec | 5366 | NAME: store_id_extras |
b11724bb CT |
5367 | TYPE: TokenOrQuotedString |
5368 | LOC: Config.storeId_extras | |
5369 | DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp" | |
5370 | DOC_START | |
5371 | Specifies a string to be append to request line format for the | |
5372 | StoreId helper. "Quoted" format values may contain spaces and | |
5373 | logformat %macros. In theory, any logformat %macro can be used. | |
5374 | In practice, a %macro expands as a dash (-) if the helper request is | |
5375 | sent before the required macro information is available to Squid. | |
5376 | DOC_END | |
5377 | ||
a8a0b1c2 EC |
5378 | NAME: store_id_children storeurl_rewrite_children |
5379 | TYPE: HelperChildConfig | |
5380 | DEFAULT: 20 startup=0 idle=1 concurrency=0 | |
5381 | LOC: Config.storeIdChildren | |
5382 | DOC_START | |
5383 | The maximum number of StoreID helper processes to spawn. If you limit | |
5384 | it too few Squid will have to wait for them to process a backlog of | |
5385 | requests, slowing it down. If you allow too many they will use RAM | |
5386 | and other system resources noticably. | |
5387 | ||
5388 | The startup= and idle= options allow some measure of skew in your | |
5389 | tuning. | |
5390 | ||
5391 | startup= | |
5392 | ||
5393 | Sets a minimum of how many processes are to be spawned when Squid | |
5394 | starts or reconfigures. When set to zero the first request will | |
5395 | cause spawning of the first child process to handle it. | |
5396 | ||
5397 | Starting too few will cause an initial slowdown in traffic as Squid | |
5398 | attempts to simultaneously spawn enough processes to cope. | |
5399 | ||
5400 | idle= | |
5401 | ||
5402 | Sets a minimum of how many processes Squid is to try and keep available | |
5403 | at all times. When traffic begins to rise above what the existing | |
5404 | processes can handle this many more will be spawned up to the maximum | |
5405 | configured. A minimum setting of 1 is required. | |
5406 | ||
5407 | concurrency= | |
5408 | ||
5409 | The number of requests each storeID helper can handle in | |
5410 | parallel. Defaults to 0 which indicates the helper | |
5411 | is a old-style single threaded program. | |
5412 | ||
5413 | When this directive is set to a value >= 1 then the protocol | |
5414 | used to communicate with the helper is modified to include | |
5415 | an ID in front of the request/response. The ID from the request | |
5416 | must be echoed back with the response to that request. | |
6825b101 CT |
5417 | |
5418 | queue-size=N | |
5419 | ||
6082a0e2 EB |
5420 | Sets the maximum number of queued requests to N. The default maximum |
5421 | is 2*numberofchildren. If the queued requests exceed queue size and | |
5422 | redirector_bypass configuration option is set, then redirector is bypassed. | |
5423 | Otherwise, Squid is allowed to temporarily exceed the configured maximum, | |
5424 | marking the affected helper as "overloaded". If the helper overload lasts | |
5425 | more than 3 minutes, the action prescribed by the on-persistent-overload | |
5426 | option applies. | |
5427 | ||
5428 | on-persistent-overload=action | |
5429 | ||
5430 | Specifies Squid reaction to a new helper request arriving when the helper | |
5431 | has been overloaded for more that 3 minutes already. The number of queued | |
5432 | requests determines whether the helper is overloaded (see the queue-size | |
5433 | option). | |
5434 | ||
5435 | Two actions are supported: | |
5436 | ||
5437 | die Squid worker quits. This is the default behavior. | |
5438 | ||
5439 | ERR Squid treats the helper request as if it was | |
5440 | immediately submitted, and the helper immediately | |
5441 | replied with an ERR response. This action has no effect | |
5442 | on the already queued and in-progress helper requests. | |
a8a0b1c2 EC |
5443 | DOC_END |
5444 | ||
5445 | NAME: store_id_access storeurl_rewrite_access | |
5446 | TYPE: acl_access | |
5447 | DEFAULT: none | |
638402dd | 5448 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
a8a0b1c2 EC |
5449 | LOC: Config.accessList.store_id |
5450 | DOC_START | |
5451 | If defined, this access list specifies which requests are | |
5452 | sent to the StoreID processes. By default all requests | |
5453 | are sent. | |
5454 | ||
5455 | This clause supports both fast and slow acl types. | |
5456 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
5457 | DOC_END | |
5458 | ||
5459 | NAME: store_id_bypass storeurl_rewrite_bypass | |
5460 | TYPE: onoff | |
5461 | LOC: Config.onoff.store_id_bypass | |
5462 | DEFAULT: on | |
5463 | DOC_START | |
5464 | When this is 'on', a request will not go through the | |
6082a0e2 EB |
5465 | helper if all helpers are busy. If this is 'off' and the helper |
5466 | queue grows too large, the action is prescribed by the | |
5467 | on-persistent-overload option. You should only enable this if the | |
5468 | helpers are not critical to your caching system. If you use | |
a8a0b1c2 EC |
5469 | helpers for critical caching components, and you enable this |
5470 | option, users may not get objects from cache. | |
6825b101 CT |
5471 | This options sets default queue-size option of the store_id_children |
5472 | to 0. | |
a8a0b1c2 EC |
5473 | DOC_END |
5474 | ||
41bd17a4 | 5475 | COMMENT_START |
5476 | OPTIONS FOR TUNING THE CACHE | |
5477 | ----------------------------------------------------------------------------- | |
5478 | COMMENT_END | |
5479 | ||
f04b37d8 | 5480 | NAME: cache no_cache |
5481 | TYPE: acl_access | |
5482 | DEFAULT: none | |
70706149 | 5483 | DEFAULT_DOC: By default, this directive is unused and has no effect. |
f04b37d8 | 5484 | LOC: Config.accessList.noCache |
41bd17a4 | 5485 | DOC_START |
70706149 AR |
5486 | Requests denied by this directive will not be served from the cache |
5487 | and their responses will not be stored in the cache. This directive | |
5488 | has no effect on other transactions and on already cached responses. | |
f04b37d8 | 5489 | |
b3567eb5 FC |
5490 | This clause supports both fast and slow acl types. |
5491 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
70706149 AR |
5492 | |
5493 | This and the two other similar caching directives listed below are | |
5494 | checked at different transaction processing stages, have different | |
5495 | access to response information, affect different cache operations, | |
5496 | and differ in slow ACLs support: | |
5497 | ||
5498 | * cache: Checked before Squid makes a hit/miss determination. | |
5499 | No access to reply information! | |
5500 | Denies both serving a hit and storing a miss. | |
5501 | Supports both fast and slow ACLs. | |
5502 | * send_hit: Checked after a hit was detected. | |
5503 | Has access to reply (hit) information. | |
5504 | Denies serving a hit only. | |
5505 | Supports fast ACLs only. | |
5506 | * store_miss: Checked before storing a cachable miss. | |
5507 | Has access to reply (miss) information. | |
5508 | Denies storing a miss only. | |
5509 | Supports fast ACLs only. | |
5510 | ||
5511 | If you are not sure which of the three directives to use, apply the | |
5512 | following decision logic: | |
5513 | ||
5514 | * If your ACL(s) are of slow type _and_ need response info, redesign. | |
5515 | Squid does not support that particular combination at this time. | |
5516 | Otherwise: | |
5517 | * If your directive ACL(s) are of slow type, use "cache"; and/or | |
5518 | * if your directive ACL(s) need no response info, use "cache". | |
5519 | Otherwise: | |
5520 | * If you do not want the response cached, use store_miss; and/or | |
5521 | * if you do not want a hit on a cached response, use send_hit. | |
5522 | DOC_END | |
5523 | ||
5524 | NAME: send_hit | |
5525 | TYPE: acl_access | |
5526 | DEFAULT: none | |
5527 | DEFAULT_DOC: By default, this directive is unused and has no effect. | |
5528 | LOC: Config.accessList.sendHit | |
5529 | DOC_START | |
5530 | Responses denied by this directive will not be served from the cache | |
5531 | (but may still be cached, see store_miss). This directive has no | |
5532 | effect on the responses it allows and on the cached objects. | |
5533 | ||
5534 | Please see the "cache" directive for a summary of differences among | |
5535 | store_miss, send_hit, and cache directives. | |
5536 | ||
5537 | Unlike the "cache" directive, send_hit only supports fast acl | |
5538 | types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
5539 | ||
5540 | For example: | |
5541 | ||
5542 | # apply custom Store ID mapping to some URLs | |
5543 | acl MapMe dstdomain .c.example.com | |
5544 | store_id_program ... | |
5545 | store_id_access allow MapMe | |
5546 | ||
5547 | # but prevent caching of special responses | |
5548 | # such as 302 redirects that cause StoreID loops | |
5549 | acl Ordinary http_status 200-299 | |
5550 | store_miss deny MapMe !Ordinary | |
5551 | ||
5552 | # and do not serve any previously stored special responses | |
5553 | # from the cache (in case they were already cached before | |
5554 | # the above store_miss rule was in effect). | |
5555 | send_hit deny MapMe !Ordinary | |
5556 | DOC_END | |
5557 | ||
5558 | NAME: store_miss | |
5559 | TYPE: acl_access | |
5560 | DEFAULT: none | |
5561 | DEFAULT_DOC: By default, this directive is unused and has no effect. | |
5562 | LOC: Config.accessList.storeMiss | |
5563 | DOC_START | |
5564 | Responses denied by this directive will not be cached (but may still | |
5565 | be served from the cache, see send_hit). This directive has no | |
5566 | effect on the responses it allows and on the already cached responses. | |
5567 | ||
5568 | Please see the "cache" directive for a summary of differences among | |
5569 | store_miss, send_hit, and cache directives. See the | |
5570 | send_hit directive for a usage example. | |
5571 | ||
5572 | Unlike the "cache" directive, store_miss only supports fast acl | |
5573 | types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
41bd17a4 | 5574 | DOC_END |
5575 | ||
570d3f75 AJ |
5576 | NAME: max_stale |
5577 | COMMENT: time-units | |
5578 | TYPE: time_t | |
5579 | LOC: Config.maxStale | |
5580 | DEFAULT: 1 week | |
5581 | DOC_START | |
5582 | This option puts an upper limit on how stale content Squid | |
5583 | will serve from the cache if cache validation fails. | |
5584 | Can be overriden by the refresh_pattern max-stale option. | |
5585 | DOC_END | |
5586 | ||
41bd17a4 | 5587 | NAME: refresh_pattern |
5588 | TYPE: refreshpattern | |
5589 | LOC: Config.Refresh | |
5590 | DEFAULT: none | |
5591 | DOC_START | |
5592 | usage: refresh_pattern [-i] regex min percent max [options] | |
9e7dbc51 | 5593 | |
6b698a21 | 5594 | By default, regular expressions are CASE-SENSITIVE. To make |
5595 | them case-insensitive, use the -i option. | |
9e7dbc51 | 5596 | |
41bd17a4 | 5597 | 'Min' is the time (in minutes) an object without an explicit |
5598 | expiry time should be considered fresh. The recommended | |
5599 | value is 0, any higher values may cause dynamic applications | |
5600 | to be erroneously cached unless the application designer | |
5601 | has taken the appropriate actions. | |
9e7dbc51 | 5602 | |
41bd17a4 | 5603 | 'Percent' is a percentage of the objects age (time since last |
5604 | modification age) an object without explicit expiry time | |
5605 | will be considered fresh. | |
5b807763 | 5606 | |
41bd17a4 | 5607 | 'Max' is an upper limit on how long objects without an explicit |
5608 | expiry time will be considered fresh. | |
9e7dbc51 | 5609 | |
41bd17a4 | 5610 | options: override-expire |
5611 | override-lastmod | |
5612 | reload-into-ims | |
5613 | ignore-reload | |
41bd17a4 | 5614 | ignore-no-store |
5615 | ignore-private | |
570d3f75 | 5616 | max-stale=NN |
41bd17a4 | 5617 | refresh-ims |
3d8b6ba4 | 5618 | store-stale |
a0ec9f68 | 5619 | |
41bd17a4 | 5620 | override-expire enforces min age even if the server |
9b2ad080 HN |
5621 | sent an explicit expiry time (e.g., with the |
5622 | Expires: header or Cache-Control: max-age). Doing this | |
5623 | VIOLATES the HTTP standard. Enabling this feature | |
5624 | could make you liable for problems which it causes. | |
6468fe10 | 5625 | |
04925576 AJ |
5626 | Note: override-expire does not enforce staleness - it only extends |
5627 | freshness / min. If the server returns a Expires time which | |
5628 | is longer than your max time, Squid will still consider | |
5629 | the object fresh for that period of time. | |
5630 | ||
41bd17a4 | 5631 | override-lastmod enforces min age even on objects |
5632 | that were modified recently. | |
934b03fc | 5633 | |
46017fdd CT |
5634 | reload-into-ims changes a client no-cache or ``reload'' |
5635 | request for a cached entry into a conditional request using | |
5636 | If-Modified-Since and/or If-None-Match headers, provided the | |
5637 | cached entry has a Last-Modified and/or a strong ETag header. | |
5638 | Doing this VIOLATES the HTTP standard. Enabling this feature | |
5639 | could make you liable for problems which it causes. | |
dba79ac5 | 5640 | |
41bd17a4 | 5641 | ignore-reload ignores a client no-cache or ``reload'' |
5642 | header. Doing this VIOLATES the HTTP standard. Enabling | |
5643 | this feature could make you liable for problems which | |
5644 | it causes. | |
9bc73deb | 5645 | |
41bd17a4 | 5646 | ignore-no-store ignores any ``Cache-control: no-store'' |
5647 | headers received from a server. Doing this VIOLATES | |
5648 | the HTTP standard. Enabling this feature could make you | |
5649 | liable for problems which it causes. | |
5650 | ||
5651 | ignore-private ignores any ``Cache-control: private'' | |
5652 | headers received from a server. Doing this VIOLATES | |
5653 | the HTTP standard. Enabling this feature could make you | |
5654 | liable for problems which it causes. | |
5655 | ||
41bd17a4 | 5656 | refresh-ims causes squid to contact the origin server |
5657 | when a client issues an If-Modified-Since request. This | |
5658 | ensures that the client will receive an updated version | |
5659 | if one is available. | |
5660 | ||
3d8b6ba4 AJ |
5661 | store-stale stores responses even if they don't have explicit |
5662 | freshness or a validator (i.e., Last-Modified or an ETag) | |
5663 | present, or if they're already stale. By default, Squid will | |
5664 | not cache such responses because they usually can't be | |
5665 | reused. Note that such responses will be stale by default. | |
5666 | ||
570d3f75 AJ |
5667 | max-stale=NN provide a maximum staleness factor. Squid won't |
5668 | serve objects more stale than this even if it failed to | |
5669 | validate the object. Default: use the max_stale global limit. | |
5670 | ||
41bd17a4 | 5671 | Basically a cached object is: |
5672 | ||
fb41bbb2 | 5673 | FRESH if expire > now, else STALE |
41bd17a4 | 5674 | STALE if age > max |
5675 | FRESH if lm-factor < percent, else STALE | |
5676 | FRESH if age < min | |
5677 | else STALE | |
5678 | ||
5679 | The refresh_pattern lines are checked in the order listed here. | |
5680 | The first entry which matches is used. If none of the entries | |
5681 | match the default will be used. | |
5682 | ||
5683 | Note, you must uncomment all the default lines if you want | |
5684 | to change one. The default setting is only active if none is | |
5685 | used. | |
5686 | ||
41bd17a4 | 5687 | NOCOMMENT_START |
e0855596 | 5688 | |
638402dd | 5689 | # |
e0855596 | 5690 | # Add any of your own refresh_pattern entries above these. |
638402dd | 5691 | # |
41bd17a4 | 5692 | refresh_pattern ^ftp: 1440 20% 10080 |
5693 | refresh_pattern ^gopher: 1440 0% 1440 | |
89db45fa | 5694 | refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 |
41bd17a4 | 5695 | refresh_pattern . 0 20% 4320 |
5696 | NOCOMMENT_END | |
5697 | DOC_END | |
5698 | ||
5699 | NAME: quick_abort_min | |
5700 | COMMENT: (KB) | |
5701 | TYPE: kb_int64_t | |
5702 | DEFAULT: 16 KB | |
5703 | LOC: Config.quickAbort.min | |
5704 | DOC_NONE | |
5705 | ||
5706 | NAME: quick_abort_max | |
5707 | COMMENT: (KB) | |
5708 | TYPE: kb_int64_t | |
5709 | DEFAULT: 16 KB | |
5710 | LOC: Config.quickAbort.max | |
5711 | DOC_NONE | |
5712 | ||
5713 | NAME: quick_abort_pct | |
5714 | COMMENT: (percent) | |
5715 | TYPE: int | |
5716 | DEFAULT: 95 | |
5717 | LOC: Config.quickAbort.pct | |
5718 | DOC_START | |
5719 | The cache by default continues downloading aborted requests | |
5720 | which are almost completed (less than 16 KB remaining). This | |
5721 | may be undesirable on slow (e.g. SLIP) links and/or very busy | |
5722 | caches. Impatient users may tie up file descriptors and | |
5723 | bandwidth by repeatedly requesting and immediately aborting | |
5724 | downloads. | |
5725 | ||
5726 | When the user aborts a request, Squid will check the | |
2d4eefd9 | 5727 | quick_abort values to the amount of data transferred until |
41bd17a4 | 5728 | then. |
5729 | ||
5730 | If the transfer has less than 'quick_abort_min' KB remaining, | |
5731 | it will finish the retrieval. | |
5732 | ||
5733 | If the transfer has more than 'quick_abort_max' KB remaining, | |
5734 | it will abort the retrieval. | |
5735 | ||
5736 | If more than 'quick_abort_pct' of the transfer has completed, | |
5737 | it will finish the retrieval. | |
5738 | ||
5739 | If you do not want any retrieval to continue after the client | |
5740 | has aborted, set both 'quick_abort_min' and 'quick_abort_max' | |
5741 | to '0 KB'. | |
5742 | ||
5743 | If you want retrievals to always continue if they are being | |
5744 | cached set 'quick_abort_min' to '-1 KB'. | |
5745 | DOC_END | |
60d096f4 | 5746 | |
41bd17a4 | 5747 | NAME: read_ahead_gap |
5748 | COMMENT: buffer-size | |
5749 | TYPE: b_int64_t | |
5750 | LOC: Config.readAheadGap | |
5751 | DEFAULT: 16 KB | |
5752 | DOC_START | |
5753 | The amount of data the cache will buffer ahead of what has been | |
5754 | sent to the client when retrieving an object from another server. | |
5755 | DOC_END | |
53e738c6 | 5756 | |
41bd17a4 | 5757 | NAME: negative_ttl |
626096be | 5758 | IFDEF: USE_HTTP_VIOLATIONS |
41bd17a4 | 5759 | COMMENT: time-units |
5760 | TYPE: time_t | |
5761 | LOC: Config.negativeTtl | |
ac9cc053 | 5762 | DEFAULT: 0 seconds |
41bd17a4 | 5763 | DOC_START |
ac9cc053 AJ |
5764 | Set the Default Time-to-Live (TTL) for failed requests. |
5765 | Certain types of failures (such as "connection refused" and | |
5766 | "404 Not Found") are able to be negatively-cached for a short time. | |
5767 | Modern web servers should provide Expires: header, however if they | |
5768 | do not this can provide a minimum TTL. | |
5769 | The default is not to cache errors with unknown expiry details. | |
5770 | ||
5771 | Note that this is different from negative caching of DNS lookups. | |
39956c7c AJ |
5772 | |
5773 | WARNING: Doing this VIOLATES the HTTP standard. Enabling | |
5774 | this feature could make you liable for problems which it | |
5775 | causes. | |
41bd17a4 | 5776 | DOC_END |
53e738c6 | 5777 | |
41bd17a4 | 5778 | NAME: positive_dns_ttl |
5779 | COMMENT: time-units | |
5780 | TYPE: time_t | |
5781 | LOC: Config.positiveDnsTtl | |
5782 | DEFAULT: 6 hours | |
5783 | DOC_START | |
5784 | Upper limit on how long Squid will cache positive DNS responses. | |
5785 | Default is 6 hours (360 minutes). This directive must be set | |
5786 | larger than negative_dns_ttl. | |
5787 | DOC_END | |
c4ab8329 | 5788 | |
41bd17a4 | 5789 | NAME: negative_dns_ttl |
5790 | COMMENT: time-units | |
5791 | TYPE: time_t | |
5792 | LOC: Config.negativeDnsTtl | |
5793 | DEFAULT: 1 minutes | |
5794 | DOC_START | |
5795 | Time-to-Live (TTL) for negative caching of failed DNS lookups. | |
5796 | This also sets the lower cache limit on positive lookups. | |
5797 | Minimum value is 1 second, and it is not recommendable to go | |
5798 | much below 10 seconds. | |
5799 | DOC_END | |
7df0bfd7 | 5800 | |
41bd17a4 | 5801 | NAME: range_offset_limit |
11e3fa1c AJ |
5802 | COMMENT: size [acl acl...] |
5803 | TYPE: acl_b_size_t | |
41bd17a4 | 5804 | LOC: Config.rangeOffsetLimit |
11e3fa1c | 5805 | DEFAULT: none |
41bd17a4 | 5806 | DOC_START |
11e3fa1c AJ |
5807 | usage: (size) [units] [[!]aclname] |
5808 | ||
5809 | Sets an upper limit on how far (number of bytes) into the file | |
5810 | a Range request may be to cause Squid to prefetch the whole file. | |
5811 | If beyond this limit, Squid forwards the Range request as it is and | |
5812 | the result is NOT cached. | |
5813 | ||
41bd17a4 | 5814 | This is to stop a far ahead range request (lets say start at 17MB) |
5815 | from making Squid fetch the whole object up to that point before | |
5816 | sending anything to the client. | |
11e3fa1c AJ |
5817 | |
5818 | Multiple range_offset_limit lines may be specified, and they will | |
5819 | be searched from top to bottom on each request until a match is found. | |
5820 | The first match found will be used. If no line matches a request, the | |
5821 | default limit of 0 bytes will be used. | |
5822 | ||
5823 | 'size' is the limit specified as a number of units. | |
5824 | ||
5825 | 'units' specifies whether to use bytes, KB, MB, etc. | |
5826 | If no units are specified bytes are assumed. | |
5827 | ||
5828 | A size of 0 causes Squid to never fetch more than the | |
ab275c7b | 5829 | client requested. (default) |
11e3fa1c AJ |
5830 | |
5831 | A size of 'none' causes Squid to always fetch the object from the | |
41bd17a4 | 5832 | beginning so it may cache the result. (2.0 style) |
11e3fa1c AJ |
5833 | |
5834 | 'aclname' is the name of a defined ACL. | |
5835 | ||
5836 | NP: Using 'none' as the byte value here will override any quick_abort settings | |
5837 | that may otherwise apply to the range request. The range request will | |
ab275c7b AJ |
5838 | be fully fetched from start to finish regardless of the client |
5839 | actions. This affects bandwidth usage. | |
41bd17a4 | 5840 | DOC_END |
d95b862f | 5841 | |
41bd17a4 | 5842 | NAME: minimum_expiry_time |
5843 | COMMENT: (seconds) | |
5844 | TYPE: time_t | |
5845 | LOC: Config.minimum_expiry_time | |
5846 | DEFAULT: 60 seconds | |
5847 | DOC_START | |
5848 | The minimum caching time according to (Expires - Date) | |
638402dd AJ |
5849 | headers Squid honors if the object can't be revalidated. |
5850 | The default is 60 seconds. | |
5851 | ||
5852 | In reverse proxy environments it might be desirable to honor | |
5853 | shorter object lifetimes. It is most likely better to make | |
5854 | your server return a meaningful Last-Modified header however. | |
5855 | ||
5856 | In ESI environments where page fragments often have short | |
5857 | lifetimes, this will often be best set to 0. | |
41bd17a4 | 5858 | DOC_END |
c68e9c6b | 5859 | |
41bd17a4 | 5860 | NAME: store_avg_object_size |
58d5c5dd DK |
5861 | COMMENT: (bytes) |
5862 | TYPE: b_int64_t | |
41bd17a4 | 5863 | DEFAULT: 13 KB |
5864 | LOC: Config.Store.avgObjectSize | |
5865 | DOC_START | |
5866 | Average object size, used to estimate number of objects your | |
5867 | cache can hold. The default is 13 KB. | |
638402dd AJ |
5868 | |
5869 | This is used to pre-seed the cache index memory allocation to | |
5870 | reduce expensive reallocate operations while handling clients | |
5871 | traffic. Too-large values may result in memory allocation during | |
5872 | peak traffic, too-small values will result in wasted memory. | |
5873 | ||
5874 | Check the cache manager 'info' report metrics for the real | |
5875 | object sizes seen by your Squid before tuning this. | |
cccac0a2 | 5876 | DOC_END |
5877 | ||
41bd17a4 | 5878 | NAME: store_objects_per_bucket |
5879 | TYPE: int | |
5880 | DEFAULT: 20 | |
5881 | LOC: Config.Store.objectsPerBucket | |
5882 | DOC_START | |
5883 | Target number of objects per bucket in the store hash table. | |
5884 | Lowering this value increases the total number of buckets and | |
5885 | also the storage maintenance rate. The default is 20. | |
5886 | DOC_END | |
5887 | ||
5888 | COMMENT_START | |
5889 | HTTP OPTIONS | |
5890 | ----------------------------------------------------------------------------- | |
5891 | COMMENT_END | |
5892 | ||
f04b37d8 | 5893 | NAME: request_header_max_size |
5894 | COMMENT: (KB) | |
5895 | TYPE: b_size_t | |
df2eec10 | 5896 | DEFAULT: 64 KB |
f04b37d8 | 5897 | LOC: Config.maxRequestHeaderSize |
5898 | DOC_START | |
5899 | This specifies the maximum size for HTTP headers in a request. | |
5900 | Request headers are usually relatively small (about 512 bytes). | |
5901 | Placing a limit on the request header size will catch certain | |
5902 | bugs (for example with persistent connections) and possibly | |
5903 | buffer-overflow or denial-of-service attacks. | |
5904 | DOC_END | |
5905 | ||
5906 | NAME: reply_header_max_size | |
5907 | COMMENT: (KB) | |
5908 | TYPE: b_size_t | |
df2eec10 | 5909 | DEFAULT: 64 KB |
f04b37d8 | 5910 | LOC: Config.maxReplyHeaderSize |
5911 | DOC_START | |
5912 | This specifies the maximum size for HTTP headers in a reply. | |
5913 | Reply headers are usually relatively small (about 512 bytes). | |
5914 | Placing a limit on the reply header size will catch certain | |
5915 | bugs (for example with persistent connections) and possibly | |
5916 | buffer-overflow or denial-of-service attacks. | |
5917 | DOC_END | |
5918 | ||
5919 | NAME: request_body_max_size | |
5920 | COMMENT: (bytes) | |
5921 | TYPE: b_int64_t | |
5922 | DEFAULT: 0 KB | |
638402dd | 5923 | DEFAULT_DOC: No limit. |
f04b37d8 | 5924 | LOC: Config.maxRequestBodySize |
5925 | DOC_START | |
5926 | This specifies the maximum size for an HTTP request body. | |
5927 | In other words, the maximum size of a PUT/POST request. | |
5928 | A user who attempts to send a request with a body larger | |
5929 | than this limit receives an "Invalid Request" error message. | |
5930 | If you set this parameter to a zero (the default), there will | |
5931 | be no limit imposed. | |
638402dd AJ |
5932 | |
5933 | See also client_request_buffer_max_size for an alternative | |
5934 | limitation on client uploads which can be configured. | |
f04b37d8 | 5935 | DOC_END |
5936 | ||
1368d115 CT |
5937 | NAME: client_request_buffer_max_size |
5938 | COMMENT: (bytes) | |
5939 | TYPE: b_size_t | |
5940 | DEFAULT: 512 KB | |
5941 | LOC: Config.maxRequestBufferSize | |
5942 | DOC_START | |
5943 | This specifies the maximum buffer size of a client request. | |
5944 | It prevents squid eating too much memory when somebody uploads | |
5945 | a large file. | |
5946 | DOC_END | |
5947 | ||
41bd17a4 | 5948 | NAME: broken_posts |
626096be | 5949 | IFDEF: USE_HTTP_VIOLATIONS |
cccac0a2 | 5950 | TYPE: acl_access |
cccac0a2 | 5951 | DEFAULT: none |
638402dd | 5952 | DEFAULT_DOC: Obey RFC 2616. |
41bd17a4 | 5953 | LOC: Config.accessList.brokenPosts |
cccac0a2 | 5954 | DOC_START |
41bd17a4 | 5955 | A list of ACL elements which, if matched, causes Squid to send |
5956 | an extra CRLF pair after the body of a PUT/POST request. | |
cccac0a2 | 5957 | |
41bd17a4 | 5958 | Some HTTP servers has broken implementations of PUT/POST, |
5959 | and rely on an extra CRLF pair sent by some WWW clients. | |
cccac0a2 | 5960 | |
41bd17a4 | 5961 | Quote from RFC2616 section 4.1 on this matter: |
cccac0a2 | 5962 | |
41bd17a4 | 5963 | Note: certain buggy HTTP/1.0 client implementations generate an |
5964 | extra CRLF's after a POST request. To restate what is explicitly | |
5965 | forbidden by the BNF, an HTTP/1.1 client must not preface or follow | |
5966 | a request with an extra CRLF. | |
cccac0a2 | 5967 | |
b3567eb5 FC |
5968 | This clause only supports fast acl types. |
5969 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
5970 | ||
41bd17a4 | 5971 | Example: |
5972 | acl buggy_server url_regex ^http://.... | |
5973 | broken_posts allow buggy_server | |
5974 | DOC_END | |
cccac0a2 | 5975 | |
22fff3bf | 5976 | NAME: adaptation_uses_indirect_client icap_uses_indirect_client |
57d76dd4 AJ |
5977 | COMMENT: on|off |
5978 | TYPE: onoff | |
22fff3bf | 5979 | IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_ADAPTATION |
57d76dd4 | 5980 | DEFAULT: on |
22fff3bf | 5981 | LOC: Adaptation::Config::use_indirect_client |
57d76dd4 | 5982 | DOC_START |
ea3ae478 AR |
5983 | Controls whether the indirect client IP address (instead of the direct |
5984 | client IP address) is passed to adaptation services. | |
5985 | ||
5986 | See also: follow_x_forwarded_for adaptation_send_client_ip | |
57d76dd4 AJ |
5987 | DOC_END |
5988 | ||
41bd17a4 | 5989 | NAME: via |
626096be | 5990 | IFDEF: USE_HTTP_VIOLATIONS |
41bd17a4 | 5991 | COMMENT: on|off |
5992 | TYPE: onoff | |
5993 | DEFAULT: on | |
5994 | LOC: Config.onoff.via | |
5995 | DOC_START | |
5996 | If set (default), Squid will include a Via header in requests and | |
5997 | replies as required by RFC2616. | |
5998 | DOC_END | |
4cc6eb12 | 5999 | |
41bd17a4 | 6000 | NAME: vary_ignore_expire |
6001 | COMMENT: on|off | |
6002 | TYPE: onoff | |
6003 | LOC: Config.onoff.vary_ignore_expire | |
6004 | DEFAULT: off | |
6005 | DOC_START | |
6006 | Many HTTP servers supporting Vary gives such objects | |
6007 | immediate expiry time with no cache-control header | |
6008 | when requested by a HTTP/1.0 client. This option | |
6009 | enables Squid to ignore such expiry times until | |
6010 | HTTP/1.1 is fully implemented. | |
7e73cd78 AJ |
6011 | |
6012 | WARNING: If turned on this may eventually cause some | |
6013 | varying objects not intended for caching to get cached. | |
cccac0a2 | 6014 | DOC_END |
c4ab8329 | 6015 | |
41bd17a4 | 6016 | NAME: request_entities |
6017 | TYPE: onoff | |
6018 | LOC: Config.onoff.request_entities | |
6019 | DEFAULT: off | |
6020 | DOC_START | |
6021 | Squid defaults to deny GET and HEAD requests with request entities, | |
6022 | as the meaning of such requests are undefined in the HTTP standard | |
6023 | even if not explicitly forbidden. | |
0976f8db | 6024 | |
41bd17a4 | 6025 | Set this directive to on if you have clients which insists |
6026 | on sending request entities in GET or HEAD requests. But be warned | |
6027 | that there is server software (both proxies and web servers) which | |
6028 | can fail to properly process this kind of request which may make you | |
6029 | vulnerable to cache pollution attacks if enabled. | |
cccac0a2 | 6030 | DOC_END |
6b53c392 | 6031 | |
41bd17a4 | 6032 | NAME: request_header_access |
626096be | 6033 | IFDEF: USE_HTTP_VIOLATIONS |
3b07476b | 6034 | TYPE: http_header_access |
41bd17a4 | 6035 | LOC: Config.request_header_access |
cccac0a2 | 6036 | DEFAULT: none |
638402dd | 6037 | DEFAULT_DOC: No limits. |
cccac0a2 | 6038 | DOC_START |
41bd17a4 | 6039 | Usage: request_header_access header_name allow|deny [!]aclname ... |
0976f8db | 6040 | |
41bd17a4 | 6041 | WARNING: Doing this VIOLATES the HTTP standard. Enabling |
6042 | this feature could make you liable for problems which it | |
6043 | causes. | |
0976f8db | 6044 | |
41bd17a4 | 6045 | This option replaces the old 'anonymize_headers' and the |
6046 | older 'http_anonymizer' option with something that is much | |
3b07476b CT |
6047 | more configurable. A list of ACLs for each header name allows |
6048 | removal of specific header fields under specific conditions. | |
6049 | ||
6050 | This option only applies to outgoing HTTP request headers (i.e., | |
6051 | headers sent by Squid to the next HTTP hop such as a cache peer | |
6052 | or an origin server). The option has no effect during cache hit | |
6053 | detection. The equivalent adaptation vectoring point in ICAP | |
6054 | terminology is post-cache REQMOD. | |
6055 | ||
6056 | The option is applied to individual outgoing request header | |
6057 | fields. For each request header field F, Squid uses the first | |
6058 | qualifying sets of request_header_access rules: | |
6059 | ||
6060 | 1. Rules with header_name equal to F's name. | |
6061 | 2. Rules with header_name 'Other', provided F's name is not | |
6062 | on the hard-coded list of commonly used HTTP header names. | |
6063 | 3. Rules with header_name 'All'. | |
6064 | ||
6065 | Within that qualifying rule set, rule ACLs are checked as usual. | |
6066 | If ACLs of an "allow" rule match, the header field is allowed to | |
6067 | go through as is. If ACLs of a "deny" rule match, the header is | |
6068 | removed and request_header_replace is then checked to identify | |
6069 | if the removed header has a replacement. If no rules within the | |
6070 | set have matching ACLs, the header field is left as is. | |
5401aa8d | 6071 | |
41bd17a4 | 6072 | For example, to achieve the same behavior as the old |
6073 | 'http_anonymizer standard' option, you should use: | |
5401aa8d | 6074 | |
41bd17a4 | 6075 | request_header_access From deny all |
6076 | request_header_access Referer deny all | |
41bd17a4 | 6077 | request_header_access User-Agent deny all |
5401aa8d | 6078 | |
41bd17a4 | 6079 | Or, to reproduce the old 'http_anonymizer paranoid' feature |
6080 | you should use: | |
5401aa8d | 6081 | |
41bd17a4 | 6082 | request_header_access Authorization allow all |
41bd17a4 | 6083 | request_header_access Proxy-Authorization allow all |
41bd17a4 | 6084 | request_header_access Cache-Control allow all |
41bd17a4 | 6085 | request_header_access Content-Length allow all |
6086 | request_header_access Content-Type allow all | |
6087 | request_header_access Date allow all | |
41bd17a4 | 6088 | request_header_access Host allow all |
6089 | request_header_access If-Modified-Since allow all | |
41bd17a4 | 6090 | request_header_access Pragma allow all |
6091 | request_header_access Accept allow all | |
6092 | request_header_access Accept-Charset allow all | |
6093 | request_header_access Accept-Encoding allow all | |
6094 | request_header_access Accept-Language allow all | |
41bd17a4 | 6095 | request_header_access Connection allow all |
41bd17a4 | 6096 | request_header_access All deny all |
5401aa8d | 6097 | |
638402dd | 6098 | HTTP reply headers are controlled with the reply_header_access directive. |
5401aa8d | 6099 | |
638402dd | 6100 | By default, all headers are allowed (no anonymizing is performed). |
5401aa8d | 6101 | DOC_END |
6102 | ||
41bd17a4 | 6103 | NAME: reply_header_access |
626096be | 6104 | IFDEF: USE_HTTP_VIOLATIONS |
3b07476b | 6105 | TYPE: http_header_access |
41bd17a4 | 6106 | LOC: Config.reply_header_access |
cccac0a2 | 6107 | DEFAULT: none |
638402dd | 6108 | DEFAULT_DOC: No limits. |
cccac0a2 | 6109 | DOC_START |
41bd17a4 | 6110 | Usage: reply_header_access header_name allow|deny [!]aclname ... |
934b03fc | 6111 | |
41bd17a4 | 6112 | WARNING: Doing this VIOLATES the HTTP standard. Enabling |
6113 | this feature could make you liable for problems which it | |
6114 | causes. | |
934b03fc | 6115 | |
41bd17a4 | 6116 | This option only applies to reply headers, i.e., from the |
6117 | server to the client. | |
934b03fc | 6118 | |
41bd17a4 | 6119 | This is the same as request_header_access, but in the other |
3b07476b CT |
6120 | direction. Please see request_header_access for detailed |
6121 | documentation. | |
cccac0a2 | 6122 | |
41bd17a4 | 6123 | For example, to achieve the same behavior as the old |
6124 | 'http_anonymizer standard' option, you should use: | |
cccac0a2 | 6125 | |
41bd17a4 | 6126 | reply_header_access Server deny all |
41bd17a4 | 6127 | reply_header_access WWW-Authenticate deny all |
6128 | reply_header_access Link deny all | |
cccac0a2 | 6129 | |
41bd17a4 | 6130 | Or, to reproduce the old 'http_anonymizer paranoid' feature |
6131 | you should use: | |
cccac0a2 | 6132 | |
41bd17a4 | 6133 | reply_header_access Allow allow all |
41bd17a4 | 6134 | reply_header_access WWW-Authenticate allow all |
41bd17a4 | 6135 | reply_header_access Proxy-Authenticate allow all |
6136 | reply_header_access Cache-Control allow all | |
6137 | reply_header_access Content-Encoding allow all | |
6138 | reply_header_access Content-Length allow all | |
6139 | reply_header_access Content-Type allow all | |
6140 | reply_header_access Date allow all | |
6141 | reply_header_access Expires allow all | |
41bd17a4 | 6142 | reply_header_access Last-Modified allow all |
6143 | reply_header_access Location allow all | |
6144 | reply_header_access Pragma allow all | |
41bd17a4 | 6145 | reply_header_access Content-Language allow all |
41bd17a4 | 6146 | reply_header_access Retry-After allow all |
6147 | reply_header_access Title allow all | |
638402dd | 6148 | reply_header_access Content-Disposition allow all |
41bd17a4 | 6149 | reply_header_access Connection allow all |
41bd17a4 | 6150 | reply_header_access All deny all |
cccac0a2 | 6151 | |
638402dd | 6152 | HTTP request headers are controlled with the request_header_access directive. |
cccac0a2 | 6153 | |
41bd17a4 | 6154 | By default, all headers are allowed (no anonymizing is |
6155 | performed). | |
cccac0a2 | 6156 | DOC_END |
6157 | ||
75e4f2ea | 6158 | NAME: request_header_replace header_replace |
626096be | 6159 | IFDEF: USE_HTTP_VIOLATIONS |
3b07476b | 6160 | TYPE: http_header_replace |
41bd17a4 | 6161 | LOC: Config.request_header_access |
cccac0a2 | 6162 | DEFAULT: none |
41bd17a4 | 6163 | DOC_START |
75e4f2ea MB |
6164 | Usage: request_header_replace header_name message |
6165 | Example: request_header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit) | |
cccac0a2 | 6166 | |
41bd17a4 | 6167 | This option allows you to change the contents of headers |
75e4f2ea | 6168 | denied with request_header_access above, by replacing them |
638402dd | 6169 | with some fixed string. |
cccac0a2 | 6170 | |
41bd17a4 | 6171 | This only applies to request headers, not reply headers. |
cccac0a2 | 6172 | |
41bd17a4 | 6173 | By default, headers are removed if denied. |
6174 | DOC_END | |
cccac0a2 | 6175 | |
75e4f2ea MB |
6176 | NAME: reply_header_replace |
6177 | IFDEF: USE_HTTP_VIOLATIONS | |
3b07476b | 6178 | TYPE: http_header_replace |
75e4f2ea MB |
6179 | LOC: Config.reply_header_access |
6180 | DEFAULT: none | |
6181 | DOC_START | |
6182 | Usage: reply_header_replace header_name message | |
6183 | Example: reply_header_replace Server Foo/1.0 | |
6184 | ||
6185 | This option allows you to change the contents of headers | |
6186 | denied with reply_header_access above, by replacing them | |
6187 | with some fixed string. | |
6188 | ||
6189 | This only applies to reply headers, not request headers. | |
6190 | ||
6191 | By default, headers are removed if denied. | |
6192 | DOC_END | |
6193 | ||
f4698e0b CT |
6194 | NAME: request_header_add |
6195 | TYPE: HeaderWithAclList | |
6196 | LOC: Config.request_header_add | |
6197 | DEFAULT: none | |
6198 | DOC_START | |
cde8f31b | 6199 | Usage: request_header_add field-name field-value [ acl ... ] |
f4698e0b CT |
6200 | Example: request_header_add X-Client-CA "CA=%ssl::>cert_issuer" all |
6201 | ||
6202 | This option adds header fields to outgoing HTTP requests (i.e., | |
6203 | request headers sent by Squid to the next HTTP hop such as a | |
6204 | cache peer or an origin server). The option has no effect during | |
6205 | cache hit detection. The equivalent adaptation vectoring point | |
6206 | in ICAP terminology is post-cache REQMOD. | |
6207 | ||
6208 | Field-name is a token specifying an HTTP header name. If a | |
6209 | standard HTTP header name is used, Squid does not check whether | |
6210 | the new header conflicts with any existing headers or violates | |
6211 | HTTP rules. If the request to be modified already contains a | |
6212 | field with the same name, the old field is preserved but the | |
6213 | header field values are not merged. | |
6214 | ||
6215 | Field-value is either a token or a quoted string. If quoted | |
6216 | string format is used, then the surrounding quotes are removed | |
6217 | while escape sequences and %macros are processed. | |
6218 | ||
f4698e0b CT |
6219 | One or more Squid ACLs may be specified to restrict header |
6220 | injection to matching requests. As always in squid.conf, all | |
cde8f31b NH |
6221 | ACLs in the ACL list must be satisfied for the insertion to |
6222 | happen. The request_header_add supports fast ACLs only. | |
6223 | ||
6224 | See also: reply_header_add. | |
6225 | DOC_END | |
6226 | ||
6227 | NAME: reply_header_add | |
6228 | TYPE: HeaderWithAclList | |
6229 | LOC: Config.reply_header_add | |
6230 | DEFAULT: none | |
6231 | DOC_START | |
6232 | Usage: reply_header_add field-name field-value [ acl ... ] | |
6233 | Example: reply_header_add X-Client-CA "CA=%ssl::>cert_issuer" all | |
6234 | ||
6235 | This option adds header fields to outgoing HTTP responses (i.e., response | |
6236 | headers delivered by Squid to the client). This option has no effect on | |
6237 | cache hit detection. The equivalent adaptation vectoring point in | |
6238 | ICAP terminology is post-cache RESPMOD. This option does not apply to | |
6239 | successful CONNECT replies. | |
6240 | ||
6241 | Field-name is a token specifying an HTTP header name. If a | |
6242 | standard HTTP header name is used, Squid does not check whether | |
6243 | the new header conflicts with any existing headers or violates | |
6244 | HTTP rules. If the response to be modified already contains a | |
6245 | field with the same name, the old field is preserved but the | |
6246 | header field values are not merged. | |
6247 | ||
6248 | Field-value is either a token or a quoted string. If quoted | |
6249 | string format is used, then the surrounding quotes are removed | |
6250 | while escape sequences and %macros are processed. | |
6251 | ||
6252 | One or more Squid ACLs may be specified to restrict header | |
6253 | injection to matching responses. As always in squid.conf, all | |
6254 | ACLs in the ACL list must be satisfied for the insertion to | |
6255 | happen. The reply_header_add option supports fast ACLs only. | |
6256 | ||
6257 | See also: request_header_add. | |
f4698e0b CT |
6258 | DOC_END |
6259 | ||
d7f4a0b7 CT |
6260 | NAME: note |
6261 | TYPE: note | |
6262 | LOC: Config.notes | |
6263 | DEFAULT: none | |
6264 | DOC_START | |
6265 | This option used to log custom information about the master | |
6266 | transaction. For example, an admin may configure Squid to log | |
6267 | which "user group" the transaction belongs to, where "user group" | |
6268 | will be determined based on a set of ACLs and not [just] | |
6269 | authentication information. | |
6270 | Values of key/value pairs can be logged using %{key}note macros: | |
6271 | ||
6272 | note key value acl ... | |
6273 | logformat myFormat ... %{key}note ... | |
6274 | DOC_END | |
6275 | ||
41bd17a4 | 6276 | NAME: relaxed_header_parser |
6277 | COMMENT: on|off|warn | |
6278 | TYPE: tristate | |
6279 | LOC: Config.onoff.relaxed_header_parser | |
6280 | DEFAULT: on | |
6281 | DOC_START | |
6282 | In the default "on" setting Squid accepts certain forms | |
6283 | of non-compliant HTTP messages where it is unambiguous | |
6284 | what the sending application intended even if the message | |
6285 | is not correctly formatted. The messages is then normalized | |
6286 | to the correct form when forwarded by Squid. | |
cccac0a2 | 6287 | |
41bd17a4 | 6288 | If set to "warn" then a warning will be emitted in cache.log |
6289 | each time such HTTP error is encountered. | |
cccac0a2 | 6290 | |
41bd17a4 | 6291 | If set to "off" then such HTTP errors will cause the request |
6292 | or response to be rejected. | |
6293 | DOC_END | |
7d90757b | 6294 | |
55eae904 AR |
6295 | NAME: collapsed_forwarding |
6296 | COMMENT: (on|off) | |
6297 | TYPE: onoff | |
6298 | LOC: Config.onoff.collapsed_forwarding | |
6299 | DEFAULT: off | |
6300 | DOC_START | |
6301 | This option controls whether Squid is allowed to merge multiple | |
6302 | potentially cachable requests for the same URI before Squid knows | |
6303 | whether the response is going to be cachable. | |
6304 | ||
1a210de4 EB |
6305 | When enabled, instead of forwarding each concurrent request for |
6306 | the same URL, Squid just sends the first of them. The other, so | |
6307 | called "collapsed" requests, wait for the response to the first | |
6308 | request and, if it happens to be cachable, use that response. | |
6309 | Here, "concurrent requests" means "received after the first | |
6310 | request headers were parsed and before the corresponding response | |
6311 | headers were parsed". | |
6312 | ||
6313 | This feature is disabled by default: enabling collapsed | |
6314 | forwarding needlessly delays forwarding requests that look | |
6315 | cachable (when they are collapsed) but then need to be forwarded | |
6316 | individually anyway because they end up being for uncachable | |
6317 | content. However, in some cases, such as acceleration of highly | |
6318 | cachable content with periodic or grouped expiration times, the | |
6319 | gains from collapsing [large volumes of simultaneous refresh | |
6320 | requests] outweigh losses from such delays. | |
6321 | ||
6322 | Squid collapses two kinds of requests: regular client requests | |
6323 | received on one of the listening ports and internal "cache | |
6324 | revalidation" requests which are triggered by those regular | |
6325 | requests hitting a stale cached object. Revalidation collapsing | |
6326 | is currently disabled for Squid instances containing SMP-aware | |
6327 | disk or memory caches and for Vary-controlled cached objects. | |
55eae904 AR |
6328 | DOC_END |
6329 | ||
8f7dbf74 DD |
6330 | NAME: collapsed_forwarding_shared_entries_limit |
6331 | COMMENT: (number of entries) | |
6332 | TYPE: int64_t | |
6333 | LOC: Config.collapsed_forwarding_shared_entries_limit | |
6334 | DEFAULT: 16384 | |
6335 | DOC_START | |
6336 | This limits the size of a table used for sharing information | |
6337 | about collapsible entries among SMP workers. Limiting sharing | |
6338 | too much results in cache content duplication and missed | |
6339 | collapsing opportunities. Using excessively large values | |
6340 | wastes shared memory. | |
6341 | ||
6342 | The limit should be significantly larger then the number of | |
6343 | concurrent collapsible entries one wants to share. For a cache | |
6344 | that handles less than 5000 concurrent requests, the default | |
6345 | setting of 16384 should be plenty. | |
6346 | ||
6347 | If the limit is set to zero, it disables sharing of collapsed | |
6348 | forwarding between SMP workers. | |
6349 | DOC_END | |
6350 | ||
41bd17a4 | 6351 | COMMENT_START |
6352 | TIMEOUTS | |
6353 | ----------------------------------------------------------------------------- | |
6354 | COMMENT_END | |
6355 | ||
6356 | NAME: forward_timeout | |
6357 | COMMENT: time-units | |
6358 | TYPE: time_t | |
6359 | LOC: Config.Timeout.forward | |
6360 | DEFAULT: 4 minutes | |
6361 | DOC_START | |
6362 | This parameter specifies how long Squid should at most attempt in | |
6363 | finding a forwarding path for the request before giving up. | |
cccac0a2 | 6364 | DOC_END |
6365 | ||
41bd17a4 | 6366 | NAME: connect_timeout |
6367 | COMMENT: time-units | |
6368 | TYPE: time_t | |
6369 | LOC: Config.Timeout.connect | |
6370 | DEFAULT: 1 minute | |
057f5854 | 6371 | DOC_START |
41bd17a4 | 6372 | This parameter specifies how long to wait for the TCP connect to |
6373 | the requested server or peer to complete before Squid should | |
6374 | attempt to find another path where to forward the request. | |
057f5854 | 6375 | DOC_END |
6376 | ||
41bd17a4 | 6377 | NAME: peer_connect_timeout |
6378 | COMMENT: time-units | |
6379 | TYPE: time_t | |
6380 | LOC: Config.Timeout.peer_connect | |
6381 | DEFAULT: 30 seconds | |
cccac0a2 | 6382 | DOC_START |
41bd17a4 | 6383 | This parameter specifies how long to wait for a pending TCP |
6384 | connection to a peer cache. The default is 30 seconds. You | |
6385 | may also set different timeout values for individual neighbors | |
6386 | with the 'connect-timeout' option on a 'cache_peer' line. | |
6387 | DOC_END | |
7f7db318 | 6388 | |
41bd17a4 | 6389 | NAME: read_timeout |
6390 | COMMENT: time-units | |
6391 | TYPE: time_t | |
6392 | LOC: Config.Timeout.read | |
6393 | DEFAULT: 15 minutes | |
6394 | DOC_START | |
d5430dc8 AJ |
6395 | Applied on peer server connections. |
6396 | ||
6397 | After each successful read(), the timeout will be extended by this | |
41bd17a4 | 6398 | amount. If no data is read again after this amount of time, |
d5430dc8 AJ |
6399 | the request is aborted and logged with ERR_READ_TIMEOUT. |
6400 | ||
6401 | The default is 15 minutes. | |
41bd17a4 | 6402 | DOC_END |
cccac0a2 | 6403 | |
5ef5e5cc AJ |
6404 | NAME: write_timeout |
6405 | COMMENT: time-units | |
6406 | TYPE: time_t | |
6407 | LOC: Config.Timeout.write | |
6408 | DEFAULT: 15 minutes | |
6409 | DOC_START | |
6410 | This timeout is tracked for all connections that have data | |
6411 | available for writing and are waiting for the socket to become | |
6412 | ready. After each successful write, the timeout is extended by | |
6413 | the configured amount. If Squid has data to write but the | |
6414 | connection is not ready for the configured duration, the | |
6415 | transaction associated with the connection is terminated. The | |
6416 | default is 15 minutes. | |
6417 | DOC_END | |
6418 | ||
41bd17a4 | 6419 | NAME: request_timeout |
6420 | TYPE: time_t | |
6421 | LOC: Config.Timeout.request | |
6422 | DEFAULT: 5 minutes | |
6423 | DOC_START | |
6b2a2108 | 6424 | How long to wait for complete HTTP request headers after initial |
41bd17a4 | 6425 | connection establishment. |
6426 | DOC_END | |
cccac0a2 | 6427 | |
3248e962 CT |
6428 | NAME: request_start_timeout |
6429 | TYPE: time_t | |
6430 | LOC: Config.Timeout.request_start_timeout | |
6431 | DEFAULT: 5 minutes | |
6432 | DOC_START | |
6433 | How long to wait for the first request byte after initial | |
6434 | connection establishment. | |
6435 | DOC_END | |
6436 | ||
97b32442 | 6437 | NAME: client_idle_pconn_timeout persistent_request_timeout |
41bd17a4 | 6438 | TYPE: time_t |
97b32442 | 6439 | LOC: Config.Timeout.clientIdlePconn |
41bd17a4 | 6440 | DEFAULT: 2 minutes |
6441 | DOC_START | |
6442 | How long to wait for the next HTTP request on a persistent | |
97b32442 | 6443 | client connection after the previous request completes. |
41bd17a4 | 6444 | DOC_END |
cccac0a2 | 6445 | |
f6e8754a AR |
6446 | NAME: ftp_client_idle_timeout |
6447 | TYPE: time_t | |
6448 | LOC: Config.Timeout.ftpClientIdle | |
6449 | DEFAULT: 30 minutes | |
6450 | DOC_START | |
6451 | How long to wait for an FTP request on a connection to Squid ftp_port. | |
6452 | Many FTP clients do not deal with idle connection closures well, | |
6453 | necessitating a longer default timeout than client_idle_pconn_timeout | |
6454 | used for incoming HTTP requests. | |
6455 | DOC_END | |
6456 | ||
41bd17a4 | 6457 | NAME: client_lifetime |
6458 | COMMENT: time-units | |
6459 | TYPE: time_t | |
6460 | LOC: Config.Timeout.lifetime | |
6461 | DEFAULT: 1 day | |
6462 | DOC_START | |
6463 | The maximum amount of time a client (browser) is allowed to | |
6464 | remain connected to the cache process. This protects the Cache | |
6465 | from having a lot of sockets (and hence file descriptors) tied up | |
6466 | in a CLOSE_WAIT state from remote clients that go away without | |
6467 | properly shutting down (either because of a network failure or | |
6468 | because of a poor client implementation). The default is one | |
6469 | day, 1440 minutes. | |
7d90757b | 6470 | |
41bd17a4 | 6471 | NOTE: The default value is intended to be much larger than any |
6472 | client would ever need to be connected to your cache. You | |
6473 | should probably change client_lifetime only as a last resort. | |
6474 | If you seem to have many client connections tying up | |
6475 | filedescriptors, we recommend first tuning the read_timeout, | |
6476 | request_timeout, persistent_request_timeout and quick_abort values. | |
cccac0a2 | 6477 | DOC_END |
6478 | ||
c5c06f02 CT |
6479 | NAME: pconn_lifetime |
6480 | COMMENT: time-units | |
6481 | TYPE: time_t | |
6482 | LOC: Config.Timeout.pconnLifetime | |
6483 | DEFAULT: 0 seconds | |
6484 | DOC_START | |
6485 | Desired maximum lifetime of a persistent connection. | |
6486 | When set, Squid will close a now-idle persistent connection that | |
6487 | exceeded configured lifetime instead of moving the connection into | |
6488 | the idle connection pool (or equivalent). No effect on ongoing/active | |
6489 | transactions. Connection lifetime is the time period from the | |
6490 | connection acceptance or opening time until "now". | |
6491 | ||
6492 | This limit is useful in environments with long-lived connections | |
6493 | where Squid configuration or environmental factors change during a | |
6494 | single connection lifetime. If unrestricted, some connections may | |
6495 | last for hours and even days, ignoring those changes that should | |
6496 | have affected their behavior or their existence. | |
6497 | ||
6498 | Currently, a new lifetime value supplied via Squid reconfiguration | |
6499 | has no effect on already idle connections unless they become busy. | |
6500 | ||
6501 | When set to '0' this limit is not used. | |
6502 | DOC_END | |
6503 | ||
41bd17a4 | 6504 | NAME: half_closed_clients |
6505 | TYPE: onoff | |
6506 | LOC: Config.onoff.half_closed_clients | |
0c2f5c4f | 6507 | DEFAULT: off |
4eb368f9 | 6508 | DOC_START |
41bd17a4 | 6509 | Some clients may shutdown the sending side of their TCP |
6510 | connections, while leaving their receiving sides open. Sometimes, | |
6511 | Squid can not tell the difference between a half-closed and a | |
0c2f5c4f AJ |
6512 | fully-closed TCP connection. |
6513 | ||
6514 | By default, Squid will immediately close client connections when | |
6515 | read(2) returns "no more data to read." | |
6516 | ||
abdf1651 | 6517 | Change this option to 'on' and Squid will keep open connections |
0c2f5c4f AJ |
6518 | until a read(2) or write(2) on the socket returns an error. |
6519 | This may show some benefits for reverse proxies. But if not | |
6520 | it is recommended to leave OFF. | |
4eb368f9 | 6521 | DOC_END |
6522 | ||
97b32442 | 6523 | NAME: server_idle_pconn_timeout pconn_timeout |
41bd17a4 | 6524 | TYPE: time_t |
97b32442 | 6525 | LOC: Config.Timeout.serverIdlePconn |
41bd17a4 | 6526 | DEFAULT: 1 minute |
cccac0a2 | 6527 | DOC_START |
41bd17a4 | 6528 | Timeout for idle persistent connections to servers and other |
6529 | proxies. | |
6530 | DOC_END | |
cccac0a2 | 6531 | |
41bd17a4 | 6532 | NAME: ident_timeout |
6533 | TYPE: time_t | |
6534 | IFDEF: USE_IDENT | |
4daaf3cb | 6535 | LOC: Ident::TheConfig.timeout |
41bd17a4 | 6536 | DEFAULT: 10 seconds |
6537 | DOC_START | |
6538 | Maximum time to wait for IDENT lookups to complete. | |
cccac0a2 | 6539 | |
41bd17a4 | 6540 | If this is too high, and you enabled IDENT lookups from untrusted |
6541 | users, you might be susceptible to denial-of-service by having | |
6542 | many ident requests going at once. | |
cccac0a2 | 6543 | DOC_END |
6544 | ||
41bd17a4 | 6545 | NAME: shutdown_lifetime |
6546 | COMMENT: time-units | |
6547 | TYPE: time_t | |
6548 | LOC: Config.shutdownLifetime | |
6549 | DEFAULT: 30 seconds | |
cccac0a2 | 6550 | DOC_START |
41bd17a4 | 6551 | When SIGTERM or SIGHUP is received, the cache is put into |
6552 | "shutdown pending" mode until all active sockets are closed. | |
6553 | This value is the lifetime to set for all open descriptors | |
6554 | during shutdown mode. Any active clients after this many | |
6555 | seconds will receive a 'timeout' message. | |
cccac0a2 | 6556 | DOC_END |
0976f8db | 6557 | |
cccac0a2 | 6558 | COMMENT_START |
6559 | ADMINISTRATIVE PARAMETERS | |
6560 | ----------------------------------------------------------------------------- | |
6561 | COMMENT_END | |
6562 | ||
6563 | NAME: cache_mgr | |
6564 | TYPE: string | |
6565 | DEFAULT: webmaster | |
6566 | LOC: Config.adminEmail | |
6567 | DOC_START | |
6568 | Email-address of local cache manager who will receive | |
638402dd | 6569 | mail if the cache dies. The default is "webmaster". |
cccac0a2 | 6570 | DOC_END |
6571 | ||
abacf776 | 6572 | NAME: mail_from |
6573 | TYPE: string | |
6574 | DEFAULT: none | |
6575 | LOC: Config.EmailFrom | |
6576 | DOC_START | |
6577 | From: email-address for mail sent when the cache dies. | |
638402dd AJ |
6578 | The default is to use 'squid@unique_hostname'. |
6579 | ||
6580 | See also: unique_hostname directive. | |
abacf776 | 6581 | DOC_END |
6582 | ||
d084bf20 | 6583 | NAME: mail_program |
6584 | TYPE: eol | |
6585 | DEFAULT: mail | |
6586 | LOC: Config.EmailProgram | |
6587 | DOC_START | |
6588 | Email program used to send mail if the cache dies. | |
846a5e31 | 6589 | The default is "mail". The specified program must comply |
d084bf20 | 6590 | with the standard Unix mail syntax: |
846a5e31 | 6591 | mail-program recipient < mailfile |
6592 | ||
d084bf20 | 6593 | Optional command line options can be specified. |
6594 | DOC_END | |
6595 | ||
cccac0a2 | 6596 | NAME: cache_effective_user |
6597 | TYPE: string | |
5483d916 | 6598 | DEFAULT: @DEFAULT_CACHE_EFFECTIVE_USER@ |
cccac0a2 | 6599 | LOC: Config.effectiveUser |
e3d74828 | 6600 | DOC_START |
6601 | If you start Squid as root, it will change its effective/real | |
6602 | UID/GID to the user specified below. The default is to change | |
5483d916 | 6603 | to UID of @DEFAULT_CACHE_EFFECTIVE_USER@. |
64e288bd | 6604 | see also; cache_effective_group |
e3d74828 | 6605 | DOC_END |
6606 | ||
cccac0a2 | 6607 | NAME: cache_effective_group |
6608 | TYPE: string | |
6609 | DEFAULT: none | |
638402dd | 6610 | DEFAULT_DOC: Use system group memberships of the cache_effective_user account |
cccac0a2 | 6611 | LOC: Config.effectiveGroup |
6612 | DOC_START | |
64e288bd | 6613 | Squid sets the GID to the effective user's default group ID |
6614 | (taken from the password file) and supplementary group list | |
6615 | from the groups membership. | |
6616 | ||
e3d74828 | 6617 | If you want Squid to run with a specific GID regardless of |
6618 | the group memberships of the effective user then set this | |
6619 | to the group (or GID) you want Squid to run as. When set | |
64e288bd | 6620 | all other group privileges of the effective user are ignored |
e3d74828 | 6621 | and only this GID is effective. If Squid is not started as |
64e288bd | 6622 | root the user starting Squid MUST be member of the specified |
e3d74828 | 6623 | group. |
64e288bd | 6624 | |
6625 | This option is not recommended by the Squid Team. | |
6626 | Our preference is for administrators to configure a secure | |
6627 | user account for squid with UID/GID matching system policies. | |
cccac0a2 | 6628 | DOC_END |
6629 | ||
d3caee79 | 6630 | NAME: httpd_suppress_version_string |
6631 | COMMENT: on|off | |
6632 | TYPE: onoff | |
6633 | DEFAULT: off | |
6634 | LOC: Config.onoff.httpd_suppress_version_string | |
6635 | DOC_START | |
6636 | Suppress Squid version string info in HTTP headers and HTML error pages. | |
6637 | DOC_END | |
6638 | ||
cccac0a2 | 6639 | NAME: visible_hostname |
6640 | TYPE: string | |
6641 | LOC: Config.visibleHostname | |
6642 | DEFAULT: none | |
638402dd | 6643 | DEFAULT_DOC: Automatically detect the system host name |
cccac0a2 | 6644 | DOC_START |
6645 | If you want to present a special hostname in error messages, etc, | |
7f7db318 | 6646 | define this. Otherwise, the return value of gethostname() |
cccac0a2 | 6647 | will be used. If you have multiple caches in a cluster and |
6648 | get errors about IP-forwarding you must set them to have individual | |
6649 | names with this setting. | |
6650 | DOC_END | |
6651 | ||
cccac0a2 | 6652 | NAME: unique_hostname |
6653 | TYPE: string | |
6654 | LOC: Config.uniqueHostname | |
6655 | DEFAULT: none | |
638402dd | 6656 | DEFAULT_DOC: Copy the value from visible_hostname |
cccac0a2 | 6657 | DOC_START |
6658 | If you want to have multiple machines with the same | |
7f7db318 | 6659 | 'visible_hostname' you must give each machine a different |
6660 | 'unique_hostname' so forwarding loops can be detected. | |
cccac0a2 | 6661 | DOC_END |
6662 | ||
cccac0a2 | 6663 | NAME: hostname_aliases |
6664 | TYPE: wordlist | |
6665 | LOC: Config.hostnameAliases | |
6666 | DEFAULT: none | |
6667 | DOC_START | |
7f7db318 | 6668 | A list of other DNS names your cache has. |
cccac0a2 | 6669 | DOC_END |
0976f8db | 6670 | |
c642c141 AJ |
6671 | NAME: umask |
6672 | TYPE: int | |
6673 | LOC: Config.umask | |
6674 | DEFAULT: 027 | |
6675 | DOC_START | |
6676 | Minimum umask which should be enforced while the proxy | |
6677 | is running, in addition to the umask set at startup. | |
6678 | ||
6679 | For a traditional octal representation of umasks, start | |
6680 | your value with 0. | |
6681 | DOC_END | |
6682 | ||
cccac0a2 | 6683 | COMMENT_START |
6684 | OPTIONS FOR THE CACHE REGISTRATION SERVICE | |
6685 | ----------------------------------------------------------------------------- | |
6686 | ||
6687 | This section contains parameters for the (optional) cache | |
6688 | announcement service. This service is provided to help | |
6689 | cache administrators locate one another in order to join or | |
6690 | create cache hierarchies. | |
6691 | ||
6692 | An 'announcement' message is sent (via UDP) to the registration | |
6693 | service by Squid. By default, the announcement message is NOT | |
6694 | SENT unless you enable it with 'announce_period' below. | |
6695 | ||
6696 | The announcement message includes your hostname, plus the | |
6697 | following information from this configuration file: | |
6698 | ||
6699 | http_port | |
6700 | icp_port | |
6701 | cache_mgr | |
6702 | ||
6703 | All current information is processed regularly and made | |
6704 | available on the Web at http://www.ircache.net/Cache/Tracker/. | |
6705 | COMMENT_END | |
6706 | ||
6707 | NAME: announce_period | |
6708 | TYPE: time_t | |
6709 | LOC: Config.Announce.period | |
6710 | DEFAULT: 0 | |
638402dd | 6711 | DEFAULT_DOC: Announcement messages disabled. |
cccac0a2 | 6712 | DOC_START |
638402dd | 6713 | This is how frequently to send cache announcements. |
cccac0a2 | 6714 | |
e0855596 | 6715 | To enable announcing your cache, just set an announce period. |
cccac0a2 | 6716 | |
e0855596 AJ |
6717 | Example: |
6718 | announce_period 1 day | |
cccac0a2 | 6719 | DOC_END |
6720 | ||
cccac0a2 | 6721 | NAME: announce_host |
6722 | TYPE: string | |
6723 | DEFAULT: tracker.ircache.net | |
6724 | LOC: Config.Announce.host | |
638402dd AJ |
6725 | DOC_START |
6726 | Set the hostname where announce registration messages will be sent. | |
6727 | ||
6728 | See also announce_port and announce_file | |
6729 | DOC_END | |
cccac0a2 | 6730 | |
6731 | NAME: announce_file | |
6732 | TYPE: string | |
6733 | DEFAULT: none | |
6734 | LOC: Config.Announce.file | |
638402dd AJ |
6735 | DOC_START |
6736 | The contents of this file will be included in the announce | |
6737 | registration messages. | |
6738 | DOC_END | |
cccac0a2 | 6739 | |
6740 | NAME: announce_port | |
ae870270 | 6741 | TYPE: u_short |
cccac0a2 | 6742 | DEFAULT: 3131 |
6743 | LOC: Config.Announce.port | |
6744 | DOC_START | |
638402dd | 6745 | Set the port where announce registration messages will be sent. |
cccac0a2 | 6746 | |
638402dd | 6747 | See also announce_host and announce_file |
cccac0a2 | 6748 | DOC_END |
6749 | ||
8d6275c0 | 6750 | COMMENT_START |
6751 | HTTPD-ACCELERATOR OPTIONS | |
6752 | ----------------------------------------------------------------------------- | |
6753 | COMMENT_END | |
6754 | ||
cccac0a2 | 6755 | NAME: httpd_accel_surrogate_id |
cccac0a2 | 6756 | TYPE: string |
b2b40d8c | 6757 | DEFAULT: none |
638402dd | 6758 | DEFAULT_DOC: visible_hostname is used if no specific ID is set. |
cccac0a2 | 6759 | LOC: Config.Accel.surrogate_id |
cccac0a2 | 6760 | DOC_START |
6761 | Surrogates (http://www.esi.org/architecture_spec_1.0.html) | |
6762 | need an identification token to allow control targeting. Because | |
6763 | a farm of surrogates may all perform the same tasks, they may share | |
6764 | an identification token. | |
6765 | DOC_END | |
6766 | ||
6767 | NAME: http_accel_surrogate_remote | |
cccac0a2 | 6768 | COMMENT: on|off |
6769 | TYPE: onoff | |
6770 | DEFAULT: off | |
6771 | LOC: Config.onoff.surrogate_is_remote | |
6772 | DOC_START | |
638402dd AJ |
6773 | Remote surrogates (such as those in a CDN) honour the header |
6774 | "Surrogate-Control: no-store-remote". | |
6775 | ||
cccac0a2 | 6776 | Set this to on to have squid behave as a remote surrogate. |
6777 | DOC_END | |
6778 | ||
6779 | NAME: esi_parser | |
f41735ea | 6780 | IFDEF: USE_SQUID_ESI |
964b44c3 | 6781 | COMMENT: libxml2|expat|custom |
cccac0a2 | 6782 | TYPE: string |
6783 | LOC: ESIParser::Type | |
6784 | DEFAULT: custom | |
6785 | DOC_START | |
6786 | ESI markup is not strictly XML compatible. The custom ESI parser | |
6787 | will give higher performance, but cannot handle non ASCII character | |
6788 | encodings. | |
6789 | DOC_END | |
0976f8db | 6790 | |
9edd9041 | 6791 | COMMENT_START |
8d6275c0 | 6792 | DELAY POOL PARAMETERS |
9edd9041 | 6793 | ----------------------------------------------------------------------------- |
6794 | COMMENT_END | |
6795 | ||
6796 | NAME: delay_pools | |
6797 | TYPE: delay_pool_count | |
6798 | DEFAULT: 0 | |
9a0a18de | 6799 | IFDEF: USE_DELAY_POOLS |
9edd9041 | 6800 | LOC: Config.Delay |
6801 | DOC_START | |
6802 | This represents the number of delay pools to be used. For example, | |
6803 | if you have one class 2 delay pool and one class 3 delays pool, you | |
6804 | have a total of 2 delay pools. | |
638402dd AJ |
6805 | |
6806 | See also delay_parameters, delay_class, delay_access for pool | |
6807 | configuration details. | |
9edd9041 | 6808 | DOC_END |
6809 | ||
6810 | NAME: delay_class | |
6811 | TYPE: delay_pool_class | |
6812 | DEFAULT: none | |
9a0a18de | 6813 | IFDEF: USE_DELAY_POOLS |
9edd9041 | 6814 | LOC: Config.Delay |
6815 | DOC_START | |
6816 | This defines the class of each delay pool. There must be exactly one | |
6817 | delay_class line for each delay pool. For example, to define two | |
6818 | delay pools, one of class 2 and one of class 3, the settings above | |
6819 | and here would be: | |
6820 | ||
b1fb3348 AJ |
6821 | Example: |
6822 | delay_pools 4 # 4 delay pools | |
6823 | delay_class 1 2 # pool 1 is a class 2 pool | |
6824 | delay_class 2 3 # pool 2 is a class 3 pool | |
6825 | delay_class 3 4 # pool 3 is a class 4 pool | |
6826 | delay_class 4 5 # pool 4 is a class 5 pool | |
9edd9041 | 6827 | |
6828 | The delay pool classes are: | |
6829 | ||
6830 | class 1 Everything is limited by a single aggregate | |
6831 | bucket. | |
6832 | ||
6833 | class 2 Everything is limited by a single aggregate | |
6834 | bucket as well as an "individual" bucket chosen | |
b1fb3348 | 6835 | from bits 25 through 32 of the IPv4 address. |
9edd9041 | 6836 | |
6837 | class 3 Everything is limited by a single aggregate | |
6838 | bucket as well as a "network" bucket chosen | |
6839 | from bits 17 through 24 of the IP address and a | |
6840 | "individual" bucket chosen from bits 17 through | |
b1fb3348 | 6841 | 32 of the IPv4 address. |
9edd9041 | 6842 | |
6843 | class 4 Everything in a class 3 delay pool, with an | |
6844 | additional limit on a per user basis. This | |
6845 | only takes effect if the username is established | |
6846 | in advance - by forcing authentication in your | |
6847 | http_access rules. | |
6848 | ||
6849 | class 5 Requests are grouped according their tag (see | |
6850 | external_acl's tag= reply). | |
6851 | ||
0b68481a AJ |
6852 | |
6853 | Each pool also requires a delay_parameters directive to configure the pool size | |
6854 | and speed limits used whenever the pool is applied to a request. Along with | |
6855 | a set of delay_access directives to determine when it is used. | |
6856 | ||
9edd9041 | 6857 | NOTE: If an IP address is a.b.c.d |
6858 | -> bits 25 through 32 are "d" | |
6859 | -> bits 17 through 24 are "c" | |
6860 | -> bits 17 through 32 are "c * 256 + d" | |
b1fb3348 AJ |
6861 | |
6862 | NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to | |
6863 | IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic. | |
638402dd AJ |
6864 | |
6865 | This clause only supports fast acl types. | |
6866 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
6867 | ||
6868 | See also delay_parameters and delay_access. | |
9edd9041 | 6869 | DOC_END |
6870 | ||
6871 | NAME: delay_access | |
6872 | TYPE: delay_pool_access | |
6873 | DEFAULT: none | |
638402dd | 6874 | DEFAULT_DOC: Deny using the pool, unless allow rules exist in squid.conf for the pool. |
9a0a18de | 6875 | IFDEF: USE_DELAY_POOLS |
9edd9041 | 6876 | LOC: Config.Delay |
6877 | DOC_START | |
6878 | This is used to determine which delay pool a request falls into. | |
6879 | ||
6880 | delay_access is sorted per pool and the matching starts with pool 1, | |
6881 | then pool 2, ..., and finally pool N. The first delay pool where the | |
6882 | request is allowed is selected for the request. If it does not allow | |
6883 | the request to any pool then the request is not delayed (default). | |
6884 | ||
6885 | For example, if you want some_big_clients in delay | |
6886 | pool 1 and lotsa_little_clients in delay pool 2: | |
6887 | ||
638402dd AJ |
6888 | delay_access 1 allow some_big_clients |
6889 | delay_access 1 deny all | |
6890 | delay_access 2 allow lotsa_little_clients | |
6891 | delay_access 2 deny all | |
6892 | delay_access 3 allow authenticated_clients | |
6893 | ||
6894 | See also delay_parameters and delay_class. | |
6895 | ||
9edd9041 | 6896 | DOC_END |
6897 | ||
6898 | NAME: delay_parameters | |
6899 | TYPE: delay_pool_rates | |
6900 | DEFAULT: none | |
9a0a18de | 6901 | IFDEF: USE_DELAY_POOLS |
9edd9041 | 6902 | LOC: Config.Delay |
6903 | DOC_START | |
6904 | This defines the parameters for a delay pool. Each delay pool has | |
6905 | a number of "buckets" associated with it, as explained in the | |
0b68481a | 6906 | description of delay_class. |
9edd9041 | 6907 | |
0b68481a | 6908 | For a class 1 delay pool, the syntax is: |
6e7502cc | 6909 | delay_class pool 1 |
0b68481a | 6910 | delay_parameters pool aggregate |
9edd9041 | 6911 | |
6912 | For a class 2 delay pool: | |
6e7502cc | 6913 | delay_class pool 2 |
0b68481a | 6914 | delay_parameters pool aggregate individual |
9edd9041 | 6915 | |
6916 | For a class 3 delay pool: | |
6e7502cc | 6917 | delay_class pool 3 |
0b68481a | 6918 | delay_parameters pool aggregate network individual |
9edd9041 | 6919 | |
6920 | For a class 4 delay pool: | |
6e7502cc | 6921 | delay_class pool 4 |
0b68481a | 6922 | delay_parameters pool aggregate network individual user |
9edd9041 | 6923 | |
6924 | For a class 5 delay pool: | |
6e7502cc | 6925 | delay_class pool 5 |
0b68481a | 6926 | delay_parameters pool tagrate |
9edd9041 | 6927 | |
0b68481a | 6928 | The option variables are: |
9edd9041 | 6929 | |
6930 | pool a pool number - ie, a number between 1 and the | |
6931 | number specified in delay_pools as used in | |
6932 | delay_class lines. | |
6933 | ||
fdb47ac6 | 6934 | aggregate the speed limit parameters for the aggregate bucket |
9edd9041 | 6935 | (class 1, 2, 3). |
6936 | ||
fdb47ac6 | 6937 | individual the speed limit parameters for the individual |
9edd9041 | 6938 | buckets (class 2, 3). |
6939 | ||
fdb47ac6 | 6940 | network the speed limit parameters for the network buckets |
9edd9041 | 6941 | (class 3). |
6942 | ||
fdb47ac6 | 6943 | user the speed limit parameters for the user buckets |
9edd9041 | 6944 | (class 4). |
6945 | ||
fdb47ac6 | 6946 | tagrate the speed limit parameters for the tag buckets |
9edd9041 | 6947 | (class 5). |
6948 | ||
6949 | A pair of delay parameters is written restore/maximum, where restore is | |
6950 | the number of bytes (not bits - modem and network speeds are usually | |
6951 | quoted in bits) per second placed into the bucket, and maximum is the | |
6952 | maximum number of bytes which can be in the bucket at any time. | |
6953 | ||
0b68481a AJ |
6954 | There must be one delay_parameters line for each delay pool. |
6955 | ||
6956 | ||
9edd9041 | 6957 | For example, if delay pool number 1 is a class 2 delay pool as in the |
0b68481a | 6958 | above example, and is being used to strictly limit each host to 64Kbit/sec |
9edd9041 | 6959 | (plus overheads), with no overall limit, the line is: |
6960 | ||
6e7502cc | 6961 | delay_parameters 1 none 8000/8000 |
0b68481a | 6962 | |
c3e31a3a | 6963 | Note that 8 x 8K Byte/sec -> 64K bit/sec. |
9edd9041 | 6964 | |
6e7502cc | 6965 | Note that the word 'none' is used to represent no limit. |
9edd9041 | 6966 | |
0b68481a | 6967 | |
9edd9041 | 6968 | And, if delay pool number 2 is a class 3 delay pool as in the above |
0b68481a AJ |
6969 | example, and you want to limit it to a total of 256Kbit/sec (strict limit) |
6970 | with each 8-bit network permitted 64Kbit/sec (strict limit) and each | |
6971 | individual host permitted 4800bit/sec with a bucket maximum size of 64Kbits | |
9edd9041 | 6972 | to permit a decent web page to be downloaded at a decent speed |
6973 | (if the network is not being limited due to overuse) but slow down | |
6974 | large downloads more significantly: | |
6975 | ||
0b68481a AJ |
6976 | delay_parameters 2 32000/32000 8000/8000 600/8000 |
6977 | ||
c3e31a3a AJ |
6978 | Note that 8 x 32K Byte/sec -> 256K bit/sec. |
6979 | 8 x 8K Byte/sec -> 64K bit/sec. | |
6980 | 8 x 600 Byte/sec -> 4800 bit/sec. | |
9edd9041 | 6981 | |
9edd9041 | 6982 | |
6983 | Finally, for a class 4 delay pool as in the example - each user will | |
0b68481a | 6984 | be limited to 128Kbits/sec no matter how many workstations they are logged into.: |
9edd9041 | 6985 | |
0b68481a | 6986 | delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000 |
638402dd AJ |
6987 | |
6988 | ||
6989 | See also delay_class and delay_access. | |
6990 | ||
9edd9041 | 6991 | DOC_END |
6992 | ||
6993 | NAME: delay_initial_bucket_level | |
6994 | COMMENT: (percent, 0-100) | |
ae870270 | 6995 | TYPE: u_short |
9edd9041 | 6996 | DEFAULT: 50 |
9a0a18de | 6997 | IFDEF: USE_DELAY_POOLS |
9edd9041 | 6998 | LOC: Config.Delay.initial |
6999 | DOC_START | |
7000 | The initial bucket percentage is used to determine how much is put | |
7001 | in each bucket when squid starts, is reconfigured, or first notices | |
7002 | a host accessing it (in class 2 and class 3, individual hosts and | |
7003 | networks only have buckets associated with them once they have been | |
7004 | "seen" by squid). | |
7005 | DOC_END | |
7006 | ||
b4cd430a CT |
7007 | COMMENT_START |
7008 | CLIENT DELAY POOL PARAMETERS | |
7009 | ----------------------------------------------------------------------------- | |
7010 | COMMENT_END | |
7011 | ||
7012 | NAME: client_delay_pools | |
7013 | TYPE: client_delay_pool_count | |
7014 | DEFAULT: 0 | |
9a0a18de | 7015 | IFDEF: USE_DELAY_POOLS |
b4cd430a CT |
7016 | LOC: Config.ClientDelay |
7017 | DOC_START | |
7018 | This option specifies the number of client delay pools used. It must | |
7019 | preceed other client_delay_* options. | |
7020 | ||
638402dd AJ |
7021 | Example: |
7022 | client_delay_pools 2 | |
7023 | ||
7024 | See also client_delay_parameters and client_delay_access. | |
b4cd430a CT |
7025 | DOC_END |
7026 | ||
7027 | NAME: client_delay_initial_bucket_level | |
7028 | COMMENT: (percent, 0-no_limit) | |
ae870270 | 7029 | TYPE: u_short |
b4cd430a | 7030 | DEFAULT: 50 |
9a0a18de | 7031 | IFDEF: USE_DELAY_POOLS |
b4cd430a CT |
7032 | LOC: Config.ClientDelay.initial |
7033 | DOC_START | |
7034 | This option determines the initial bucket size as a percentage of | |
7035 | max_bucket_size from client_delay_parameters. Buckets are created | |
7036 | at the time of the "first" connection from the matching IP. Idle | |
7037 | buckets are periodically deleted up. | |
7038 | ||
7039 | You can specify more than 100 percent but note that such "oversized" | |
7040 | buckets are not refilled until their size goes down to max_bucket_size | |
7041 | from client_delay_parameters. | |
7042 | ||
638402dd AJ |
7043 | Example: |
7044 | client_delay_initial_bucket_level 50 | |
b4cd430a CT |
7045 | DOC_END |
7046 | ||
7047 | NAME: client_delay_parameters | |
7048 | TYPE: client_delay_pool_rates | |
7049 | DEFAULT: none | |
9a0a18de | 7050 | IFDEF: USE_DELAY_POOLS |
b4cd430a CT |
7051 | LOC: Config.ClientDelay |
7052 | DOC_START | |
7053 | ||
7054 | This option configures client-side bandwidth limits using the | |
7055 | following format: | |
7056 | ||
7057 | client_delay_parameters pool speed_limit max_bucket_size | |
7058 | ||
7059 | pool is an integer ID used for client_delay_access matching. | |
7060 | ||
7061 | speed_limit is bytes added to the bucket per second. | |
7062 | ||
7063 | max_bucket_size is the maximum size of a bucket, enforced after any | |
7064 | speed_limit additions. | |
7065 | ||
7066 | Please see the delay_parameters option for more information and | |
7067 | examples. | |
7068 | ||
638402dd AJ |
7069 | Example: |
7070 | client_delay_parameters 1 1024 2048 | |
7071 | client_delay_parameters 2 51200 16384 | |
7072 | ||
7073 | See also client_delay_access. | |
7074 | ||
b4cd430a CT |
7075 | DOC_END |
7076 | ||
7077 | NAME: client_delay_access | |
7078 | TYPE: client_delay_pool_access | |
7079 | DEFAULT: none | |
638402dd | 7080 | DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool. |
9a0a18de | 7081 | IFDEF: USE_DELAY_POOLS |
b4cd430a CT |
7082 | LOC: Config.ClientDelay |
7083 | DOC_START | |
b4cd430a CT |
7084 | This option determines the client-side delay pool for the |
7085 | request: | |
7086 | ||
7087 | client_delay_access pool_ID allow|deny acl_name | |
7088 | ||
7089 | All client_delay_access options are checked in their pool ID | |
7090 | order, starting with pool 1. The first checked pool with allowed | |
7091 | request is selected for the request. If no ACL matches or there | |
7092 | are no client_delay_access options, the request bandwidth is not | |
7093 | limited. | |
7094 | ||
7095 | The ACL-selected pool is then used to find the | |
7096 | client_delay_parameters for the request. Client-side pools are | |
7097 | not used to aggregate clients. Clients are always aggregated | |
7098 | based on their source IP addresses (one bucket per source IP). | |
7099 | ||
638402dd AJ |
7100 | This clause only supports fast acl types. |
7101 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
7102 | Additionally, only the client TCP connection details are available. | |
7103 | ACLs testing HTTP properties will not work. | |
7104 | ||
b4cd430a CT |
7105 | Please see delay_access for more examples. |
7106 | ||
638402dd AJ |
7107 | Example: |
7108 | client_delay_access 1 allow low_rate_network | |
7109 | client_delay_access 2 allow vips_network | |
7110 | ||
7111 | ||
7112 | See also client_delay_parameters and client_delay_pools. | |
b4cd430a CT |
7113 | DOC_END |
7114 | ||
cccac0a2 | 7115 | COMMENT_START |
8d6275c0 | 7116 | WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS |
cccac0a2 | 7117 | ----------------------------------------------------------------------------- |
7118 | COMMENT_END | |
7119 | ||
8d6275c0 | 7120 | NAME: wccp_router |
7121 | TYPE: address | |
7122 | LOC: Config.Wccp.router | |
0eb08770 | 7123 | DEFAULT: any_addr |
638402dd | 7124 | DEFAULT_DOC: WCCP disabled. |
8d6275c0 | 7125 | IFDEF: USE_WCCP |
e313ab0a AJ |
7126 | DOC_START |
7127 | Use this option to define your WCCP ``home'' router for | |
7128 | Squid. | |
7129 | ||
7130 | wccp_router supports a single WCCP(v1) router | |
7131 | ||
7132 | wccp2_router supports multiple WCCPv2 routers | |
7133 | ||
7134 | only one of the two may be used at the same time and defines | |
7135 | which version of WCCP to use. | |
7136 | DOC_END | |
df2eec10 | 7137 | |
8d6275c0 | 7138 | NAME: wccp2_router |
9fb4efad | 7139 | TYPE: IpAddress_list |
8d6275c0 | 7140 | LOC: Config.Wccp2.router |
cccac0a2 | 7141 | DEFAULT: none |
638402dd | 7142 | DEFAULT_DOC: WCCPv2 disabled. |
8d6275c0 | 7143 | IFDEF: USE_WCCPv2 |
cccac0a2 | 7144 | DOC_START |
8d6275c0 | 7145 | Use this option to define your WCCP ``home'' router for |
7146 | Squid. | |
cccac0a2 | 7147 | |
8d6275c0 | 7148 | wccp_router supports a single WCCP(v1) router |
cccac0a2 | 7149 | |
8d6275c0 | 7150 | wccp2_router supports multiple WCCPv2 routers |
cccac0a2 | 7151 | |
8d6275c0 | 7152 | only one of the two may be used at the same time and defines |
7153 | which version of WCCP to use. | |
7154 | DOC_END | |
7155 | ||
7156 | NAME: wccp_version | |
cccac0a2 | 7157 | TYPE: int |
8d6275c0 | 7158 | LOC: Config.Wccp.version |
7159 | DEFAULT: 4 | |
7160 | IFDEF: USE_WCCP | |
cccac0a2 | 7161 | DOC_START |
8d6275c0 | 7162 | This directive is only relevant if you need to set up WCCP(v1) |
7163 | to some very old and end-of-life Cisco routers. In all other | |
7164 | setups it must be left unset or at the default setting. | |
7165 | It defines an internal version in the WCCP(v1) protocol, | |
7166 | with version 4 being the officially documented protocol. | |
cccac0a2 | 7167 | |
8d6275c0 | 7168 | According to some users, Cisco IOS 11.2 and earlier only |
7169 | support WCCP version 3. If you're using that or an earlier | |
7170 | version of IOS, you may need to change this value to 3, otherwise | |
7171 | do not specify this parameter. | |
cccac0a2 | 7172 | DOC_END |
7173 | ||
8d6275c0 | 7174 | NAME: wccp2_rebuild_wait |
7175 | TYPE: onoff | |
7176 | LOC: Config.Wccp2.rebuildwait | |
7177 | DEFAULT: on | |
7178 | IFDEF: USE_WCCPv2 | |
7179 | DOC_START | |
7180 | If this is enabled Squid will wait for the cache dir rebuild to finish | |
7181 | before sending the first wccp2 HereIAm packet | |
7182 | DOC_END | |
cccac0a2 | 7183 | |
8d6275c0 | 7184 | NAME: wccp2_forwarding_method |
e313ab0a | 7185 | TYPE: wccp2_method |
8d6275c0 | 7186 | LOC: Config.Wccp2.forwarding_method |
451c4786 | 7187 | DEFAULT: gre |
8d6275c0 | 7188 | IFDEF: USE_WCCPv2 |
cccac0a2 | 7189 | DOC_START |
699acd19 | 7190 | WCCP2 allows the setting of forwarding methods between the |
8d6275c0 | 7191 | router/switch and the cache. Valid values are as follows: |
cccac0a2 | 7192 | |
451c4786 AJ |
7193 | gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel) |
7194 | l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting) | |
cccac0a2 | 7195 | |
8d6275c0 | 7196 | Currently (as of IOS 12.4) cisco routers only support GRE. |
7197 | Cisco switches only support the L2 redirect assignment method. | |
cccac0a2 | 7198 | DOC_END |
7199 | ||
8d6275c0 | 7200 | NAME: wccp2_return_method |
e313ab0a | 7201 | TYPE: wccp2_method |
8d6275c0 | 7202 | LOC: Config.Wccp2.return_method |
451c4786 | 7203 | DEFAULT: gre |
8d6275c0 | 7204 | IFDEF: USE_WCCPv2 |
cccac0a2 | 7205 | DOC_START |
699acd19 | 7206 | WCCP2 allows the setting of return methods between the |
8d6275c0 | 7207 | router/switch and the cache for packets that the cache |
7208 | decides not to handle. Valid values are as follows: | |
cccac0a2 | 7209 | |
451c4786 AJ |
7210 | gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel) |
7211 | l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting) | |
cccac0a2 | 7212 | |
8d6275c0 | 7213 | Currently (as of IOS 12.4) cisco routers only support GRE. |
7214 | Cisco switches only support the L2 redirect assignment. | |
cccac0a2 | 7215 | |
699acd19 | 7216 | If the "ip wccp redirect exclude in" command has been |
8d6275c0 | 7217 | enabled on the cache interface, then it is still safe for |
7218 | the proxy server to use a l2 redirect method even if this | |
7219 | option is set to GRE. | |
cccac0a2 | 7220 | DOC_END |
7221 | ||
8d6275c0 | 7222 | NAME: wccp2_assignment_method |
451c4786 | 7223 | TYPE: wccp2_amethod |
8d6275c0 | 7224 | LOC: Config.Wccp2.assignment_method |
451c4786 | 7225 | DEFAULT: hash |
8d6275c0 | 7226 | IFDEF: USE_WCCPv2 |
cccac0a2 | 7227 | DOC_START |
8d6275c0 | 7228 | WCCP2 allows the setting of methods to assign the WCCP hash |
7229 | Valid values are as follows: | |
cccac0a2 | 7230 | |
451c4786 | 7231 | hash - Hash assignment |
bb7a1781 | 7232 | mask - Mask assignment |
cccac0a2 | 7233 | |
8d6275c0 | 7234 | As a general rule, cisco routers support the hash assignment method |
7235 | and cisco switches support the mask assignment method. | |
7236 | DOC_END | |
cccac0a2 | 7237 | |
8d6275c0 | 7238 | NAME: wccp2_service |
7239 | TYPE: wccp2_service | |
7240 | LOC: Config.Wccp2.info | |
8d6275c0 | 7241 | DEFAULT_IF_NONE: standard 0 |
638402dd | 7242 | DEFAULT_DOC: Use the 'web-cache' standard service. |
8d6275c0 | 7243 | IFDEF: USE_WCCPv2 |
7244 | DOC_START | |
7245 | WCCP2 allows for multiple traffic services. There are two | |
7246 | types: "standard" and "dynamic". The standard type defines | |
7247 | one service id - http (id 0). The dynamic service ids can be from | |
7248 | 51 to 255 inclusive. In order to use a dynamic service id | |
7249 | one must define the type of traffic to be redirected; this is done | |
7250 | using the wccp2_service_info option. | |
7251 | ||
7252 | The "standard" type does not require a wccp2_service_info option, | |
7253 | just specifying the service id will suffice. | |
7254 | ||
7255 | MD5 service authentication can be enabled by adding | |
7256 | "password=<password>" to the end of this service declaration. | |
7257 | ||
7258 | Examples: | |
7259 | ||
7260 | wccp2_service standard 0 # for the 'web-cache' standard service | |
7261 | wccp2_service dynamic 80 # a dynamic service type which will be | |
7262 | # fleshed out with subsequent options. | |
7263 | wccp2_service standard 0 password=foo | |
8d6275c0 | 7264 | DOC_END |
7265 | ||
7266 | NAME: wccp2_service_info | |
7267 | TYPE: wccp2_service_info | |
7268 | LOC: Config.Wccp2.info | |
7269 | DEFAULT: none | |
7270 | IFDEF: USE_WCCPv2 | |
7271 | DOC_START | |
7272 | Dynamic WCCPv2 services require further information to define the | |
7273 | traffic you wish to have diverted. | |
7274 | ||
7275 | The format is: | |
7276 | ||
7277 | wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>.. | |
7278 | priority=<priority> ports=<port>,<port>.. | |
7279 | ||
7280 | The relevant WCCPv2 flags: | |
7281 | + src_ip_hash, dst_ip_hash | |
005fe566 | 7282 | + source_port_hash, dst_port_hash |
8d6275c0 | 7283 | + src_ip_alt_hash, dst_ip_alt_hash |
7284 | + src_port_alt_hash, dst_port_alt_hash | |
7285 | + ports_source | |
7286 | ||
7287 | The port list can be one to eight entries. | |
7288 | ||
7289 | Example: | |
7290 | ||
7291 | wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source | |
7292 | priority=240 ports=80 | |
7293 | ||
7294 | Note: the service id must have been defined by a previous | |
7295 | 'wccp2_service dynamic <id>' entry. | |
7296 | DOC_END | |
7297 | ||
7298 | NAME: wccp2_weight | |
7299 | TYPE: int | |
7300 | LOC: Config.Wccp2.weight | |
7301 | DEFAULT: 10000 | |
7302 | IFDEF: USE_WCCPv2 | |
7303 | DOC_START | |
7304 | Each cache server gets assigned a set of the destination | |
7305 | hash proportional to their weight. | |
7306 | DOC_END | |
7307 | ||
7308 | NAME: wccp_address | |
7309 | TYPE: address | |
7310 | LOC: Config.Wccp.address | |
7311 | DEFAULT: 0.0.0.0 | |
638402dd | 7312 | DEFAULT_DOC: Address selected by the operating system. |
8d6275c0 | 7313 | IFDEF: USE_WCCP |
638402dd AJ |
7314 | DOC_START |
7315 | Use this option if you require WCCPv2 to use a specific | |
7316 | interface address. | |
7317 | ||
7318 | The default behavior is to not bind to any specific address. | |
7319 | DOC_END | |
df2eec10 | 7320 | |
8d6275c0 | 7321 | NAME: wccp2_address |
7322 | TYPE: address | |
7323 | LOC: Config.Wccp2.address | |
7324 | DEFAULT: 0.0.0.0 | |
638402dd | 7325 | DEFAULT_DOC: Address selected by the operating system. |
8d6275c0 | 7326 | IFDEF: USE_WCCPv2 |
7327 | DOC_START | |
7328 | Use this option if you require WCCP to use a specific | |
7329 | interface address. | |
7330 | ||
7331 | The default behavior is to not bind to any specific address. | |
7332 | DOC_END | |
7333 | ||
7334 | COMMENT_START | |
7335 | PERSISTENT CONNECTION HANDLING | |
7336 | ----------------------------------------------------------------------------- | |
7337 | ||
7338 | Also see "pconn_timeout" in the TIMEOUTS section | |
7339 | COMMENT_END | |
7340 | ||
7341 | NAME: client_persistent_connections | |
7342 | TYPE: onoff | |
7343 | LOC: Config.onoff.client_pconns | |
7344 | DEFAULT: on | |
638402dd AJ |
7345 | DOC_START |
7346 | Persistent connection support for clients. | |
7347 | Squid uses persistent connections (when allowed). You can use | |
7348 | this option to disable persistent connections with clients. | |
7349 | DOC_END | |
8d6275c0 | 7350 | |
7351 | NAME: server_persistent_connections | |
7352 | TYPE: onoff | |
7353 | LOC: Config.onoff.server_pconns | |
7354 | DEFAULT: on | |
7355 | DOC_START | |
638402dd AJ |
7356 | Persistent connection support for servers. |
7357 | Squid uses persistent connections (when allowed). You can use | |
7358 | this option to disable persistent connections with servers. | |
8d6275c0 | 7359 | DOC_END |
7360 | ||
7361 | NAME: persistent_connection_after_error | |
7362 | TYPE: onoff | |
7363 | LOC: Config.onoff.error_pconns | |
0fccfb7f | 7364 | DEFAULT: on |
8d6275c0 | 7365 | DOC_START |
7366 | With this directive the use of persistent connections after | |
7367 | HTTP errors can be disabled. Useful if you have clients | |
7368 | who fail to handle errors on persistent connections proper. | |
7369 | DOC_END | |
7370 | ||
7371 | NAME: detect_broken_pconn | |
7372 | TYPE: onoff | |
7373 | LOC: Config.onoff.detect_broken_server_pconns | |
7374 | DEFAULT: off | |
7375 | DOC_START | |
7376 | Some servers have been found to incorrectly signal the use | |
7377 | of HTTP/1.0 persistent connections even on replies not | |
7378 | compatible, causing significant delays. This server problem | |
7379 | has mostly been seen on redirects. | |
7380 | ||
7381 | By enabling this directive Squid attempts to detect such | |
7382 | broken replies and automatically assume the reply is finished | |
7383 | after 10 seconds timeout. | |
7384 | DOC_END | |
7385 | ||
7386 | COMMENT_START | |
7387 | CACHE DIGEST OPTIONS | |
7388 | ----------------------------------------------------------------------------- | |
7389 | COMMENT_END | |
7390 | ||
7391 | NAME: digest_generation | |
7392 | IFDEF: USE_CACHE_DIGESTS | |
7393 | TYPE: onoff | |
7394 | LOC: Config.onoff.digest_generation | |
7395 | DEFAULT: on | |
7396 | DOC_START | |
7397 | This controls whether the server will generate a Cache Digest | |
7398 | of its contents. By default, Cache Digest generation is | |
13e917b5 | 7399 | enabled if Squid is compiled with --enable-cache-digests defined. |
8d6275c0 | 7400 | DOC_END |
7401 | ||
7402 | NAME: digest_bits_per_entry | |
7403 | IFDEF: USE_CACHE_DIGESTS | |
7404 | TYPE: int | |
7405 | LOC: Config.digest.bits_per_entry | |
7406 | DEFAULT: 5 | |
7407 | DOC_START | |
7408 | This is the number of bits of the server's Cache Digest which | |
7409 | will be associated with the Digest entry for a given HTTP | |
7410 | Method and URL (public key) combination. The default is 5. | |
7411 | DOC_END | |
7412 | ||
7413 | NAME: digest_rebuild_period | |
7414 | IFDEF: USE_CACHE_DIGESTS | |
7415 | COMMENT: (seconds) | |
7416 | TYPE: time_t | |
7417 | LOC: Config.digest.rebuild_period | |
7418 | DEFAULT: 1 hour | |
7419 | DOC_START | |
749ceff8 | 7420 | This is the wait time between Cache Digest rebuilds. |
8d6275c0 | 7421 | DOC_END |
7422 | ||
7423 | NAME: digest_rewrite_period | |
7424 | COMMENT: (seconds) | |
7425 | IFDEF: USE_CACHE_DIGESTS | |
7426 | TYPE: time_t | |
7427 | LOC: Config.digest.rewrite_period | |
7428 | DEFAULT: 1 hour | |
7429 | DOC_START | |
749ceff8 | 7430 | This is the wait time between Cache Digest writes to |
8d6275c0 | 7431 | disk. |
7432 | DOC_END | |
7433 | ||
7434 | NAME: digest_swapout_chunk_size | |
7435 | COMMENT: (bytes) | |
7436 | TYPE: b_size_t | |
7437 | IFDEF: USE_CACHE_DIGESTS | |
7438 | LOC: Config.digest.swapout_chunk_size | |
7439 | DEFAULT: 4096 bytes | |
7440 | DOC_START | |
7441 | This is the number of bytes of the Cache Digest to write to | |
7442 | disk at a time. It defaults to 4096 bytes (4KB), the Squid | |
7443 | default swap page. | |
7444 | DOC_END | |
7445 | ||
7446 | NAME: digest_rebuild_chunk_percentage | |
7447 | COMMENT: (percent, 0-100) | |
7448 | IFDEF: USE_CACHE_DIGESTS | |
7449 | TYPE: int | |
7450 | LOC: Config.digest.rebuild_chunk_percentage | |
7451 | DEFAULT: 10 | |
7452 | DOC_START | |
7453 | This is the percentage of the Cache Digest to be scanned at a | |
7454 | time. By default it is set to 10% of the Cache Digest. | |
7455 | DOC_END | |
7456 | ||
1db9eacd | 7457 | COMMENT_START |
5473c134 | 7458 | SNMP OPTIONS |
1db9eacd | 7459 | ----------------------------------------------------------------------------- |
7460 | COMMENT_END | |
7461 | ||
5473c134 | 7462 | NAME: snmp_port |
ae870270 | 7463 | TYPE: u_short |
5473c134 | 7464 | LOC: Config.Port.snmp |
87630341 | 7465 | DEFAULT: 0 |
638402dd | 7466 | DEFAULT_DOC: SNMP disabled. |
5473c134 | 7467 | IFDEF: SQUID_SNMP |
8d6275c0 | 7468 | DOC_START |
87630341 | 7469 | The port number where Squid listens for SNMP requests. To enable |
7470 | SNMP support set this to a suitable port number. Port number | |
7471 | 3401 is often used for the Squid SNMP agent. By default it's | |
7472 | set to "0" (disabled) | |
e0855596 AJ |
7473 | |
7474 | Example: | |
7475 | snmp_port 3401 | |
8d6275c0 | 7476 | DOC_END |
7477 | ||
5473c134 | 7478 | NAME: snmp_access |
7479 | TYPE: acl_access | |
7480 | LOC: Config.accessList.snmp | |
638402dd AJ |
7481 | DEFAULT: none |
7482 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
5473c134 | 7483 | IFDEF: SQUID_SNMP |
8d6275c0 | 7484 | DOC_START |
5473c134 | 7485 | Allowing or denying access to the SNMP port. |
8d6275c0 | 7486 | |
5473c134 | 7487 | All access to the agent is denied by default. |
7488 | usage: | |
8d6275c0 | 7489 | |
5473c134 | 7490 | snmp_access allow|deny [!]aclname ... |
8d6275c0 | 7491 | |
b3567eb5 FC |
7492 | This clause only supports fast acl types. |
7493 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
638402dd | 7494 | |
5473c134 | 7495 | Example: |
7496 | snmp_access allow snmppublic localhost | |
7497 | snmp_access deny all | |
cccac0a2 | 7498 | DOC_END |
7499 | ||
5473c134 | 7500 | NAME: snmp_incoming_address |
7501 | TYPE: address | |
7502 | LOC: Config.Addrs.snmp_incoming | |
0eb08770 | 7503 | DEFAULT: any_addr |
638402dd | 7504 | DEFAULT_DOC: Accept SNMP packets from all machine interfaces. |
5473c134 | 7505 | IFDEF: SQUID_SNMP |
638402dd AJ |
7506 | DOC_START |
7507 | Just like 'udp_incoming_address', but for the SNMP port. | |
7508 | ||
7509 | snmp_incoming_address is used for the SNMP socket receiving | |
7510 | messages from SNMP agents. | |
7511 | ||
7512 | The default snmp_incoming_address is to listen on all | |
7513 | available network interfaces. | |
7514 | DOC_END | |
df2eec10 | 7515 | |
5473c134 | 7516 | NAME: snmp_outgoing_address |
7517 | TYPE: address | |
7518 | LOC: Config.Addrs.snmp_outgoing | |
0eb08770 | 7519 | DEFAULT: no_addr |
638402dd | 7520 | DEFAULT_DOC: Use snmp_incoming_address or an address selected by the operating system. |
5473c134 | 7521 | IFDEF: SQUID_SNMP |
cccac0a2 | 7522 | DOC_START |
638402dd | 7523 | Just like 'udp_outgoing_address', but for the SNMP port. |
cccac0a2 | 7524 | |
5473c134 | 7525 | snmp_outgoing_address is used for SNMP packets returned to SNMP |
7526 | agents. | |
cccac0a2 | 7527 | |
0eb08770 HN |
7528 | If snmp_outgoing_address is not set it will use the same socket |
7529 | as snmp_incoming_address. Only change this if you want to have | |
7530 | SNMP replies sent using another address than where this Squid | |
7531 | listens for SNMP queries. | |
cccac0a2 | 7532 | |
5473c134 | 7533 | NOTE, snmp_incoming_address and snmp_outgoing_address can not have |
638402dd | 7534 | the same value since they both use the same port. |
cccac0a2 | 7535 | DOC_END |
7536 | ||
5473c134 | 7537 | COMMENT_START |
7538 | ICP OPTIONS | |
7539 | ----------------------------------------------------------------------------- | |
7540 | COMMENT_END | |
7541 | ||
7542 | NAME: icp_port udp_port | |
ae870270 | 7543 | TYPE: u_short |
5473c134 | 7544 | DEFAULT: 0 |
638402dd | 7545 | DEFAULT_DOC: ICP disabled. |
5473c134 | 7546 | LOC: Config.Port.icp |
cccac0a2 | 7547 | DOC_START |
5473c134 | 7548 | The port number where Squid sends and receives ICP queries to |
7549 | and from neighbor caches. The standard UDP port for ICP is 3130. | |
e0855596 AJ |
7550 | |
7551 | Example: | |
7552 | icp_port @DEFAULT_ICP_PORT@ | |
cccac0a2 | 7553 | DOC_END |
7554 | ||
5473c134 | 7555 | NAME: htcp_port |
7556 | IFDEF: USE_HTCP | |
ae870270 | 7557 | TYPE: u_short |
87630341 | 7558 | DEFAULT: 0 |
638402dd | 7559 | DEFAULT_DOC: HTCP disabled. |
5473c134 | 7560 | LOC: Config.Port.htcp |
cccac0a2 | 7561 | DOC_START |
5473c134 | 7562 | The port number where Squid sends and receives HTCP queries to |
87630341 | 7563 | and from neighbor caches. To turn it on you want to set it to |
638402dd | 7564 | 4827. |
e0855596 AJ |
7565 | |
7566 | Example: | |
7567 | htcp_port 4827 | |
cccac0a2 | 7568 | DOC_END |
7569 | ||
7570 | NAME: log_icp_queries | |
7571 | COMMENT: on|off | |
7572 | TYPE: onoff | |
7573 | DEFAULT: on | |
7574 | LOC: Config.onoff.log_udp | |
7575 | DOC_START | |
7576 | If set, ICP queries are logged to access.log. You may wish | |
7577 | do disable this if your ICP load is VERY high to speed things | |
7578 | up or to simplify log analysis. | |
7579 | DOC_END | |
7580 | ||
5473c134 | 7581 | NAME: udp_incoming_address |
7582 | TYPE: address | |
7583 | LOC:Config.Addrs.udp_incoming | |
0eb08770 | 7584 | DEFAULT: any_addr |
638402dd | 7585 | DEFAULT_DOC: Accept packets from all machine interfaces. |
8524d4b2 | 7586 | DOC_START |
7587 | udp_incoming_address is used for UDP packets received from other | |
7588 | caches. | |
7589 | ||
7590 | The default behavior is to not bind to any specific address. | |
7591 | ||
7592 | Only change this if you want to have all UDP queries received on | |
7593 | a specific interface/address. | |
7594 | ||
7595 | NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS | |
7596 | modules. Altering it will affect all of them in the same manner. | |
7597 | ||
7598 | see also; udp_outgoing_address | |
7599 | ||
7600 | NOTE, udp_incoming_address and udp_outgoing_address can not | |
7601 | have the same value since they both use the same port. | |
7602 | DOC_END | |
cccac0a2 | 7603 | |
5473c134 | 7604 | NAME: udp_outgoing_address |
7605 | TYPE: address | |
7606 | LOC: Config.Addrs.udp_outgoing | |
0eb08770 | 7607 | DEFAULT: no_addr |
638402dd | 7608 | DEFAULT_DOC: Use udp_incoming_address or an address selected by the operating system. |
cccac0a2 | 7609 | DOC_START |
8524d4b2 | 7610 | udp_outgoing_address is used for UDP packets sent out to other |
5473c134 | 7611 | caches. |
cccac0a2 | 7612 | |
5473c134 | 7613 | The default behavior is to not bind to any specific address. |
cccac0a2 | 7614 | |
8524d4b2 | 7615 | Instead it will use the same socket as udp_incoming_address. |
7616 | Only change this if you want to have UDP queries sent using another | |
7617 | address than where this Squid listens for UDP queries from other | |
5473c134 | 7618 | caches. |
7619 | ||
8524d4b2 | 7620 | NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS |
7621 | modules. Altering it will affect all of them in the same manner. | |
7622 | ||
7623 | see also; udp_incoming_address | |
7624 | ||
5473c134 | 7625 | NOTE, udp_incoming_address and udp_outgoing_address can not |
8524d4b2 | 7626 | have the same value since they both use the same port. |
cccac0a2 | 7627 | DOC_END |
7628 | ||
3d1e3e43 | 7629 | NAME: icp_hit_stale |
7630 | COMMENT: on|off | |
7631 | TYPE: onoff | |
7632 | DEFAULT: off | |
7633 | LOC: Config.onoff.icp_hit_stale | |
7634 | DOC_START | |
7635 | If you want to return ICP_HIT for stale cache objects, set this | |
7636 | option to 'on'. If you have sibling relationships with caches | |
7637 | in other administrative domains, this should be 'off'. If you only | |
7638 | have sibling relationships with caches under your control, | |
7639 | it is probably okay to set this to 'on'. | |
7640 | If set to 'on', your siblings should use the option "allow-miss" | |
7641 | on their cache_peer lines for connecting to you. | |
7642 | DOC_END | |
7643 | ||
5473c134 | 7644 | NAME: minimum_direct_hops |
cccac0a2 | 7645 | TYPE: int |
5473c134 | 7646 | DEFAULT: 4 |
7647 | LOC: Config.minDirectHops | |
cccac0a2 | 7648 | DOC_START |
5473c134 | 7649 | If using the ICMP pinging stuff, do direct fetches for sites |
7650 | which are no more than this many hops away. | |
cccac0a2 | 7651 | DOC_END |
7652 | ||
5473c134 | 7653 | NAME: minimum_direct_rtt |
638402dd | 7654 | COMMENT: (msec) |
5473c134 | 7655 | TYPE: int |
7656 | DEFAULT: 400 | |
7657 | LOC: Config.minDirectRtt | |
cccac0a2 | 7658 | DOC_START |
5473c134 | 7659 | If using the ICMP pinging stuff, do direct fetches for sites |
7660 | which are no more than this many rtt milliseconds away. | |
cccac0a2 | 7661 | DOC_END |
7662 | ||
cccac0a2 | 7663 | NAME: netdb_low |
7664 | TYPE: int | |
7665 | DEFAULT: 900 | |
7666 | LOC: Config.Netdb.low | |
638402dd AJ |
7667 | DOC_START |
7668 | The low water mark for the ICMP measurement database. | |
7669 | ||
7670 | Note: high watermark controlled by netdb_high directive. | |
7671 | ||
7672 | These watermarks are counts, not percents. The defaults are | |
7673 | (low) 900 and (high) 1000. When the high water mark is | |
7674 | reached, database entries will be deleted until the low | |
7675 | mark is reached. | |
7676 | DOC_END | |
cccac0a2 | 7677 | |
7678 | NAME: netdb_high | |
7679 | TYPE: int | |
7680 | DEFAULT: 1000 | |
7681 | LOC: Config.Netdb.high | |
7682 | DOC_START | |
638402dd AJ |
7683 | The high water mark for the ICMP measurement database. |
7684 | ||
7685 | Note: low watermark controlled by netdb_low directive. | |
7686 | ||
7687 | These watermarks are counts, not percents. The defaults are | |
7688 | (low) 900 and (high) 1000. When the high water mark is | |
7689 | reached, database entries will be deleted until the low | |
7690 | mark is reached. | |
cccac0a2 | 7691 | DOC_END |
7692 | ||
cccac0a2 | 7693 | NAME: netdb_ping_period |
7694 | TYPE: time_t | |
7695 | LOC: Config.Netdb.period | |
7696 | DEFAULT: 5 minutes | |
7697 | DOC_START | |
7698 | The minimum period for measuring a site. There will be at | |
7699 | least this much delay between successive pings to the same | |
7700 | network. The default is five minutes. | |
7701 | DOC_END | |
7702 | ||
cccac0a2 | 7703 | NAME: query_icmp |
7704 | COMMENT: on|off | |
7705 | TYPE: onoff | |
7706 | DEFAULT: off | |
7707 | LOC: Config.onoff.query_icmp | |
7708 | DOC_START | |
7709 | If you want to ask your peers to include ICMP data in their ICP | |
7710 | replies, enable this option. | |
7711 | ||
7712 | If your peer has configured Squid (during compilation) with | |
7f7db318 | 7713 | '--enable-icmp' that peer will send ICMP pings to origin server |
7714 | sites of the URLs it receives. If you enable this option the | |
cccac0a2 | 7715 | ICP replies from that peer will include the ICMP data (if available). |
7716 | Then, when choosing a parent cache, Squid will choose the parent with | |
7717 | the minimal RTT to the origin server. When this happens, the | |
7718 | hierarchy field of the access.log will be | |
7719 | "CLOSEST_PARENT_MISS". This option is off by default. | |
7720 | DOC_END | |
7721 | ||
7722 | NAME: test_reachability | |
7723 | COMMENT: on|off | |
7724 | TYPE: onoff | |
7725 | DEFAULT: off | |
7726 | LOC: Config.onoff.test_reachability | |
7727 | DOC_START | |
7728 | When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH | |
7729 | instead of ICP_MISS if the target host is NOT in the ICMP | |
7730 | database, or has a zero RTT. | |
7731 | DOC_END | |
7732 | ||
5473c134 | 7733 | NAME: icp_query_timeout |
7734 | COMMENT: (msec) | |
7735 | DEFAULT: 0 | |
638402dd | 7736 | DEFAULT_DOC: Dynamic detection. |
5473c134 | 7737 | TYPE: int |
7738 | LOC: Config.Timeout.icp_query | |
4c3ef9b2 | 7739 | DOC_START |
5473c134 | 7740 | Normally Squid will automatically determine an optimal ICP |
7741 | query timeout value based on the round-trip-time of recent ICP | |
7742 | queries. If you want to override the value determined by | |
7743 | Squid, set this 'icp_query_timeout' to a non-zero value. This | |
7744 | value is specified in MILLISECONDS, so, to use a 2-second | |
7745 | timeout (the old default), you would write: | |
4c3ef9b2 | 7746 | |
5473c134 | 7747 | icp_query_timeout 2000 |
4c3ef9b2 | 7748 | DOC_END |
7749 | ||
5473c134 | 7750 | NAME: maximum_icp_query_timeout |
7751 | COMMENT: (msec) | |
7752 | DEFAULT: 2000 | |
7753 | TYPE: int | |
7754 | LOC: Config.Timeout.icp_query_max | |
cccac0a2 | 7755 | DOC_START |
5473c134 | 7756 | Normally the ICP query timeout is determined dynamically. But |
7757 | sometimes it can lead to very large values (say 5 seconds). | |
7758 | Use this option to put an upper limit on the dynamic timeout | |
7759 | value. Do NOT use this option to always use a fixed (instead | |
7760 | of a dynamic) timeout value. To set a fixed timeout see the | |
7761 | 'icp_query_timeout' directive. | |
cccac0a2 | 7762 | DOC_END |
7763 | ||
5473c134 | 7764 | NAME: minimum_icp_query_timeout |
7765 | COMMENT: (msec) | |
7766 | DEFAULT: 5 | |
7767 | TYPE: int | |
7768 | LOC: Config.Timeout.icp_query_min | |
cccac0a2 | 7769 | DOC_START |
5473c134 | 7770 | Normally the ICP query timeout is determined dynamically. But |
7771 | sometimes it can lead to very small timeouts, even lower than | |
7772 | the normal latency variance on your link due to traffic. | |
7773 | Use this option to put an lower limit on the dynamic timeout | |
7774 | value. Do NOT use this option to always use a fixed (instead | |
7775 | of a dynamic) timeout value. To set a fixed timeout see the | |
7776 | 'icp_query_timeout' directive. | |
cccac0a2 | 7777 | DOC_END |
7778 | ||
5473c134 | 7779 | NAME: background_ping_rate |
7780 | COMMENT: time-units | |
7781 | TYPE: time_t | |
7782 | DEFAULT: 10 seconds | |
7783 | LOC: Config.backgroundPingRate | |
cccac0a2 | 7784 | DOC_START |
5473c134 | 7785 | Controls how often the ICP pings are sent to siblings that |
7786 | have background-ping set. | |
cccac0a2 | 7787 | DOC_END |
7788 | ||
5473c134 | 7789 | COMMENT_START |
7790 | MULTICAST ICP OPTIONS | |
7791 | ----------------------------------------------------------------------------- | |
7792 | COMMENT_END | |
7793 | ||
7794 | NAME: mcast_groups | |
7795 | TYPE: wordlist | |
7796 | LOC: Config.mcast_group_list | |
8c01ada0 | 7797 | DEFAULT: none |
7798 | DOC_START | |
5473c134 | 7799 | This tag specifies a list of multicast groups which your server |
7800 | should join to receive multicasted ICP queries. | |
8c01ada0 | 7801 | |
5473c134 | 7802 | NOTE! Be very careful what you put here! Be sure you |
7803 | understand the difference between an ICP _query_ and an ICP | |
7804 | _reply_. This option is to be set only if you want to RECEIVE | |
7805 | multicast queries. Do NOT set this option to SEND multicast | |
7806 | ICP (use cache_peer for that). ICP replies are always sent via | |
7807 | unicast, so this option does not affect whether or not you will | |
7808 | receive replies from multicast group members. | |
8c01ada0 | 7809 | |
5473c134 | 7810 | You must be very careful to NOT use a multicast address which |
7811 | is already in use by another group of caches. | |
8c01ada0 | 7812 | |
5473c134 | 7813 | If you are unsure about multicast, please read the Multicast |
7814 | chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/). | |
8c01ada0 | 7815 | |
5473c134 | 7816 | Usage: mcast_groups 239.128.16.128 224.0.1.20 |
8c01ada0 | 7817 | |
5473c134 | 7818 | By default, Squid doesn't listen on any multicast groups. |
7819 | DOC_END | |
8c01ada0 | 7820 | |
5473c134 | 7821 | NAME: mcast_miss_addr |
7822 | IFDEF: MULTICAST_MISS_STREAM | |
7823 | TYPE: address | |
7824 | LOC: Config.mcast_miss.addr | |
0eb08770 | 7825 | DEFAULT: no_addr |
638402dd | 7826 | DEFAULT_DOC: disabled. |
5473c134 | 7827 | DOC_START |
7828 | If you enable this option, every "cache miss" URL will | |
7829 | be sent out on the specified multicast address. | |
cccac0a2 | 7830 | |
5473c134 | 7831 | Do not enable this option unless you are are absolutely |
7832 | certain you understand what you are doing. | |
cccac0a2 | 7833 | DOC_END |
7834 | ||
5473c134 | 7835 | NAME: mcast_miss_ttl |
7836 | IFDEF: MULTICAST_MISS_STREAM | |
ae870270 | 7837 | TYPE: u_short |
5473c134 | 7838 | LOC: Config.mcast_miss.ttl |
7839 | DEFAULT: 16 | |
cccac0a2 | 7840 | DOC_START |
5473c134 | 7841 | This is the time-to-live value for packets multicasted |
7842 | when multicasting off cache miss URLs is enabled. By | |
7843 | default this is set to 'site scope', i.e. 16. | |
7844 | DOC_END | |
cccac0a2 | 7845 | |
5473c134 | 7846 | NAME: mcast_miss_port |
7847 | IFDEF: MULTICAST_MISS_STREAM | |
ae870270 | 7848 | TYPE: u_short |
5473c134 | 7849 | LOC: Config.mcast_miss.port |
7850 | DEFAULT: 3135 | |
7851 | DOC_START | |
7852 | This is the port number to be used in conjunction with | |
7853 | 'mcast_miss_addr'. | |
7854 | DOC_END | |
cccac0a2 | 7855 | |
5473c134 | 7856 | NAME: mcast_miss_encode_key |
7857 | IFDEF: MULTICAST_MISS_STREAM | |
7858 | TYPE: string | |
7859 | LOC: Config.mcast_miss.encode_key | |
7860 | DEFAULT: XXXXXXXXXXXXXXXX | |
7861 | DOC_START | |
7862 | The URLs that are sent in the multicast miss stream are | |
7863 | encrypted. This is the encryption key. | |
7864 | DOC_END | |
8c01ada0 | 7865 | |
5473c134 | 7866 | NAME: mcast_icp_query_timeout |
7867 | COMMENT: (msec) | |
7868 | DEFAULT: 2000 | |
7869 | TYPE: int | |
7870 | LOC: Config.Timeout.mcast_icp_query | |
7871 | DOC_START | |
7872 | For multicast peers, Squid regularly sends out ICP "probes" to | |
7873 | count how many other peers are listening on the given multicast | |
7874 | address. This value specifies how long Squid should wait to | |
7875 | count all the replies. The default is 2000 msec, or 2 | |
7876 | seconds. | |
cccac0a2 | 7877 | DOC_END |
7878 | ||
5473c134 | 7879 | COMMENT_START |
7880 | INTERNAL ICON OPTIONS | |
7881 | ----------------------------------------------------------------------------- | |
7882 | COMMENT_END | |
7883 | ||
cccac0a2 | 7884 | NAME: icon_directory |
7885 | TYPE: string | |
7886 | LOC: Config.icons.directory | |
7887 | DEFAULT: @DEFAULT_ICON_DIR@ | |
7888 | DOC_START | |
7889 | Where the icons are stored. These are normally kept in | |
7890 | @DEFAULT_ICON_DIR@ | |
7891 | DOC_END | |
7892 | ||
f024c970 | 7893 | NAME: global_internal_static |
7894 | TYPE: onoff | |
7895 | LOC: Config.onoff.global_internal_static | |
7896 | DEFAULT: on | |
7897 | DOC_START | |
7898 | This directive controls is Squid should intercept all requests for | |
7899 | /squid-internal-static/ no matter which host the URL is requesting | |
7900 | (default on setting), or if nothing special should be done for | |
7901 | such URLs (off setting). The purpose of this directive is to make | |
7902 | icons etc work better in complex cache hierarchies where it may | |
7903 | not always be possible for all corners in the cache mesh to reach | |
7904 | the server generating a directory listing. | |
7905 | DOC_END | |
7906 | ||
5473c134 | 7907 | NAME: short_icon_urls |
7908 | TYPE: onoff | |
7909 | LOC: Config.icons.use_short_names | |
7910 | DEFAULT: on | |
7911 | DOC_START | |
7912 | If this is enabled Squid will use short URLs for icons. | |
7913 | If disabled it will revert to the old behavior of including | |
7914 | it's own name and port in the URL. | |
7915 | ||
7916 | If you run a complex cache hierarchy with a mix of Squid and | |
7917 | other proxies you may need to disable this directive. | |
7918 | DOC_END | |
7919 | ||
7920 | COMMENT_START | |
7921 | ERROR PAGE OPTIONS | |
7922 | ----------------------------------------------------------------------------- | |
7923 | COMMENT_END | |
7924 | ||
7925 | NAME: error_directory | |
7926 | TYPE: string | |
7927 | LOC: Config.errorDirectory | |
43000484 | 7928 | DEFAULT: none |
638402dd | 7929 | DEFAULT_DOC: Send error pages in the clients preferred language |
5473c134 | 7930 | DOC_START |
7931 | If you wish to create your own versions of the default | |
43000484 AJ |
7932 | error files to customize them to suit your company copy |
7933 | the error/template files to another directory and point | |
7934 | this tag at them. | |
7935 | ||
7936 | WARNING: This option will disable multi-language support | |
7937 | on error pages if used. | |
5473c134 | 7938 | |
7939 | The squid developers are interested in making squid available in | |
7940 | a wide variety of languages. If you are making translations for a | |
43000484 | 7941 | language that Squid does not currently provide please consider |
5473c134 | 7942 | contributing your translation back to the project. |
43000484 AJ |
7943 | http://wiki.squid-cache.org/Translations |
7944 | ||
7945 | The squid developers working on translations are happy to supply drop-in | |
7946 | translated error files in exchange for any new language contributions. | |
7947 | DOC_END | |
7948 | ||
7949 | NAME: error_default_language | |
7950 | IFDEF: USE_ERR_LOCALES | |
7951 | TYPE: string | |
7952 | LOC: Config.errorDefaultLanguage | |
7953 | DEFAULT: none | |
638402dd | 7954 | DEFAULT_DOC: Generate English language pages. |
43000484 AJ |
7955 | DOC_START |
7956 | Set the default language which squid will send error pages in | |
7957 | if no existing translation matches the clients language | |
7958 | preferences. | |
7959 | ||
7960 | If unset (default) generic English will be used. | |
7961 | ||
7962 | The squid developers are interested in making squid available in | |
7963 | a wide variety of languages. If you are interested in making | |
7964 | translations for any language see the squid wiki for details. | |
7965 | http://wiki.squid-cache.org/Translations | |
5473c134 | 7966 | DOC_END |
7967 | ||
c411820c AJ |
7968 | NAME: error_log_languages |
7969 | IFDEF: USE_ERR_LOCALES | |
7970 | TYPE: onoff | |
7971 | LOC: Config.errorLogMissingLanguages | |
7972 | DEFAULT: on | |
7973 | DOC_START | |
7974 | Log to cache.log what languages users are attempting to | |
7975 | auto-negotiate for translations. | |
7976 | ||
7977 | Successful negotiations are not logged. Only failures | |
7978 | have meaning to indicate that Squid may need an upgrade | |
0c49f10e | 7979 | of its error page translations. |
c411820c AJ |
7980 | DOC_END |
7981 | ||
5b52cb6c AJ |
7982 | NAME: err_page_stylesheet |
7983 | TYPE: string | |
7984 | LOC: Config.errorStylesheet | |
7985 | DEFAULT: @DEFAULT_CONFIG_DIR@/errorpage.css | |
7986 | DOC_START | |
7987 | CSS Stylesheet to pattern the display of Squid default error pages. | |
7988 | ||
7989 | For information on CSS see http://www.w3.org/Style/CSS/ | |
7990 | DOC_END | |
7991 | ||
5473c134 | 7992 | NAME: err_html_text |
7993 | TYPE: eol | |
7994 | LOC: Config.errHtmlText | |
7995 | DEFAULT: none | |
7996 | DOC_START | |
7997 | HTML text to include in error messages. Make this a "mailto" | |
7998 | URL to your admin address, or maybe just a link to your | |
7999 | organizations Web page. | |
8000 | ||
8001 | To include this in your error messages, you must rewrite | |
8002 | the error template files (found in the "errors" directory). | |
8003 | Wherever you want the 'err_html_text' line to appear, | |
8004 | insert a %L tag in the error template file. | |
8005 | DOC_END | |
8006 | ||
8007 | NAME: email_err_data | |
8008 | COMMENT: on|off | |
8009 | TYPE: onoff | |
8010 | LOC: Config.onoff.emailErrData | |
8011 | DEFAULT: on | |
8012 | DOC_START | |
8013 | If enabled, information about the occurred error will be | |
8014 | included in the mailto links of the ERR pages (if %W is set) | |
8015 | so that the email body contains the data. | |
8016 | Syntax is <A HREF="mailto:%w%W">%w</A> | |
8017 | DOC_END | |
8018 | ||
8019 | NAME: deny_info | |
8020 | TYPE: denyinfo | |
8021 | LOC: Config.denyInfoList | |
8022 | DEFAULT: none | |
8023 | DOC_START | |
8024 | Usage: deny_info err_page_name acl | |
8025 | or deny_info http://... acl | |
43000484 | 8026 | or deny_info TCP_RESET acl |
5473c134 | 8027 | |
8028 | This can be used to return a ERR_ page for requests which | |
8029 | do not pass the 'http_access' rules. Squid remembers the last | |
8030 | acl it evaluated in http_access, and if a 'deny_info' line exists | |
8031 | for that ACL Squid returns a corresponding error page. | |
8032 | ||
8033 | The acl is typically the last acl on the http_access deny line which | |
8034 | denied access. The exceptions to this rule are: | |
8035 | - When Squid needs to request authentication credentials. It's then | |
8036 | the first authentication related acl encountered | |
8037 | - When none of the http_access lines matches. It's then the last | |
8038 | acl processed on the last http_access line. | |
3af10ac0 AR |
8039 | - When the decision to deny access was made by an adaptation service, |
8040 | the acl name is the corresponding eCAP or ICAP service_name. | |
5473c134 | 8041 | |
43000484 AJ |
8042 | NP: If providing your own custom error pages with error_directory |
8043 | you may also specify them by your custom file name: | |
8044 | Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys | |
5473c134 | 8045 | |
aed9a15b AJ |
8046 | By defaut Squid will send "403 Forbidden". A different 4xx or 5xx |
8047 | may be specified by prefixing the file name with the code and a colon. | |
8048 | e.g. 404:ERR_CUSTOM_ACCESS_DENIED | |
8049 | ||
5473c134 | 8050 | Alternatively you can tell Squid to reset the TCP connection |
8051 | by specifying TCP_RESET. | |
15b02e9a AJ |
8052 | |
8053 | Or you can specify an error URL or URL pattern. The browsers will | |
aed9a15b AJ |
8054 | get redirected to the specified URL after formatting tags have |
8055 | been replaced. Redirect will be done with 302 or 307 according to | |
8056 | HTTP/1.1 specs. A different 3xx code may be specified by prefixing | |
8057 | the URL. e.g. 303:http://example.com/ | |
15b02e9a AJ |
8058 | |
8059 | URL FORMAT TAGS: | |
8060 | %a - username (if available. Password NOT included) | |
8061 | %B - FTP path URL | |
8062 | %e - Error number | |
8063 | %E - Error description | |
8064 | %h - Squid hostname | |
8065 | %H - Request domain name | |
8066 | %i - Client IP Address | |
8067 | %M - Request Method | |
05dbf66c | 8068 | %O - Unescaped message result from external ACL helper |
15b02e9a AJ |
8069 | %o - Message result from external ACL helper |
8070 | %p - Request Port number | |
8071 | %P - Request Protocol name | |
8072 | %R - Request URL path | |
8073 | %T - Timestamp in RFC 1123 format | |
8074 | %U - Full canonical URL from client | |
8075 | (HTTPS URLs terminate with *) | |
8076 | %u - Full canonical URL from client | |
8077 | %w - Admin email from squid.conf | |
e4a8468d | 8078 | %x - Error name |
15b02e9a AJ |
8079 | %% - Literal percent (%) code |
8080 | ||
5473c134 | 8081 | DOC_END |
8082 | ||
8083 | COMMENT_START | |
8084 | OPTIONS INFLUENCING REQUEST FORWARDING | |
8085 | ----------------------------------------------------------------------------- | |
8086 | COMMENT_END | |
8087 | ||
8088 | NAME: nonhierarchical_direct | |
e72a0ec0 | 8089 | TYPE: onoff |
5473c134 | 8090 | LOC: Config.onoff.nonhierarchical_direct |
e72a0ec0 | 8091 | DEFAULT: on |
8092 | DOC_START | |
5473c134 | 8093 | By default, Squid will send any non-hierarchical requests |
9967aef6 | 8094 | (not cacheable request type) direct to origin servers. |
e72a0ec0 | 8095 | |
638402dd | 8096 | When this is set to "off", Squid will prefer to send these |
5473c134 | 8097 | requests to parents. |
0b0cfcf2 | 8098 | |
5473c134 | 8099 | Note that in most configurations, by turning this off you will only |
8100 | add latency to these request without any improvement in global hit | |
8101 | ratio. | |
0b0cfcf2 | 8102 | |
638402dd AJ |
8103 | This option only sets a preference. If the parent is unavailable a |
8104 | direct connection to the origin server may still be attempted. To | |
8105 | completely prevent direct connections use never_direct. | |
8d6275c0 | 8106 | DOC_END |
0b0cfcf2 | 8107 | |
5473c134 | 8108 | NAME: prefer_direct |
8d6275c0 | 8109 | TYPE: onoff |
5473c134 | 8110 | LOC: Config.onoff.prefer_direct |
8d6275c0 | 8111 | DEFAULT: off |
8112 | DOC_START | |
5473c134 | 8113 | Normally Squid tries to use parents for most requests. If you for some |
8114 | reason like it to first try going direct and only use a parent if | |
8115 | going direct fails set this to on. | |
0b0cfcf2 | 8116 | |
5473c134 | 8117 | By combining nonhierarchical_direct off and prefer_direct on you |
8118 | can set up Squid to use a parent as a backup path if going direct | |
8119 | fails. | |
8120 | ||
8121 | Note: If you want Squid to use parents for all requests see | |
8122 | the never_direct directive. prefer_direct only modifies how Squid | |
8123 | acts on cacheable requests. | |
cccac0a2 | 8124 | DOC_END |
8125 | ||
96598f93 AJ |
8126 | NAME: cache_miss_revalidate |
8127 | COMMENT: on|off | |
8128 | TYPE: onoff | |
8129 | DEFAULT: on | |
8130 | LOC: Config.onoff.cache_miss_revalidate | |
8131 | DOC_START | |
2d4eefd9 AJ |
8132 | RFC 7232 defines a conditional request mechanism to prevent |
8133 | response objects being unnecessarily transferred over the network. | |
8134 | If that mechanism is used by the client and a cache MISS occurs | |
8135 | it can prevent new cache entries being created. | |
8136 | ||
8137 | This option determines whether Squid on cache MISS will pass the | |
8138 | client revalidation request to the server or tries to fetch new | |
8139 | content for caching. It can be useful while the cache is mostly | |
8140 | empty to more quickly have the cache populated by generating | |
8141 | non-conditional GETs. | |
96598f93 AJ |
8142 | |
8143 | When set to 'on' (default), Squid will pass all client If-* headers | |
2d4eefd9 AJ |
8144 | to the server. This permits server responses without a cacheable |
8145 | payload to be delivered and on MISS no new cache entry is created. | |
96598f93 AJ |
8146 | |
8147 | When set to 'off' and if the request is cacheable, Squid will | |
8148 | remove the clients If-Modified-Since and If-None-Match headers from | |
2d4eefd9 AJ |
8149 | the request sent to the server. This requests a 200 status response |
8150 | from the server to create a new cache entry with. | |
96598f93 AJ |
8151 | DOC_END |
8152 | ||
5473c134 | 8153 | NAME: always_direct |
8d6275c0 | 8154 | TYPE: acl_access |
5473c134 | 8155 | LOC: Config.accessList.AlwaysDirect |
0b0cfcf2 | 8156 | DEFAULT: none |
638402dd | 8157 | DEFAULT_DOC: Prevent any cache_peer being used for this request. |
0b0cfcf2 | 8158 | DOC_START |
5473c134 | 8159 | Usage: always_direct allow|deny [!]aclname ... |
0b0cfcf2 | 8160 | |
5473c134 | 8161 | Here you can use ACL elements to specify requests which should |
8162 | ALWAYS be forwarded by Squid to the origin servers without using | |
8163 | any peers. For example, to always directly forward requests for | |
8164 | local servers ignoring any parents or siblings you may have use | |
8165 | something like: | |
0b0cfcf2 | 8166 | |
5473c134 | 8167 | acl local-servers dstdomain my.domain.net |
8168 | always_direct allow local-servers | |
0b0cfcf2 | 8169 | |
5473c134 | 8170 | To always forward FTP requests directly, use |
f16fbc82 | 8171 | |
5473c134 | 8172 | acl FTP proto FTP |
8173 | always_direct allow FTP | |
cccac0a2 | 8174 | |
5473c134 | 8175 | NOTE: There is a similar, but opposite option named |
8176 | 'never_direct'. You need to be aware that "always_direct deny | |
8177 | foo" is NOT the same thing as "never_direct allow foo". You | |
8178 | may need to use a deny rule to exclude a more-specific case of | |
8179 | some other rule. Example: | |
8d6275c0 | 8180 | |
5473c134 | 8181 | acl local-external dstdomain external.foo.net |
8182 | acl local-servers dstdomain .foo.net | |
8183 | always_direct deny local-external | |
8184 | always_direct allow local-servers | |
8d6275c0 | 8185 | |
5473c134 | 8186 | NOTE: If your goal is to make the client forward the request |
8187 | directly to the origin server bypassing Squid then this needs | |
8188 | to be done in the client configuration. Squid configuration | |
8189 | can only tell Squid how Squid should fetch the object. | |
8d6275c0 | 8190 | |
5473c134 | 8191 | NOTE: This directive is not related to caching. The replies |
8192 | is cached as usual even if you use always_direct. To not cache | |
b3567eb5 | 8193 | the replies see the 'cache' directive. |
5473c134 | 8194 | |
b3567eb5 FC |
8195 | This clause supports both fast and slow acl types. |
8196 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
cccac0a2 | 8197 | DOC_END |
0976f8db | 8198 | |
5473c134 | 8199 | NAME: never_direct |
8200 | TYPE: acl_access | |
8201 | LOC: Config.accessList.NeverDirect | |
8202 | DEFAULT: none | |
638402dd | 8203 | DEFAULT_DOC: Allow DNS results to be used for this request. |
8d6275c0 | 8204 | DOC_START |
5473c134 | 8205 | Usage: never_direct allow|deny [!]aclname ... |
8206 | ||
8207 | never_direct is the opposite of always_direct. Please read | |
8208 | the description for always_direct if you have not already. | |
8209 | ||
8210 | With 'never_direct' you can use ACL elements to specify | |
8211 | requests which should NEVER be forwarded directly to origin | |
8212 | servers. For example, to force the use of a proxy for all | |
8213 | requests, except those in your local domain use something like: | |
8214 | ||
8215 | acl local-servers dstdomain .foo.net | |
5473c134 | 8216 | never_direct deny local-servers |
8217 | never_direct allow all | |
8218 | ||
8219 | or if Squid is inside a firewall and there are local intranet | |
8220 | servers inside the firewall use something like: | |
8221 | ||
8222 | acl local-intranet dstdomain .foo.net | |
8223 | acl local-external dstdomain external.foo.net | |
8224 | always_direct deny local-external | |
8225 | always_direct allow local-intranet | |
8226 | never_direct allow all | |
8227 | ||
b3567eb5 FC |
8228 | This clause supports both fast and slow acl types. |
8229 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
8d6275c0 | 8230 | DOC_END |
0976f8db | 8231 | |
5473c134 | 8232 | COMMENT_START |
8233 | ADVANCED NETWORKING OPTIONS | |
8234 | ----------------------------------------------------------------------------- | |
8235 | COMMENT_END | |
8236 | ||
65d448bc | 8237 | NAME: incoming_udp_average incoming_icp_average |
cccac0a2 | 8238 | TYPE: int |
8239 | DEFAULT: 6 | |
65d448bc AJ |
8240 | LOC: Config.comm_incoming.udp.average |
8241 | DOC_START | |
8242 | Heavy voodoo here. I can't even believe you are reading this. | |
8243 | Are you crazy? Don't even think about adjusting these unless | |
8244 | you understand the algorithms in comm_select.c first! | |
8245 | DOC_END | |
cccac0a2 | 8246 | |
65d448bc | 8247 | NAME: incoming_tcp_average incoming_http_average |
cccac0a2 | 8248 | TYPE: int |
8249 | DEFAULT: 4 | |
65d448bc AJ |
8250 | LOC: Config.comm_incoming.tcp.average |
8251 | DOC_START | |
8252 | Heavy voodoo here. I can't even believe you are reading this. | |
8253 | Are you crazy? Don't even think about adjusting these unless | |
8254 | you understand the algorithms in comm_select.c first! | |
8255 | DOC_END | |
cccac0a2 | 8256 | |
8257 | NAME: incoming_dns_average | |
8258 | TYPE: int | |
8259 | DEFAULT: 4 | |
65d448bc AJ |
8260 | LOC: Config.comm_incoming.dns.average |
8261 | DOC_START | |
8262 | Heavy voodoo here. I can't even believe you are reading this. | |
8263 | Are you crazy? Don't even think about adjusting these unless | |
8264 | you understand the algorithms in comm_select.c first! | |
8265 | DOC_END | |
cccac0a2 | 8266 | |
65d448bc | 8267 | NAME: min_udp_poll_cnt min_icp_poll_cnt |
cccac0a2 | 8268 | TYPE: int |
8269 | DEFAULT: 8 | |
65d448bc AJ |
8270 | LOC: Config.comm_incoming.udp.min_poll |
8271 | DOC_START | |
8272 | Heavy voodoo here. I can't even believe you are reading this. | |
8273 | Are you crazy? Don't even think about adjusting these unless | |
8274 | you understand the algorithms in comm_select.c first! | |
8275 | DOC_END | |
cccac0a2 | 8276 | |
8277 | NAME: min_dns_poll_cnt | |
8278 | TYPE: int | |
8279 | DEFAULT: 8 | |
65d448bc AJ |
8280 | LOC: Config.comm_incoming.dns.min_poll |
8281 | DOC_START | |
8282 | Heavy voodoo here. I can't even believe you are reading this. | |
8283 | Are you crazy? Don't even think about adjusting these unless | |
8284 | you understand the algorithms in comm_select.c first! | |
8285 | DOC_END | |
cccac0a2 | 8286 | |
65d448bc | 8287 | NAME: min_tcp_poll_cnt min_http_poll_cnt |
cccac0a2 | 8288 | TYPE: int |
8289 | DEFAULT: 8 | |
65d448bc | 8290 | LOC: Config.comm_incoming.tcp.min_poll |
cccac0a2 | 8291 | DOC_START |
5473c134 | 8292 | Heavy voodoo here. I can't even believe you are reading this. |
8293 | Are you crazy? Don't even think about adjusting these unless | |
8294 | you understand the algorithms in comm_select.c first! | |
8295 | DOC_END | |
8296 | ||
8297 | NAME: accept_filter | |
5473c134 | 8298 | TYPE: string |
8299 | DEFAULT: none | |
8300 | LOC: Config.accept_filter | |
8301 | DOC_START | |
0b4d4be5 | 8302 | FreeBSD: |
8303 | ||
5473c134 | 8304 | The name of an accept(2) filter to install on Squid's |
8305 | listen socket(s). This feature is perhaps specific to | |
8306 | FreeBSD and requires support in the kernel. | |
8307 | ||
8308 | The 'httpready' filter delays delivering new connections | |
2324cda2 | 8309 | to Squid until a full HTTP request has been received. |
0b4d4be5 | 8310 | See the accf_http(9) man page for details. |
8311 | ||
8312 | The 'dataready' filter delays delivering new connections | |
8313 | to Squid until there is some data to process. | |
8314 | See the accf_dataready(9) man page for details. | |
8315 | ||
8316 | Linux: | |
8317 | ||
8318 | The 'data' filter delays delivering of new connections | |
8319 | to Squid until there is some data to process by TCP_ACCEPT_DEFER. | |
8320 | You may optionally specify a number of seconds to wait by | |
8321 | 'data=N' where N is the number of seconds. Defaults to 30 | |
8322 | if not specified. See the tcp(7) man page for details. | |
5473c134 | 8323 | EXAMPLE: |
0b4d4be5 | 8324 | # FreeBSD |
5473c134 | 8325 | accept_filter httpready |
0b4d4be5 | 8326 | # Linux |
8327 | accept_filter data | |
5473c134 | 8328 | DOC_END |
8329 | ||
ab2ecb0e AJ |
8330 | NAME: client_ip_max_connections |
8331 | TYPE: int | |
8332 | LOC: Config.client_ip_max_connections | |
8333 | DEFAULT: -1 | |
638402dd | 8334 | DEFAULT_DOC: No limit. |
ab2ecb0e AJ |
8335 | DOC_START |
8336 | Set an absolute limit on the number of connections a single | |
8337 | client IP can use. Any more than this and Squid will begin to drop | |
8338 | new connections from the client until it closes some links. | |
8339 | ||
8340 | Note that this is a global limit. It affects all HTTP, HTCP, Gopher and FTP | |
8341 | connections from the client. For finer control use the ACL access controls. | |
8342 | ||
8343 | Requires client_db to be enabled (the default). | |
8344 | ||
8345 | WARNING: This may noticably slow down traffic received via external proxies | |
8346 | or NAT devices and cause them to rebound error messages back to their clients. | |
8347 | DOC_END | |
8348 | ||
5473c134 | 8349 | NAME: tcp_recv_bufsize |
8350 | COMMENT: (bytes) | |
8351 | TYPE: b_size_t | |
8352 | DEFAULT: 0 bytes | |
638402dd | 8353 | DEFAULT_DOC: Use operating system TCP defaults. |
5473c134 | 8354 | LOC: Config.tcpRcvBufsz |
8355 | DOC_START | |
8356 | Size of receive buffer to set for TCP sockets. Probably just | |
638402dd AJ |
8357 | as easy to change your kernel's default. |
8358 | Omit from squid.conf to use the default buffer size. | |
5473c134 | 8359 | DOC_END |
8360 | ||
8361 | COMMENT_START | |
8362 | ICAP OPTIONS | |
8363 | ----------------------------------------------------------------------------- | |
8364 | COMMENT_END | |
8365 | ||
8366 | NAME: icap_enable | |
8367 | TYPE: onoff | |
8368 | IFDEF: ICAP_CLIENT | |
8369 | COMMENT: on|off | |
26cc52cb | 8370 | LOC: Adaptation::Icap::TheConfig.onoff |
5473c134 | 8371 | DEFAULT: off |
8372 | DOC_START | |
53e738c6 | 8373 | If you want to enable the ICAP module support, set this to on. |
5473c134 | 8374 | DOC_END |
8375 | ||
8376 | NAME: icap_connect_timeout | |
8377 | TYPE: time_t | |
8378 | DEFAULT: none | |
26cc52cb | 8379 | LOC: Adaptation::Icap::TheConfig.connect_timeout_raw |
5473c134 | 8380 | IFDEF: ICAP_CLIENT |
8381 | DOC_START | |
8382 | This parameter specifies how long to wait for the TCP connect to | |
8383 | the requested ICAP server to complete before giving up and either | |
8384 | terminating the HTTP transaction or bypassing the failure. | |
8385 | ||
8386 | The default for optional services is peer_connect_timeout. | |
8387 | The default for essential services is connect_timeout. | |
8388 | If this option is explicitly set, its value applies to all services. | |
8389 | DOC_END | |
8390 | ||
8391 | NAME: icap_io_timeout | |
8392 | COMMENT: time-units | |
8393 | TYPE: time_t | |
8394 | DEFAULT: none | |
638402dd | 8395 | DEFAULT_DOC: Use read_timeout. |
26cc52cb | 8396 | LOC: Adaptation::Icap::TheConfig.io_timeout_raw |
5473c134 | 8397 | IFDEF: ICAP_CLIENT |
8398 | DOC_START | |
8399 | This parameter specifies how long to wait for an I/O activity on | |
8400 | an established, active ICAP connection before giving up and | |
8401 | either terminating the HTTP transaction or bypassing the | |
8402 | failure. | |
5473c134 | 8403 | DOC_END |
8404 | ||
8405 | NAME: icap_service_failure_limit | |
8277060a CT |
8406 | COMMENT: limit [in memory-depth time-units] |
8407 | TYPE: icap_service_failure_limit | |
5473c134 | 8408 | IFDEF: ICAP_CLIENT |
8277060a | 8409 | LOC: Adaptation::Icap::TheConfig |
5473c134 | 8410 | DEFAULT: 10 |
8411 | DOC_START | |
8412 | The limit specifies the number of failures that Squid tolerates | |
8413 | when establishing a new TCP connection with an ICAP service. If | |
8414 | the number of failures exceeds the limit, the ICAP service is | |
8415 | not used for new ICAP requests until it is time to refresh its | |
8277060a | 8416 | OPTIONS. |
5473c134 | 8417 | |
8418 | A negative value disables the limit. Without the limit, an ICAP | |
8419 | service will not be considered down due to connectivity failures | |
8420 | between ICAP OPTIONS requests. | |
8277060a CT |
8421 | |
8422 | Squid forgets ICAP service failures older than the specified | |
8423 | value of memory-depth. The memory fading algorithm | |
8424 | is approximate because Squid does not remember individual | |
8425 | errors but groups them instead, splitting the option | |
8426 | value into ten time slots of equal length. | |
8427 | ||
8428 | When memory-depth is 0 and by default this option has no | |
8429 | effect on service failure expiration. | |
8430 | ||
8431 | Squid always forgets failures when updating service settings | |
8432 | using an ICAP OPTIONS transaction, regardless of this option | |
8433 | setting. | |
8434 | ||
8435 | For example, | |
8436 | # suspend service usage after 10 failures in 5 seconds: | |
8437 | icap_service_failure_limit 10 in 5 seconds | |
cccac0a2 | 8438 | DOC_END |
8439 | ||
5473c134 | 8440 | NAME: icap_service_revival_delay |
cccac0a2 | 8441 | TYPE: int |
5473c134 | 8442 | IFDEF: ICAP_CLIENT |
26cc52cb | 8443 | LOC: Adaptation::Icap::TheConfig.service_revival_delay |
5473c134 | 8444 | DEFAULT: 180 |
cccac0a2 | 8445 | DOC_START |
5473c134 | 8446 | The delay specifies the number of seconds to wait after an ICAP |
8447 | OPTIONS request failure before requesting the options again. The | |
8448 | failed ICAP service is considered "down" until fresh OPTIONS are | |
8449 | fetched. | |
cccac0a2 | 8450 | |
5473c134 | 8451 | The actual delay cannot be smaller than the hardcoded minimum |
8452 | delay of 30 seconds. | |
cccac0a2 | 8453 | DOC_END |
8454 | ||
5473c134 | 8455 | NAME: icap_preview_enable |
cccac0a2 | 8456 | TYPE: onoff |
5473c134 | 8457 | IFDEF: ICAP_CLIENT |
8458 | COMMENT: on|off | |
26cc52cb | 8459 | LOC: Adaptation::Icap::TheConfig.preview_enable |
ac7a62f9 | 8460 | DEFAULT: on |
cccac0a2 | 8461 | DOC_START |
ac7a62f9 | 8462 | The ICAP Preview feature allows the ICAP server to handle the |
8463 | HTTP message by looking only at the beginning of the message body | |
8464 | or even without receiving the body at all. In some environments, | |
8465 | previews greatly speedup ICAP processing. | |
8466 | ||
8467 | During an ICAP OPTIONS transaction, the server may tell Squid what | |
8468 | HTTP messages should be previewed and how big the preview should be. | |
8469 | Squid will not use Preview if the server did not request one. | |
8470 | ||
8471 | To disable ICAP Preview for all ICAP services, regardless of | |
8472 | individual ICAP server OPTIONS responses, set this option to "off". | |
8473 | Example: | |
8474 | icap_preview_enable off | |
cccac0a2 | 8475 | DOC_END |
8476 | ||
5473c134 | 8477 | NAME: icap_preview_size |
8478 | TYPE: int | |
8479 | IFDEF: ICAP_CLIENT | |
26cc52cb | 8480 | LOC: Adaptation::Icap::TheConfig.preview_size |
5473c134 | 8481 | DEFAULT: -1 |
638402dd | 8482 | DEFAULT_DOC: No preview sent. |
cccac0a2 | 8483 | DOC_START |
53e738c6 | 8484 | The default size of preview data to be sent to the ICAP server. |
638402dd | 8485 | This value might be overwritten on a per server basis by OPTIONS requests. |
cccac0a2 | 8486 | DOC_END |
8487 | ||
83c51da9 CT |
8488 | NAME: icap_206_enable |
8489 | TYPE: onoff | |
8490 | IFDEF: ICAP_CLIENT | |
8491 | COMMENT: on|off | |
8492 | LOC: Adaptation::Icap::TheConfig.allow206_enable | |
8493 | DEFAULT: on | |
8494 | DOC_START | |
8495 | 206 (Partial Content) responses is an ICAP extension that allows the | |
8496 | ICAP agents to optionally combine adapted and original HTTP message | |
8497 | content. The decision to combine is postponed until the end of the | |
8498 | ICAP response. Squid supports Partial Content extension by default. | |
8499 | ||
8500 | Activation of the Partial Content extension is negotiated with each | |
8501 | ICAP service during OPTIONS exchange. Most ICAP servers should handle | |
8502 | negotation correctly even if they do not support the extension, but | |
8503 | some might fail. To disable Partial Content support for all ICAP | |
8504 | services and to avoid any negotiation, set this option to "off". | |
8505 | ||
8506 | Example: | |
8507 | icap_206_enable off | |
8508 | DOC_END | |
8509 | ||
5473c134 | 8510 | NAME: icap_default_options_ttl |
8511 | TYPE: int | |
8512 | IFDEF: ICAP_CLIENT | |
26cc52cb | 8513 | LOC: Adaptation::Icap::TheConfig.default_options_ttl |
5473c134 | 8514 | DEFAULT: 60 |
cccac0a2 | 8515 | DOC_START |
53e738c6 | 8516 | The default TTL value for ICAP OPTIONS responses that don't have |
5473c134 | 8517 | an Options-TTL header. |
cccac0a2 | 8518 | DOC_END |
8519 | ||
5473c134 | 8520 | NAME: icap_persistent_connections |
8521 | TYPE: onoff | |
8522 | IFDEF: ICAP_CLIENT | |
8523 | COMMENT: on|off | |
26cc52cb | 8524 | LOC: Adaptation::Icap::TheConfig.reuse_connections |
5473c134 | 8525 | DEFAULT: on |
cccac0a2 | 8526 | DOC_START |
5473c134 | 8527 | Whether or not Squid should use persistent connections to |
8528 | an ICAP server. | |
cccac0a2 | 8529 | DOC_END |
8530 | ||
22fff3bf | 8531 | NAME: adaptation_send_client_ip icap_send_client_ip |
5473c134 | 8532 | TYPE: onoff |
22fff3bf | 8533 | IFDEF: USE_ADAPTATION |
5473c134 | 8534 | COMMENT: on|off |
22fff3bf | 8535 | LOC: Adaptation::Config::send_client_ip |
5473c134 | 8536 | DEFAULT: off |
cccac0a2 | 8537 | DOC_START |
ea3ae478 AR |
8538 | If enabled, Squid shares HTTP client IP information with adaptation |
8539 | services. For ICAP, Squid adds the X-Client-IP header to ICAP requests. | |
8540 | For eCAP, Squid sets the libecap::metaClientIp transaction option. | |
8541 | ||
8542 | See also: adaptation_uses_indirect_client | |
cccac0a2 | 8543 | DOC_END |
8544 | ||
22fff3bf | 8545 | NAME: adaptation_send_username icap_send_client_username |
5473c134 | 8546 | TYPE: onoff |
22fff3bf | 8547 | IFDEF: USE_ADAPTATION |
5473c134 | 8548 | COMMENT: on|off |
22fff3bf | 8549 | LOC: Adaptation::Config::send_username |
5473c134 | 8550 | DEFAULT: off |
cccac0a2 | 8551 | DOC_START |
5473c134 | 8552 | This sends authenticated HTTP client username (if available) to |
22fff3bf AR |
8553 | the adaptation service. |
8554 | ||
8555 | For ICAP, the username value is encoded based on the | |
5473c134 | 8556 | icap_client_username_encode option and is sent using the header |
8557 | specified by the icap_client_username_header option. | |
cccac0a2 | 8558 | DOC_END |
8559 | ||
5473c134 | 8560 | NAME: icap_client_username_header |
cccac0a2 | 8561 | TYPE: string |
5473c134 | 8562 | IFDEF: ICAP_CLIENT |
26cc52cb | 8563 | LOC: Adaptation::Icap::TheConfig.client_username_header |
5473c134 | 8564 | DEFAULT: X-Client-Username |
cccac0a2 | 8565 | DOC_START |
db49f682 | 8566 | ICAP request header name to use for adaptation_send_username. |
cccac0a2 | 8567 | DOC_END |
8568 | ||
5473c134 | 8569 | NAME: icap_client_username_encode |
cccac0a2 | 8570 | TYPE: onoff |
5473c134 | 8571 | IFDEF: ICAP_CLIENT |
8572 | COMMENT: on|off | |
26cc52cb | 8573 | LOC: Adaptation::Icap::TheConfig.client_username_encode |
5473c134 | 8574 | DEFAULT: off |
cccac0a2 | 8575 | DOC_START |
5473c134 | 8576 | Whether to base64 encode the authenticated client username. |
cccac0a2 | 8577 | DOC_END |
8578 | ||
5473c134 | 8579 | NAME: icap_service |
8580 | TYPE: icap_service_type | |
8581 | IFDEF: ICAP_CLIENT | |
26cc52cb | 8582 | LOC: Adaptation::Icap::TheConfig |
5473c134 | 8583 | DEFAULT: none |
cccac0a2 | 8584 | DOC_START |
a22e6cd3 | 8585 | Defines a single ICAP service using the following format: |
cccac0a2 | 8586 | |
c25c2836 | 8587 | icap_service id vectoring_point uri [option ...] |
7d90757b | 8588 | |
c25c2836 CT |
8589 | id: ID |
8590 | an opaque identifier or name which is used to direct traffic to | |
8591 | this specific service. Must be unique among all adaptation | |
8592 | services in squid.conf. | |
a22e6cd3 AR |
8593 | |
8594 | vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache | |
f3db09e2 | 8595 | This specifies at which point of transaction processing the |
8596 | ICAP service should be activated. *_postcache vectoring points | |
8597 | are not yet supported. | |
a22e6cd3 | 8598 | |
c25c2836 | 8599 | uri: icap://servername:port/servicepath |
a22e6cd3 | 8600 | ICAP server and service location. |
1b091aec CT |
8601 | icaps://servername:port/servicepath |
8602 | The "icap:" URI scheme is used for traditional ICAP server and | |
8603 | service location (default port is 1344, connections are not | |
8604 | encrypted). The "icaps:" URI scheme is for Secure ICAP | |
8605 | services that use SSL/TLS-encrypted ICAP connections (by | |
8606 | default, on port 11344). | |
a22e6cd3 AR |
8607 | |
8608 | ICAP does not allow a single service to handle both REQMOD and RESPMOD | |
8609 | transactions. Squid does not enforce that requirement. You can specify | |
8610 | services with the same service_url and different vectoring_points. You | |
8611 | can even specify multiple identical services as long as their | |
8612 | service_names differ. | |
8613 | ||
3caa16d2 AR |
8614 | To activate a service, use the adaptation_access directive. To group |
8615 | services, use adaptation_service_chain and adaptation_service_set. | |
a22e6cd3 AR |
8616 | |
8617 | Service options are separated by white space. ICAP services support | |
8618 | the following name=value options: | |
8619 | ||
8620 | bypass=on|off|1|0 | |
8621 | If set to 'on' or '1', the ICAP service is treated as | |
8622 | optional. If the service cannot be reached or malfunctions, | |
8623 | Squid will try to ignore any errors and process the message as | |
8624 | if the service was not enabled. No all ICAP errors can be | |
8625 | bypassed. If set to 0, the ICAP service is treated as | |
8626 | essential and all ICAP errors will result in an error page | |
8627 | returned to the HTTP client. | |
8628 | ||
8629 | Bypass is off by default: services are treated as essential. | |
8630 | ||
8631 | routing=on|off|1|0 | |
8632 | If set to 'on' or '1', the ICAP service is allowed to | |
8633 | dynamically change the current message adaptation plan by | |
8634 | returning a chain of services to be used next. The services | |
8635 | are specified using the X-Next-Services ICAP response header | |
8636 | value, formatted as a comma-separated list of service names. | |
e2851fe7 AR |
8637 | Each named service should be configured in squid.conf. Other |
8638 | services are ignored. An empty X-Next-Services value results | |
8639 | in an empty plan which ends the current adaptation. | |
8640 | ||
8641 | Dynamic adaptation plan may cross or cover multiple supported | |
8642 | vectoring points in their natural processing order. | |
a22e6cd3 AR |
8643 | |
8644 | Routing is not allowed by default: the ICAP X-Next-Services | |
8645 | response header is ignored. | |
8646 | ||
e6713f4e AJ |
8647 | ipv6=on|off |
8648 | Only has effect on split-stack systems. The default on those systems | |
8649 | is to use IPv4-only connections. When set to 'on' this option will | |
8650 | make Squid use IPv6-only connections to contact this ICAP service. | |
8651 | ||
2dba5b8e CT |
8652 | on-overload=block|bypass|wait|force |
8653 | If the service Max-Connections limit has been reached, do | |
8654 | one of the following for each new ICAP transaction: | |
8655 | * block: send an HTTP error response to the client | |
8656 | * bypass: ignore the "over-connected" ICAP service | |
8657 | * wait: wait (in a FIFO queue) for an ICAP connection slot | |
8658 | * force: proceed, ignoring the Max-Connections limit | |
8659 | ||
8660 | In SMP mode with N workers, each worker assumes the service | |
8661 | connection limit is Max-Connections/N, even though not all | |
8662 | workers may use a given service. | |
8663 | ||
8664 | The default value is "bypass" if service is bypassable, | |
8665 | otherwise it is set to "wait". | |
8666 | ||
8667 | ||
8668 | max-conn=number | |
8669 | Use the given number as the Max-Connections limit, regardless | |
8670 | of the Max-Connections value given by the service, if any. | |
8671 | ||
88df846b CT |
8672 | connection-encryption=on|off |
8673 | Determines the ICAP service effect on the connections_encrypted | |
8674 | ACL. | |
8675 | ||
8676 | The default is "on" for Secure ICAP services (i.e., those | |
8677 | with the icaps:// service URIs scheme) and "off" for plain ICAP | |
8678 | services. | |
8679 | ||
8680 | Does not affect ICAP connections (e.g., does not turn Secure | |
8681 | ICAP on or off). | |
8682 | ||
4dd2c9d6 | 8683 | ==== ICAPS / TLS OPTIONS ==== |
1b091aec CT |
8684 | |
8685 | These options are used for Secure ICAP (icaps://....) services only. | |
8686 | ||
4dd2c9d6 | 8687 | tls-cert=/path/to/ssl/certificate |
1b091aec CT |
8688 | A client SSL certificate to use when connecting to |
8689 | this icap server. | |
8690 | ||
4dd2c9d6 AJ |
8691 | tls-key=/path/to/ssl/key |
8692 | The private TLS/SSL key corresponding to sslcert above. | |
8693 | If 'tls-key' is not specified 'tls-cert' is assumed to | |
8694 | reference a combined PEM format file containing both the | |
1b091aec CT |
8695 | certificate and the key. |
8696 | ||
4dd2c9d6 | 8697 | tls-cipher=... The list of valid TLS/SSL ciphers to use when connecting |
1b091aec CT |
8698 | to this icap server. |
8699 | ||
1cc44095 AJ |
8700 | tls-min-version=1.N |
8701 | The minimum TLS protocol version to permit. To control | |
8702 | SSLv3 use the ssloptions= parameter. | |
8703 | Supported Values: 1.0 (default), 1.1, 1.2 | |
8704 | ||
4dd2c9d6 | 8705 | tls-options=... Specify various OpenSSL library options: |
1b091aec CT |
8706 | |
8707 | NO_SSLv3 Disallow the use of SSLv3 | |
4dd2c9d6 | 8708 | |
1b091aec CT |
8709 | NO_TLSv1 Disallow the use of TLSv1.0 |
8710 | NO_TLSv1_1 Disallow the use of TLSv1.1 | |
8711 | NO_TLSv1_2 Disallow the use of TLSv1.2 | |
4dd2c9d6 | 8712 | |
1b091aec CT |
8713 | SINGLE_DH_USE |
8714 | Always create a new key when using | |
8715 | temporary/ephemeral DH key exchanges | |
4dd2c9d6 | 8716 | |
1b091aec | 8717 | ALL Enable various bug workarounds |
4dd2c9d6 AJ |
8718 | suggested as "harmless" by OpenSSL |
8719 | Be warned that this reduces SSL/TLS | |
8720 | strength to some attacks. | |
1b091aec CT |
8721 | |
8722 | See the OpenSSL SSL_CTX_set_options documentation for a | |
4dd2c9d6 AJ |
8723 | more complete list. Options relevant only to SSLv2 are |
8724 | not supported. | |
1b091aec | 8725 | |
86a84cc0 AJ |
8726 | tls-cafile= PEM file containing CA certificates to use when verifying |
8727 | the icap server certificate. | |
8728 | Use to specify intermediate CA certificate(s) if not sent | |
8729 | by the server. Or the full CA chain for the server when | |
435c72b0 | 8730 | using the tls-default-ca=off flag. |
86a84cc0 | 8731 | May be repeated to load multiple files. |
1b091aec | 8732 | |
4dd2c9d6 | 8733 | tls-capath=... A directory containing additional CA certificates to |
1b091aec | 8734 | use when verifying the icap server certificate. |
86a84cc0 | 8735 | Requires OpenSSL or LibreSSL. |
1b091aec | 8736 | |
4dd2c9d6 | 8737 | tls-crlfile=... A certificate revocation list file to use when |
1b091aec CT |
8738 | verifying the icap server certificate. |
8739 | ||
4dd2c9d6 | 8740 | tls-flags=... Specify various flags modifying the Squid TLS implementation: |
1b091aec CT |
8741 | |
8742 | DONT_VERIFY_PEER | |
8743 | Accept certificates even if they fail to | |
8744 | verify. | |
1b091aec CT |
8745 | DONT_VERIFY_DOMAIN |
8746 | Don't verify the icap server certificate | |
8747 | matches the server name | |
8748 | ||
435c72b0 AJ |
8749 | tls-default-ca[=off] |
8750 | Whether to use the system Trusted CAs. Default is ON. | |
8b253b83 | 8751 | |
4dd2c9d6 | 8752 | tls-domain= The icap server name as advertised in it's certificate. |
1b091aec CT |
8753 | Used for verifying the correctness of the received icap |
8754 | server certificate. If not specified the icap server | |
8755 | hostname extracted from ICAP URI will be used. | |
8756 | ||
a22e6cd3 AR |
8757 | Older icap_service format without optional named parameters is |
8758 | deprecated but supported for backward compatibility. | |
5473c134 | 8759 | |
5473c134 | 8760 | Example: |
c25c2836 | 8761 | icap_service svcBlocker reqmod_precache icap://icap1.mydomain.net:1344/reqmod bypass=0 |
1b091aec | 8762 | icap_service svcLogger reqmod_precache icaps://icap2.mydomain.net:11344/reqmod routing=on |
cccac0a2 | 8763 | DOC_END |
8764 | ||
5473c134 | 8765 | NAME: icap_class |
8766 | TYPE: icap_class_type | |
8767 | IFDEF: ICAP_CLIENT | |
21a26d31 | 8768 | LOC: none |
5473c134 | 8769 | DEFAULT: none |
cccac0a2 | 8770 | DOC_START |
a22e6cd3 | 8771 | This deprecated option was documented to define an ICAP service |
62c7f90e AR |
8772 | chain, even though it actually defined a set of similar, redundant |
8773 | services, and the chains were not supported. | |
5473c134 | 8774 | |
62c7f90e | 8775 | To define a set of redundant services, please use the |
a22e6cd3 AR |
8776 | adaptation_service_set directive. For service chains, use |
8777 | adaptation_service_chain. | |
cccac0a2 | 8778 | DOC_END |
8779 | ||
5473c134 | 8780 | NAME: icap_access |
8781 | TYPE: icap_access_type | |
8782 | IFDEF: ICAP_CLIENT | |
21a26d31 | 8783 | LOC: none |
cccac0a2 | 8784 | DEFAULT: none |
cccac0a2 | 8785 | DOC_START |
a22e6cd3 | 8786 | This option is deprecated. Please use adaptation_access, which |
62c7f90e AR |
8787 | has the same ICAP functionality, but comes with better |
8788 | documentation, and eCAP support. | |
cccac0a2 | 8789 | DOC_END |
8790 | ||
57afc994 AR |
8791 | COMMENT_START |
8792 | eCAP OPTIONS | |
8793 | ----------------------------------------------------------------------------- | |
8794 | COMMENT_END | |
8795 | ||
21a26d31 AR |
8796 | NAME: ecap_enable |
8797 | TYPE: onoff | |
8798 | IFDEF: USE_ECAP | |
8799 | COMMENT: on|off | |
574b508c | 8800 | LOC: Adaptation::Ecap::TheConfig.onoff |
21a26d31 AR |
8801 | DEFAULT: off |
8802 | DOC_START | |
8803 | Controls whether eCAP support is enabled. | |
8804 | DOC_END | |
8805 | ||
8806 | NAME: ecap_service | |
8807 | TYPE: ecap_service_type | |
8808 | IFDEF: USE_ECAP | |
574b508c | 8809 | LOC: Adaptation::Ecap::TheConfig |
21a26d31 AR |
8810 | DEFAULT: none |
8811 | DOC_START | |
8812 | Defines a single eCAP service | |
8813 | ||
c25c2836 | 8814 | ecap_service id vectoring_point uri [option ...] |
21a26d31 | 8815 | |
c25c2836 CT |
8816 | id: ID |
8817 | an opaque identifier or name which is used to direct traffic to | |
8818 | this specific service. Must be unique among all adaptation | |
8819 | services in squid.conf. | |
8820 | ||
8821 | vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache | |
21a26d31 AR |
8822 | This specifies at which point of transaction processing the |
8823 | eCAP service should be activated. *_postcache vectoring points | |
8824 | are not yet supported. | |
c25c2836 CT |
8825 | |
8826 | uri: ecap://vendor/service_name?custom&cgi=style¶meters=optional | |
8827 | Squid uses the eCAP service URI to match this configuration | |
8828 | line with one of the dynamically loaded services. Each loaded | |
8829 | eCAP service must have a unique URI. Obtain the right URI from | |
8830 | the service provider. | |
8831 | ||
3caa16d2 AR |
8832 | To activate a service, use the adaptation_access directive. To group |
8833 | services, use adaptation_service_chain and adaptation_service_set. | |
c25c2836 CT |
8834 | |
8835 | Service options are separated by white space. eCAP services support | |
8836 | the following name=value options: | |
8837 | ||
8838 | bypass=on|off|1|0 | |
8839 | If set to 'on' or '1', the eCAP service is treated as optional. | |
8840 | If the service cannot be reached or malfunctions, Squid will try | |
8841 | to ignore any errors and process the message as if the service | |
21a26d31 | 8842 | was not enabled. No all eCAP errors can be bypassed. |
c25c2836 CT |
8843 | If set to 'off' or '0', the eCAP service is treated as essential |
8844 | and all eCAP errors will result in an error page returned to the | |
21a26d31 | 8845 | HTTP client. |
c25c2836 CT |
8846 | |
8847 | Bypass is off by default: services are treated as essential. | |
8848 | ||
8849 | routing=on|off|1|0 | |
8850 | If set to 'on' or '1', the eCAP service is allowed to | |
8851 | dynamically change the current message adaptation plan by | |
8852 | returning a chain of services to be used next. | |
8853 | ||
8854 | Dynamic adaptation plan may cross or cover multiple supported | |
8855 | vectoring points in their natural processing order. | |
8856 | ||
8857 | Routing is not allowed by default. | |
8858 | ||
88df846b CT |
8859 | connection-encryption=on|off |
8860 | Determines the eCAP service effect on the connections_encrypted | |
8861 | ACL. | |
8862 | ||
8863 | Defaults to "on", which does not taint the master transaction | |
8864 | w.r.t. that ACL. | |
8865 | ||
8866 | Does not affect eCAP API calls. | |
8867 | ||
c25c2836 CT |
8868 | Older ecap_service format without optional named parameters is |
8869 | deprecated but supported for backward compatibility. | |
8870 | ||
21a26d31 AR |
8871 | |
8872 | Example: | |
c25c2836 CT |
8873 | ecap_service s1 reqmod_precache ecap://filters.R.us/leakDetector?on_error=block bypass=off |
8874 | ecap_service s2 respmod_precache ecap://filters.R.us/virusFilter config=/etc/vf.cfg bypass=on | |
21a26d31 AR |
8875 | DOC_END |
8876 | ||
57afc994 AR |
8877 | NAME: loadable_modules |
8878 | TYPE: wordlist | |
8879 | IFDEF: USE_LOADABLE_MODULES | |
8880 | LOC: Config.loadable_module_names | |
8881 | DEFAULT: none | |
8882 | DOC_START | |
8883 | Instructs Squid to load the specified dynamic module(s) or activate | |
8884 | preloaded module(s). | |
8885 | Example: | |
8886 | loadable_modules @DEFAULT_PREFIX@/lib/MinimalAdapter.so | |
8887 | DOC_END | |
8888 | ||
62c7f90e AR |
8889 | COMMENT_START |
8890 | MESSAGE ADAPTATION OPTIONS | |
8891 | ----------------------------------------------------------------------------- | |
8892 | COMMENT_END | |
8893 | ||
8894 | NAME: adaptation_service_set | |
8895 | TYPE: adaptation_service_set_type | |
8896 | IFDEF: USE_ADAPTATION | |
8897 | LOC: none | |
8898 | DEFAULT: none | |
8899 | DOC_START | |
8900 | ||
a22e6cd3 AR |
8901 | Configures an ordered set of similar, redundant services. This is |
8902 | useful when hot standby or backup adaptation servers are available. | |
8903 | ||
8904 | adaptation_service_set set_name service_name1 service_name2 ... | |
8905 | ||
8906 | The named services are used in the set declaration order. The first | |
8907 | applicable adaptation service from the set is used first. The next | |
8908 | applicable service is tried if and only if the transaction with the | |
8909 | previous service fails and the message waiting to be adapted is still | |
8910 | intact. | |
62c7f90e | 8911 | |
a22e6cd3 AR |
8912 | When adaptation starts, broken services are ignored as if they were |
8913 | not a part of the set. A broken service is a down optional service. | |
62c7f90e | 8914 | |
a22e6cd3 AR |
8915 | The services in a set must be attached to the same vectoring point |
8916 | (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD). | |
8917 | ||
8918 | If all services in a set are optional then adaptation failures are | |
8919 | bypassable. If all services in the set are essential, then a | |
8920 | transaction failure with one service may still be retried using | |
8921 | another service from the set, but when all services fail, the master | |
8922 | transaction fails as well. | |
8923 | ||
8924 | A set may contain a mix of optional and essential services, but that | |
8925 | is likely to lead to surprising results because broken services become | |
8926 | ignored (see above), making previously bypassable failures fatal. | |
8927 | Technically, it is the bypassability of the last failed service that | |
8928 | matters. | |
8929 | ||
8930 | See also: adaptation_access adaptation_service_chain | |
62c7f90e AR |
8931 | |
8932 | Example: | |
8933 | adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup | |
8934 | adaptation service_set svcLogger loggerLocal loggerRemote | |
8935 | DOC_END | |
8936 | ||
a22e6cd3 AR |
8937 | NAME: adaptation_service_chain |
8938 | TYPE: adaptation_service_chain_type | |
8939 | IFDEF: USE_ADAPTATION | |
8940 | LOC: none | |
8941 | DEFAULT: none | |
8942 | DOC_START | |
8943 | ||
8944 | Configures a list of complementary services that will be applied | |
8945 | one-by-one, forming an adaptation chain or pipeline. This is useful | |
8946 | when Squid must perform different adaptations on the same message. | |
8947 | ||
8948 | adaptation_service_chain chain_name service_name1 svc_name2 ... | |
8949 | ||
8950 | The named services are used in the chain declaration order. The first | |
8951 | applicable adaptation service from the chain is used first. The next | |
8952 | applicable service is applied to the successful adaptation results of | |
8953 | the previous service in the chain. | |
8954 | ||
8955 | When adaptation starts, broken services are ignored as if they were | |
8956 | not a part of the chain. A broken service is a down optional service. | |
8957 | ||
8958 | Request satisfaction terminates the adaptation chain because Squid | |
8959 | does not currently allow declaration of RESPMOD services at the | |
8960 | "reqmod_precache" vectoring point (see icap_service or ecap_service). | |
8961 | ||
8962 | The services in a chain must be attached to the same vectoring point | |
8963 | (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD). | |
8964 | ||
8965 | A chain may contain a mix of optional and essential services. If an | |
8966 | essential adaptation fails (or the failure cannot be bypassed for | |
8967 | other reasons), the master transaction fails. Otherwise, the failure | |
8968 | is bypassed as if the failed adaptation service was not in the chain. | |
8969 | ||
8970 | See also: adaptation_access adaptation_service_set | |
8971 | ||
8972 | Example: | |
8973 | adaptation_service_chain svcRequest requestLogger urlFilter leakDetector | |
8974 | DOC_END | |
8975 | ||
62c7f90e AR |
8976 | NAME: adaptation_access |
8977 | TYPE: adaptation_access_type | |
8978 | IFDEF: USE_ADAPTATION | |
8979 | LOC: none | |
8980 | DEFAULT: none | |
638402dd | 8981 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
62c7f90e AR |
8982 | DOC_START |
8983 | Sends an HTTP transaction to an ICAP or eCAP adaptation service. | |
8984 | ||
8985 | adaptation_access service_name allow|deny [!]aclname... | |
8986 | adaptation_access set_name allow|deny [!]aclname... | |
8987 | ||
8988 | At each supported vectoring point, the adaptation_access | |
8989 | statements are processed in the order they appear in this | |
8990 | configuration file. Statements pointing to the following services | |
8991 | are ignored (i.e., skipped without checking their ACL): | |
8992 | ||
8993 | - services serving different vectoring points | |
8994 | - "broken-but-bypassable" services | |
8995 | - "up" services configured to ignore such transactions | |
8996 | (e.g., based on the ICAP Transfer-Ignore header). | |
8997 | ||
8998 | When a set_name is used, all services in the set are checked | |
8999 | using the same rules, to find the first applicable one. See | |
9000 | adaptation_service_set for details. | |
9001 | ||
9002 | If an access list is checked and there is a match, the | |
9003 | processing stops: For an "allow" rule, the corresponding | |
9004 | adaptation service is used for the transaction. For a "deny" | |
9005 | rule, no adaptation service is activated. | |
9006 | ||
9007 | It is currently not possible to apply more than one adaptation | |
9008 | service at the same vectoring point to the same HTTP transaction. | |
9009 | ||
9010 | See also: icap_service and ecap_service | |
9011 | ||
9012 | Example: | |
9013 | adaptation_access service_1 allow all | |
9014 | DOC_END | |
9015 | ||
a22e6cd3 AR |
9016 | NAME: adaptation_service_iteration_limit |
9017 | TYPE: int | |
9018 | IFDEF: USE_ADAPTATION | |
9019 | LOC: Adaptation::Config::service_iteration_limit | |
9020 | DEFAULT: 16 | |
9021 | DOC_START | |
9022 | Limits the number of iterations allowed when applying adaptation | |
9023 | services to a message. If your longest adaptation set or chain | |
9024 | may have more than 16 services, increase the limit beyond its | |
9025 | default value of 16. If detecting infinite iteration loops sooner | |
9026 | is critical, make the iteration limit match the actual number | |
9027 | of services in your longest adaptation set or chain. | |
9028 | ||
9029 | Infinite adaptation loops are most likely with routing services. | |
9030 | ||
9031 | See also: icap_service routing=1 | |
9032 | DOC_END | |
9033 | ||
3ff65596 AR |
9034 | NAME: adaptation_masterx_shared_names |
9035 | TYPE: string | |
9036 | IFDEF: USE_ADAPTATION | |
9037 | LOC: Adaptation::Config::masterx_shared_name | |
9038 | DEFAULT: none | |
9039 | DOC_START | |
9040 | For each master transaction (i.e., the HTTP request and response | |
9041 | sequence, including all related ICAP and eCAP exchanges), Squid | |
9042 | maintains a table of metadata. The table entries are (name, value) | |
9043 | pairs shared among eCAP and ICAP exchanges. The table is destroyed | |
9044 | with the master transaction. | |
9045 | ||
9046 | This option specifies the table entry names that Squid must accept | |
9047 | from and forward to the adaptation transactions. | |
9048 | ||
9049 | An ICAP REQMOD or RESPMOD transaction may set an entry in the | |
9050 | shared table by returning an ICAP header field with a name | |
6666da11 AR |
9051 | specified in adaptation_masterx_shared_names. |
9052 | ||
9053 | An eCAP REQMOD or RESPMOD transaction may set an entry in the | |
9054 | shared table by implementing the libecap::visitEachOption() API | |
9055 | to provide an option with a name specified in | |
9056 | adaptation_masterx_shared_names. | |
5038f9d8 AR |
9057 | |
9058 | Squid will store and forward the set entry to subsequent adaptation | |
3ff65596 AR |
9059 | transactions within the same master transaction scope. |
9060 | ||
9061 | Only one shared entry name is supported at this time. | |
9062 | ||
9063 | Example: | |
9064 | # share authentication information among ICAP services | |
9065 | adaptation_masterx_shared_names X-Subscriber-ID | |
9066 | DOC_END | |
9067 | ||
71be37e0 | 9068 | NAME: adaptation_meta |
d7f4a0b7 | 9069 | TYPE: note |
71be37e0 CT |
9070 | IFDEF: USE_ADAPTATION |
9071 | LOC: Adaptation::Config::metaHeaders | |
9072 | DEFAULT: none | |
9073 | DOC_START | |
9074 | This option allows Squid administrator to add custom ICAP request | |
9075 | headers or eCAP options to Squid ICAP requests or eCAP transactions. | |
9076 | Use it to pass custom authentication tokens and other | |
9077 | transaction-state related meta information to an ICAP/eCAP service. | |
9078 | ||
9079 | The addition of a meta header is ACL-driven: | |
9080 | adaptation_meta name value [!]aclname ... | |
9081 | ||
9082 | Processing for a given header name stops after the first ACL list match. | |
9083 | Thus, it is impossible to add two headers with the same name. If no ACL | |
9084 | lists match for a given header name, no such header is added. For | |
9085 | example: | |
9086 | ||
9087 | # do not debug transactions except for those that need debugging | |
9088 | adaptation_meta X-Debug 1 needs_debugging | |
9089 | ||
9090 | # log all transactions except for those that must remain secret | |
9091 | adaptation_meta X-Log 1 !keep_secret | |
9092 | ||
9093 | # mark transactions from users in the "G 1" group | |
9094 | adaptation_meta X-Authenticated-Groups "G 1" authed_as_G1 | |
9095 | ||
9096 | The "value" parameter may be a regular squid.conf token or a "double | |
9097 | quoted string". Within the quoted string, use backslash (\) to escape | |
9098 | any character, which is currently only useful for escaping backslashes | |
9099 | and double quotes. For example, | |
9100 | "this string has one backslash (\\) and two \"quotes\"" | |
d7f4a0b7 CT |
9101 | |
9102 | Used adaptation_meta header values may be logged via %note | |
9103 | logformat code. If multiple adaptation_meta headers with the same name | |
9104 | are used during master transaction lifetime, the header values are | |
9105 | logged in the order they were used and duplicate values are ignored | |
9106 | (only the first repeated value will be logged). | |
71be37e0 CT |
9107 | DOC_END |
9108 | ||
3ff65596 AR |
9109 | NAME: icap_retry |
9110 | TYPE: acl_access | |
9111 | IFDEF: ICAP_CLIENT | |
9112 | LOC: Adaptation::Icap::TheConfig.repeat | |
3ff65596 AR |
9113 | DEFAULT_IF_NONE: deny all |
9114 | DOC_START | |
9115 | This ACL determines which retriable ICAP transactions are | |
9116 | retried. Transactions that received a complete ICAP response | |
9117 | and did not have to consume or produce HTTP bodies to receive | |
9118 | that response are usually retriable. | |
9119 | ||
9120 | icap_retry allow|deny [!]aclname ... | |
9121 | ||
9122 | Squid automatically retries some ICAP I/O timeouts and errors | |
9123 | due to persistent connection race conditions. | |
9124 | ||
9125 | See also: icap_retry_limit | |
9126 | DOC_END | |
9127 | ||
9128 | NAME: icap_retry_limit | |
9129 | TYPE: int | |
9130 | IFDEF: ICAP_CLIENT | |
9131 | LOC: Adaptation::Icap::TheConfig.repeat_limit | |
9132 | DEFAULT: 0 | |
638402dd | 9133 | DEFAULT_DOC: No retries are allowed. |
3ff65596 | 9134 | DOC_START |
638402dd | 9135 | Limits the number of retries allowed. |
3ff65596 AR |
9136 | |
9137 | Communication errors due to persistent connection race | |
9138 | conditions are unavoidable, automatically retried, and do not | |
9139 | count against this limit. | |
9140 | ||
9141 | See also: icap_retry | |
9142 | DOC_END | |
9143 | ||
9144 | ||
5473c134 | 9145 | COMMENT_START |
9146 | DNS OPTIONS | |
9147 | ----------------------------------------------------------------------------- | |
9148 | COMMENT_END | |
9149 | ||
9150 | NAME: check_hostnames | |
cccac0a2 | 9151 | TYPE: onoff |
cccac0a2 | 9152 | DEFAULT: off |
5473c134 | 9153 | LOC: Config.onoff.check_hostnames |
cccac0a2 | 9154 | DOC_START |
5473c134 | 9155 | For security and stability reasons Squid can check |
9156 | hostnames for Internet standard RFC compliance. If you want | |
9157 | Squid to perform these checks turn this directive on. | |
cccac0a2 | 9158 | DOC_END |
9159 | ||
5473c134 | 9160 | NAME: allow_underscore |
cccac0a2 | 9161 | TYPE: onoff |
cccac0a2 | 9162 | DEFAULT: on |
5473c134 | 9163 | LOC: Config.onoff.allow_underscore |
cccac0a2 | 9164 | DOC_START |
5473c134 | 9165 | Underscore characters is not strictly allowed in Internet hostnames |
9166 | but nevertheless used by many sites. Set this to off if you want | |
9167 | Squid to be strict about the standard. | |
9168 | This check is performed only when check_hostnames is set to on. | |
cccac0a2 | 9169 | DOC_END |
9170 | ||
5473c134 | 9171 | NAME: dns_retransmit_interval |
fd0f51c4 | 9172 | TYPE: time_msec |
5473c134 | 9173 | DEFAULT: 5 seconds |
9174 | LOC: Config.Timeout.idns_retransmit | |
cccac0a2 | 9175 | DOC_START |
5473c134 | 9176 | Initial retransmit interval for DNS queries. The interval is |
9177 | doubled each time all configured DNS servers have been tried. | |
cccac0a2 | 9178 | DOC_END |
9179 | ||
5473c134 | 9180 | NAME: dns_timeout |
fd0f51c4 | 9181 | TYPE: time_msec |
a541c34e | 9182 | DEFAULT: 30 seconds |
5473c134 | 9183 | LOC: Config.Timeout.idns_query |
cccac0a2 | 9184 | DOC_START |
5473c134 | 9185 | DNS Query timeout. If no response is received to a DNS query |
9186 | within this time all DNS servers for the queried domain | |
9187 | are assumed to be unavailable. | |
cccac0a2 | 9188 | DOC_END |
9189 | ||
e210930b AJ |
9190 | NAME: dns_packet_max |
9191 | TYPE: b_ssize_t | |
638402dd | 9192 | DEFAULT_DOC: EDNS disabled |
e210930b AJ |
9193 | DEFAULT: none |
9194 | LOC: Config.dns.packet_max | |
e210930b AJ |
9195 | DOC_START |
9196 | Maximum number of bytes packet size to advertise via EDNS. | |
9197 | Set to "none" to disable EDNS large packet support. | |
9198 | ||
9199 | For legacy reasons DNS UDP replies will default to 512 bytes which | |
9200 | is too small for many responses. EDNS provides a means for Squid to | |
9201 | negotiate receiving larger responses back immediately without having | |
9202 | to failover with repeat requests. Responses larger than this limit | |
9203 | will retain the old behaviour of failover to TCP DNS. | |
9204 | ||
9205 | Squid has no real fixed limit internally, but allowing packet sizes | |
9206 | over 1500 bytes requires network jumbogram support and is usually not | |
9207 | necessary. | |
9208 | ||
9209 | WARNING: The RFC also indicates that some older resolvers will reply | |
9210 | with failure of the whole request if the extension is added. Some | |
9211 | resolvers have already been identified which will reply with mangled | |
9212 | EDNS response on occasion. Usually in response to many-KB jumbogram | |
9213 | sizes being advertised by Squid. | |
9214 | Squid will currently treat these both as an unable-to-resolve domain | |
9215 | even if it would be resolvable without EDNS. | |
9216 | DOC_END | |
9217 | ||
5473c134 | 9218 | NAME: dns_defnames |
9219 | COMMENT: on|off | |
cccac0a2 | 9220 | TYPE: onoff |
cccac0a2 | 9221 | DEFAULT: off |
638402dd | 9222 | DEFAULT_DOC: Search for single-label domain names is disabled. |
5473c134 | 9223 | LOC: Config.onoff.res_defnames |
cccac0a2 | 9224 | DOC_START |
5473c134 | 9225 | Normally the RES_DEFNAMES resolver option is disabled |
9226 | (see res_init(3)). This prevents caches in a hierarchy | |
9227 | from interpreting single-component hostnames locally. To allow | |
9228 | Squid to handle single-component names, enable this option. | |
cccac0a2 | 9229 | DOC_END |
9230 | ||
bce61b00 AJ |
9231 | NAME: dns_multicast_local |
9232 | COMMENT: on|off | |
9233 | TYPE: onoff | |
9234 | DEFAULT: off | |
9235 | DEFAULT_DOC: Search for .local and .arpa names is disabled. | |
9236 | LOC: Config.onoff.dns_mdns | |
9237 | DOC_START | |
9238 | When set to on, Squid sends multicast DNS lookups on the local | |
9239 | network for domains ending in .local and .arpa. | |
9240 | This enables local servers and devices to be contacted in an | |
9241 | ad-hoc or zero-configuration network environment. | |
9242 | DOC_END | |
9243 | ||
5473c134 | 9244 | NAME: dns_nameservers |
9245 | TYPE: wordlist | |
9246 | DEFAULT: none | |
638402dd | 9247 | DEFAULT_DOC: Use operating system definitions |
5473c134 | 9248 | LOC: Config.dns_nameservers |
cccac0a2 | 9249 | DOC_START |
5473c134 | 9250 | Use this if you want to specify a list of DNS name servers |
9251 | (IP addresses) to use instead of those given in your | |
9252 | /etc/resolv.conf file. | |
638402dd | 9253 | |
5473c134 | 9254 | On Windows platforms, if no value is specified here or in |
9255 | the /etc/resolv.conf file, the list of DNS name servers are | |
9256 | taken from the Windows registry, both static and dynamic DHCP | |
9257 | configurations are supported. | |
cccac0a2 | 9258 | |
5473c134 | 9259 | Example: dns_nameservers 10.0.0.1 192.172.0.4 |
cccac0a2 | 9260 | DOC_END |
9261 | ||
5473c134 | 9262 | NAME: hosts_file |
cccac0a2 | 9263 | TYPE: string |
5473c134 | 9264 | DEFAULT: @DEFAULT_HOSTS@ |
9265 | LOC: Config.etcHostsPath | |
cccac0a2 | 9266 | DOC_START |
5473c134 | 9267 | Location of the host-local IP name-address associations |
9268 | database. Most Operating Systems have such a file on different | |
9269 | default locations: | |
9270 | - Un*X & Linux: /etc/hosts | |
9271 | - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts | |
9272 | (%SystemRoot% value install default is c:\winnt) | |
9273 | - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts | |
9274 | (%SystemRoot% value install default is c:\windows) | |
9275 | - Windows 9x/Me: %windir%\hosts | |
9276 | (%windir% value is usually c:\windows) | |
9277 | - Cygwin: /etc/hosts | |
cccac0a2 | 9278 | |
5473c134 | 9279 | The file contains newline-separated definitions, in the |
9280 | form ip_address_in_dotted_form name [name ...] names are | |
9281 | whitespace-separated. Lines beginning with an hash (#) | |
9282 | character are comments. | |
cccac0a2 | 9283 | |
5473c134 | 9284 | The file is checked at startup and upon configuration. |
9285 | If set to 'none', it won't be checked. | |
9286 | If append_domain is used, that domain will be added to | |
9287 | domain-local (i.e. not containing any dot character) host | |
9288 | definitions. | |
cccac0a2 | 9289 | DOC_END |
9290 | ||
5473c134 | 9291 | NAME: append_domain |
9292 | TYPE: string | |
9293 | LOC: Config.appendDomain | |
9294 | DEFAULT: none | |
638402dd | 9295 | DEFAULT_DOC: Use operating system definitions |
6a2f3fcf | 9296 | DOC_START |
5473c134 | 9297 | Appends local domain name to hostnames without any dots in |
9298 | them. append_domain must begin with a period. | |
9299 | ||
9300 | Be warned there are now Internet names with no dots in | |
9301 | them using only top-domain names, so setting this may | |
9302 | cause some Internet sites to become unavailable. | |
9303 | ||
9304 | Example: | |
9305 | append_domain .yourdomain.com | |
6a2f3fcf | 9306 | DOC_END |
9307 | ||
5473c134 | 9308 | NAME: ignore_unknown_nameservers |
9309 | TYPE: onoff | |
9310 | LOC: Config.onoff.ignore_unknown_nameservers | |
df6fd596 | 9311 | DEFAULT: on |
9312 | DOC_START | |
5473c134 | 9313 | By default Squid checks that DNS responses are received |
9314 | from the same IP addresses they are sent to. If they | |
9315 | don't match, Squid ignores the response and writes a warning | |
9316 | message to cache.log. You can allow responses from unknown | |
9317 | nameservers by setting this option to 'off'. | |
df6fd596 | 9318 | DOC_END |
9319 | ||
5a0da9ec AJ |
9320 | NAME: dns_v4_first |
9321 | TYPE: onoff | |
9322 | DEFAULT: off | |
9323 | LOC: Config.dns.v4_first | |
5a0da9ec AJ |
9324 | DOC_START |
9325 | With the IPv6 Internet being as fast or faster than IPv4 Internet | |
9326 | for most networks Squid prefers to contact websites over IPv6. | |
9327 | ||
9328 | This option reverses the order of preference to make Squid contact | |
9329 | dual-stack websites over IPv4 first. Squid will still perform both | |
9330 | IPv6 and IPv4 DNS lookups before connecting. | |
9331 | ||
9332 | WARNING: | |
9333 | This option will restrict the situations under which IPv6 | |
9334 | connectivity is used (and tested). Hiding network problems | |
9335 | which would otherwise be detected and warned about. | |
9336 | DOC_END | |
9337 | ||
6bc15a4f | 9338 | NAME: ipcache_size |
9339 | COMMENT: (number of entries) | |
9340 | TYPE: int | |
9341 | DEFAULT: 1024 | |
9342 | LOC: Config.ipcache.size | |
638402dd AJ |
9343 | DOC_START |
9344 | Maximum number of DNS IP cache entries. | |
9345 | DOC_END | |
6bc15a4f | 9346 | |
9347 | NAME: ipcache_low | |
9348 | COMMENT: (percent) | |
9349 | TYPE: int | |
9350 | DEFAULT: 90 | |
9351 | LOC: Config.ipcache.low | |
9352 | DOC_NONE | |
9353 | ||
9354 | NAME: ipcache_high | |
9355 | COMMENT: (percent) | |
9356 | TYPE: int | |
9357 | DEFAULT: 95 | |
9358 | LOC: Config.ipcache.high | |
9359 | DOC_START | |
9360 | The size, low-, and high-water marks for the IP cache. | |
9361 | DOC_END | |
9362 | ||
9363 | NAME: fqdncache_size | |
9364 | COMMENT: (number of entries) | |
9365 | TYPE: int | |
9366 | DEFAULT: 1024 | |
9367 | LOC: Config.fqdncache.size | |
9368 | DOC_START | |
9369 | Maximum number of FQDN cache entries. | |
9370 | DOC_END | |
9371 | ||
a58ff010 | 9372 | COMMENT_START |
5473c134 | 9373 | MISCELLANEOUS |
a58ff010 | 9374 | ----------------------------------------------------------------------------- |
9375 | COMMENT_END | |
9376 | ||
2eceb328 CT |
9377 | NAME: configuration_includes_quoted_values |
9378 | COMMENT: on|off | |
bde7a8ce CT |
9379 | TYPE: configuration_includes_quoted_values |
9380 | DEFAULT: off | |
2eceb328 CT |
9381 | LOC: ConfigParser::RecognizeQuotedValues |
9382 | DOC_START | |
9383 | If set, Squid will recognize each "quoted string" after a configuration | |
9384 | directive as a single parameter. The quotes are stripped before the | |
9385 | parameter value is interpreted or used. | |
9386 | See "Values with spaces, quotes, and other special characters" | |
9387 | section for more details. | |
9388 | DOC_END | |
9389 | ||
5473c134 | 9390 | NAME: memory_pools |
a58ff010 | 9391 | COMMENT: on|off |
5473c134 | 9392 | TYPE: onoff |
9393 | DEFAULT: on | |
9394 | LOC: Config.onoff.mem_pools | |
a58ff010 | 9395 | DOC_START |
5473c134 | 9396 | If set, Squid will keep pools of allocated (but unused) memory |
9397 | available for future use. If memory is a premium on your | |
9398 | system and you believe your malloc library outperforms Squid | |
9399 | routines, disable this. | |
a58ff010 | 9400 | DOC_END |
9401 | ||
5473c134 | 9402 | NAME: memory_pools_limit |
9403 | COMMENT: (bytes) | |
70be1349 | 9404 | TYPE: b_int64_t |
5473c134 | 9405 | DEFAULT: 5 MB |
9406 | LOC: Config.MemPools.limit | |
ec1245f8 | 9407 | DOC_START |
5473c134 | 9408 | Used only with memory_pools on: |
9409 | memory_pools_limit 50 MB | |
ec1245f8 | 9410 | |
5473c134 | 9411 | If set to a non-zero value, Squid will keep at most the specified |
9412 | limit of allocated (but unused) memory in memory pools. All free() | |
9413 | requests that exceed this limit will be handled by your malloc | |
9414 | library. Squid does not pre-allocate any memory, just safe-keeps | |
9415 | objects that otherwise would be free()d. Thus, it is safe to set | |
9416 | memory_pools_limit to a reasonably high value even if your | |
9417 | configuration will use less memory. | |
ec1245f8 | 9418 | |
89646bd7 | 9419 | If set to none, Squid will keep all memory it can. That is, there |
5473c134 | 9420 | will be no limit on the total amount of memory used for safe-keeping. |
ec1245f8 | 9421 | |
5473c134 | 9422 | To disable memory allocation optimization, do not set |
70be1349 | 9423 | memory_pools_limit to 0 or none. Set memory_pools to "off" instead. |
5473c134 | 9424 | |
9425 | An overhead for maintaining memory pools is not taken into account | |
9426 | when the limit is checked. This overhead is close to four bytes per | |
9427 | object kept. However, pools may actually _save_ memory because of | |
9428 | reduced memory thrashing in your malloc library. | |
ec1245f8 | 9429 | DOC_END |
9430 | ||
5473c134 | 9431 | NAME: forwarded_for |
67c06f0d AJ |
9432 | COMMENT: on|off|transparent|truncate|delete |
9433 | TYPE: string | |
5473c134 | 9434 | DEFAULT: on |
9435 | LOC: opt_forwarded_for | |
5f8252d2 | 9436 | DOC_START |
67c06f0d AJ |
9437 | If set to "on", Squid will append your client's IP address |
9438 | in the HTTP requests it forwards. By default it looks like: | |
5f8252d2 | 9439 | |
5473c134 | 9440 | X-Forwarded-For: 192.1.2.3 |
9441 | ||
67c06f0d | 9442 | If set to "off", it will appear as |
5473c134 | 9443 | |
9444 | X-Forwarded-For: unknown | |
67c06f0d AJ |
9445 | |
9446 | If set to "transparent", Squid will not alter the | |
9447 | X-Forwarded-For header in any way. | |
9448 | ||
9449 | If set to "delete", Squid will delete the entire | |
9450 | X-Forwarded-For header. | |
9451 | ||
9452 | If set to "truncate", Squid will remove all existing | |
dd68402f | 9453 | X-Forwarded-For entries, and place the client IP as the sole entry. |
5f8252d2 | 9454 | DOC_END |
9455 | ||
5473c134 | 9456 | NAME: cachemgr_passwd |
9457 | TYPE: cachemgrpasswd | |
9458 | DEFAULT: none | |
638402dd | 9459 | DEFAULT_DOC: No password. Actions which require password are denied. |
5473c134 | 9460 | LOC: Config.passwd_list |
5f8252d2 | 9461 | DOC_START |
5473c134 | 9462 | Specify passwords for cachemgr operations. |
5f8252d2 | 9463 | |
5473c134 | 9464 | Usage: cachemgr_passwd password action action ... |
9465 | ||
9466 | Some valid actions are (see cache manager menu for a full list): | |
9467 | 5min | |
9468 | 60min | |
9469 | asndb | |
9470 | authenticator | |
9471 | cbdata | |
9472 | client_list | |
9473 | comm_incoming | |
9474 | config * | |
9475 | counters | |
9476 | delay | |
9477 | digest_stats | |
9478 | dns | |
9479 | events | |
9480 | filedescriptors | |
9481 | fqdncache | |
9482 | histograms | |
9483 | http_headers | |
9484 | info | |
9485 | io | |
9486 | ipcache | |
9487 | mem | |
9488 | menu | |
9489 | netdb | |
9490 | non_peers | |
9491 | objects | |
9492 | offline_toggle * | |
9493 | pconn | |
9494 | peer_select | |
b360c477 | 9495 | reconfigure * |
5473c134 | 9496 | redirector |
9497 | refresh | |
9498 | server_list | |
9499 | shutdown * | |
9500 | store_digest | |
9501 | storedir | |
9502 | utilization | |
9503 | via_headers | |
9504 | vm_objects | |
9505 | ||
9506 | * Indicates actions which will not be performed without a | |
9507 | valid password, others can be performed if not listed here. | |
9508 | ||
9509 | To disable an action, set the password to "disable". | |
9510 | To allow performing an action without a password, set the | |
9511 | password to "none". | |
9512 | ||
9513 | Use the keyword "all" to set the same password for all actions. | |
9514 | ||
9515 | Example: | |
9516 | cachemgr_passwd secret shutdown | |
9517 | cachemgr_passwd lesssssssecret info stats/objects | |
9518 | cachemgr_passwd disable all | |
5f8252d2 | 9519 | DOC_END |
9520 | ||
5473c134 | 9521 | NAME: client_db |
a58ff010 | 9522 | COMMENT: on|off |
5473c134 | 9523 | TYPE: onoff |
9524 | DEFAULT: on | |
9525 | LOC: Config.onoff.client_db | |
a58ff010 | 9526 | DOC_START |
5473c134 | 9527 | If you want to disable collecting per-client statistics, |
9528 | turn off client_db here. | |
a58ff010 | 9529 | DOC_END |
9530 | ||
5473c134 | 9531 | NAME: refresh_all_ims |
9532 | COMMENT: on|off | |
9533 | TYPE: onoff | |
9534 | DEFAULT: off | |
9535 | LOC: Config.onoff.refresh_all_ims | |
a58ff010 | 9536 | DOC_START |
5473c134 | 9537 | When you enable this option, squid will always check |
9538 | the origin server for an update when a client sends an | |
9539 | If-Modified-Since request. Many browsers use IMS | |
9540 | requests when the user requests a reload, and this | |
9541 | ensures those clients receive the latest version. | |
a58ff010 | 9542 | |
5473c134 | 9543 | By default (off), squid may return a Not Modified response |
9544 | based on the age of the cached version. | |
78e8cfc4 | 9545 | DOC_END |
9546 | ||
5473c134 | 9547 | NAME: reload_into_ims |
626096be | 9548 | IFDEF: USE_HTTP_VIOLATIONS |
12b91c99 | 9549 | COMMENT: on|off |
5473c134 | 9550 | TYPE: onoff |
9551 | DEFAULT: off | |
9552 | LOC: Config.onoff.reload_into_ims | |
12b91c99 | 9553 | DOC_START |
5473c134 | 9554 | When you enable this option, client no-cache or ``reload'' |
9555 | requests will be changed to If-Modified-Since requests. | |
9556 | Doing this VIOLATES the HTTP standard. Enabling this | |
9557 | feature could make you liable for problems which it | |
9558 | causes. | |
9559 | ||
9560 | see also refresh_pattern for a more selective approach. | |
12b91c99 | 9561 | DOC_END |
9562 | ||
31ef19cd | 9563 | NAME: connect_retries |
5473c134 | 9564 | TYPE: int |
31ef19cd AJ |
9565 | LOC: Config.connect_retries |
9566 | DEFAULT: 0 | |
638402dd | 9567 | DEFAULT_DOC: Do not retry failed connections. |
a58ff010 | 9568 | DOC_START |
aed188fd AJ |
9569 | This sets the maximum number of connection attempts made for each |
9570 | TCP connection. The connect_retries attempts must all still | |
9571 | complete within the connection timeout period. | |
31ef19cd AJ |
9572 | |
9573 | The default is not to re-try if the first connection attempt fails. | |
9574 | The (not recommended) maximum is 10 tries. | |
5473c134 | 9575 | |
31ef19cd AJ |
9576 | A warning message will be generated if it is set to a too-high |
9577 | value and the configured value will be over-ridden. | |
5473c134 | 9578 | |
31ef19cd AJ |
9579 | Note: These re-tries are in addition to forward_max_tries |
9580 | which limit how many different addresses may be tried to find | |
9581 | a useful server. | |
a58ff010 | 9582 | DOC_END |
9583 | ||
5473c134 | 9584 | NAME: retry_on_error |
a58ff010 | 9585 | TYPE: onoff |
5473c134 | 9586 | LOC: Config.retry.onerror |
a58ff010 | 9587 | DEFAULT: off |
9588 | DOC_START | |
aea8548b AJ |
9589 | If set to ON Squid will automatically retry requests when |
9590 | receiving an error response with status 403 (Forbidden), | |
9591 | 500 (Internal Error), 501 or 503 (Service not available). | |
9592 | Status 502 and 504 (Gateway errors) are always retried. | |
9593 | ||
9594 | This is mainly useful if you are in a complex cache hierarchy to | |
9595 | work around access control errors. | |
9596 | ||
9597 | NOTE: This retry will attempt to find another working destination. | |
9598 | Which is different from the server which just failed. | |
5f8252d2 | 9599 | DOC_END |
9600 | ||
5473c134 | 9601 | NAME: as_whois_server |
5f8252d2 | 9602 | TYPE: string |
5473c134 | 9603 | LOC: Config.as_whois_server |
9604 | DEFAULT: whois.ra.net | |
5f8252d2 | 9605 | DOC_START |
5473c134 | 9606 | WHOIS server to query for AS numbers. NOTE: AS numbers are |
9607 | queried only when Squid starts up, not for every request. | |
5f8252d2 | 9608 | DOC_END |
9609 | ||
5473c134 | 9610 | NAME: offline_mode |
5f8252d2 | 9611 | TYPE: onoff |
5473c134 | 9612 | LOC: Config.onoff.offline |
5f8252d2 | 9613 | DEFAULT: off |
9614 | DOC_START | |
5473c134 | 9615 | Enable this option and Squid will never try to validate cached |
9616 | objects. | |
a58ff010 | 9617 | DOC_END |
9618 | ||
5473c134 | 9619 | NAME: uri_whitespace |
9620 | TYPE: uri_whitespace | |
9621 | LOC: Config.uri_whitespace | |
9622 | DEFAULT: strip | |
a58ff010 | 9623 | DOC_START |
5473c134 | 9624 | What to do with requests that have whitespace characters in the |
9625 | URI. Options: | |
a58ff010 | 9626 | |
5473c134 | 9627 | strip: The whitespace characters are stripped out of the URL. |
82806837 AJ |
9628 | This is the behavior recommended by RFC2396 and RFC3986 |
9629 | for tolerant handling of generic URI. | |
9630 | NOTE: This is one difference between generic URI and HTTP URLs. | |
9631 | ||
5473c134 | 9632 | deny: The request is denied. The user receives an "Invalid |
9633 | Request" message. | |
82806837 AJ |
9634 | This is the behaviour recommended by RFC2616 for safe |
9635 | handling of HTTP request URL. | |
9636 | ||
5473c134 | 9637 | allow: The request is allowed and the URI is not changed. The |
9638 | whitespace characters remain in the URI. Note the | |
9639 | whitespace is passed to redirector processes if they | |
9640 | are in use. | |
82806837 AJ |
9641 | Note this may be considered a violation of RFC2616 |
9642 | request parsing where whitespace is prohibited in the | |
9643 | URL field. | |
9644 | ||
5473c134 | 9645 | encode: The request is allowed and the whitespace characters are |
82806837 AJ |
9646 | encoded according to RFC1738. |
9647 | ||
5473c134 | 9648 | chop: The request is allowed and the URI is chopped at the |
82806837 AJ |
9649 | first whitespace. |
9650 | ||
9651 | ||
9652 | NOTE the current Squid implementation of encode and chop violates | |
9653 | RFC2616 by not using a 301 redirect after altering the URL. | |
5473c134 | 9654 | DOC_END |
a58ff010 | 9655 | |
5473c134 | 9656 | NAME: chroot |
9657 | TYPE: string | |
9658 | LOC: Config.chroot_dir | |
a58ff010 | 9659 | DEFAULT: none |
9660 | DOC_START | |
9f37c18a | 9661 | Specifies a directory where Squid should do a chroot() while |
2d89f399 HN |
9662 | initializing. This also causes Squid to fully drop root |
9663 | privileges after initializing. This means, for example, if you | |
9664 | use a HTTP port less than 1024 and try to reconfigure, you may | |
9665 | get an error saying that Squid can not open the port. | |
5473c134 | 9666 | DOC_END |
a58ff010 | 9667 | |
5473c134 | 9668 | NAME: balance_on_multiple_ip |
9669 | TYPE: onoff | |
9670 | LOC: Config.onoff.balance_on_multiple_ip | |
cc192b50 | 9671 | DEFAULT: off |
5473c134 | 9672 | DOC_START |
cc192b50 | 9673 | Modern IP resolvers in squid sort lookup results by preferred access. |
9674 | By default squid will use these IP in order and only rotates to | |
9675 | the next listed when the most preffered fails. | |
9676 | ||
5473c134 | 9677 | Some load balancing servers based on round robin DNS have been |
9678 | found not to preserve user session state across requests | |
9679 | to different IP addresses. | |
a58ff010 | 9680 | |
cc192b50 | 9681 | Enabling this directive Squid rotates IP's per request. |
a58ff010 | 9682 | DOC_END |
9683 | ||
5473c134 | 9684 | NAME: pipeline_prefetch |
079a8480 AJ |
9685 | TYPE: pipelinePrefetch |
9686 | LOC: Config.pipeline_max_prefetch | |
9687 | DEFAULT: 0 | |
9688 | DEFAULT_DOC: Do not pre-parse pipelined requests. | |
a58ff010 | 9689 | DOC_START |
079a8480 AJ |
9690 | HTTP clients may send a pipeline of 1+N requests to Squid using a |
9691 | single connection, without waiting for Squid to respond to the first | |
9692 | of those requests. This option limits the number of concurrent | |
9693 | requests Squid will try to handle in parallel. If set to N, Squid | |
9694 | will try to receive and process up to 1+N requests on the same | |
9695 | connection concurrently. | |
a58ff010 | 9696 | |
079a8480 | 9697 | Defaults to 0 (off) for bandwidth management and access logging |
5473c134 | 9698 | reasons. |
a0e23afd | 9699 | |
079a8480 AJ |
9700 | NOTE: pipelining requires persistent connections to clients. |
9701 | ||
a0e23afd | 9702 | WARNING: pipelining breaks NTLM and Negotiate/Kerberos authentication. |
5473c134 | 9703 | DOC_END |
a58ff010 | 9704 | |
5473c134 | 9705 | NAME: high_response_time_warning |
9706 | TYPE: int | |
9707 | COMMENT: (msec) | |
9708 | LOC: Config.warnings.high_rptm | |
9709 | DEFAULT: 0 | |
638402dd | 9710 | DEFAULT_DOC: disabled. |
5473c134 | 9711 | DOC_START |
9712 | If the one-minute median response time exceeds this value, | |
9713 | Squid prints a WARNING with debug level 0 to get the | |
9714 | administrators attention. The value is in milliseconds. | |
a58ff010 | 9715 | DOC_END |
9716 | ||
5473c134 | 9717 | NAME: high_page_fault_warning |
9718 | TYPE: int | |
9719 | LOC: Config.warnings.high_pf | |
9720 | DEFAULT: 0 | |
638402dd | 9721 | DEFAULT_DOC: disabled. |
cc9f92d4 | 9722 | DOC_START |
5473c134 | 9723 | If the one-minute average page fault rate exceeds this |
9724 | value, Squid prints a WARNING with debug level 0 to get | |
9725 | the administrators attention. The value is in page faults | |
9726 | per second. | |
9727 | DOC_END | |
cc9f92d4 | 9728 | |
5473c134 | 9729 | NAME: high_memory_warning |
9730 | TYPE: b_size_t | |
9731 | LOC: Config.warnings.high_memory | |
f2228f3b | 9732 | IFDEF: HAVE_MSTATS&&HAVE_GNUMALLOC_H |
904971da | 9733 | DEFAULT: 0 KB |
638402dd | 9734 | DEFAULT_DOC: disabled. |
5473c134 | 9735 | DOC_START |
4bf2a476 FC |
9736 | If the memory usage (as determined by gnumalloc, if available and used) |
9737 | exceeds this amount, Squid prints a WARNING with debug level 0 to get | |
5473c134 | 9738 | the administrators attention. |
9739 | DOC_END | |
4bf2a476 | 9740 | # TODO: link high_memory_warning to mempools? |
cc9f92d4 | 9741 | |
5473c134 | 9742 | NAME: sleep_after_fork |
9743 | COMMENT: (microseconds) | |
9744 | TYPE: int | |
9745 | LOC: Config.sleep_after_fork | |
9746 | DEFAULT: 0 | |
9747 | DOC_START | |
9748 | When this is set to a non-zero value, the main Squid process | |
9749 | sleeps the specified number of microseconds after a fork() | |
9750 | system call. This sleep may help the situation where your | |
9751 | system reports fork() failures due to lack of (virtual) | |
9752 | memory. Note, however, if you have a lot of child | |
9753 | processes, these sleep delays will add up and your | |
9754 | Squid will not service requests for some amount of time | |
9755 | until all the child processes have been started. | |
9756 | On Windows value less then 1000 (1 milliseconds) are | |
9757 | rounded to 1000. | |
cc9f92d4 | 9758 | DOC_END |
9759 | ||
b6696974 | 9760 | NAME: windows_ipaddrchangemonitor |
7aa9bb3e | 9761 | IFDEF: _SQUID_WINDOWS_ |
b6696974 GS |
9762 | COMMENT: on|off |
9763 | TYPE: onoff | |
9764 | DEFAULT: on | |
9765 | LOC: Config.onoff.WIN32_IpAddrChangeMonitor | |
9766 | DOC_START | |
9767 | On Windows Squid by default will monitor IP address changes and will | |
9768 | reconfigure itself after any detected event. This is very useful for | |
9769 | proxies connected to internet with dial-up interfaces. | |
9770 | In some cases (a Proxy server acting as VPN gateway is one) it could be | |
9771 | desiderable to disable this behaviour setting this to 'off'. | |
9772 | Note: after changing this, Squid service must be restarted. | |
9773 | DOC_END | |
9774 | ||
a98c2da5 AJ |
9775 | NAME: eui_lookup |
9776 | TYPE: onoff | |
9777 | IFDEF: USE_SQUID_EUI | |
9778 | DEFAULT: on | |
9779 | LOC: Eui::TheConfig.euiLookup | |
9780 | DOC_START | |
9781 | Whether to lookup the EUI or MAC address of a connected client. | |
9782 | DOC_END | |
9783 | ||
f3f0f563 AJ |
9784 | NAME: max_filedescriptors max_filedesc |
9785 | TYPE: int | |
9786 | DEFAULT: 0 | |
638402dd | 9787 | DEFAULT_DOC: Use operating system limits set by ulimit. |
f3f0f563 AJ |
9788 | LOC: Config.max_filedescriptors |
9789 | DOC_START | |
638402dd AJ |
9790 | Reduce the maximum number of filedescriptors supported below |
9791 | the usual operating system defaults. | |
f3f0f563 | 9792 | |
638402dd | 9793 | Remove from squid.conf to inherit the current ulimit setting. |
f3f0f563 AJ |
9794 | |
9795 | Note: Changing this requires a restart of Squid. Also | |
638402dd | 9796 | not all I/O types supports large values (eg on Windows). |
f3f0f563 AJ |
9797 | DOC_END |
9798 | ||
ec69bdb2 CT |
9799 | NAME: force_request_body_continuation |
9800 | TYPE: acl_access | |
9801 | LOC: Config.accessList.forceRequestBodyContinuation | |
9802 | DEFAULT: none | |
9803 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
9804 | DOC_START | |
9805 | This option controls how Squid handles data upload requests from HTTP | |
9806 | and FTP agents that require a "Please Continue" control message response | |
9807 | to actually send the request body to Squid. It is mostly useful in | |
9808 | adaptation environments. | |
9809 | ||
9810 | When Squid receives an HTTP request with an "Expect: 100-continue" | |
9811 | header or an FTP upload command (e.g., STOR), Squid normally sends the | |
9812 | request headers or FTP command information to an adaptation service (or | |
9813 | peer) and waits for a response. Most adaptation services (and some | |
9814 | broken peers) may not respond to Squid at that stage because they may | |
9815 | decide to wait for the HTTP request body or FTP data transfer. However, | |
9816 | that request body or data transfer may never come because Squid has not | |
9817 | responded with the HTTP 100 or FTP 150 (Please Continue) control message | |
9818 | to the request sender yet! | |
9819 | ||
9820 | An allow match tells Squid to respond with the HTTP 100 or FTP 150 | |
9821 | (Please Continue) control message on its own, before forwarding the | |
9822 | request to an adaptation service or peer. Such a response usually forces | |
9823 | the request sender to proceed with sending the body. A deny match tells | |
9824 | Squid to delay that control response until the origin server confirms | |
9825 | that the request body is needed. Delaying is the default behavior. | |
9826 | DOC_END | |
9827 | ||
afc753f3 EB |
9828 | NAME: server_pconn_for_nonretriable |
9829 | TYPE: acl_access | |
9830 | DEFAULT: none | |
9831 | DEFAULT_DOC: Open new connections for forwarding requests Squid cannot retry safely. | |
9832 | LOC: Config.accessList.serverPconnForNonretriable | |
9833 | DOC_START | |
9834 | This option provides fine-grained control over persistent connection | |
9835 | reuse when forwarding HTTP requests that Squid cannot retry. It is useful | |
9836 | in environments where opening new connections is very expensive | |
9837 | (e.g., all connections are secured with TLS with complex client and server | |
9838 | certificate validation) and race conditions associated with persistent | |
9839 | connections are very rare and/or only cause minor problems. | |
9840 | ||
9841 | HTTP prohibits retrying unsafe and non-idempotent requests (e.g., POST). | |
9842 | Squid limitations also prohibit retrying all requests with bodies (e.g., PUT). | |
9843 | By default, when forwarding such "risky" requests, Squid opens a new | |
9844 | connection to the server or cache_peer, even if there is an idle persistent | |
9845 | connection available. When Squid is configured to risk sending a non-retriable | |
9846 | request on a previously used persistent connection, and the server closes | |
9847 | the connection before seeing that risky request, the user gets an error response | |
9848 | from Squid. In most cases, that error response will be HTTP 502 (Bad Gateway) | |
9849 | with ERR_ZERO_SIZE_OBJECT or ERR_WRITE_ERROR (peer connection reset) error detail. | |
9850 | ||
9851 | If an allow rule matches, Squid reuses an available idle persistent connection | |
9852 | (if any) for the request that Squid cannot retry. If a deny rule matches, then | |
9853 | Squid opens a new connection for the request that Squid cannot retry. | |
9854 | ||
9855 | This option does not affect requests that Squid can retry. They will reuse idle | |
9856 | persistent connections (if any). | |
9857 | ||
9858 | This clause only supports fast acl types. | |
9859 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
9860 | ||
9861 | Example: | |
9862 | acl SpeedIsWorthTheRisk method POST | |
9863 | server_pconn_for_nonretriable allow SpeedIsWorthTheRisk | |
9864 | DOC_END | |
9865 | ||
cccac0a2 | 9866 | EOF |