]>
| Commit | Line | Data |
|---|---|---|
| 1 | ## Copyright (C) 1996-2025 The Squid Software Foundation and contributors | |
| 2 | ## | |
| 3 | ## Squid software is distributed under GPLv2+ license and includes | |
| 4 | ## contributions from numerous individuals and organizations. | |
| 5 | ## Please see the COPYING and CONTRIBUTORS files for details. | |
| 6 | ## | |
| 7 | ||
| 8 | COMMENT_START | |
| 9 | WELCOME TO @SQUID@ | |
| 10 | ---------------------------- | |
| 11 | ||
| 12 | This is the documentation for the Squid configuration file. | |
| 13 | This documentation can also be found online at: | |
| 14 | http://www.squid-cache.org/Doc/config/ | |
| 15 | ||
| 16 | You may wish to look at the Squid home page and wiki for the | |
| 17 | FAQ and other documentation: | |
| 18 | http://www.squid-cache.org/ | |
| 19 | https://wiki.squid-cache.org/SquidFaq | |
| 20 | https://wiki.squid-cache.org/ConfigExamples | |
| 21 | ||
| 22 | This documentation shows what the defaults for various directives | |
| 23 | happen to be. If you don't need to change the default, you should | |
| 24 | leave the line out of your squid.conf in most cases. | |
| 25 | ||
| 26 | In some cases "none" refers to no default setting at all, | |
| 27 | while in other cases it refers to the value of the option | |
| 28 | - the comments for that keyword indicate if this is the case. | |
| 29 | ||
| 30 | COMMENT_END | |
| 31 | ||
| 32 | COMMENT_START | |
| 33 | Configuration options can be included using the "include" directive. | |
| 34 | Include takes a list of files to include. Quoting and wildcards are | |
| 35 | supported. | |
| 36 | ||
| 37 | For example, | |
| 38 | ||
| 39 | include /path/to/included/file/squid.acl.config | |
| 40 | ||
| 41 | Includes can be nested up to a hard-coded depth of 16 levels. | |
| 42 | This arbitrary restriction is to prevent recursive include references | |
| 43 | from causing Squid entering an infinite loop whilst trying to load | |
| 44 | configuration files. | |
| 45 | ||
| 46 | Values with byte units | |
| 47 | ||
| 48 | Squid accepts size units on some size related directives. All | |
| 49 | such directives are documented with a default value displaying | |
| 50 | a unit. | |
| 51 | ||
| 52 | Units accepted by Squid are: | |
| 53 | bytes - byte | |
| 54 | KB - Kilobyte (2^10, 1'024 bytes) | |
| 55 | MB - Megabyte (2^20, 1'048'576 bytes) | |
| 56 | GB - Gigabyte (2^30, 1'073'741'824 bytes) | |
| 57 | Squid does not yet support KiB, MiB, and GiB unit names. | |
| 58 | ||
| 59 | Values with time units | |
| 60 | ||
| 61 | Time-related directives marked with either "time-units" or | |
| 62 | "time-units-small" accept a time unit. The supported time units are: | |
| 63 | ||
| 64 | nanosecond (time-units-small only) | |
| 65 | microsecond (time-units-small only) | |
| 66 | millisecond | |
| 67 | second | |
| 68 | minute | |
| 69 | hour | |
| 70 | day | |
| 71 | week | |
| 72 | fortnight | |
| 73 | month - 30 days | |
| 74 | year - 31557790080 milliseconds (just over 365 days) | |
| 75 | decade | |
| 76 | ||
| 77 | Values with spaces, quotes, and other special characters | |
| 78 | ||
| 79 | Squid supports directive parameters with spaces, quotes, and other | |
| 80 | special characters. Surround such parameters with "double quotes". Use | |
| 81 | the configuration_includes_quoted_values directive to enable or | |
| 82 | disable that support. | |
| 83 | ||
| 84 | Squid supports reading configuration option parameters from external | |
| 85 | files using the syntax: | |
| 86 | parameters("/path/filename") | |
| 87 | For example: | |
| 88 | acl allowlist dstdomain parameters("/etc/squid/allowlist.txt") | |
| 89 | ||
| 90 | Conditional configuration | |
| 91 | ||
| 92 | If-statements can be used to make configuration directives | |
| 93 | depend on conditions: | |
| 94 | ||
| 95 | if <CONDITION> | |
| 96 | ... regular configuration directives ... | |
| 97 | [else | |
| 98 | ... regular configuration directives ...] | |
| 99 | endif | |
| 100 | ||
| 101 | The else part is optional. The keywords "if", "else", and "endif" | |
| 102 | must be typed on their own lines, as if they were regular | |
| 103 | configuration directives. | |
| 104 | ||
| 105 | NOTE: An else-if condition is not supported. | |
| 106 | ||
| 107 | These individual conditions types are supported: | |
| 108 | ||
| 109 | true | |
| 110 | Always evaluates to true. | |
| 111 | false | |
| 112 | Always evaluates to false. | |
| 113 | <integer> = <integer> | |
| 114 | Equality comparison of two integer numbers. | |
| 115 | ||
| 116 | ||
| 117 | SMP-Related Macros | |
| 118 | ||
| 119 | The following SMP-related preprocessor macros can be used. | |
| 120 | ||
| 121 | ${process_name} expands to the current Squid process "name" | |
| 122 | (e.g., squid1, squid2, or cache1). | |
| 123 | ||
| 124 | ${process_number} expands to the current Squid process | |
| 125 | identifier, which is an integer number (e.g., 1, 2, 3) unique | |
| 126 | across all Squid processes of the current service instance. | |
| 127 | ||
| 128 | ${service_name} expands into the current Squid service instance | |
| 129 | name identifier which is provided by -n on the command line. | |
| 130 | ||
| 131 | Logformat Macros | |
| 132 | ||
| 133 | Logformat macros can be used in many places outside of the logformat | |
| 134 | directive. In theory, all of the logformat codes can be used as %macros, | |
| 135 | where they are supported. In practice, a %macro expands as a dash (-) when | |
| 136 | the transaction does not yet have enough information and a value is needed. | |
| 137 | ||
| 138 | There is no definitive list of what tokens are available at the various | |
| 139 | stages of the transaction. | |
| 140 | ||
| 141 | And some information may already be available to Squid but not yet | |
| 142 | committed where the macro expansion code can access it (report | |
| 143 | such instances!). The macro will be expanded into a single dash | |
| 144 | ('-') in such cases. Not all macros have been tested. | |
| 145 | ||
| 146 | COMMENT_END | |
| 147 | ||
| 148 | # options still not yet ported from 2.7 to 3.x | |
| 149 | NAME: broken_vary_encoding | |
| 150 | TYPE: obsolete | |
| 151 | DOC_START | |
| 152 | This option is not yet supported by Squid-3. | |
| 153 | DOC_END | |
| 154 | ||
| 155 | NAME: cache_vary | |
| 156 | TYPE: obsolete | |
| 157 | DOC_START | |
| 158 | This option is not yet supported by Squid-3. | |
| 159 | DOC_END | |
| 160 | ||
| 161 | NAME: error_map | |
| 162 | TYPE: obsolete | |
| 163 | DOC_START | |
| 164 | This option is not yet supported by Squid-3. | |
| 165 | DOC_END | |
| 166 | ||
| 167 | NAME: external_refresh_check | |
| 168 | TYPE: obsolete | |
| 169 | DOC_START | |
| 170 | This option is not yet supported by Squid-3. | |
| 171 | DOC_END | |
| 172 | ||
| 173 | NAME: location_rewrite_program location_rewrite_access location_rewrite_children location_rewrite_concurrency | |
| 174 | TYPE: obsolete | |
| 175 | DOC_START | |
| 176 | This option is not yet supported by Squid-3. | |
| 177 | DOC_END | |
| 178 | ||
| 179 | NAME: refresh_stale_hit | |
| 180 | TYPE: obsolete | |
| 181 | DOC_START | |
| 182 | This option is not yet supported by Squid-3. | |
| 183 | DOC_END | |
| 184 | ||
| 185 | # Options removed in 7.x | |
| 186 | NAME: esi_parser | |
| 187 | TYPE: obsolete | |
| 188 | DOC_START | |
| 189 | Remove this line. Squid no longer supports this feature. | |
| 190 | DOC_END | |
| 191 | ||
| 192 | ||
| 193 | # Options removed in 6.x | |
| 194 | NAME: announce_file | |
| 195 | TYPE: obsolete | |
| 196 | DOC_START | |
| 197 | Remove this line. Squid no longer supports this feature. | |
| 198 | DOC_END | |
| 199 | ||
| 200 | NAME: announce_host | |
| 201 | TYPE: obsolete | |
| 202 | DOC_START | |
| 203 | Remove this line. Squid no longer supports this feature. | |
| 204 | DOC_END | |
| 205 | ||
| 206 | NAME: announce_period | |
| 207 | TYPE: obsolete | |
| 208 | DOC_START | |
| 209 | Remove this line. Squid no longer supports this feature. | |
| 210 | DOC_END | |
| 211 | ||
| 212 | NAME: announce_port | |
| 213 | TYPE: obsolete | |
| 214 | DOC_START | |
| 215 | Remove this line. Squid no longer supports this feature. | |
| 216 | DOC_END | |
| 217 | ||
| 218 | NAME: request_entities | |
| 219 | TYPE: obsolete | |
| 220 | DOC_START | |
| 221 | Remove this line. Squid now accepts HTTP/1.1 requests with bodies. | |
| 222 | To simplify UI and code, Squid rejects certain HTTP/1.0 requests with bodies. | |
| 223 | DOC_END | |
| 224 | ||
| 225 | # Options removed in 5.x | |
| 226 | NAME: dns_v4_first | |
| 227 | TYPE: obsolete | |
| 228 | DOC_START | |
| 229 | Remove this line. Squid no longer supports preferential treatment of DNS A records. | |
| 230 | DOC_END | |
| 231 | ||
| 232 | # Options removed in 4.x | |
| 233 | NAME: cache_peer_domain cache_host_domain | |
| 234 | TYPE: obsolete | |
| 235 | DOC_START | |
| 236 | Replace with dstdomain ACLs and cache_peer_access. | |
| 237 | DOC_END | |
| 238 | ||
| 239 | NAME: ie_refresh | |
| 240 | TYPE: obsolete | |
| 241 | DOC_START | |
| 242 | Remove this line. The behaviour enabled by this is no longer needed. | |
| 243 | DOC_END | |
| 244 | ||
| 245 | NAME: sslproxy_cafile | |
| 246 | TYPE: obsolete | |
| 247 | DOC_START | |
| 248 | Remove this line. Use tls_outgoing_options cafile= instead. | |
| 249 | DOC_END | |
| 250 | ||
| 251 | NAME: sslproxy_capath | |
| 252 | TYPE: obsolete | |
| 253 | DOC_START | |
| 254 | Remove this line. Use tls_outgoing_options capath= instead. | |
| 255 | DOC_END | |
| 256 | ||
| 257 | NAME: sslproxy_cipher | |
| 258 | TYPE: obsolete | |
| 259 | DOC_START | |
| 260 | Remove this line. Use tls_outgoing_options cipher= instead. | |
| 261 | DOC_END | |
| 262 | ||
| 263 | NAME: sslproxy_client_certificate | |
| 264 | TYPE: obsolete | |
| 265 | DOC_START | |
| 266 | Remove this line. Use tls_outgoing_options cert= instead. | |
| 267 | DOC_END | |
| 268 | ||
| 269 | NAME: sslproxy_client_key | |
| 270 | TYPE: obsolete | |
| 271 | DOC_START | |
| 272 | Remove this line. Use tls_outgoing_options key= instead. | |
| 273 | DOC_END | |
| 274 | ||
| 275 | NAME: sslproxy_flags | |
| 276 | TYPE: obsolete | |
| 277 | DOC_START | |
| 278 | Remove this line. Use tls_outgoing_options flags= instead. | |
| 279 | DOC_END | |
| 280 | ||
| 281 | NAME: sslproxy_options | |
| 282 | TYPE: obsolete | |
| 283 | DOC_START | |
| 284 | Remove this line. Use tls_outgoing_options options= instead. | |
| 285 | DOC_END | |
| 286 | ||
| 287 | NAME: sslproxy_version | |
| 288 | TYPE: obsolete | |
| 289 | DOC_START | |
| 290 | Remove this line. Use tls_outgoing_options options= instead. | |
| 291 | DOC_END | |
| 292 | ||
| 293 | # Options removed in 3.5 | |
| 294 | NAME: hierarchy_stoplist | |
| 295 | TYPE: obsolete | |
| 296 | DOC_START | |
| 297 | Remove this line. Use always_direct or cache_peer_access ACLs instead if you need to prevent cache_peer use. | |
| 298 | DOC_END | |
| 299 | ||
| 300 | # Options removed in 3.4 | |
| 301 | NAME: log_access | |
| 302 | TYPE: obsolete | |
| 303 | DOC_START | |
| 304 | Remove this line. Use acls with access_log directives to control access logging | |
| 305 | DOC_END | |
| 306 | ||
| 307 | NAME: log_icap | |
| 308 | TYPE: obsolete | |
| 309 | DOC_START | |
| 310 | Remove this line. Use acls with icap_log directives to control icap logging | |
| 311 | DOC_END | |
| 312 | ||
| 313 | # Options Removed in 3.3 | |
| 314 | NAME: ignore_ims_on_miss | |
| 315 | TYPE: obsolete | |
| 316 | DOC_START | |
| 317 | Remove this line. The HTTP/1.1 feature is now configured by 'cache_miss_revalidate'. | |
| 318 | DOC_END | |
| 319 | ||
| 320 | # Options Removed in 3.2 | |
| 321 | NAME: balance_on_multiple_ip | |
| 322 | TYPE: obsolete | |
| 323 | DOC_START | |
| 324 | Remove this line. Squid performs a 'Happy Eyeballs' algorithm, this multiple-IP algorithm is not longer relevant. | |
| 325 | DOC_END | |
| 326 | ||
| 327 | NAME: chunked_request_body_max_size | |
| 328 | TYPE: obsolete | |
| 329 | DOC_START | |
| 330 | Remove this line. Squid is now HTTP/1.1 compliant. | |
| 331 | DOC_END | |
| 332 | ||
| 333 | NAME: dns_v4_fallback | |
| 334 | TYPE: obsolete | |
| 335 | DOC_START | |
| 336 | Remove this line. Squid performs a 'Happy Eyeballs' algorithm, the 'fallback' algorithm is no longer relevant. | |
| 337 | DOC_END | |
| 338 | ||
| 339 | NAME: emulate_httpd_log | |
| 340 | TYPE: obsolete | |
| 341 | DOC_START | |
| 342 | Replace this with an access_log directive using the format 'common' or 'combined'. | |
| 343 | DOC_END | |
| 344 | ||
| 345 | NAME: forward_log | |
| 346 | TYPE: obsolete | |
| 347 | DOC_START | |
| 348 | Use a regular access.log with ACL limiting it to MISS events. | |
| 349 | DOC_END | |
| 350 | ||
| 351 | NAME: ftp_list_width | |
| 352 | TYPE: obsolete | |
| 353 | DOC_START | |
| 354 | Remove this line. Configure FTP page display using the CSS controls in errorpages.css instead. | |
| 355 | DOC_END | |
| 356 | ||
| 357 | NAME: ignore_expect_100 | |
| 358 | TYPE: obsolete | |
| 359 | DOC_START | |
| 360 | Remove this line. The HTTP/1.1 feature is now fully supported by default. | |
| 361 | DOC_END | |
| 362 | ||
| 363 | NAME: log_fqdn | |
| 364 | TYPE: obsolete | |
| 365 | DOC_START | |
| 366 | Remove this option from your config. To log FQDN use %>A in the log format. | |
| 367 | DOC_END | |
| 368 | ||
| 369 | NAME: log_ip_on_direct | |
| 370 | TYPE: obsolete | |
| 371 | DOC_START | |
| 372 | Remove this option from your config. To log server or peer names use %<A in the log format. | |
| 373 | DOC_END | |
| 374 | ||
| 375 | NAME: maximum_single_addr_tries | |
| 376 | TYPE: obsolete | |
| 377 | DOC_START | |
| 378 | Replaced by connect_retries. The behaviour has changed, please read the documentation before altering. | |
| 379 | DOC_END | |
| 380 | ||
| 381 | NAME: referer_log referrer_log | |
| 382 | TYPE: obsolete | |
| 383 | DOC_START | |
| 384 | Replace this with an access_log directive using the format 'referrer'. | |
| 385 | DOC_END | |
| 386 | ||
| 387 | NAME: update_headers | |
| 388 | TYPE: obsolete | |
| 389 | DOC_START | |
| 390 | Remove this line. The feature is supported by default in storage types where update is implemented. | |
| 391 | DOC_END | |
| 392 | ||
| 393 | NAME: url_rewrite_concurrency | |
| 394 | TYPE: obsolete | |
| 395 | DOC_START | |
| 396 | Remove this line. Set the 'concurrency=' option of url_rewrite_children instead. | |
| 397 | DOC_END | |
| 398 | ||
| 399 | NAME: useragent_log | |
| 400 | TYPE: obsolete | |
| 401 | DOC_START | |
| 402 | Replace this with an access_log directive using the format 'useragent'. | |
| 403 | DOC_END | |
| 404 | ||
| 405 | # Options Removed in 3.1 | |
| 406 | NAME: dns_testnames | |
| 407 | TYPE: obsolete | |
| 408 | DOC_START | |
| 409 | Remove this line. DNS is no longer tested on startup. | |
| 410 | DOC_END | |
| 411 | ||
| 412 | NAME: extension_methods | |
| 413 | TYPE: obsolete | |
| 414 | DOC_START | |
| 415 | Remove this line. All valid methods for HTTP are accepted by default. | |
| 416 | DOC_END | |
| 417 | ||
| 418 | # 2.7 Options Removed/Replaced in 3.2 | |
| 419 | NAME: zero_buffers | |
| 420 | TYPE: obsolete | |
| 421 | DOC_NONE | |
| 422 | ||
| 423 | # 2.7 Options Removed/Replaced in 3.1 | |
| 424 | NAME: incoming_rate | |
| 425 | TYPE: obsolete | |
| 426 | DOC_NONE | |
| 427 | ||
| 428 | NAME: server_http11 | |
| 429 | TYPE: obsolete | |
| 430 | DOC_START | |
| 431 | Remove this line. HTTP/1.1 is supported by default. | |
| 432 | DOC_END | |
| 433 | ||
| 434 | NAME: upgrade_http0.9 | |
| 435 | TYPE: obsolete | |
| 436 | DOC_START | |
| 437 | Remove this line. ICY/1.0 streaming protocol is supported by default. | |
| 438 | DOC_END | |
| 439 | ||
| 440 | NAME: zph_local zph_mode zph_option zph_parent zph_sibling | |
| 441 | TYPE: obsolete | |
| 442 | DOC_START | |
| 443 | Alter these entries. Use the qos_flows directive instead. | |
| 444 | DOC_END | |
| 445 | ||
| 446 | # Options Removed in 3.0 | |
| 447 | NAME: header_access | |
| 448 | TYPE: obsolete | |
| 449 | DOC_START | |
| 450 | Since squid-3.0 replace with request_header_access or reply_header_access | |
| 451 | depending on whether you wish to match client requests or server replies. | |
| 452 | DOC_END | |
| 453 | ||
| 454 | NAME: httpd_accel_no_pmtu_disc | |
| 455 | TYPE: obsolete | |
| 456 | DOC_START | |
| 457 | Since squid-3.0 use the 'disable-pmtu-discovery' flag on http_port instead. | |
| 458 | DOC_END | |
| 459 | ||
| 460 | NAME: wais_relay_host | |
| 461 | TYPE: obsolete | |
| 462 | DOC_START | |
| 463 | Replace this line with 'cache_peer' configuration. | |
| 464 | DOC_END | |
| 465 | ||
| 466 | NAME: wais_relay_port | |
| 467 | TYPE: obsolete | |
| 468 | DOC_START | |
| 469 | Replace this line with 'cache_peer' configuration. | |
| 470 | DOC_END | |
| 471 | ||
| 472 | COMMENT_START | |
| 473 | OPTIONS FOR SMP | |
| 474 | ----------------------------------------------------------------------------- | |
| 475 | COMMENT_END | |
| 476 | ||
| 477 | NAME: workers | |
| 478 | TYPE: int | |
| 479 | LOC: Config.workers | |
| 480 | DEFAULT: 1 | |
| 481 | DEFAULT_DOC: SMP support disabled. | |
| 482 | DOC_START | |
| 483 | Number of main Squid processes or "workers" to fork and maintain. | |
| 484 | 0: "no daemon" mode, like running "squid -N ..." | |
| 485 | 1: "no SMP" mode, start one main Squid process daemon (default) | |
| 486 | N: start N main Squid process daemons (i.e., SMP mode) | |
| 487 | ||
| 488 | In SMP mode, each worker does nearly all what a single Squid daemon | |
| 489 | does (e.g., listen on http_port and forward HTTP requests). | |
| 490 | ||
| 491 | Changing the number of workers requires a restart: Squid warns about but | |
| 492 | otherwise ignores attempts to change this setting via reconfiguration. | |
| 493 | DOC_END | |
| 494 | ||
| 495 | NAME: cpu_affinity_map | |
| 496 | TYPE: CpuAffinityMap | |
| 497 | LOC: Config.cpuAffinityMap | |
| 498 | DEFAULT: none | |
| 499 | DEFAULT_DOC: Let operating system decide. | |
| 500 | DOC_START | |
| 501 | Usage: cpu_affinity_map process_numbers=P1,P2,... cores=C1,C2,... | |
| 502 | ||
| 503 | Sets 1:1 mapping between Squid processes and CPU cores. For example, | |
| 504 | ||
| 505 | cpu_affinity_map process_numbers=1,2,3,4 cores=1,3,5,7 | |
| 506 | ||
| 507 | affects processes 1 through 4 only and places them on the first | |
| 508 | four even cores, starting with core #1. | |
| 509 | ||
| 510 | CPU cores are numbered starting from 1. Requires support for | |
| 511 | sched_getaffinity(2) and sched_setaffinity(2) system calls. | |
| 512 | ||
| 513 | Multiple cpu_affinity_map options are merged. | |
| 514 | ||
| 515 | See also: workers | |
| 516 | DOC_END | |
| 517 | ||
| 518 | NAME: shared_memory_locking | |
| 519 | TYPE: YesNoNone | |
| 520 | COMMENT: on|off | |
| 521 | LOC: Config.shmLocking | |
| 522 | DEFAULT: off | |
| 523 | DOC_START | |
| 524 | Whether to ensure that all required shared memory is available by | |
| 525 | "locking" that shared memory into RAM when Squid starts. The | |
| 526 | alternative is faster startup time followed by slightly slower | |
| 527 | performance and, if not enough RAM is actually available during | |
| 528 | runtime, mysterious crashes. | |
| 529 | ||
| 530 | SMP Squid uses many shared memory segments. These segments are | |
| 531 | brought into Squid memory space using an mmap(2) system call. During | |
| 532 | Squid startup, the mmap() call often succeeds regardless of whether | |
| 533 | the system has enough RAM. In general, Squid cannot tell whether the | |
| 534 | kernel applies this "optimistic" memory allocation policy (but | |
| 535 | popular modern kernels usually use it). | |
| 536 | ||
| 537 | Later, if Squid attempts to actually access the mapped memory | |
| 538 | regions beyond what the kernel is willing to allocate, the | |
| 539 | "optimistic" kernel simply kills Squid kid with a SIGBUS signal. | |
| 540 | Some of the memory limits enforced by the kernel are currently | |
| 541 | poorly understood: We do not know how to detect and check them. This | |
| 542 | option ensures that the mapped memory will be available. | |
| 543 | ||
| 544 | This option may have a positive performance side-effect: Locking | |
| 545 | memory at start avoids runtime paging I/O. Paging slows Squid down. | |
| 546 | ||
| 547 | Locking memory may require a large enough RLIMIT_MEMLOCK OS limit, | |
| 548 | CAP_IPC_LOCK capability, or equivalent. | |
| 549 | DOC_END | |
| 550 | ||
| 551 | NAME: hopeless_kid_revival_delay | |
| 552 | COMMENT: time-units | |
| 553 | TYPE: time_t | |
| 554 | LOC: Config.hopelessKidRevivalDelay | |
| 555 | DEFAULT: 1 hour | |
| 556 | DOC_START | |
| 557 | Normally, when a kid process dies, Squid immediately restarts the | |
| 558 | kid. A kid experiencing frequent deaths is marked as "hopeless" for | |
| 559 | the duration specified by this directive. Hopeless kids are not | |
| 560 | automatically restarted. | |
| 561 | ||
| 562 | Currently, zero values are not supported because they result in | |
| 563 | misconfigured SMP Squid instances running forever, endlessly | |
| 564 | restarting each dying kid. To effectively disable hopeless kids | |
| 565 | revival, set the delay to a huge value (e.g., 1 year). | |
| 566 | ||
| 567 | Reconfiguration also clears all hopeless kids designations, allowing | |
| 568 | for manual revival of hopeless kids. | |
| 569 | DOC_END | |
| 570 | ||
| 571 | COMMENT_START | |
| 572 | OPTIONS FOR AUTHENTICATION | |
| 573 | ----------------------------------------------------------------------------- | |
| 574 | COMMENT_END | |
| 575 | ||
| 576 | NAME: auth_param | |
| 577 | TYPE: authparam | |
| 578 | IFDEF: USE_AUTH | |
| 579 | LOC: Auth::TheConfig.schemes | |
| 580 | DEFAULT: none | |
| 581 | DOC_START | |
| 582 | This is used to define parameters for the various authentication | |
| 583 | schemes supported by Squid. | |
| 584 | ||
| 585 | format: auth_param scheme parameter [setting] | |
| 586 | ||
| 587 | The order in which authentication schemes are presented to the client is | |
| 588 | dependent on the order the scheme first appears in config file. IE | |
| 589 | has a bug (it's not RFC 2617 compliant) in that it will use the basic | |
| 590 | scheme if basic is the first entry presented, even if more secure | |
| 591 | schemes are presented. For now use the order in the recommended | |
| 592 | settings section below. If other browsers have difficulties (don't | |
| 593 | recognize the schemes offered even if you are using basic) either | |
| 594 | put basic first, or disable the other schemes (by commenting out their | |
| 595 | program entry). | |
| 596 | ||
| 597 | Once an authentication scheme is fully configured, it can only be | |
| 598 | shutdown by shutting squid down and restarting. Changes can be made on | |
| 599 | the fly and activated with a reconfigure. I.E. You can change to a | |
| 600 | different helper, but not unconfigure the helper completely. | |
| 601 | ||
| 602 | Please note that while this directive defines how Squid processes | |
| 603 | authentication it does not automatically activate authentication. For a | |
| 604 | given transaction, (re)authentication is requested in two primary cases | |
| 605 | detailed below: initial authentication and re-authentication. | |
| 606 | ||
| 607 | A client without credentials is requested to authenticate if one of the | |
| 608 | following ACLs is evaluated by an http_access or adapted_http_access rule: | |
| 609 | ||
| 610 | * proxy_auth ACL | |
| 611 | * proxy_auth_regex ACL | |
| 612 | * max_user_ip ACL | |
| 613 | * external ACL with %ul logformat %code used in FORMAT parameters | |
| 614 | * external ACL with %LOGIN macro used in FORMAT parameters; | |
| 615 | this legacy macro currently behaves the same as %ul logformat %code | |
| 616 | ||
| 617 | A client with credentials is requested to re-authenticate if http_access | |
| 618 | or adapted_http_access denies its request _and_ the last evaluated ACL was | |
| 619 | either proxy_auth, proxy_auth_regex, or an external | |
| 620 | ACL with %ul or %LOGIN parameter (regardless of whether that last | |
| 621 | evaluated ACL matched the denied request). Note that a max_user_ip ACL | |
| 622 | does not have this effect: Requests denied after evaluating max_user_ip | |
| 623 | trigger an HTTP 403 (Forbidden) response rather than re-authentication. | |
| 624 | ||
| 625 | In both initial authentication and re-authentication cases, client access | |
| 626 | is denied, typically with an HTTP 407 (Proxy Authentication Required) or | |
| 627 | an HTTP 401 (Unauthorized) response. | |
| 628 | ||
| 629 | WARNING: authentication can't be used in a transparently intercepting | |
| 630 | proxy as the client then thinks it is talking to an origin server and | |
| 631 | not the proxy. This is a limitation of bending the TCP/IP protocol to | |
| 632 | transparently intercepting port 80, not a limitation in Squid. | |
| 633 | Ports flagged 'transparent', 'intercept', or 'tproxy' have | |
| 634 | authentication disabled. | |
| 635 | ||
| 636 | === Parameters common to all schemes. === | |
| 637 | ||
| 638 | "program" cmdline | |
| 639 | Specifies the command for the external authenticator. | |
| 640 | ||
| 641 | By default, each authentication scheme is not used unless a | |
| 642 | program is specified. | |
| 643 | ||
| 644 | See https://wiki.squid-cache.org/Features/AddonHelpers for | |
| 645 | more details on helper operations and creating your own. | |
| 646 | ||
| 647 | "key_extras" format | |
| 648 | Specifies a string to be append to request line format for | |
| 649 | the authentication helper. "Quoted" format values may contain | |
| 650 | spaces and logformat %macros. In theory, any logformat %macro | |
| 651 | can be used. In practice, a %macro expands as a dash (-) if | |
| 652 | the helper request is sent before the required macro | |
| 653 | information is available to Squid. | |
| 654 | ||
| 655 | By default, Squid uses request formats provided in | |
| 656 | scheme-specific examples below (search for %credentials). | |
| 657 | ||
| 658 | The expanded key_extras value is added to the Squid credentials | |
| 659 | cache and, hence, will affect authentication. It can be used to | |
| 660 | authenticate different users with identical user names (e.g., | |
| 661 | when user authentication depends on http_port). | |
| 662 | ||
| 663 | Avoid adding frequently changing information to key_extras. For | |
| 664 | example, if you add user source IP, and it changes frequently | |
| 665 | in your environment, then max_user_ip ACL is going to treat | |
| 666 | every user+IP combination as a unique "user", breaking the ACL | |
| 667 | and wasting a lot of memory on those user records. It will also | |
| 668 | force users to authenticate from scratch whenever their IP | |
| 669 | changes. | |
| 670 | ||
| 671 | "realm" string | |
| 672 | Specifies the protection scope (aka realm name) which is to be | |
| 673 | reported to the client for the authentication scheme. It is | |
| 674 | commonly part of the text the user will see when prompted for | |
| 675 | their username and password. | |
| 676 | ||
| 677 | For Basic the default is "Squid proxy-caching web server". | |
| 678 | For Digest there is no default, this parameter is mandatory. | |
| 679 | For NTLM and Negotiate this parameter is ignored. | |
| 680 | ||
| 681 | "children" numberofchildren [startup=N] [idle=N] [concurrency=N] | |
| 682 | [queue-size=N] [on-persistent-overload=action] | |
| 683 | [reservation-timeout=seconds] | |
| 684 | ||
| 685 | The maximum number of authenticator processes to spawn. If | |
| 686 | you start too few Squid will have to wait for them to process | |
| 687 | a backlog of credential verifications, slowing it down. When | |
| 688 | password verifications are done via a (slow) network you are | |
| 689 | likely to need lots of authenticator processes. | |
| 690 | ||
| 691 | The startup= and idle= options permit some skew in the exact | |
| 692 | amount run. A minimum of startup=N will begin during startup | |
| 693 | and reconfigure. Squid will start more in groups of up to | |
| 694 | idle=N in an attempt to meet traffic needs and to keep idle=N | |
| 695 | free above those traffic needs up to the maximum. | |
| 696 | ||
| 697 | The concurrency= option sets the number of concurrent requests | |
| 698 | the helper can process. The default of 0 is used for helpers | |
| 699 | who only supports one request at a time. Setting this to a | |
| 700 | number greater than 0 changes the protocol used to include a | |
| 701 | channel ID field first on the request/response line, allowing | |
| 702 | multiple requests to be sent to the same helper in parallel | |
| 703 | without waiting for the response. | |
| 704 | ||
| 705 | Concurrency must not be set unless it's known the helper | |
| 706 | supports the input format with channel-ID fields. | |
| 707 | ||
| 708 | The queue-size option sets the maximum number of queued | |
| 709 | requests. A request is queued when no existing child can | |
| 710 | accept it due to concurrency limit and no new child can be | |
| 711 | started due to numberofchildren limit. The default maximum is | |
| 712 | 2*numberofchildren. Squid is allowed to temporarily exceed the | |
| 713 | configured maximum, marking the affected helper as | |
| 714 | "overloaded". If the helper overload lasts more than 3 | |
| 715 | minutes, the action prescribed by the on-persistent-overload | |
| 716 | option applies. | |
| 717 | ||
| 718 | The on-persistent-overload=action option specifies Squid | |
| 719 | reaction to a new helper request arriving when the helper | |
| 720 | has been overloaded for more that 3 minutes already. The number | |
| 721 | of queued requests determines whether the helper is overloaded | |
| 722 | (see the queue-size option). | |
| 723 | ||
| 724 | Two actions are supported: | |
| 725 | ||
| 726 | die Squid worker quits. This is the default behavior. | |
| 727 | ||
| 728 | ERR Squid treats the helper request as if it was | |
| 729 | immediately submitted, and the helper immediately | |
| 730 | replied with an ERR response. This action has no effect | |
| 731 | on the already queued and in-progress helper requests. | |
| 732 | ||
| 733 | NOTE: NTLM and Negotiate schemes do not support concurrency | |
| 734 | in the Squid code module even though some helpers can. | |
| 735 | ||
| 736 | The reservation-timeout=seconds option allows NTLM and Negotiate | |
| 737 | helpers to forget about clients that abandon their in-progress | |
| 738 | connection authentication without closing the connection. The | |
| 739 | timeout is measured since the last helper response received by | |
| 740 | Squid for the client. Fractional seconds are not supported. | |
| 741 | ||
| 742 | After the timeout, the helper will be used for other clients if | |
| 743 | there are no unreserved helpers available. In the latter case, | |
| 744 | the old client attempt to resume authentication will not be | |
| 745 | forwarded to the helper (and the client should open a new HTTP | |
| 746 | connection and retry authentication from scratch). | |
| 747 | ||
| 748 | By default, reservations do not expire and clients that keep | |
| 749 | their connections open without completing authentication may | |
| 750 | exhaust all NTLM and Negotiate helpers. | |
| 751 | ||
| 752 | "keep_alive" on|off | |
| 753 | If you experience problems with PUT/POST requests when using | |
| 754 | the NTLM or Negotiate schemes then you can try setting this | |
| 755 | to off. This will cause Squid to forcibly close the connection | |
| 756 | on the initial request where the browser asks which schemes | |
| 757 | are supported by the proxy. | |
| 758 | ||
| 759 | For Basic and Digest this parameter is ignored. | |
| 760 | ||
| 761 | "utf8" on|off | |
| 762 | Useful for sending credentials to authentication backends that | |
| 763 | expect UTF-8 encoding (e.g., LDAP). | |
| 764 | ||
| 765 | When this option is enabled, Squid uses HTTP Accept-Language | |
| 766 | request header to guess the received credentials encoding | |
| 767 | (ISO-Latin-1, CP1251, or UTF-8) and then converts the first | |
| 768 | two encodings into UTF-8. | |
| 769 | ||
| 770 | When this option is disabled and by default, Squid sends | |
| 771 | credentials in their original (i.e. received) encoding. | |
| 772 | ||
| 773 | This parameter is only honored for Basic and Digest schemes. | |
| 774 | For Basic, the entire username:password credentials are | |
| 775 | checked and, if necessary, re-encoded. For Digest -- just the | |
| 776 | username component. For NTLM and Negotiate schemes, this | |
| 777 | parameter is ignored. | |
| 778 | ||
| 779 | IF HAVE_AUTH_MODULE_BASIC | |
| 780 | === Basic authentication parameters === | |
| 781 | ||
| 782 | "credentialsttl" timetolive | |
| 783 | Specifies how long squid assumes an externally validated | |
| 784 | username:password pair is valid for - in other words how | |
| 785 | often the helper program is called for that user. Set this | |
| 786 | low to force revalidation with short lived passwords. | |
| 787 | ||
| 788 | NOTE: setting this high does not impact your susceptibility | |
| 789 | to replay attacks unless you are using an one-time password | |
| 790 | system (such as SecureID). If you are using such a system, | |
| 791 | you will be vulnerable to replay attacks unless you also | |
| 792 | use the max_user_ip ACL in an http_access rule. | |
| 793 | ||
| 794 | "casesensitive" on|off | |
| 795 | Specifies whether upper case letters in client-sent usernames are | |
| 796 | preserved. By default and when explicitly set to "off", a username | |
| 797 | extracted from Proxy-Authorization or Authorization request header is | |
| 798 | forced to lower case before user credentials are checked or stored. | |
| 799 | ||
| 800 | Most user databases are case insensitive, allowing the same username to be | |
| 801 | spelled using both lower and upper case letters. For such databases, | |
| 802 | either setting should work, but forcing usernames to lower case may | |
| 803 | still make a big difference for Squid internal caches like those used by | |
| 804 | an external ACL with %un logformat code in FORMAT and a user_max_ip ACL. | |
| 805 | ||
| 806 | When working with a case sensitive database, set casesensitive to "on". | |
| 807 | ||
| 808 | Squid ACLs like proxy_auth are case-sensitive by default. An ACL using | |
| 809 | upper case letters in user names (e.g., `acl badGuys proxy_auth Bob`) | |
| 810 | will not match any user with Basic Authentication credentials unless | |
| 811 | casesensitive is explicitly turned "on" (to preserve "Bob" username | |
| 812 | instead of converting it to "bob" before the ACL is checked). | |
| 813 | ||
| 814 | ENDIF | |
| 815 | IF HAVE_AUTH_MODULE_DIGEST | |
| 816 | === Digest authentication parameters === | |
| 817 | ||
| 818 | "nonce_garbage_interval" timeinterval | |
| 819 | Specifies the interval that nonces that have been issued | |
| 820 | to client_agent's are checked for validity. | |
| 821 | ||
| 822 | "nonce_max_duration" timeinterval | |
| 823 | Specifies the maximum length of time a given nonce will be | |
| 824 | valid for. | |
| 825 | ||
| 826 | "nonce_max_count" number | |
| 827 | Specifies the maximum number of times a given nonce can be | |
| 828 | used. | |
| 829 | ||
| 830 | "nonce_strictness" on|off | |
| 831 | Determines if squid requires strict increment-by-1 behavior | |
| 832 | for nonce counts, or just incrementing (off - for use when | |
| 833 | user agents generate nonce counts that occasionally miss 1 | |
| 834 | (ie, 1,2,4,6)). Default off. | |
| 835 | ||
| 836 | "check_nonce_count" on|off | |
| 837 | This directive if set to off can disable the nonce count check | |
| 838 | completely to work around buggy digest qop implementations in | |
| 839 | certain mainstream browser versions. Default on to check the | |
| 840 | nonce count to protect from authentication replay attacks. | |
| 841 | ||
| 842 | "post_workaround" on|off | |
| 843 | This is a workaround to certain buggy browsers who send an | |
| 844 | incorrect request digest in POST requests when reusing the | |
| 845 | same nonce as acquired earlier on a GET request. | |
| 846 | ||
| 847 | ENDIF | |
| 848 | ||
| 849 | === Example Configuration === | |
| 850 | ||
| 851 | This configuration displays the recommended authentication scheme | |
| 852 | order from most to least secure with recommended minimum configuration | |
| 853 | settings for each scheme: | |
| 854 | ||
| 855 | #auth_param negotiate program <uncomment and complete this line to activate> | |
| 856 | #auth_param negotiate children 20 startup=0 idle=1 | |
| 857 | # | |
| 858 | #auth_param digest program <uncomment and complete this line to activate> | |
| 859 | #auth_param digest children 20 startup=0 idle=1 | |
| 860 | #auth_param digest realm Squid proxy-caching web server | |
| 861 | #auth_param digest nonce_garbage_interval 5 minutes | |
| 862 | #auth_param digest nonce_max_duration 30 minutes | |
| 863 | #auth_param digest nonce_max_count 50 | |
| 864 | # | |
| 865 | #auth_param ntlm program <uncomment and complete this line to activate> | |
| 866 | #auth_param ntlm children 20 startup=0 idle=1 | |
| 867 | # | |
| 868 | #auth_param basic program <uncomment and complete this line> | |
| 869 | #auth_param basic children 5 startup=5 idle=1 | |
| 870 | #auth_param basic credentialsttl 2 hours | |
| 871 | DOC_END | |
| 872 | ||
| 873 | NAME: authenticate_cache_garbage_interval | |
| 874 | IFDEF: USE_AUTH | |
| 875 | TYPE: time_t | |
| 876 | DEFAULT: 1 hour | |
| 877 | LOC: Auth::TheConfig.garbageCollectInterval | |
| 878 | DOC_START | |
| 879 | The time period between garbage collection across the username cache. | |
| 880 | This is a trade-off between memory utilization (long intervals - say | |
| 881 | 2 days) and CPU (short intervals - say 1 minute). Only change if you | |
| 882 | have good reason to. | |
| 883 | DOC_END | |
| 884 | ||
| 885 | NAME: authenticate_ttl | |
| 886 | IFDEF: USE_AUTH | |
| 887 | TYPE: time_t | |
| 888 | DEFAULT: 1 hour | |
| 889 | LOC: Auth::TheConfig.credentialsTtl | |
| 890 | DOC_START | |
| 891 | The time a user & their credentials stay in the logged in | |
| 892 | user cache since their last request. When the garbage | |
| 893 | interval passes, all user credentials that have passed their | |
| 894 | TTL are removed from memory. | |
| 895 | DOC_END | |
| 896 | ||
| 897 | NAME: authenticate_ip_ttl | |
| 898 | IFDEF: USE_AUTH | |
| 899 | TYPE: time_t | |
| 900 | LOC: Auth::TheConfig.ipTtl | |
| 901 | DEFAULT: 1 second | |
| 902 | DOC_START | |
| 903 | If you use proxy authentication and the 'max_user_ip' ACL, | |
| 904 | this directive controls how long Squid remembers the IP | |
| 905 | addresses associated with each user. Use a small value | |
| 906 | (e.g., 60 seconds) if your users might change addresses | |
| 907 | quickly, as is the case with dialup. You might be safe | |
| 908 | using a larger value (e.g., 2 hours) in a corporate LAN | |
| 909 | environment with relatively static address assignments. | |
| 910 | DOC_END | |
| 911 | ||
| 912 | COMMENT_START | |
| 913 | ACCESS CONTROLS | |
| 914 | ----------------------------------------------------------------------------- | |
| 915 | COMMENT_END | |
| 916 | ||
| 917 | NAME: external_acl_type | |
| 918 | TYPE: externalAclHelper | |
| 919 | LOC: Config.externalAclHelperList | |
| 920 | DEFAULT: none | |
| 921 | DOC_START | |
| 922 | This option defines external acl classes using a helper program | |
| 923 | to look up the status | |
| 924 | ||
| 925 | external_acl_type name [options] FORMAT /path/to/helper [helper arguments] | |
| 926 | ||
| 927 | Options: | |
| 928 | ||
| 929 | ttl=n TTL in seconds for cached results (defaults to 3600 | |
| 930 | for 1 hour) | |
| 931 | ||
| 932 | negative_ttl=n | |
| 933 | TTL for cached negative lookups (default same | |
| 934 | as ttl) | |
| 935 | ||
| 936 | grace=n Percentage remaining of TTL where a refresh of a | |
| 937 | cached entry should be initiated without needing to | |
| 938 | wait for a new reply. (default is for no grace period) | |
| 939 | ||
| 940 | cache=n The maximum number of entries in the result cache. The | |
| 941 | default limit is 262144 entries. Each cache entry usually | |
| 942 | consumes at least 256 bytes. Squid currently does not remove | |
| 943 | expired cache entries until the limit is reached, so a proxy | |
| 944 | will sooner or later reach the limit. The expanded FORMAT | |
| 945 | value is used as the cache key, so if the details in FORMAT | |
| 946 | are highly variable, a larger cache may be needed to produce | |
| 947 | reduction in helper load. | |
| 948 | ||
| 949 | children-max=n | |
| 950 | Maximum number of acl helper processes spawned to service | |
| 951 | external acl lookups of this type. (default 5) | |
| 952 | ||
| 953 | children-startup=n | |
| 954 | Minimum number of acl helper processes to spawn during | |
| 955 | startup and reconfigure to service external acl lookups | |
| 956 | of this type. (default 0) | |
| 957 | ||
| 958 | children-idle=n | |
| 959 | Number of acl helper processes to keep ahead of traffic | |
| 960 | loads. Squid will spawn this many at once whenever load | |
| 961 | rises above the capabilities of existing processes. | |
| 962 | Up to the value of children-max. (default 1) | |
| 963 | ||
| 964 | concurrency=n concurrency level per process. Only used with helpers | |
| 965 | capable of processing more than one query at a time. | |
| 966 | ||
| 967 | queue-size=N The queue-size option sets the maximum number of | |
| 968 | queued requests. A request is queued when no existing | |
| 969 | helper can accept it due to concurrency limit and no | |
| 970 | new helper can be started due to children-max limit. | |
| 971 | If the queued requests exceed queue size, the acl is | |
| 972 | ignored. The default value is set to 2*children-max. | |
| 973 | ||
| 974 | protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers. | |
| 975 | ||
| 976 | ipv4 / ipv6 IP protocol used to communicate with this helper. | |
| 977 | The default is to auto-detect IPv6 and use it when available. | |
| 978 | ||
| 979 | ||
| 980 | FORMAT is a series of %macro codes. See logformat directive for a full list | |
| 981 | of the accepted codes. Although note that at the time of any external ACL | |
| 982 | being tested data may not be available and thus some %macro expand to '-'. | |
| 983 | ||
| 984 | In addition to the logformat codes; when processing external ACLs these | |
| 985 | additional macros are made available: | |
| 986 | ||
| 987 | %ACL The name of the ACL being tested. | |
| 988 | ||
| 989 | %DATA The ACL arguments specified in the referencing config | |
| 990 | 'acl ... external' line, separated by spaces (an | |
| 991 | "argument string"). see acl external. | |
| 992 | ||
| 993 | If there are no ACL arguments %DATA expands to '-'. | |
| 994 | ||
| 995 | If you do not specify a DATA macro inside FORMAT, | |
| 996 | Squid automatically appends %DATA to your FORMAT. | |
| 997 | Note that Squid-3.x may expand %DATA to whitespace | |
| 998 | or nothing in this case. | |
| 999 | ||
| 1000 | By default, Squid applies URL-encoding to each ACL | |
| 1001 | argument inside the argument string. If an explicit | |
| 1002 | encoding modifier is used (e.g., %#DATA), then Squid | |
| 1003 | encodes the whole argument string as a single token | |
| 1004 | (e.g., with %#DATA, spaces between arguments become | |
| 1005 | %20). | |
| 1006 | ||
| 1007 | If SSL is enabled, the following formatting codes become available: | |
| 1008 | ||
| 1009 | %USER_CERT SSL User certificate in PEM format | |
| 1010 | %USER_CERTCHAIN SSL User certificate chain in PEM format | |
| 1011 | %USER_CERT_xx SSL User certificate subject attribute xx | |
| 1012 | %USER_CA_CERT_xx SSL User certificate issuer attribute xx | |
| 1013 | ||
| 1014 | ||
| 1015 | NOTE: all other format codes accepted by older Squid versions | |
| 1016 | are deprecated. | |
| 1017 | ||
| 1018 | ||
| 1019 | General request syntax: | |
| 1020 | ||
| 1021 | [channel-ID] FORMAT-values | |
| 1022 | ||
| 1023 | ||
| 1024 | FORMAT-values consists of transaction details expanded with | |
| 1025 | whitespace separation per the config file FORMAT specification | |
| 1026 | using the FORMAT macros listed above. | |
| 1027 | ||
| 1028 | Request values sent to the helper are URL escaped to protect | |
| 1029 | each value in requests against whitespaces. | |
| 1030 | ||
| 1031 | If using protocol=2.5 then the request sent to the helper is not | |
| 1032 | URL escaped to protect against whitespace. | |
| 1033 | ||
| 1034 | NOTE: protocol=3.0 is deprecated as no longer necessary. | |
| 1035 | ||
| 1036 | When using the concurrency= option the protocol is changed by | |
| 1037 | introducing a query channel tag in front of the request/response. | |
| 1038 | The query channel tag is a number between 0 and concurrency-1. | |
| 1039 | This value must be echoed back unchanged to Squid as the first part | |
| 1040 | of the response relating to its request. | |
| 1041 | ||
| 1042 | ||
| 1043 | The helper receives lines expanded per the above format specification | |
| 1044 | and for each input line returns 1 line starting with OK/ERR/BH result | |
| 1045 | code and optionally followed by additional keywords with more details. | |
| 1046 | ||
| 1047 | ||
| 1048 | General result syntax: | |
| 1049 | ||
| 1050 | [channel-ID] result keyword=value ... | |
| 1051 | ||
| 1052 | Result consists of one of the codes: | |
| 1053 | ||
| 1054 | OK | |
| 1055 | the ACL test produced a match. | |
| 1056 | ||
| 1057 | ERR | |
| 1058 | the ACL test does not produce a match. | |
| 1059 | ||
| 1060 | BH | |
| 1061 | An internal error occurred in the helper, preventing | |
| 1062 | a result being identified. | |
| 1063 | ||
| 1064 | The meaning of 'a match' is determined by your squid.conf | |
| 1065 | access control configuration. See the Squid wiki for details. | |
| 1066 | ||
| 1067 | Defined keywords: | |
| 1068 | ||
| 1069 | user= The users name (login) | |
| 1070 | ||
| 1071 | password= The users password (for login= cache_peer option) | |
| 1072 | ||
| 1073 | message= Message describing the reason for this response. | |
| 1074 | Available as %o in error pages. | |
| 1075 | Useful on (ERR and BH results). | |
| 1076 | ||
| 1077 | tag= Apply a tag to a request. Only sets a tag once, | |
| 1078 | does not alter existing tags. | |
| 1079 | ||
| 1080 | log= String to be logged in access.log. Available as | |
| 1081 | %ea in logformat specifications. | |
| 1082 | ||
| 1083 | clt_conn_tag= Associates a TAG with the client TCP connection. | |
| 1084 | Please see url_rewrite_program related documentation | |
| 1085 | for this kv-pair. | |
| 1086 | ||
| 1087 | Any keywords may be sent on any response whether OK, ERR or BH. | |
| 1088 | ||
| 1089 | All response keyword values need to be a single token with URL | |
| 1090 | escaping, or enclosed in double quotes (") and escaped using \ on | |
| 1091 | any double quotes or \ characters within the value. The wrapping | |
| 1092 | double quotes are removed before the value is interpreted by Squid. | |
| 1093 | \r and \n are also replace by CR and LF. | |
| 1094 | ||
| 1095 | Some example key values: | |
| 1096 | ||
| 1097 | user=John%20Smith | |
| 1098 | user="John Smith" | |
| 1099 | user="J. \"Bob\" Smith" | |
| 1100 | DOC_END | |
| 1101 | ||
| 1102 | NAME: acl | |
| 1103 | TYPE: acl | |
| 1104 | LOC: Config.namedAcls | |
| 1105 | IF USE_OPENSSL | |
| 1106 | DEFAULT: ssl::certHasExpired ssl_error X509_V_ERR_CERT_HAS_EXPIRED | |
| 1107 | DEFAULT: ssl::certNotYetValid ssl_error X509_V_ERR_CERT_NOT_YET_VALID | |
| 1108 | DEFAULT: ssl::certDomainMismatch ssl_error SQUID_X509_V_ERR_DOMAIN_MISMATCH | |
| 1109 | 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 | |
| 1110 | DEFAULT: ssl::certSelfSigned ssl_error X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT | |
| 1111 | ENDIF | |
| 1112 | DEFAULT: all src all | |
| 1113 | DEFAULT: manager url_regex +i ^[^:]+://[^/]+/squid-internal-mgr/ | |
| 1114 | DEFAULT: localhost src 127.0.0.1/32 ::1 | |
| 1115 | DEFAULT: to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1/128 ::/128 | |
| 1116 | DEFAULT: to_linklocal dst 169.254.0.0/16 fe80::/10 | |
| 1117 | DEFAULT: CONNECT method CONNECT | |
| 1118 | DEFAULT_DOC: ACLs all, manager, localhost, to_localhost, to_linklocal, and CONNECT are predefined. | |
| 1119 | DOC_START | |
| 1120 | Defining an Access List | |
| 1121 | ||
| 1122 | Every access list definition must begin with an aclname and acltype, | |
| 1123 | followed by either type-specific arguments or a quoted filename that | |
| 1124 | they are read from. | |
| 1125 | ||
| 1126 | acl aclname acltype argument ... | |
| 1127 | acl aclname acltype "file" ... | |
| 1128 | ||
| 1129 | When using "file", the file should contain one item per line. | |
| 1130 | ||
| 1131 | ||
| 1132 | ACL Options | |
| 1133 | ||
| 1134 | Some acl types supports options which changes their default behaviour: | |
| 1135 | ||
| 1136 | -i,+i By default, regular expressions are CASE-SENSITIVE. To make them | |
| 1137 | case-insensitive, use the -i option. To return case-sensitive | |
| 1138 | use the +i option between patterns, or make a new ACL line | |
| 1139 | without -i. | |
| 1140 | ||
| 1141 | -n Disable lookups and address type conversions. If lookup or | |
| 1142 | conversion is required because the parameter type (IP or | |
| 1143 | domain name) does not match the message address type (domain | |
| 1144 | name or IP), then the ACL would immediately declare a mismatch | |
| 1145 | without any warnings or lookups. | |
| 1146 | ||
| 1147 | -m[=delimiters] | |
| 1148 | Perform a list membership test, interpreting values as | |
| 1149 | comma-separated token lists and matching against individual | |
| 1150 | tokens instead of whole values. | |
| 1151 | The optional "delimiters" parameter specifies one or more | |
| 1152 | alternative non-alphanumeric delimiter characters. | |
| 1153 | non-alphanumeric delimiter characters. | |
| 1154 | ||
| 1155 | -- Used to stop processing all options, in the case the first acl | |
| 1156 | value has '-' character as first character (for example the '-' | |
| 1157 | is a valid domain name) | |
| 1158 | ||
| 1159 | Some acl types require suspending the current request in order | |
| 1160 | to access some external data source. | |
| 1161 | Those which do are marked with the tag [slow], those which | |
| 1162 | don't are marked as [fast]. | |
| 1163 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl | |
| 1164 | for further information | |
| 1165 | ||
| 1166 | ***** ACL TYPES AVAILABLE ***** | |
| 1167 | ||
| 1168 | acl aclname src ip-address/mask ... # clients IP address [fast] | |
| 1169 | acl aclname src addr1-addr2/mask ... # range of addresses [fast] | |
| 1170 | acl aclname dst [-n] ip-address/mask ... # URL host's IP address [slow] | |
| 1171 | acl aclname localip ip-address/mask ... # IP address the client connected to [fast] | |
| 1172 | ||
| 1173 | IF USE_SQUID_EUI | |
| 1174 | acl aclname arp mac-address ... | |
| 1175 | acl aclname eui64 eui64-address ... | |
| 1176 | # [fast] | |
| 1177 | # MAC (EUI-48) and EUI-64 addresses use xx:xx:xx:xx:xx:xx notation. | |
| 1178 | # | |
| 1179 | # The 'arp' ACL code is not portable to all operating systems. | |
| 1180 | # It works on Linux, Solaris, Windows, FreeBSD, and some other | |
| 1181 | # BSD variants. | |
| 1182 | # | |
| 1183 | # The eui_lookup directive is required to be 'on' (the default) | |
| 1184 | # and Squid built with --enable-eui for MAC/EUI addresses to be | |
| 1185 | # available for this ACL. | |
| 1186 | # | |
| 1187 | # Squid can only determine the MAC/EUI address for IPv4 | |
| 1188 | # clients that are on the same subnet. If the client is on a | |
| 1189 | # different subnet, then Squid cannot find out its address. | |
| 1190 | # | |
| 1191 | # IPv6 protocol does not contain ARP. MAC/EUI is either | |
| 1192 | # encoded directly in the IPv6 address or not available. | |
| 1193 | ENDIF | |
| 1194 | acl aclname clientside_mark mark[/mask] ... | |
| 1195 | # matches CONNMARK of an accepted connection [fast] | |
| 1196 | # DEPRECATED. Use the 'client_connection_mark' instead. | |
| 1197 | ||
| 1198 | acl aclname client_connection_mark mark[/mask] ... | |
| 1199 | # matches CONNMARK of an accepted connection [fast] | |
| 1200 | # | |
| 1201 | # mark and mask are unsigned integers (hex, octal, or decimal). | |
| 1202 | # If multiple marks are given, then the ACL matches if at least | |
| 1203 | # one mark matches. | |
| 1204 | # | |
| 1205 | # Uses netfilter-conntrack library. | |
| 1206 | # Requires building Squid with --enable-linux-netfilter. | |
| 1207 | # | |
| 1208 | # The client, various intermediaries, and Squid itself may set | |
| 1209 | # CONNMARK at various times. The last CONNMARK set wins. This ACL | |
| 1210 | # checks the mark present on an accepted connection or set by | |
| 1211 | # Squid afterwards, depending on the ACL check timing. This ACL | |
| 1212 | # effectively ignores any mark set by other agents after Squid has | |
| 1213 | # accepted the connection. | |
| 1214 | ||
| 1215 | acl aclname srcdomain .foo.com ... | |
| 1216 | # reverse lookup, from client IP [slow] | |
| 1217 | acl aclname dstdomain [-n] .foo.com ... | |
| 1218 | # Destination server from URL [fast] | |
| 1219 | acl aclname srcdom_regex [-i] \.foo\.com ... | |
| 1220 | # POSIX extended regex matching client name [slow] | |
| 1221 | acl aclname dstdom_regex [-n] [-i] \.foo\.com ... | |
| 1222 | # POSIX extended regex matching server [fast] | |
| 1223 | # | |
| 1224 | # For dstdomain and dstdom_regex a reverse lookup is tried if a IP | |
| 1225 | # based URL is used and no match is found. The name "none" is used | |
| 1226 | # if the reverse lookup fails. | |
| 1227 | ||
| 1228 | acl aclname peername myPeer ... | |
| 1229 | acl aclname peername_regex [-i] regex-pattern ... | |
| 1230 | # [fast] | |
| 1231 | # match against a named cache_peer entry | |
| 1232 | # set unique name= on cache_peer lines for reliable use. | |
| 1233 | ||
| 1234 | acl aclname time [day-abbrevs] [h1:m1-h2:m2] | |
| 1235 | # [fast] | |
| 1236 | # day-abbrevs: | |
| 1237 | # S - Sunday | |
| 1238 | # M - Monday | |
| 1239 | # T - Tuesday | |
| 1240 | # W - Wednesday | |
| 1241 | # H - Thursday | |
| 1242 | # F - Friday | |
| 1243 | # A - Saturday | |
| 1244 | # h1:m1 must be less than h2:m2 | |
| 1245 | ||
| 1246 | acl aclname url_regex [-i] ^http:// ... | |
| 1247 | # POSIX extended regex matching on whole URL [fast] | |
| 1248 | # | |
| 1249 | # If request URL contains only valid pct-encoded triplets (RFC 3986), | |
| 1250 | # all of them are decoded before matching (e.g., `%25` triplet is | |
| 1251 | # replaced with a single `%` character). If request URL contains at | |
| 1252 | # least one `%` character that does not start a valid pct-encoded | |
| 1253 | # triplet (e.g., `%%`, `%X`, or `%2Y`), then the URL is not decoded at | |
| 1254 | # all (i.e. the raw request URL is used for matching). | |
| 1255 | # | |
| 1256 | # If a request URL is decoded as described above, then all request URL | |
| 1257 | # characters starting with the decoded `%00` pct-encoded triplet (if | |
| 1258 | # any) are ignored during matching. There is currently no way to match | |
| 1259 | # that triplet itself in a correctly percent-encoded URL. | |
| 1260 | # | |
| 1261 | # ACL parameters are not decoded. | |
| 1262 | ||
| 1263 | acl aclname urllogin [-i] [^a-zA-Z0-9] ... | |
| 1264 | # POSIX extended regex matching on URL login field [fast] | |
| 1265 | # | |
| 1266 | # This ACL does not match requests with a URL that lacks a login field. | |
| 1267 | # | |
| 1268 | # This ACL handles RFC 3986 pct-encoded triplets in the login field as | |
| 1269 | # url_regex ACL handles those triplets in the entire request URL. | |
| 1270 | ||
| 1271 | acl aclname urlpath_regex [-i] \.gif$ ... | |
| 1272 | # POSIX extended regex matching on URL path [fast] | |
| 1273 | ||
| 1274 | acl aclname port 80 70 21 0-1024 ... | |
| 1275 | # destination TCP port (or port range) of the request [fast] | |
| 1276 | # | |
| 1277 | # Port 0 matches requests that have no explicit and no default destination | |
| 1278 | # ports (e.g., HTTP requests with URN targets) | |
| 1279 | ||
| 1280 | acl aclname localport 3128 ... # TCP port the client connected to [fast] | |
| 1281 | # NP: for interception mode this is usually '80' | |
| 1282 | ||
| 1283 | acl aclname myportname 3128 ... # *_port name [fast] | |
| 1284 | ||
| 1285 | acl aclname proto HTTP FTP ... # request protocol [fast] | |
| 1286 | ||
| 1287 | acl aclname method GET POST ... # HTTP request method [fast] | |
| 1288 | ||
| 1289 | acl aclname http_status 200 301 500- 400-403 ... | |
| 1290 | # status code in reply [fast] | |
| 1291 | ||
| 1292 | acl aclname browser [-i] regex ... | |
| 1293 | # POSIX extended regex match on User-Agent header | |
| 1294 | # (see also req_header below) [fast] | |
| 1295 | ||
| 1296 | acl aclname referer_regex [-i] regex ... | |
| 1297 | # POSIX extended regex match on Referer header [fast] | |
| 1298 | # Referer is highly unreliable, so use with care | |
| 1299 | ||
| 1300 | acl aclname proxy_auth [-i] username ... | |
| 1301 | # perform http authentication challenge to the client and match against | |
| 1302 | # supplied credentials [slow] | |
| 1303 | # | |
| 1304 | # takes a list of allowed usernames. | |
| 1305 | # use REQUIRED to accept any valid username. | |
| 1306 | # | |
| 1307 | # See proxy_auth_regex for more information. The two ACLs differ only in | |
| 1308 | # their parameter syntax and username matching algorithm. | |
| 1309 | ||
| 1310 | acl aclname proxy_auth_regex [-i] username_pattern ... | |
| 1311 | # perform http authentication challenge to the client and | |
| 1312 | # POSIX extended regex match on supplied username [slow] | |
| 1313 | # | |
| 1314 | # Will use proxy authentication in forward-proxy scenarios, and plain | |
| 1315 | # http authentication in reverse-proxy scenarios | |
| 1316 | # | |
| 1317 | # NOTE: when a Proxy-Authentication header is sent but it is not | |
| 1318 | # needed during ACL checking the username is NOT logged | |
| 1319 | # in access.log. | |
| 1320 | # | |
| 1321 | # NOTE: proxy_auth requires a EXTERNAL authentication program | |
| 1322 | # to check username/password combinations (see | |
| 1323 | # auth_param directive). | |
| 1324 | # | |
| 1325 | # NOTE: proxy_auth can't be used in a transparent/intercepting proxy | |
| 1326 | # as the browser needs to be configured for using a proxy in order | |
| 1327 | # to respond to proxy authentication. | |
| 1328 | ||
| 1329 | acl aclname snmp_community string ... | |
| 1330 | # A community string to limit access to your SNMP Agent [fast] | |
| 1331 | # Example: | |
| 1332 | # | |
| 1333 | # acl snmppublic snmp_community public | |
| 1334 | ||
| 1335 | acl aclname maxconn number | |
| 1336 | # This will be matched when the client's IP address has | |
| 1337 | # more than <number> TCP connections established. [fast] | |
| 1338 | # NOTE: This only measures direct TCP links so X-Forwarded-For | |
| 1339 | # indirect clients are not counted. | |
| 1340 | ||
| 1341 | acl aclname max_user_ip [-s] number | |
| 1342 | # This will be matched when the user attempts to log in from more | |
| 1343 | # than <number> different ip addresses. The authenticate_ip_ttl | |
| 1344 | # parameter controls the timeout on the ip entries. [fast] | |
| 1345 | # If -s is specified the limit is strict, denying browsing | |
| 1346 | # from any further IP addresses until the ttl has expired. Without | |
| 1347 | # -s Squid will just annoy the user by "randomly" denying requests. | |
| 1348 | # (the counter is reset each time the limit is reached and a | |
| 1349 | # request is denied) | |
| 1350 | # NOTE: in acceleration mode or where there is mesh of child proxies, | |
| 1351 | # clients may appear to come from multiple addresses if they are | |
| 1352 | # going through proxy farms, so a limit of 1 may cause user problems. | |
| 1353 | ||
| 1354 | acl aclname random probability | |
| 1355 | # Pseudo-randomly match requests. Based on the probability given. | |
| 1356 | # Probability may be written as a decimal (0.333), fraction (1/3) | |
| 1357 | # or ratio of matches:non-matches (3:5). | |
| 1358 | ||
| 1359 | acl aclname req_mime_type [-i] mime-type ... | |
| 1360 | # POSIX extended regex match against the mime type of the request generated | |
| 1361 | # by the client. Can be used to detect file upload or some | |
| 1362 | # types HTTP tunneling requests [fast] | |
| 1363 | # NOTE: This does NOT match the reply. You cannot use this | |
| 1364 | # to match the returned file type. | |
| 1365 | ||
| 1366 | acl aclname req_header header-name [-i] any\.regex\.here | |
| 1367 | # POSIX extended regex match against any of the known request headers. May be | |
| 1368 | # thought of as a superset of "browser", "referer" and "mime-type" | |
| 1369 | # ACL [fast] | |
| 1370 | ||
| 1371 | acl aclname rep_mime_type [-i] mime-type ... | |
| 1372 | # POSIX extended regex match against the mime type of the reply received by | |
| 1373 | # squid. Can be used to detect file download or some | |
| 1374 | # types HTTP tunneling requests. [fast] | |
| 1375 | # NOTE: This has no effect in http_access rules. It only has | |
| 1376 | # effect in rules that affect the reply data stream such as | |
| 1377 | # http_reply_access. | |
| 1378 | ||
| 1379 | acl aclname rep_header header-name [-i] any\.regex\.here | |
| 1380 | # POSIX extended regex match against any of the known reply headers. May be | |
| 1381 | # thought of as a superset of "browser", "referer" and "mime-type" | |
| 1382 | # ACLs [fast] | |
| 1383 | ||
| 1384 | acl aclname external class_name [arguments...] | |
| 1385 | # external ACL lookup via a helper class defined by the | |
| 1386 | # external_acl_type directive [slow] | |
| 1387 | ||
| 1388 | acl aclname user_cert attribute values... | |
| 1389 | # match against attributes in a user SSL certificate | |
| 1390 | # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast] | |
| 1391 | ||
| 1392 | acl aclname ca_cert attribute values... | |
| 1393 | # match against attributes a users issuing CA SSL certificate | |
| 1394 | # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast] | |
| 1395 | ||
| 1396 | acl aclname ext_user [-i] username ... | |
| 1397 | # string match on username returned by external acl helper [slow] | |
| 1398 | # use REQUIRED to accept any non-null user name. | |
| 1399 | # | |
| 1400 | # See also: ext_user_regex. The two ACLs differ only in their parameter | |
| 1401 | # syntax and username matching algorithm. | |
| 1402 | ||
| 1403 | acl aclname ext_user_regex [-i] username_pattern ... | |
| 1404 | # POSIX extended regex match on username returned by external acl helper [slow] | |
| 1405 | ||
| 1406 | acl aclname tag tagvalue ... | |
| 1407 | # string match on tag returned by external acl helper [fast] | |
| 1408 | # DEPRECATED. Only the first tag will match with this ACL. | |
| 1409 | # Use the 'note' ACL instead for handling multiple tag values. | |
| 1410 | ||
| 1411 | acl aclname hier_code codename ... | |
| 1412 | # string match against squid hierarchy code(s); [fast] | |
| 1413 | # e.g., DIRECT, PARENT_HIT, NONE, etc. | |
| 1414 | # | |
| 1415 | # NOTE: This has no effect in http_access rules. It only has | |
| 1416 | # effect in rules that affect the reply data stream such as | |
| 1417 | # http_reply_access. | |
| 1418 | ||
| 1419 | acl aclname note [-m[=delimiters]] name [value ...] | |
| 1420 | # match transaction annotation [fast] | |
| 1421 | # Without values, matches any annotation with a given name. | |
| 1422 | # With value(s), matches any annotation with a given name that | |
| 1423 | # also has one of the given values. | |
| 1424 | # If the -m flag is used, then the value of the named | |
| 1425 | # annotation is interpreted as a list of tokens, and the ACL | |
| 1426 | # matches individual name=token pairs rather than whole | |
| 1427 | # name=value pairs. See "ACL Options" above for more info. | |
| 1428 | # Annotation sources include note and adaptation_meta directives | |
| 1429 | # as well as helper and eCAP responses. | |
| 1430 | ||
| 1431 | acl aclname annotate_transaction [-m[=delimiters]] key=value ... | |
| 1432 | acl aclname annotate_transaction [-m[=delimiters]] key+=value ... | |
| 1433 | # Always matches. [fast] | |
| 1434 | # Used for its side effect: This ACL immediately adds a | |
| 1435 | # key=value annotation to the current master transaction. | |
| 1436 | # The added annotation can then be tested using note ACL and | |
| 1437 | # logged (or sent to helpers) using %note format code. | |
| 1438 | # | |
| 1439 | # Annotations can be specified using replacement and addition | |
| 1440 | # formats. The key=value form replaces old same-key annotation | |
| 1441 | # value(s). The key+=value form appends a new value to the old | |
| 1442 | # same-key annotation. Both forms create a new key=value | |
| 1443 | # annotation if no same-key annotation exists already. If | |
| 1444 | # -m flag is used, then the value is interpreted as a list | |
| 1445 | # and the annotation will contain key=token pair(s) instead of the | |
| 1446 | # whole key=value pair. | |
| 1447 | # | |
| 1448 | # This ACL is especially useful for recording complex multi-step | |
| 1449 | # ACL-driven decisions. For example, the following configuration | |
| 1450 | # avoids logging transactions accepted after aclX matched: | |
| 1451 | # | |
| 1452 | # # First, mark transactions accepted after aclX matched | |
| 1453 | # acl markSpecial annotate_transaction special=true | |
| 1454 | # http_access allow acl001 | |
| 1455 | # ... | |
| 1456 | # http_access deny acl100 | |
| 1457 | # http_access allow aclX markSpecial | |
| 1458 | # | |
| 1459 | # # Second, do not log marked transactions: | |
| 1460 | # acl markedSpecial note special true | |
| 1461 | # access_log ... deny markedSpecial | |
| 1462 | # | |
| 1463 | # # Note that the following would not have worked because aclX | |
| 1464 | # # alone does not determine whether the transaction was allowed: | |
| 1465 | # access_log ... deny aclX # Wrong! | |
| 1466 | # | |
| 1467 | # Warning: This ACL annotates the transaction even when negated | |
| 1468 | # and even if subsequent ACLs fail to match. For example, the | |
| 1469 | # following three rules will have exactly the same effect as far | |
| 1470 | # as annotations set by the "mark" ACL are concerned: | |
| 1471 | # | |
| 1472 | # some_directive acl1 ... mark # rule matches if mark is reached | |
| 1473 | # some_directive acl1 ... !mark # rule never matches | |
| 1474 | # some_directive acl1 ... mark !all # rule never matches | |
| 1475 | ||
| 1476 | acl aclname annotate_client [-m[=delimiters]] key=value ... | |
| 1477 | acl aclname annotate_client [-m[=delimiters]] key+=value ... | |
| 1478 | # | |
| 1479 | # Always matches. [fast] | |
| 1480 | # Used for its side effect: This ACL immediately adds a | |
| 1481 | # key=value annotation to the current client-to-Squid | |
| 1482 | # connection. Connection annotations are propagated to the current | |
| 1483 | # and all future master transactions on the annotated connection. | |
| 1484 | # See the annotate_transaction ACL for details. | |
| 1485 | # | |
| 1486 | # For example, the following configuration avoids rewriting URLs | |
| 1487 | # of transactions bumped by SslBump: | |
| 1488 | # | |
| 1489 | # # First, mark bumped connections: | |
| 1490 | # acl markBumped annotate_client bumped=true | |
| 1491 | # ssl_bump peek acl1 | |
| 1492 | # ssl_bump stare acl2 | |
| 1493 | # ssl_bump bump acl3 markBumped | |
| 1494 | # ssl_bump splice all | |
| 1495 | # | |
| 1496 | # # Second, do not send marked transactions to the redirector: | |
| 1497 | # acl markedBumped note bumped true | |
| 1498 | # url_rewrite_access deny markedBumped | |
| 1499 | # | |
| 1500 | # # Note that the following would not have worked because acl3 alone | |
| 1501 | # # does not determine whether the connection is going to be bumped: | |
| 1502 | # url_rewrite_access deny acl3 # Wrong! | |
| 1503 | ||
| 1504 | acl aclname adaptation_service service ... | |
| 1505 | # Matches the name of any icap_service, ecap_service, | |
| 1506 | # adaptation_service_set, or adaptation_service_chain that Squid | |
| 1507 | # has used (or attempted to use) for the master transaction. | |
| 1508 | # This ACL must be defined after the corresponding adaptation | |
| 1509 | # service is named in squid.conf. This ACL is usable with | |
| 1510 | # adaptation_meta because it starts matching immediately after | |
| 1511 | # the service has been selected for adaptation. | |
| 1512 | ||
| 1513 | acl aclname transaction_initiator initiator ... | |
| 1514 | # Matches transaction's initiator [fast] | |
| 1515 | # | |
| 1516 | # Supported initiators are: | |
| 1517 | # certificate-fetching: matches transactions fetching | |
| 1518 | # a missing intermediate TLS certificate | |
| 1519 | # cache-digest: matches transactions fetching Cache Digests | |
| 1520 | # from a cache_peer | |
| 1521 | # htcp: matches HTCP requests from peers | |
| 1522 | # icp: matches ICP requests to peers | |
| 1523 | # icmp: matches ICMP RTT database (NetDB) requests to peers | |
| 1524 | # internal: matches any of the above | |
| 1525 | # client: matches transactions containing an HTTP or FTP | |
| 1526 | # client request received at a Squid *_port | |
| 1527 | # all: matches any transaction, including internal transactions | |
| 1528 | # without a configurable initiator and hopefully rare | |
| 1529 | # transactions without a known-to-Squid initiator | |
| 1530 | # | |
| 1531 | # Multiple initiators are ORed. | |
| 1532 | ||
| 1533 | acl aclname has component | |
| 1534 | # matches a transaction "component" [fast] | |
| 1535 | # | |
| 1536 | # Supported transaction components are: | |
| 1537 | # request: transaction has a request header (at least) | |
| 1538 | # response: transaction has a response header (at least) | |
| 1539 | # ALE: transaction has an internally-generated Access Log Entry | |
| 1540 | # structure; bugs notwithstanding, all transaction have it | |
| 1541 | # | |
| 1542 | # For example, the following configuration helps when dealing with HTTP | |
| 1543 | # clients that close connections without sending a request header: | |
| 1544 | # | |
| 1545 | # acl hasRequest has request | |
| 1546 | # acl logMe note important_transaction | |
| 1547 | # # avoid "logMe ACL is used in context without an HTTP request" warnings | |
| 1548 | # access_log ... logformat=detailed hasRequest logMe | |
| 1549 | # # log request-less transactions, instead of ignoring them | |
| 1550 | # access_log ... logformat=brief !hasRequest | |
| 1551 | # | |
| 1552 | # Multiple components are not supported for one "acl" rule, but | |
| 1553 | # can be specified (and are ORed) using multiple same-name rules: | |
| 1554 | # | |
| 1555 | # # OK, this strange logging daemon needs request or response, | |
| 1556 | # # but can work without either a request or a response: | |
| 1557 | # acl hasWhatMyLoggingDaemonNeeds has request | |
| 1558 | # acl hasWhatMyLoggingDaemonNeeds has response | |
| 1559 | ||
| 1560 | acl aclname at_step step | |
| 1561 | # match against the current request processing step [fast] | |
| 1562 | # Valid steps are: | |
| 1563 | # GeneratingCONNECT: Generating HTTP CONNECT request headers | |
| 1564 | IF USE_OPENSSL | |
| 1565 | # The following ssl_bump processing steps are recognized: | |
| 1566 | # SslBump1: After getting TCP-level and HTTP CONNECT info. | |
| 1567 | # SslBump2: After getting SSL Client Hello info. | |
| 1568 | # SslBump3: After getting SSL Server Hello info. | |
| 1569 | ENDIF | |
| 1570 | ||
| 1571 | IF USE_OPENSSL | |
| 1572 | acl aclname ssl_error errorname | |
| 1573 | # match against SSL certificate validation error [fast] | |
| 1574 | # | |
| 1575 | # When used with sslproxy_cert_error, this ACL tests a single | |
| 1576 | # certificate validation error currently being evaluated by that | |
| 1577 | # directive. When used with slproxy_cert_sign or sslproxy_cert_adapt, | |
| 1578 | # the ACL tests all past certificate validation errors associated with | |
| 1579 | # the current Squid-to-server connection (attempt). This ACL is not yet | |
| 1580 | # supported for use with other directives. | |
| 1581 | # | |
| 1582 | # For valid error names see in @DEFAULT_ERROR_DIR@/templates/error-details.txt | |
| 1583 | # template file. | |
| 1584 | # | |
| 1585 | # The following can be used as shortcuts for certificate properties: | |
| 1586 | # [ssl::]certHasExpired: the "not after" field is in the past | |
| 1587 | # [ssl::]certNotYetValid: the "not before" field is in the future | |
| 1588 | # [ssl::]certUntrusted: The certificate issuer is not to be trusted. | |
| 1589 | # [ssl::]certSelfSigned: The certificate is self signed. | |
| 1590 | # [ssl::]certDomainMismatch: The certificate CN domain does not | |
| 1591 | # match the name the name of the host we are connecting to. | |
| 1592 | # | |
| 1593 | # The ssl::certHasExpired, ssl::certNotYetValid, ssl::certDomainMismatch, | |
| 1594 | # ssl::certUntrusted, and ssl::certSelfSigned can also be used as | |
| 1595 | # predefined ACLs, just like the 'all' ACL. | |
| 1596 | ||
| 1597 | acl aclname server_cert_fingerprint fingerprint | |
| 1598 | # match against server SSL certificate fingerprint [fast] | |
| 1599 | # | |
| 1600 | # The fingerprint is the digest of the DER encoded version | |
| 1601 | # of the whole certificate. The user should use the form: XX:XX:... | |
| 1602 | # The SHA1 digest algorithm is the default and is currently | |
| 1603 | # the only algorithm supported. | |
| 1604 | ||
| 1605 | acl aclname ssl::server_name [option] .foo.com ... | |
| 1606 | # matches server name obtained from various sources [fast] | |
| 1607 | # | |
| 1608 | # The ACL computes server name(s) using such information sources as | |
| 1609 | # CONNECT request URI, TLS client SNI, and TLS server certificate | |
| 1610 | # subject (CN and SubjectAltName). The computed server name(s) usually | |
| 1611 | # change with each SslBump step, as more info becomes available: | |
| 1612 | # * SNI is used as the server name instead of the request URI, | |
| 1613 | # * subject name(s) from the server certificate (CN and | |
| 1614 | # SubjectAltName) are used as the server names instead of SNI. | |
| 1615 | # | |
| 1616 | # When the ACL computes multiple server names, matching any single | |
| 1617 | # computed name is sufficient for the ACL to match. | |
| 1618 | # | |
| 1619 | # The "none" name can be used to match transactions where the ACL | |
| 1620 | # could not compute the server name using any information source | |
| 1621 | # that was both available and allowed to be used by the ACL options at | |
| 1622 | # the ACL evaluation time. | |
| 1623 | # | |
| 1624 | # Unlike dstdomain, this ACL does not perform DNS lookups. | |
| 1625 | # | |
| 1626 | # A server name may be an IP address. For example, subject alternative | |
| 1627 | # names (a.k.a. SANs) in some real server certificates include IPv4 and | |
| 1628 | # IPv6 entries. Internally, Squid uses inet_ntop(3) to prep IP names for | |
| 1629 | # matching. When using IPv6 names, use "::" notation (if applicable). | |
| 1630 | # Do not use brackets. For example: 1080::8:800:200c:417a. | |
| 1631 | # | |
| 1632 | # An ACL option below may be used to restrict what information | |
| 1633 | # sources are used to extract the server names from: | |
| 1634 | # | |
| 1635 | # --client-requested | |
| 1636 | # The server name is SNI regardless of what the server says. | |
| 1637 | # --server-provided | |
| 1638 | # The server name(s) are the certificate subject name(s), regardless | |
| 1639 | # of what the client has requested. If the server certificate is | |
| 1640 | # unavailable, then the name is "none". | |
| 1641 | # --consensus | |
| 1642 | # The server name is either SNI (if SNI matches at least one of the | |
| 1643 | # certificate subject names) or "none" (otherwise). When the server | |
| 1644 | # certificate is unavailable, the consensus server name is SNI. | |
| 1645 | # | |
| 1646 | # Combining multiple options in one ACL is a fatal configuration | |
| 1647 | # error. | |
| 1648 | # | |
| 1649 | # For all options: If no SNI is available, then the CONNECT request | |
| 1650 | # target (a.k.a. URI) is used instead of SNI (for an intercepted | |
| 1651 | # connection, this target is the destination IP address). | |
| 1652 | ||
| 1653 | acl aclname ssl::server_name_regex [-i] \.foo\.com ... | |
| 1654 | # POSIX extended regex matches server name obtained from various sources [fast] | |
| 1655 | # | |
| 1656 | # See ssl::server_name for details, including IPv6 address formatting | |
| 1657 | # caveats. Use case-insensitive matching (i.e. -i option) to reduce | |
| 1658 | # dependency on how Squid formats or sanitizes server names. | |
| 1659 | ||
| 1660 | acl aclname connections_encrypted | |
| 1661 | # matches transactions with all HTTP messages received over TLS | |
| 1662 | # transport connections. [fast] | |
| 1663 | # | |
| 1664 | # The master transaction deals with HTTP messages received from | |
| 1665 | # various sources. All sources used by the master transaction in the | |
| 1666 | # past are considered by the ACL. The following rules define whether | |
| 1667 | # a given message source taints the entire master transaction, | |
| 1668 | # resulting in ACL mismatches: | |
| 1669 | # | |
| 1670 | # * The HTTP client transport connection is not TLS. | |
| 1671 | # * An adaptation service connection-encryption flag is off. | |
| 1672 | # * The peer or origin server transport connection is not TLS. | |
| 1673 | # | |
| 1674 | # Caching currently does not affect these rules. This cache ignorance | |
| 1675 | # implies that only the current HTTP client transport and REQMOD | |
| 1676 | # services status determine whether this ACL matches a from-cache | |
| 1677 | # transaction. The source of the cached response does not have any | |
| 1678 | # effect on future transaction that use the cached response without | |
| 1679 | # revalidation. This may change. | |
| 1680 | # | |
| 1681 | # DNS, ICP, and HTCP exchanges during the master transaction do not | |
| 1682 | # affect these rules. | |
| 1683 | ENDIF | |
| 1684 | acl aclname any-of acl1 acl2 ... | |
| 1685 | # match any one of the acls [fast or slow] | |
| 1686 | # The first matching ACL stops further ACL evaluation. | |
| 1687 | # | |
| 1688 | # ACLs from multiple any-of lines with the same name are ORed. | |
| 1689 | # For example, A = (a1 or a2) or (a3 or a4) can be written as | |
| 1690 | # acl A any-of a1 a2 | |
| 1691 | # acl A any-of a3 a4 | |
| 1692 | # | |
| 1693 | # This group ACL is fast if all evaluated ACLs in the group are fast | |
| 1694 | # and slow otherwise. | |
| 1695 | ||
| 1696 | acl aclname all-of acl1 acl2 ... | |
| 1697 | # match all of the acls [fast or slow] | |
| 1698 | # The first mismatching ACL stops further ACL evaluation. | |
| 1699 | # | |
| 1700 | # ACLs from multiple all-of lines with the same name are ORed. | |
| 1701 | # For example, B = (b1 and b2) or (b3 and b4) can be written as | |
| 1702 | # acl B all-of b1 b2 | |
| 1703 | # acl B all-of b3 b4 | |
| 1704 | # | |
| 1705 | # This group ACL is fast if all evaluated ACLs in the group are fast | |
| 1706 | # and slow otherwise. | |
| 1707 | ||
| 1708 | Examples: | |
| 1709 | acl macaddress arp 09:00:2b:23:45:67 | |
| 1710 | acl password proxy_auth REQUIRED | |
| 1711 | acl fileupload req_mime_type -i ^multipart/form-data$ | |
| 1712 | acl javascript rep_mime_type -i ^application/x-javascript$ | |
| 1713 | ||
| 1714 | CONFIG_START | |
| 1715 | # | |
| 1716 | # Recommended minimum configuration: | |
| 1717 | # | |
| 1718 | ||
| 1719 | # Example rule allowing access from your local networks. | |
| 1720 | # Adapt to list your (internal) IP networks from where browsing | |
| 1721 | # should be allowed | |
| 1722 | acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN) | |
| 1723 | acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN) | |
| 1724 | acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN) | |
| 1725 | acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines | |
| 1726 | acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN) | |
| 1727 | acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN) | |
| 1728 | acl localnet src fc00::/7 # RFC 4193 local private network range | |
| 1729 | acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines | |
| 1730 | ||
| 1731 | acl SSL_ports port 443 | |
| 1732 | acl Safe_ports port 80 # http | |
| 1733 | acl Safe_ports port 21 # ftp | |
| 1734 | acl Safe_ports port 443 # https | |
| 1735 | acl Safe_ports port 70 # gopher | |
| 1736 | acl Safe_ports port 210 # wais | |
| 1737 | acl Safe_ports port 1025-65535 # unregistered ports | |
| 1738 | acl Safe_ports port 280 # http-mgmt | |
| 1739 | acl Safe_ports port 488 # gss-http | |
| 1740 | acl Safe_ports port 591 # filemaker | |
| 1741 | acl Safe_ports port 777 # multiling http | |
| 1742 | CONFIG_END | |
| 1743 | DOC_END | |
| 1744 | ||
| 1745 | NAME: proxy_protocol_access | |
| 1746 | TYPE: acl_access | |
| 1747 | LOC: Config.accessList.proxyProtocol | |
| 1748 | DEFAULT: none | |
| 1749 | DEFAULT_DOC: all TCP connections to ports with require-proxy-header will be denied | |
| 1750 | DOC_START | |
| 1751 | Determine which client proxies can be trusted to provide correct | |
| 1752 | information regarding real client IP address using PROXY protocol. | |
| 1753 | ||
| 1754 | Requests may pass through a chain of several other proxies | |
| 1755 | before reaching us. The original source details may by sent in: | |
| 1756 | * HTTP message Forwarded header, or | |
| 1757 | * HTTP message X-Forwarded-For header, or | |
| 1758 | * PROXY protocol connection header. | |
| 1759 | ||
| 1760 | This directive is solely for validating new PROXY protocol | |
| 1761 | connections received from a port flagged with require-proxy-header. | |
| 1762 | It is checked only once after TCP connection setup. | |
| 1763 | ||
| 1764 | A deny match results in TCP connection closure. | |
| 1765 | ||
| 1766 | An allow match is required for Squid to permit the corresponding | |
| 1767 | TCP connection, before Squid even looks for HTTP request headers. | |
| 1768 | If there is an allow match, Squid starts using PROXY header information | |
| 1769 | to determine the source address of the connection for all future ACL | |
| 1770 | checks, logging, etc. | |
| 1771 | ||
| 1772 | SECURITY CONSIDERATIONS: | |
| 1773 | ||
| 1774 | Any host from which we accept client IP details can place | |
| 1775 | incorrect information in the relevant header, and Squid | |
| 1776 | will use the incorrect information as if it were the | |
| 1777 | source address of the request. This may enable remote | |
| 1778 | hosts to bypass any access control restrictions that are | |
| 1779 | based on the client's source addresses. | |
| 1780 | ||
| 1781 | This clause only supports fast acl types. | |
| 1782 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 1783 | DOC_END | |
| 1784 | ||
| 1785 | NAME: follow_x_forwarded_for | |
| 1786 | TYPE: acl_access | |
| 1787 | IFDEF: FOLLOW_X_FORWARDED_FOR | |
| 1788 | LOC: Config.accessList.followXFF | |
| 1789 | DEFAULT_IF_NONE: deny all | |
| 1790 | DEFAULT_DOC: X-Forwarded-For header will be ignored. | |
| 1791 | DOC_START | |
| 1792 | Determine which client proxies can be trusted to provide correct | |
| 1793 | information regarding real client IP address. | |
| 1794 | ||
| 1795 | Requests may pass through a chain of several other proxies | |
| 1796 | before reaching us. The original source details may by sent in: | |
| 1797 | * HTTP message Forwarded header, or | |
| 1798 | * HTTP message X-Forwarded-For header, or | |
| 1799 | * PROXY protocol connection header. | |
| 1800 | ||
| 1801 | PROXY protocol connections are controlled by the proxy_protocol_access | |
| 1802 | directive which is checked before this. | |
| 1803 | ||
| 1804 | If a request reaches us from a source that is allowed by this | |
| 1805 | directive, then we trust the information it provides regarding | |
| 1806 | the IP of the client it received from (if any). | |
| 1807 | ||
| 1808 | For the purpose of ACLs used in this directive the src ACL type always | |
| 1809 | matches the address we are testing and srcdomain matches its rDNS. | |
| 1810 | ||
| 1811 | On each HTTP request Squid checks for X-Forwarded-For header fields. | |
| 1812 | If found the header values are iterated in reverse order and an allow | |
| 1813 | match is required for Squid to continue on to the next value. | |
| 1814 | The verification ends when a value receives a deny match, cannot be | |
| 1815 | tested, or there are no more values to test. | |
| 1816 | NOTE: Squid does not yet follow the Forwarded HTTP header. | |
| 1817 | ||
| 1818 | The end result of this process is an IP address that we will | |
| 1819 | refer to as the indirect client address. This address may | |
| 1820 | be treated as the client address for access control, ICAP, delay | |
| 1821 | pools and logging, depending on the acl_uses_indirect_client, | |
| 1822 | icap_uses_indirect_client, delay_pool_uses_indirect_client, | |
| 1823 | log_uses_indirect_client and tproxy_uses_indirect_client options. | |
| 1824 | ||
| 1825 | This clause only supports fast acl types. | |
| 1826 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 1827 | ||
| 1828 | SECURITY CONSIDERATIONS: | |
| 1829 | ||
| 1830 | Any host from which we accept client IP details can place | |
| 1831 | incorrect information in the relevant header, and Squid | |
| 1832 | will use the incorrect information as if it were the | |
| 1833 | source address of the request. This may enable remote | |
| 1834 | hosts to bypass any access control restrictions that are | |
| 1835 | based on the client's source addresses. | |
| 1836 | ||
| 1837 | For example: | |
| 1838 | ||
| 1839 | acl localhost src 127.0.0.1 | |
| 1840 | acl my_other_proxy srcdomain .proxy.example.com | |
| 1841 | follow_x_forwarded_for allow localhost | |
| 1842 | follow_x_forwarded_for allow my_other_proxy | |
| 1843 | DOC_END | |
| 1844 | ||
| 1845 | NAME: acl_uses_indirect_client | |
| 1846 | COMMENT: on|off | |
| 1847 | TYPE: onoff | |
| 1848 | IFDEF: FOLLOW_X_FORWARDED_FOR | |
| 1849 | DEFAULT: on | |
| 1850 | LOC: Config.onoff.acl_uses_indirect_client | |
| 1851 | DOC_START | |
| 1852 | Controls whether the indirect client address | |
| 1853 | (see follow_x_forwarded_for) is used instead of the | |
| 1854 | direct client address in acl matching. | |
| 1855 | ||
| 1856 | NOTE: maxconn ACL considers direct TCP links and indirect | |
| 1857 | clients will always have zero. So no match. | |
| 1858 | DOC_END | |
| 1859 | ||
| 1860 | NAME: delay_pool_uses_indirect_client | |
| 1861 | COMMENT: on|off | |
| 1862 | TYPE: onoff | |
| 1863 | IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_DELAY_POOLS | |
| 1864 | DEFAULT: on | |
| 1865 | LOC: Config.onoff.delay_pool_uses_indirect_client | |
| 1866 | DOC_START | |
| 1867 | Controls whether the indirect client address | |
| 1868 | (see follow_x_forwarded_for) is used instead of the | |
| 1869 | direct client address in delay pools. | |
| 1870 | DOC_END | |
| 1871 | ||
| 1872 | NAME: log_uses_indirect_client | |
| 1873 | COMMENT: on|off | |
| 1874 | TYPE: onoff | |
| 1875 | IFDEF: FOLLOW_X_FORWARDED_FOR | |
| 1876 | DEFAULT: on | |
| 1877 | LOC: Config.onoff.log_uses_indirect_client | |
| 1878 | DOC_START | |
| 1879 | Controls whether the indirect client address | |
| 1880 | (see follow_x_forwarded_for) is used instead of the | |
| 1881 | direct client address in the access log. | |
| 1882 | DOC_END | |
| 1883 | ||
| 1884 | NAME: tproxy_uses_indirect_client | |
| 1885 | COMMENT: on|off | |
| 1886 | TYPE: onoff | |
| 1887 | IFDEF: FOLLOW_X_FORWARDED_FOR&&LINUX_NETFILTER | |
| 1888 | DEFAULT: off | |
| 1889 | LOC: Config.onoff.tproxy_uses_indirect_client | |
| 1890 | DOC_START | |
| 1891 | Controls whether the indirect client address | |
| 1892 | (see follow_x_forwarded_for) is used instead of the | |
| 1893 | direct client address when spoofing the outgoing client. | |
| 1894 | ||
| 1895 | This has no effect on requests arriving in non-tproxy | |
| 1896 | mode ports. | |
| 1897 | ||
| 1898 | SECURITY WARNING: Usage of this option is dangerous | |
| 1899 | and should not be used trivially. Correct configuration | |
| 1900 | of follow_x_forwarded_for with a limited set of trusted | |
| 1901 | sources is required to prevent abuse of your proxy. | |
| 1902 | DOC_END | |
| 1903 | ||
| 1904 | NAME: spoof_client_ip | |
| 1905 | TYPE: acl_access | |
| 1906 | LOC: Config.accessList.spoof_client_ip | |
| 1907 | DEFAULT: none | |
| 1908 | DEFAULT_DOC: Allow spoofing on all TPROXY traffic. | |
| 1909 | DOC_START | |
| 1910 | Control client IP address spoofing of TPROXY traffic based on | |
| 1911 | defined access lists. | |
| 1912 | ||
| 1913 | spoof_client_ip allow|deny [!]aclname ... | |
| 1914 | ||
| 1915 | If there are no "spoof_client_ip" lines present, the default | |
| 1916 | is to "allow" spoofing of any suitable request. | |
| 1917 | ||
| 1918 | Note that the cache_peer "no-tproxy" option overrides this ACL. | |
| 1919 | ||
| 1920 | This clause supports fast acl types. | |
| 1921 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 1922 | DOC_END | |
| 1923 | ||
| 1924 | NAME: http_access | |
| 1925 | TYPE: acl_access | |
| 1926 | LOC: Config.accessList.http | |
| 1927 | DEFAULT_IF_NONE: deny all | |
| 1928 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
| 1929 | DOC_START | |
| 1930 | Allowing or Denying access based on defined access lists | |
| 1931 | ||
| 1932 | To allow or deny a message received on an HTTP, HTTPS, or FTP port: | |
| 1933 | http_access allow|deny [!]aclname ... | |
| 1934 | ||
| 1935 | NOTE on default values: | |
| 1936 | ||
| 1937 | If there are no "access" lines present, the default is to deny | |
| 1938 | the request. | |
| 1939 | ||
| 1940 | If none of the "access" lines cause a match, the default is the | |
| 1941 | opposite of the last line in the list. If the last line was | |
| 1942 | deny, the default is allow. Conversely, if the last line | |
| 1943 | is allow, the default will be deny. For these reasons, it is a | |
| 1944 | good idea to have an "deny all" entry at the end of your access | |
| 1945 | lists to avoid potential confusion. | |
| 1946 | ||
| 1947 | This clause supports both fast and slow acl types. | |
| 1948 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 1949 | ||
| 1950 | CONFIG_START | |
| 1951 | ||
| 1952 | # | |
| 1953 | # Recommended minimum Access Permission configuration: | |
| 1954 | # | |
| 1955 | # Deny requests to certain unsafe ports | |
| 1956 | http_access deny !Safe_ports | |
| 1957 | ||
| 1958 | # Deny CONNECT to other than secure SSL ports | |
| 1959 | http_access deny CONNECT !SSL_ports | |
| 1960 | ||
| 1961 | # Only allow cachemgr access from localhost | |
| 1962 | http_access allow localhost manager | |
| 1963 | http_access deny manager | |
| 1964 | ||
| 1965 | # This default configuration only allows localhost requests because a more | |
| 1966 | # permissive Squid installation could introduce new attack vectors into the | |
| 1967 | # network by proxying external TCP connections to unprotected services. | |
| 1968 | http_access allow localhost | |
| 1969 | ||
| 1970 | # The two deny rules below are unnecessary in this default configuration | |
| 1971 | # because they are followed by a "deny all" rule. However, they may become | |
| 1972 | # critically important when you start allowing external requests below them. | |
| 1973 | ||
| 1974 | # Protect web applications running on the same server as Squid. They often | |
| 1975 | # assume that only local users can access them at "localhost" ports. | |
| 1976 | http_access deny to_localhost | |
| 1977 | ||
| 1978 | # Protect cloud servers that provide local users with sensitive info about | |
| 1979 | # their server via certain well-known link-local (a.k.a. APIPA) addresses. | |
| 1980 | http_access deny to_linklocal | |
| 1981 | ||
| 1982 | # | |
| 1983 | # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS | |
| 1984 | # | |
| 1985 | ||
| 1986 | # For example, to allow access from your local networks, you may uncomment the | |
| 1987 | # following rule (and/or add rules that match your definition of "local"): | |
| 1988 | # http_access allow localnet | |
| 1989 | ||
| 1990 | # And finally deny all other access to this proxy | |
| 1991 | http_access deny all | |
| 1992 | CONFIG_END | |
| 1993 | DOC_END | |
| 1994 | ||
| 1995 | NAME: adapted_http_access http_access2 | |
| 1996 | TYPE: acl_access | |
| 1997 | LOC: Config.accessList.adapted_http | |
| 1998 | DEFAULT: none | |
| 1999 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. | |
| 2000 | DOC_START | |
| 2001 | Allowing or Denying access based on defined access lists | |
| 2002 | ||
| 2003 | Essentially identical to http_access, but runs after redirectors | |
| 2004 | and ICAP/eCAP adaptation. Allowing access control based on their | |
| 2005 | output. | |
| 2006 | ||
| 2007 | If not set then only http_access is used. | |
| 2008 | DOC_END | |
| 2009 | ||
| 2010 | NAME: http_reply_access | |
| 2011 | TYPE: acl_access | |
| 2012 | LOC: Config.accessList.reply | |
| 2013 | DEFAULT: none | |
| 2014 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. | |
| 2015 | DOC_START | |
| 2016 | Allow replies to client requests. This is complementary to http_access. | |
| 2017 | ||
| 2018 | http_reply_access allow|deny [!] aclname ... | |
| 2019 | ||
| 2020 | NOTE: if there are no access lines present, the default is to allow | |
| 2021 | all replies. | |
| 2022 | ||
| 2023 | If none of the access lines cause a match the opposite of the | |
| 2024 | last line will apply. Thus it is good practice to end the rules | |
| 2025 | with an "allow all" or "deny all" entry. | |
| 2026 | ||
| 2027 | This clause supports both fast and slow acl types. | |
| 2028 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 2029 | DOC_END | |
| 2030 | ||
| 2031 | NAME: icp_access | |
| 2032 | TYPE: acl_access | |
| 2033 | LOC: Config.accessList.icp | |
| 2034 | DEFAULT: none | |
| 2035 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
| 2036 | DOC_START | |
| 2037 | Allowing or Denying access to the ICP port based on defined | |
| 2038 | access lists | |
| 2039 | ||
| 2040 | icp_access allow|deny [!]aclname ... | |
| 2041 | ||
| 2042 | NOTE: The default if no icp_access lines are present is to | |
| 2043 | deny all traffic. This default may cause problems with peers | |
| 2044 | using ICP. | |
| 2045 | ||
| 2046 | This clause only supports fast acl types. | |
| 2047 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 2048 | ||
| 2049 | # Allow ICP queries from local networks only | |
| 2050 | #icp_access allow localnet | |
| 2051 | #icp_access deny all | |
| 2052 | DOC_END | |
| 2053 | ||
| 2054 | NAME: htcp_access | |
| 2055 | IFDEF: USE_HTCP | |
| 2056 | TYPE: acl_access | |
| 2057 | LOC: Config.accessList.htcp | |
| 2058 | DEFAULT: none | |
| 2059 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
| 2060 | DOC_START | |
| 2061 | Controls whether HTCP TST requests received on htcp_port are allowed. | |
| 2062 | ||
| 2063 | htcp_access allow|deny [!]aclname ... | |
| 2064 | ||
| 2065 | This directive does not control whether HTCP CLR requests are allowed. | |
| 2066 | Use htcp_clr_access directive for that. | |
| 2067 | ||
| 2068 | This directive does not control whether HTCP requests with other opcodes | |
| 2069 | are allowed (e.g., NOP, MON, and SET). Squid ignores those HTCP requests. | |
| 2070 | ||
| 2071 | NOTE: The default if no htcp_access lines are present is to | |
| 2072 | deny all HTCP TST traffic. This default may cause problems with peers | |
| 2073 | using the htcp option. | |
| 2074 | ||
| 2075 | This clause only supports fast acl types. | |
| 2076 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 2077 | ||
| 2078 | # Allow HTCP TST queries from local networks only | |
| 2079 | #htcp_access allow localnet | |
| 2080 | #htcp_access deny all | |
| 2081 | DOC_END | |
| 2082 | ||
| 2083 | NAME: htcp_clr_access | |
| 2084 | IFDEF: USE_HTCP | |
| 2085 | TYPE: acl_access | |
| 2086 | LOC: Config.accessList.htcp_clr | |
| 2087 | DEFAULT: none | |
| 2088 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
| 2089 | DOC_START | |
| 2090 | Controls whether HTCP CLR requests received on htcp_port are allowed. | |
| 2091 | See htcp_access for controlling other HTCP messages. | |
| 2092 | ||
| 2093 | htcp_clr_access allow|deny [!]aclname ... | |
| 2094 | ||
| 2095 | HTCP CLR requests purge matching cached entries. They may be forwarded to | |
| 2096 | specially marked cache_peers (see cache_peer HTCP options for details). | |
| 2097 | ||
| 2098 | This clause only supports fast acl types. | |
| 2099 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 2100 | ||
| 2101 | # Allow HTCP CLR requests from trusted peers | |
| 2102 | acl htcp_clr_peer src 192.0.2.2 2001:DB8::2 | |
| 2103 | htcp_clr_access allow htcp_clr_peer | |
| 2104 | htcp_clr_access deny all | |
| 2105 | DOC_END | |
| 2106 | ||
| 2107 | NAME: miss_access | |
| 2108 | TYPE: acl_access | |
| 2109 | LOC: Config.accessList.miss | |
| 2110 | DEFAULT: none | |
| 2111 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. | |
| 2112 | DOC_START | |
| 2113 | Determines whether network access is permitted when satisfying a request. | |
| 2114 | ||
| 2115 | For example; | |
| 2116 | to force your neighbors to use you as a sibling instead of | |
| 2117 | a parent. | |
| 2118 | ||
| 2119 | acl localclients src 192.0.2.0/24 2001:DB8::a:0/64 | |
| 2120 | miss_access deny !localclients | |
| 2121 | miss_access allow all | |
| 2122 | ||
| 2123 | This means only your local clients are allowed to fetch relayed/MISS | |
| 2124 | replies from the network and all other clients can only fetch cached | |
| 2125 | objects (HITs). | |
| 2126 | ||
| 2127 | The default for this setting allows all clients who passed the | |
| 2128 | http_access rules to relay via this proxy. | |
| 2129 | ||
| 2130 | This clause only supports fast acl types. | |
| 2131 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 2132 | DOC_END | |
| 2133 | ||
| 2134 | NAME: reply_body_max_size | |
| 2135 | COMMENT: size [acl acl...] | |
| 2136 | TYPE: acl_b_size_t | |
| 2137 | DEFAULT: none | |
| 2138 | DEFAULT_DOC: No limit is applied. | |
| 2139 | LOC: Config.ReplyBodySize | |
| 2140 | DOC_START | |
| 2141 | This option specifies the maximum size of a reply body. It can be | |
| 2142 | used to prevent users from downloading very large files, such as | |
| 2143 | MP3's and movies. When the reply headers are received, the | |
| 2144 | reply_body_max_size lines are processed, and the first line where | |
| 2145 | all (if any) listed ACLs are true is used as the maximum body size | |
| 2146 | for this reply. | |
| 2147 | ||
| 2148 | This size is checked twice. First when we get the reply headers, | |
| 2149 | we check the content-length value. If the content length value exists | |
| 2150 | and is larger than the allowed size, the request is denied and the | |
| 2151 | user receives an error message that says "the request or reply | |
| 2152 | is too large." If there is no content-length, and the reply | |
| 2153 | size exceeds this limit, the client's connection is just closed | |
| 2154 | and they will receive a partial reply. | |
| 2155 | ||
| 2156 | WARNING: downstream caches probably can not detect a partial reply | |
| 2157 | if there is no content-length header, so they will cache | |
| 2158 | partial responses and give them out as hits. You should NOT | |
| 2159 | use this option if you have downstream caches. | |
| 2160 | ||
| 2161 | WARNING: A maximum size smaller than the size of squid's error messages | |
| 2162 | will cause an infinite loop and crash squid. Ensure that the smallest | |
| 2163 | non-zero value you use is greater that the maximum header size plus | |
| 2164 | the size of your largest error page. | |
| 2165 | ||
| 2166 | If you set this parameter none (the default), there will be | |
| 2167 | no limit imposed. | |
| 2168 | ||
| 2169 | Configuration Format is: | |
| 2170 | reply_body_max_size SIZE UNITS [acl ...] | |
| 2171 | ie. | |
| 2172 | reply_body_max_size 10 MB | |
| 2173 | ||
| 2174 | DOC_END | |
| 2175 | ||
| 2176 | NAME: on_unsupported_protocol | |
| 2177 | TYPE: on_unsupported_protocol | |
| 2178 | LOC: Config.accessList.on_unsupported_protocol | |
| 2179 | DEFAULT: none | |
| 2180 | DEFAULT_DOC: Respond with an error message to unidentifiable traffic | |
| 2181 | DOC_START | |
| 2182 | Determines Squid behavior when encountering strange requests at the | |
| 2183 | beginning of an accepted TCP connection or the beginning of a bumped | |
| 2184 | CONNECT tunnel. Controlling Squid reaction to unexpected traffic is | |
| 2185 | especially useful in interception environments where Squid is likely | |
| 2186 | to see connections for unsupported protocols that Squid should either | |
| 2187 | terminate or tunnel at TCP level. | |
| 2188 | ||
| 2189 | on_unsupported_protocol <action> [!]acl ... | |
| 2190 | ||
| 2191 | The first matching action wins. Only fast ACLs are supported. | |
| 2192 | ||
| 2193 | Supported actions are: | |
| 2194 | ||
| 2195 | tunnel: Establish a TCP connection with the intended server and | |
| 2196 | blindly shovel TCP packets between the client and server. | |
| 2197 | ||
| 2198 | respond: Respond with an error message, using the transfer protocol | |
| 2199 | for the Squid port that received the request (e.g., HTTP | |
| 2200 | for connections intercepted at the http_port). This is the | |
| 2201 | default. | |
| 2202 | ||
| 2203 | Squid expects the following traffic patterns: | |
| 2204 | ||
| 2205 | http_port: a plain HTTP request | |
| 2206 | https_port: SSL/TLS handshake followed by an [encrypted] HTTP request | |
| 2207 | ftp_port: a plain FTP command (no on_unsupported_protocol support yet!) | |
| 2208 | CONNECT tunnel on http_port: same as https_port | |
| 2209 | CONNECT tunnel on https_port: same as https_port | |
| 2210 | ||
| 2211 | Currently, this directive has effect on intercepted connections and | |
| 2212 | bumped tunnels only. Other cases are not supported because Squid | |
| 2213 | cannot know the intended destination of other traffic. | |
| 2214 | ||
| 2215 | For example: | |
| 2216 | # define what Squid errors indicate receiving non-HTTP traffic: | |
| 2217 | acl foreignProtocol squid_error ERR_PROTOCOL_UNKNOWN ERR_TOO_BIG | |
| 2218 | # define what Squid errors indicate receiving nothing: | |
| 2219 | acl serverTalksFirstProtocol squid_error ERR_REQUEST_START_TIMEOUT | |
| 2220 | # tunnel everything that does not look like HTTP: | |
| 2221 | on_unsupported_protocol tunnel foreignProtocol | |
| 2222 | # tunnel if we think the client waits for the server to talk first: | |
| 2223 | on_unsupported_protocol tunnel serverTalksFirstProtocol | |
| 2224 | # in all other error cases, just send an HTTP "error page" response: | |
| 2225 | on_unsupported_protocol respond all | |
| 2226 | ||
| 2227 | See also: squid_error ACL | |
| 2228 | DOC_END | |
| 2229 | ||
| 2230 | NAME: auth_schemes | |
| 2231 | TYPE: AuthSchemes | |
| 2232 | IFDEF: USE_AUTH | |
| 2233 | LOC: Auth::TheConfig.schemeAccess | |
| 2234 | DEFAULT: none | |
| 2235 | DEFAULT_DOC: use all auth_param schemes in their configuration order | |
| 2236 | DOC_START | |
| 2237 | Use this directive to customize authentication schemes presence and | |
| 2238 | order in Squid's Unauthorized and Authentication Required responses. | |
| 2239 | ||
| 2240 | auth_schemes scheme1,scheme2,... [!]aclname ... | |
| 2241 | ||
| 2242 | where schemeN is the name of one of the authentication schemes | |
| 2243 | configured using auth_param directives. At least one scheme name is | |
| 2244 | required. Multiple scheme names are separated by commas. Either | |
| 2245 | avoid whitespace or quote the entire schemes list. | |
| 2246 | ||
| 2247 | A special "ALL" scheme name expands to all auth_param-configured | |
| 2248 | schemes in their configuration order. This directive cannot be used | |
| 2249 | to configure Squid to offer no authentication schemes at all. | |
| 2250 | ||
| 2251 | The first matching auth_schemes rule determines the schemes order | |
| 2252 | for the current Authentication Required transaction. Note that the | |
| 2253 | future response is not yet available during auth_schemes evaluation. | |
| 2254 | ||
| 2255 | If this directive is not used or none of its rules match, then Squid | |
| 2256 | responds with all configured authentication schemes in the order of | |
| 2257 | auth_param directives in the configuration file. | |
| 2258 | ||
| 2259 | This directive does not determine when authentication is used or | |
| 2260 | how each authentication scheme authenticates clients. | |
| 2261 | ||
| 2262 | The following example sends basic and negotiate authentication | |
| 2263 | schemes, in that order, when requesting authentication of HTTP | |
| 2264 | requests matching the isIE ACL (not shown) while sending all | |
| 2265 | auth_param schemes in their configuration order to other clients: | |
| 2266 | ||
| 2267 | auth_schemes basic,negotiate isIE | |
| 2268 | auth_schemes ALL all # explicit default | |
| 2269 | ||
| 2270 | This directive supports fast ACLs only. | |
| 2271 | ||
| 2272 | See also: auth_param. | |
| 2273 | DOC_END | |
| 2274 | ||
| 2275 | COMMENT_START | |
| 2276 | NETWORK OPTIONS | |
| 2277 | ----------------------------------------------------------------------------- | |
| 2278 | COMMENT_END | |
| 2279 | ||
| 2280 | NAME: http_port ascii_port | |
| 2281 | TYPE: PortCfg | |
| 2282 | DEFAULT: none | |
| 2283 | LOC: HttpPortList | |
| 2284 | DOC_START | |
| 2285 | Usage: port [mode] [options] | |
| 2286 | hostname:port [mode] [options] | |
| 2287 | 1.2.3.4:port [mode] [options] | |
| 2288 | ||
| 2289 | The socket addresses where Squid will listen for HTTP client | |
| 2290 | requests. You may specify multiple socket addresses. | |
| 2291 | There are three forms: port alone, hostname with port, and | |
| 2292 | IP address with port. If you specify a hostname or IP | |
| 2293 | address, Squid binds the socket to that specific | |
| 2294 | address. Most likely, you do not need to bind to a specific | |
| 2295 | address, so you can use the port number alone. | |
| 2296 | ||
| 2297 | If you are running Squid in accelerator mode, you | |
| 2298 | probably want to listen on port 80 also, or instead. | |
| 2299 | ||
| 2300 | The -a command line option may be used to specify additional | |
| 2301 | port(s) where Squid listens for proxy request. Such ports will | |
| 2302 | be plain proxy ports with no options. | |
| 2303 | ||
| 2304 | You may specify multiple socket addresses on multiple lines. | |
| 2305 | ||
| 2306 | Modes: | |
| 2307 | ||
| 2308 | intercept Support for IP-Layer NAT interception delivering | |
| 2309 | traffic to this Squid port. | |
| 2310 | NP: disables authentication on the port. | |
| 2311 | ||
| 2312 | tproxy Support Linux TPROXY (or BSD divert-to) with spoofing | |
| 2313 | of outgoing connections using the client IP address. | |
| 2314 | NP: disables authentication on the port. | |
| 2315 | ||
| 2316 | accel Accelerator / reverse proxy mode | |
| 2317 | ||
| 2318 | ssl-bump For each CONNECT request allowed by ssl_bump ACLs, | |
| 2319 | establish secure connection with the client and with | |
| 2320 | the server, decrypt HTTPS messages as they pass through | |
| 2321 | Squid, and treat them as unencrypted HTTP messages, | |
| 2322 | becoming the man-in-the-middle. | |
| 2323 | ||
| 2324 | The ssl_bump option is required to fully enable | |
| 2325 | bumping of CONNECT requests. | |
| 2326 | ||
| 2327 | Omitting the mode flag causes default forward proxy mode to be used. | |
| 2328 | ||
| 2329 | ||
| 2330 | Accelerator Mode Options: | |
| 2331 | ||
| 2332 | defaultsite=domainname | |
| 2333 | What to use for the Host: header if it is not present | |
| 2334 | in a request. Determines what site (not origin server) | |
| 2335 | accelerators should consider the default. | |
| 2336 | ||
| 2337 | no-vhost Disable using HTTP/1.1 Host header for virtual domain support. | |
| 2338 | ||
| 2339 | protocol= Protocol to reconstruct accelerated and intercepted | |
| 2340 | requests with. Defaults to HTTP/1.1 for http_port and | |
| 2341 | HTTPS/1.1 for https_port. | |
| 2342 | When an unsupported value is configured Squid will | |
| 2343 | produce a FATAL error. | |
| 2344 | Values: HTTP or HTTP/1.1, HTTPS or HTTPS/1.1 | |
| 2345 | ||
| 2346 | vport Virtual host port support. Using the http_port number | |
| 2347 | instead of the port passed on Host: headers. | |
| 2348 | ||
| 2349 | vport=NN Virtual host port support. Using the specified port | |
| 2350 | number instead of the port passed on Host: headers. | |
| 2351 | ||
| 2352 | act-as-origin | |
| 2353 | Act as if this Squid is the origin server. | |
| 2354 | This currently means generate new Date: and Expires: | |
| 2355 | headers on HIT instead of adding Age:. | |
| 2356 | ||
| 2357 | ignore-cc Ignore request Cache-Control headers. | |
| 2358 | ||
| 2359 | WARNING: This option violates HTTP specifications if | |
| 2360 | used in non-accelerator setups. | |
| 2361 | ||
| 2362 | allow-direct Allow direct forwarding in accelerator mode. Normally | |
| 2363 | accelerated requests are denied direct forwarding as if | |
| 2364 | never_direct was used. | |
| 2365 | ||
| 2366 | WARNING: this option opens accelerator mode to security | |
| 2367 | vulnerabilities usually only affecting in interception | |
| 2368 | mode. Make sure to protect forwarding with suitable | |
| 2369 | http_access rules when using this. | |
| 2370 | ||
| 2371 | ||
| 2372 | SSL Bump Mode Options: | |
| 2373 | In addition to these options ssl-bump requires TLS/SSL options. | |
| 2374 | ||
| 2375 | generate-host-certificates[=<on|off>] | |
| 2376 | Dynamically create SSL server certificates for the | |
| 2377 | destination hosts of bumped CONNECT requests.When | |
| 2378 | enabled, the cert and key options are used to sign | |
| 2379 | generated certificates. Otherwise generated | |
| 2380 | certificate will be selfsigned. | |
| 2381 | If there is a CA certificate lifetime of the generated | |
| 2382 | certificate equals lifetime of the CA certificate. If | |
| 2383 | generated certificate is selfsigned lifetime is three | |
| 2384 | years. | |
| 2385 | This option is enabled by default when ssl-bump is used. | |
| 2386 | See the ssl-bump option above for more information. | |
| 2387 | ||
| 2388 | dynamic_cert_mem_cache_size=SIZE | |
| 2389 | Approximate total RAM size spent on cached generated | |
| 2390 | certificates. If set to zero, caching is disabled. The | |
| 2391 | default value is 4MB. | |
| 2392 | ||
| 2393 | TLS / SSL Options: | |
| 2394 | ||
| 2395 | tls-cert= Path to file containing an X.509 certificate (PEM format) | |
| 2396 | to be used in the TLS handshake ServerHello. | |
| 2397 | ||
| 2398 | If this certificate is constrained by KeyUsage TLS | |
| 2399 | feature it must allow HTTP server usage, along with | |
| 2400 | any additional restrictions imposed by your choice | |
| 2401 | of options= settings. | |
| 2402 | ||
| 2403 | When OpenSSL is used this file may also contain a | |
| 2404 | chain of intermediate CA certificates to send in the | |
| 2405 | TLS handshake. | |
| 2406 | ||
| 2407 | When GnuTLS is used this option (and any paired | |
| 2408 | tls-key= option) may be repeated to load multiple | |
| 2409 | certificates for different domains. | |
| 2410 | ||
| 2411 | Also, when generate-host-certificates=on is configured | |
| 2412 | the first tls-cert= option must be a CA certificate | |
| 2413 | capable of signing the automatically generated | |
| 2414 | certificates. | |
| 2415 | ||
| 2416 | tls-key= Path to a file containing private key file (PEM format) | |
| 2417 | for the previous tls-cert= option. | |
| 2418 | ||
| 2419 | If tls-key= is not specified tls-cert= is assumed to | |
| 2420 | reference a PEM file containing both the certificate | |
| 2421 | and private key. | |
| 2422 | ||
| 2423 | cipher= Colon separated list of supported ciphers. | |
| 2424 | NOTE: some ciphers such as EDH ciphers depend on | |
| 2425 | additional settings. If those settings are | |
| 2426 | omitted the ciphers may be silently ignored | |
| 2427 | by the OpenSSL library. | |
| 2428 | ||
| 2429 | options= Various SSL implementation options. The most important | |
| 2430 | being: | |
| 2431 | ||
| 2432 | NO_SSLv3 Disallow the use of SSLv3 | |
| 2433 | ||
| 2434 | NO_TLSv1 Disallow the use of TLSv1.0 | |
| 2435 | ||
| 2436 | NO_TLSv1_1 Disallow the use of TLSv1.1 | |
| 2437 | ||
| 2438 | NO_TLSv1_2 Disallow the use of TLSv1.2 | |
| 2439 | ||
| 2440 | SINGLE_DH_USE | |
| 2441 | Always create a new key when using | |
| 2442 | temporary/ephemeral DH key exchanges | |
| 2443 | ||
| 2444 | SINGLE_ECDH_USE | |
| 2445 | Enable ephemeral ECDH key exchange. | |
| 2446 | The adopted curve should be specified | |
| 2447 | using the tls-dh option. | |
| 2448 | ||
| 2449 | NO_TICKET | |
| 2450 | Disable use of RFC5077 session tickets. | |
| 2451 | Some servers may have problems | |
| 2452 | understanding the TLS extension due | |
| 2453 | to ambiguous specification in RFC4507. | |
| 2454 | ||
| 2455 | ALL Enable various bug workarounds | |
| 2456 | suggested as "harmless" by OpenSSL | |
| 2457 | Be warned that this reduces SSL/TLS | |
| 2458 | strength to some attacks. | |
| 2459 | ||
| 2460 | See the OpenSSL SSL_CTX_set_options documentation for a | |
| 2461 | more complete list. | |
| 2462 | ||
| 2463 | clientca= File containing the list of CAs to use when | |
| 2464 | requesting a client certificate. | |
| 2465 | ||
| 2466 | tls-cafile= PEM file containing CA certificates to use when verifying | |
| 2467 | client certificates. If not configured clientca will be | |
| 2468 | used. May be repeated to load multiple files. | |
| 2469 | ||
| 2470 | capath= Directory containing additional CA certificates | |
| 2471 | and CRL lists to use when verifying client certificates. | |
| 2472 | Requires OpenSSL or LibreSSL. | |
| 2473 | ||
| 2474 | crlfile= File of additional CRL lists to use when verifying | |
| 2475 | the client certificate, in addition to CRLs stored in | |
| 2476 | the capath. Implies VERIFY_CRL flag below. | |
| 2477 | ||
| 2478 | tls-dh=[curve:]file | |
| 2479 | File containing DH parameters for temporary/ephemeral DH key | |
| 2480 | exchanges, optionally prefixed by a curve for ephemeral ECDH | |
| 2481 | key exchanges. | |
| 2482 | See OpenSSL documentation for details on how to create the | |
| 2483 | DH parameter file. Supported curves for ECDH can be listed | |
| 2484 | using the "openssl ecparam -list_curves" command. | |
| 2485 | WARNING: EDH and EECDH ciphers will be silently disabled if | |
| 2486 | this option is not set. | |
| 2487 | ||
| 2488 | sslflags= Various flags modifying the use of SSL: | |
| 2489 | DELAYED_AUTH | |
| 2490 | Don't request client certificates | |
| 2491 | immediately, but wait until acl processing | |
| 2492 | requires a certificate (not yet implemented). | |
| 2493 | CONDITIONAL_AUTH | |
| 2494 | Request a client certificate during the TLS | |
| 2495 | handshake, but ignore certificate absence in | |
| 2496 | the TLS client Hello. If the client does | |
| 2497 | supply a certificate, it is validated. | |
| 2498 | NO_SESSION_REUSE | |
| 2499 | Don't allow for session reuse. Each connection | |
| 2500 | will result in a new SSL session. | |
| 2501 | VERIFY_CRL | |
| 2502 | Verify CRL lists when accepting client | |
| 2503 | certificates. | |
| 2504 | VERIFY_CRL_ALL | |
| 2505 | Verify CRL lists for all certificates in the | |
| 2506 | client certificate chain. | |
| 2507 | ||
| 2508 | tls-default-ca[=off] | |
| 2509 | Whether to use the system Trusted CAs. Default is OFF. | |
| 2510 | ||
| 2511 | tls-no-npn Do not use the TLS NPN extension to advertise HTTP/1.1. | |
| 2512 | ||
| 2513 | sslcontext= SSL session ID context identifier. | |
| 2514 | ||
| 2515 | Other Options: | |
| 2516 | ||
| 2517 | connection-auth[=on|off] | |
| 2518 | use connection-auth=off to tell Squid to prevent | |
| 2519 | forwarding Microsoft connection oriented authentication | |
| 2520 | (NTLM, Negotiate and Kerberos) | |
| 2521 | ||
| 2522 | disable-pmtu-discovery= | |
| 2523 | Control Path-MTU discovery usage: | |
| 2524 | off lets OS decide on what to do (default). | |
| 2525 | transparent disable PMTU discovery when transparent | |
| 2526 | support is enabled. | |
| 2527 | always disable always PMTU discovery. | |
| 2528 | ||
| 2529 | In many setups of transparently intercepting proxies | |
| 2530 | Path-MTU discovery can not work on traffic towards the | |
| 2531 | clients. This is the case when the intercepting device | |
| 2532 | does not fully track connections and fails to forward | |
| 2533 | ICMP must fragment messages to the cache server. If you | |
| 2534 | have such setup and experience that certain clients | |
| 2535 | sporadically hang or never complete requests set | |
| 2536 | disable-pmtu-discovery option to 'transparent'. | |
| 2537 | ||
| 2538 | name= Specifies a internal name for the port. Defaults to | |
| 2539 | the port specification (port or addr:port) | |
| 2540 | ||
| 2541 | tcpkeepalive[=idle,interval,timeout] | |
| 2542 | Enable TCP keepalive probes of idle connections. | |
| 2543 | In seconds; idle is the initial time before TCP starts | |
| 2544 | probing the connection, interval how often to probe, and | |
| 2545 | timeout the time before giving up. | |
| 2546 | ||
| 2547 | require-proxy-header | |
| 2548 | Require PROXY protocol version 1 or 2 connections. | |
| 2549 | The proxy_protocol_access is required to permit | |
| 2550 | downstream proxies which can be trusted. | |
| 2551 | ||
| 2552 | worker-queues | |
| 2553 | Ask TCP stack to maintain a dedicated listening queue | |
| 2554 | for each worker accepting requests at this port. | |
| 2555 | Requires TCP stack that supports the SO_REUSEPORT socket | |
| 2556 | option. | |
| 2557 | ||
| 2558 | SECURITY WARNING: Enabling worker-specific queues | |
| 2559 | allows any process running as Squid's effective user to | |
| 2560 | easily accept requests destined to this port. | |
| 2561 | ||
| 2562 | If you run Squid on a dual-homed machine with an internal | |
| 2563 | and an external interface we recommend you to specify the | |
| 2564 | internal address:port in http_port. This way Squid will only be | |
| 2565 | visible on the internal address. | |
| 2566 | ||
| 2567 | CONFIG_START | |
| 2568 | ||
| 2569 | # Squid normally listens to port 3128 | |
| 2570 | http_port @DEFAULT_HTTP_PORT@ | |
| 2571 | CONFIG_END | |
| 2572 | DOC_END | |
| 2573 | ||
| 2574 | NAME: https_port | |
| 2575 | IFDEF: HAVE_LIBGNUTLS||USE_OPENSSL | |
| 2576 | TYPE: PortCfg | |
| 2577 | DEFAULT: none | |
| 2578 | LOC: HttpPortList | |
| 2579 | DOC_START | |
| 2580 | Usage: [ip:]port [mode] tls-cert=certificate.pem [options] | |
| 2581 | ||
| 2582 | The socket address where Squid will listen for client requests made | |
| 2583 | over TLS or SSL connections. Commonly referred to as HTTPS. | |
| 2584 | ||
| 2585 | This is most useful for situations where you are running squid in | |
| 2586 | accelerator mode and you want to do the TLS work at the accelerator | |
| 2587 | level. | |
| 2588 | ||
| 2589 | You may specify multiple socket addresses on multiple lines, | |
| 2590 | each with their own certificate and/or options. | |
| 2591 | ||
| 2592 | The tls-cert= option is mandatory on HTTPS ports. | |
| 2593 | ||
| 2594 | See http_port for a list of modes and options. | |
| 2595 | Not all http_port options are available for https_port. | |
| 2596 | Among the unavalable options: | |
| 2597 | - require-proxy-header | |
| 2598 | DOC_END | |
| 2599 | ||
| 2600 | NAME: ftp_port | |
| 2601 | TYPE: PortCfg | |
| 2602 | DEFAULT: none | |
| 2603 | LOC: FtpPortList | |
| 2604 | DOC_START | |
| 2605 | Enables Native FTP proxy by specifying the socket address where Squid | |
| 2606 | listens for FTP client requests. See http_port directive for various | |
| 2607 | ways to specify the listening address and mode. | |
| 2608 | ||
| 2609 | Usage: ftp_port address [mode] [options] | |
| 2610 | ||
| 2611 | WARNING: This is a new, experimental, complex feature that has seen | |
| 2612 | limited production exposure. Some Squid modules (e.g., caching) do not | |
| 2613 | currently work with native FTP proxying, and many features have not | |
| 2614 | even been tested for compatibility. Test well before deploying! | |
| 2615 | ||
| 2616 | Native FTP proxying differs substantially from proxying HTTP requests | |
| 2617 | with ftp:// URIs because Squid works as an FTP server and receives | |
| 2618 | actual FTP commands (rather than HTTP requests with FTP URLs). | |
| 2619 | ||
| 2620 | Native FTP commands accepted at ftp_port are internally converted or | |
| 2621 | wrapped into HTTP-like messages. The same happens to Native FTP | |
| 2622 | responses received from FTP origin servers. Those HTTP-like messages | |
| 2623 | are shoveled through regular access control and adaptation layers | |
| 2624 | between the FTP client and the FTP origin server. This allows Squid to | |
| 2625 | examine, adapt, block, and log FTP exchanges. Squid reuses most HTTP | |
| 2626 | mechanisms when shoveling wrapped FTP messages. For example, | |
| 2627 | http_access and adaptation_access directives are used. | |
| 2628 | ||
| 2629 | Modes: | |
| 2630 | ||
| 2631 | intercept Same as http_port intercept. The FTP origin address is | |
| 2632 | determined based on the intended destination of the | |
| 2633 | intercepted connection. | |
| 2634 | ||
| 2635 | tproxy Support Linux TPROXY for spoofing outgoing | |
| 2636 | connections using the client IP address. | |
| 2637 | NP: disables authentication and maybe IPv6 on the port. | |
| 2638 | ||
| 2639 | By default (i.e., without an explicit mode option), Squid extracts the | |
| 2640 | FTP origin address from the login@origin parameter of the FTP USER | |
| 2641 | command. Many popular FTP clients support such native FTP proxying. | |
| 2642 | ||
| 2643 | Options: | |
| 2644 | ||
| 2645 | name=token Specifies an internal name for the port. Defaults to | |
| 2646 | the port address. Usable with myportname ACL. | |
| 2647 | ||
| 2648 | ftp-track-dirs | |
| 2649 | Enables tracking of FTP directories by injecting extra | |
| 2650 | PWD commands and adjusting Request-URI (in wrapping | |
| 2651 | HTTP requests) to reflect the current FTP server | |
| 2652 | directory. Tracking is disabled by default. | |
| 2653 | ||
| 2654 | protocol=FTP Protocol to reconstruct accelerated and intercepted | |
| 2655 | requests with. Defaults to FTP. No other accepted | |
| 2656 | values have been tested with. An unsupported value | |
| 2657 | results in a FATAL error. Accepted values are FTP, | |
| 2658 | HTTP (or HTTP/1.1), and HTTPS (or HTTPS/1.1). | |
| 2659 | ||
| 2660 | Other http_port modes and options that are not specific to HTTP and | |
| 2661 | HTTPS may also work. | |
| 2662 | Among the options that are not available for ftp_port: | |
| 2663 | - require-proxy-header | |
| 2664 | - ssl-bump | |
| 2665 | DOC_END | |
| 2666 | ||
| 2667 | NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp | |
| 2668 | TYPE: acl_tos | |
| 2669 | DEFAULT: none | |
| 2670 | LOC: Ip::Qos::TheConfig.tosToServer | |
| 2671 | DOC_START | |
| 2672 | Allows you to select a TOS/Diffserv value for packets outgoing | |
| 2673 | on the server side, based on an ACL. | |
| 2674 | ||
| 2675 | tcp_outgoing_tos ds-field [!]aclname ... | |
| 2676 | ||
| 2677 | Example where normal_service_net uses the TOS value 0x00 | |
| 2678 | and good_service_net uses 0x20 | |
| 2679 | ||
| 2680 | acl normal_service_net src 10.0.0.0/24 | |
| 2681 | acl good_service_net src 10.0.1.0/24 | |
| 2682 | tcp_outgoing_tos 0x00 normal_service_net | |
| 2683 | tcp_outgoing_tos 0x20 good_service_net | |
| 2684 | ||
| 2685 | TOS/DSCP values really only have local significance - so you should | |
| 2686 | know what you're specifying. For more information, see RFC2474, | |
| 2687 | RFC2475, and RFC3260. | |
| 2688 | ||
| 2689 | The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or | |
| 2690 | "default" to use whatever default your host has. | |
| 2691 | Note that only multiples of 4 are usable as the two rightmost bits have | |
| 2692 | been redefined for use by ECN (RFC 3168 section 23.1). | |
| 2693 | The squid parser will enforce this by masking away the ECN bits. | |
| 2694 | ||
| 2695 | Processing proceeds in the order specified, and stops at first fully | |
| 2696 | matching line. | |
| 2697 | ||
| 2698 | Only fast ACLs are supported. | |
| 2699 | DOC_END | |
| 2700 | ||
| 2701 | NAME: clientside_tos | |
| 2702 | TYPE: acl_tos | |
| 2703 | DEFAULT: none | |
| 2704 | LOC: Ip::Qos::TheConfig.tosToClient | |
| 2705 | DOC_START | |
| 2706 | Allows you to select a TOS/DSCP value for packets being transmitted | |
| 2707 | on the client-side, based on an ACL. | |
| 2708 | ||
| 2709 | clientside_tos ds-field [!]aclname ... | |
| 2710 | ||
| 2711 | Example where normal_service_net uses the TOS value 0x00 | |
| 2712 | and good_service_net uses 0x20 | |
| 2713 | ||
| 2714 | acl normal_service_net src 10.0.0.0/24 | |
| 2715 | acl good_service_net src 10.0.1.0/24 | |
| 2716 | clientside_tos 0x00 normal_service_net | |
| 2717 | clientside_tos 0x20 good_service_net | |
| 2718 | ||
| 2719 | Note: This feature is incompatible with qos_flows. Any TOS values set here | |
| 2720 | will be overwritten by TOS values in qos_flows. | |
| 2721 | ||
| 2722 | The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or | |
| 2723 | "default" to use whatever default your host has. | |
| 2724 | Note that only multiples of 4 are usable as the two rightmost bits have | |
| 2725 | been redefined for use by ECN (RFC 3168 section 23.1). | |
| 2726 | The squid parser will enforce this by masking away the ECN bits. | |
| 2727 | ||
| 2728 | This clause only supports fast acl types. | |
| 2729 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 2730 | DOC_END | |
| 2731 | ||
| 2732 | NAME: tcp_outgoing_mark | |
| 2733 | TYPE: acl_nfmark | |
| 2734 | IFDEF: HAVE_LIBCAP&&SO_MARK | |
| 2735 | DEFAULT: none | |
| 2736 | LOC: Ip::Qos::TheConfig.nfmarkToServer | |
| 2737 | DOC_START | |
| 2738 | Allows you to apply a Netfilter mark value to outgoing packets | |
| 2739 | on the server side, based on an ACL. | |
| 2740 | ||
| 2741 | tcp_outgoing_mark mark-value [!]aclname ... | |
| 2742 | ||
| 2743 | Example where normal_service_net uses the mark value 0x00 | |
| 2744 | and good_service_net uses 0x20 | |
| 2745 | ||
| 2746 | acl normal_service_net src 10.0.0.0/24 | |
| 2747 | acl good_service_net src 10.0.1.0/24 | |
| 2748 | tcp_outgoing_mark 0x00 normal_service_net | |
| 2749 | tcp_outgoing_mark 0x20 good_service_net | |
| 2750 | ||
| 2751 | Only fast ACLs are supported. | |
| 2752 | DOC_END | |
| 2753 | ||
| 2754 | NAME: mark_client_packet clientside_mark | |
| 2755 | TYPE: acl_nfmark | |
| 2756 | IFDEF: HAVE_LIBCAP&&SO_MARK | |
| 2757 | DEFAULT: none | |
| 2758 | LOC: Ip::Qos::TheConfig.nfmarkToClient | |
| 2759 | DOC_START | |
| 2760 | Allows you to apply a Netfilter MARK value to packets being transmitted | |
| 2761 | on the client-side, based on an ACL. | |
| 2762 | ||
| 2763 | mark_client_packet mark-value [!]aclname ... | |
| 2764 | ||
| 2765 | Example where normal_service_net uses the MARK value 0x00 | |
| 2766 | and good_service_net uses 0x20 | |
| 2767 | ||
| 2768 | acl normal_service_net src 10.0.0.0/24 | |
| 2769 | acl good_service_net src 10.0.1.0/24 | |
| 2770 | mark_client_packet 0x00 normal_service_net | |
| 2771 | mark_client_packet 0x20 good_service_net | |
| 2772 | ||
| 2773 | Note: This feature is incompatible with qos_flows. Any mark values set here | |
| 2774 | will be overwritten by mark values in qos_flows. | |
| 2775 | ||
| 2776 | This clause only supports fast acl types. | |
| 2777 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 2778 | DOC_END | |
| 2779 | ||
| 2780 | NAME: mark_client_connection | |
| 2781 | TYPE: acl_nfmark | |
| 2782 | IFDEF: HAVE_LIBCAP&&SO_MARK | |
| 2783 | DEFAULT: none | |
| 2784 | LOC: Ip::Qos::TheConfig.nfConnmarkToClient | |
| 2785 | DOC_START | |
| 2786 | Allows you to apply a Netfilter CONNMARK value to a connection | |
| 2787 | on the client-side, based on an ACL. | |
| 2788 | ||
| 2789 | mark_client_connection mark-value[/mask] [!]aclname ... | |
| 2790 | ||
| 2791 | The mark-value and mask are unsigned integers (hex, octal, or decimal). | |
| 2792 | The mask may be used to preserve marking previously set by other agents | |
| 2793 | (e.g., iptables). | |
| 2794 | ||
| 2795 | A matching rule replaces the CONNMARK value. If a mask is also | |
| 2796 | specified, then the masked bits of the original value are zeroed, and | |
| 2797 | the configured mark-value is ORed with that adjusted value. | |
| 2798 | For example, applying a mark-value 0xAB/0xF to 0x5F CONNMARK, results | |
| 2799 | in a 0xFB marking (rather than a 0xAB or 0x5B). | |
| 2800 | ||
| 2801 | This directive semantics is similar to iptables --set-mark rather than | |
| 2802 | --set-xmark functionality. | |
| 2803 | ||
| 2804 | The directive does not interfere with qos_flows (which uses packet MARKs, | |
| 2805 | not CONNMARKs). | |
| 2806 | ||
| 2807 | Example where squid marks intercepted FTP connections: | |
| 2808 | ||
| 2809 | acl proto_ftp proto FTP | |
| 2810 | mark_client_connection 0x200/0xff00 proto_ftp | |
| 2811 | ||
| 2812 | This clause only supports fast acl types. | |
| 2813 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 2814 | DOC_END | |
| 2815 | ||
| 2816 | NAME: qos_flows | |
| 2817 | TYPE: QosConfig | |
| 2818 | IFDEF: USE_QOS_TOS | |
| 2819 | DEFAULT: none | |
| 2820 | LOC: Ip::Qos::TheConfig | |
| 2821 | DOC_START | |
| 2822 | Allows you to select a TOS/DSCP value to mark outgoing | |
| 2823 | connections to the client, based on where the reply was sourced. | |
| 2824 | For platforms using netfilter, allows you to set a netfilter mark | |
| 2825 | value instead of, or in addition to, a TOS value. | |
| 2826 | ||
| 2827 | By default this functionality is disabled. To enable it with the default | |
| 2828 | settings simply use "qos_flows mark" or "qos_flows tos". Default | |
| 2829 | settings will result in the netfilter mark or TOS value being copied | |
| 2830 | from the upstream connection to the client. Note that it is the connection | |
| 2831 | CONNMARK value not the packet MARK value that is copied. | |
| 2832 | ||
| 2833 | It is not currently possible to copy the mark or TOS value from the | |
| 2834 | client to the upstream connection request. | |
| 2835 | ||
| 2836 | TOS values really only have local significance - so you should | |
| 2837 | know what you're specifying. For more information, see RFC2474, | |
| 2838 | RFC2475, and RFC3260. | |
| 2839 | ||
| 2840 | The TOS/DSCP byte must be exactly that - a octet value 0 - 255. | |
| 2841 | Note that only multiples of 4 are usable as the two rightmost bits have | |
| 2842 | been redefined for use by ECN (RFC 3168 section 23.1). | |
| 2843 | The squid parser will enforce this by masking away the ECN bits. | |
| 2844 | ||
| 2845 | Mark values can be any unsigned 32-bit integer value. | |
| 2846 | ||
| 2847 | This setting is configured by setting the following values: | |
| 2848 | ||
| 2849 | tos|mark Whether to set TOS or netfilter mark values | |
| 2850 | ||
| 2851 | local-hit=0xFF Value to mark local cache hits. | |
| 2852 | ||
| 2853 | sibling-hit=0xFF Value to mark hits from sibling peers. | |
| 2854 | ||
| 2855 | parent-hit=0xFF Value to mark hits from parent peers. | |
| 2856 | ||
| 2857 | miss=0xFF[/mask] Value to mark cache misses. Takes precedence | |
| 2858 | over the preserve-miss feature (see below), unless | |
| 2859 | mask is specified, in which case only the bits | |
| 2860 | specified in the mask are written. | |
| 2861 | ||
| 2862 | The TOS variant of the following features are only possible on Linux | |
| 2863 | and require your kernel to be patched with the TOS preserving ZPH | |
| 2864 | patch, available from http://zph.bratcheda.org | |
| 2865 | No patch is needed to preserve the netfilter mark, which will work | |
| 2866 | with all variants of netfilter. | |
| 2867 | ||
| 2868 | disable-preserve-miss | |
| 2869 | This option disables the preservation of the TOS or netfilter | |
| 2870 | mark. By default, the existing TOS or netfilter mark value of | |
| 2871 | the response coming from the remote server will be retained | |
| 2872 | and masked with miss-mark. | |
| 2873 | NOTE: in the case of a netfilter mark, the mark must be set on | |
| 2874 | the connection (using the CONNMARK target) not on the packet | |
| 2875 | (MARK target). | |
| 2876 | ||
| 2877 | miss-mask=0xFF | |
| 2878 | Allows you to mask certain bits in the TOS or mark value | |
| 2879 | received from the remote server, before copying the value to | |
| 2880 | the TOS sent towards clients. | |
| 2881 | Default for tos: 0xFF (TOS from server is not changed). | |
| 2882 | Default for mark: 0xFFFFFFFF (mark from server is not changed). | |
| 2883 | ||
| 2884 | All of these features require the --enable-zph-qos compilation flag | |
| 2885 | (enabled by default). Netfilter marking also requires the | |
| 2886 | libnetfilter_conntrack libraries (--with-netfilter-conntrack) and | |
| 2887 | libcap 2.09+ (--with-libcap). | |
| 2888 | ||
| 2889 | DOC_END | |
| 2890 | ||
| 2891 | NAME: tcp_outgoing_address | |
| 2892 | TYPE: acl_address | |
| 2893 | DEFAULT: none | |
| 2894 | DEFAULT_DOC: Address selection is performed by the operating system. | |
| 2895 | LOC: Config.accessList.outgoing_address | |
| 2896 | DOC_START | |
| 2897 | Allows you to map requests to different outgoing IP addresses | |
| 2898 | based on the username or source address of the user making | |
| 2899 | the request. | |
| 2900 | ||
| 2901 | tcp_outgoing_address ipaddr [[!]aclname] ... | |
| 2902 | ||
| 2903 | For example; | |
| 2904 | Forwarding clients with dedicated IPs for certain subnets. | |
| 2905 | ||
| 2906 | acl normal_service_net src 10.0.0.0/24 | |
| 2907 | acl good_service_net src 10.0.2.0/24 | |
| 2908 | ||
| 2909 | tcp_outgoing_address 2001:db8::c001 good_service_net | |
| 2910 | tcp_outgoing_address 10.1.0.2 good_service_net | |
| 2911 | ||
| 2912 | tcp_outgoing_address 2001:db8::beef normal_service_net | |
| 2913 | tcp_outgoing_address 10.1.0.1 normal_service_net | |
| 2914 | ||
| 2915 | tcp_outgoing_address 2001:db8::1 | |
| 2916 | tcp_outgoing_address 10.1.0.3 | |
| 2917 | ||
| 2918 | Processing proceeds in the order specified, and stops at first fully | |
| 2919 | matching line. | |
| 2920 | ||
| 2921 | Squid will add an implicit IP version test to each line. | |
| 2922 | Requests going to IPv4 websites will use the outgoing 10.1.0.* addresses. | |
| 2923 | Requests going to IPv6 websites will use the outgoing 2001:db8:* addresses. | |
| 2924 | ||
| 2925 | ||
| 2926 | NOTE: The use of this directive using client dependent ACLs is | |
| 2927 | incompatible with the use of server side persistent connections. To | |
| 2928 | ensure correct results it is best to set server_persistent_connections | |
| 2929 | to off when using this directive in such configurations. | |
| 2930 | ||
| 2931 | NOTE: The use of this directive to set a local IP on outgoing TCP links | |
| 2932 | is incompatible with using TPROXY to set client IP out outbound TCP links. | |
| 2933 | When needing to contact peers use the no-tproxy cache_peer option and the | |
| 2934 | client_dst_passthru directive re-enable normal forwarding such as this. | |
| 2935 | ||
| 2936 | This clause only supports fast acl types. | |
| 2937 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 2938 | DOC_END | |
| 2939 | ||
| 2940 | NAME: host_verify_strict | |
| 2941 | TYPE: onoff | |
| 2942 | DEFAULT: off | |
| 2943 | LOC: Config.onoff.hostStrictVerify | |
| 2944 | DOC_START | |
| 2945 | Regardless of this option setting, when dealing with intercepted | |
| 2946 | traffic, Squid always verifies that the destination IP address matches | |
| 2947 | the Host header domain or IP (called 'authority form URL'). | |
| 2948 | ||
| 2949 | This enforcement is performed to satisfy a MUST-level requirement in | |
| 2950 | RFC 2616 section 14.23: "The Host field value MUST represent the naming | |
| 2951 | authority of the origin server or gateway given by the original URL". | |
| 2952 | ||
| 2953 | When set to ON: | |
| 2954 | Squid always responds with an HTTP 409 (Conflict) error | |
| 2955 | page and logs a security warning if there is no match. | |
| 2956 | ||
| 2957 | Squid verifies that the destination IP address matches | |
| 2958 | the Host header for forward-proxy and reverse-proxy traffic | |
| 2959 | as well. For those traffic types, Squid also enables the | |
| 2960 | following checks, comparing the corresponding Host header | |
| 2961 | and Request-URI components: | |
| 2962 | ||
| 2963 | * The host names (domain or IP) must be identical, | |
| 2964 | but valueless or missing Host header disables all checks. | |
| 2965 | For the two host names to match, both must be either IP | |
| 2966 | or FQDN. | |
| 2967 | ||
| 2968 | * Port numbers must be identical, but if a port is missing | |
| 2969 | the scheme-default port is assumed. | |
| 2970 | ||
| 2971 | ||
| 2972 | When set to OFF (the default): | |
| 2973 | Squid allows suspicious requests to continue but logs a | |
| 2974 | security warning and blocks caching of the response. | |
| 2975 | ||
| 2976 | * Forward-proxy traffic is not checked at all. | |
| 2977 | ||
| 2978 | * Reverse-proxy traffic is not checked at all. | |
| 2979 | ||
| 2980 | * Intercepted traffic which passes verification is handled | |
| 2981 | according to client_dst_passthru. | |
| 2982 | ||
| 2983 | * Intercepted requests which fail verification are sent | |
| 2984 | to the client original destination instead of DIRECT. | |
| 2985 | This overrides 'client_dst_passthru off'. | |
| 2986 | ||
| 2987 | For now suspicious intercepted CONNECT requests are always | |
| 2988 | responded to with an HTTP 409 (Conflict) error page. | |
| 2989 | ||
| 2990 | ||
| 2991 | SECURITY NOTE: | |
| 2992 | ||
| 2993 | As described in CVE-2009-0801 when the Host: header alone is used | |
| 2994 | to determine the destination of a request it becomes trivial for | |
| 2995 | malicious scripts on remote websites to bypass browser same-origin | |
| 2996 | security policy and sandboxing protections. | |
| 2997 | ||
| 2998 | The cause of this is that such applets are allowed to perform their | |
| 2999 | own HTTP stack, in which case the same-origin policy of the browser | |
| 3000 | sandbox only verifies that the applet tries to contact the same IP | |
| 3001 | as from where it was loaded at the IP level. The Host: header may | |
| 3002 | be different from the connected IP and approved origin. | |
| 3003 | ||
| 3004 | DOC_END | |
| 3005 | ||
| 3006 | NAME: client_dst_passthru | |
| 3007 | TYPE: onoff | |
| 3008 | DEFAULT: on | |
| 3009 | LOC: Config.onoff.client_dst_passthru | |
| 3010 | DOC_START | |
| 3011 | With NAT or TPROXY intercepted traffic Squid may pass the request | |
| 3012 | directly to the original client destination IP or seek a faster | |
| 3013 | source using the HTTP Host header. | |
| 3014 | ||
| 3015 | Using Host to locate alternative servers can provide faster | |
| 3016 | connectivity with a range of failure recovery options. | |
| 3017 | But can also lead to connectivity trouble when the client and | |
| 3018 | server are attempting stateful interactions unaware of the proxy. | |
| 3019 | ||
| 3020 | This option (on by default) prevents alternative DNS entries being | |
| 3021 | located to send intercepted traffic DIRECT to an origin server. | |
| 3022 | The clients original destination IP and port will be used instead. | |
| 3023 | ||
| 3024 | Regardless of this option setting, when dealing with intercepted | |
| 3025 | traffic Squid will verify the Host: header and any traffic which | |
| 3026 | fails Host verification will be treated as if this option were ON. | |
| 3027 | ||
| 3028 | see host_verify_strict for details on the verification process. | |
| 3029 | DOC_END | |
| 3030 | ||
| 3031 | COMMENT_START | |
| 3032 | TLS OPTIONS | |
| 3033 | ----------------------------------------------------------------------------- | |
| 3034 | COMMENT_END | |
| 3035 | ||
| 3036 | NAME: tls_outgoing_options | |
| 3037 | IFDEF: HAVE_LIBGNUTLS||USE_OPENSSL | |
| 3038 | TYPE: securePeerOptions | |
| 3039 | DEFAULT: min-version=1.0 | |
| 3040 | LOC: Security::ProxyOutgoingConfig() | |
| 3041 | DOC_START | |
| 3042 | disable Do not support https:// URLs. | |
| 3043 | ||
| 3044 | cert=/path/to/client/certificate | |
| 3045 | A client X.509 certificate to use when connecting. | |
| 3046 | ||
| 3047 | key=/path/to/client/private_key | |
| 3048 | The private key corresponding to the cert= above. | |
| 3049 | ||
| 3050 | If key= is not specified cert= is assumed to | |
| 3051 | reference a PEM file containing both the certificate | |
| 3052 | and private key. | |
| 3053 | ||
| 3054 | cipher=... The list of valid TLS ciphers to use. | |
| 3055 | ||
| 3056 | min-version=1.N | |
| 3057 | The minimum TLS protocol version to permit. | |
| 3058 | To control SSLv3 use the options= parameter. | |
| 3059 | Supported Values: 1.0 (default), 1.1, 1.2, 1.3 | |
| 3060 | ||
| 3061 | options=... Specify various TLS/SSL implementation options. | |
| 3062 | ||
| 3063 | OpenSSL options most important are: | |
| 3064 | ||
| 3065 | NO_SSLv3 Disallow the use of SSLv3 | |
| 3066 | ||
| 3067 | SINGLE_DH_USE | |
| 3068 | Always create a new key when using | |
| 3069 | temporary/ephemeral DH key exchanges | |
| 3070 | ||
| 3071 | NO_TICKET | |
| 3072 | Disable use of RFC5077 session tickets. | |
| 3073 | Some servers may have problems | |
| 3074 | understanding the TLS extension due | |
| 3075 | to ambiguous specification in RFC4507. | |
| 3076 | ||
| 3077 | ALL Enable various bug workarounds | |
| 3078 | suggested as "harmless" by OpenSSL | |
| 3079 | Be warned that this reduces SSL/TLS | |
| 3080 | strength to some attacks. | |
| 3081 | ||
| 3082 | See the OpenSSL SSL_CTX_set_options documentation | |
| 3083 | for a more complete list. | |
| 3084 | ||
| 3085 | GnuTLS options most important are: | |
| 3086 | ||
| 3087 | %NO_TICKETS | |
| 3088 | Disable use of RFC5077 session tickets. | |
| 3089 | Some servers may have problems | |
| 3090 | understanding the TLS extension due | |
| 3091 | to ambiguous specification in RFC4507. | |
| 3092 | ||
| 3093 | See the GnuTLS Priority Strings documentation | |
| 3094 | for a more complete list. | |
| 3095 | http://www.gnutls.org/manual/gnutls.html#Priority-Strings | |
| 3096 | ||
| 3097 | ||
| 3098 | cafile= PEM file containing CA certificates to use when verifying | |
| 3099 | the peer certificate. May be repeated to load multiple files. | |
| 3100 | ||
| 3101 | capath= A directory containing additional CA certificates to | |
| 3102 | use when verifying the peer certificate. | |
| 3103 | Requires OpenSSL or LibreSSL. | |
| 3104 | ||
| 3105 | crlfile=... A certificate revocation list file to use when | |
| 3106 | verifying the peer certificate. | |
| 3107 | ||
| 3108 | flags=... Specify various flags modifying the TLS implementation: | |
| 3109 | ||
| 3110 | DONT_VERIFY_PEER | |
| 3111 | Accept certificates even if they fail to | |
| 3112 | verify. | |
| 3113 | DONT_VERIFY_DOMAIN | |
| 3114 | Don't verify the peer certificate | |
| 3115 | matches the server name | |
| 3116 | ||
| 3117 | default-ca[=off] | |
| 3118 | Whether to use the system Trusted CAs. Default is ON. | |
| 3119 | ||
| 3120 | domain= The peer name as advertised in its certificate. | |
| 3121 | Used for verifying the correctness of the received peer | |
| 3122 | certificate. If not specified the peer hostname will be | |
| 3123 | used. | |
| 3124 | DOC_END | |
| 3125 | ||
| 3126 | COMMENT_START | |
| 3127 | SSL OPTIONS | |
| 3128 | ----------------------------------------------------------------------------- | |
| 3129 | COMMENT_END | |
| 3130 | ||
| 3131 | NAME: ssl_unclean_shutdown | |
| 3132 | IFDEF: USE_OPENSSL | |
| 3133 | TYPE: onoff | |
| 3134 | DEFAULT: off | |
| 3135 | LOC: Config.SSL.unclean_shutdown | |
| 3136 | DOC_START | |
| 3137 | Some browsers (especially MSIE) bugs out on SSL shutdown | |
| 3138 | messages. | |
| 3139 | DOC_END | |
| 3140 | ||
| 3141 | NAME: ssl_engine | |
| 3142 | IFDEF: USE_OPENSSL | |
| 3143 | TYPE: string | |
| 3144 | LOC: Config.SSL.ssl_engine | |
| 3145 | DEFAULT: none | |
| 3146 | DOC_START | |
| 3147 | The OpenSSL engine to use. You will need to set this if you | |
| 3148 | would like to use hardware SSL acceleration for example. | |
| 3149 | ||
| 3150 | Not supported in builds with OpenSSL 3.0 or newer. | |
| 3151 | DOC_END | |
| 3152 | ||
| 3153 | NAME: sslproxy_session_ttl | |
| 3154 | IFDEF: USE_OPENSSL | |
| 3155 | DEFAULT: 300 | |
| 3156 | LOC: Config.SSL.session_ttl | |
| 3157 | TYPE: int | |
| 3158 | DOC_START | |
| 3159 | Sets the timeout value for SSL sessions | |
| 3160 | DOC_END | |
| 3161 | ||
| 3162 | NAME: sslproxy_session_cache_size | |
| 3163 | IFDEF: USE_OPENSSL | |
| 3164 | DEFAULT: 2 MB | |
| 3165 | LOC: Config.SSL.sessionCacheSize | |
| 3166 | TYPE: b_size_t | |
| 3167 | DOC_START | |
| 3168 | Sets the cache size to use for ssl session | |
| 3169 | DOC_END | |
| 3170 | ||
| 3171 | NAME: sslproxy_foreign_intermediate_certs | |
| 3172 | IFDEF: USE_OPENSSL | |
| 3173 | DEFAULT: none | |
| 3174 | LOC: Config.ssl_client.foreignIntermediateCertsPath | |
| 3175 | TYPE: string | |
| 3176 | DOC_START | |
| 3177 | Many origin servers fail to send their full server certificate | |
| 3178 | chain for verification, assuming the client already has or can | |
| 3179 | easily locate any missing intermediate certificates. | |
| 3180 | ||
| 3181 | Squid uses the certificates from the specified file to fill in | |
| 3182 | these missing chains when trying to validate origin server | |
| 3183 | certificate chains. | |
| 3184 | ||
| 3185 | The file is expected to contain zero or more PEM-encoded | |
| 3186 | intermediate certificates. These certificates are not treated | |
| 3187 | as trusted root certificates, and any self-signed certificate in | |
| 3188 | this file will be ignored. | |
| 3189 | DOC_END | |
| 3190 | ||
| 3191 | NAME: sslproxy_cert_sign_hash | |
| 3192 | IFDEF: USE_OPENSSL | |
| 3193 | DEFAULT: none | |
| 3194 | LOC: Config.SSL.certSignHash | |
| 3195 | TYPE: string | |
| 3196 | DOC_START | |
| 3197 | Sets the hashing algorithm to use when signing generated certificates. | |
| 3198 | Valid algorithm names depend on the OpenSSL library used. The following | |
| 3199 | names are usually available: sha1, sha256, sha512, and md5. Please see | |
| 3200 | your OpenSSL library manual for the available hashes. By default, Squids | |
| 3201 | that support this option use sha256 hashes. | |
| 3202 | ||
| 3203 | Squid does not forcefully purge cached certificates that were generated | |
| 3204 | with an algorithm other than the currently configured one. They remain | |
| 3205 | in the cache, subject to the regular cache eviction policy, and become | |
| 3206 | useful if the algorithm changes again. | |
| 3207 | DOC_END | |
| 3208 | ||
| 3209 | NAME: ssl_bump | |
| 3210 | IFDEF: USE_OPENSSL | |
| 3211 | TYPE: sslproxy_ssl_bump | |
| 3212 | LOC: Config.accessList.ssl_bump | |
| 3213 | DEFAULT_DOC: Become a TCP tunnel without decrypting proxied traffic. | |
| 3214 | DEFAULT: none | |
| 3215 | DOC_START | |
| 3216 | This option is consulted when a CONNECT request is received on | |
| 3217 | an http_port (or a new connection is intercepted at an | |
| 3218 | https_port), provided that port was configured with an ssl-bump | |
| 3219 | flag. The subsequent data on the connection is either treated as | |
| 3220 | HTTPS and decrypted OR tunneled at TCP level without decryption, | |
| 3221 | depending on the first matching bumping "action". | |
| 3222 | ||
| 3223 | ssl_bump <action> [!]acl ... | |
| 3224 | ||
| 3225 | The following bumping actions are currently supported: | |
| 3226 | ||
| 3227 | splice | |
| 3228 | Become a TCP tunnel without decrypting proxied traffic. | |
| 3229 | This is the default action. | |
| 3230 | ||
| 3231 | bump | |
| 3232 | When used on step SslBump1, establishes a secure connection | |
| 3233 | with the client first, then connect to the server. | |
| 3234 | When used on step SslBump2 or SslBump3, establishes a secure | |
| 3235 | connection with the server and, using a mimicked server | |
| 3236 | certificate, with the client. | |
| 3237 | ||
| 3238 | peek | |
| 3239 | Receive client (step SslBump1) or server (step SslBump2) | |
| 3240 | certificate while preserving the possibility of splicing the | |
| 3241 | connection. Peeking at the server certificate (during step 2) | |
| 3242 | usually precludes bumping of the connection at step 3. | |
| 3243 | ||
| 3244 | stare | |
| 3245 | Receive client (step SslBump1) or server (step SslBump2) | |
| 3246 | certificate while preserving the possibility of bumping the | |
| 3247 | connection. Staring at the server certificate (during step 2) | |
| 3248 | usually precludes splicing of the connection at step 3. | |
| 3249 | ||
| 3250 | terminate | |
| 3251 | Close client and server connections. | |
| 3252 | ||
| 3253 | Backward compatibility actions available at step SslBump1: | |
| 3254 | ||
| 3255 | client-first | |
| 3256 | Bump the connection. Establish a secure connection with the | |
| 3257 | client first, then connect to the server. This old mode does | |
| 3258 | not allow Squid to mimic server SSL certificate and does not | |
| 3259 | work with intercepted SSL connections. | |
| 3260 | ||
| 3261 | server-first | |
| 3262 | Bump the connection. Establish a secure connection with the | |
| 3263 | server first, then establish a secure connection with the | |
| 3264 | client, using a mimicked server certificate. Works with both | |
| 3265 | CONNECT requests and intercepted SSL connections, but does | |
| 3266 | not allow to make decisions based on SSL handshake info. | |
| 3267 | ||
| 3268 | peek-and-splice | |
| 3269 | Decide whether to bump or splice the connection based on | |
| 3270 | client-to-squid and server-to-squid SSL hello messages. | |
| 3271 | XXX: Remove. | |
| 3272 | ||
| 3273 | none | |
| 3274 | Same as the "splice" action. | |
| 3275 | ||
| 3276 | All ssl_bump rules are evaluated at each of the supported bumping | |
| 3277 | steps. Rules with actions that are impossible at the current step are | |
| 3278 | ignored. The first matching ssl_bump action wins and is applied at the | |
| 3279 | end of the current step. If no rules match, the splice action is used. | |
| 3280 | See the at_step ACL for a list of the supported SslBump steps. | |
| 3281 | ||
| 3282 | This clause supports both fast and slow acl types. | |
| 3283 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 3284 | ||
| 3285 | See also: http_port ssl-bump, https_port ssl-bump, and acl at_step. | |
| 3286 | ||
| 3287 | ||
| 3288 | # Example: Bump all TLS connections except those originating from | |
| 3289 | # localhost or those going to example.com. | |
| 3290 | ||
| 3291 | acl broken_sites ssl::server_name .example.com | |
| 3292 | ssl_bump splice localhost | |
| 3293 | ssl_bump splice broken_sites | |
| 3294 | ssl_bump bump all | |
| 3295 | DOC_END | |
| 3296 | ||
| 3297 | NAME: sslproxy_cert_error | |
| 3298 | IFDEF: USE_OPENSSL | |
| 3299 | DEFAULT: none | |
| 3300 | DEFAULT_DOC: Server certificate errors terminate the transaction. | |
| 3301 | LOC: Config.ssl_client.cert_error | |
| 3302 | TYPE: acl_access | |
| 3303 | DOC_START | |
| 3304 | Use this ACL to bypass server certificate validation errors. | |
| 3305 | ||
| 3306 | For example, the following lines will bypass all validation errors | |
| 3307 | when talking to servers for example.com. All other | |
| 3308 | validation errors will result in ERR_SECURE_CONNECT_FAIL error. | |
| 3309 | ||
| 3310 | acl BrokenButTrustedServers dstdomain example.com | |
| 3311 | sslproxy_cert_error allow BrokenButTrustedServers | |
| 3312 | sslproxy_cert_error deny all | |
| 3313 | ||
| 3314 | This clause only supports fast acl types. | |
| 3315 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 3316 | Using slow acl types may result in server crashes | |
| 3317 | ||
| 3318 | Without this option, all server certificate validation errors | |
| 3319 | terminate the transaction to protect Squid and the client. | |
| 3320 | ||
| 3321 | SQUID_X509_V_ERR_INFINITE_VALIDATION error cannot be bypassed | |
| 3322 | but should not happen unless your OpenSSL library is buggy. | |
| 3323 | ||
| 3324 | SECURITY WARNING: | |
| 3325 | Bypassing validation errors is dangerous because an | |
| 3326 | error usually implies that the server cannot be trusted | |
| 3327 | and the connection may be insecure. | |
| 3328 | ||
| 3329 | See also: sslproxy_flags and DONT_VERIFY_PEER. | |
| 3330 | DOC_END | |
| 3331 | ||
| 3332 | NAME: sslproxy_cert_sign | |
| 3333 | IFDEF: USE_OPENSSL | |
| 3334 | DEFAULT: none | |
| 3335 | POSTSCRIPTUM: signUntrusted ssl::certUntrusted | |
| 3336 | POSTSCRIPTUM: signSelf ssl::certSelfSigned | |
| 3337 | POSTSCRIPTUM: signTrusted all | |
| 3338 | TYPE: sslproxy_cert_sign | |
| 3339 | LOC: Config.ssl_client.cert_sign | |
| 3340 | DOC_START | |
| 3341 | ||
| 3342 | sslproxy_cert_sign <signing algorithm> acl ... | |
| 3343 | ||
| 3344 | The following certificate signing algorithms are supported: | |
| 3345 | ||
| 3346 | signTrusted | |
| 3347 | Sign using the configured CA certificate which is usually | |
| 3348 | placed in and trusted by end-user browsers. This is the | |
| 3349 | default for trusted origin server certificates. | |
| 3350 | ||
| 3351 | signUntrusted | |
| 3352 | Sign to guarantee an X509_V_ERR_CERT_UNTRUSTED browser error. | |
| 3353 | This is the default for untrusted origin server certificates | |
| 3354 | that are not self-signed (see ssl::certUntrusted). | |
| 3355 | ||
| 3356 | signSelf | |
| 3357 | Sign using a self-signed certificate with the right CN to | |
| 3358 | generate a X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT error in the | |
| 3359 | browser. This is the default for self-signed origin server | |
| 3360 | certificates (see ssl::certSelfSigned). | |
| 3361 | ||
| 3362 | This clause only supports fast acl types. | |
| 3363 | ||
| 3364 | When sslproxy_cert_sign acl(s) match, Squid uses the corresponding | |
| 3365 | signing algorithm to generate the certificate and ignores all | |
| 3366 | subsequent sslproxy_cert_sign options (the first match wins). If no | |
| 3367 | acl(s) match, the default signing algorithm is determined by errors | |
| 3368 | detected when obtaining and validating the origin server certificate. | |
| 3369 | ||
| 3370 | WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can | |
| 3371 | be used with sslproxy_cert_adapt, but if and only if Squid is bumping a | |
| 3372 | CONNECT request that carries a domain name. In all other cases (CONNECT | |
| 3373 | to an IP address or an intercepted SSL connection), Squid cannot detect | |
| 3374 | the domain mismatch at certificate generation time when | |
| 3375 | bump-server-first is used. | |
| 3376 | DOC_END | |
| 3377 | ||
| 3378 | NAME: sslproxy_cert_adapt | |
| 3379 | IFDEF: USE_OPENSSL | |
| 3380 | DEFAULT: none | |
| 3381 | TYPE: sslproxy_cert_adapt | |
| 3382 | LOC: Config.ssl_client.cert_adapt | |
| 3383 | DOC_START | |
| 3384 | ||
| 3385 | sslproxy_cert_adapt <adaptation algorithm> acl ... | |
| 3386 | ||
| 3387 | The following certificate adaptation algorithms are supported: | |
| 3388 | ||
| 3389 | setValidAfter | |
| 3390 | Sets the "Not After" property to the "Not After" property of | |
| 3391 | the CA certificate used to sign generated certificates. | |
| 3392 | ||
| 3393 | setValidBefore | |
| 3394 | Sets the "Not Before" property to the "Not Before" property of | |
| 3395 | the CA certificate used to sign generated certificates. | |
| 3396 | ||
| 3397 | setCommonName or setCommonName{CN} | |
| 3398 | Sets Subject.CN property to the host name specified as a | |
| 3399 | CN parameter or, if no explicit CN parameter was specified, | |
| 3400 | extracted from the CONNECT request. It is a misconfiguration | |
| 3401 | to use setCommonName without an explicit parameter for | |
| 3402 | intercepted or tproxied SSL connections. | |
| 3403 | ||
| 3404 | This clause only supports fast acl types. | |
| 3405 | ||
| 3406 | Squid first groups sslproxy_cert_adapt options by adaptation algorithm. | |
| 3407 | Within a group, when sslproxy_cert_adapt acl(s) match, Squid uses the | |
| 3408 | corresponding adaptation algorithm to generate the certificate and | |
| 3409 | ignores all subsequent sslproxy_cert_adapt options in that algorithm's | |
| 3410 | group (i.e., the first match wins within each algorithm group). If no | |
| 3411 | acl(s) match, the default mimicking action takes place. | |
| 3412 | ||
| 3413 | WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can | |
| 3414 | be used with sslproxy_cert_adapt, but if and only if Squid is bumping a | |
| 3415 | CONNECT request that carries a domain name. In all other cases (CONNECT | |
| 3416 | to an IP address or an intercepted SSL connection), Squid cannot detect | |
| 3417 | the domain mismatch at certificate generation time when | |
| 3418 | bump-server-first is used. | |
| 3419 | DOC_END | |
| 3420 | ||
| 3421 | NAME: sslpassword_program | |
| 3422 | IFDEF: USE_OPENSSL | |
| 3423 | DEFAULT: none | |
| 3424 | LOC: Config.Program.ssl_password | |
| 3425 | TYPE: string | |
| 3426 | DOC_START | |
| 3427 | Specify a program used for entering SSL key passphrases | |
| 3428 | when using encrypted SSL certificate keys. If not specified | |
| 3429 | keys must either be unencrypted, or Squid started with the -N | |
| 3430 | option to allow it to query interactively for the passphrase. | |
| 3431 | ||
| 3432 | The key file name is given as argument to the program allowing | |
| 3433 | selection of the right password if you have multiple encrypted | |
| 3434 | keys. | |
| 3435 | DOC_END | |
| 3436 | ||
| 3437 | COMMENT_START | |
| 3438 | OPTIONS RELATING TO EXTERNAL SSL_CRTD | |
| 3439 | ----------------------------------------------------------------------------- | |
| 3440 | COMMENT_END | |
| 3441 | ||
| 3442 | NAME: sslcrtd_program | |
| 3443 | TYPE: eol | |
| 3444 | IFDEF: USE_SSL_CRTD | |
| 3445 | DEFAULT: @DEFAULT_SSL_CRTD@ -s @DEFAULT_SSL_DB_DIR@ -M 4MB | |
| 3446 | LOC: Ssl::TheConfig.ssl_crtd | |
| 3447 | DOC_START | |
| 3448 | Specify the location and options of the executable for certificate | |
| 3449 | generator. | |
| 3450 | ||
| 3451 | @DEFAULT_SSL_CRTD@ program can use a disk cache to improve response | |
| 3452 | times on repeated requests. To enable caching, specify -s and -M | |
| 3453 | parameters. If those parameters are not given, the program generates | |
| 3454 | a new certificate on every request. | |
| 3455 | ||
| 3456 | For more information use: | |
| 3457 | @DEFAULT_SSL_CRTD@ -h | |
| 3458 | DOC_END | |
| 3459 | ||
| 3460 | NAME: sslcrtd_children | |
| 3461 | TYPE: HelperChildConfig | |
| 3462 | IFDEF: USE_SSL_CRTD | |
| 3463 | DEFAULT: 32 startup=5 idle=1 | |
| 3464 | LOC: Ssl::TheConfig.ssl_crtdChildren | |
| 3465 | DOC_START | |
| 3466 | Specifies the maximum number of certificate generation processes that | |
| 3467 | Squid may spawn (numberofchildren) and several related options. Using | |
| 3468 | too few of these helper processes (a.k.a. "helpers") creates request | |
| 3469 | queues. Using too many helpers wastes your system resources. Squid | |
| 3470 | does not support spawning more than 32 helpers. | |
| 3471 | ||
| 3472 | Usage: numberofchildren [option]... | |
| 3473 | ||
| 3474 | The startup= and idle= options allow some measure of skew in your | |
| 3475 | tuning. | |
| 3476 | ||
| 3477 | startup=N | |
| 3478 | ||
| 3479 | Sets the minimum number of processes to spawn when Squid | |
| 3480 | starts or reconfigures. When set to zero the first request will | |
| 3481 | cause spawning of the first child process to handle it. | |
| 3482 | ||
| 3483 | Starting too few children temporary slows Squid under load while it | |
| 3484 | tries to spawn enough additional processes to cope with traffic. | |
| 3485 | ||
| 3486 | idle=N | |
| 3487 | ||
| 3488 | Sets a minimum of how many processes Squid is to try and keep available | |
| 3489 | at all times. When traffic begins to rise above what the existing | |
| 3490 | processes can handle this many more will be spawned up to the maximum | |
| 3491 | configured. A minimum setting of 1 is required. | |
| 3492 | ||
| 3493 | queue-size=N | |
| 3494 | ||
| 3495 | Sets the maximum number of queued requests. A request is queued when | |
| 3496 | no existing child is idle and no new child can be started due to | |
| 3497 | numberofchildren limit. If the queued requests exceed queue size for | |
| 3498 | more than 3 minutes squid aborts its operation. The default value is | |
| 3499 | set to 2*numberofchildren. | |
| 3500 | ||
| 3501 | You must have at least one ssl_crtd process. | |
| 3502 | DOC_END | |
| 3503 | ||
| 3504 | NAME: sslcrtvalidator_program | |
| 3505 | TYPE: eol | |
| 3506 | IFDEF: USE_OPENSSL | |
| 3507 | DEFAULT: none | |
| 3508 | LOC: Ssl::TheConfig.ssl_crt_validator | |
| 3509 | DOC_START | |
| 3510 | Specify the location and options of the executable for ssl_crt_validator | |
| 3511 | process. | |
| 3512 | ||
| 3513 | Usage: sslcrtvalidator_program [ttl=...] [cache=n] path ... | |
| 3514 | ||
| 3515 | Options: | |
| 3516 | ||
| 3517 | cache=bytes | |
| 3518 | Limits how much memory Squid can use for caching validator | |
| 3519 | responses. The default is 67108864 (i.e. 64 MB). | |
| 3520 | Reconfiguration purges any excess entries. To disable caching, | |
| 3521 | use cache=0. Currently, cache entry sizes are seriously | |
| 3522 | underestimated. Even with that bug, a typical estimate for a | |
| 3523 | single cache entry size would be at least a few kilobytes (the | |
| 3524 | size of the PEM certificates sent to the validator). | |
| 3525 | ||
| 3526 | ttl=<seconds|"infinity"> | |
| 3527 | Approximately how long Squid may reuse the validator results | |
| 3528 | for. The default is 3600 (i.e. 1 hour). Using ttl=infinity | |
| 3529 | disables TTL checks. Reconfiguration does not affect TTLs of | |
| 3530 | the already cached entries. To disable caching, use zero cache | |
| 3531 | size, not zero TTL -- zero TTL allows reuse for the remainder | |
| 3532 | of the second when the result was cached. | |
| 3533 | DOC_END | |
| 3534 | ||
| 3535 | NAME: sslcrtvalidator_children | |
| 3536 | TYPE: HelperChildConfig | |
| 3537 | IFDEF: USE_OPENSSL | |
| 3538 | DEFAULT: 32 startup=5 idle=1 concurrency=1 | |
| 3539 | LOC: Ssl::TheConfig.ssl_crt_validator_Children | |
| 3540 | DOC_START | |
| 3541 | Specifies the maximum number of certificate validation processes that | |
| 3542 | Squid may spawn (numberofchildren) and several related options. Using | |
| 3543 | too few of these helper processes (a.k.a. "helpers") creates request | |
| 3544 | queues. Using too many helpers wastes your system resources. Squid | |
| 3545 | does not support spawning more than 32 helpers. | |
| 3546 | ||
| 3547 | Usage: numberofchildren [option]... | |
| 3548 | ||
| 3549 | The startup= and idle= options allow some measure of skew in your | |
| 3550 | tuning. | |
| 3551 | ||
| 3552 | startup=N | |
| 3553 | ||
| 3554 | Sets the minimum number of processes to spawn when Squid | |
| 3555 | starts or reconfigures. When set to zero the first request will | |
| 3556 | cause spawning of the first child process to handle it. | |
| 3557 | ||
| 3558 | Starting too few children temporary slows Squid under load while it | |
| 3559 | tries to spawn enough additional processes to cope with traffic. | |
| 3560 | ||
| 3561 | idle=N | |
| 3562 | ||
| 3563 | Sets a minimum of how many processes Squid is to try and keep available | |
| 3564 | at all times. When traffic begins to rise above what the existing | |
| 3565 | processes can handle this many more will be spawned up to the maximum | |
| 3566 | configured. A minimum setting of 1 is required. | |
| 3567 | ||
| 3568 | concurrency= | |
| 3569 | ||
| 3570 | The number of requests each certificate validator helper can handle in | |
| 3571 | parallel. A value of 0 indicates the certificate validator does not | |
| 3572 | support concurrency. Defaults to 1. | |
| 3573 | ||
| 3574 | When this directive is set to a value >= 1 then the protocol | |
| 3575 | used to communicate with the helper is modified to include | |
| 3576 | a request ID in front of the request/response. The request | |
| 3577 | ID from the request must be echoed back with the response | |
| 3578 | to that request. | |
| 3579 | ||
| 3580 | queue-size=N | |
| 3581 | ||
| 3582 | Sets the maximum number of queued requests. A request is queued when | |
| 3583 | no existing child can accept it due to concurrency limit and no new | |
| 3584 | child can be started due to numberofchildren limit. If the queued | |
| 3585 | requests exceed queue size for more than 3 minutes squid aborts its | |
| 3586 | operation. The default value is set to 2*numberofchildren. | |
| 3587 | ||
| 3588 | You must have at least one ssl_crt_validator process. | |
| 3589 | DOC_END | |
| 3590 | ||
| 3591 | COMMENT_START | |
| 3592 | OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM | |
| 3593 | ----------------------------------------------------------------------------- | |
| 3594 | COMMENT_END | |
| 3595 | ||
| 3596 | NAME: cache_peer | |
| 3597 | TYPE: peer | |
| 3598 | DEFAULT: none | |
| 3599 | LOC: Config.peers | |
| 3600 | DOC_START | |
| 3601 | To specify other caches in a hierarchy, use the format: | |
| 3602 | ||
| 3603 | cache_peer hostname type http-port icp-port [options] | |
| 3604 | ||
| 3605 | For example, | |
| 3606 | ||
| 3607 | # proxy icp | |
| 3608 | # hostname type port port options | |
| 3609 | # -------------------- -------- ----- ----- ----------- | |
| 3610 | cache_peer parent.foo.net parent 3128 3130 default | |
| 3611 | cache_peer sib1.foo.net sibling 3128 3130 proxy-only | |
| 3612 | cache_peer sib2.foo.net sibling 3128 3130 proxy-only | |
| 3613 | cache_peer example.com parent 80 0 default | |
| 3614 | cache_peer cdn.example.com sibling 3128 0 | |
| 3615 | ||
| 3616 | type: either 'parent', 'sibling', or 'multicast'. | |
| 3617 | ||
| 3618 | proxy-port: The port number where the peer accept HTTP requests. | |
| 3619 | For other Squid proxies this is usually 3128 | |
| 3620 | For web servers this is usually 80 | |
| 3621 | ||
| 3622 | icp-port: Used for querying neighbor caches about objects. | |
| 3623 | Set to 0 if the peer does not support ICP or HTCP. | |
| 3624 | See ICP and HTCP options below for additional details. | |
| 3625 | ||
| 3626 | ||
| 3627 | ==== ICP OPTIONS ==== | |
| 3628 | ||
| 3629 | You MUST also set icp_port and icp_access explicitly when using these options. | |
| 3630 | The defaults will prevent peer traffic using ICP. | |
| 3631 | ||
| 3632 | ||
| 3633 | no-query Disable ICP queries to this neighbor. | |
| 3634 | ||
| 3635 | multicast-responder | |
| 3636 | Indicates the named peer is a member of a multicast group. | |
| 3637 | ICP queries will not be sent directly to the peer, but ICP | |
| 3638 | replies will be accepted from it. | |
| 3639 | ||
| 3640 | closest-only Indicates that, for ICP_OP_MISS replies, we'll only forward | |
| 3641 | CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes. | |
| 3642 | ||
| 3643 | background-ping | |
| 3644 | To only send ICP queries to this neighbor infrequently. | |
| 3645 | This is used to keep the neighbor round trip time updated | |
| 3646 | and is usually used in conjunction with weighted-round-robin. | |
| 3647 | ||
| 3648 | ||
| 3649 | ==== HTCP OPTIONS ==== | |
| 3650 | ||
| 3651 | You MUST also set htcp_port and htcp_access explicitly when using these options. | |
| 3652 | The defaults will prevent peer traffic using HTCP. | |
| 3653 | ||
| 3654 | ||
| 3655 | htcp Send HTCP, instead of ICP, queries to the neighbor. | |
| 3656 | You probably also want to set the "icp-port" to 4827 | |
| 3657 | instead of 3130. This directive accepts a comma separated | |
| 3658 | list of options described below. | |
| 3659 | ||
| 3660 | htcp=oldsquid Send HTCP to old Squid versions (2.5 or earlier). | |
| 3661 | ||
| 3662 | htcp=no-clr Send HTCP to the neighbor but without | |
| 3663 | sending any CLR requests. This cannot be used with | |
| 3664 | only-clr. | |
| 3665 | ||
| 3666 | htcp=only-clr Send HTCP to the neighbor but ONLY CLR requests. | |
| 3667 | This cannot be used with no-clr. | |
| 3668 | ||
| 3669 | htcp=no-purge-clr | |
| 3670 | Send HTCP to the neighbor including CLRs but only when | |
| 3671 | they do not result from PURGE requests. | |
| 3672 | ||
| 3673 | htcp=forward-clr | |
| 3674 | Forward any HTCP CLR requests this proxy receives to the peer. | |
| 3675 | ||
| 3676 | ||
| 3677 | ==== PEER SELECTION METHODS ==== | |
| 3678 | ||
| 3679 | The default peer selection method is ICP, with the first responding peer | |
| 3680 | being used as source. These options can be used for better load balancing. | |
| 3681 | ||
| 3682 | ||
| 3683 | default This is a parent cache which can be used as a "last-resort" | |
| 3684 | if a peer cannot be located by any of the peer-selection methods. | |
| 3685 | If specified more than once, only the first is used. | |
| 3686 | ||
| 3687 | round-robin Load-Balance parents which should be used in a round-robin | |
| 3688 | fashion in the absence of any ICP queries. | |
| 3689 | weight=N can be used to add bias. | |
| 3690 | ||
| 3691 | weighted-round-robin | |
| 3692 | Load-Balance parents which should be used in a round-robin | |
| 3693 | fashion with the frequency of each parent being based on the | |
| 3694 | round trip time. Closer parents are used more often. | |
| 3695 | Usually used for background-ping parents. | |
| 3696 | weight=N can be used to add bias. | |
| 3697 | ||
| 3698 | carp Load-Balance parents which should be used as a CARP array. | |
| 3699 | The requests will be distributed among the parents based on the | |
| 3700 | CARP load balancing hash function based on their weight. | |
| 3701 | ||
| 3702 | userhash Load-balance parents based on the client proxy_auth username. | |
| 3703 | ||
| 3704 | sourcehash Load-balance parents based on the client source IP. | |
| 3705 | ||
| 3706 | multicast-siblings | |
| 3707 | To be used only for cache peers of type "multicast". | |
| 3708 | ALL members of this multicast group have "sibling" | |
| 3709 | relationship with it, not "parent". This is to a multicast | |
| 3710 | group when the requested object would be fetched only from | |
| 3711 | a "parent" cache, anyway. It's useful, e.g., when | |
| 3712 | configuring a pool of redundant Squid proxies, being | |
| 3713 | members of the same multicast group. | |
| 3714 | ||
| 3715 | ||
| 3716 | ==== PEER SELECTION OPTIONS ==== | |
| 3717 | ||
| 3718 | weight=N use to affect the selection of a peer during any weighted | |
| 3719 | peer-selection mechanisms. | |
| 3720 | The weight must be an integer; default is 1, | |
| 3721 | larger weights are favored more. | |
| 3722 | This option does not affect parent selection if a peering | |
| 3723 | protocol is not in use. | |
| 3724 | ||
| 3725 | basetime=N Specify a base amount to be subtracted from round trip | |
| 3726 | times of parents. | |
| 3727 | It is subtracted before division by weight in calculating | |
| 3728 | which parent to fectch from. If the rtt is less than the | |
| 3729 | base time the rtt is set to a minimal value. | |
| 3730 | ||
| 3731 | ttl=N Specify a TTL to use when sending multicast ICP queries | |
| 3732 | to this address. | |
| 3733 | Only useful when sending to a multicast group. | |
| 3734 | Because we don't accept ICP replies from random | |
| 3735 | hosts, you must configure other group members as | |
| 3736 | peers with the 'multicast-responder' option. | |
| 3737 | ||
| 3738 | no-delay To prevent access to this neighbor from influencing the | |
| 3739 | delay pools. | |
| 3740 | ||
| 3741 | digest-url=URL Tell Squid to fetch the cache digest (if digests are | |
| 3742 | enabled) for this host from the specified URL rather | |
| 3743 | than the Squid default location. | |
| 3744 | ||
| 3745 | ||
| 3746 | ==== CARP OPTIONS ==== | |
| 3747 | ||
| 3748 | carp-key=key-specification | |
| 3749 | use a different key than the full URL to hash against the peer. | |
| 3750 | the key-specification is a comma-separated list of the keywords | |
| 3751 | scheme, host, port, path, params | |
| 3752 | Order is not important. | |
| 3753 | ||
| 3754 | ==== ACCELERATOR / REVERSE-PROXY OPTIONS ==== | |
| 3755 | ||
| 3756 | originserver Causes this parent to be contacted as an origin server. | |
| 3757 | Meant to be used in accelerator setups when the peer | |
| 3758 | is a web server. | |
| 3759 | ||
| 3760 | forceddomain=name | |
| 3761 | Set the Host header of requests forwarded to this peer. | |
| 3762 | Useful in accelerator setups where the server (peer) | |
| 3763 | expects a certain domain name but clients may request | |
| 3764 | others. ie example.com or www.example.com | |
| 3765 | ||
| 3766 | no-digest Disable request of cache digests. | |
| 3767 | ||
| 3768 | no-netdb-exchange | |
| 3769 | Disables requesting ICMP RTT database (NetDB). | |
| 3770 | ||
| 3771 | ||
| 3772 | ==== AUTHENTICATION OPTIONS ==== | |
| 3773 | ||
| 3774 | login=user:password | |
| 3775 | If this is a personal/workgroup proxy and your parent | |
| 3776 | requires proxy authentication. | |
| 3777 | ||
| 3778 | Note: The string can include URL escapes (i.e. %20 for | |
| 3779 | spaces). This also means % must be written as %%. | |
| 3780 | ||
| 3781 | login=PASSTHRU | |
| 3782 | Send login details received from client to this peer. | |
| 3783 | Both Proxy- and WWW-Authorization headers are passed | |
| 3784 | without alteration to the peer. | |
| 3785 | Authentication is not required by Squid for this to work. | |
| 3786 | ||
| 3787 | Note: This will pass any form of authentication but | |
| 3788 | only Basic auth will work through a proxy unless the | |
| 3789 | connection-auth options are also used. | |
| 3790 | ||
| 3791 | login=PASS Send login details received from client to this peer. | |
| 3792 | Authentication is not required by this option. | |
| 3793 | ||
| 3794 | If there are no client-provided authentication headers | |
| 3795 | to pass on, but username and password are available | |
| 3796 | from an external ACL user= and password= result tags | |
| 3797 | they may be sent instead. | |
| 3798 | ||
| 3799 | Note: To combine this with proxy_auth both proxies must | |
| 3800 | share the same user database as HTTP only allows for | |
| 3801 | a single login (one for proxy, one for origin server). | |
| 3802 | Also be warned this will expose your users proxy | |
| 3803 | password to the peer. USE WITH CAUTION | |
| 3804 | ||
| 3805 | login=*:password | |
| 3806 | Send the username to the upstream cache, but with a | |
| 3807 | fixed password. This is meant to be used when the peer | |
| 3808 | is in another administrative domain, but it is still | |
| 3809 | needed to identify each user. | |
| 3810 | The star can optionally be followed by some extra | |
| 3811 | information which is added to the username. This can | |
| 3812 | be used to identify this proxy to the peer, similar to | |
| 3813 | the login=username:password option above. | |
| 3814 | ||
| 3815 | login=NEGOTIATE | |
| 3816 | If this is a personal/workgroup proxy and your parent | |
| 3817 | requires a secure proxy authentication. | |
| 3818 | The first principal from the default keytab or defined by | |
| 3819 | the environment variable KRB5_KTNAME will be used. | |
| 3820 | ||
| 3821 | WARNING: The connection may transmit requests from multiple | |
| 3822 | clients. Negotiate often assumes end-to-end authentication | |
| 3823 | and a single-client. Which is not strictly true here. | |
| 3824 | ||
| 3825 | login=NEGOTIATE:principal_name | |
| 3826 | If this is a personal/workgroup proxy and your parent | |
| 3827 | requires a secure proxy authentication. | |
| 3828 | The principal principal_name from the default keytab or | |
| 3829 | defined by the environment variable KRB5_KTNAME will be | |
| 3830 | used. | |
| 3831 | ||
| 3832 | WARNING: The connection may transmit requests from multiple | |
| 3833 | clients. Negotiate often assumes end-to-end authentication | |
| 3834 | and a single-client. Which is not strictly true here. | |
| 3835 | ||
| 3836 | connection-auth=on|off | |
| 3837 | Tell Squid that this peer does or not support Microsoft | |
| 3838 | connection oriented authentication, and any such | |
| 3839 | challenges received from there should be ignored. | |
| 3840 | Default is auto to automatically determine the status | |
| 3841 | of the peer. | |
| 3842 | ||
| 3843 | auth-no-keytab | |
| 3844 | Do not use a keytab to authenticate to a peer when | |
| 3845 | login=NEGOTIATE is specified. Let the GSSAPI | |
| 3846 | implementation determine which already existing | |
| 3847 | credentials cache to use instead. | |
| 3848 | ||
| 3849 | ||
| 3850 | ==== SSL / HTTPS / TLS OPTIONS ==== | |
| 3851 | ||
| 3852 | tls Encrypt connections to this peer with TLS. | |
| 3853 | ||
| 3854 | sslcert=/path/to/ssl/certificate | |
| 3855 | A client X.509 certificate to use when connecting to | |
| 3856 | this peer. | |
| 3857 | ||
| 3858 | sslkey=/path/to/ssl/key | |
| 3859 | The private key corresponding to sslcert above. | |
| 3860 | ||
| 3861 | If sslkey= is not specified sslcert= is assumed to | |
| 3862 | reference a PEM file containing both the certificate | |
| 3863 | and private key. | |
| 3864 | ||
| 3865 | sslcipher=... The list of valid SSL ciphers to use when connecting | |
| 3866 | to this peer. | |
| 3867 | ||
| 3868 | tls-min-version=1.N | |
| 3869 | The minimum TLS protocol version to permit. To control | |
| 3870 | SSLv3 use the tls-options= parameter. | |
| 3871 | Supported Values: 1.0 (default), 1.1, 1.2 | |
| 3872 | ||
| 3873 | tls-options=... Specify various TLS implementation options. | |
| 3874 | ||
| 3875 | OpenSSL options most important are: | |
| 3876 | ||
| 3877 | NO_SSLv3 Disallow the use of SSLv3 | |
| 3878 | ||
| 3879 | SINGLE_DH_USE | |
| 3880 | Always create a new key when using | |
| 3881 | temporary/ephemeral DH key exchanges | |
| 3882 | ||
| 3883 | NO_TICKET | |
| 3884 | Disable use of RFC5077 session tickets. | |
| 3885 | Some servers may have problems | |
| 3886 | understanding the TLS extension due | |
| 3887 | to ambiguous specification in RFC4507. | |
| 3888 | ||
| 3889 | ALL Enable various bug workarounds | |
| 3890 | suggested as "harmless" by OpenSSL | |
| 3891 | Be warned that this reduces SSL/TLS | |
| 3892 | strength to some attacks. | |
| 3893 | ||
| 3894 | See the OpenSSL SSL_CTX_set_options documentation for a | |
| 3895 | more complete list. | |
| 3896 | ||
| 3897 | GnuTLS options most important are: | |
| 3898 | ||
| 3899 | %NO_TICKETS | |
| 3900 | Disable use of RFC5077 session tickets. | |
| 3901 | Some servers may have problems | |
| 3902 | understanding the TLS extension due | |
| 3903 | to ambiguous specification in RFC4507. | |
| 3904 | ||
| 3905 | See the GnuTLS Priority Strings documentation | |
| 3906 | for a more complete list. | |
| 3907 | http://www.gnutls.org/manual/gnutls.html#Priority-Strings | |
| 3908 | ||
| 3909 | tls-cafile= PEM file containing CA certificates to use when verifying | |
| 3910 | the peer certificate. May be repeated to load multiple files. | |
| 3911 | ||
| 3912 | sslcapath=... A directory containing additional CA certificates to | |
| 3913 | use when verifying the peer certificate. | |
| 3914 | Requires OpenSSL or LibreSSL. | |
| 3915 | ||
| 3916 | sslcrlfile=... A certificate revocation list file to use when | |
| 3917 | verifying the peer certificate. | |
| 3918 | ||
| 3919 | sslflags=... Specify various flags modifying the SSL implementation: | |
| 3920 | ||
| 3921 | DONT_VERIFY_PEER | |
| 3922 | Accept certificates even if they fail to | |
| 3923 | verify. | |
| 3924 | ||
| 3925 | DONT_VERIFY_DOMAIN | |
| 3926 | Don't verify the peer certificate | |
| 3927 | matches the server name | |
| 3928 | ||
| 3929 | ssldomain= The peer name as advertised in it's certificate. | |
| 3930 | Used for verifying the correctness of the received peer | |
| 3931 | certificate. If not specified the peer hostname will be | |
| 3932 | used. | |
| 3933 | ||
| 3934 | front-end-https[=off|on|auto] | |
| 3935 | Enable the "Front-End-Https: On" header needed when | |
| 3936 | using Squid as a SSL frontend in front of Microsoft OWA. | |
| 3937 | See MS KB document Q307347 for details on this header. | |
| 3938 | If set to auto the header will only be added if the | |
| 3939 | request is forwarded as a https:// URL. | |
| 3940 | ||
| 3941 | tls-default-ca[=off] | |
| 3942 | Whether to use the system Trusted CAs. Default is ON. | |
| 3943 | ||
| 3944 | tls-no-npn Do not use the TLS NPN extension to advertise HTTP/1.1. | |
| 3945 | ||
| 3946 | ==== GENERAL OPTIONS ==== | |
| 3947 | ||
| 3948 | connect-timeout=N | |
| 3949 | A peer-specific connect timeout. | |
| 3950 | Also see the peer_connect_timeout directive. | |
| 3951 | ||
| 3952 | connect-fail-limit=N | |
| 3953 | How many times connecting to a peer must fail before | |
| 3954 | it is marked as down. Standby connection failures | |
| 3955 | count towards this limit. Default is 10. | |
| 3956 | ||
| 3957 | allow-miss Disable Squid's use of only-if-cached when forwarding | |
| 3958 | requests to siblings. This is primarily useful when | |
| 3959 | icp_hit_stale is used by the sibling. Excessive use | |
| 3960 | of this option may result in forwarding loops. One way | |
| 3961 | to prevent peering loops when using this option, is to | |
| 3962 | deny cache peer usage on requests from a peer: | |
| 3963 | acl fromPeer ... | |
| 3964 | cache_peer_access peerName deny fromPeer | |
| 3965 | ||
| 3966 | max-conn=N Limit the number of concurrent connections the Squid | |
| 3967 | may open to this peer, including already opened idle | |
| 3968 | and standby connections. There is no peer-specific | |
| 3969 | connection limit by default. | |
| 3970 | ||
| 3971 | A peer exceeding the limit is not used for new | |
| 3972 | requests unless a standby connection is available. | |
| 3973 | ||
| 3974 | max-conn currently works poorly with idle persistent | |
| 3975 | connections: When a peer reaches its max-conn limit, | |
| 3976 | and there are idle persistent connections to the peer, | |
| 3977 | the peer may not be selected because the limiting code | |
| 3978 | does not know whether Squid can reuse those idle | |
| 3979 | connections. | |
| 3980 | ||
| 3981 | standby=N Maintain a pool of N "hot standby" connections to an | |
| 3982 | UP peer, available for requests when no idle | |
| 3983 | persistent connection is available (or safe) to use. | |
| 3984 | By default and with zero N, no such pool is maintained. | |
| 3985 | N must not exceed the max-conn limit (if any). | |
| 3986 | ||
| 3987 | At start or after reconfiguration, Squid opens new TCP | |
| 3988 | standby connections until there are N connections | |
| 3989 | available and then replenishes the standby pool as | |
| 3990 | opened connections are used up for requests. A used | |
| 3991 | connection never goes back to the standby pool, but | |
| 3992 | may go to the regular idle persistent connection pool | |
| 3993 | shared by all peers and origin servers. | |
| 3994 | ||
| 3995 | Squid never opens multiple new standby connections | |
| 3996 | concurrently. This one-at-a-time approach minimizes | |
| 3997 | flooding-like effect on peers. Furthermore, just a few | |
| 3998 | standby connections should be sufficient in most cases | |
| 3999 | to supply most new requests with a ready-to-use | |
| 4000 | connection. | |
| 4001 | ||
| 4002 | Standby connections obey server_idle_pconn_timeout. | |
| 4003 | For the feature to work as intended, the peer must be | |
| 4004 | configured to accept and keep them open longer than | |
| 4005 | the idle timeout at the connecting Squid, to minimize | |
| 4006 | race conditions typical to idle used persistent | |
| 4007 | connections. Default request_timeout and | |
| 4008 | server_idle_pconn_timeout values ensure such a | |
| 4009 | configuration. | |
| 4010 | ||
| 4011 | name=xxx Unique name for the peer. | |
| 4012 | Required if you have multiple cache_peers with the same hostname. | |
| 4013 | Defaults to cache_peer hostname when not explicitly specified. | |
| 4014 | ||
| 4015 | Other directives (e.g., cache_peer_access), cache manager reports, | |
| 4016 | and cache.log messages use this name to refer to this cache_peer. | |
| 4017 | ||
| 4018 | The cache_peer name value affects hashing-based peer selection | |
| 4019 | methods (e.g., carp and sourcehash). | |
| 4020 | ||
| 4021 | Can be used by outgoing access controls through the | |
| 4022 | peername ACL type. | |
| 4023 | ||
| 4024 | The name value preserves configured spelling, but name uniqueness | |
| 4025 | checks and name-based search are case-insensitive. | |
| 4026 | ||
| 4027 | no-tproxy Do not use the client-spoof TPROXY support when forwarding | |
| 4028 | requests to this peer. Use normal address selection instead. | |
| 4029 | This overrides the spoof_client_ip ACL. | |
| 4030 | ||
| 4031 | proxy-only objects fetched from the peer will not be stored locally. | |
| 4032 | ||
| 4033 | DOC_END | |
| 4034 | ||
| 4035 | NAME: cache_peer_access | |
| 4036 | TYPE: peer_access | |
| 4037 | DEFAULT: none | |
| 4038 | DEFAULT_DOC: No peer usage restrictions. | |
| 4039 | LOC: none | |
| 4040 | DOC_START | |
| 4041 | Restricts usage of cache_peer proxies. | |
| 4042 | ||
| 4043 | Usage: | |
| 4044 | cache_peer_access peer-name allow|deny [!]aclname ... | |
| 4045 | ||
| 4046 | For the required peer-name parameter, use either the value of the | |
| 4047 | cache_peer name=value parameter or, if name=value is missing, the | |
| 4048 | cache_peer hostname parameter. | |
| 4049 | ||
| 4050 | This directive narrows down the selection of peering candidates, but | |
| 4051 | does not determine the order in which the selected candidates are | |
| 4052 | contacted. That order is determined by the peer selection algorithms | |
| 4053 | (see PEER SELECTION sections in the cache_peer documentation). | |
| 4054 | ||
| 4055 | If a deny rule matches, the corresponding peer will not be contacted | |
| 4056 | for the current transaction -- Squid will not send ICP queries and | |
| 4057 | will not forward HTTP requests to that peer. An allow match leaves | |
| 4058 | the corresponding peer in the selection. The first match for a given | |
| 4059 | peer wins for that peer. | |
| 4060 | ||
| 4061 | The relative order of cache_peer_access directives for the same peer | |
| 4062 | matters. The relative order of any two cache_peer_access directives | |
| 4063 | for different peers does not matter. To ease interpretation, it is a | |
| 4064 | good idea to group cache_peer_access directives for the same peer | |
| 4065 | together. | |
| 4066 | ||
| 4067 | A single cache_peer_access directive may be evaluated multiple times | |
| 4068 | for a given transaction because individual peer selection algorithms | |
| 4069 | may check it independently from each other. These redundant checks | |
| 4070 | may be optimized away in future Squid versions. | |
| 4071 | ||
| 4072 | This clause only supports fast acl types. | |
| 4073 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 4074 | ||
| 4075 | DOC_END | |
| 4076 | ||
| 4077 | NAME: neighbor_type_domain | |
| 4078 | TYPE: hostdomaintype | |
| 4079 | DEFAULT: none | |
| 4080 | DEFAULT_DOC: The peer type from cache_peer directive is used for all requests to that peer. | |
| 4081 | LOC: none | |
| 4082 | DOC_START | |
| 4083 | Modify the cache_peer neighbor type when passing requests | |
| 4084 | about specific domains to the peer. | |
| 4085 | ||
| 4086 | Usage: | |
| 4087 | neighbor_type_domain peer-name parent|sibling domain... | |
| 4088 | ||
| 4089 | For the required peer-name parameter, use either the value of the | |
| 4090 | cache_peer name=value parameter or, if name=value is missing, the | |
| 4091 | cache_peer hostname parameter. | |
| 4092 | ||
| 4093 | For example: | |
| 4094 | cache_peer foo.example.com parent 3128 3130 | |
| 4095 | neighbor_type_domain foo.example.com sibling .au .de | |
| 4096 | ||
| 4097 | The above configuration treats all requests to foo.example.com as a | |
| 4098 | parent proxy unless the request is for a .au or .de ccTLD domain name. | |
| 4099 | DOC_END | |
| 4100 | ||
| 4101 | NAME: dead_peer_timeout | |
| 4102 | COMMENT: (seconds) | |
| 4103 | DEFAULT: 10 seconds | |
| 4104 | TYPE: time_t | |
| 4105 | LOC: Config.Timeout.deadPeer | |
| 4106 | DOC_START | |
| 4107 | This controls how long Squid waits to declare a peer cache | |
| 4108 | as "dead." If there are no ICP replies received in this | |
| 4109 | amount of time, Squid will declare the peer dead and not | |
| 4110 | expect to receive any further ICP replies. However, it | |
| 4111 | continues to send ICP queries, and will mark the peer as | |
| 4112 | alive upon receipt of the first subsequent ICP reply. | |
| 4113 | ||
| 4114 | This timeout also affects when Squid expects to receive ICP | |
| 4115 | replies from peers. If more than 'dead_peer' seconds have | |
| 4116 | passed since the last ICP reply was received, Squid will not | |
| 4117 | expect to receive an ICP reply on the next query. Thus, if | |
| 4118 | your time between requests is greater than this timeout, you | |
| 4119 | will see a lot of requests sent DIRECT to origin servers | |
| 4120 | instead of to your parents. | |
| 4121 | DOC_END | |
| 4122 | ||
| 4123 | NAME: forward_max_tries | |
| 4124 | DEFAULT: 25 | |
| 4125 | TYPE: int | |
| 4126 | LOC: Config.forward_max_tries | |
| 4127 | DOC_START | |
| 4128 | Limits the number of attempts to forward the request. | |
| 4129 | ||
| 4130 | For the purpose of this limit, Squid counts all high-level request | |
| 4131 | forwarding attempts, including any same-destination retries after | |
| 4132 | certain persistent connection failures and any attempts to use a | |
| 4133 | different peer. However, these low-level attempts are not counted: | |
| 4134 | * connection reopening attempts (enabled using connect_retries) | |
| 4135 | * unfinished Happy Eyeballs connection attempts (prevented by setting | |
| 4136 | happy_eyeballs_connect_limit to 0) | |
| 4137 | ||
| 4138 | See also: forward_timeout, connect_retries, and %request_attempts. | |
| 4139 | DOC_END | |
| 4140 | ||
| 4141 | COMMENT_START | |
| 4142 | MEMORY CACHE OPTIONS | |
| 4143 | ----------------------------------------------------------------------------- | |
| 4144 | COMMENT_END | |
| 4145 | ||
| 4146 | NAME: cache_mem | |
| 4147 | COMMENT: (bytes) | |
| 4148 | TYPE: b_size_t | |
| 4149 | DEFAULT: 256 MB | |
| 4150 | LOC: Config.memMaxSize | |
| 4151 | DOC_START | |
| 4152 | NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE. | |
| 4153 | IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL | |
| 4154 | USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER | |
| 4155 | THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS. | |
| 4156 | ||
| 4157 | 'cache_mem' specifies the ideal amount of memory to be used | |
| 4158 | for: | |
| 4159 | * In-Transit objects | |
| 4160 | * Hot Objects | |
| 4161 | * Negative-Cached objects | |
| 4162 | ||
| 4163 | Data for these objects are stored in 4 KB blocks. This | |
| 4164 | parameter specifies the ideal upper limit on the total size of | |
| 4165 | 4 KB blocks allocated. In-Transit objects take the highest | |
| 4166 | priority. | |
| 4167 | ||
| 4168 | In-transit objects have priority over the others. When | |
| 4169 | additional space is needed for incoming data, negative-cached | |
| 4170 | and hot objects will be released. In other words, the | |
| 4171 | negative-cached and hot objects will fill up any unused space | |
| 4172 | not needed for in-transit objects. | |
| 4173 | ||
| 4174 | If circumstances require, this limit will be exceeded. | |
| 4175 | Specifically, if your incoming request rate requires more than | |
| 4176 | 'cache_mem' of memory to hold in-transit objects, Squid will | |
| 4177 | exceed this limit to satisfy the new requests. When the load | |
| 4178 | decreases, blocks will be freed until the high-water mark is | |
| 4179 | reached. Thereafter, blocks will be used to store hot | |
| 4180 | objects. | |
| 4181 | ||
| 4182 | If shared memory caching is enabled, Squid does not use the shared | |
| 4183 | cache space for in-transit objects, but they still consume as much | |
| 4184 | local memory as they need. For more details about the shared memory | |
| 4185 | cache, see memory_cache_shared. | |
| 4186 | DOC_END | |
| 4187 | ||
| 4188 | NAME: maximum_object_size_in_memory | |
| 4189 | COMMENT: (bytes) | |
| 4190 | TYPE: b_size_t | |
| 4191 | DEFAULT: 512 KB | |
| 4192 | LOC: Config.Store.maxInMemObjSize | |
| 4193 | DOC_START | |
| 4194 | Objects greater than this size will not be attempted to kept in | |
| 4195 | the memory cache. This should be set high enough to keep objects | |
| 4196 | accessed frequently in memory to improve performance whilst low | |
| 4197 | enough to keep larger objects from hoarding cache_mem. | |
| 4198 | DOC_END | |
| 4199 | ||
| 4200 | NAME: memory_cache_shared | |
| 4201 | COMMENT: on|off | |
| 4202 | TYPE: YesNoNone | |
| 4203 | LOC: Config.memShared | |
| 4204 | DEFAULT: none | |
| 4205 | DEFAULT_DOC: "on" where supported if doing memory caching with multiple SMP workers. | |
| 4206 | DOC_START | |
| 4207 | Controls whether the memory cache is shared among SMP workers. | |
| 4208 | ||
| 4209 | The shared memory cache is meant to occupy cache_mem bytes and replace | |
| 4210 | the non-shared memory cache, although some entities may still be | |
| 4211 | cached locally by workers for now (e.g., internal and in-transit | |
| 4212 | objects may be served from a local memory cache even if shared memory | |
| 4213 | caching is enabled). | |
| 4214 | ||
| 4215 | By default, the memory cache is shared if and only if all of the | |
| 4216 | following conditions are satisfied: Squid runs in SMP mode with | |
| 4217 | multiple workers, cache_mem is positive, and Squid environment | |
| 4218 | supports required IPC primitives (e.g., POSIX shared memory segments | |
| 4219 | and GCC-style atomic operations). | |
| 4220 | ||
| 4221 | To avoid blocking locks, shared memory uses opportunistic algorithms | |
| 4222 | that do not guarantee that every cachable entity that could have been | |
| 4223 | shared among SMP workers will actually be shared. | |
| 4224 | DOC_END | |
| 4225 | ||
| 4226 | NAME: memory_cache_mode | |
| 4227 | TYPE: memcachemode | |
| 4228 | LOC: Config | |
| 4229 | DEFAULT: always | |
| 4230 | DEFAULT_DOC: Keep the most recently fetched objects in memory | |
| 4231 | DOC_START | |
| 4232 | Controls which objects to keep in the memory cache (cache_mem) | |
| 4233 | ||
| 4234 | always Keep most recently fetched objects in memory (default) | |
| 4235 | ||
| 4236 | disk Only disk cache hits are kept in memory, which means | |
| 4237 | an object must first be cached on disk and then hit | |
| 4238 | a second time before cached in memory. | |
| 4239 | ||
| 4240 | network Only objects fetched from network is kept in memory | |
| 4241 | DOC_END | |
| 4242 | ||
| 4243 | NAME: memory_replacement_policy | |
| 4244 | TYPE: removalpolicy | |
| 4245 | LOC: Config.memPolicy | |
| 4246 | DEFAULT: lru | |
| 4247 | DOC_START | |
| 4248 | The memory replacement policy parameter determines which | |
| 4249 | objects are purged from memory when memory space is needed. | |
| 4250 | ||
| 4251 | See cache_replacement_policy for details on algorithms. | |
| 4252 | DOC_END | |
| 4253 | ||
| 4254 | COMMENT_START | |
| 4255 | DISK CACHE OPTIONS | |
| 4256 | ----------------------------------------------------------------------------- | |
| 4257 | COMMENT_END | |
| 4258 | ||
| 4259 | NAME: cache_replacement_policy | |
| 4260 | TYPE: removalpolicy | |
| 4261 | LOC: Config.replPolicy | |
| 4262 | DEFAULT: lru | |
| 4263 | DOC_START | |
| 4264 | The cache replacement policy parameter determines which | |
| 4265 | objects are evicted (replaced) when disk space is needed. | |
| 4266 | ||
| 4267 | lru : Squid's original list based LRU policy | |
| 4268 | heap GDSF : Greedy-Dual Size Frequency | |
| 4269 | heap LFUDA: Least Frequently Used with Dynamic Aging | |
| 4270 | heap LRU : LRU policy implemented using a heap | |
| 4271 | ||
| 4272 | Applies to any cache_dir lines listed below this directive. | |
| 4273 | ||
| 4274 | The LRU policies keeps recently referenced objects. | |
| 4275 | ||
| 4276 | The heap GDSF policy optimizes object hit rate by keeping smaller | |
| 4277 | popular objects in cache so it has a better chance of getting a | |
| 4278 | hit. It achieves a lower byte hit rate than LFUDA though since | |
| 4279 | it evicts larger (possibly popular) objects. | |
| 4280 | ||
| 4281 | The heap LFUDA policy keeps popular objects in cache regardless of | |
| 4282 | their size and thus optimizes byte hit rate at the expense of | |
| 4283 | hit rate since one large, popular object will prevent many | |
| 4284 | smaller, slightly less popular objects from being cached. | |
| 4285 | ||
| 4286 | Both policies utilize a dynamic aging mechanism that prevents | |
| 4287 | cache pollution that can otherwise occur with frequency-based | |
| 4288 | replacement policies. | |
| 4289 | ||
| 4290 | NOTE: if using the LFUDA replacement policy you should increase | |
| 4291 | the value of maximum_object_size above its default of 4 MB to | |
| 4292 | to maximize the potential byte hit rate improvement of LFUDA. | |
| 4293 | ||
| 4294 | For more information about the GDSF and LFUDA cache replacement | |
| 4295 | policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html | |
| 4296 | and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html. | |
| 4297 | DOC_END | |
| 4298 | ||
| 4299 | NAME: minimum_object_size | |
| 4300 | COMMENT: (bytes) | |
| 4301 | TYPE: b_int64_t | |
| 4302 | DEFAULT: 0 KB | |
| 4303 | DEFAULT_DOC: no limit | |
| 4304 | LOC: Config.Store.minObjectSize | |
| 4305 | DOC_START | |
| 4306 | Objects smaller than this size will NOT be saved on disk. The | |
| 4307 | value is specified in bytes, and the default is 0 KB, which | |
| 4308 | means all responses can be stored. | |
| 4309 | DOC_END | |
| 4310 | ||
| 4311 | NAME: maximum_object_size | |
| 4312 | COMMENT: (bytes) | |
| 4313 | TYPE: b_int64_t | |
| 4314 | DEFAULT: 4 MB | |
| 4315 | LOC: Config.Store.maxObjectSize | |
| 4316 | DOC_START | |
| 4317 | Set the default value for max-size parameter on any cache_dir. | |
| 4318 | The value is specified in bytes, and the default is 4 MB. | |
| 4319 | ||
| 4320 | If you wish to get a high BYTES hit ratio, you should probably | |
| 4321 | increase this (one 32 MB object hit counts for 3200 10KB | |
| 4322 | hits). | |
| 4323 | ||
| 4324 | If you wish to increase hit ratio more than you want to | |
| 4325 | save bandwidth you should leave this low. | |
| 4326 | ||
| 4327 | NOTE: if using the LFUDA replacement policy you should increase | |
| 4328 | this value to maximize the byte hit rate improvement of LFUDA! | |
| 4329 | See cache_replacement_policy for a discussion of this policy. | |
| 4330 | DOC_END | |
| 4331 | ||
| 4332 | NAME: cache_dir | |
| 4333 | TYPE: cachedir | |
| 4334 | DEFAULT: none | |
| 4335 | DEFAULT_DOC: No disk cache. Store cache objects only in memory. | |
| 4336 | LOC: Config.cacheSwap | |
| 4337 | DOC_START | |
| 4338 | Format: | |
| 4339 | cache_dir Type Directory-Name Fs-specific-data [options] | |
| 4340 | ||
| 4341 | You can specify multiple cache_dir lines to spread the | |
| 4342 | cache among different disk partitions. | |
| 4343 | ||
| 4344 | Type specifies the kind of storage system to use. Only "ufs" | |
| 4345 | is built by default. To enable any of the other storage systems | |
| 4346 | see the --enable-storeio configure option. | |
| 4347 | ||
| 4348 | 'Directory' is a top-level directory where cache swap | |
| 4349 | files will be stored. If you want to use an entire disk | |
| 4350 | for caching, this can be the mount-point directory. | |
| 4351 | The directory must exist and be writable by the Squid | |
| 4352 | process. Squid will NOT create this directory for you. | |
| 4353 | ||
| 4354 | Rock is currently the only SMP-aware cache_dir type. Using other | |
| 4355 | store types in configurations with multiple workers is not | |
| 4356 | supported and may lead to HTTP violations or undefined behavior, | |
| 4357 | even when each such cache_dir is given a dedicated worker using | |
| 4358 | configuration conditionals. | |
| 4359 | ||
| 4360 | ||
| 4361 | ==== The ufs store type ==== | |
| 4362 | ||
| 4363 | "ufs" is the old well-known Squid storage format that has always | |
| 4364 | been there. | |
| 4365 | ||
| 4366 | Usage: | |
| 4367 | cache_dir ufs Directory-Name Mbytes L1 L2 [options] | |
| 4368 | ||
| 4369 | 'Mbytes' is the amount of disk space (MB) to use under this | |
| 4370 | directory. The default is 100 MB. Change this to suit your | |
| 4371 | configuration. Do NOT put the size of your disk drive here. | |
| 4372 | Instead, if you want Squid to use the entire disk drive, | |
| 4373 | subtract 20% and use that value. | |
| 4374 | ||
| 4375 | 'L1' is the number of first-level subdirectories which | |
| 4376 | will be created under the 'Directory'. The default is 16. | |
| 4377 | ||
| 4378 | 'L2' is the number of second-level subdirectories which | |
| 4379 | will be created under each first-level directory. The default | |
| 4380 | is 256. | |
| 4381 | ||
| 4382 | ||
| 4383 | ==== The aufs store type ==== | |
| 4384 | ||
| 4385 | "aufs" uses the same storage format as "ufs", utilizing | |
| 4386 | POSIX-threads to avoid blocking the main Squid process on | |
| 4387 | disk-I/O. This was formerly known in Squid as async-io. | |
| 4388 | ||
| 4389 | Usage: | |
| 4390 | cache_dir aufs Directory-Name Mbytes L1 L2 [options] | |
| 4391 | ||
| 4392 | see argument descriptions under ufs above | |
| 4393 | ||
| 4394 | ||
| 4395 | ==== The diskd store type ==== | |
| 4396 | ||
| 4397 | "diskd" uses the same storage format as "ufs", utilizing a | |
| 4398 | separate process to avoid blocking the main Squid process on | |
| 4399 | disk-I/O. | |
| 4400 | ||
| 4401 | Usage: | |
| 4402 | cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n] | |
| 4403 | ||
| 4404 | see argument descriptions under ufs above | |
| 4405 | ||
| 4406 | Q1 specifies the number of unacknowledged I/O requests when Squid | |
| 4407 | stops opening new files. If this many messages are in the queues, | |
| 4408 | Squid won't open new files. Default is 64 | |
| 4409 | ||
| 4410 | Q2 specifies the number of unacknowledged messages when Squid | |
| 4411 | starts blocking. If this many messages are in the queues, | |
| 4412 | Squid blocks until it receives some replies. Default is 72 | |
| 4413 | ||
| 4414 | When Q1 < Q2 (the default), the cache directory is optimized | |
| 4415 | for lower response time at the expense of a decrease in hit | |
| 4416 | ratio. If Q1 > Q2, the cache directory is optimized for | |
| 4417 | higher hit ratio at the expense of an increase in response | |
| 4418 | time. | |
| 4419 | ||
| 4420 | ||
| 4421 | ==== The rock store type ==== | |
| 4422 | ||
| 4423 | Usage: | |
| 4424 | cache_dir rock Directory-Name Mbytes [options] | |
| 4425 | ||
| 4426 | The Rock Store type is a database-style storage. All cached | |
| 4427 | entries are stored in a "database" file, using fixed-size slots. | |
| 4428 | A single entry occupies one or more slots. | |
| 4429 | ||
| 4430 | If possible, Squid using Rock Store creates a dedicated kid | |
| 4431 | process called "disker" to avoid blocking Squid worker(s) on disk | |
| 4432 | I/O. One disker kid is created for each rock cache_dir. Diskers | |
| 4433 | are created only when Squid, running in daemon mode, has support | |
| 4434 | for the IpcIo disk I/O module. | |
| 4435 | ||
| 4436 | swap-timeout=msec: Squid will not start writing a miss to or | |
| 4437 | reading a hit from disk if it estimates that the swap operation | |
| 4438 | will take more than the specified number of milliseconds. By | |
| 4439 | default and when set to zero, disables the disk I/O time limit | |
| 4440 | enforcement. Ignored when using blocking I/O module because | |
| 4441 | blocking synchronous I/O does not allow Squid to estimate the | |
| 4442 | expected swap wait time. | |
| 4443 | ||
| 4444 | max-swap-rate=swaps/sec: Artificially limits disk access using | |
| 4445 | the specified I/O rate limit. Swap out requests that | |
| 4446 | would cause the average I/O rate to exceed the limit are | |
| 4447 | delayed. Individual swap in requests (i.e., hits or reads) are | |
| 4448 | not delayed, but they do contribute to measured swap rate and | |
| 4449 | since they are placed in the same FIFO queue as swap out | |
| 4450 | requests, they may wait longer if max-swap-rate is smaller. | |
| 4451 | This is necessary on file systems that buffer "too | |
| 4452 | many" writes and then start blocking Squid and other processes | |
| 4453 | while committing those writes to disk. Usually used together | |
| 4454 | with swap-timeout to avoid excessive delays and queue overflows | |
| 4455 | when disk demand exceeds available disk "bandwidth". By default | |
| 4456 | and when set to zero, disables the disk I/O rate limit | |
| 4457 | enforcement. Currently supported by IpcIo module only. | |
| 4458 | ||
| 4459 | slot-size=bytes: The size of a database "record" used for | |
| 4460 | storing cached responses. A cached response occupies at least | |
| 4461 | one slot and all database I/O is done using individual slots so | |
| 4462 | increasing this parameter leads to more disk space waste while | |
| 4463 | decreasing it leads to more disk I/O overheads. Should be a | |
| 4464 | multiple of your operating system I/O page size. Defaults to | |
| 4465 | 16KBytes. A housekeeping header is stored with each slot and | |
| 4466 | smaller slot-sizes will be rejected. The header is smaller than | |
| 4467 | 100 bytes. | |
| 4468 | ||
| 4469 | ||
| 4470 | ==== COMMON OPTIONS ==== | |
| 4471 | ||
| 4472 | no-store no new objects should be stored to this cache_dir. | |
| 4473 | ||
| 4474 | min-size=n the minimum object size in bytes this cache_dir | |
| 4475 | will accept. It's used to restrict a cache_dir | |
| 4476 | to only store large objects (e.g. AUFS) while | |
| 4477 | other stores are optimized for smaller objects | |
| 4478 | (e.g. Rock). | |
| 4479 | Defaults to 0. | |
| 4480 | ||
| 4481 | max-size=n the maximum object size in bytes this cache_dir | |
| 4482 | supports. | |
| 4483 | The value in maximum_object_size directive sets | |
| 4484 | the default unless more specific details are | |
| 4485 | available (ie a small store capacity). | |
| 4486 | ||
| 4487 | Note: To make optimal use of the max-size limits you should order | |
| 4488 | the cache_dir lines with the smallest max-size value first. | |
| 4489 | ||
| 4490 | CONFIG_START | |
| 4491 | ||
| 4492 | # Uncomment and adjust the following to add a disk cache directory. | |
| 4493 | #cache_dir ufs @DEFAULT_SWAP_DIR@ 100 16 256 | |
| 4494 | CONFIG_END | |
| 4495 | DOC_END | |
| 4496 | ||
| 4497 | NAME: store_dir_select_algorithm | |
| 4498 | TYPE: string | |
| 4499 | LOC: Config.store_dir_select_algorithm | |
| 4500 | DEFAULT: least-load | |
| 4501 | DOC_START | |
| 4502 | How Squid selects which cache_dir to use when the response | |
| 4503 | object will fit into more than one. | |
| 4504 | ||
| 4505 | Regardless of which algorithm is used the cache_dir min-size | |
| 4506 | and max-size parameters are obeyed. As such they can affect | |
| 4507 | the selection algorithm by limiting the set of considered | |
| 4508 | cache_dir. | |
| 4509 | ||
| 4510 | Algorithms: | |
| 4511 | ||
| 4512 | least-load | |
| 4513 | ||
| 4514 | This algorithm is suited to caches with similar cache_dir | |
| 4515 | sizes and disk speeds. | |
| 4516 | ||
| 4517 | The disk with the least I/O pending is selected. | |
| 4518 | When there are multiple disks with the same I/O load ranking | |
| 4519 | the cache_dir with most available capacity is selected. | |
| 4520 | ||
| 4521 | When a mix of cache_dir sizes are configured the faster disks | |
| 4522 | have a naturally lower I/O loading and larger disks have more | |
| 4523 | capacity. So space used to store objects and data throughput | |
| 4524 | may be very unbalanced towards larger disks. | |
| 4525 | ||
| 4526 | ||
| 4527 | round-robin | |
| 4528 | ||
| 4529 | This algorithm is suited to caches with unequal cache_dir | |
| 4530 | disk sizes. | |
| 4531 | ||
| 4532 | Each cache_dir is selected in a rotation. The next suitable | |
| 4533 | cache_dir is used. | |
| 4534 | ||
| 4535 | Available cache_dir capacity is only considered in relation | |
| 4536 | to whether the object will fit and meets the min-size and | |
| 4537 | max-size parameters. | |
| 4538 | ||
| 4539 | Disk I/O loading is only considered to prevent overload on slow | |
| 4540 | disks. This algorithm does not spread objects by size, so any | |
| 4541 | I/O loading per-disk may appear very unbalanced and volatile. | |
| 4542 | ||
| 4543 | If several cache_dirs use similar min-size, max-size, or other | |
| 4544 | limits to to reject certain responses, then do not group such | |
| 4545 | cache_dir lines together, to avoid round-robin selection bias | |
| 4546 | towards the first cache_dir after the group. Instead, interleave | |
| 4547 | cache_dir lines from different groups. For example: | |
| 4548 | ||
| 4549 | store_dir_select_algorithm round-robin | |
| 4550 | cache_dir rock /hdd1 ... min-size=100000 | |
| 4551 | cache_dir rock /ssd1 ... max-size=99999 | |
| 4552 | cache_dir rock /hdd2 ... min-size=100000 | |
| 4553 | cache_dir rock /ssd2 ... max-size=99999 | |
| 4554 | cache_dir rock /hdd3 ... min-size=100000 | |
| 4555 | cache_dir rock /ssd3 ... max-size=99999 | |
| 4556 | DOC_END | |
| 4557 | ||
| 4558 | NAME: paranoid_hit_validation | |
| 4559 | COMMENT: time-units-small | |
| 4560 | TYPE: time_nanoseconds | |
| 4561 | DEFAULT: 0 | |
| 4562 | DEFAULT_DOC: validation disabled | |
| 4563 | LOC: Config.paranoid_hit_validation | |
| 4564 | DOC_START | |
| 4565 | Controls whether Squid should perform paranoid validation of cache entry | |
| 4566 | metadata integrity every time a cache entry is hit. This low-level | |
| 4567 | validation should always succeed. Each failed validation results in a | |
| 4568 | cache miss, a BUG line reported to cache.log, and the invalid entry | |
| 4569 | marked as unusable (and eventually purged from the cache). | |
| 4570 | ||
| 4571 | Squid can only validate shared cache memory and rock cache_dir entries. | |
| 4572 | ||
| 4573 | * Zero (default) value means that the validation is disabled. | |
| 4574 | ||
| 4575 | * Positive values enable validation: | |
| 4576 | - values less than 1 day approximate the maximum time that Squid is allowed | |
| 4577 | to spend validating a single cache hit. | |
| 4578 | - values greater or equal to 1 day are considered as no limitation: | |
| 4579 | in this case all checks will be performed, regardless of how much time | |
| 4580 | they take. | |
| 4581 | ||
| 4582 | Hits are usually stored using 16KB slots (for rock, the size is | |
| 4583 | configurable via cache_dir slot-size). Larger hits require scanning more | |
| 4584 | slots and, hence, take more time. When validation is enabled, at least one | |
| 4585 | slot is always validated, regardless of the configured time limit. | |
| 4586 | ||
| 4587 | A worker process validating an entry cannot do anything else (i.e. the | |
| 4588 | validation is blocking). The validation overhead is environment dependent, | |
| 4589 | but developers have observed Squid spending 3-10 microseconds to check each | |
| 4590 | slot of a Rock or shared memory hit entry. If Squid cuts validation short | |
| 4591 | because it runs out of configured time, it treats the entry as valid. | |
| 4592 | ||
| 4593 | When hit validation is enabled, its statistics is included in Cache | |
| 4594 | Manager mgr:counters, mgr:5min, and mgr:60min reports. | |
| 4595 | DOC_END | |
| 4596 | ||
| 4597 | NAME: max_open_disk_fds | |
| 4598 | TYPE: int | |
| 4599 | LOC: Config.max_open_disk_fds | |
| 4600 | DEFAULT: 0 | |
| 4601 | DEFAULT_DOC: no limit | |
| 4602 | DOC_START | |
| 4603 | To avoid having disk as the I/O bottleneck Squid can optionally | |
| 4604 | bypass the on-disk cache if more than this amount of disk file | |
| 4605 | descriptors are open. | |
| 4606 | ||
| 4607 | A value of 0 indicates no limit. | |
| 4608 | DOC_END | |
| 4609 | ||
| 4610 | NAME: cache_swap_low | |
| 4611 | COMMENT: (percent, 0-100) | |
| 4612 | TYPE: int | |
| 4613 | DEFAULT: 90 | |
| 4614 | LOC: Config.Swap.lowWaterMark | |
| 4615 | DOC_START | |
| 4616 | The low-water mark for AUFS/UFS/diskd cache object eviction by | |
| 4617 | the cache_replacement_policy algorithm. | |
| 4618 | ||
| 4619 | Removal begins when the swap (disk) usage of a cache_dir is | |
| 4620 | above this low-water mark and attempts to maintain utilization | |
| 4621 | near the low-water mark. | |
| 4622 | ||
| 4623 | As swap utilization increases towards the high-water mark set | |
| 4624 | by cache_swap_high object eviction becomes more aggressive. | |
| 4625 | ||
| 4626 | The value difference in percentages between low- and high-water | |
| 4627 | marks represent an eviction rate of 300 objects per second and | |
| 4628 | the rate continues to scale in aggressiveness by multiples of | |
| 4629 | this above the high-water mark. | |
| 4630 | ||
| 4631 | Defaults are 90% and 95%. If you have a large cache, 5% could be | |
| 4632 | hundreds of MB. If this is the case you may wish to set these | |
| 4633 | numbers closer together. | |
| 4634 | ||
| 4635 | See also cache_swap_high and cache_replacement_policy | |
| 4636 | DOC_END | |
| 4637 | ||
| 4638 | NAME: cache_swap_high | |
| 4639 | COMMENT: (percent, 0-100) | |
| 4640 | TYPE: int | |
| 4641 | DEFAULT: 95 | |
| 4642 | LOC: Config.Swap.highWaterMark | |
| 4643 | DOC_START | |
| 4644 | The high-water mark for AUFS/UFS/diskd cache object eviction by | |
| 4645 | the cache_replacement_policy algorithm. | |
| 4646 | ||
| 4647 | Removal begins when the swap (disk) usage of a cache_dir is | |
| 4648 | above the low-water mark set by cache_swap_low and attempts to | |
| 4649 | maintain utilization near the low-water mark. | |
| 4650 | ||
| 4651 | As swap utilization increases towards this high-water mark object | |
| 4652 | eviction becomes more aggressive. | |
| 4653 | ||
| 4654 | The value difference in percentages between low- and high-water | |
| 4655 | marks represent an eviction rate of 300 objects per second and | |
| 4656 | the rate continues to scale in aggressiveness by multiples of | |
| 4657 | this above the high-water mark. | |
| 4658 | ||
| 4659 | Defaults are 90% and 95%. If you have a large cache, 5% could be | |
| 4660 | hundreds of MB. If this is the case you may wish to set these | |
| 4661 | numbers closer together. | |
| 4662 | ||
| 4663 | See also cache_swap_low and cache_replacement_policy | |
| 4664 | DOC_END | |
| 4665 | ||
| 4666 | COMMENT_START | |
| 4667 | LOGFILE OPTIONS | |
| 4668 | ----------------------------------------------------------------------------- | |
| 4669 | COMMENT_END | |
| 4670 | ||
| 4671 | NAME: logformat | |
| 4672 | TYPE: logformat | |
| 4673 | LOC: Log::TheConfig | |
| 4674 | DEFAULT: none | |
| 4675 | DEFAULT_DOC: The format definitions squid, common, combined, referrer, useragent are built in. | |
| 4676 | DOC_START | |
| 4677 | Usage: | |
| 4678 | ||
| 4679 | logformat <name> <format specification> | |
| 4680 | ||
| 4681 | Defines an access log format. | |
| 4682 | ||
| 4683 | The <format specification> is a string with embedded % format codes | |
| 4684 | ||
| 4685 | % format codes all follow the same basic structure where all | |
| 4686 | components but the formatcode are optional and usually unnecessary, | |
| 4687 | especially when dealing with common codes. | |
| 4688 | ||
| 4689 | % [encoding] [-] [[0]width] [{arg}] formatcode [{arg}] | |
| 4690 | ||
| 4691 | encoding escapes or otherwise protects "special" characters: | |
| 4692 | ||
| 4693 | " Quoted string encoding where quote(") and | |
| 4694 | backslash(\) characters are \-escaped while | |
| 4695 | CR, LF, and TAB characters are encoded as \r, | |
| 4696 | \n, and \t two-character sequences. | |
| 4697 | ||
| 4698 | [ Custom Squid encoding where percent(%), square | |
| 4699 | brackets([]), backslash(\) and characters with | |
| 4700 | codes outside of [32,126] range are %-encoded. | |
| 4701 | SP is not encoded. Used by log_mime_hdrs. | |
| 4702 | ||
| 4703 | # URL encoding (a.k.a. percent-encoding) where | |
| 4704 | all URL unsafe and control characters (per RFC | |
| 4705 | 1738) are %-encoded. | |
| 4706 | ||
| 4707 | / Shell-like encoding where quote(") and | |
| 4708 | backslash(\) characters are \-escaped while CR | |
| 4709 | and LF characters are encoded as \r and \n | |
| 4710 | two-character sequences. Values containing SP | |
| 4711 | character(s) are surrounded by quotes("). | |
| 4712 | ||
| 4713 | ' Raw/as-is encoding with no escaping/quoting. | |
| 4714 | ||
| 4715 | Default encoding: When no explicit encoding is | |
| 4716 | specified, each %code determines its own encoding. | |
| 4717 | Most %codes use raw/as-is encoding, but some codes use | |
| 4718 | a so called "pass-through URL encoding" where all URL | |
| 4719 | unsafe and control characters (per RFC 1738) are | |
| 4720 | %-encoded, but the percent character(%) is left as is. | |
| 4721 | ||
| 4722 | - left aligned | |
| 4723 | ||
| 4724 | width minimum and/or maximum field width: | |
| 4725 | [width_min][.width_max] | |
| 4726 | When minimum starts with 0, the field is zero-padded. | |
| 4727 | String values exceeding maximum width are truncated. | |
| 4728 | ||
| 4729 | {arg} argument such as header name etc. This field may be | |
| 4730 | placed before or after the token, but not both at once. | |
| 4731 | ||
| 4732 | Format codes: | |
| 4733 | ||
| 4734 | % a literal % character | |
| 4735 | ||
| 4736 | byte{value} Adds a single byte with the given value (e.g., %byte{10} | |
| 4737 | adds an ASCII LF character a.k.a. "new line" or "\n"). The value | |
| 4738 | parameter is required and must be a positive decimal integer not | |
| 4739 | exceeding 255. Zero-valued bytes (i.e. ASCII NUL characters) are | |
| 4740 | not yet supported. | |
| 4741 | ||
| 4742 | sn Unique sequence number per log line entry | |
| 4743 | err_code The ID of an error response served by Squid or | |
| 4744 | a similar internal error identifier. | |
| 4745 | ||
| 4746 | err_detail Additional err_code-dependent error information. Multiple | |
| 4747 | details are separated by the plus sign ('+'). Admins should not | |
| 4748 | rely on a particular detail listing order, the uniqueness of the | |
| 4749 | entries, or individual detail text stability. All those properties | |
| 4750 | depend on many unstable factors, including external libraries. | |
| 4751 | ||
| 4752 | note The annotation specified by the argument. Also | |
| 4753 | logs the adaptation meta headers set by the | |
| 4754 | adaptation_meta configuration parameter. | |
| 4755 | If no argument given all annotations logged. | |
| 4756 | The argument may include a separator to use with | |
| 4757 | annotation values: | |
| 4758 | name[:separator] | |
| 4759 | By default, multiple note values are separated with "," | |
| 4760 | and multiple notes are separated with "\r\n". | |
| 4761 | When logging named notes with %{name}note, the | |
| 4762 | explicitly configured separator is used between note | |
| 4763 | values. When logging all notes with %note, the | |
| 4764 | explicitly configured separator is used between | |
| 4765 | individual notes. There is currently no way to | |
| 4766 | specify both value and notes separators when logging | |
| 4767 | all notes with %note. | |
| 4768 | master_xaction The master transaction identifier is an unsigned | |
| 4769 | integer. These IDs are guaranteed to monotonically | |
| 4770 | increase within a single worker process lifetime, with | |
| 4771 | higher values corresponding to transactions that were | |
| 4772 | accepted or initiated later. Due to current implementation | |
| 4773 | deficiencies, some IDs are skipped (i.e. never logged). | |
| 4774 | Concurrent workers and restarted workers use similar, | |
| 4775 | overlapping sequences of master transaction IDs. | |
| 4776 | ||
| 4777 | Connection related format codes: | |
| 4778 | ||
| 4779 | >a Client source IP address | |
| 4780 | >A Client FQDN | |
| 4781 | >p Client source port | |
| 4782 | >eui Client source EUI (MAC address, EUI-48 or EUI-64 identifier) | |
| 4783 | >la Local IP address the client connected to | |
| 4784 | >lp Local port number the client connected to | |
| 4785 | >qos Client connection TOS/DSCP value set by Squid | |
| 4786 | >nfmark Client connection netfilter packet MARK set by Squid | |
| 4787 | ||
| 4788 | transport::>connection_id Identifies a transport connection | |
| 4789 | accepted by Squid (e.g., a connection carrying the | |
| 4790 | logged HTTP request). Currently, Squid only supports | |
| 4791 | TCP transport connections. | |
| 4792 | ||
| 4793 | The logged identifier is an unsigned integer. These | |
| 4794 | IDs are guaranteed to monotonically increase within a | |
| 4795 | single worker process lifetime, with higher values | |
| 4796 | corresponding to connections that were accepted later. | |
| 4797 | Many IDs are skipped (i.e. never logged). Concurrent | |
| 4798 | workers and restarted workers use similar, partially | |
| 4799 | overlapping sequences of IDs. | |
| 4800 | ||
| 4801 | la Local listening IP address the client connection was connected to. | |
| 4802 | lp Local listening port number the client connection was connected to. | |
| 4803 | ||
| 4804 | <a Server IP address of the last server or peer connection | |
| 4805 | <A Server FQDN or peer name | |
| 4806 | <p Server port number of the last server or peer connection | |
| 4807 | <la Local IP address of the last server or peer connection | |
| 4808 | <lp Local port number of the last server or peer connection | |
| 4809 | <qos Server connection TOS/DSCP value set by Squid | |
| 4810 | <nfmark Server connection netfilter packet MARK set by Squid | |
| 4811 | ||
| 4812 | >handshake Raw client handshake | |
| 4813 | Initial client bytes received by Squid on a newly | |
| 4814 | accepted TCP connection or inside a just established | |
| 4815 | CONNECT tunnel. Squid stops accumulating handshake | |
| 4816 | bytes as soon as the handshake parser succeeds or | |
| 4817 | fails (determining whether the client is using the | |
| 4818 | expected protocol). | |
| 4819 | ||
| 4820 | For HTTP clients, the handshake is the request line. | |
| 4821 | For TLS clients, the handshake consists of all TLS | |
| 4822 | records up to and including the TLS record that | |
| 4823 | contains the last byte of the first ClientHello | |
| 4824 | message. For clients using an unsupported protocol, | |
| 4825 | this field contains the bytes received by Squid at the | |
| 4826 | time of the handshake parsing failure. | |
| 4827 | ||
| 4828 | See the on_unsupported_protocol directive for more | |
| 4829 | information on Squid handshake traffic expectations. | |
| 4830 | ||
| 4831 | Current support is limited to these contexts: | |
| 4832 | - http_port connections, but only when the | |
| 4833 | on_unsupported_protocol directive is in use. | |
| 4834 | - https_port connections (and CONNECT tunnels) that | |
| 4835 | are subject to the ssl_bump peek or stare action. | |
| 4836 | ||
| 4837 | To protect binary handshake data, this field is always | |
| 4838 | base64-encoded (RFC 4648 Section 4). If logformat | |
| 4839 | field encoding is configured, that encoding is applied | |
| 4840 | on top of base64. Otherwise, the computed base64 value | |
| 4841 | is recorded as is. | |
| 4842 | ||
| 4843 | Time related format codes: | |
| 4844 | ||
| 4845 | ts Seconds since epoch | |
| 4846 | tu subsecond time (milliseconds) | |
| 4847 | tl Local time. Optional strftime format argument | |
| 4848 | default %d/%b/%Y:%H:%M:%S %z | |
| 4849 | tg GMT time. Optional strftime format argument | |
| 4850 | default %d/%b/%Y:%H:%M:%S %z | |
| 4851 | tr Response time (milliseconds) | |
| 4852 | dt Total time spent making DNS lookups (milliseconds) | |
| 4853 | tS Approximate master transaction start time in | |
| 4854 | <full seconds since epoch>.<fractional seconds> format. | |
| 4855 | Currently, Squid considers the master transaction | |
| 4856 | started when a complete HTTP request header initiating | |
| 4857 | the transaction is received from the client. This is | |
| 4858 | the same value that Squid uses to calculate transaction | |
| 4859 | response time when logging %tr to access.log. Currently, | |
| 4860 | Squid uses millisecond resolution for %tS values, | |
| 4861 | similar to the default access.log "current time" field | |
| 4862 | (%ts.%03tu). | |
| 4863 | ||
| 4864 | busy_time Time spent in transaction-related code (nanoseconds) | |
| 4865 | This cumulative measurement excludes periods of time when the | |
| 4866 | transaction was waiting (e.g., for a server or helper response) | |
| 4867 | while Squid worked on other transactions or was engaged in | |
| 4868 | transaction-unrelated activities (e.g., generating a cache index). | |
| 4869 | In other words, this measurement represents the total amount of | |
| 4870 | physical time when Squid was busy working on this transaction. | |
| 4871 | ||
| 4872 | WARNING: This measurement relies on Squid transaction context | |
| 4873 | tracking features that currently have known context leak bugs and | |
| 4874 | coverage gaps. Until those features are fully implemented, logged | |
| 4875 | values may significantly understate or exaggerate actual times. | |
| 4876 | Do not use this measurement unless you know it works in your case. | |
| 4877 | ||
| 4878 | Access Control related format codes: | |
| 4879 | ||
| 4880 | et Tag returned by external acl | |
| 4881 | ea Log string returned by external acl | |
| 4882 | un User name (any available) | |
| 4883 | ul User name from authentication | |
| 4884 | ue User name from external acl helper | |
| 4885 | un A user name. Expands to the first available name | |
| 4886 | from the following list of information sources: | |
| 4887 | - authenticated user name, like %ul | |
| 4888 | - user name supplied by an external ACL, like %ue | |
| 4889 | - SSL client name, like %us | |
| 4890 | credentials Client credentials. The exact meaning depends on | |
| 4891 | the authentication scheme: For Basic authentication, | |
| 4892 | it is the password; for Digest, the realm sent by the | |
| 4893 | client; for NTLM and Negotiate, the client challenge | |
| 4894 | or client credentials prefixed with "YR " or "KK ". | |
| 4895 | ||
| 4896 | HTTP related format codes: | |
| 4897 | ||
| 4898 | REQUEST | |
| 4899 | ||
| 4900 | [http::]rm Request method (GET/POST etc) | |
| 4901 | [http::]>rm Request method from client | |
| 4902 | [http::]<rm Request method sent to server or peer | |
| 4903 | ||
| 4904 | [http::]ru Request URL received (or computed) and sanitized | |
| 4905 | ||
| 4906 | Logs request URI received from the client, a | |
| 4907 | request adaptation service, or a request | |
| 4908 | redirector (whichever was applied last). | |
| 4909 | ||
| 4910 | Computed URLs are URIs of internally generated | |
| 4911 | requests and various "error:..." URIs. | |
| 4912 | ||
| 4913 | Honors strip_query_terms and uri_whitespace. | |
| 4914 | ||
| 4915 | This field is not encoded by default. Encoding | |
| 4916 | this field using variants of %-encoding will | |
| 4917 | clash with uri_whitespace modifications that | |
| 4918 | also use %-encoding. | |
| 4919 | ||
| 4920 | [http::]>ru Request URL received from the client (or computed) | |
| 4921 | ||
| 4922 | Computed URLs are URIs of internally generated | |
| 4923 | requests and various "error:..." URIs. | |
| 4924 | ||
| 4925 | Unlike %ru, this request URI is not affected | |
| 4926 | by request adaptation, URL rewriting services, | |
| 4927 | and strip_query_terms. | |
| 4928 | ||
| 4929 | Honors uri_whitespace. | |
| 4930 | ||
| 4931 | This field is using pass-through URL encoding | |
| 4932 | by default. Encoding this field using other | |
| 4933 | variants of %-encoding will clash with | |
| 4934 | uri_whitespace modifications that also use | |
| 4935 | %-encoding. | |
| 4936 | ||
| 4937 | [http::]<ru Request URL sent to server or peer | |
| 4938 | [http::]>rs Request URL scheme from client | |
| 4939 | [http::]<rs Request URL scheme sent to server or peer | |
| 4940 | [http::]>rd Request URL domain from client | |
| 4941 | [http::]<rd Request URL domain sent to server or peer | |
| 4942 | [http::]>rP Request URL port from client | |
| 4943 | [http::]<rP Request URL port sent to server or peer | |
| 4944 | [http::]rp Request URL path excluding hostname | |
| 4945 | [http::]>rp Request URL path excluding hostname from client | |
| 4946 | [http::]<rp Request URL path excluding hostname sent to server or peer | |
| 4947 | [http::]rv Request protocol version | |
| 4948 | [http::]>rv Request protocol version from client | |
| 4949 | [http::]<rv Request protocol version sent to server or peer | |
| 4950 | ||
| 4951 | [http::]>h Original received request header. | |
| 4952 | Usually differs from the request header sent by | |
| 4953 | Squid, although most fields are often preserved. | |
| 4954 | Accepts optional header field name/value filter | |
| 4955 | argument using name[:[separator]element] format. | |
| 4956 | [http::]>ha Received request header after adaptation and | |
| 4957 | redirection (pre-cache REQMOD vectoring point). | |
| 4958 | Usually differs from the request header sent by | |
| 4959 | Squid, although most fields are often preserved. | |
| 4960 | Optional header name argument as for >h | |
| 4961 | ||
| 4962 | RESPONSE | |
| 4963 | ||
| 4964 | [http::]<Hs HTTP status code received from the next hop | |
| 4965 | [http::]>Hs HTTP status code sent to the client | |
| 4966 | ||
| 4967 | [http::]<h Reply header. Optional header name argument | |
| 4968 | as for >h | |
| 4969 | ||
| 4970 | [http::]mt MIME content type | |
| 4971 | ||
| 4972 | ||
| 4973 | SIZE COUNTERS | |
| 4974 | ||
| 4975 | [http::]st Total size of request + reply traffic with client | |
| 4976 | [http::]>st Total size of request received from client. | |
| 4977 | Excluding chunked encoding bytes. | |
| 4978 | [http::]<st Total size of reply sent to client (after adaptation) | |
| 4979 | ||
| 4980 | [http::]>sh Size of request headers received from client | |
| 4981 | [http::]<sh Size of reply headers sent to client (after adaptation) | |
| 4982 | ||
| 4983 | [http::]<sH Reply high offset sent | |
| 4984 | [http::]<sS Upstream object size | |
| 4985 | ||
| 4986 | [http::]<bs Number of HTTP-equivalent message body bytes | |
| 4987 | received from the next hop, excluding chunked | |
| 4988 | transfer encoding and control messages. | |
| 4989 | Generated FTP listings are treated as | |
| 4990 | received bodies. | |
| 4991 | ||
| 4992 | TIMING | |
| 4993 | ||
| 4994 | [http::]<pt Peer response time in milliseconds. The timer starts | |
| 4995 | when the last request byte is sent to the next hop | |
| 4996 | and stops when the last response byte is received. | |
| 4997 | [http::]<tt Total time spent forwarding to origin servers or | |
| 4998 | cache_peers (milliseconds). | |
| 4999 | ||
| 5000 | The timer starts when Squid decides to forward the request (to | |
| 5001 | an origin server or cache_peer) and peer selection begins. The | |
| 5002 | timer stops when relevant forwarding activities (including any | |
| 5003 | retries) end. | |
| 5004 | ||
| 5005 | Between those two timer events, Squid may perform DNS lookups, | |
| 5006 | query external ACL helpers, adapt responses using pre-cache | |
| 5007 | RESPMOD services, and participate in other concurrent | |
| 5008 | secondary activities. Most secondary activities increase | |
| 5009 | peering time. In some cases, a secondary activity may start | |
| 5010 | before the timer starts or end after the timer stops, leading | |
| 5011 | to misleading results of simple computations like %<tt - %dt. | |
| 5012 | ||
| 5013 | If this logformat %code is used before its timer starts, the | |
| 5014 | corresponding measurement has no value (and the %code expands | |
| 5015 | to a single dash ("-") character). | |
| 5016 | ||
| 5017 | If this code is used while its timer is running, the time | |
| 5018 | spent so far is used as the measurement value. | |
| 5019 | ||
| 5020 | When Squid re-forwards the request (e.g., after certain cache | |
| 5021 | revalidation failures), the timer may restart. In this case, | |
| 5022 | the new measurement is added to the value accumulated from | |
| 5023 | previous forwarding attempts. The time interval between | |
| 5024 | forwarding attempts is not added to the final result. | |
| 5025 | ||
| 5026 | Squid handling related format codes: | |
| 5027 | ||
| 5028 | Ss Squid request status (TCP_MISS etc) | |
| 5029 | Sh Squid hierarchy status (DEFAULT_PARENT etc) | |
| 5030 | ||
| 5031 | [http::]request_attempts Number of request forwarding attempts | |
| 5032 | ||
| 5033 | See forward_max_tries documentation that details what Squid counts | |
| 5034 | as a forwarding attempt. Pure cache hits log zero, but cache hits | |
| 5035 | that triggered HTTP cache revalidation log the number of attempts | |
| 5036 | made when sending an internal revalidation request. DNS, ICMP, | |
| 5037 | ICP, HTCP, ICAP, eCAP, helper, and other secondary requests | |
| 5038 | sent by Squid as a part of a master transaction do not increment | |
| 5039 | the counter logged for the received request. | |
| 5040 | ||
| 5041 | SSL-related format codes: | |
| 5042 | ||
| 5043 | ssl::bump_mode SslBump decision for the transaction: | |
| 5044 | ||
| 5045 | For CONNECT requests that initiated bumping of | |
| 5046 | a connection and for any request received on | |
| 5047 | an already bumped connection, Squid logs the | |
| 5048 | corresponding SslBump mode ("splice", "bump", | |
| 5049 | "peek", "stare", "terminate", "server-first" | |
| 5050 | or "client-first"). See the ssl_bump option | |
| 5051 | for more information about these modes. | |
| 5052 | ||
| 5053 | A "none" token is logged for requests that | |
| 5054 | triggered "ssl_bump" ACL evaluation matching | |
| 5055 | a "none" rule. | |
| 5056 | ||
| 5057 | In all other cases, a single dash ("-") is | |
| 5058 | logged. | |
| 5059 | ||
| 5060 | ssl::>sni SSL client SNI sent to Squid. | |
| 5061 | ||
| 5062 | ssl::>cert_subject | |
| 5063 | The Subject field of the received client | |
| 5064 | SSL certificate or a dash ('-') if Squid has | |
| 5065 | received an invalid/malformed certificate or | |
| 5066 | no certificate at all. Consider encoding the | |
| 5067 | logged value because Subject often has spaces. | |
| 5068 | ||
| 5069 | ssl::>cert_issuer | |
| 5070 | The Issuer field of the received client | |
| 5071 | SSL certificate or a dash ('-') if Squid has | |
| 5072 | received an invalid/malformed certificate or | |
| 5073 | no certificate at all. Consider encoding the | |
| 5074 | logged value because Issuer often has spaces. | |
| 5075 | ||
| 5076 | ssl::<cert_subject | |
| 5077 | The Subject field of the received server | |
| 5078 | TLS certificate or a dash ('-') if this is | |
| 5079 | not available. Consider encoding the logged | |
| 5080 | value because Subject often has spaces. | |
| 5081 | ||
| 5082 | ssl::<cert_issuer | |
| 5083 | The Issuer field of the received server | |
| 5084 | TLS certificate or a dash ('-') if this is | |
| 5085 | not available. Consider encoding the logged | |
| 5086 | value because Issuer often has spaces. | |
| 5087 | ||
| 5088 | ssl::<cert | |
| 5089 | The received server x509 certificate in PEM | |
| 5090 | format, including BEGIN and END lines (or a | |
| 5091 | dash ('-') if the certificate is unavailable). | |
| 5092 | ||
| 5093 | WARNING: Large certificates will exceed the | |
| 5094 | current 8KB access.log record limit, resulting | |
| 5095 | in truncated records. Such truncation usually | |
| 5096 | happens in the middle of a record field. The | |
| 5097 | limit applies to all access logging modules. | |
| 5098 | ||
| 5099 | The logged certificate may have failed | |
| 5100 | validation and may not be trusted by Squid. | |
| 5101 | This field does not include any intermediate | |
| 5102 | certificates that may have been received from | |
| 5103 | the server or fetched during certificate | |
| 5104 | validation process. | |
| 5105 | ||
| 5106 | Currently, Squid only collects server | |
| 5107 | certificates during step3 of SslBump | |
| 5108 | processing; connections that were not subject | |
| 5109 | to ssl_bump rules or that did not match a peek | |
| 5110 | or stare rule at step2 will not have the | |
| 5111 | server certificate information. | |
| 5112 | ||
| 5113 | This field is using pass-through URL encoding | |
| 5114 | by default. | |
| 5115 | ||
| 5116 | ssl::<cert_errors | |
| 5117 | The list of certificate validation errors | |
| 5118 | detected by Squid (including OpenSSL and | |
| 5119 | certificate validation helper components). The | |
| 5120 | errors are listed in the discovery order. By | |
| 5121 | default, the error codes are separated by ':'. | |
| 5122 | Accepts an optional separator argument. | |
| 5123 | ||
| 5124 | %ssl::>negotiated_version The negotiated TLS version of the | |
| 5125 | client connection. | |
| 5126 | ||
| 5127 | %ssl::<negotiated_version The negotiated TLS version of the | |
| 5128 | last server or peer connection. | |
| 5129 | ||
| 5130 | %ssl::>received_hello_version The TLS version of the Hello | |
| 5131 | message received from TLS client. | |
| 5132 | ||
| 5133 | %ssl::<received_hello_version The TLS version of the Hello | |
| 5134 | message received from TLS server. | |
| 5135 | ||
| 5136 | %ssl::>received_supported_version The maximum TLS version | |
| 5137 | supported by the TLS client. | |
| 5138 | ||
| 5139 | %ssl::<received_supported_version The maximum TLS version | |
| 5140 | supported by the TLS server. | |
| 5141 | ||
| 5142 | %ssl::>negotiated_cipher The negotiated cipher of the | |
| 5143 | client connection. | |
| 5144 | ||
| 5145 | %ssl::<negotiated_cipher The negotiated cipher of the | |
| 5146 | last server or peer connection. | |
| 5147 | ||
| 5148 | If ICAP is enabled, the following code becomes available (as | |
| 5149 | well as ICAP log codes documented with the icap_log option): | |
| 5150 | ||
| 5151 | icap::tt Total ICAP "blocking" time for the HTTP transaction. The | |
| 5152 | timer ticks while Squid checks adaptation_access and while | |
| 5153 | ICAP transaction(s) expect ICAP response headers, including | |
| 5154 | the embedded adapted HTTP message headers (where applicable). | |
| 5155 | This measurement is meant to estimate ICAP impact on HTTP | |
| 5156 | transaction response times, but it does not currently account | |
| 5157 | for slow ICAP response body delivery blocking HTTP progress. | |
| 5158 | ||
| 5159 | Once Squid receives the final ICAP response headers (e.g., | |
| 5160 | ICAP 200 or 204) and the associated adapted HTTP message | |
| 5161 | headers (if any) from the ICAP service, the corresponding ICAP | |
| 5162 | transaction stops affecting this measurement, even though the | |
| 5163 | transaction itself may continue for a long time (e.g., to | |
| 5164 | finish sending the ICAP request and/or to finish receiving the | |
| 5165 | ICAP response body). | |
| 5166 | ||
| 5167 | When "blocking" sections of multiple concurrent ICAP | |
| 5168 | transactions overlap in time, the overlapping segment is | |
| 5169 | counted only once. | |
| 5170 | ||
| 5171 | To see complete ICAP transaction response times (rather than | |
| 5172 | the cumulative effect of their blocking sections) use the | |
| 5173 | %adapt::all_trs logformat code or the icap_log directive. | |
| 5174 | ||
| 5175 | If adaptation is enabled the following codes become available: | |
| 5176 | ||
| 5177 | adapt::<last_h The header of the last ICAP response or | |
| 5178 | meta-information from the last eCAP | |
| 5179 | transaction related to the HTTP transaction. | |
| 5180 | Like <h, accepts an optional header name | |
| 5181 | argument. | |
| 5182 | ||
| 5183 | adapt::sum_trs Summed adaptation transaction response | |
| 5184 | times recorded as a comma-separated list in | |
| 5185 | the order of transaction start time. Each time | |
| 5186 | value is recorded as an integer number, | |
| 5187 | representing response time of one or more | |
| 5188 | adaptation (ICAP or eCAP) transaction in | |
| 5189 | milliseconds. When a failed transaction is | |
| 5190 | being retried or repeated, its time is not | |
| 5191 | logged individually but added to the | |
| 5192 | replacement (next) transaction. Lifetimes of individually | |
| 5193 | listed adaptation transactions may overlap. | |
| 5194 | See also: %icap::tt and %adapt::all_trs. | |
| 5195 | ||
| 5196 | adapt::all_trs All adaptation transaction response times. | |
| 5197 | Same as %adapt::sum_trs but response times of | |
| 5198 | individual transactions are never added | |
| 5199 | together. Instead, all transaction response | |
| 5200 | times are recorded individually. | |
| 5201 | ||
| 5202 | You can prefix adapt::*_trs format codes with adaptation | |
| 5203 | service name in curly braces to record response time(s) specific | |
| 5204 | to that service. For example: %{my_service}adapt::sum_trs | |
| 5205 | ||
| 5206 | Format codes related to the PROXY protocol: | |
| 5207 | ||
| 5208 | proxy_protocol::>h PROXY protocol header, including optional TLVs. | |
| 5209 | ||
| 5210 | Supports the same field and element reporting/extraction logic | |
| 5211 | as %http::>h. For configuration and reporting purposes, Squid | |
| 5212 | maps each PROXY TLV to an HTTP header field: the TLV type | |
| 5213 | (configured as a decimal integer) is the field name, and the | |
| 5214 | TLV value is the field value. All TLVs of "LOCAL" connections | |
| 5215 | (in PROXY protocol terminology) are currently skipped/ignored. | |
| 5216 | ||
| 5217 | Squid also maps the following standard PROXY protocol header | |
| 5218 | blocks to pseudo HTTP headers (their names use PROXY | |
| 5219 | terminology and start with a colon, following HTTP tradition | |
| 5220 | for pseudo headers): :command, :version, :src_addr, :dst_addr, | |
| 5221 | :src_port, and :dst_port. | |
| 5222 | ||
| 5223 | Without optional parameters, this logformat code logs | |
| 5224 | pseudo headers and TLVs. | |
| 5225 | ||
| 5226 | This format code uses pass-through URL encoding by default. | |
| 5227 | ||
| 5228 | Example: | |
| 5229 | # relay custom PROXY TLV #224 to adaptation services | |
| 5230 | adaptation_meta Client-Foo "%proxy_protocol::>h{224}" | |
| 5231 | ||
| 5232 | See also: %http::>h | |
| 5233 | ||
| 5234 | The default formats available (which do not need re-defining) are: | |
| 5235 | ||
| 5236 | logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt | |
| 5237 | logformat common %>a - %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh | |
| 5238 | logformat combined %>a - %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh | |
| 5239 | logformat referrer %ts.%03tu %>a %{Referer}>h %ru | |
| 5240 | logformat useragent %>a [%tl] "%{User-Agent}>h" | |
| 5241 | ||
| 5242 | NOTE: When the log_mime_hdrs directive is set to ON. | |
| 5243 | The squid, common and combined formats have a safely encoded copy | |
| 5244 | of the mime headers appended to each line within a pair of brackets. | |
| 5245 | ||
| 5246 | NOTE: The common and combined formats are not quite true to the Apache definition. | |
| 5247 | The logs from Squid contain an extra status and hierarchy code appended. | |
| 5248 | ||
| 5249 | DOC_END | |
| 5250 | ||
| 5251 | NAME: access_log cache_access_log | |
| 5252 | TYPE: access_log | |
| 5253 | LOC: Config.Log.accesslogs | |
| 5254 | DEFAULT_IF_NONE: daemon:@DEFAULT_ACCESS_LOG@ squid | |
| 5255 | DOC_START | |
| 5256 | Configures whether and how Squid logs HTTP and ICP transactions. | |
| 5257 | If access logging is enabled, a single line is logged for every | |
| 5258 | matching HTTP or ICP request. The recommended directive formats are: | |
| 5259 | ||
| 5260 | access_log <module>:<place> [option ...] [acl acl ...] | |
| 5261 | access_log none [acl acl ...] | |
| 5262 | ||
| 5263 | The following directive format is accepted but may be deprecated: | |
| 5264 | access_log <module>:<place> [<logformat name> [acl acl ...]] | |
| 5265 | ||
| 5266 | In most cases, the first ACL name must not contain the '=' character | |
| 5267 | and should not be equal to an existing logformat name. You can always | |
| 5268 | start with an 'all' ACL to work around those restrictions. | |
| 5269 | ||
| 5270 | Will log to the specified module:place using the specified format (which | |
| 5271 | must be defined in a logformat directive) those entries which match | |
| 5272 | ALL the acl's specified (which must be defined in acl clauses). | |
| 5273 | If no acl is specified, all requests will be logged to this destination. | |
| 5274 | ||
| 5275 | ===== Available options for the recommended directive format ===== | |
| 5276 | ||
| 5277 | logformat=name Names log line format (either built-in or | |
| 5278 | defined by a logformat directive). Defaults | |
| 5279 | to 'squid'. | |
| 5280 | ||
| 5281 | buffer-size=64KB Defines approximate buffering limit for log | |
| 5282 | records (see buffered_logs). Squid should not | |
| 5283 | keep more than the specified size and, hence, | |
| 5284 | should flush records before the buffer becomes | |
| 5285 | full to avoid overflows under normal | |
| 5286 | conditions (the exact flushing algorithm is | |
| 5287 | module-dependent though). The on-error option | |
| 5288 | controls overflow handling. | |
| 5289 | ||
| 5290 | on-error=die|drop Defines action on unrecoverable errors. The | |
| 5291 | 'drop' action ignores (i.e., does not log) | |
| 5292 | affected log records. The default 'die' action | |
| 5293 | kills the affected worker. The drop action | |
| 5294 | support has not been tested for modules other | |
| 5295 | than tcp. | |
| 5296 | ||
| 5297 | rotate=N Specifies the number of log file rotations to | |
| 5298 | make when you run 'squid -k rotate'. The default | |
| 5299 | is to obey the logfile_rotate directive. Setting | |
| 5300 | rotate=0 will disable the file name rotation, | |
| 5301 | but the log files are still closed and re-opened. | |
| 5302 | This will enable you to rename the logfiles | |
| 5303 | yourself just before sending the rotate signal. | |
| 5304 | Only supported by the stdio module. | |
| 5305 | ||
| 5306 | ===== Modules Currently available ===== | |
| 5307 | ||
| 5308 | none Do not log any requests matching these ACL. | |
| 5309 | Do not specify Place or logformat name. | |
| 5310 | ||
| 5311 | stdio Write each log line to disk immediately at the completion of | |
| 5312 | each request. | |
| 5313 | Place: the filename and path to be written. | |
| 5314 | ||
| 5315 | daemon Very similar to stdio. But instead of writing to disk the log | |
| 5316 | line is passed to a daemon helper for asynchronous handling instead. | |
| 5317 | Place: varies depending on the daemon. | |
| 5318 | ||
| 5319 | log_file_daemon Place: the file name and path to be written. | |
| 5320 | ||
| 5321 | syslog To log each request via syslog facility. | |
| 5322 | Place: The syslog facility and priority level for these entries. | |
| 5323 | Place Format: facility.priority | |
| 5324 | ||
| 5325 | where facility could be any of: | |
| 5326 | authpriv, daemon, local0 ... local7 or user. | |
| 5327 | ||
| 5328 | And priority could be any of: | |
| 5329 | err, warning, notice, info, debug. | |
| 5330 | ||
| 5331 | udp To send each log line as text data to a UDP receiver. | |
| 5332 | Place: The destination host name or IP and port. | |
| 5333 | Place Format: //host:port | |
| 5334 | ||
| 5335 | tcp To send each log line as text data to a TCP receiver. | |
| 5336 | Lines may be accumulated before sending (see buffered_logs). | |
| 5337 | Place: The destination host name or IP and port. | |
| 5338 | Place Format: //host:port | |
| 5339 | ||
| 5340 | Default: | |
| 5341 | access_log daemon:@DEFAULT_ACCESS_LOG@ squid | |
| 5342 | DOC_END | |
| 5343 | ||
| 5344 | NAME: icap_log | |
| 5345 | TYPE: access_log | |
| 5346 | IFDEF: ICAP_CLIENT | |
| 5347 | LOC: Config.Log.icaplogs | |
| 5348 | DEFAULT: none | |
| 5349 | DOC_START | |
| 5350 | ICAP log files record ICAP transaction summaries, one line per | |
| 5351 | transaction. | |
| 5352 | ||
| 5353 | The icap_log option format is: | |
| 5354 | icap_log <filepath> [<logformat name> [acl acl ...]] | |
| 5355 | icap_log none [acl acl ...]] | |
| 5356 | ||
| 5357 | Please see access_log option documentation for details. The two | |
| 5358 | kinds of logs share the overall configuration approach and many | |
| 5359 | features. | |
| 5360 | ||
| 5361 | ICAP processing of a single HTTP message or transaction may | |
| 5362 | require multiple ICAP transactions. In such cases, multiple | |
| 5363 | ICAP transaction log lines will correspond to a single access | |
| 5364 | log line. | |
| 5365 | ||
| 5366 | ICAP log supports many access.log logformat %codes. In ICAP context, | |
| 5367 | HTTP message-related %codes are applied to the HTTP message embedded | |
| 5368 | in an ICAP message. Logformat "%http::>..." codes are used for HTTP | |
| 5369 | messages embedded in ICAP requests while "%http::<..." codes are used | |
| 5370 | for HTTP messages embedded in ICAP responses. For example: | |
| 5371 | ||
| 5372 | http::>h To-be-adapted HTTP message headers sent by Squid to | |
| 5373 | the ICAP service. For REQMOD transactions, these are | |
| 5374 | HTTP request headers. For RESPMOD, these are HTTP | |
| 5375 | response headers, but Squid currently cannot log them | |
| 5376 | (i.e., %http::>h will expand to "-" for RESPMOD). | |
| 5377 | ||
| 5378 | http::<h Adapted HTTP message headers sent by the ICAP | |
| 5379 | service to Squid (i.e., HTTP request headers in regular | |
| 5380 | REQMOD; HTTP response headers in RESPMOD and during | |
| 5381 | request satisfaction in REQMOD). | |
| 5382 | ||
| 5383 | ICAP OPTIONS transactions do not embed HTTP messages. | |
| 5384 | ||
| 5385 | Several logformat codes below deal with ICAP message bodies. An ICAP | |
| 5386 | message body, if any, typically includes a complete HTTP message | |
| 5387 | (required HTTP headers plus optional HTTP message body). When | |
| 5388 | computing HTTP message body size for these logformat codes, Squid | |
| 5389 | either includes or excludes chunked encoding overheads; see | |
| 5390 | code-specific documentation for details. | |
| 5391 | ||
| 5392 | For Secure ICAP services, all size-related information is currently | |
| 5393 | computed before/after TLS encryption/decryption, as if TLS was not | |
| 5394 | in use at all. | |
| 5395 | ||
| 5396 | The following format codes are also available for ICAP logs: | |
| 5397 | ||
| 5398 | icap::<A ICAP server IP address. Similar to <A. | |
| 5399 | ||
| 5400 | icap::<service_name ICAP service name from the icap_service | |
| 5401 | option in Squid configuration file. | |
| 5402 | ||
| 5403 | icap::ru ICAP Request-URI. Similar to ru. | |
| 5404 | ||
| 5405 | icap::rm ICAP request method (REQMOD, RESPMOD, or | |
| 5406 | OPTIONS). Similar to existing rm. | |
| 5407 | ||
| 5408 | icap::>st The total size of the ICAP request sent to the ICAP | |
| 5409 | server (ICAP headers + ICAP body), including chunking | |
| 5410 | metadata (if any). | |
| 5411 | ||
| 5412 | icap::<st The total size of the ICAP response received from the | |
| 5413 | ICAP server (ICAP headers + ICAP body), including | |
| 5414 | chunking metadata (if any). | |
| 5415 | ||
| 5416 | icap::<bs The size of the ICAP response body received from the | |
| 5417 | ICAP server, excluding chunking metadata (if any). | |
| 5418 | ||
| 5419 | icap::tr Transaction response time (in | |
| 5420 | milliseconds). The timer starts when | |
| 5421 | the ICAP transaction is created and | |
| 5422 | stops when the transaction is completed. | |
| 5423 | Similar to tr. | |
| 5424 | ||
| 5425 | icap::tio Transaction I/O time (in milliseconds). The | |
| 5426 | timer starts when the first ICAP request | |
| 5427 | byte is scheduled for sending. The timers | |
| 5428 | stops when the last byte of the ICAP response | |
| 5429 | is received. | |
| 5430 | ||
| 5431 | icap::to Transaction outcome: ICAP_ERR* for all | |
| 5432 | transaction errors, ICAP_OPT for OPTION | |
| 5433 | transactions, ICAP_ECHO for 204 | |
| 5434 | responses, ICAP_MOD for message | |
| 5435 | modification, and ICAP_SAT for request | |
| 5436 | satisfaction. Similar to Ss. | |
| 5437 | ||
| 5438 | icap::Hs ICAP response status code. Similar to Hs. | |
| 5439 | ||
| 5440 | icap::>h ICAP request header(s). Similar to >h. | |
| 5441 | ||
| 5442 | icap::<h ICAP response header(s). Similar to <h. | |
| 5443 | ||
| 5444 | The default ICAP log format, which can be used without an explicit | |
| 5445 | definition, is called icap_squid: | |
| 5446 | ||
| 5447 | logformat icap_squid %ts.%03tu %6icap::tr %>A %icap::to/%03icap::Hs %icap::<st %icap::rm %icap::ru %un -/%icap::<A - | |
| 5448 | ||
| 5449 | See also: logformat and %adapt::<last_h | |
| 5450 | DOC_END | |
| 5451 | ||
| 5452 | NAME: logfile_daemon | |
| 5453 | TYPE: string | |
| 5454 | DEFAULT: @DEFAULT_LOGFILED@ | |
| 5455 | LOC: Log::TheConfig.logfile_daemon | |
| 5456 | DOC_START | |
| 5457 | Specify the path to the logfile-writing daemon. This daemon is | |
| 5458 | used to write the access and store logs, if configured. | |
| 5459 | ||
| 5460 | Squid sends a number of commands to the log daemon: | |
| 5461 | L<data>\n - logfile data | |
| 5462 | R\n - rotate file | |
| 5463 | T\n - truncate file | |
| 5464 | O\n - reopen file | |
| 5465 | F\n - flush file | |
| 5466 | r<n>\n - set rotate count to <n> | |
| 5467 | b<n>\n - 1 = buffer output, 0 = don't buffer output | |
| 5468 | ||
| 5469 | No responses is expected. | |
| 5470 | DOC_END | |
| 5471 | ||
| 5472 | NAME: stats_collection | |
| 5473 | TYPE: acl_access | |
| 5474 | LOC: Config.accessList.stats_collection | |
| 5475 | DEFAULT: none | |
| 5476 | DEFAULT_DOC: Allow logging for all transactions. | |
| 5477 | COMMENT: allow|deny acl acl... | |
| 5478 | DOC_START | |
| 5479 | This options allows you to control which requests gets accounted | |
| 5480 | in performance counters. | |
| 5481 | ||
| 5482 | This clause only supports fast acl types. | |
| 5483 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 5484 | DOC_END | |
| 5485 | ||
| 5486 | NAME: cache_store_log | |
| 5487 | TYPE: string | |
| 5488 | DEFAULT: none | |
| 5489 | LOC: Config.Log.store | |
| 5490 | DOC_START | |
| 5491 | Logs the activities of the storage manager. Shows which | |
| 5492 | objects are ejected from the cache, and which objects are | |
| 5493 | saved and for how long. | |
| 5494 | There are not really utilities to analyze this data, so you can safely | |
| 5495 | disable it (the default). | |
| 5496 | ||
| 5497 | Store log uses modular logging outputs. See access_log for the list | |
| 5498 | of modules supported. | |
| 5499 | ||
| 5500 | Example: | |
| 5501 | cache_store_log stdio:@DEFAULT_STORE_LOG@ | |
| 5502 | cache_store_log daemon:@DEFAULT_STORE_LOG@ | |
| 5503 | DOC_END | |
| 5504 | ||
| 5505 | NAME: cache_swap_state cache_swap_log | |
| 5506 | TYPE: string | |
| 5507 | LOC: Config.Log.swap | |
| 5508 | DEFAULT: none | |
| 5509 | DEFAULT_DOC: Store the journal inside its cache_dir | |
| 5510 | DOC_START | |
| 5511 | Location for the cache "swap.state" file. This index file holds | |
| 5512 | the metadata of objects saved on disk. It is used to rebuild | |
| 5513 | the cache during startup. Normally this file resides in each | |
| 5514 | 'cache_dir' directory, but you may specify an alternate | |
| 5515 | pathname here. Note you must give a full filename, not just | |
| 5516 | a directory. Since this is the index for the whole object | |
| 5517 | list you CANNOT periodically rotate it! | |
| 5518 | ||
| 5519 | If %s can be used in the file name it will be replaced with a | |
| 5520 | a representation of the cache_dir name where each / is replaced | |
| 5521 | with '.'. This is needed to allow adding/removing cache_dir | |
| 5522 | lines when cache_swap_log is being used. | |
| 5523 | ||
| 5524 | If have more than one 'cache_dir', and %s is not used in the name | |
| 5525 | these swap logs will have names such as: | |
| 5526 | ||
| 5527 | cache_swap_log.00 | |
| 5528 | cache_swap_log.01 | |
| 5529 | cache_swap_log.02 | |
| 5530 | ||
| 5531 | The numbered extension (which is added automatically) | |
| 5532 | corresponds to the order of the 'cache_dir' lines in this | |
| 5533 | configuration file. If you change the order of the 'cache_dir' | |
| 5534 | lines in this file, these index files will NOT correspond to | |
| 5535 | the correct 'cache_dir' entry (unless you manually rename | |
| 5536 | them). We recommend you do NOT use this option. It is | |
| 5537 | better to keep these index files in each 'cache_dir' directory. | |
| 5538 | DOC_END | |
| 5539 | ||
| 5540 | NAME: logfile_rotate | |
| 5541 | TYPE: int | |
| 5542 | DEFAULT: 10 | |
| 5543 | LOC: Config.Log.rotateNumber | |
| 5544 | DOC_START | |
| 5545 | Specifies the default number of logfile rotations to make when you | |
| 5546 | type 'squid -k rotate'. The default is 10, which will rotate | |
| 5547 | with extensions 0 through 9. Setting logfile_rotate to 0 will | |
| 5548 | disable the file name rotation, but the logfiles are still closed | |
| 5549 | and re-opened. This will enable you to rename the logfiles | |
| 5550 | yourself just before sending the rotate signal. | |
| 5551 | ||
| 5552 | Note, from Squid-3.1 this option is only a default for cache.log, | |
| 5553 | that log can be rotated separately by using debug_options. | |
| 5554 | ||
| 5555 | Note, from Squid-4 this option is only a default for access.log | |
| 5556 | recorded by stdio: module. Those logs can be rotated separately by | |
| 5557 | using the rotate=N option on their access_log directive. | |
| 5558 | ||
| 5559 | Note, the 'squid -k rotate' command normally sends a USR1 | |
| 5560 | signal to the running squid process. In certain situations | |
| 5561 | (e.g. on Linux with Async I/O), USR1 is used for other | |
| 5562 | purposes, so -k rotate uses another signal. It is best to get | |
| 5563 | in the habit of using 'squid -k rotate' instead of 'kill -USR1 | |
| 5564 | <pid>'. | |
| 5565 | ||
| 5566 | DOC_END | |
| 5567 | ||
| 5568 | NAME: mime_table | |
| 5569 | TYPE: string | |
| 5570 | DEFAULT: @DEFAULT_MIME_TABLE@ | |
| 5571 | LOC: Config.mimeTablePathname | |
| 5572 | DOC_START | |
| 5573 | Path to Squid's icon configuration file. | |
| 5574 | ||
| 5575 | You shouldn't need to change this, but the default file contains | |
| 5576 | examples and formatting information if you do. | |
| 5577 | DOC_END | |
| 5578 | ||
| 5579 | NAME: log_mime_hdrs | |
| 5580 | COMMENT: on|off | |
| 5581 | TYPE: onoff | |
| 5582 | LOC: Config.onoff.log_mime_hdrs | |
| 5583 | DEFAULT: off | |
| 5584 | DOC_START | |
| 5585 | The Cache can record both the request and the response MIME | |
| 5586 | headers for each HTTP transaction. The headers are encoded | |
| 5587 | safely and will appear as two bracketed fields at the end of | |
| 5588 | the access log (for either the native or httpd-emulated log | |
| 5589 | formats). To enable this logging set log_mime_hdrs to 'on'. | |
| 5590 | DOC_END | |
| 5591 | ||
| 5592 | NAME: pid_filename | |
| 5593 | TYPE: string | |
| 5594 | DEFAULT: @DEFAULT_PID_FILE@ | |
| 5595 | LOC: Config.pidFilename | |
| 5596 | DOC_START | |
| 5597 | A filename to write the process-id to. To disable, enter "none". | |
| 5598 | DOC_END | |
| 5599 | ||
| 5600 | NAME: client_netmask | |
| 5601 | TYPE: address | |
| 5602 | LOC: Config.Addrs.client_netmask | |
| 5603 | DEFAULT: no_addr | |
| 5604 | DEFAULT_DOC: Log full client IP address | |
| 5605 | DOC_START | |
| 5606 | A netmask for client addresses in logfiles and cachemgr output. | |
| 5607 | Change this to protect the privacy of your cache clients. | |
| 5608 | A netmask of 255.255.255.0 will log all IP's in that range with | |
| 5609 | the last digit set to '0'. | |
| 5610 | DOC_END | |
| 5611 | ||
| 5612 | NAME: strip_query_terms | |
| 5613 | TYPE: onoff | |
| 5614 | LOC: Config.onoff.strip_query_terms | |
| 5615 | DEFAULT: on | |
| 5616 | DOC_START | |
| 5617 | By default, Squid strips query terms from requested URLs before | |
| 5618 | logging. This protects your user's privacy and reduces log size. | |
| 5619 | ||
| 5620 | When investigating HIT/MISS or other caching behaviour you | |
| 5621 | will need to disable this to see the full URL used by Squid. | |
| 5622 | DOC_END | |
| 5623 | ||
| 5624 | NAME: buffered_logs | |
| 5625 | COMMENT: on|off | |
| 5626 | TYPE: onoff | |
| 5627 | DEFAULT: off | |
| 5628 | LOC: Config.onoff.buffered_logs | |
| 5629 | DOC_START | |
| 5630 | Whether to write/send access_log records ASAP or accumulate them and | |
| 5631 | then write/send them in larger chunks. Buffering may improve | |
| 5632 | performance because it decreases the number of I/Os. However, | |
| 5633 | buffering increases the delay before log records become available to | |
| 5634 | the final recipient (e.g., a disk file or logging daemon) and, | |
| 5635 | hence, increases the risk of log records loss. | |
| 5636 | ||
| 5637 | Note that even when buffered_logs are off, Squid may have to buffer | |
| 5638 | records if it cannot write/send them immediately due to pending I/Os | |
| 5639 | (e.g., the I/O writing the previous log record) or connectivity loss. | |
| 5640 | ||
| 5641 | Currently honored by 'daemon', 'tcp' and 'udp' access_log modules only. | |
| 5642 | DOC_END | |
| 5643 | ||
| 5644 | NAME: netdb_filename | |
| 5645 | TYPE: string | |
| 5646 | DEFAULT: stdio:@DEFAULT_NETDB_FILE@ | |
| 5647 | LOC: Config.netdbFilename | |
| 5648 | IFDEF: USE_ICMP | |
| 5649 | DOC_START | |
| 5650 | Where Squid stores it's netdb journal. | |
| 5651 | When enabled this journal preserves netdb state between restarts. | |
| 5652 | ||
| 5653 | To disable, enter "none". | |
| 5654 | DOC_END | |
| 5655 | ||
| 5656 | NAME: tls_key_log | |
| 5657 | TYPE: Security::KeyLog* | |
| 5658 | DEFAULT: none | |
| 5659 | LOC: Config.Log.tlsKeys | |
| 5660 | IFDEF: USE_OPENSSL | |
| 5661 | DOC_START | |
| 5662 | Configures whether and where Squid records pre-master secret and | |
| 5663 | related encryption details for TLS connections accepted or established | |
| 5664 | by Squid. These connections include connections accepted at | |
| 5665 | https_port, TLS connections opened to origin servers/cache_peers/ICAP | |
| 5666 | services, and TLS tunnels bumped by Squid using the SslBump feature. | |
| 5667 | This log (a.k.a. SSLKEYLOGFILE) is meant for triage with traffic | |
| 5668 | inspection tools like Wireshark. | |
| 5669 | ||
| 5670 | tls_key_log <destination> [options] [if [!]<acl>...] | |
| 5671 | ||
| 5672 | WARNING: This log allows anybody to decrypt the corresponding | |
| 5673 | encrypted TLS connections, both in-flight and postmortem. | |
| 5674 | ||
| 5675 | At most one log file is supported at this time. Repeated tls_key_log | |
| 5676 | directives are treated as fatal configuration errors. By default, no | |
| 5677 | log is created or updated. | |
| 5678 | ||
| 5679 | If the log file does not exist, Squid creates it. Otherwise, Squid | |
| 5680 | appends an existing log file. | |
| 5681 | ||
| 5682 | The directive is consulted whenever a TLS connection is accepted or | |
| 5683 | established by Squid. TLS connections that fail the handshake may be | |
| 5684 | logged if Squid got enough information to form a log record. A record | |
| 5685 | is logged only if all of the configured ACLs match. | |
| 5686 | ||
| 5687 | While transport-related ACLs like src and dst should work, Squid may | |
| 5688 | not have access to higher-level information. For example, when logging | |
| 5689 | accepted https_port connections, Squid does not yet have access to the | |
| 5690 | expected HTTPS request. Similarly, an HTTPS response is not available | |
| 5691 | when logging most TLS connections established by Squid. | |
| 5692 | ||
| 5693 | The log record format is meant to be compatible with TLS deciphering | |
| 5694 | features of Wireshark which relies on fields like CLIENT_RANDOM and | |
| 5695 | RSA Master-Key. A single log record usually spans multiple lines. | |
| 5696 | Technical documentation for that format is maintained inside the | |
| 5697 | Wireshark code (e.g., see tls_keylog_process_lines() comments as of | |
| 5698 | Wireshark commit e3d44136f0f0026c5e893fa249f458073f3b7328). TLS key | |
| 5699 | log does not support custom record formats. | |
| 5700 | ||
| 5701 | This clause only supports fast acl types. | |
| 5702 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 5703 | ||
| 5704 | See access_log's <module>:<place> parameter for a list of supported | |
| 5705 | logging destinations. | |
| 5706 | ||
| 5707 | TLS key log supports all access_log key=value options with the | |
| 5708 | exception of logformat=name. | |
| 5709 | ||
| 5710 | Requires Squid built with OpenSSL support. | |
| 5711 | DOC_END | |
| 5712 | ||
| 5713 | ||
| 5714 | COMMENT_START | |
| 5715 | OPTIONS FOR TROUBLESHOOTING | |
| 5716 | ----------------------------------------------------------------------------- | |
| 5717 | COMMENT_END | |
| 5718 | ||
| 5719 | NAME: cache_log | |
| 5720 | TYPE: string | |
| 5721 | DEFAULT_IF_NONE: @DEFAULT_CACHE_LOG@ | |
| 5722 | LOC: Debug::cache_log | |
| 5723 | DOC_START | |
| 5724 | Squid administrative logging file. | |
| 5725 | ||
| 5726 | This is where general information about Squid behavior goes. You can | |
| 5727 | increase the amount of data logged to this file and how often it is | |
| 5728 | rotated with "debug_options" | |
| 5729 | DOC_END | |
| 5730 | ||
| 5731 | NAME: cache_log_message | |
| 5732 | TYPE: cache_log_message | |
| 5733 | DEFAULT: none | |
| 5734 | DEFAULT_DOC: Use debug_options. | |
| 5735 | LOC: DebugMessagesConfig | |
| 5736 | DOC_START | |
| 5737 | Configures logging of individual cache.log messages. | |
| 5738 | ||
| 5739 | cache_log_message id=<number> option... | |
| 5740 | cache_log_message ids=<number>-<number> option... | |
| 5741 | ||
| 5742 | Most messages have _not_ been instrumented to support this directive | |
| 5743 | yet. For the list of instrumented messages and their IDs, please see | |
| 5744 | the doc/debug-messages.dox file. | |
| 5745 | ||
| 5746 | Message ID corresponds to the message semantics rather than message | |
| 5747 | text or source code location. The ID is stable across Squid | |
| 5748 | instances and versions. Substantial changes in message semantics | |
| 5749 | result in a new ID assignment. To reduce the danger of suppressing | |
| 5750 | an important log message, the old IDs of removed (or substantially | |
| 5751 | changed) messages are never reused. | |
| 5752 | ||
| 5753 | If more than one cache_log_message directive refers to the same | |
| 5754 | message ID, the last directive wins. | |
| 5755 | ||
| 5756 | Use ids=min-max syntax to apply the same message configuration to an | |
| 5757 | inclusive range of message IDs. An ID range with N values has | |
| 5758 | exactly the same effect as typing N cache_log_message lines. | |
| 5759 | ||
| 5760 | At least one option is required. Supported options are: | |
| 5761 | ||
| 5762 | level=<number>: The logging level to use for the message. Squid | |
| 5763 | command line options (-s and -d) as well as the debug_options | |
| 5764 | directive control which levels go to syslog, stderr, and/or | |
| 5765 | cache.log. In most environments, using level=2 or higher stops | |
| 5766 | Squid from logging the message anywhere. By default, the | |
| 5767 | hard-coded message-specific level is used. | |
| 5768 | ||
| 5769 | limit=<number>: After logging the specified number of messages at | |
| 5770 | the configured (or default) debugging level DL, start using | |
| 5771 | level 3 (for DL 0 and 1) or 8 (for higher DL values). Usually, | |
| 5772 | level-3+ messages are not logged anywhere so this option can | |
| 5773 | often be used to effectively suppress the message. Each SMP | |
| 5774 | Squid process gets the same limit. | |
| 5775 | DOC_END | |
| 5776 | ||
| 5777 | NAME: debug_options | |
| 5778 | TYPE: eol | |
| 5779 | DEFAULT: ALL,1 | |
| 5780 | DEFAULT_DOC: Log all critical and important messages. | |
| 5781 | LOC: Debug::debugOptions | |
| 5782 | DOC_START | |
| 5783 | Logging options are set as section,level where each source file | |
| 5784 | is assigned a unique section. Lower levels result in less | |
| 5785 | output, Full debugging (level 9) can result in a very large | |
| 5786 | log file, so be careful. | |
| 5787 | ||
| 5788 | The magic word "ALL" sets debugging levels for all sections. | |
| 5789 | The default is to run with "ALL,1" to record important warnings. | |
| 5790 | ||
| 5791 | The rotate=N option can be used to keep more or less of these logs | |
| 5792 | than would otherwise be kept by logfile_rotate. | |
| 5793 | For most uses a single log should be enough to monitor current | |
| 5794 | events affecting Squid. | |
| 5795 | DOC_END | |
| 5796 | ||
| 5797 | NAME: coredump_dir | |
| 5798 | TYPE: string | |
| 5799 | LOC: Config.coredump_dir | |
| 5800 | DEFAULT_IF_NONE: none | |
| 5801 | DEFAULT_DOC: Use the directory from where Squid was started. | |
| 5802 | DOC_START | |
| 5803 | By default Squid leaves core files in the directory from where | |
| 5804 | it was started. If you set 'coredump_dir' to a directory | |
| 5805 | that exists, Squid will chdir() to that directory at startup | |
| 5806 | and coredump files will be left there. | |
| 5807 | ||
| 5808 | In addition to changing the directory, the process permissions are updated | |
| 5809 | to enable process tracing and/or coredump file generation. The details are | |
| 5810 | OS-specific, but look for prctl(2) PR_SET_DUMPABLE and procctl(2) | |
| 5811 | PROC_TRACE_CTL documentation as guiding examples. | |
| 5812 | ||
| 5813 | CONFIG_START | |
| 5814 | ||
| 5815 | # Leave coredumps in the first cache dir | |
| 5816 | coredump_dir @DEFAULT_SWAP_DIR@ | |
| 5817 | CONFIG_END | |
| 5818 | DOC_END | |
| 5819 | ||
| 5820 | ||
| 5821 | COMMENT_START | |
| 5822 | OPTIONS FOR FTP GATEWAYING | |
| 5823 | ----------------------------------------------------------------------------- | |
| 5824 | COMMENT_END | |
| 5825 | ||
| 5826 | NAME: ftp_user | |
| 5827 | TYPE: string | |
| 5828 | DEFAULT: Squid@ | |
| 5829 | LOC: Config.Ftp.anon_user | |
| 5830 | DOC_START | |
| 5831 | If you want the anonymous login password to be more informative | |
| 5832 | (and enable the use of picky FTP servers), set this to something | |
| 5833 | reasonable for your domain, like wwwuser@somewhere.net | |
| 5834 | ||
| 5835 | The reason why this is domainless by default is the | |
| 5836 | request can be made on the behalf of a user in any domain, | |
| 5837 | depending on how the cache is used. | |
| 5838 | Some FTP server also validate the email address is valid | |
| 5839 | (for example perl.com). | |
| 5840 | DOC_END | |
| 5841 | ||
| 5842 | NAME: ftp_passive | |
| 5843 | TYPE: onoff | |
| 5844 | DEFAULT: on | |
| 5845 | LOC: Config.Ftp.passive | |
| 5846 | DOC_START | |
| 5847 | If your firewall does not allow Squid to use passive | |
| 5848 | connections, turn off this option. | |
| 5849 | ||
| 5850 | Use of ftp_epsv_all option requires this to be ON. | |
| 5851 | DOC_END | |
| 5852 | ||
| 5853 | NAME: ftp_epsv_all | |
| 5854 | TYPE: onoff | |
| 5855 | DEFAULT: off | |
| 5856 | LOC: Config.Ftp.epsv_all | |
| 5857 | DOC_START | |
| 5858 | FTP Protocol extensions permit the use of a special "EPSV ALL" command. | |
| 5859 | ||
| 5860 | NATs may be able to put the connection on a "fast path" through the | |
| 5861 | translator, as the EPRT command will never be used and therefore, | |
| 5862 | translation of the data portion of the segments will never be needed. | |
| 5863 | ||
| 5864 | When a client only expects to do two-way FTP transfers this may be | |
| 5865 | useful. | |
| 5866 | If squid finds that it must do a three-way FTP transfer after issuing | |
| 5867 | an EPSV ALL command, the FTP session will fail. | |
| 5868 | ||
| 5869 | If you have any doubts about this option do not use it. | |
| 5870 | Squid will nicely attempt all other connection methods. | |
| 5871 | ||
| 5872 | Requires ftp_passive to be ON (default) for any effect. | |
| 5873 | DOC_END | |
| 5874 | ||
| 5875 | NAME: ftp_epsv | |
| 5876 | TYPE: ftp_epsv | |
| 5877 | DEFAULT: none | |
| 5878 | LOC: Config.accessList.ftp_epsv | |
| 5879 | DOC_START | |
| 5880 | FTP Protocol extensions permit the use of a special "EPSV" command. | |
| 5881 | ||
| 5882 | NATs may be able to put the connection on a "fast path" through the | |
| 5883 | translator using EPSV, as the EPRT command will never be used | |
| 5884 | and therefore, translation of the data portion of the segments | |
| 5885 | will never be needed. | |
| 5886 | ||
| 5887 | EPSV is often required to interoperate with FTP servers on IPv6 | |
| 5888 | networks. On the other hand, it may break some IPv4 servers. | |
| 5889 | ||
| 5890 | By default, EPSV may try EPSV with any FTP server. To fine tune | |
| 5891 | that decision, you may restrict EPSV to certain clients or servers | |
| 5892 | using ACLs: | |
| 5893 | ||
| 5894 | ftp_epsv allow|deny al1 acl2 ... | |
| 5895 | ||
| 5896 | WARNING: Disabling EPSV may cause problems with external NAT and IPv6. | |
| 5897 | ||
| 5898 | Only fast ACLs are supported. | |
| 5899 | Requires ftp_passive to be ON (default) for any effect. | |
| 5900 | DOC_END | |
| 5901 | ||
| 5902 | NAME: ftp_eprt | |
| 5903 | TYPE: onoff | |
| 5904 | DEFAULT: on | |
| 5905 | LOC: Config.Ftp.eprt | |
| 5906 | DOC_START | |
| 5907 | FTP Protocol extensions permit the use of a special "EPRT" command. | |
| 5908 | ||
| 5909 | This extension provides a protocol neutral alternative to the | |
| 5910 | IPv4-only PORT command. When supported it enables active FTP data | |
| 5911 | channels over IPv6 and efficient NAT handling. | |
| 5912 | ||
| 5913 | Turning this OFF will prevent EPRT being attempted and will skip | |
| 5914 | straight to using PORT for IPv4 servers. | |
| 5915 | ||
| 5916 | Some devices are known to not handle this extension correctly and | |
| 5917 | may result in crashes. Devices which support EPRT enough to fail | |
| 5918 | cleanly will result in Squid attempting PORT anyway. This directive | |
| 5919 | should only be disabled when EPRT results in device failures. | |
| 5920 | ||
| 5921 | WARNING: Doing so will convert Squid back to the old behavior with all | |
| 5922 | the related problems with external NAT devices/layers and IPv4-only FTP. | |
| 5923 | DOC_END | |
| 5924 | ||
| 5925 | NAME: ftp_sanitycheck | |
| 5926 | TYPE: onoff | |
| 5927 | DEFAULT: on | |
| 5928 | LOC: Config.Ftp.sanitycheck | |
| 5929 | DOC_START | |
| 5930 | For security and data integrity reasons Squid by default performs | |
| 5931 | sanity checks of the addresses of FTP data connections ensure the | |
| 5932 | data connection is to the requested server. If you need to allow | |
| 5933 | FTP connections to servers using another IP address for the data | |
| 5934 | connection turn this off. | |
| 5935 | DOC_END | |
| 5936 | ||
| 5937 | NAME: ftp_telnet_protocol | |
| 5938 | TYPE: onoff | |
| 5939 | DEFAULT: on | |
| 5940 | LOC: Config.Ftp.telnet | |
| 5941 | DOC_START | |
| 5942 | The FTP protocol is officially defined to use the telnet protocol | |
| 5943 | as transport channel for the control connection. However, many | |
| 5944 | implementations are broken and does not respect this aspect of | |
| 5945 | the FTP protocol. | |
| 5946 | ||
| 5947 | If you have trouble accessing files with ASCII code 255 in the | |
| 5948 | path or similar problems involving this ASCII code you can | |
| 5949 | try setting this directive to off. If that helps, report to the | |
| 5950 | operator of the FTP server in question that their FTP server | |
| 5951 | is broken and does not follow the FTP standard. | |
| 5952 | DOC_END | |
| 5953 | ||
| 5954 | COMMENT_START | |
| 5955 | OPTIONS FOR EXTERNAL SUPPORT PROGRAMS | |
| 5956 | ----------------------------------------------------------------------------- | |
| 5957 | COMMENT_END | |
| 5958 | ||
| 5959 | NAME: diskd_program | |
| 5960 | TYPE: string | |
| 5961 | DEFAULT: @DEFAULT_DISKD@ | |
| 5962 | LOC: Config.Program.diskd | |
| 5963 | DOC_START | |
| 5964 | Specify the location of the diskd executable. | |
| 5965 | Note this is only useful if you have compiled in | |
| 5966 | diskd as one of the store io modules. | |
| 5967 | DOC_END | |
| 5968 | ||
| 5969 | NAME: unlinkd_program | |
| 5970 | IFDEF: USE_UNLINKD | |
| 5971 | TYPE: string | |
| 5972 | DEFAULT: @DEFAULT_UNLINKD@ | |
| 5973 | LOC: Config.Program.unlinkd | |
| 5974 | DOC_START | |
| 5975 | Specify the location of the executable for file deletion process. | |
| 5976 | DOC_END | |
| 5977 | ||
| 5978 | NAME: pinger_program | |
| 5979 | IFDEF: USE_ICMP | |
| 5980 | TYPE: icmp | |
| 5981 | DEFAULT: @DEFAULT_PINGER@ | |
| 5982 | LOC: IcmpCfg | |
| 5983 | DOC_START | |
| 5984 | Specify the location of the executable for the pinger process. | |
| 5985 | DOC_END | |
| 5986 | ||
| 5987 | NAME: pinger_enable | |
| 5988 | TYPE: onoff | |
| 5989 | DEFAULT: on | |
| 5990 | LOC: IcmpCfg.enable | |
| 5991 | IFDEF: USE_ICMP | |
| 5992 | DOC_START | |
| 5993 | Control whether the pinger is active at run-time. | |
| 5994 | Enables turning ICMP pinger on and off with a simple | |
| 5995 | squid -k reconfigure. | |
| 5996 | DOC_END | |
| 5997 | ||
| 5998 | ||
| 5999 | COMMENT_START | |
| 6000 | OPTIONS FOR URL REWRITING | |
| 6001 | ----------------------------------------------------------------------------- | |
| 6002 | COMMENT_END | |
| 6003 | ||
| 6004 | NAME: url_rewrite_program redirect_program | |
| 6005 | TYPE: wordlist | |
| 6006 | LOC: Config.Program.redirect | |
| 6007 | DEFAULT: none | |
| 6008 | DOC_START | |
| 6009 | The name and command line parameters of an admin-provided executable | |
| 6010 | for redirecting clients or adjusting/replacing client request URLs. | |
| 6011 | ||
| 6012 | This helper is consulted after the received request is cleared by | |
| 6013 | http_access and adapted using eICAP/ICAP services (if any). If the | |
| 6014 | helper does not redirect the client, Squid checks adapted_http_access | |
| 6015 | and may consult the cache or forward the request to the next hop. | |
| 6016 | ||
| 6017 | ||
| 6018 | For each request, the helper gets one line in the following format: | |
| 6019 | ||
| 6020 | [channel-ID <SP>] request-URL [<SP> extras] <NL> | |
| 6021 | ||
| 6022 | Use url_rewrite_extras to configure what Squid sends as 'extras'. | |
| 6023 | ||
| 6024 | ||
| 6025 | The helper must reply to each query using a single line: | |
| 6026 | ||
| 6027 | [channel-ID <SP>] result [<SP> kv-pairs] <NL> | |
| 6028 | ||
| 6029 | The result section must match exactly one of the following outcomes: | |
| 6030 | ||
| 6031 | OK [status=30N] url="..." | |
| 6032 | ||
| 6033 | Redirect the client to a URL supplied in the 'url' parameter. | |
| 6034 | Optional 'status' specifies the status code to send to the | |
| 6035 | client in Squid's HTTP redirect response. It must be one of | |
| 6036 | the standard HTTP redirect status codes: 301, 302, 303, 307, | |
| 6037 | or 308. When no specific status is requested, Squid uses 302. | |
| 6038 | ||
| 6039 | OK rewrite-url="..." | |
| 6040 | ||
| 6041 | Replace the current request URL with the one supplied in the | |
| 6042 | 'rewrite-url' parameter. Squid fetches the resource specified | |
| 6043 | by the new URL and forwards the received response (or its | |
| 6044 | cached copy) to the client. | |
| 6045 | ||
| 6046 | WARNING: Avoid rewriting URLs! When possible, redirect the | |
| 6047 | client using an "OK url=..." helper response instead. | |
| 6048 | Rewriting URLs may create inconsistent requests and/or break | |
| 6049 | synchronization between internal client and origin server | |
| 6050 | states, especially when URLs or other message parts contain | |
| 6051 | snippets of that state. For example, Squid does not adjust | |
| 6052 | Location headers and embedded URLs after the helper rewrites | |
| 6053 | the request URL. | |
| 6054 | ||
| 6055 | If Squid cannot parse the URL value returned by the helper, it logs a | |
| 6056 | critical cache.log ERROR message and uses the original request URL. | |
| 6057 | Supported URL format depends on the request method. For example, | |
| 6058 | CONNECT request URLs must use `host:port` form, while GET URLs start | |
| 6059 | with a `scheme:` prefix (e.g., `https://example.com/`). | |
| 6060 | ||
| 6061 | OK | |
| 6062 | Keep the client request intact. | |
| 6063 | ||
| 6064 | ERR | |
| 6065 | Keep the client request intact. | |
| 6066 | ||
| 6067 | BH [message="..."] | |
| 6068 | A helper problem that should be reported to the Squid admin | |
| 6069 | via a level-1 cache.log message. The 'message' parameter is | |
| 6070 | reserved for specifying the log message. | |
| 6071 | ||
| 6072 | In addition to the kv-pairs mentioned above, Squid also understands | |
| 6073 | the following optional kv-pairs in URL rewriter responses: | |
| 6074 | ||
| 6075 | clt_conn_tag=TAG | |
| 6076 | Associates a TAG with the client TCP connection. | |
| 6077 | ||
| 6078 | The clt_conn_tag=TAG pair is treated as a regular transaction | |
| 6079 | annotation for the current request and also annotates future | |
| 6080 | requests on the same client connection. A helper may update | |
| 6081 | the TAG during subsequent requests by returning a new kv-pair. | |
| 6082 | ||
| 6083 | ||
| 6084 | Helper messages contain the channel-ID part if and only if the | |
| 6085 | url_rewrite_children directive specifies positive concurrency. As a | |
| 6086 | channel-ID value, Squid sends a number between 0 and concurrency-1. | |
| 6087 | The helper must echo back the received channel-ID in its response. | |
| 6088 | ||
| 6089 | By default, Squid does not use a URL rewriter. | |
| 6090 | DOC_END | |
| 6091 | ||
| 6092 | NAME: url_rewrite_children redirect_children | |
| 6093 | TYPE: HelperChildConfig | |
| 6094 | DEFAULT: 20 startup=0 idle=1 concurrency=0 | |
| 6095 | LOC: Config.redirectChildren | |
| 6096 | DOC_START | |
| 6097 | Specifies the maximum number of redirector processes that Squid may | |
| 6098 | spawn (numberofchildren) and several related options. Using too few of | |
| 6099 | these helper processes (a.k.a. "helpers") creates request queues. | |
| 6100 | Using too many helpers wastes your system resources. | |
| 6101 | ||
| 6102 | Usage: numberofchildren [option]... | |
| 6103 | ||
| 6104 | The startup= and idle= options allow some measure of skew in your | |
| 6105 | tuning. | |
| 6106 | ||
| 6107 | startup= | |
| 6108 | ||
| 6109 | Sets a minimum of how many processes are to be spawned when Squid | |
| 6110 | starts or reconfigures. When set to zero the first request will | |
| 6111 | cause spawning of the first child process to handle it. | |
| 6112 | ||
| 6113 | Starting too few will cause an initial slowdown in traffic as Squid | |
| 6114 | attempts to simultaneously spawn enough processes to cope. | |
| 6115 | ||
| 6116 | idle= | |
| 6117 | ||
| 6118 | Sets a minimum of how many processes Squid is to try and keep available | |
| 6119 | at all times. When traffic begins to rise above what the existing | |
| 6120 | processes can handle this many more will be spawned up to the maximum | |
| 6121 | configured. A minimum setting of 1 is required. | |
| 6122 | ||
| 6123 | concurrency= | |
| 6124 | ||
| 6125 | The number of requests each redirector helper can handle in | |
| 6126 | parallel. Defaults to 0 which indicates the redirector | |
| 6127 | is a old-style single threaded redirector. | |
| 6128 | ||
| 6129 | When this directive is set to a value >= 1 then the protocol | |
| 6130 | used to communicate with the helper is modified to include | |
| 6131 | an ID in front of the request/response. The ID from the request | |
| 6132 | must be echoed back with the response to that request. | |
| 6133 | ||
| 6134 | queue-size=N | |
| 6135 | ||
| 6136 | Sets the maximum number of queued requests. A request is queued when | |
| 6137 | no existing child can accept it due to concurrency limit and no new | |
| 6138 | child can be started due to numberofchildren limit. The default | |
| 6139 | maximum is zero if url_rewrite_bypass is enabled and | |
| 6140 | 2*numberofchildren otherwise. If the queued requests exceed queue size | |
| 6141 | and redirector_bypass configuration option is set, then redirector is | |
| 6142 | bypassed. Otherwise, Squid is allowed to temporarily exceed the | |
| 6143 | configured maximum, marking the affected helper as "overloaded". If | |
| 6144 | the helper overload lasts more than 3 minutes, the action prescribed | |
| 6145 | by the on-persistent-overload option applies. | |
| 6146 | ||
| 6147 | on-persistent-overload=action | |
| 6148 | ||
| 6149 | Specifies Squid reaction to a new helper request arriving when the helper | |
| 6150 | has been overloaded for more that 3 minutes already. The number of queued | |
| 6151 | requests determines whether the helper is overloaded (see the queue-size | |
| 6152 | option). | |
| 6153 | ||
| 6154 | Two actions are supported: | |
| 6155 | ||
| 6156 | die Squid worker quits. This is the default behavior. | |
| 6157 | ||
| 6158 | ERR Squid treats the helper request as if it was | |
| 6159 | immediately submitted, and the helper immediately | |
| 6160 | replied with an ERR response. This action has no effect | |
| 6161 | on the already queued and in-progress helper requests. | |
| 6162 | DOC_END | |
| 6163 | ||
| 6164 | NAME: url_rewrite_host_header redirect_rewrites_host_header | |
| 6165 | TYPE: onoff | |
| 6166 | DEFAULT: on | |
| 6167 | LOC: Config.onoff.redir_rewrites_host | |
| 6168 | DOC_START | |
| 6169 | To preserve same-origin security policies in browsers and | |
| 6170 | prevent Host: header forgery by redirectors Squid rewrites | |
| 6171 | any Host: header in redirected requests. | |
| 6172 | ||
| 6173 | If you are running an accelerator this may not be a wanted | |
| 6174 | effect of a redirector. This directive enables you disable | |
| 6175 | Host: alteration in reverse-proxy traffic. | |
| 6176 | ||
| 6177 | WARNING: Entries are cached on the result of the URL rewriting | |
| 6178 | process, so be careful if you have domain-virtual hosts. | |
| 6179 | ||
| 6180 | WARNING: Squid and other software verifies the URL and Host | |
| 6181 | are matching, so be careful not to relay through other proxies | |
| 6182 | or inspecting firewalls with this disabled. | |
| 6183 | DOC_END | |
| 6184 | ||
| 6185 | NAME: url_rewrite_access redirector_access | |
| 6186 | TYPE: acl_access | |
| 6187 | DEFAULT: none | |
| 6188 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. | |
| 6189 | LOC: Config.accessList.redirector | |
| 6190 | DOC_START | |
| 6191 | If defined, this access list specifies which requests are | |
| 6192 | sent to the redirector processes. | |
| 6193 | ||
| 6194 | This clause supports both fast and slow acl types. | |
| 6195 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 6196 | DOC_END | |
| 6197 | ||
| 6198 | NAME: url_rewrite_bypass redirector_bypass | |
| 6199 | TYPE: onoff | |
| 6200 | LOC: Config.onoff.redirector_bypass | |
| 6201 | DEFAULT: off | |
| 6202 | DOC_START | |
| 6203 | When this is 'on', a request will not go through the | |
| 6204 | redirector if all the helpers are busy. If this is 'off' and the | |
| 6205 | redirector queue grows too large, the action is prescribed by the | |
| 6206 | on-persistent-overload option. You should only enable this if the | |
| 6207 | redirectors are not critical to your caching system. If you use | |
| 6208 | redirectors for access control, and you enable this option, | |
| 6209 | users may have access to pages they should not | |
| 6210 | be allowed to request. | |
| 6211 | ||
| 6212 | Enabling this option sets the default url_rewrite_children queue-size | |
| 6213 | option value to 0. | |
| 6214 | DOC_END | |
| 6215 | ||
| 6216 | NAME: url_rewrite_extras | |
| 6217 | TYPE: TokenOrQuotedString | |
| 6218 | LOC: Config.redirector_extras | |
| 6219 | DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp" | |
| 6220 | DOC_START | |
| 6221 | Specifies a string to be append to request line format for the | |
| 6222 | rewriter helper. "Quoted" format values may contain spaces and | |
| 6223 | logformat %macros. In theory, any logformat %macro can be used. | |
| 6224 | In practice, a %macro expands as a dash (-) if the helper request is | |
| 6225 | sent before the required macro information is available to Squid. | |
| 6226 | DOC_END | |
| 6227 | ||
| 6228 | NAME: url_rewrite_timeout | |
| 6229 | TYPE: UrlHelperTimeout | |
| 6230 | LOC: Config.onUrlRewriteTimeout | |
| 6231 | DEFAULT: none | |
| 6232 | DEFAULT_DOC: Squid waits for the helper response forever | |
| 6233 | DOC_START | |
| 6234 | Squid times active requests to redirector. The timeout value and Squid | |
| 6235 | reaction to a timed out request are configurable using the following | |
| 6236 | format: | |
| 6237 | ||
| 6238 | url_rewrite_timeout timeout time-units on_timeout=<action> [response=<quoted-response>] | |
| 6239 | ||
| 6240 | supported timeout actions: | |
| 6241 | fail Squid return a ERR_GATEWAY_FAILURE error page | |
| 6242 | ||
| 6243 | bypass Do not re-write the URL | |
| 6244 | ||
| 6245 | retry Send the lookup to the helper again | |
| 6246 | ||
| 6247 | use_configured_response | |
| 6248 | Use the <quoted-response> as helper response | |
| 6249 | DOC_END | |
| 6250 | ||
| 6251 | COMMENT_START | |
| 6252 | OPTIONS FOR STORE ID | |
| 6253 | ----------------------------------------------------------------------------- | |
| 6254 | COMMENT_END | |
| 6255 | ||
| 6256 | NAME: store_id_program storeurl_rewrite_program | |
| 6257 | TYPE: wordlist | |
| 6258 | LOC: Config.Program.store_id | |
| 6259 | DEFAULT: none | |
| 6260 | DOC_START | |
| 6261 | Specify the location of the executable StoreID helper to use. | |
| 6262 | Since they can perform almost any function there isn't one included. | |
| 6263 | ||
| 6264 | For each requested URL, the helper will receive one line with the format | |
| 6265 | ||
| 6266 | [channel-ID <SP>] URL [<SP> extras]<NL> | |
| 6267 | ||
| 6268 | ||
| 6269 | After processing the request the helper must reply using the following format: | |
| 6270 | ||
| 6271 | [channel-ID <SP>] result [<SP> kv-pairs] | |
| 6272 | ||
| 6273 | The result code can be: | |
| 6274 | ||
| 6275 | OK store-id="..." | |
| 6276 | Use the StoreID supplied in 'store-id='. | |
| 6277 | ||
| 6278 | ERR | |
| 6279 | The default is to use HTTP request URL as the store ID. | |
| 6280 | ||
| 6281 | BH | |
| 6282 | An internal error occurred in the helper, preventing | |
| 6283 | a result being identified. | |
| 6284 | ||
| 6285 | In addition to the above kv-pairs Squid also understands the following | |
| 6286 | optional kv-pairs received from URL rewriters: | |
| 6287 | clt_conn_tag=TAG | |
| 6288 | Associates a TAG with the client TCP connection. | |
| 6289 | Please see url_rewrite_program related documentation for this | |
| 6290 | kv-pair | |
| 6291 | ||
| 6292 | Helper programs should be prepared to receive and possibly ignore | |
| 6293 | additional whitespace-separated tokens on each input line. | |
| 6294 | ||
| 6295 | When using the concurrency= option the protocol is changed by | |
| 6296 | introducing a query channel tag in front of the request/response. | |
| 6297 | The query channel tag is a number between 0 and concurrency-1. | |
| 6298 | This value must be echoed back unchanged to Squid as the first part | |
| 6299 | of the response relating to its request. | |
| 6300 | ||
| 6301 | NOTE: when using StoreID refresh_pattern will apply to the StoreID | |
| 6302 | returned from the helper and not the URL. | |
| 6303 | ||
| 6304 | WARNING: Wrong StoreID value returned by a careless helper may result | |
| 6305 | in the wrong cached response returned to the user. | |
| 6306 | ||
| 6307 | By default, a StoreID helper is not used. | |
| 6308 | DOC_END | |
| 6309 | ||
| 6310 | NAME: store_id_extras | |
| 6311 | TYPE: TokenOrQuotedString | |
| 6312 | LOC: Config.storeId_extras | |
| 6313 | DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp" | |
| 6314 | DOC_START | |
| 6315 | Specifies a string to be append to request line format for the | |
| 6316 | StoreId helper. "Quoted" format values may contain spaces and | |
| 6317 | logformat %macros. In theory, any logformat %macro can be used. | |
| 6318 | In practice, a %macro expands as a dash (-) if the helper request is | |
| 6319 | sent before the required macro information is available to Squid. | |
| 6320 | DOC_END | |
| 6321 | ||
| 6322 | NAME: store_id_children storeurl_rewrite_children | |
| 6323 | TYPE: HelperChildConfig | |
| 6324 | DEFAULT: 20 startup=0 idle=1 concurrency=0 | |
| 6325 | LOC: Config.storeIdChildren | |
| 6326 | DOC_START | |
| 6327 | Specifies the maximum number of StoreID helper processes that Squid | |
| 6328 | may spawn (numberofchildren) and several related options. Using | |
| 6329 | too few of these helper processes (a.k.a. "helpers") creates request | |
| 6330 | queues. Using too many helpers wastes your system resources. | |
| 6331 | ||
| 6332 | Usage: numberofchildren [option]... | |
| 6333 | ||
| 6334 | The startup= and idle= options allow some measure of skew in your | |
| 6335 | tuning. | |
| 6336 | ||
| 6337 | startup= | |
| 6338 | ||
| 6339 | Sets a minimum of how many processes are to be spawned when Squid | |
| 6340 | starts or reconfigures. When set to zero the first request will | |
| 6341 | cause spawning of the first child process to handle it. | |
| 6342 | ||
| 6343 | Starting too few will cause an initial slowdown in traffic as Squid | |
| 6344 | attempts to simultaneously spawn enough processes to cope. | |
| 6345 | ||
| 6346 | idle= | |
| 6347 | ||
| 6348 | Sets a minimum of how many processes Squid is to try and keep available | |
| 6349 | at all times. When traffic begins to rise above what the existing | |
| 6350 | processes can handle this many more will be spawned up to the maximum | |
| 6351 | configured. A minimum setting of 1 is required. | |
| 6352 | ||
| 6353 | concurrency= | |
| 6354 | ||
| 6355 | The number of requests each storeID helper can handle in | |
| 6356 | parallel. Defaults to 0 which indicates the helper | |
| 6357 | is a old-style single threaded program. | |
| 6358 | ||
| 6359 | When this directive is set to a value >= 1 then the protocol | |
| 6360 | used to communicate with the helper is modified to include | |
| 6361 | an ID in front of the request/response. The ID from the request | |
| 6362 | must be echoed back with the response to that request. | |
| 6363 | ||
| 6364 | queue-size=N | |
| 6365 | ||
| 6366 | Sets the maximum number of queued requests to N. A request is queued | |
| 6367 | when no existing child can accept it due to concurrency limit and no | |
| 6368 | new child can be started due to numberofchildren limit. The default | |
| 6369 | maximum is 2*numberofchildren. If the queued requests exceed queue | |
| 6370 | size and redirector_bypass configuration option is set, then | |
| 6371 | redirector is bypassed. Otherwise, Squid is allowed to temporarily | |
| 6372 | exceed the configured maximum, marking the affected helper as | |
| 6373 | "overloaded". If the helper overload lasts more than 3 minutes, the | |
| 6374 | action prescribed by the on-persistent-overload option applies. | |
| 6375 | ||
| 6376 | on-persistent-overload=action | |
| 6377 | ||
| 6378 | Specifies Squid reaction to a new helper request arriving when the helper | |
| 6379 | has been overloaded for more that 3 minutes already. The number of queued | |
| 6380 | requests determines whether the helper is overloaded (see the queue-size | |
| 6381 | option). | |
| 6382 | ||
| 6383 | Two actions are supported: | |
| 6384 | ||
| 6385 | die Squid worker quits. This is the default behavior. | |
| 6386 | ||
| 6387 | ERR Squid treats the helper request as if it was | |
| 6388 | immediately submitted, and the helper immediately | |
| 6389 | replied with an ERR response. This action has no effect | |
| 6390 | on the already queued and in-progress helper requests. | |
| 6391 | DOC_END | |
| 6392 | ||
| 6393 | NAME: store_id_access storeurl_rewrite_access | |
| 6394 | TYPE: acl_access | |
| 6395 | DEFAULT: none | |
| 6396 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. | |
| 6397 | LOC: Config.accessList.store_id | |
| 6398 | DOC_START | |
| 6399 | If defined, this access list specifies which requests are | |
| 6400 | sent to the StoreID processes. By default all requests | |
| 6401 | are sent. | |
| 6402 | ||
| 6403 | This clause supports both fast and slow acl types. | |
| 6404 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 6405 | DOC_END | |
| 6406 | ||
| 6407 | NAME: store_id_bypass storeurl_rewrite_bypass | |
| 6408 | TYPE: onoff | |
| 6409 | LOC: Config.onoff.store_id_bypass | |
| 6410 | DEFAULT: on | |
| 6411 | DOC_START | |
| 6412 | When this is 'on', a request will not go through the | |
| 6413 | helper if all helpers are busy. If this is 'off' and the helper | |
| 6414 | queue grows too large, the action is prescribed by the | |
| 6415 | on-persistent-overload option. You should only enable this if the | |
| 6416 | helpers are not critical to your caching system. If you use | |
| 6417 | helpers for critical caching components, and you enable this | |
| 6418 | option, users may not get objects from cache. | |
| 6419 | This options sets default queue-size option of the store_id_children | |
| 6420 | to 0. | |
| 6421 | DOC_END | |
| 6422 | ||
| 6423 | COMMENT_START | |
| 6424 | OPTIONS FOR TUNING THE CACHE | |
| 6425 | ----------------------------------------------------------------------------- | |
| 6426 | COMMENT_END | |
| 6427 | ||
| 6428 | NAME: cache no_cache | |
| 6429 | TYPE: acl_access | |
| 6430 | DEFAULT: none | |
| 6431 | DEFAULT_DOC: By default, this directive is unused and has no effect. | |
| 6432 | LOC: Config.accessList.noCache | |
| 6433 | DOC_START | |
| 6434 | Requests denied by this directive will not be served from the cache | |
| 6435 | and their responses will not be stored in the cache. This directive | |
| 6436 | has no effect on other transactions and on already cached responses. | |
| 6437 | ||
| 6438 | This clause supports both fast and slow acl types. | |
| 6439 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 6440 | ||
| 6441 | This and the two other similar caching directives listed below are | |
| 6442 | checked at different transaction processing stages, have different | |
| 6443 | access to response information, affect different cache operations, | |
| 6444 | and differ in slow ACLs support: | |
| 6445 | ||
| 6446 | * cache: Checked before Squid makes a hit/miss determination. | |
| 6447 | No access to reply information! | |
| 6448 | Denies both serving a hit and storing a miss. | |
| 6449 | Supports both fast and slow ACLs. | |
| 6450 | * send_hit: Checked after a hit was detected. | |
| 6451 | Has access to reply (hit) information. | |
| 6452 | Denies serving a hit only. | |
| 6453 | Supports fast ACLs only. | |
| 6454 | * store_miss: Checked before storing a cachable miss. | |
| 6455 | Has access to reply (miss) information. | |
| 6456 | Denies storing a miss only. | |
| 6457 | Supports fast ACLs only. | |
| 6458 | ||
| 6459 | If you are not sure which of the three directives to use, apply the | |
| 6460 | following decision logic: | |
| 6461 | ||
| 6462 | * If your ACL(s) are of slow type _and_ need response info, redesign. | |
| 6463 | Squid does not support that particular combination at this time. | |
| 6464 | Otherwise: | |
| 6465 | * If your directive ACL(s) are of slow type, use "cache"; and/or | |
| 6466 | * if your directive ACL(s) need no response info, use "cache". | |
| 6467 | Otherwise: | |
| 6468 | * If you do not want the response cached, use store_miss; and/or | |
| 6469 | * if you do not want a hit on a cached response, use send_hit. | |
| 6470 | DOC_END | |
| 6471 | ||
| 6472 | NAME: send_hit | |
| 6473 | TYPE: acl_access | |
| 6474 | DEFAULT: none | |
| 6475 | DEFAULT_DOC: By default, this directive is unused and has no effect. | |
| 6476 | LOC: Config.accessList.sendHit | |
| 6477 | DOC_START | |
| 6478 | Responses denied by this directive will not be served from the cache | |
| 6479 | (but may still be cached, see store_miss). This directive has no | |
| 6480 | effect on the responses it allows and on the cached objects. This | |
| 6481 | directive is applied to both regular from-cache responses and responses | |
| 6482 | reused by collapsed requests (see collapsed_forwarding). | |
| 6483 | ||
| 6484 | Please see the "cache" directive for a summary of differences among | |
| 6485 | store_miss, send_hit, and cache directives. | |
| 6486 | ||
| 6487 | Unlike the "cache" directive, send_hit only supports fast acl | |
| 6488 | types. See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 6489 | ||
| 6490 | For example: | |
| 6491 | ||
| 6492 | # apply custom Store ID mapping to some URLs | |
| 6493 | acl MapMe dstdomain .c.example.com | |
| 6494 | store_id_program ... | |
| 6495 | store_id_access allow MapMe | |
| 6496 | ||
| 6497 | # but prevent caching of special responses | |
| 6498 | # such as 302 redirects that cause StoreID loops | |
| 6499 | acl Ordinary http_status 200-299 | |
| 6500 | store_miss deny MapMe !Ordinary | |
| 6501 | ||
| 6502 | # and do not serve any previously stored special responses | |
| 6503 | # from the cache (in case they were already cached before | |
| 6504 | # the above store_miss rule was in effect). | |
| 6505 | send_hit deny MapMe !Ordinary | |
| 6506 | DOC_END | |
| 6507 | ||
| 6508 | NAME: store_miss | |
| 6509 | TYPE: acl_access | |
| 6510 | DEFAULT: none | |
| 6511 | DEFAULT_DOC: By default, this directive is unused and has no effect. | |
| 6512 | LOC: Config.accessList.storeMiss | |
| 6513 | DOC_START | |
| 6514 | Responses denied by this directive will not be cached (but may still | |
| 6515 | be served from the cache, see send_hit). This directive has no | |
| 6516 | effect on the responses it allows and on the already cached responses. | |
| 6517 | ||
| 6518 | Please see the "cache" directive for a summary of differences among | |
| 6519 | store_miss, send_hit, and cache directives. See the | |
| 6520 | send_hit directive for a usage example. | |
| 6521 | ||
| 6522 | Unlike the "cache" directive, store_miss only supports fast acl | |
| 6523 | types. See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 6524 | DOC_END | |
| 6525 | ||
| 6526 | NAME: max_stale | |
| 6527 | COMMENT: time-units | |
| 6528 | TYPE: time_t | |
| 6529 | LOC: Config.maxStale | |
| 6530 | DEFAULT: 1 week | |
| 6531 | DOC_START | |
| 6532 | This option puts an upper limit on how stale content Squid | |
| 6533 | will serve from the cache if cache validation fails. | |
| 6534 | Can be overridden by the refresh_pattern max-stale option. | |
| 6535 | DOC_END | |
| 6536 | ||
| 6537 | NAME: refresh_pattern | |
| 6538 | TYPE: refreshpattern | |
| 6539 | LOC: Config.Refresh | |
| 6540 | DEFAULT: none | |
| 6541 | DOC_START | |
| 6542 | usage: refresh_pattern [-i] regex min percent max [options] | |
| 6543 | ||
| 6544 | By default, regular expressions are CASE-SENSITIVE. To make | |
| 6545 | them case-insensitive, use the -i option. | |
| 6546 | ||
| 6547 | 'Min' is the time (in minutes) an object without an explicit | |
| 6548 | expiry time should be considered fresh. The recommended | |
| 6549 | value is 0, any higher values may cause dynamic applications | |
| 6550 | to be erroneously cached unless the application designer | |
| 6551 | has taken the appropriate actions. | |
| 6552 | ||
| 6553 | 'Percent' is used to compute the max-age value for responses | |
| 6554 | with a Last-Modified header and no Cache-Control:max-age nor Expires. | |
| 6555 | Cache-Control:max-age = ( Date - Last-Modified ) * percent | |
| 6556 | ||
| 6557 | 'Max' is an upper limit on how long objects without an explicit | |
| 6558 | expiry time will be considered fresh. The value is also used | |
| 6559 | to form Cache-Control: max-age header for a request sent from | |
| 6560 | Squid to origin/parent. | |
| 6561 | ||
| 6562 | options: override-expire | |
| 6563 | override-lastmod | |
| 6564 | reload-into-ims | |
| 6565 | ignore-reload | |
| 6566 | ignore-no-store | |
| 6567 | ignore-private | |
| 6568 | max-stale=NN | |
| 6569 | refresh-ims | |
| 6570 | store-stale | |
| 6571 | ||
| 6572 | override-expire enforces min age even if the server | |
| 6573 | sent an explicit expiry time (e.g., with the | |
| 6574 | Expires: header or Cache-Control: max-age). Doing this | |
| 6575 | VIOLATES the HTTP standard. Enabling this feature | |
| 6576 | could make you liable for problems which it causes. | |
| 6577 | ||
| 6578 | Note: override-expire does not enforce staleness - it only extends | |
| 6579 | freshness / min. If the server returns a Expires time which | |
| 6580 | is longer than your max time, Squid will still consider | |
| 6581 | the object fresh for that period of time. | |
| 6582 | ||
| 6583 | override-lastmod enforces min age even on objects | |
| 6584 | that were modified recently. | |
| 6585 | ||
| 6586 | reload-into-ims changes a client no-cache or ``reload'' | |
| 6587 | request for a cached entry into a conditional request using | |
| 6588 | If-Modified-Since and/or If-None-Match headers, provided the | |
| 6589 | cached entry has a Last-Modified and/or a strong ETag header. | |
| 6590 | Doing this VIOLATES the HTTP standard. Enabling this feature | |
| 6591 | could make you liable for problems which it causes. | |
| 6592 | ||
| 6593 | ignore-reload ignores a client no-cache or ``reload'' | |
| 6594 | header. Doing this VIOLATES the HTTP standard. Enabling | |
| 6595 | this feature could make you liable for problems which | |
| 6596 | it causes. | |
| 6597 | ||
| 6598 | ignore-no-store ignores any ``Cache-control: no-store'' | |
| 6599 | headers received from a server. Doing this VIOLATES | |
| 6600 | the HTTP standard. Enabling this feature could make you | |
| 6601 | liable for problems which it causes. | |
| 6602 | ||
| 6603 | ignore-private ignores any ``Cache-control: private'' | |
| 6604 | headers received from a server. Doing this VIOLATES | |
| 6605 | the HTTP standard. Enabling this feature could make you | |
| 6606 | liable for problems which it causes. | |
| 6607 | ||
| 6608 | refresh-ims causes squid to contact the origin server | |
| 6609 | when a client issues an If-Modified-Since request. This | |
| 6610 | ensures that the client will receive an updated version | |
| 6611 | if one is available. | |
| 6612 | ||
| 6613 | store-stale stores responses even if they don't have explicit | |
| 6614 | freshness or a validator (i.e., Last-Modified or an ETag) | |
| 6615 | present, or if they're already stale. By default, Squid will | |
| 6616 | not cache such responses because they usually can't be | |
| 6617 | reused. Note that such responses will be stale by default. | |
| 6618 | ||
| 6619 | max-stale=NN provide a maximum staleness factor. Squid won't | |
| 6620 | serve objects more stale than this even if it failed to | |
| 6621 | validate the object. Default: use the max_stale global limit. | |
| 6622 | ||
| 6623 | Basically a cached object is: | |
| 6624 | ||
| 6625 | FRESH if expire > now, else STALE | |
| 6626 | STALE if age > max | |
| 6627 | FRESH if lm-factor < percent, else STALE | |
| 6628 | FRESH if age < min | |
| 6629 | else STALE | |
| 6630 | ||
| 6631 | The refresh_pattern lines are checked in the order listed here. | |
| 6632 | The first entry which matches is used. If none of the entries | |
| 6633 | match the default will be used. | |
| 6634 | ||
| 6635 | Note, you must uncomment all the default lines if you want | |
| 6636 | to change one. The default setting is only active if none is | |
| 6637 | used. | |
| 6638 | ||
| 6639 | CONFIG_START | |
| 6640 | ||
| 6641 | # | |
| 6642 | # Add any of your own refresh_pattern entries above these. | |
| 6643 | # | |
| 6644 | refresh_pattern ^ftp: 1440 20% 10080 | |
| 6645 | refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 | |
| 6646 | refresh_pattern . 0 20% 4320 | |
| 6647 | CONFIG_END | |
| 6648 | DOC_END | |
| 6649 | ||
| 6650 | NAME: quick_abort_min | |
| 6651 | COMMENT: (KB) | |
| 6652 | TYPE: kb_int64_t | |
| 6653 | DEFAULT: 16 KB | |
| 6654 | LOC: Config.quickAbort.min | |
| 6655 | DOC_NONE | |
| 6656 | ||
| 6657 | NAME: quick_abort_max | |
| 6658 | COMMENT: (KB) | |
| 6659 | TYPE: kb_int64_t | |
| 6660 | DEFAULT: 16 KB | |
| 6661 | LOC: Config.quickAbort.max | |
| 6662 | DOC_NONE | |
| 6663 | ||
| 6664 | NAME: quick_abort_pct | |
| 6665 | COMMENT: (percent) | |
| 6666 | TYPE: int | |
| 6667 | DEFAULT: 95 | |
| 6668 | LOC: Config.quickAbort.pct | |
| 6669 | DOC_START | |
| 6670 | Continuing to download a cachable response after its request is aborted is | |
| 6671 | going to waste resources if the received response is not requested again. | |
| 6672 | On the other hand, aborting an in-progress download may effectively waste | |
| 6673 | (already spent) resources if the received cachable response is requested | |
| 6674 | again. Such waste is especially noticeable when, for example, impatient | |
| 6675 | users repeatedly request and then abort slow downloads. To balance these | |
| 6676 | trade-offs when a request is aborted during response download, Squid may | |
| 6677 | check quick_abort_* directives to decide whether to finish the retrieval: | |
| 6678 | ||
| 6679 | If the transfer has less than 'quick_abort_min' KB remaining, | |
| 6680 | it will finish the retrieval. | |
| 6681 | ||
| 6682 | If the transfer has more than 'quick_abort_max' KB remaining, | |
| 6683 | it will abort the retrieval. | |
| 6684 | ||
| 6685 | If more than 'quick_abort_pct' of the transfer has completed, | |
| 6686 | it will finish the retrieval. | |
| 6687 | ||
| 6688 | If you do not want any retrieval to continue after the client | |
| 6689 | has aborted, set both 'quick_abort_min' and 'quick_abort_max' | |
| 6690 | to '0 KB'. | |
| 6691 | ||
| 6692 | If you want retrievals to always continue if they are being | |
| 6693 | cached set 'quick_abort_min' to '-1 KB'. | |
| 6694 | ||
| 6695 | Many other conditions affect Squid decision to abort or continue download. | |
| 6696 | For example, Squid continues to download responses that feed other | |
| 6697 | requests but aborts responses with unknown body length. | |
| 6698 | DOC_END | |
| 6699 | ||
| 6700 | NAME: read_ahead_gap | |
| 6701 | COMMENT: buffer-size | |
| 6702 | TYPE: b_int64_t | |
| 6703 | LOC: Config.readAheadGap | |
| 6704 | DEFAULT: 16 KB | |
| 6705 | DOC_START | |
| 6706 | The amount of data the cache will buffer ahead of what has been | |
| 6707 | sent to the client when retrieving an object from another server. | |
| 6708 | DOC_END | |
| 6709 | ||
| 6710 | NAME: negative_ttl | |
| 6711 | IFDEF: USE_HTTP_VIOLATIONS | |
| 6712 | COMMENT: time-units | |
| 6713 | TYPE: time_t | |
| 6714 | LOC: Config.negativeTtl | |
| 6715 | DEFAULT: 0 seconds | |
| 6716 | DOC_START | |
| 6717 | Set the Default Time-to-Live (TTL) for failed requests. | |
| 6718 | Certain types of failures (such as "connection refused" and | |
| 6719 | "404 Not Found") are able to be negatively-cached for a short time. | |
| 6720 | Modern web servers should provide Expires: header, however if they | |
| 6721 | do not this can provide a minimum TTL. | |
| 6722 | The default is not to cache errors with unknown expiry details. | |
| 6723 | ||
| 6724 | Note that this is different from negative caching of DNS lookups. | |
| 6725 | ||
| 6726 | WARNING: Doing this VIOLATES the HTTP standard. Enabling | |
| 6727 | this feature could make you liable for problems which it | |
| 6728 | causes. | |
| 6729 | DOC_END | |
| 6730 | ||
| 6731 | NAME: positive_dns_ttl | |
| 6732 | COMMENT: time-units | |
| 6733 | TYPE: time_t | |
| 6734 | LOC: Config.positiveDnsTtl | |
| 6735 | DEFAULT: 6 hours | |
| 6736 | DOC_START | |
| 6737 | Upper limit on how long Squid will cache positive DNS responses. | |
| 6738 | Default is 6 hours (360 minutes). This directive must be set | |
| 6739 | larger than negative_dns_ttl. | |
| 6740 | DOC_END | |
| 6741 | ||
| 6742 | NAME: negative_dns_ttl | |
| 6743 | COMMENT: time-units | |
| 6744 | TYPE: time_t | |
| 6745 | LOC: Config.negativeDnsTtl | |
| 6746 | DEFAULT: 1 minutes | |
| 6747 | DOC_START | |
| 6748 | Time-to-Live (TTL) for negative caching of failed DNS lookups. | |
| 6749 | This also sets the lower cache limit on positive lookups. | |
| 6750 | Minimum value is 1 second, and it is not recommendable to go | |
| 6751 | much below 10 seconds. | |
| 6752 | DOC_END | |
| 6753 | ||
| 6754 | NAME: range_offset_limit | |
| 6755 | COMMENT: size [acl acl...] | |
| 6756 | TYPE: acl_b_size_t | |
| 6757 | LOC: Config.rangeOffsetLimit | |
| 6758 | DEFAULT: none | |
| 6759 | DOC_START | |
| 6760 | usage: (size) [units] [[!]aclname] | |
| 6761 | ||
| 6762 | Sets an upper limit on how far (number of bytes) into the file | |
| 6763 | a Range request may be to cause Squid to prefetch the whole file. | |
| 6764 | If beyond this limit, Squid forwards the Range request as it is and | |
| 6765 | the result is NOT cached. | |
| 6766 | ||
| 6767 | This is to stop a far ahead range request (lets say start at 17MB) | |
| 6768 | from making Squid fetch the whole object up to that point before | |
| 6769 | sending anything to the client. | |
| 6770 | ||
| 6771 | Multiple range_offset_limit lines may be specified, and they will | |
| 6772 | be searched from top to bottom on each request until a match is found. | |
| 6773 | The first match found will be used. If no line matches a request, the | |
| 6774 | default limit of 0 bytes will be used. | |
| 6775 | ||
| 6776 | 'size' is the limit specified as a number of units. | |
| 6777 | ||
| 6778 | 'units' specifies whether to use bytes, KB, MB, etc. | |
| 6779 | If no units are specified bytes are assumed. | |
| 6780 | ||
| 6781 | A size of 0 causes Squid to never fetch more than the | |
| 6782 | client requested. (default) | |
| 6783 | ||
| 6784 | A size of 'none' causes Squid to always fetch the object from the | |
| 6785 | beginning so it may cache the result. (2.0 style) | |
| 6786 | ||
| 6787 | 'aclname' is the name of a defined ACL. | |
| 6788 | ||
| 6789 | NP: Using 'none' as the byte value here will override any quick_abort settings | |
| 6790 | that may otherwise apply to the range request. The range request will | |
| 6791 | be fully fetched from start to finish regardless of the client | |
| 6792 | actions. This affects bandwidth usage. | |
| 6793 | DOC_END | |
| 6794 | ||
| 6795 | NAME: minimum_expiry_time | |
| 6796 | COMMENT: (seconds) | |
| 6797 | TYPE: time_t | |
| 6798 | LOC: Config.minimum_expiry_time | |
| 6799 | DEFAULT: 60 seconds | |
| 6800 | DOC_START | |
| 6801 | The minimum caching time according to (Expires - Date) | |
| 6802 | headers Squid honors if the object can't be revalidated. | |
| 6803 | The default is 60 seconds. | |
| 6804 | ||
| 6805 | In reverse proxy environments it might be desirable to honor | |
| 6806 | shorter object lifetimes. It is most likely better to make | |
| 6807 | your server return a meaningful Last-Modified header however. | |
| 6808 | DOC_END | |
| 6809 | ||
| 6810 | NAME: store_avg_object_size | |
| 6811 | COMMENT: (bytes) | |
| 6812 | TYPE: b_int64_t | |
| 6813 | DEFAULT: 13 KB | |
| 6814 | LOC: Config.Store.avgObjectSize | |
| 6815 | DOC_START | |
| 6816 | Average object size, used to estimate number of objects your | |
| 6817 | cache can hold. The default is 13 KB. | |
| 6818 | ||
| 6819 | This is used to pre-seed the cache index memory allocation to | |
| 6820 | reduce expensive reallocate operations while handling clients | |
| 6821 | traffic. Too-large values may result in memory allocation during | |
| 6822 | peak traffic, too-small values will result in wasted memory. | |
| 6823 | ||
| 6824 | Check the cache manager 'info' report metrics for the real | |
| 6825 | object sizes seen by your Squid before tuning this. | |
| 6826 | DOC_END | |
| 6827 | ||
| 6828 | NAME: store_objects_per_bucket | |
| 6829 | TYPE: int | |
| 6830 | DEFAULT: 20 | |
| 6831 | LOC: Config.Store.objectsPerBucket | |
| 6832 | DOC_START | |
| 6833 | Target number of objects per bucket in the store hash table. | |
| 6834 | Lowering this value increases the total number of buckets and | |
| 6835 | also the storage maintenance rate. The default is 20. | |
| 6836 | DOC_END | |
| 6837 | ||
| 6838 | COMMENT_START | |
| 6839 | HTTP OPTIONS | |
| 6840 | ----------------------------------------------------------------------------- | |
| 6841 | COMMENT_END | |
| 6842 | ||
| 6843 | NAME: request_header_max_size | |
| 6844 | COMMENT: (KB) | |
| 6845 | TYPE: b_size_t | |
| 6846 | DEFAULT: 64 KB | |
| 6847 | LOC: Config.maxRequestHeaderSize | |
| 6848 | DOC_START | |
| 6849 | This directives limits the header size of a received HTTP request | |
| 6850 | (including request-line). Increasing this limit beyond its 64 KB default | |
| 6851 | exposes certain old Squid code to various denial-of-service attacks. This | |
| 6852 | limit also applies to received FTP commands. | |
| 6853 | ||
| 6854 | This limit has no direct affect on Squid memory consumption. | |
| 6855 | ||
| 6856 | Squid does not check this limit when sending requests. | |
| 6857 | DOC_END | |
| 6858 | ||
| 6859 | NAME: reply_header_max_size | |
| 6860 | COMMENT: (KB) | |
| 6861 | TYPE: b_size_t | |
| 6862 | DEFAULT: 64 KB | |
| 6863 | LOC: Config.maxReplyHeaderSize | |
| 6864 | DOC_START | |
| 6865 | This directives limits the header size of a received HTTP response | |
| 6866 | (including status-line). Increasing this limit beyond its 64 KB default | |
| 6867 | exposes certain old Squid code to various denial-of-service attacks. This | |
| 6868 | limit also applies to FTP command responses. | |
| 6869 | ||
| 6870 | Squid also checks this limit when loading hit responses from disk cache. | |
| 6871 | ||
| 6872 | Squid does not check this limit when sending responses. | |
| 6873 | DOC_END | |
| 6874 | ||
| 6875 | NAME: request_body_max_size | |
| 6876 | COMMENT: (bytes) | |
| 6877 | TYPE: b_int64_t | |
| 6878 | DEFAULT: 0 KB | |
| 6879 | DEFAULT_DOC: No limit. | |
| 6880 | LOC: Config.maxRequestBodySize | |
| 6881 | DOC_START | |
| 6882 | This specifies the maximum size for an HTTP request body. | |
| 6883 | In other words, the maximum size of a PUT/POST request. | |
| 6884 | A user who attempts to send a request with a body larger | |
| 6885 | than this limit receives an "Invalid Request" error message. | |
| 6886 | If you set this parameter to a zero (the default), there will | |
| 6887 | be no limit imposed. | |
| 6888 | ||
| 6889 | See also client_request_buffer_max_size for an alternative | |
| 6890 | limitation on client uploads which can be configured. | |
| 6891 | DOC_END | |
| 6892 | ||
| 6893 | NAME: client_request_buffer_max_size | |
| 6894 | COMMENT: (bytes) | |
| 6895 | TYPE: b_size_t | |
| 6896 | DEFAULT: 512 KB | |
| 6897 | LOC: Config.maxRequestBufferSize | |
| 6898 | DOC_START | |
| 6899 | This specifies the maximum buffer size of a client request. | |
| 6900 | It prevents squid eating too much memory when somebody uploads | |
| 6901 | a large file. | |
| 6902 | DOC_END | |
| 6903 | ||
| 6904 | NAME: broken_posts | |
| 6905 | IFDEF: USE_HTTP_VIOLATIONS | |
| 6906 | TYPE: acl_access | |
| 6907 | DEFAULT: none | |
| 6908 | DEFAULT_DOC: Obey RFC 2616. | |
| 6909 | LOC: Config.accessList.brokenPosts | |
| 6910 | DOC_START | |
| 6911 | A list of ACL elements which, if matched, causes Squid to send | |
| 6912 | an extra CRLF pair after the body of a PUT/POST request. | |
| 6913 | ||
| 6914 | Some HTTP servers has broken implementations of PUT/POST, | |
| 6915 | and rely on an extra CRLF pair sent by some WWW clients. | |
| 6916 | ||
| 6917 | Quote from RFC2616 section 4.1 on this matter: | |
| 6918 | ||
| 6919 | Note: certain buggy HTTP/1.0 client implementations generate an | |
| 6920 | extra CRLF's after a POST request. To restate what is explicitly | |
| 6921 | forbidden by the BNF, an HTTP/1.1 client must not preface or follow | |
| 6922 | a request with an extra CRLF. | |
| 6923 | ||
| 6924 | This clause only supports fast acl types. | |
| 6925 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 6926 | ||
| 6927 | Example: | |
| 6928 | acl buggy_server url_regex ^http://.... | |
| 6929 | broken_posts allow buggy_server | |
| 6930 | DOC_END | |
| 6931 | ||
| 6932 | NAME: adaptation_uses_indirect_client icap_uses_indirect_client | |
| 6933 | COMMENT: on|off | |
| 6934 | TYPE: onoff | |
| 6935 | IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_ADAPTATION | |
| 6936 | DEFAULT: on | |
| 6937 | LOC: Adaptation::Config::use_indirect_client | |
| 6938 | DOC_START | |
| 6939 | Controls whether the indirect client IP address (instead of the direct | |
| 6940 | client IP address) is passed to adaptation services. | |
| 6941 | ||
| 6942 | See also: follow_x_forwarded_for adaptation_send_client_ip | |
| 6943 | DOC_END | |
| 6944 | ||
| 6945 | NAME: via | |
| 6946 | IFDEF: USE_HTTP_VIOLATIONS | |
| 6947 | COMMENT: on|off | |
| 6948 | TYPE: onoff | |
| 6949 | DEFAULT: on | |
| 6950 | LOC: Config.onoff.via | |
| 6951 | DOC_START | |
| 6952 | If set (default), Squid will include a Via header in requests and | |
| 6953 | replies as required by RFC2616. | |
| 6954 | DOC_END | |
| 6955 | ||
| 6956 | NAME: vary_ignore_expire | |
| 6957 | COMMENT: on|off | |
| 6958 | TYPE: onoff | |
| 6959 | LOC: Config.onoff.vary_ignore_expire | |
| 6960 | DEFAULT: off | |
| 6961 | DOC_START | |
| 6962 | Many HTTP servers supporting Vary gives such objects | |
| 6963 | immediate expiry time with no cache-control header | |
| 6964 | when requested by a HTTP/1.0 client. This option | |
| 6965 | enables Squid to ignore such expiry times until | |
| 6966 | HTTP/1.1 is fully implemented. | |
| 6967 | ||
| 6968 | WARNING: If turned on this may eventually cause some | |
| 6969 | varying objects not intended for caching to get cached. | |
| 6970 | DOC_END | |
| 6971 | ||
| 6972 | NAME: request_header_access | |
| 6973 | IFDEF: USE_HTTP_VIOLATIONS | |
| 6974 | TYPE: http_header_access | |
| 6975 | LOC: Config.request_header_access | |
| 6976 | DEFAULT: none | |
| 6977 | DEFAULT_DOC: No limits. | |
| 6978 | DOC_START | |
| 6979 | Usage: request_header_access header_name allow|deny [!]aclname ... | |
| 6980 | ||
| 6981 | WARNING: Doing this VIOLATES the HTTP standard. Enabling | |
| 6982 | this feature could make you liable for problems which it | |
| 6983 | causes. | |
| 6984 | ||
| 6985 | This option replaces the old 'anonymize_headers' and the | |
| 6986 | older 'http_anonymizer' option with something that is much | |
| 6987 | more configurable. A list of ACLs for each header name allows | |
| 6988 | removal of specific header fields under specific conditions. | |
| 6989 | ||
| 6990 | This option only applies to outgoing HTTP request headers (i.e., | |
| 6991 | headers sent by Squid to the next HTTP hop such as a cache peer | |
| 6992 | or an origin server). The option has no effect during cache hit | |
| 6993 | detection. The equivalent adaptation vectoring point in ICAP | |
| 6994 | terminology is post-cache REQMOD. | |
| 6995 | ||
| 6996 | The option is applied to individual outgoing request header | |
| 6997 | fields. For each request header field F, Squid uses the first | |
| 6998 | qualifying sets of request_header_access rules: | |
| 6999 | ||
| 7000 | 1. Rules with header_name equal to F's name. | |
| 7001 | 2. Rules with header_name 'Other', provided F's name is not | |
| 7002 | on the hard-coded list of commonly used HTTP header names. | |
| 7003 | 3. Rules with header_name 'All'. | |
| 7004 | ||
| 7005 | Within that qualifying rule set, rule ACLs are checked as usual. | |
| 7006 | If ACLs of an "allow" rule match, the header field is allowed to | |
| 7007 | go through as is. If ACLs of a "deny" rule match, the header is | |
| 7008 | removed and request_header_replace is then checked to identify | |
| 7009 | if the removed header has a replacement. If no rules within the | |
| 7010 | set have matching ACLs, the header field is left as is. | |
| 7011 | ||
| 7012 | For example, to achieve the same behavior as the old | |
| 7013 | 'http_anonymizer standard' option, you should use: | |
| 7014 | ||
| 7015 | request_header_access From deny all | |
| 7016 | request_header_access Referer deny all | |
| 7017 | request_header_access User-Agent deny all | |
| 7018 | ||
| 7019 | Or, to reproduce the old 'http_anonymizer paranoid' feature | |
| 7020 | you should use: | |
| 7021 | ||
| 7022 | request_header_access Authorization allow all | |
| 7023 | request_header_access Proxy-Authorization allow all | |
| 7024 | request_header_access Cache-Control allow all | |
| 7025 | request_header_access Content-Length allow all | |
| 7026 | request_header_access Content-Type allow all | |
| 7027 | request_header_access Date allow all | |
| 7028 | request_header_access Host allow all | |
| 7029 | request_header_access If-Modified-Since allow all | |
| 7030 | request_header_access Pragma allow all | |
| 7031 | request_header_access Accept allow all | |
| 7032 | request_header_access Accept-Charset allow all | |
| 7033 | request_header_access Accept-Encoding allow all | |
| 7034 | request_header_access Accept-Language allow all | |
| 7035 | request_header_access Connection allow all | |
| 7036 | request_header_access All deny all | |
| 7037 | ||
| 7038 | HTTP reply headers are controlled with the reply_header_access directive. | |
| 7039 | ||
| 7040 | By default, all headers are allowed (no anonymizing is performed). | |
| 7041 | DOC_END | |
| 7042 | ||
| 7043 | NAME: reply_header_access | |
| 7044 | IFDEF: USE_HTTP_VIOLATIONS | |
| 7045 | TYPE: http_header_access | |
| 7046 | LOC: Config.reply_header_access | |
| 7047 | DEFAULT: none | |
| 7048 | DEFAULT_DOC: No limits. | |
| 7049 | DOC_START | |
| 7050 | Usage: reply_header_access header_name allow|deny [!]aclname ... | |
| 7051 | ||
| 7052 | WARNING: Doing this VIOLATES the HTTP standard. Enabling | |
| 7053 | this feature could make you liable for problems which it | |
| 7054 | causes. | |
| 7055 | ||
| 7056 | This option only applies to reply headers, i.e., from the | |
| 7057 | server to the client. | |
| 7058 | ||
| 7059 | This is the same as request_header_access, but in the other | |
| 7060 | direction. Please see request_header_access for detailed | |
| 7061 | documentation. | |
| 7062 | ||
| 7063 | For example, to achieve the same behavior as the old | |
| 7064 | 'http_anonymizer standard' option, you should use: | |
| 7065 | ||
| 7066 | reply_header_access Server deny all | |
| 7067 | reply_header_access WWW-Authenticate deny all | |
| 7068 | reply_header_access Link deny all | |
| 7069 | ||
| 7070 | Or, to reproduce the old 'http_anonymizer paranoid' feature | |
| 7071 | you should use: | |
| 7072 | ||
| 7073 | reply_header_access Allow allow all | |
| 7074 | reply_header_access WWW-Authenticate allow all | |
| 7075 | reply_header_access Proxy-Authenticate allow all | |
| 7076 | reply_header_access Cache-Control allow all | |
| 7077 | reply_header_access Content-Encoding allow all | |
| 7078 | reply_header_access Content-Length allow all | |
| 7079 | reply_header_access Content-Type allow all | |
| 7080 | reply_header_access Date allow all | |
| 7081 | reply_header_access Expires allow all | |
| 7082 | reply_header_access Last-Modified allow all | |
| 7083 | reply_header_access Location allow all | |
| 7084 | reply_header_access Pragma allow all | |
| 7085 | reply_header_access Content-Language allow all | |
| 7086 | reply_header_access Retry-After allow all | |
| 7087 | reply_header_access Title allow all | |
| 7088 | reply_header_access Content-Disposition allow all | |
| 7089 | reply_header_access Connection allow all | |
| 7090 | reply_header_access All deny all | |
| 7091 | ||
| 7092 | HTTP request headers are controlled with the request_header_access directive. | |
| 7093 | ||
| 7094 | By default, all headers are allowed (no anonymizing is | |
| 7095 | performed). | |
| 7096 | DOC_END | |
| 7097 | ||
| 7098 | NAME: request_header_replace header_replace | |
| 7099 | IFDEF: USE_HTTP_VIOLATIONS | |
| 7100 | TYPE: http_header_replace | |
| 7101 | LOC: Config.request_header_access | |
| 7102 | DEFAULT: none | |
| 7103 | DOC_START | |
| 7104 | Usage: request_header_replace header_name message | |
| 7105 | Example: request_header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit) | |
| 7106 | ||
| 7107 | This option allows you to change the contents of headers | |
| 7108 | denied with request_header_access above, by replacing them | |
| 7109 | with some fixed string. | |
| 7110 | ||
| 7111 | This only applies to request headers, not reply headers. | |
| 7112 | ||
| 7113 | By default, headers are removed if denied. | |
| 7114 | DOC_END | |
| 7115 | ||
| 7116 | NAME: reply_header_replace | |
| 7117 | IFDEF: USE_HTTP_VIOLATIONS | |
| 7118 | TYPE: http_header_replace | |
| 7119 | LOC: Config.reply_header_access | |
| 7120 | DEFAULT: none | |
| 7121 | DOC_START | |
| 7122 | Usage: reply_header_replace header_name message | |
| 7123 | Example: reply_header_replace Server Foo/1.0 | |
| 7124 | ||
| 7125 | This option allows you to change the contents of headers | |
| 7126 | denied with reply_header_access above, by replacing them | |
| 7127 | with some fixed string. | |
| 7128 | ||
| 7129 | This only applies to reply headers, not request headers. | |
| 7130 | ||
| 7131 | By default, headers are removed if denied. | |
| 7132 | DOC_END | |
| 7133 | ||
| 7134 | NAME: request_header_add | |
| 7135 | TYPE: HeaderWithAclList | |
| 7136 | LOC: Config.request_header_add | |
| 7137 | DEFAULT: none | |
| 7138 | DOC_START | |
| 7139 | Usage: request_header_add field-name field-value [ acl ... ] | |
| 7140 | Example: request_header_add X-Client-CA "CA=%ssl::>cert_issuer" all | |
| 7141 | ||
| 7142 | This option adds header fields to outgoing HTTP requests (i.e., | |
| 7143 | request headers sent by Squid to the next HTTP hop such as a | |
| 7144 | cache peer or an origin server). The option has no effect during | |
| 7145 | cache hit detection. The equivalent adaptation vectoring point | |
| 7146 | in ICAP terminology is post-cache REQMOD. | |
| 7147 | ||
| 7148 | Field-name is a token specifying an HTTP header name. If a | |
| 7149 | standard HTTP header name is used, Squid does not check whether | |
| 7150 | the new header conflicts with any existing headers or violates | |
| 7151 | HTTP rules. If the request to be modified already contains a | |
| 7152 | field with the same name, the old field is preserved but the | |
| 7153 | header field values are not merged. | |
| 7154 | ||
| 7155 | Field-value is either a token or a quoted string. If quoted | |
| 7156 | string format is used, then the surrounding quotes are removed | |
| 7157 | while escape sequences and %macros are processed. | |
| 7158 | ||
| 7159 | One or more Squid ACLs may be specified to restrict header | |
| 7160 | injection to matching requests. As always in squid.conf, all | |
| 7161 | ACLs in the ACL list must be satisfied for the insertion to | |
| 7162 | happen. The request_header_add supports fast ACLs only. | |
| 7163 | ||
| 7164 | See also: reply_header_add. | |
| 7165 | DOC_END | |
| 7166 | ||
| 7167 | NAME: reply_header_add | |
| 7168 | TYPE: HeaderWithAclList | |
| 7169 | LOC: Config.reply_header_add | |
| 7170 | DEFAULT: none | |
| 7171 | DOC_START | |
| 7172 | Usage: reply_header_add field-name field-value [ acl ... ] | |
| 7173 | Example: reply_header_add X-Client-CA "CA=%ssl::>cert_issuer" all | |
| 7174 | ||
| 7175 | This option adds header fields to outgoing HTTP responses (i.e., response | |
| 7176 | headers delivered by Squid to the client). This option has no effect on | |
| 7177 | cache hit detection. The equivalent adaptation vectoring point in | |
| 7178 | ICAP terminology is post-cache RESPMOD. This option does not apply to | |
| 7179 | successful CONNECT replies. | |
| 7180 | ||
| 7181 | Field-name is a token specifying an HTTP header name. If a | |
| 7182 | standard HTTP header name is used, Squid does not check whether | |
| 7183 | the new header conflicts with any existing headers or violates | |
| 7184 | HTTP rules. If the response to be modified already contains a | |
| 7185 | field with the same name, the old field is preserved but the | |
| 7186 | header field values are not merged. | |
| 7187 | ||
| 7188 | Field-value is either a token or a quoted string. If quoted | |
| 7189 | string format is used, then the surrounding quotes are removed | |
| 7190 | while escape sequences and %macros are processed. | |
| 7191 | ||
| 7192 | One or more Squid ACLs may be specified to restrict header | |
| 7193 | injection to matching responses. As always in squid.conf, all | |
| 7194 | ACLs in the ACL list must be satisfied for the insertion to | |
| 7195 | happen. The reply_header_add option supports fast ACLs only. | |
| 7196 | ||
| 7197 | See also: request_header_add. | |
| 7198 | DOC_END | |
| 7199 | ||
| 7200 | NAME: note | |
| 7201 | TYPE: note | |
| 7202 | LOC: Config.notes | |
| 7203 | DEFAULT: none | |
| 7204 | DOC_START | |
| 7205 | This option used to log custom information about the master | |
| 7206 | transaction. For example, an admin may configure Squid to log | |
| 7207 | which "user group" the transaction belongs to, where "user group" | |
| 7208 | will be determined based on a set of ACLs and not [just] | |
| 7209 | authentication information. | |
| 7210 | Values of key/value pairs can be logged using %{key}note macros: | |
| 7211 | ||
| 7212 | note key value acl ... | |
| 7213 | logformat myFormat ... %{key}note ... | |
| 7214 | ||
| 7215 | This clause only supports fast acl types. | |
| 7216 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 7217 | DOC_END | |
| 7218 | ||
| 7219 | NAME: relaxed_header_parser | |
| 7220 | COMMENT: on|off|warn | |
| 7221 | TYPE: tristate | |
| 7222 | LOC: Config.onoff.relaxed_header_parser | |
| 7223 | DEFAULT: on | |
| 7224 | DOC_START | |
| 7225 | In the default "on" setting Squid accepts certain forms | |
| 7226 | of non-compliant HTTP messages where it is unambiguous | |
| 7227 | what the sending application intended even if the message | |
| 7228 | is not correctly formatted. The messages is then normalized | |
| 7229 | to the correct form when forwarded by Squid. | |
| 7230 | ||
| 7231 | If set to "warn" then a warning will be emitted in cache.log | |
| 7232 | each time such HTTP error is encountered. | |
| 7233 | ||
| 7234 | If set to "off" then such HTTP errors will cause the request | |
| 7235 | or response to be rejected. | |
| 7236 | DOC_END | |
| 7237 | ||
| 7238 | NAME: collapsed_forwarding | |
| 7239 | COMMENT: (on|off) | |
| 7240 | TYPE: onoff | |
| 7241 | LOC: Config.onoff.collapsed_forwarding | |
| 7242 | DEFAULT: off | |
| 7243 | DOC_START | |
| 7244 | This option controls whether Squid is allowed to merge multiple | |
| 7245 | potentially cachable requests for the same URI before Squid knows | |
| 7246 | whether the response is going to be cachable. | |
| 7247 | ||
| 7248 | When enabled, instead of forwarding each concurrent request for | |
| 7249 | the same URL, Squid just sends the first of them. The other, so | |
| 7250 | called "collapsed" requests, wait for the response to the first | |
| 7251 | request and, if it happens to be cachable, use that response. | |
| 7252 | Here, "concurrent requests" means "received after the first | |
| 7253 | request headers were parsed and before the corresponding response | |
| 7254 | headers were parsed". | |
| 7255 | ||
| 7256 | This feature is disabled by default: enabling collapsed | |
| 7257 | forwarding needlessly delays forwarding requests that look | |
| 7258 | cachable (when they are collapsed) but then need to be forwarded | |
| 7259 | individually anyway because they end up being for uncachable | |
| 7260 | content. However, in some cases, such as acceleration of highly | |
| 7261 | cachable content with periodic or grouped expiration times, the | |
| 7262 | gains from collapsing [large volumes of simultaneous refresh | |
| 7263 | requests] outweigh losses from such delays. | |
| 7264 | ||
| 7265 | Squid collapses two kinds of requests: regular client requests | |
| 7266 | received on one of the listening ports and internal "cache | |
| 7267 | revalidation" requests which are triggered by those regular | |
| 7268 | requests hitting a stale cached object. Revalidation collapsing | |
| 7269 | is currently disabled for Squid instances containing SMP-aware | |
| 7270 | disk or memory caches and for Vary-controlled cached objects. | |
| 7271 | ||
| 7272 | A response reused by the collapsed request is deemed fresh in that | |
| 7273 | request processing context -- Squid does not apply refresh_pattern and | |
| 7274 | internal freshness validation checks to collapsed transactions. Squid | |
| 7275 | does apply send_hit rules. | |
| 7276 | DOC_END | |
| 7277 | ||
| 7278 | NAME: collapsed_forwarding_access | |
| 7279 | TYPE: acl_access | |
| 7280 | DEFAULT: none | |
| 7281 | DEFAULT_DOC: Requests may be collapsed if collapsed_forwarding is on. | |
| 7282 | LOC: Config.accessList.collapsedForwardingAccess | |
| 7283 | DOC_START | |
| 7284 | Use this directive to restrict collapsed forwarding to a subset of | |
| 7285 | eligible requests. The directive is checked for regular HTTP | |
| 7286 | requests, internal revalidation requests, and HTCP/ICP requests. | |
| 7287 | ||
| 7288 | collapsed_forwarding_access allow|deny [!]aclname ... | |
| 7289 | ||
| 7290 | This directive cannot force collapsing. It has no effect on | |
| 7291 | collapsing unless collapsed_forwarding is 'on', and all other | |
| 7292 | collapsing preconditions are satisfied. | |
| 7293 | ||
| 7294 | * A denied request will not collapse, and future transactions will | |
| 7295 | not collapse on it (even if they are allowed to collapse). | |
| 7296 | ||
| 7297 | * An allowed request may collapse, or future transactions may | |
| 7298 | collapse on it (provided they are allowed to collapse). | |
| 7299 | ||
| 7300 | This directive is evaluated before receiving HTTP response headers | |
| 7301 | and without access to Squid-to-peer connection (if any). | |
| 7302 | ||
| 7303 | Only fast ACLs are supported. | |
| 7304 | ||
| 7305 | See also: collapsed_forwarding. | |
| 7306 | DOC_END | |
| 7307 | ||
| 7308 | NAME: shared_transient_entries_limit collapsed_forwarding_shared_entries_limit | |
| 7309 | COMMENT: (number of entries) | |
| 7310 | TYPE: int64_t | |
| 7311 | LOC: Config.shared_transient_entries_limit | |
| 7312 | DEFAULT: 16384 | |
| 7313 | DOC_START | |
| 7314 | This directive limits the size of a table used for sharing current | |
| 7315 | transaction information among SMP workers. A table entry stores meta | |
| 7316 | information about a single cache entry being delivered to Squid | |
| 7317 | client(s) by one or more SMP workers. A single table entry consumes | |
| 7318 | less than 128 shared memory bytes. | |
| 7319 | ||
| 7320 | The limit should be significantly larger than the number of | |
| 7321 | concurrent non-collapsed cachable responses leaving Squid. For a | |
| 7322 | cache that handles less than 5000 concurrent requests, the default | |
| 7323 | setting of 16384 should be plenty. | |
| 7324 | ||
| 7325 | Using excessively large values wastes shared memory. Limiting the | |
| 7326 | table size too much results in hash collisions, leading to lower hit | |
| 7327 | ratio and missed SMP request collapsing opportunities: Transactions | |
| 7328 | left without a table entry cannot cache their responses and are | |
| 7329 | invisible to other concurrent requests for the same resource. | |
| 7330 | ||
| 7331 | A zero limit is allowed but unsupported. A positive small limit | |
| 7332 | lowers hit ratio, but zero limit disables a lot of essential | |
| 7333 | synchronization among SMP workers, leading to HTTP violations (e.g., | |
| 7334 | stale hit responses). It also disables shared collapsed forwarding: | |
| 7335 | A worker becomes unable to collapse its requests on transactions in | |
| 7336 | other workers, resulting in more trips to the origin server and more | |
| 7337 | cache thrashing. | |
| 7338 | DOC_END | |
| 7339 | ||
| 7340 | COMMENT_START | |
| 7341 | TIMEOUTS | |
| 7342 | ----------------------------------------------------------------------------- | |
| 7343 | COMMENT_END | |
| 7344 | ||
| 7345 | NAME: forward_timeout | |
| 7346 | COMMENT: time-units | |
| 7347 | TYPE: time_t | |
| 7348 | LOC: Config.Timeout.forward | |
| 7349 | DEFAULT: 4 minutes | |
| 7350 | DOC_START | |
| 7351 | This parameter specifies how long Squid should at most attempt in | |
| 7352 | finding a forwarding path for the request before giving up. | |
| 7353 | DOC_END | |
| 7354 | ||
| 7355 | NAME: connect_timeout | |
| 7356 | COMMENT: time-units | |
| 7357 | TYPE: time_t | |
| 7358 | LOC: Config.Timeout.connect | |
| 7359 | DEFAULT: 1 minute | |
| 7360 | DOC_START | |
| 7361 | This parameter specifies how long to wait for the TCP connect to | |
| 7362 | the requested server or peer to complete before Squid should | |
| 7363 | attempt to find another path where to forward the request. | |
| 7364 | DOC_END | |
| 7365 | ||
| 7366 | NAME: peer_connect_timeout | |
| 7367 | COMMENT: time-units | |
| 7368 | TYPE: time_t | |
| 7369 | LOC: Config.Timeout.peer_connect | |
| 7370 | DEFAULT: 30 seconds | |
| 7371 | DOC_START | |
| 7372 | This parameter specifies how long to wait for a pending TCP | |
| 7373 | connection to a peer cache. The default is 30 seconds. You | |
| 7374 | may also set different timeout values for individual neighbors | |
| 7375 | with the 'connect-timeout' option on a 'cache_peer' line. | |
| 7376 | DOC_END | |
| 7377 | ||
| 7378 | NAME: read_timeout | |
| 7379 | COMMENT: time-units | |
| 7380 | TYPE: time_t | |
| 7381 | LOC: Config.Timeout.read | |
| 7382 | DEFAULT: 15 minutes | |
| 7383 | DOC_START | |
| 7384 | Applied on peer server connections. | |
| 7385 | ||
| 7386 | After each successful read(), the timeout will be extended by this | |
| 7387 | amount. If no data is read again after this amount of time, | |
| 7388 | the request is aborted and logged with ERR_READ_TIMEOUT. | |
| 7389 | ||
| 7390 | The default is 15 minutes. | |
| 7391 | DOC_END | |
| 7392 | ||
| 7393 | NAME: write_timeout | |
| 7394 | COMMENT: time-units | |
| 7395 | TYPE: time_t | |
| 7396 | LOC: Config.Timeout.write | |
| 7397 | DEFAULT: 15 minutes | |
| 7398 | DOC_START | |
| 7399 | This timeout is tracked for all connections that have data | |
| 7400 | available for writing and are waiting for the socket to become | |
| 7401 | ready. After each successful write, the timeout is extended by | |
| 7402 | the configured amount. If Squid has data to write but the | |
| 7403 | connection is not ready for the configured duration, the | |
| 7404 | transaction associated with the connection is terminated. The | |
| 7405 | default is 15 minutes. | |
| 7406 | DOC_END | |
| 7407 | ||
| 7408 | NAME: request_timeout | |
| 7409 | TYPE: time_t | |
| 7410 | LOC: Config.Timeout.request | |
| 7411 | DEFAULT: 5 minutes | |
| 7412 | DOC_START | |
| 7413 | How long to wait for complete HTTP request headers after initial | |
| 7414 | connection establishment. | |
| 7415 | DOC_END | |
| 7416 | ||
| 7417 | NAME: request_start_timeout | |
| 7418 | TYPE: time_t | |
| 7419 | LOC: Config.Timeout.request_start_timeout | |
| 7420 | DEFAULT: 5 minutes | |
| 7421 | DOC_START | |
| 7422 | How long to wait for the first request byte after initial | |
| 7423 | connection establishment. | |
| 7424 | DOC_END | |
| 7425 | ||
| 7426 | NAME: client_idle_pconn_timeout persistent_request_timeout | |
| 7427 | TYPE: time_t | |
| 7428 | LOC: Config.Timeout.clientIdlePconn | |
| 7429 | DEFAULT: 2 minutes | |
| 7430 | DOC_START | |
| 7431 | How long to wait for the next HTTP request on a persistent | |
| 7432 | client connection after the previous request completes. | |
| 7433 | DOC_END | |
| 7434 | ||
| 7435 | NAME: ftp_client_idle_timeout | |
| 7436 | TYPE: time_t | |
| 7437 | LOC: Config.Timeout.ftpClientIdle | |
| 7438 | DEFAULT: 30 minutes | |
| 7439 | DOC_START | |
| 7440 | How long to wait for an FTP request on a connection to Squid ftp_port. | |
| 7441 | Many FTP clients do not deal with idle connection closures well, | |
| 7442 | necessitating a longer default timeout than client_idle_pconn_timeout | |
| 7443 | used for incoming HTTP requests. | |
| 7444 | DOC_END | |
| 7445 | ||
| 7446 | NAME: client_lifetime | |
| 7447 | COMMENT: time-units | |
| 7448 | TYPE: time_t | |
| 7449 | LOC: Config.Timeout.lifetime | |
| 7450 | DEFAULT: 1 day | |
| 7451 | DOC_START | |
| 7452 | The maximum amount of time a client (browser) is allowed to | |
| 7453 | remain connected to the cache process. This protects the Cache | |
| 7454 | from having a lot of sockets (and hence file descriptors) tied up | |
| 7455 | in a CLOSE_WAIT state from remote clients that go away without | |
| 7456 | properly shutting down (either because of a network failure or | |
| 7457 | because of a poor client implementation). The default is one | |
| 7458 | day, 1440 minutes. | |
| 7459 | ||
| 7460 | NOTE: The default value is intended to be much larger than any | |
| 7461 | client would ever need to be connected to your cache. You | |
| 7462 | should probably change client_lifetime only as a last resort. | |
| 7463 | If you seem to have many client connections tying up | |
| 7464 | filedescriptors, we recommend first tuning the read_timeout, | |
| 7465 | request_timeout, persistent_request_timeout and quick_abort values. | |
| 7466 | DOC_END | |
| 7467 | ||
| 7468 | NAME: pconn_lifetime | |
| 7469 | COMMENT: time-units | |
| 7470 | TYPE: time_t | |
| 7471 | LOC: Config.Timeout.pconnLifetime | |
| 7472 | DEFAULT: 0 seconds | |
| 7473 | DOC_START | |
| 7474 | Desired maximum lifetime of a persistent connection. | |
| 7475 | When set, Squid will close a now-idle persistent connection that | |
| 7476 | exceeded configured lifetime instead of moving the connection into | |
| 7477 | the idle connection pool (or equivalent). No effect on ongoing/active | |
| 7478 | transactions. Connection lifetime is the time period from the | |
| 7479 | connection acceptance or opening time until "now". | |
| 7480 | ||
| 7481 | This limit is useful in environments with long-lived connections | |
| 7482 | where Squid configuration or environmental factors change during a | |
| 7483 | single connection lifetime. If unrestricted, some connections may | |
| 7484 | last for hours and even days, ignoring those changes that should | |
| 7485 | have affected their behavior or their existence. | |
| 7486 | ||
| 7487 | Currently, a new lifetime value supplied via Squid reconfiguration | |
| 7488 | has no effect on already idle connections unless they become busy. | |
| 7489 | ||
| 7490 | When set to '0' this limit is not used. | |
| 7491 | DOC_END | |
| 7492 | ||
| 7493 | NAME: half_closed_clients | |
| 7494 | TYPE: onoff | |
| 7495 | LOC: Config.onoff.half_closed_clients | |
| 7496 | DEFAULT: off | |
| 7497 | DOC_START | |
| 7498 | Some clients may shutdown the sending side of their TCP | |
| 7499 | connections, while leaving their receiving sides open. Sometimes, | |
| 7500 | Squid can not tell the difference between a half-closed and a | |
| 7501 | fully-closed TCP connection. | |
| 7502 | ||
| 7503 | By default, Squid will immediately close client connections when | |
| 7504 | read(2) returns "no more data to read." | |
| 7505 | ||
| 7506 | Change this option to 'on' and Squid will keep open connections | |
| 7507 | until a read(2) or write(2) on the socket returns an error. | |
| 7508 | This may show some benefits for reverse proxies. But if not | |
| 7509 | it is recommended to leave OFF. | |
| 7510 | DOC_END | |
| 7511 | ||
| 7512 | NAME: server_idle_pconn_timeout pconn_timeout | |
| 7513 | TYPE: time_t | |
| 7514 | LOC: Config.Timeout.serverIdlePconn | |
| 7515 | DEFAULT: 1 minute | |
| 7516 | DOC_START | |
| 7517 | Timeout for idle persistent connections to servers and other | |
| 7518 | proxies. | |
| 7519 | DOC_END | |
| 7520 | ||
| 7521 | NAME: shutdown_lifetime | |
| 7522 | COMMENT: time-units | |
| 7523 | TYPE: time_t | |
| 7524 | LOC: Config.shutdownLifetime | |
| 7525 | DEFAULT: 30 seconds | |
| 7526 | DOC_START | |
| 7527 | When SIGTERM or SIGHUP is received, the cache is put into | |
| 7528 | "shutdown pending" mode until all active sockets are closed. | |
| 7529 | This value is the lifetime to set for all open descriptors | |
| 7530 | during shutdown mode. Any active clients after this many | |
| 7531 | seconds will receive a 'timeout' message. | |
| 7532 | DOC_END | |
| 7533 | ||
| 7534 | COMMENT_START | |
| 7535 | ADMINISTRATIVE PARAMETERS | |
| 7536 | ----------------------------------------------------------------------------- | |
| 7537 | COMMENT_END | |
| 7538 | ||
| 7539 | NAME: cache_mgr | |
| 7540 | TYPE: string | |
| 7541 | DEFAULT: webmaster | |
| 7542 | LOC: Config.adminEmail | |
| 7543 | DOC_START | |
| 7544 | Email-address of local cache manager who will receive | |
| 7545 | mail if the cache dies. The default is "webmaster". | |
| 7546 | DOC_END | |
| 7547 | ||
| 7548 | NAME: mail_from | |
| 7549 | TYPE: string | |
| 7550 | DEFAULT: none | |
| 7551 | LOC: Config.EmailFrom | |
| 7552 | DOC_START | |
| 7553 | From: email-address for mail sent when the cache dies. | |
| 7554 | The default is to use 'squid@unique_hostname'. | |
| 7555 | ||
| 7556 | See also: unique_hostname directive. | |
| 7557 | DOC_END | |
| 7558 | ||
| 7559 | NAME: mail_program | |
| 7560 | TYPE: eol | |
| 7561 | DEFAULT: mail | |
| 7562 | LOC: Config.EmailProgram | |
| 7563 | DOC_START | |
| 7564 | Email program used to send mail if the cache dies. | |
| 7565 | The default is "mail". The specified program must comply | |
| 7566 | with the standard Unix mail syntax: | |
| 7567 | mail-program recipient < mailfile | |
| 7568 | ||
| 7569 | Optional command line options can be specified. | |
| 7570 | DOC_END | |
| 7571 | ||
| 7572 | NAME: cache_effective_user | |
| 7573 | TYPE: string | |
| 7574 | DEFAULT: @DEFAULT_CACHE_EFFECTIVE_USER@ | |
| 7575 | LOC: Config.effectiveUser | |
| 7576 | DOC_START | |
| 7577 | If you start Squid as root, it will change its effective/real | |
| 7578 | UID/GID to the user specified below. The default is to change | |
| 7579 | to UID of @DEFAULT_CACHE_EFFECTIVE_USER@. | |
| 7580 | see also; cache_effective_group | |
| 7581 | DOC_END | |
| 7582 | ||
| 7583 | NAME: cache_effective_group | |
| 7584 | TYPE: string | |
| 7585 | DEFAULT: none | |
| 7586 | DEFAULT_DOC: Use system group memberships of the cache_effective_user account | |
| 7587 | LOC: Config.effectiveGroup | |
| 7588 | DOC_START | |
| 7589 | Squid sets the GID to the effective user's default group ID | |
| 7590 | (taken from the password file) and supplementary group list | |
| 7591 | from the groups membership. | |
| 7592 | ||
| 7593 | If you want Squid to run with a specific GID regardless of | |
| 7594 | the group memberships of the effective user then set this | |
| 7595 | to the group (or GID) you want Squid to run as. When set | |
| 7596 | all other group privileges of the effective user are ignored | |
| 7597 | and only this GID is effective. If Squid is not started as | |
| 7598 | root the user starting Squid MUST be member of the specified | |
| 7599 | group. | |
| 7600 | ||
| 7601 | This option is not recommended by the Squid Team. | |
| 7602 | Our preference is for administrators to configure a secure | |
| 7603 | user account for squid with UID/GID matching system policies. | |
| 7604 | DOC_END | |
| 7605 | ||
| 7606 | NAME: httpd_suppress_version_string | |
| 7607 | COMMENT: on|off | |
| 7608 | TYPE: onoff | |
| 7609 | DEFAULT: off | |
| 7610 | LOC: Config.onoff.httpd_suppress_version_string | |
| 7611 | DOC_START | |
| 7612 | Do not send Squid version string in HTTP metadata and generated content | |
| 7613 | such as HTML error pages. Squid version string is still present in certain | |
| 7614 | SNMP responses, HTTP(S) Server response header field, | |
| 7615 | various console output, and cache.log. | |
| 7616 | DOC_END | |
| 7617 | ||
| 7618 | NAME: visible_hostname | |
| 7619 | TYPE: string | |
| 7620 | LOC: Config.visibleHostname | |
| 7621 | DEFAULT: none | |
| 7622 | DEFAULT_DOC: Automatically detect the system host name | |
| 7623 | DOC_START | |
| 7624 | If you want to present a special hostname in error messages, etc, | |
| 7625 | define this. Otherwise, the return value of gethostname() | |
| 7626 | will be used. If you have multiple caches in a cluster and | |
| 7627 | get errors about IP-forwarding you must set them to have individual | |
| 7628 | names with this setting. | |
| 7629 | DOC_END | |
| 7630 | ||
| 7631 | NAME: unique_hostname | |
| 7632 | TYPE: string | |
| 7633 | LOC: Config.uniqueHostname | |
| 7634 | DEFAULT: none | |
| 7635 | DEFAULT_DOC: Copy the value from visible_hostname | |
| 7636 | DOC_START | |
| 7637 | If you want to have multiple machines with the same | |
| 7638 | 'visible_hostname' you must give each machine a different | |
| 7639 | 'unique_hostname' so forwarding loops can be detected. | |
| 7640 | DOC_END | |
| 7641 | ||
| 7642 | NAME: hostname_aliases | |
| 7643 | TYPE: SBufList | |
| 7644 | LOC: Config.hostnameAliases | |
| 7645 | DEFAULT: none | |
| 7646 | DOC_START | |
| 7647 | A list of other DNS names your cache has. | |
| 7648 | DOC_END | |
| 7649 | ||
| 7650 | NAME: umask | |
| 7651 | TYPE: int | |
| 7652 | LOC: Config.umask | |
| 7653 | DEFAULT: 027 | |
| 7654 | DOC_START | |
| 7655 | Minimum umask which should be enforced while the proxy | |
| 7656 | is running, in addition to the umask set at startup. | |
| 7657 | ||
| 7658 | For a traditional octal representation of umasks, start | |
| 7659 | your value with 0. | |
| 7660 | DOC_END | |
| 7661 | ||
| 7662 | COMMENT_START | |
| 7663 | HTTPD-ACCELERATOR OPTIONS | |
| 7664 | ----------------------------------------------------------------------------- | |
| 7665 | COMMENT_END | |
| 7666 | ||
| 7667 | NAME: httpd_accel_surrogate_id | |
| 7668 | TYPE: string | |
| 7669 | DEFAULT: none | |
| 7670 | DEFAULT_DOC: visible_hostname is used if no specific ID is set. | |
| 7671 | LOC: Config.Accel.surrogate_id | |
| 7672 | DOC_START | |
| 7673 | Surrogates (http://www.esi.org/architecture_spec_1.0.html) | |
| 7674 | need an identification token to allow control targeting. Because | |
| 7675 | a farm of surrogates may all perform the same tasks, they may share | |
| 7676 | an identification token. | |
| 7677 | ||
| 7678 | When the surrogate is a reverse-proxy, this ID is also | |
| 7679 | used as cdn-id for CDN-Loop detection (RFC 8586). | |
| 7680 | DOC_END | |
| 7681 | ||
| 7682 | NAME: http_accel_surrogate_remote | |
| 7683 | COMMENT: on|off | |
| 7684 | TYPE: onoff | |
| 7685 | DEFAULT: off | |
| 7686 | LOC: Config.onoff.surrogate_is_remote | |
| 7687 | DOC_START | |
| 7688 | Remote surrogates (such as those in a CDN) honour the header | |
| 7689 | "Surrogate-Control: no-store-remote". | |
| 7690 | ||
| 7691 | Set this to on to have squid behave as a remote surrogate. | |
| 7692 | DOC_END | |
| 7693 | ||
| 7694 | COMMENT_START | |
| 7695 | DELAY POOL PARAMETERS | |
| 7696 | ----------------------------------------------------------------------------- | |
| 7697 | COMMENT_END | |
| 7698 | ||
| 7699 | NAME: delay_pools | |
| 7700 | TYPE: delay_pool_count | |
| 7701 | DEFAULT: 0 | |
| 7702 | IFDEF: USE_DELAY_POOLS | |
| 7703 | LOC: Config.Delay | |
| 7704 | DOC_START | |
| 7705 | This represents the number of delay pools to be used. For example, | |
| 7706 | if you have one class 2 delay pool and one class 3 delays pool, you | |
| 7707 | have a total of 2 delay pools. | |
| 7708 | ||
| 7709 | See also delay_parameters, delay_class, delay_access for pool | |
| 7710 | configuration details. | |
| 7711 | DOC_END | |
| 7712 | ||
| 7713 | NAME: delay_class | |
| 7714 | TYPE: delay_pool_class | |
| 7715 | DEFAULT: none | |
| 7716 | IFDEF: USE_DELAY_POOLS | |
| 7717 | LOC: Config.Delay | |
| 7718 | DOC_START | |
| 7719 | This defines the class of each delay pool. There must be exactly one | |
| 7720 | delay_class line for each delay pool. For example, to define two | |
| 7721 | delay pools, one of class 2 and one of class 3, the settings above | |
| 7722 | and here would be: | |
| 7723 | ||
| 7724 | Example: | |
| 7725 | delay_pools 4 # 4 delay pools | |
| 7726 | delay_class 1 2 # pool 1 is a class 2 pool | |
| 7727 | delay_class 2 3 # pool 2 is a class 3 pool | |
| 7728 | delay_class 3 4 # pool 3 is a class 4 pool | |
| 7729 | delay_class 4 5 # pool 4 is a class 5 pool | |
| 7730 | ||
| 7731 | The delay pool classes are: | |
| 7732 | ||
| 7733 | class 1 Everything is limited by a single aggregate | |
| 7734 | bucket. | |
| 7735 | ||
| 7736 | class 2 Everything is limited by a single aggregate | |
| 7737 | bucket as well as an "individual" bucket chosen | |
| 7738 | from bits 25 through 32 of the IPv4 address. | |
| 7739 | ||
| 7740 | class 3 Everything is limited by a single aggregate | |
| 7741 | bucket as well as a "network" bucket chosen | |
| 7742 | from bits 17 through 24 of the IP address and a | |
| 7743 | "individual" bucket chosen from bits 17 through | |
| 7744 | 32 of the IPv4 address. | |
| 7745 | ||
| 7746 | class 4 Everything in a class 3 delay pool, with an | |
| 7747 | additional limit on a per user basis. This | |
| 7748 | only takes effect if the username is established | |
| 7749 | in advance - by forcing authentication in your | |
| 7750 | http_access rules. | |
| 7751 | ||
| 7752 | class 5 Requests are grouped according their tag (see | |
| 7753 | external_acl's tag= reply). | |
| 7754 | ||
| 7755 | ||
| 7756 | Each pool also requires a delay_parameters directive to configure the pool size | |
| 7757 | and speed limits used whenever the pool is applied to a request. Along with | |
| 7758 | a set of delay_access directives to determine when it is used. | |
| 7759 | ||
| 7760 | NOTE: If an IP address is a.b.c.d | |
| 7761 | -> bits 25 through 32 are "d" | |
| 7762 | -> bits 17 through 24 are "c" | |
| 7763 | -> bits 17 through 32 are "c * 256 + d" | |
| 7764 | ||
| 7765 | NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to | |
| 7766 | IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic. | |
| 7767 | ||
| 7768 | This clause only supports fast acl types. | |
| 7769 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 7770 | ||
| 7771 | See also delay_parameters and delay_access. | |
| 7772 | DOC_END | |
| 7773 | ||
| 7774 | NAME: delay_access | |
| 7775 | TYPE: delay_pool_access | |
| 7776 | DEFAULT: none | |
| 7777 | DEFAULT_DOC: Deny using the pool, unless allow rules exist in squid.conf for the pool. | |
| 7778 | IFDEF: USE_DELAY_POOLS | |
| 7779 | LOC: Config.Delay | |
| 7780 | DOC_START | |
| 7781 | This is used to determine which delay pool a request falls into. | |
| 7782 | ||
| 7783 | delay_access is sorted per pool and the matching starts with pool 1, | |
| 7784 | then pool 2, ..., and finally pool N. The first delay pool where the | |
| 7785 | request is allowed is selected for the request. If it does not allow | |
| 7786 | the request to any pool then the request is not delayed (default). | |
| 7787 | ||
| 7788 | For example, if you want some_big_clients in delay | |
| 7789 | pool 1 and lotsa_little_clients in delay pool 2: | |
| 7790 | ||
| 7791 | delay_access 1 allow some_big_clients | |
| 7792 | delay_access 1 deny all | |
| 7793 | delay_access 2 allow lotsa_little_clients | |
| 7794 | delay_access 2 deny all | |
| 7795 | delay_access 3 allow authenticated_clients | |
| 7796 | ||
| 7797 | See also delay_parameters and delay_class. | |
| 7798 | ||
| 7799 | DOC_END | |
| 7800 | ||
| 7801 | NAME: delay_parameters | |
| 7802 | TYPE: delay_pool_rates | |
| 7803 | DEFAULT: none | |
| 7804 | IFDEF: USE_DELAY_POOLS | |
| 7805 | LOC: Config.Delay | |
| 7806 | DOC_START | |
| 7807 | This defines the parameters for a delay pool. Each delay pool has | |
| 7808 | a number of "buckets" associated with it, as explained in the | |
| 7809 | description of delay_class. | |
| 7810 | ||
| 7811 | For a class 1 delay pool, the syntax is: | |
| 7812 | delay_class pool 1 | |
| 7813 | delay_parameters pool aggregate | |
| 7814 | ||
| 7815 | For a class 2 delay pool: | |
| 7816 | delay_class pool 2 | |
| 7817 | delay_parameters pool aggregate individual | |
| 7818 | ||
| 7819 | For a class 3 delay pool: | |
| 7820 | delay_class pool 3 | |
| 7821 | delay_parameters pool aggregate network individual | |
| 7822 | ||
| 7823 | For a class 4 delay pool: | |
| 7824 | delay_class pool 4 | |
| 7825 | delay_parameters pool aggregate network individual user | |
| 7826 | ||
| 7827 | For a class 5 delay pool: | |
| 7828 | delay_class pool 5 | |
| 7829 | delay_parameters pool tagrate | |
| 7830 | ||
| 7831 | The option variables are: | |
| 7832 | ||
| 7833 | pool a pool number - ie, a number between 1 and the | |
| 7834 | number specified in delay_pools as used in | |
| 7835 | delay_class lines. | |
| 7836 | ||
| 7837 | aggregate the speed limit parameters for the aggregate bucket | |
| 7838 | (class 1, 2, 3). | |
| 7839 | ||
| 7840 | individual the speed limit parameters for the individual | |
| 7841 | buckets (class 2, 3). | |
| 7842 | ||
| 7843 | network the speed limit parameters for the network buckets | |
| 7844 | (class 3). | |
| 7845 | ||
| 7846 | user the speed limit parameters for the user buckets | |
| 7847 | (class 4). | |
| 7848 | ||
| 7849 | tagrate the speed limit parameters for the tag buckets | |
| 7850 | (class 5). | |
| 7851 | ||
| 7852 | A pair of delay parameters is written restore/maximum, where restore is | |
| 7853 | the number of bytes (not bits - modem and network speeds are usually | |
| 7854 | quoted in bits) per second placed into the bucket, and maximum is the | |
| 7855 | maximum number of bytes which can be in the bucket at any time. | |
| 7856 | ||
| 7857 | There must be one delay_parameters line for each delay pool. | |
| 7858 | ||
| 7859 | ||
| 7860 | For example, if delay pool number 1 is a class 2 delay pool as in the | |
| 7861 | above example, and is being used to strictly limit each host to 64Kbit/sec | |
| 7862 | (plus overheads), with no overall limit, the line is: | |
| 7863 | ||
| 7864 | delay_parameters 1 none 8000/8000 | |
| 7865 | ||
| 7866 | Note that 8 x 8K Byte/sec -> 64K bit/sec. | |
| 7867 | ||
| 7868 | Note that the word 'none' is used to represent no limit. | |
| 7869 | ||
| 7870 | ||
| 7871 | And, if delay pool number 2 is a class 3 delay pool as in the above | |
| 7872 | example, and you want to limit it to a total of 256Kbit/sec (strict limit) | |
| 7873 | with each 8-bit network permitted 64Kbit/sec (strict limit) and each | |
| 7874 | individual host permitted 4800bit/sec with a bucket maximum size of 64Kbits | |
| 7875 | to permit a decent web page to be downloaded at a decent speed | |
| 7876 | (if the network is not being limited due to overuse) but slow down | |
| 7877 | large downloads more significantly: | |
| 7878 | ||
| 7879 | delay_parameters 2 32000/32000 8000/8000 600/8000 | |
| 7880 | ||
| 7881 | Note that 8 x 32K Byte/sec -> 256K bit/sec. | |
| 7882 | 8 x 8K Byte/sec -> 64K bit/sec. | |
| 7883 | 8 x 600 Byte/sec -> 4800 bit/sec. | |
| 7884 | ||
| 7885 | ||
| 7886 | Finally, for a class 4 delay pool as in the example - each user will | |
| 7887 | be limited to 128Kbits/sec no matter how many workstations they are logged into.: | |
| 7888 | ||
| 7889 | delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000 | |
| 7890 | ||
| 7891 | ||
| 7892 | See also delay_class and delay_access. | |
| 7893 | ||
| 7894 | DOC_END | |
| 7895 | ||
| 7896 | NAME: delay_initial_bucket_level | |
| 7897 | COMMENT: (percent, 0-100) | |
| 7898 | TYPE: u_short | |
| 7899 | DEFAULT: 50 | |
| 7900 | IFDEF: USE_DELAY_POOLS | |
| 7901 | LOC: Config.Delay.initial | |
| 7902 | DOC_START | |
| 7903 | The initial bucket percentage is used to determine how much is put | |
| 7904 | in each bucket when squid starts, is reconfigured, or first notices | |
| 7905 | a host accessing it (in class 2 and class 3, individual hosts and | |
| 7906 | networks only have buckets associated with them once they have been | |
| 7907 | "seen" by squid). | |
| 7908 | DOC_END | |
| 7909 | ||
| 7910 | COMMENT_START | |
| 7911 | CLIENT DELAY POOL PARAMETERS | |
| 7912 | ----------------------------------------------------------------------------- | |
| 7913 | COMMENT_END | |
| 7914 | ||
| 7915 | NAME: client_delay_pools | |
| 7916 | TYPE: client_delay_pool_count | |
| 7917 | DEFAULT: 0 | |
| 7918 | IFDEF: USE_DELAY_POOLS | |
| 7919 | LOC: Config.ClientDelay | |
| 7920 | DOC_START | |
| 7921 | This option specifies the number of client delay pools used. It must | |
| 7922 | preceed other client_delay_* options. | |
| 7923 | ||
| 7924 | Example: | |
| 7925 | client_delay_pools 2 | |
| 7926 | ||
| 7927 | See also client_delay_parameters and client_delay_access. | |
| 7928 | DOC_END | |
| 7929 | ||
| 7930 | NAME: client_delay_initial_bucket_level | |
| 7931 | COMMENT: (percent, 0-no_limit) | |
| 7932 | TYPE: u_short | |
| 7933 | DEFAULT: 50 | |
| 7934 | IFDEF: USE_DELAY_POOLS | |
| 7935 | LOC: Config.ClientDelay.initial | |
| 7936 | DOC_START | |
| 7937 | This option determines the initial bucket size as a percentage of | |
| 7938 | max_bucket_size from client_delay_parameters. Buckets are created | |
| 7939 | at the time of the "first" connection from the matching IP. Idle | |
| 7940 | buckets are periodically deleted up. | |
| 7941 | ||
| 7942 | You can specify more than 100 percent but note that such "oversized" | |
| 7943 | buckets are not refilled until their size goes down to max_bucket_size | |
| 7944 | from client_delay_parameters. | |
| 7945 | ||
| 7946 | Example: | |
| 7947 | client_delay_initial_bucket_level 50 | |
| 7948 | DOC_END | |
| 7949 | ||
| 7950 | NAME: client_delay_parameters | |
| 7951 | TYPE: client_delay_pool_rates | |
| 7952 | DEFAULT: none | |
| 7953 | IFDEF: USE_DELAY_POOLS | |
| 7954 | LOC: Config.ClientDelay | |
| 7955 | DOC_START | |
| 7956 | ||
| 7957 | This option configures client-side bandwidth limits using the | |
| 7958 | following format: | |
| 7959 | ||
| 7960 | client_delay_parameters pool speed_limit max_bucket_size | |
| 7961 | ||
| 7962 | pool is an integer ID used for client_delay_access matching. | |
| 7963 | ||
| 7964 | speed_limit is bytes added to the bucket per second. | |
| 7965 | ||
| 7966 | max_bucket_size is the maximum size of a bucket, enforced after any | |
| 7967 | speed_limit additions. | |
| 7968 | ||
| 7969 | Please see the delay_parameters option for more information and | |
| 7970 | examples. | |
| 7971 | ||
| 7972 | Example: | |
| 7973 | client_delay_parameters 1 1024 2048 | |
| 7974 | client_delay_parameters 2 51200 16384 | |
| 7975 | ||
| 7976 | See also client_delay_access. | |
| 7977 | ||
| 7978 | DOC_END | |
| 7979 | ||
| 7980 | NAME: client_delay_access | |
| 7981 | TYPE: client_delay_pool_access | |
| 7982 | DEFAULT: none | |
| 7983 | DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool. | |
| 7984 | IFDEF: USE_DELAY_POOLS | |
| 7985 | LOC: Config.ClientDelay | |
| 7986 | DOC_START | |
| 7987 | This option determines the client-side delay pool for the | |
| 7988 | request: | |
| 7989 | ||
| 7990 | client_delay_access pool_ID allow|deny acl_name | |
| 7991 | ||
| 7992 | All client_delay_access options are checked in their pool ID | |
| 7993 | order, starting with pool 1. The first checked pool with allowed | |
| 7994 | request is selected for the request. If no ACL matches or there | |
| 7995 | are no client_delay_access options, the request bandwidth is not | |
| 7996 | limited. | |
| 7997 | ||
| 7998 | The ACL-selected pool is then used to find the | |
| 7999 | client_delay_parameters for the request. Client-side pools are | |
| 8000 | not used to aggregate clients. Clients are always aggregated | |
| 8001 | based on their source IP addresses (one bucket per source IP). | |
| 8002 | ||
| 8003 | This clause only supports fast acl types. | |
| 8004 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 8005 | Additionally, only the client TCP connection details are available. | |
| 8006 | ACLs testing HTTP properties will not work. | |
| 8007 | ||
| 8008 | Please see delay_access for more examples. | |
| 8009 | ||
| 8010 | Example: | |
| 8011 | client_delay_access 1 allow low_rate_network | |
| 8012 | client_delay_access 2 allow vips_network | |
| 8013 | ||
| 8014 | ||
| 8015 | See also client_delay_parameters and client_delay_pools. | |
| 8016 | DOC_END | |
| 8017 | ||
| 8018 | NAME: response_delay_pool | |
| 8019 | TYPE: response_delay_pool_parameters | |
| 8020 | DEFAULT: none | |
| 8021 | IFDEF: USE_DELAY_POOLS | |
| 8022 | LOC: Config.MessageDelay | |
| 8023 | DOC_START | |
| 8024 | This option configures client response bandwidth limits using the | |
| 8025 | following format: | |
| 8026 | ||
| 8027 | response_delay_pool name [option=value] ... | |
| 8028 | ||
| 8029 | name the response delay pool name | |
| 8030 | ||
| 8031 | available options: | |
| 8032 | ||
| 8033 | individual-restore The speed limit of an individual | |
| 8034 | bucket(bytes/s). To be used in conjunction | |
| 8035 | with 'individual-maximum'. | |
| 8036 | ||
| 8037 | individual-maximum The maximum number of bytes which can | |
| 8038 | be placed into the individual bucket. To be used | |
| 8039 | in conjunction with 'individual-restore'. | |
| 8040 | ||
| 8041 | aggregate-restore The speed limit for the aggregate | |
| 8042 | bucket(bytes/s). To be used in conjunction with | |
| 8043 | 'aggregate-maximum'. | |
| 8044 | ||
| 8045 | aggregate-maximum The maximum number of bytes which can | |
| 8046 | be placed into the aggregate bucket. To be used | |
| 8047 | in conjunction with 'aggregate-restore'. | |
| 8048 | ||
| 8049 | initial-bucket-level The initial bucket size as a percentage | |
| 8050 | of individual-maximum. | |
| 8051 | ||
| 8052 | Individual and(or) aggregate bucket options may not be specified, | |
| 8053 | meaning no individual and(or) aggregate speed limitation. | |
| 8054 | See also response_delay_pool_access and delay_parameters for | |
| 8055 | terminology details. | |
| 8056 | DOC_END | |
| 8057 | ||
| 8058 | NAME: response_delay_pool_access | |
| 8059 | TYPE: response_delay_pool_access | |
| 8060 | DEFAULT: none | |
| 8061 | DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool. | |
| 8062 | IFDEF: USE_DELAY_POOLS | |
| 8063 | LOC: Config.MessageDelay | |
| 8064 | DOC_START | |
| 8065 | Determines whether a specific named response delay pool is used | |
| 8066 | for the transaction. The syntax for this directive is: | |
| 8067 | ||
| 8068 | response_delay_pool_access pool_name allow|deny acl_name | |
| 8069 | ||
| 8070 | All response_delay_pool_access options are checked in the order | |
| 8071 | they appear in this configuration file. The first rule with a | |
| 8072 | matching ACL wins. If (and only if) an "allow" rule won, Squid | |
| 8073 | assigns the response to the corresponding named delay pool. | |
| 8074 | DOC_END | |
| 8075 | ||
| 8076 | COMMENT_START | |
| 8077 | WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS | |
| 8078 | ----------------------------------------------------------------------------- | |
| 8079 | COMMENT_END | |
| 8080 | ||
| 8081 | NAME: wccp_router | |
| 8082 | TYPE: address | |
| 8083 | LOC: Config.Wccp.router | |
| 8084 | DEFAULT: any_addr | |
| 8085 | DEFAULT_DOC: WCCP disabled. | |
| 8086 | IFDEF: USE_WCCP | |
| 8087 | DOC_START | |
| 8088 | Use this option to define your WCCP ``home'' router for | |
| 8089 | Squid. | |
| 8090 | ||
| 8091 | wccp_router supports a single WCCP(v1) router | |
| 8092 | ||
| 8093 | wccp2_router supports multiple WCCPv2 routers | |
| 8094 | ||
| 8095 | only one of the two may be used at the same time and defines | |
| 8096 | which version of WCCP to use. | |
| 8097 | DOC_END | |
| 8098 | ||
| 8099 | NAME: wccp2_router | |
| 8100 | TYPE: IpAddress_list | |
| 8101 | LOC: Config.Wccp2.router | |
| 8102 | DEFAULT: none | |
| 8103 | DEFAULT_DOC: WCCPv2 disabled. | |
| 8104 | IFDEF: USE_WCCPv2 | |
| 8105 | DOC_START | |
| 8106 | Use this option to define your WCCP ``home'' router for | |
| 8107 | Squid. | |
| 8108 | ||
| 8109 | wccp_router supports a single WCCP(v1) router | |
| 8110 | ||
| 8111 | wccp2_router supports multiple WCCPv2 routers | |
| 8112 | ||
| 8113 | only one of the two may be used at the same time and defines | |
| 8114 | which version of WCCP to use. | |
| 8115 | DOC_END | |
| 8116 | ||
| 8117 | NAME: wccp_version | |
| 8118 | TYPE: int | |
| 8119 | LOC: Config.Wccp.version | |
| 8120 | DEFAULT: 4 | |
| 8121 | IFDEF: USE_WCCP | |
| 8122 | DOC_START | |
| 8123 | This directive is only relevant if you need to set up WCCP(v1) | |
| 8124 | to some very old and end-of-life Cisco routers. In all other | |
| 8125 | setups it must be left unset or at the default setting. | |
| 8126 | It defines an internal version in the WCCP(v1) protocol, | |
| 8127 | with version 4 being the officially documented protocol. | |
| 8128 | ||
| 8129 | According to some users, Cisco IOS 11.2 and earlier only | |
| 8130 | support WCCP version 3. If you're using that or an earlier | |
| 8131 | version of IOS, you may need to change this value to 3, otherwise | |
| 8132 | do not specify this parameter. | |
| 8133 | DOC_END | |
| 8134 | ||
| 8135 | NAME: wccp2_rebuild_wait | |
| 8136 | TYPE: onoff | |
| 8137 | LOC: Config.Wccp2.rebuildwait | |
| 8138 | DEFAULT: on | |
| 8139 | IFDEF: USE_WCCPv2 | |
| 8140 | DOC_START | |
| 8141 | If this is enabled Squid will wait for the cache dir rebuild to finish | |
| 8142 | before sending the first wccp2 HereIAm packet | |
| 8143 | DOC_END | |
| 8144 | ||
| 8145 | NAME: wccp2_forwarding_method | |
| 8146 | TYPE: wccp2_method | |
| 8147 | LOC: Config.Wccp2.forwarding_method | |
| 8148 | DEFAULT: gre | |
| 8149 | IFDEF: USE_WCCPv2 | |
| 8150 | DOC_START | |
| 8151 | WCCP2 allows the setting of forwarding methods between the | |
| 8152 | router/switch and the cache. Valid values are as follows: | |
| 8153 | ||
| 8154 | gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel) | |
| 8155 | l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting) | |
| 8156 | ||
| 8157 | Currently (as of IOS 12.4) cisco routers only support GRE. | |
| 8158 | Cisco switches only support the L2 redirect assignment method. | |
| 8159 | DOC_END | |
| 8160 | ||
| 8161 | NAME: wccp2_return_method | |
| 8162 | TYPE: wccp2_method | |
| 8163 | LOC: Config.Wccp2.return_method | |
| 8164 | DEFAULT: gre | |
| 8165 | IFDEF: USE_WCCPv2 | |
| 8166 | DOC_START | |
| 8167 | WCCP2 allows the setting of return methods between the | |
| 8168 | router/switch and the cache for packets that the cache | |
| 8169 | decides not to handle. Valid values are as follows: | |
| 8170 | ||
| 8171 | gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel) | |
| 8172 | l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting) | |
| 8173 | ||
| 8174 | Currently (as of IOS 12.4) cisco routers only support GRE. | |
| 8175 | Cisco switches only support the L2 redirect assignment. | |
| 8176 | ||
| 8177 | If the "ip wccp redirect exclude in" command has been | |
| 8178 | enabled on the cache interface, then it is still safe for | |
| 8179 | the proxy server to use a l2 redirect method even if this | |
| 8180 | option is set to GRE. | |
| 8181 | DOC_END | |
| 8182 | ||
| 8183 | NAME: wccp2_assignment_method | |
| 8184 | TYPE: wccp2_amethod | |
| 8185 | LOC: Config.Wccp2.assignment_method | |
| 8186 | DEFAULT: hash | |
| 8187 | IFDEF: USE_WCCPv2 | |
| 8188 | DOC_START | |
| 8189 | WCCP2 allows the setting of methods to assign the WCCP hash | |
| 8190 | Valid values are as follows: | |
| 8191 | ||
| 8192 | hash - Hash assignment | |
| 8193 | mask - Mask assignment | |
| 8194 | ||
| 8195 | As a general rule, cisco routers support the hash assignment method | |
| 8196 | and cisco switches support the mask assignment method. | |
| 8197 | DOC_END | |
| 8198 | ||
| 8199 | NAME: wccp2_service | |
| 8200 | TYPE: wccp2_service | |
| 8201 | LOC: Config.Wccp2.info | |
| 8202 | DEFAULT_IF_NONE: standard 0 | |
| 8203 | DEFAULT_DOC: Use the 'web-cache' standard service. | |
| 8204 | IFDEF: USE_WCCPv2 | |
| 8205 | DOC_START | |
| 8206 | WCCP2 allows for multiple traffic services. There are two | |
| 8207 | types: "standard" and "dynamic". The standard type defines | |
| 8208 | one service id - http (id 0). The dynamic service ids can be from | |
| 8209 | 51 to 255 inclusive. In order to use a dynamic service id | |
| 8210 | one must define the type of traffic to be redirected; this is done | |
| 8211 | using the wccp2_service_info option. | |
| 8212 | ||
| 8213 | The "standard" type does not require a wccp2_service_info option, | |
| 8214 | just specifying the service id will suffice. | |
| 8215 | ||
| 8216 | MD5 service authentication can be enabled by adding | |
| 8217 | "password=<password>" to the end of this service declaration. | |
| 8218 | ||
| 8219 | Examples: | |
| 8220 | ||
| 8221 | wccp2_service standard 0 # for the 'web-cache' standard service | |
| 8222 | wccp2_service dynamic 80 # a dynamic service type which will be | |
| 8223 | # fleshed out with subsequent options. | |
| 8224 | wccp2_service standard 0 password=foo | |
| 8225 | DOC_END | |
| 8226 | ||
| 8227 | NAME: wccp2_service_info | |
| 8228 | TYPE: wccp2_service_info | |
| 8229 | LOC: Config.Wccp2.info | |
| 8230 | DEFAULT: none | |
| 8231 | IFDEF: USE_WCCPv2 | |
| 8232 | DOC_START | |
| 8233 | Dynamic WCCPv2 services require further information to define the | |
| 8234 | traffic you wish to have diverted. | |
| 8235 | ||
| 8236 | The format is: | |
| 8237 | ||
| 8238 | wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>.. | |
| 8239 | priority=<priority> ports=<port>,<port>.. | |
| 8240 | ||
| 8241 | The relevant WCCPv2 flags: | |
| 8242 | + src_ip_hash, dst_ip_hash | |
| 8243 | + source_port_hash, dst_port_hash | |
| 8244 | + src_ip_alt_hash, dst_ip_alt_hash | |
| 8245 | + src_port_alt_hash, dst_port_alt_hash | |
| 8246 | + ports_source | |
| 8247 | ||
| 8248 | The port list can be one to eight entries. | |
| 8249 | ||
| 8250 | Example: | |
| 8251 | ||
| 8252 | wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source | |
| 8253 | priority=240 ports=80 | |
| 8254 | ||
| 8255 | Note: the service id must have been defined by a previous | |
| 8256 | 'wccp2_service dynamic <id>' entry. | |
| 8257 | DOC_END | |
| 8258 | ||
| 8259 | NAME: wccp2_weight | |
| 8260 | TYPE: int | |
| 8261 | LOC: Config.Wccp2.weight | |
| 8262 | DEFAULT: 10000 | |
| 8263 | IFDEF: USE_WCCPv2 | |
| 8264 | DOC_START | |
| 8265 | Each cache server gets assigned a set of the destination | |
| 8266 | hash proportional to their weight. | |
| 8267 | DOC_END | |
| 8268 | ||
| 8269 | NAME: wccp_address | |
| 8270 | TYPE: address | |
| 8271 | LOC: Config.Wccp.address | |
| 8272 | DEFAULT: 0.0.0.0 | |
| 8273 | DEFAULT_DOC: Address selected by the operating system. | |
| 8274 | IFDEF: USE_WCCP | |
| 8275 | DOC_START | |
| 8276 | Use this option if you require WCCP(v1) to use a specific | |
| 8277 | interface address. | |
| 8278 | ||
| 8279 | The default behavior is to not bind to any specific address. | |
| 8280 | DOC_END | |
| 8281 | ||
| 8282 | NAME: wccp2_address | |
| 8283 | TYPE: address | |
| 8284 | LOC: Config.Wccp2.address | |
| 8285 | DEFAULT: 0.0.0.0 | |
| 8286 | DEFAULT_DOC: Address selected by the operating system. | |
| 8287 | IFDEF: USE_WCCPv2 | |
| 8288 | DOC_START | |
| 8289 | Use this option if you require WCCPv2 to use a specific | |
| 8290 | interface address. | |
| 8291 | ||
| 8292 | The default behavior is to not bind to any specific address. | |
| 8293 | DOC_END | |
| 8294 | ||
| 8295 | COMMENT_START | |
| 8296 | PERSISTENT CONNECTION HANDLING | |
| 8297 | ----------------------------------------------------------------------------- | |
| 8298 | ||
| 8299 | Also see "pconn_timeout" in the TIMEOUTS section | |
| 8300 | COMMENT_END | |
| 8301 | ||
| 8302 | NAME: client_persistent_connections | |
| 8303 | TYPE: onoff | |
| 8304 | LOC: Config.onoff.client_pconns | |
| 8305 | DEFAULT: on | |
| 8306 | DOC_START | |
| 8307 | Persistent connection support for clients. | |
| 8308 | Squid uses persistent connections (when allowed). You can use | |
| 8309 | this option to disable persistent connections with clients. | |
| 8310 | DOC_END | |
| 8311 | ||
| 8312 | NAME: server_persistent_connections | |
| 8313 | TYPE: onoff | |
| 8314 | LOC: Config.onoff.server_pconns | |
| 8315 | DEFAULT: on | |
| 8316 | DOC_START | |
| 8317 | Persistent connection support for servers. | |
| 8318 | Squid uses persistent connections (when allowed). You can use | |
| 8319 | this option to disable persistent connections with servers. | |
| 8320 | DOC_END | |
| 8321 | ||
| 8322 | NAME: persistent_connection_after_error | |
| 8323 | TYPE: onoff | |
| 8324 | LOC: Config.onoff.error_pconns | |
| 8325 | DEFAULT: on | |
| 8326 | DOC_START | |
| 8327 | With this directive the use of persistent connections after | |
| 8328 | HTTP errors can be disabled. Useful if you have clients | |
| 8329 | who fail to handle errors on persistent connections proper. | |
| 8330 | DOC_END | |
| 8331 | ||
| 8332 | NAME: detect_broken_pconn | |
| 8333 | TYPE: onoff | |
| 8334 | LOC: Config.onoff.detect_broken_server_pconns | |
| 8335 | DEFAULT: off | |
| 8336 | DOC_START | |
| 8337 | Some servers have been found to incorrectly signal the use | |
| 8338 | of HTTP/1.0 persistent connections even on replies not | |
| 8339 | compatible, causing significant delays. This server problem | |
| 8340 | has mostly been seen on redirects. | |
| 8341 | ||
| 8342 | By enabling this directive Squid attempts to detect such | |
| 8343 | broken replies and automatically assume the reply is finished | |
| 8344 | after 10 seconds timeout. | |
| 8345 | DOC_END | |
| 8346 | ||
| 8347 | COMMENT_START | |
| 8348 | CACHE DIGEST OPTIONS | |
| 8349 | ----------------------------------------------------------------------------- | |
| 8350 | COMMENT_END | |
| 8351 | ||
| 8352 | NAME: digest_generation | |
| 8353 | IFDEF: USE_CACHE_DIGESTS | |
| 8354 | TYPE: onoff | |
| 8355 | LOC: Config.onoff.digest_generation | |
| 8356 | DEFAULT: on | |
| 8357 | DOC_START | |
| 8358 | This controls whether the server will generate a Cache Digest | |
| 8359 | of its contents. By default, Cache Digest generation is | |
| 8360 | enabled if Squid is compiled with --enable-cache-digests defined. | |
| 8361 | DOC_END | |
| 8362 | ||
| 8363 | NAME: digest_bits_per_entry | |
| 8364 | IFDEF: USE_CACHE_DIGESTS | |
| 8365 | TYPE: int | |
| 8366 | LOC: Config.digest.bits_per_entry | |
| 8367 | DEFAULT: 5 | |
| 8368 | DOC_START | |
| 8369 | This is the number of bits of the server's Cache Digest which | |
| 8370 | will be associated with the Digest entry for a given HTTP | |
| 8371 | Method and URL (public key) combination. The default is 5. | |
| 8372 | DOC_END | |
| 8373 | ||
| 8374 | NAME: digest_rebuild_period | |
| 8375 | IFDEF: USE_CACHE_DIGESTS | |
| 8376 | COMMENT: (seconds) | |
| 8377 | TYPE: time_t | |
| 8378 | LOC: Config.digest.rebuild_period | |
| 8379 | DEFAULT: 1 hour | |
| 8380 | DOC_START | |
| 8381 | This is the wait time between Cache Digest rebuilds. | |
| 8382 | DOC_END | |
| 8383 | ||
| 8384 | NAME: digest_rewrite_period | |
| 8385 | COMMENT: (seconds) | |
| 8386 | IFDEF: USE_CACHE_DIGESTS | |
| 8387 | TYPE: time_t | |
| 8388 | LOC: Config.digest.rewrite_period | |
| 8389 | DEFAULT: 1 hour | |
| 8390 | DOC_START | |
| 8391 | This is the wait time between Cache Digest writes to | |
| 8392 | disk. | |
| 8393 | DOC_END | |
| 8394 | ||
| 8395 | NAME: digest_swapout_chunk_size | |
| 8396 | COMMENT: (bytes) | |
| 8397 | TYPE: b_size_t | |
| 8398 | IFDEF: USE_CACHE_DIGESTS | |
| 8399 | LOC: Config.digest.swapout_chunk_size | |
| 8400 | DEFAULT: 4096 bytes | |
| 8401 | DOC_START | |
| 8402 | This is the number of bytes of the Cache Digest to write to | |
| 8403 | disk at a time. It defaults to 4096 bytes (4KB), the Squid | |
| 8404 | default swap page. | |
| 8405 | DOC_END | |
| 8406 | ||
| 8407 | NAME: digest_rebuild_chunk_percentage | |
| 8408 | COMMENT: (percent, 0-100) | |
| 8409 | IFDEF: USE_CACHE_DIGESTS | |
| 8410 | TYPE: int | |
| 8411 | LOC: Config.digest.rebuild_chunk_percentage | |
| 8412 | DEFAULT: 10 | |
| 8413 | DOC_START | |
| 8414 | This is the percentage of the Cache Digest to be scanned at a | |
| 8415 | time. By default it is set to 10% of the Cache Digest. | |
| 8416 | DOC_END | |
| 8417 | ||
| 8418 | COMMENT_START | |
| 8419 | SNMP OPTIONS | |
| 8420 | ----------------------------------------------------------------------------- | |
| 8421 | COMMENT_END | |
| 8422 | ||
| 8423 | NAME: snmp_port | |
| 8424 | TYPE: u_short | |
| 8425 | LOC: Config.Port.snmp | |
| 8426 | DEFAULT: 0 | |
| 8427 | DEFAULT_DOC: SNMP disabled. | |
| 8428 | IFDEF: SQUID_SNMP | |
| 8429 | DOC_START | |
| 8430 | The port number where Squid listens for SNMP requests. To enable | |
| 8431 | SNMP support set this to a suitable port number. Port number | |
| 8432 | 3401 is often used for the Squid SNMP agent. By default it's | |
| 8433 | set to "0" (disabled) | |
| 8434 | ||
| 8435 | Example: | |
| 8436 | snmp_port 3401 | |
| 8437 | DOC_END | |
| 8438 | ||
| 8439 | NAME: snmp_access | |
| 8440 | TYPE: acl_access | |
| 8441 | LOC: Config.accessList.snmp | |
| 8442 | DEFAULT: none | |
| 8443 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
| 8444 | IFDEF: SQUID_SNMP | |
| 8445 | DOC_START | |
| 8446 | Allowing or denying access to the SNMP port. | |
| 8447 | ||
| 8448 | All access to the agent is denied by default. | |
| 8449 | usage: | |
| 8450 | ||
| 8451 | snmp_access allow|deny [!]aclname ... | |
| 8452 | ||
| 8453 | This clause only supports fast acl types. | |
| 8454 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 8455 | ||
| 8456 | Example: | |
| 8457 | snmp_access allow snmppublic localhost | |
| 8458 | snmp_access deny all | |
| 8459 | DOC_END | |
| 8460 | ||
| 8461 | NAME: snmp_incoming_address | |
| 8462 | TYPE: address | |
| 8463 | LOC: Config.Addrs.snmp_incoming | |
| 8464 | DEFAULT: any_addr | |
| 8465 | DEFAULT_DOC: Accept SNMP packets from all machine interfaces. | |
| 8466 | IFDEF: SQUID_SNMP | |
| 8467 | DOC_START | |
| 8468 | Just like 'udp_incoming_address', but for the SNMP port. | |
| 8469 | ||
| 8470 | snmp_incoming_address is used for the SNMP socket receiving | |
| 8471 | messages from SNMP agents. | |
| 8472 | ||
| 8473 | The default snmp_incoming_address is to listen on all | |
| 8474 | available network interfaces. | |
| 8475 | DOC_END | |
| 8476 | ||
| 8477 | NAME: snmp_outgoing_address | |
| 8478 | TYPE: address | |
| 8479 | LOC: Config.Addrs.snmp_outgoing | |
| 8480 | DEFAULT: no_addr | |
| 8481 | DEFAULT_DOC: Use snmp_incoming_address or an address selected by the operating system. | |
| 8482 | IFDEF: SQUID_SNMP | |
| 8483 | DOC_START | |
| 8484 | Just like 'udp_outgoing_address', but for the SNMP port. | |
| 8485 | ||
| 8486 | snmp_outgoing_address is used for SNMP packets returned to SNMP | |
| 8487 | agents. | |
| 8488 | ||
| 8489 | If snmp_outgoing_address is not set it will use the same socket | |
| 8490 | as snmp_incoming_address. Only change this if you want to have | |
| 8491 | SNMP replies sent using another address than where this Squid | |
| 8492 | listens for SNMP queries. | |
| 8493 | ||
| 8494 | NOTE, snmp_incoming_address and snmp_outgoing_address can not have | |
| 8495 | the same value since they both use the same port. | |
| 8496 | DOC_END | |
| 8497 | ||
| 8498 | COMMENT_START | |
| 8499 | ICP OPTIONS | |
| 8500 | ----------------------------------------------------------------------------- | |
| 8501 | COMMENT_END | |
| 8502 | ||
| 8503 | NAME: icp_port udp_port | |
| 8504 | TYPE: u_short | |
| 8505 | DEFAULT: 0 | |
| 8506 | DEFAULT_DOC: ICP disabled. | |
| 8507 | LOC: Config.Port.icp | |
| 8508 | DOC_START | |
| 8509 | The port number where Squid sends and receives ICP queries to | |
| 8510 | and from neighbor caches. The standard UDP port for ICP is 3130. | |
| 8511 | ||
| 8512 | Example: | |
| 8513 | icp_port 3130 | |
| 8514 | DOC_END | |
| 8515 | ||
| 8516 | NAME: htcp_port | |
| 8517 | IFDEF: USE_HTCP | |
| 8518 | TYPE: u_short | |
| 8519 | DEFAULT: 0 | |
| 8520 | DEFAULT_DOC: HTCP disabled. | |
| 8521 | LOC: Config.Port.htcp | |
| 8522 | DOC_START | |
| 8523 | The port number where Squid sends and receives HTCP queries to | |
| 8524 | and from neighbor caches. To turn it on you want to set it to | |
| 8525 | 4827. | |
| 8526 | ||
| 8527 | Example: | |
| 8528 | htcp_port 4827 | |
| 8529 | DOC_END | |
| 8530 | ||
| 8531 | NAME: log_icp_queries | |
| 8532 | COMMENT: on|off | |
| 8533 | TYPE: onoff | |
| 8534 | DEFAULT: on | |
| 8535 | LOC: Config.onoff.log_udp | |
| 8536 | DOC_START | |
| 8537 | If set, ICP queries are logged to access.log. You may wish | |
| 8538 | do disable this if your ICP load is VERY high to speed things | |
| 8539 | up or to simplify log analysis. | |
| 8540 | DOC_END | |
| 8541 | ||
| 8542 | NAME: udp_incoming_address | |
| 8543 | TYPE: address | |
| 8544 | LOC:Config.Addrs.udp_incoming | |
| 8545 | DEFAULT: any_addr | |
| 8546 | DEFAULT_DOC: Accept packets from all machine interfaces. | |
| 8547 | DOC_START | |
| 8548 | udp_incoming_address is used for UDP packets received from other | |
| 8549 | caches. | |
| 8550 | ||
| 8551 | The default behavior is to not bind to any specific address. | |
| 8552 | ||
| 8553 | Only change this if you want to have all UDP queries received on | |
| 8554 | a specific interface/address. | |
| 8555 | ||
| 8556 | NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS | |
| 8557 | modules. Altering it will affect all of them in the same manner. | |
| 8558 | ||
| 8559 | see also; udp_outgoing_address | |
| 8560 | ||
| 8561 | NOTE, udp_incoming_address and udp_outgoing_address can not | |
| 8562 | have the same value since they both use the same port. | |
| 8563 | DOC_END | |
| 8564 | ||
| 8565 | NAME: udp_outgoing_address | |
| 8566 | TYPE: address | |
| 8567 | LOC: Config.Addrs.udp_outgoing | |
| 8568 | DEFAULT: no_addr | |
| 8569 | DEFAULT_DOC: Use udp_incoming_address or an address selected by the operating system. | |
| 8570 | DOC_START | |
| 8571 | udp_outgoing_address is used for UDP packets sent out to other | |
| 8572 | caches. | |
| 8573 | ||
| 8574 | The default behavior is to not bind to any specific address. | |
| 8575 | ||
| 8576 | Instead it will use the same socket as udp_incoming_address. | |
| 8577 | Only change this if you want to have UDP queries sent using another | |
| 8578 | address than where this Squid listens for UDP queries from other | |
| 8579 | caches. | |
| 8580 | ||
| 8581 | NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS | |
| 8582 | modules. Altering it will affect all of them in the same manner. | |
| 8583 | ||
| 8584 | see also; udp_incoming_address | |
| 8585 | ||
| 8586 | NOTE, udp_incoming_address and udp_outgoing_address can not | |
| 8587 | have the same value since they both use the same port. | |
| 8588 | DOC_END | |
| 8589 | ||
| 8590 | NAME: icp_hit_stale | |
| 8591 | COMMENT: on|off | |
| 8592 | TYPE: onoff | |
| 8593 | DEFAULT: off | |
| 8594 | LOC: Config.onoff.icp_hit_stale | |
| 8595 | DOC_START | |
| 8596 | If you want to return ICP_HIT for stale cache objects, set this | |
| 8597 | option to 'on'. If you have sibling relationships with caches | |
| 8598 | in other administrative domains, this should be 'off'. If you only | |
| 8599 | have sibling relationships with caches under your control, | |
| 8600 | it is probably okay to set this to 'on'. | |
| 8601 | If set to 'on', your siblings should use the option "allow-miss" | |
| 8602 | on their cache_peer lines for connecting to you. | |
| 8603 | DOC_END | |
| 8604 | ||
| 8605 | NAME: minimum_direct_hops | |
| 8606 | TYPE: int | |
| 8607 | DEFAULT: 4 | |
| 8608 | LOC: Config.minDirectHops | |
| 8609 | DOC_START | |
| 8610 | If using the ICMP pinging stuff, do direct fetches for sites | |
| 8611 | which are no more than this many hops away. | |
| 8612 | DOC_END | |
| 8613 | ||
| 8614 | NAME: minimum_direct_rtt | |
| 8615 | COMMENT: (msec) | |
| 8616 | TYPE: int | |
| 8617 | DEFAULT: 400 | |
| 8618 | LOC: Config.minDirectRtt | |
| 8619 | DOC_START | |
| 8620 | If using the ICMP pinging stuff, do direct fetches for sites | |
| 8621 | which are no more than this many rtt milliseconds away. | |
| 8622 | DOC_END | |
| 8623 | ||
| 8624 | NAME: netdb_low | |
| 8625 | TYPE: int | |
| 8626 | DEFAULT: 900 | |
| 8627 | LOC: Config.Netdb.low | |
| 8628 | DOC_START | |
| 8629 | The low water mark for the ICMP measurement database. | |
| 8630 | ||
| 8631 | Note: high watermark controlled by netdb_high directive. | |
| 8632 | ||
| 8633 | These watermarks are counts, not percents. The defaults are | |
| 8634 | (low) 900 and (high) 1000. When the high water mark is | |
| 8635 | reached, database entries will be deleted until the low | |
| 8636 | mark is reached. | |
| 8637 | DOC_END | |
| 8638 | ||
| 8639 | NAME: netdb_high | |
| 8640 | TYPE: int | |
| 8641 | DEFAULT: 1000 | |
| 8642 | LOC: Config.Netdb.high | |
| 8643 | DOC_START | |
| 8644 | The high water mark for the ICMP measurement database. | |
| 8645 | ||
| 8646 | Note: low watermark controlled by netdb_low directive. | |
| 8647 | ||
| 8648 | These watermarks are counts, not percents. The defaults are | |
| 8649 | (low) 900 and (high) 1000. When the high water mark is | |
| 8650 | reached, database entries will be deleted until the low | |
| 8651 | mark is reached. | |
| 8652 | DOC_END | |
| 8653 | ||
| 8654 | NAME: netdb_ping_period | |
| 8655 | TYPE: time_t | |
| 8656 | LOC: Config.Netdb.period | |
| 8657 | DEFAULT: 5 minutes | |
| 8658 | DOC_START | |
| 8659 | The minimum period for measuring a site. There will be at | |
| 8660 | least this much delay between successive pings to the same | |
| 8661 | network. The default is five minutes. | |
| 8662 | DOC_END | |
| 8663 | ||
| 8664 | NAME: query_icmp | |
| 8665 | COMMENT: on|off | |
| 8666 | TYPE: onoff | |
| 8667 | DEFAULT: off | |
| 8668 | LOC: Config.onoff.query_icmp | |
| 8669 | DOC_START | |
| 8670 | If you want to ask your peers to include ICMP data in their ICP | |
| 8671 | replies, enable this option. | |
| 8672 | ||
| 8673 | If your peer has configured Squid (during compilation) with | |
| 8674 | '--enable-icmp' that peer will send ICMP pings to origin server | |
| 8675 | sites of the URLs it receives. If you enable this option the | |
| 8676 | ICP replies from that peer will include the ICMP data (if available). | |
| 8677 | Then, when choosing a parent cache, Squid will choose the parent with | |
| 8678 | the minimal RTT to the origin server. When this happens, the | |
| 8679 | hierarchy field of the access.log will be | |
| 8680 | "CLOSEST_PARENT_MISS". This option is off by default. | |
| 8681 | DOC_END | |
| 8682 | ||
| 8683 | NAME: test_reachability | |
| 8684 | COMMENT: on|off | |
| 8685 | TYPE: onoff | |
| 8686 | DEFAULT: off | |
| 8687 | LOC: Config.onoff.test_reachability | |
| 8688 | DOC_START | |
| 8689 | When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH | |
| 8690 | instead of ICP_MISS if the target host is NOT in the ICMP | |
| 8691 | database, or has a zero RTT. | |
| 8692 | DOC_END | |
| 8693 | ||
| 8694 | NAME: icp_query_timeout | |
| 8695 | COMMENT: (msec) | |
| 8696 | DEFAULT: 0 | |
| 8697 | DEFAULT_DOC: Dynamic detection. | |
| 8698 | TYPE: int | |
| 8699 | LOC: Config.Timeout.icp_query | |
| 8700 | DOC_START | |
| 8701 | Normally Squid will automatically determine an optimal ICP | |
| 8702 | query timeout value based on the round-trip-time of recent ICP | |
| 8703 | queries. If you want to override the value determined by | |
| 8704 | Squid, set this 'icp_query_timeout' to a non-zero value. This | |
| 8705 | value is specified in MILLISECONDS, so, to use a 2-second | |
| 8706 | timeout (the old default), you would write: | |
| 8707 | ||
| 8708 | icp_query_timeout 2000 | |
| 8709 | DOC_END | |
| 8710 | ||
| 8711 | NAME: maximum_icp_query_timeout | |
| 8712 | COMMENT: (msec) | |
| 8713 | DEFAULT: 2000 | |
| 8714 | TYPE: int | |
| 8715 | LOC: Config.Timeout.icp_query_max | |
| 8716 | DOC_START | |
| 8717 | Normally the ICP query timeout is determined dynamically. But | |
| 8718 | sometimes it can lead to very large values (say 5 seconds). | |
| 8719 | Use this option to put an upper limit on the dynamic timeout | |
| 8720 | value. Do NOT use this option to always use a fixed (instead | |
| 8721 | of a dynamic) timeout value. To set a fixed timeout see the | |
| 8722 | 'icp_query_timeout' directive. | |
| 8723 | DOC_END | |
| 8724 | ||
| 8725 | NAME: minimum_icp_query_timeout | |
| 8726 | COMMENT: (msec) | |
| 8727 | DEFAULT: 5 | |
| 8728 | TYPE: int | |
| 8729 | LOC: Config.Timeout.icp_query_min | |
| 8730 | DOC_START | |
| 8731 | Normally the ICP query timeout is determined dynamically. But | |
| 8732 | sometimes it can lead to very small timeouts, even lower than | |
| 8733 | the normal latency variance on your link due to traffic. | |
| 8734 | Use this option to put an lower limit on the dynamic timeout | |
| 8735 | value. Do NOT use this option to always use a fixed (instead | |
| 8736 | of a dynamic) timeout value. To set a fixed timeout see the | |
| 8737 | 'icp_query_timeout' directive. | |
| 8738 | DOC_END | |
| 8739 | ||
| 8740 | NAME: background_ping_rate | |
| 8741 | COMMENT: time-units | |
| 8742 | TYPE: time_t | |
| 8743 | DEFAULT: 10 seconds | |
| 8744 | LOC: Config.backgroundPingRate | |
| 8745 | DOC_START | |
| 8746 | Controls how often the ICP pings are sent to siblings that | |
| 8747 | have background-ping set. | |
| 8748 | DOC_END | |
| 8749 | ||
| 8750 | COMMENT_START | |
| 8751 | MULTICAST ICP OPTIONS | |
| 8752 | ----------------------------------------------------------------------------- | |
| 8753 | COMMENT_END | |
| 8754 | ||
| 8755 | NAME: mcast_groups | |
| 8756 | TYPE: wordlist | |
| 8757 | LOC: Config.mcast_group_list | |
| 8758 | DEFAULT: none | |
| 8759 | DOC_START | |
| 8760 | This tag specifies a list of multicast groups which your server | |
| 8761 | should join to receive multicasted ICP queries. | |
| 8762 | ||
| 8763 | NOTE! Be very careful what you put here! Be sure you | |
| 8764 | understand the difference between an ICP _query_ and an ICP | |
| 8765 | _reply_. This option is to be set only if you want to RECEIVE | |
| 8766 | multicast queries. Do NOT set this option to SEND multicast | |
| 8767 | ICP (use cache_peer for that). ICP replies are always sent via | |
| 8768 | unicast, so this option does not affect whether or not you will | |
| 8769 | receive replies from multicast group members. | |
| 8770 | ||
| 8771 | You must be very careful to NOT use a multicast address which | |
| 8772 | is already in use by another group of caches. | |
| 8773 | ||
| 8774 | If you are unsure about multicast, please read the Multicast | |
| 8775 | chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/). | |
| 8776 | ||
| 8777 | Usage: mcast_groups 239.128.16.128 224.0.1.20 | |
| 8778 | ||
| 8779 | By default, Squid doesn't listen on any multicast groups. | |
| 8780 | DOC_END | |
| 8781 | ||
| 8782 | NAME: mcast_icp_query_timeout | |
| 8783 | COMMENT: (msec) | |
| 8784 | DEFAULT: 2000 | |
| 8785 | TYPE: int | |
| 8786 | LOC: Config.Timeout.mcast_icp_query | |
| 8787 | DOC_START | |
| 8788 | For multicast peers, Squid regularly sends out ICP "probes" to | |
| 8789 | count how many other peers are listening on the given multicast | |
| 8790 | address. This value specifies how long Squid should wait to | |
| 8791 | count all the replies. The default is 2000 msec, or 2 | |
| 8792 | seconds. | |
| 8793 | DOC_END | |
| 8794 | ||
| 8795 | COMMENT_START | |
| 8796 | INTERNAL ICON OPTIONS | |
| 8797 | ----------------------------------------------------------------------------- | |
| 8798 | COMMENT_END | |
| 8799 | ||
| 8800 | NAME: icon_directory | |
| 8801 | TYPE: string | |
| 8802 | LOC: Config.icons.directory | |
| 8803 | DEFAULT: @DEFAULT_ICON_DIR@ | |
| 8804 | DOC_START | |
| 8805 | Where the icons are stored. These are normally kept in | |
| 8806 | @DEFAULT_ICON_DIR@ | |
| 8807 | DOC_END | |
| 8808 | ||
| 8809 | NAME: global_internal_static | |
| 8810 | TYPE: onoff | |
| 8811 | LOC: Config.onoff.global_internal_static | |
| 8812 | DEFAULT: on | |
| 8813 | DOC_START | |
| 8814 | This directive controls is Squid should intercept all requests for | |
| 8815 | /squid-internal-static/ no matter which host the URL is requesting | |
| 8816 | (default on setting), or if nothing special should be done for | |
| 8817 | such URLs (off setting). The purpose of this directive is to make | |
| 8818 | icons etc work better in complex cache hierarchies where it may | |
| 8819 | not always be possible for all corners in the cache mesh to reach | |
| 8820 | the server generating a directory listing. | |
| 8821 | DOC_END | |
| 8822 | ||
| 8823 | NAME: short_icon_urls | |
| 8824 | TYPE: onoff | |
| 8825 | LOC: Config.icons.use_short_names | |
| 8826 | DEFAULT: on | |
| 8827 | DOC_START | |
| 8828 | If this is enabled Squid will use short URLs for icons. | |
| 8829 | If disabled it will revert to the old behavior of including | |
| 8830 | it's own name and port in the URL. | |
| 8831 | ||
| 8832 | If you run a complex cache hierarchy with a mix of Squid and | |
| 8833 | other proxies you may need to disable this directive. | |
| 8834 | DOC_END | |
| 8835 | ||
| 8836 | COMMENT_START | |
| 8837 | ERROR PAGE OPTIONS | |
| 8838 | ----------------------------------------------------------------------------- | |
| 8839 | COMMENT_END | |
| 8840 | ||
| 8841 | NAME: error_directory | |
| 8842 | TYPE: string | |
| 8843 | LOC: Config.errorDirectory | |
| 8844 | DEFAULT: none | |
| 8845 | DEFAULT_DOC: Send error pages in the clients preferred language | |
| 8846 | DOC_START | |
| 8847 | If you wish to create your own versions of the default | |
| 8848 | error files to customize them to suit your company copy | |
| 8849 | the error/template files to another directory and point | |
| 8850 | this tag at them. | |
| 8851 | ||
| 8852 | WARNING: This option will disable multi-language support | |
| 8853 | on error pages if used. | |
| 8854 | ||
| 8855 | The squid developers are interested in making squid available in | |
| 8856 | a wide variety of languages. If you are making translations for a | |
| 8857 | language that Squid does not currently provide please consider | |
| 8858 | contributing your translation back to the project. | |
| 8859 | https://wiki.squid-cache.org/Translations | |
| 8860 | ||
| 8861 | The squid developers working on translations are happy to supply drop-in | |
| 8862 | translated error files in exchange for any new language contributions. | |
| 8863 | DOC_END | |
| 8864 | ||
| 8865 | NAME: error_default_language | |
| 8866 | IFDEF: USE_ERR_LOCALES | |
| 8867 | TYPE: string | |
| 8868 | LOC: Config.errorDefaultLanguage | |
| 8869 | DEFAULT: none | |
| 8870 | DEFAULT_DOC: Generate English language pages. | |
| 8871 | DOC_START | |
| 8872 | Set the default language which squid will send error pages in | |
| 8873 | if no existing translation matches the clients language | |
| 8874 | preferences. | |
| 8875 | ||
| 8876 | If unset (default) generic English will be used. | |
| 8877 | ||
| 8878 | The squid developers are interested in making squid available in | |
| 8879 | a wide variety of languages. If you are interested in making | |
| 8880 | translations for any language see the squid wiki for details. | |
| 8881 | https://wiki.squid-cache.org/Translations | |
| 8882 | DOC_END | |
| 8883 | ||
| 8884 | NAME: error_log_languages | |
| 8885 | IFDEF: USE_ERR_LOCALES | |
| 8886 | TYPE: onoff | |
| 8887 | LOC: Config.errorLogMissingLanguages | |
| 8888 | DEFAULT: on | |
| 8889 | DOC_START | |
| 8890 | Log to cache.log what languages users are attempting to | |
| 8891 | auto-negotiate for translations. | |
| 8892 | ||
| 8893 | Successful negotiations are not logged. Only failures | |
| 8894 | have meaning to indicate that Squid may need an upgrade | |
| 8895 | of its error page translations. | |
| 8896 | DOC_END | |
| 8897 | ||
| 8898 | NAME: err_page_stylesheet | |
| 8899 | TYPE: string | |
| 8900 | LOC: Config.errorStylesheet | |
| 8901 | DEFAULT: @DEFAULT_CONFIG_DIR@/errorpage.css | |
| 8902 | DOC_START | |
| 8903 | CSS Stylesheet to pattern the display of Squid default error pages. | |
| 8904 | ||
| 8905 | For information on CSS see http://www.w3.org/Style/CSS/ | |
| 8906 | DOC_END | |
| 8907 | ||
| 8908 | NAME: err_html_text | |
| 8909 | TYPE: eol | |
| 8910 | LOC: Config.errHtmlText | |
| 8911 | DEFAULT: none | |
| 8912 | DOC_START | |
| 8913 | HTML text to include in error messages. Make this a "mailto" | |
| 8914 | URL to your admin address, or maybe just a link to your | |
| 8915 | organizations Web page. | |
| 8916 | ||
| 8917 | To include this in your error messages, you must rewrite | |
| 8918 | the error template files (found in the "errors" directory). | |
| 8919 | Wherever you want the 'err_html_text' line to appear, | |
| 8920 | insert a %L tag in the error template file. | |
| 8921 | DOC_END | |
| 8922 | ||
| 8923 | NAME: email_err_data | |
| 8924 | COMMENT: on|off | |
| 8925 | TYPE: onoff | |
| 8926 | LOC: Config.onoff.emailErrData | |
| 8927 | DEFAULT: off | |
| 8928 | DOC_START | |
| 8929 | If enabled, information about the occurred error will be | |
| 8930 | included in the mailto links of the ERR pages (if %W is set) | |
| 8931 | so that the email body contains the data. | |
| 8932 | Syntax is <A HREF="mailto:%w%W">%w</A> | |
| 8933 | ||
| 8934 | SECURITY WARNING: | |
| 8935 | Request headers and other included facts may contain | |
| 8936 | sensitive information about transaction history, the | |
| 8937 | Squid instance, and its environment which would be | |
| 8938 | unavailable to error recipients otherwise. | |
| 8939 | DOC_END | |
| 8940 | ||
| 8941 | NAME: deny_info | |
| 8942 | TYPE: denyinfo | |
| 8943 | LOC: Config.denyInfoList | |
| 8944 | DEFAULT: none | |
| 8945 | DOC_START | |
| 8946 | Usage: deny_info err_page_name acl | |
| 8947 | or deny_info http://... acl | |
| 8948 | or deny_info TCP_RESET acl | |
| 8949 | ||
| 8950 | This can be used to return a ERR_ page for requests which | |
| 8951 | do not pass the 'http_access' rules. Squid remembers the last | |
| 8952 | acl it evaluated in http_access, and if a 'deny_info' line exists | |
| 8953 | for that ACL Squid returns a corresponding error page. | |
| 8954 | ||
| 8955 | The acl is typically the last acl on the http_access deny line which | |
| 8956 | denied access. The exceptions to this rule are: | |
| 8957 | - When Squid needs to request authentication credentials. It's then | |
| 8958 | the first authentication related acl encountered | |
| 8959 | - When none of the http_access lines matches. It's then the last | |
| 8960 | acl processed on the last http_access line. | |
| 8961 | - When the decision to deny access was made by an adaptation service, | |
| 8962 | the acl name is the corresponding eCAP or ICAP service_name. | |
| 8963 | ||
| 8964 | NP: If providing your own custom error pages with error_directory | |
| 8965 | you may also specify them by your custom file name: | |
| 8966 | Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys | |
| 8967 | ||
| 8968 | By default Squid will send "403 Forbidden". A different 4xx or 5xx | |
| 8969 | may be specified by prefixing the file name with the code and a colon. | |
| 8970 | e.g. 404:ERR_CUSTOM_ACCESS_DENIED | |
| 8971 | ||
| 8972 | Alternatively you can tell Squid to reset the TCP connection | |
| 8973 | by specifying TCP_RESET. | |
| 8974 | ||
| 8975 | Or you can specify an error URL or URL pattern. The browsers will | |
| 8976 | get redirected to the specified URL after formatting tags have | |
| 8977 | been replaced. Redirect will be done with 302 or 307 according to | |
| 8978 | HTTP/1.1 specs. A different 3xx code may be specified by prefixing | |
| 8979 | the URL. e.g. 303:http://example.com/ | |
| 8980 | ||
| 8981 | URL FORMAT TAGS: | |
| 8982 | %a - username (if available. Password NOT included) | |
| 8983 | %A - Local listening IP address the client connection was connected to | |
| 8984 | %B - FTP path URL | |
| 8985 | %e - Error number | |
| 8986 | %E - Error description | |
| 8987 | %h - Squid hostname | |
| 8988 | %H - Request domain name | |
| 8989 | %i - Client IP Address | |
| 8990 | %M - Request Method | |
| 8991 | %O - Unescaped message result from external ACL helper | |
| 8992 | %o - Message result from external ACL helper | |
| 8993 | %p - Request Port number | |
| 8994 | %P - Request Protocol name | |
| 8995 | %R - Request URL path | |
| 8996 | %T - Timestamp in RFC 1123 format | |
| 8997 | %U - Full canonical URL from client | |
| 8998 | (HTTPS URLs terminate with *) | |
| 8999 | %u - Full canonical URL from client | |
| 9000 | %w - Admin email from squid.conf | |
| 9001 | %x - Error name | |
| 9002 | %% - Literal percent (%) code | |
| 9003 | ||
| 9004 | DOC_END | |
| 9005 | ||
| 9006 | COMMENT_START | |
| 9007 | OPTIONS INFLUENCING REQUEST FORWARDING | |
| 9008 | ----------------------------------------------------------------------------- | |
| 9009 | COMMENT_END | |
| 9010 | ||
| 9011 | NAME: nonhierarchical_direct | |
| 9012 | TYPE: onoff | |
| 9013 | LOC: Config.onoff.nonhierarchical_direct | |
| 9014 | DEFAULT: on | |
| 9015 | DOC_START | |
| 9016 | By default, Squid will send any non-hierarchical requests | |
| 9017 | (not cacheable request type) direct to origin servers. | |
| 9018 | ||
| 9019 | When this is set to "off", Squid will prefer to send these | |
| 9020 | requests to parents. | |
| 9021 | ||
| 9022 | Note that in most configurations, by turning this off you will only | |
| 9023 | add latency to these request without any improvement in global hit | |
| 9024 | ratio. | |
| 9025 | ||
| 9026 | This option only sets a preference. If the parent is unavailable a | |
| 9027 | direct connection to the origin server may still be attempted. To | |
| 9028 | completely prevent direct connections use never_direct. | |
| 9029 | DOC_END | |
| 9030 | ||
| 9031 | NAME: prefer_direct | |
| 9032 | TYPE: onoff | |
| 9033 | LOC: Config.onoff.prefer_direct | |
| 9034 | DEFAULT: off | |
| 9035 | DOC_START | |
| 9036 | Normally Squid tries to use parents for most requests. If you for some | |
| 9037 | reason like it to first try going direct and only use a parent if | |
| 9038 | going direct fails set this to on. | |
| 9039 | ||
| 9040 | By combining nonhierarchical_direct off and prefer_direct on you | |
| 9041 | can set up Squid to use a parent as a backup path if going direct | |
| 9042 | fails. | |
| 9043 | ||
| 9044 | Note: If you want Squid to use parents for all requests see | |
| 9045 | the never_direct directive. prefer_direct only modifies how Squid | |
| 9046 | acts on cacheable requests. | |
| 9047 | DOC_END | |
| 9048 | ||
| 9049 | NAME: cache_miss_revalidate | |
| 9050 | COMMENT: on|off | |
| 9051 | TYPE: onoff | |
| 9052 | DEFAULT: on | |
| 9053 | LOC: Config.onoff.cache_miss_revalidate | |
| 9054 | DOC_START | |
| 9055 | RFC 7232 defines a conditional request mechanism to prevent | |
| 9056 | response objects being unnecessarily transferred over the network. | |
| 9057 | If that mechanism is used by the client and a cache MISS occurs | |
| 9058 | it can prevent new cache entries being created. | |
| 9059 | ||
| 9060 | This option determines whether Squid on cache MISS will pass the | |
| 9061 | client revalidation request to the server or tries to fetch new | |
| 9062 | content for caching. It can be useful while the cache is mostly | |
| 9063 | empty to more quickly have the cache populated by generating | |
| 9064 | non-conditional GETs. | |
| 9065 | ||
| 9066 | When set to 'on' (default), Squid will pass all client If-* headers | |
| 9067 | to the server. This permits server responses without a cacheable | |
| 9068 | payload to be delivered and on MISS no new cache entry is created. | |
| 9069 | ||
| 9070 | When set to 'off' and if the request is cacheable, Squid will | |
| 9071 | remove the clients If-Modified-Since and If-None-Match headers from | |
| 9072 | the request sent to the server. This requests a 200 status response | |
| 9073 | from the server to create a new cache entry with. | |
| 9074 | DOC_END | |
| 9075 | ||
| 9076 | NAME: always_direct | |
| 9077 | TYPE: acl_access | |
| 9078 | LOC: Config.accessList.AlwaysDirect | |
| 9079 | DEFAULT: none | |
| 9080 | DEFAULT_DOC: Prevent any cache_peer being used for this request. | |
| 9081 | DOC_START | |
| 9082 | Usage: always_direct allow|deny [!]aclname ... | |
| 9083 | ||
| 9084 | Here you can use ACL elements to specify requests which should | |
| 9085 | ALWAYS be forwarded by Squid to the origin servers without using | |
| 9086 | any peers. For example, to always directly forward requests for | |
| 9087 | local servers ignoring any parents or siblings you may have use | |
| 9088 | something like: | |
| 9089 | ||
| 9090 | acl local-servers dstdomain my.domain.net | |
| 9091 | always_direct allow local-servers | |
| 9092 | ||
| 9093 | To always forward FTP requests directly, use | |
| 9094 | ||
| 9095 | acl FTP proto FTP | |
| 9096 | always_direct allow FTP | |
| 9097 | ||
| 9098 | NOTE: There is a similar, but opposite option named | |
| 9099 | 'never_direct'. You need to be aware that "always_direct deny | |
| 9100 | foo" is NOT the same thing as "never_direct allow foo". You | |
| 9101 | may need to use a deny rule to exclude a more-specific case of | |
| 9102 | some other rule. Example: | |
| 9103 | ||
| 9104 | acl local-external dstdomain external.foo.net | |
| 9105 | acl local-servers dstdomain .foo.net | |
| 9106 | always_direct deny local-external | |
| 9107 | always_direct allow local-servers | |
| 9108 | ||
| 9109 | NOTE: If your goal is to make the client forward the request | |
| 9110 | directly to the origin server bypassing Squid then this needs | |
| 9111 | to be done in the client configuration. Squid configuration | |
| 9112 | can only tell Squid how Squid should fetch the object. | |
| 9113 | ||
| 9114 | NOTE: This directive is not related to caching. The replies | |
| 9115 | is cached as usual even if you use always_direct. To not cache | |
| 9116 | the replies see the 'cache' directive. | |
| 9117 | ||
| 9118 | This clause supports both fast and slow acl types. | |
| 9119 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 9120 | DOC_END | |
| 9121 | ||
| 9122 | NAME: never_direct | |
| 9123 | TYPE: acl_access | |
| 9124 | LOC: Config.accessList.NeverDirect | |
| 9125 | DEFAULT: none | |
| 9126 | DEFAULT_DOC: Allow DNS results to be used for this request. | |
| 9127 | DOC_START | |
| 9128 | Usage: never_direct allow|deny [!]aclname ... | |
| 9129 | ||
| 9130 | never_direct is the opposite of always_direct. Please read | |
| 9131 | the description for always_direct if you have not already. | |
| 9132 | ||
| 9133 | With 'never_direct' you can use ACL elements to specify | |
| 9134 | requests which should NEVER be forwarded directly to origin | |
| 9135 | servers. For example, to force the use of a proxy for all | |
| 9136 | requests, except those in your local domain use something like: | |
| 9137 | ||
| 9138 | acl local-servers dstdomain .foo.net | |
| 9139 | never_direct deny local-servers | |
| 9140 | never_direct allow all | |
| 9141 | ||
| 9142 | or if Squid is inside a firewall and there are local intranet | |
| 9143 | servers inside the firewall use something like: | |
| 9144 | ||
| 9145 | acl local-intranet dstdomain .foo.net | |
| 9146 | acl local-external dstdomain external.foo.net | |
| 9147 | always_direct deny local-external | |
| 9148 | always_direct allow local-intranet | |
| 9149 | never_direct allow all | |
| 9150 | ||
| 9151 | This clause supports both fast and slow acl types. | |
| 9152 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 9153 | DOC_END | |
| 9154 | ||
| 9155 | COMMENT_START | |
| 9156 | ADVANCED NETWORKING OPTIONS | |
| 9157 | ----------------------------------------------------------------------------- | |
| 9158 | COMMENT_END | |
| 9159 | ||
| 9160 | NAME: incoming_udp_average incoming_icp_average | |
| 9161 | TYPE: int | |
| 9162 | DEFAULT: 6 | |
| 9163 | LOC: Config.comm_incoming.udp.average | |
| 9164 | DOC_START | |
| 9165 | Heavy voodoo here. I can't even believe you are reading this. | |
| 9166 | Are you crazy? Don't even think about adjusting these unless | |
| 9167 | you understand the algorithms in comm_select.c first! | |
| 9168 | DOC_END | |
| 9169 | ||
| 9170 | NAME: incoming_tcp_average incoming_http_average | |
| 9171 | TYPE: int | |
| 9172 | DEFAULT: 4 | |
| 9173 | LOC: Config.comm_incoming.tcp.average | |
| 9174 | DOC_START | |
| 9175 | Heavy voodoo here. I can't even believe you are reading this. | |
| 9176 | Are you crazy? Don't even think about adjusting these unless | |
| 9177 | you understand the algorithms in comm_select.c first! | |
| 9178 | DOC_END | |
| 9179 | ||
| 9180 | NAME: incoming_dns_average | |
| 9181 | TYPE: int | |
| 9182 | DEFAULT: 4 | |
| 9183 | LOC: Config.comm_incoming.dns.average | |
| 9184 | DOC_START | |
| 9185 | Heavy voodoo here. I can't even believe you are reading this. | |
| 9186 | Are you crazy? Don't even think about adjusting these unless | |
| 9187 | you understand the algorithms in comm_select.c first! | |
| 9188 | DOC_END | |
| 9189 | ||
| 9190 | NAME: min_udp_poll_cnt min_icp_poll_cnt | |
| 9191 | TYPE: int | |
| 9192 | DEFAULT: 8 | |
| 9193 | LOC: Config.comm_incoming.udp.min_poll | |
| 9194 | DOC_START | |
| 9195 | Heavy voodoo here. I can't even believe you are reading this. | |
| 9196 | Are you crazy? Don't even think about adjusting these unless | |
| 9197 | you understand the algorithms in comm_select.c first! | |
| 9198 | DOC_END | |
| 9199 | ||
| 9200 | NAME: min_dns_poll_cnt | |
| 9201 | TYPE: int | |
| 9202 | DEFAULT: 8 | |
| 9203 | LOC: Config.comm_incoming.dns.min_poll | |
| 9204 | DOC_START | |
| 9205 | Heavy voodoo here. I can't even believe you are reading this. | |
| 9206 | Are you crazy? Don't even think about adjusting these unless | |
| 9207 | you understand the algorithms in comm_select.c first! | |
| 9208 | DOC_END | |
| 9209 | ||
| 9210 | NAME: min_tcp_poll_cnt min_http_poll_cnt | |
| 9211 | TYPE: int | |
| 9212 | DEFAULT: 8 | |
| 9213 | LOC: Config.comm_incoming.tcp.min_poll | |
| 9214 | DOC_START | |
| 9215 | Heavy voodoo here. I can't even believe you are reading this. | |
| 9216 | Are you crazy? Don't even think about adjusting these unless | |
| 9217 | you understand the algorithms in comm_select.c first! | |
| 9218 | DOC_END | |
| 9219 | ||
| 9220 | NAME: accept_filter | |
| 9221 | TYPE: string | |
| 9222 | DEFAULT: none | |
| 9223 | LOC: Config.accept_filter | |
| 9224 | DOC_START | |
| 9225 | FreeBSD: | |
| 9226 | ||
| 9227 | The name of an accept(2) filter to install on Squid's | |
| 9228 | listen socket(s). This feature is perhaps specific to | |
| 9229 | FreeBSD and requires support in the kernel. | |
| 9230 | ||
| 9231 | The 'httpready' filter delays delivering new connections | |
| 9232 | to Squid until a full HTTP request has been received. | |
| 9233 | See the accf_http(9) man page for details. | |
| 9234 | ||
| 9235 | The 'dataready' filter delays delivering new connections | |
| 9236 | to Squid until there is some data to process. | |
| 9237 | See the accf_dataready(9) man page for details. | |
| 9238 | ||
| 9239 | Linux: | |
| 9240 | ||
| 9241 | The 'data' filter delays delivering of new connections | |
| 9242 | to Squid until there is some data to process by TCP_ACCEPT_DEFER. | |
| 9243 | You may optionally specify a number of seconds to wait by | |
| 9244 | 'data=N' where N is the number of seconds. Defaults to 30 | |
| 9245 | if not specified. See the tcp(7) man page for details. | |
| 9246 | EXAMPLE: | |
| 9247 | # FreeBSD | |
| 9248 | accept_filter httpready | |
| 9249 | # Linux | |
| 9250 | accept_filter data | |
| 9251 | DOC_END | |
| 9252 | ||
| 9253 | NAME: client_ip_max_connections | |
| 9254 | TYPE: int | |
| 9255 | LOC: Config.client_ip_max_connections | |
| 9256 | DEFAULT: -1 | |
| 9257 | DEFAULT_DOC: No limit. | |
| 9258 | DOC_START | |
| 9259 | Set an absolute limit on the number of connections a single | |
| 9260 | client IP can use. Any more than this and Squid will begin to drop | |
| 9261 | new connections from the client until it closes some links. | |
| 9262 | ||
| 9263 | Note that this is a global limit. It affects all HTTP, HTCP, and FTP | |
| 9264 | connections from the client. For finer control use the ACL access controls. | |
| 9265 | ||
| 9266 | Requires client_db to be enabled (the default). | |
| 9267 | ||
| 9268 | WARNING: This may noticeably slow down traffic received via external proxies | |
| 9269 | or NAT devices and cause them to rebound error messages back to their clients. | |
| 9270 | DOC_END | |
| 9271 | ||
| 9272 | NAME: tcp_recv_bufsize | |
| 9273 | COMMENT: (bytes) | |
| 9274 | TYPE: b_size_t | |
| 9275 | DEFAULT: 0 bytes | |
| 9276 | DEFAULT_DOC: Use operating system TCP defaults. | |
| 9277 | LOC: Config.tcpRcvBufsz | |
| 9278 | DOC_START | |
| 9279 | Size of receive buffer to set for TCP sockets. Probably just | |
| 9280 | as easy to change your kernel's default. | |
| 9281 | Omit from squid.conf to use the default buffer size. | |
| 9282 | DOC_END | |
| 9283 | ||
| 9284 | COMMENT_START | |
| 9285 | ICAP OPTIONS | |
| 9286 | ----------------------------------------------------------------------------- | |
| 9287 | COMMENT_END | |
| 9288 | ||
| 9289 | NAME: icap_enable | |
| 9290 | TYPE: onoff | |
| 9291 | IFDEF: ICAP_CLIENT | |
| 9292 | COMMENT: on|off | |
| 9293 | LOC: Adaptation::Icap::TheConfig.onoff | |
| 9294 | DEFAULT: off | |
| 9295 | DOC_START | |
| 9296 | If you want to enable the ICAP module support, set this to on. | |
| 9297 | DOC_END | |
| 9298 | ||
| 9299 | NAME: icap_connect_timeout | |
| 9300 | TYPE: time_t | |
| 9301 | DEFAULT: none | |
| 9302 | LOC: Adaptation::Icap::TheConfig.connect_timeout_raw | |
| 9303 | IFDEF: ICAP_CLIENT | |
| 9304 | DOC_START | |
| 9305 | This parameter specifies how long to wait for the TCP connect to | |
| 9306 | the requested ICAP server to complete before giving up and either | |
| 9307 | terminating the HTTP transaction or bypassing the failure. | |
| 9308 | ||
| 9309 | The default for optional services is peer_connect_timeout. | |
| 9310 | The default for essential services is connect_timeout. | |
| 9311 | If this option is explicitly set, its value applies to all services. | |
| 9312 | DOC_END | |
| 9313 | ||
| 9314 | NAME: icap_io_timeout | |
| 9315 | COMMENT: time-units | |
| 9316 | TYPE: time_t | |
| 9317 | DEFAULT: none | |
| 9318 | DEFAULT_DOC: Use read_timeout. | |
| 9319 | LOC: Adaptation::Icap::TheConfig.io_timeout_raw | |
| 9320 | IFDEF: ICAP_CLIENT | |
| 9321 | DOC_START | |
| 9322 | This parameter specifies how long to wait for an I/O activity on | |
| 9323 | an established, active ICAP connection before giving up and | |
| 9324 | either terminating the HTTP transaction or bypassing the | |
| 9325 | failure. | |
| 9326 | DOC_END | |
| 9327 | ||
| 9328 | NAME: icap_service_failure_limit | |
| 9329 | COMMENT: limit [in memory-depth time-units] | |
| 9330 | TYPE: icap_service_failure_limit | |
| 9331 | IFDEF: ICAP_CLIENT | |
| 9332 | LOC: Adaptation::Icap::TheConfig | |
| 9333 | DEFAULT: 10 | |
| 9334 | DOC_START | |
| 9335 | The limit specifies the number of failures that Squid tolerates | |
| 9336 | when establishing a new TCP connection with an ICAP service. If | |
| 9337 | the number of failures exceeds the limit, the ICAP service is | |
| 9338 | not used for new ICAP requests until it is time to refresh its | |
| 9339 | OPTIONS. | |
| 9340 | ||
| 9341 | A negative value disables the limit. Without the limit, an ICAP | |
| 9342 | service will not be considered down due to connectivity failures | |
| 9343 | between ICAP OPTIONS requests. | |
| 9344 | ||
| 9345 | Squid forgets ICAP service failures older than the specified | |
| 9346 | value of memory-depth. The memory fading algorithm | |
| 9347 | is approximate because Squid does not remember individual | |
| 9348 | errors but groups them instead, splitting the option | |
| 9349 | value into ten time slots of equal length. | |
| 9350 | ||
| 9351 | When memory-depth is 0 and by default this option has no | |
| 9352 | effect on service failure expiration. | |
| 9353 | ||
| 9354 | Squid always forgets failures when updating service settings | |
| 9355 | using an ICAP OPTIONS transaction, regardless of this option | |
| 9356 | setting. | |
| 9357 | ||
| 9358 | For example, | |
| 9359 | # suspend service usage after 10 failures in 5 seconds: | |
| 9360 | icap_service_failure_limit 10 in 5 seconds | |
| 9361 | DOC_END | |
| 9362 | ||
| 9363 | NAME: icap_service_revival_delay | |
| 9364 | TYPE: int | |
| 9365 | IFDEF: ICAP_CLIENT | |
| 9366 | LOC: Adaptation::Icap::TheConfig.service_revival_delay | |
| 9367 | DEFAULT: 180 | |
| 9368 | DOC_START | |
| 9369 | The delay specifies the number of seconds to wait after an ICAP | |
| 9370 | OPTIONS request failure before requesting the options again. The | |
| 9371 | failed ICAP service is considered "down" until fresh OPTIONS are | |
| 9372 | fetched. | |
| 9373 | ||
| 9374 | The actual delay cannot be smaller than the hardcoded minimum | |
| 9375 | delay of 30 seconds. | |
| 9376 | DOC_END | |
| 9377 | ||
| 9378 | NAME: icap_preview_enable | |
| 9379 | TYPE: onoff | |
| 9380 | IFDEF: ICAP_CLIENT | |
| 9381 | COMMENT: on|off | |
| 9382 | LOC: Adaptation::Icap::TheConfig.preview_enable | |
| 9383 | DEFAULT: on | |
| 9384 | DOC_START | |
| 9385 | The ICAP Preview feature allows the ICAP server to handle the | |
| 9386 | HTTP message by looking only at the beginning of the message body | |
| 9387 | or even without receiving the body at all. In some environments, | |
| 9388 | previews greatly speedup ICAP processing. | |
| 9389 | ||
| 9390 | During an ICAP OPTIONS transaction, the server may tell Squid what | |
| 9391 | HTTP messages should be previewed and how big the preview should be. | |
| 9392 | Squid will not use Preview if the server did not request one. | |
| 9393 | ||
| 9394 | To disable ICAP Preview for all ICAP services, regardless of | |
| 9395 | individual ICAP server OPTIONS responses, set this option to "off". | |
| 9396 | Example: | |
| 9397 | icap_preview_enable off | |
| 9398 | DOC_END | |
| 9399 | ||
| 9400 | NAME: icap_preview_size | |
| 9401 | TYPE: int | |
| 9402 | IFDEF: ICAP_CLIENT | |
| 9403 | LOC: Adaptation::Icap::TheConfig.preview_size | |
| 9404 | DEFAULT: -1 | |
| 9405 | DEFAULT_DOC: No preview sent. | |
| 9406 | DOC_START | |
| 9407 | The default size of preview data to be sent to the ICAP server. | |
| 9408 | This value might be overwritten on a per server basis by OPTIONS requests. | |
| 9409 | DOC_END | |
| 9410 | ||
| 9411 | NAME: icap_206_enable | |
| 9412 | TYPE: onoff | |
| 9413 | IFDEF: ICAP_CLIENT | |
| 9414 | COMMENT: on|off | |
| 9415 | LOC: Adaptation::Icap::TheConfig.allow206_enable | |
| 9416 | DEFAULT: on | |
| 9417 | DOC_START | |
| 9418 | 206 (Partial Content) responses is an ICAP extension that allows the | |
| 9419 | ICAP agents to optionally combine adapted and original HTTP message | |
| 9420 | content. The decision to combine is postponed until the end of the | |
| 9421 | ICAP response. Squid supports Partial Content extension by default. | |
| 9422 | ||
| 9423 | Activation of the Partial Content extension is negotiated with each | |
| 9424 | ICAP service during OPTIONS exchange. Most ICAP servers should handle | |
| 9425 | negotiation correctly even if they do not support the extension, but | |
| 9426 | some might fail. To disable Partial Content support for all ICAP | |
| 9427 | services and to avoid any negotiation, set this option to "off". | |
| 9428 | ||
| 9429 | Example: | |
| 9430 | icap_206_enable off | |
| 9431 | DOC_END | |
| 9432 | ||
| 9433 | NAME: icap_default_options_ttl | |
| 9434 | TYPE: int | |
| 9435 | IFDEF: ICAP_CLIENT | |
| 9436 | LOC: Adaptation::Icap::TheConfig.default_options_ttl | |
| 9437 | DEFAULT: 60 | |
| 9438 | DOC_START | |
| 9439 | The default TTL value for ICAP OPTIONS responses that don't have | |
| 9440 | an Options-TTL header. | |
| 9441 | DOC_END | |
| 9442 | ||
| 9443 | NAME: icap_persistent_connections | |
| 9444 | TYPE: onoff | |
| 9445 | IFDEF: ICAP_CLIENT | |
| 9446 | COMMENT: on|off | |
| 9447 | LOC: Adaptation::Icap::TheConfig.reuse_connections | |
| 9448 | DEFAULT: on | |
| 9449 | DOC_START | |
| 9450 | Whether or not Squid should use persistent connections to | |
| 9451 | an ICAP server. | |
| 9452 | DOC_END | |
| 9453 | ||
| 9454 | NAME: adaptation_send_client_ip icap_send_client_ip | |
| 9455 | TYPE: onoff | |
| 9456 | IFDEF: USE_ADAPTATION | |
| 9457 | COMMENT: on|off | |
| 9458 | LOC: Adaptation::Config::send_client_ip | |
| 9459 | DEFAULT: off | |
| 9460 | DOC_START | |
| 9461 | If enabled, Squid shares HTTP client IP information with adaptation | |
| 9462 | services. For ICAP, Squid adds the X-Client-IP header to ICAP requests. | |
| 9463 | For eCAP, Squid sets the libecap::metaClientIp transaction option. | |
| 9464 | ||
| 9465 | See also: adaptation_uses_indirect_client | |
| 9466 | DOC_END | |
| 9467 | ||
| 9468 | NAME: adaptation_send_username icap_send_client_username | |
| 9469 | TYPE: onoff | |
| 9470 | IFDEF: USE_ADAPTATION | |
| 9471 | COMMENT: on|off | |
| 9472 | LOC: Adaptation::Config::send_username | |
| 9473 | DEFAULT: off | |
| 9474 | DOC_START | |
| 9475 | This sends authenticated HTTP client username (if available) to | |
| 9476 | the adaptation service. | |
| 9477 | ||
| 9478 | For ICAP, the username value is encoded based on the | |
| 9479 | icap_client_username_encode option and is sent using the header | |
| 9480 | specified by the icap_client_username_header option. | |
| 9481 | DOC_END | |
| 9482 | ||
| 9483 | NAME: icap_client_username_header | |
| 9484 | TYPE: string | |
| 9485 | IFDEF: ICAP_CLIENT | |
| 9486 | LOC: Adaptation::Icap::TheConfig.client_username_header | |
| 9487 | DEFAULT: X-Client-Username | |
| 9488 | DOC_START | |
| 9489 | ICAP request header name to use for adaptation_send_username. | |
| 9490 | DOC_END | |
| 9491 | ||
| 9492 | NAME: icap_client_username_encode | |
| 9493 | TYPE: onoff | |
| 9494 | IFDEF: ICAP_CLIENT | |
| 9495 | COMMENT: on|off | |
| 9496 | LOC: Adaptation::Icap::TheConfig.client_username_encode | |
| 9497 | DEFAULT: off | |
| 9498 | DOC_START | |
| 9499 | Whether to base64 encode the authenticated client username. | |
| 9500 | DOC_END | |
| 9501 | ||
| 9502 | NAME: icap_service | |
| 9503 | TYPE: icap_service_type | |
| 9504 | IFDEF: ICAP_CLIENT | |
| 9505 | LOC: Adaptation::Icap::TheConfig | |
| 9506 | DEFAULT: none | |
| 9507 | DOC_START | |
| 9508 | Defines a single ICAP service using the following format: | |
| 9509 | ||
| 9510 | icap_service id vectoring_point uri [option ...] | |
| 9511 | ||
| 9512 | id: ID | |
| 9513 | an opaque identifier or name which is used to direct traffic to | |
| 9514 | this specific service. Must be unique among all adaptation | |
| 9515 | services in squid.conf. | |
| 9516 | ||
| 9517 | vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache | |
| 9518 | This specifies at which point of transaction processing the | |
| 9519 | ICAP service should be activated. *_postcache vectoring points | |
| 9520 | are not yet supported. | |
| 9521 | ||
| 9522 | uri: icap://servername:port/servicepath | |
| 9523 | ICAP server and service location. | |
| 9524 | icaps://servername:port/servicepath | |
| 9525 | The "icap:" URI scheme is used for traditional ICAP server and | |
| 9526 | service location (default port is 1344, connections are not | |
| 9527 | encrypted). The "icaps:" URI scheme is for Secure ICAP | |
| 9528 | services that use SSL/TLS-encrypted ICAP connections (by | |
| 9529 | default, on port 11344). | |
| 9530 | ||
| 9531 | ICAP does not allow a single service to handle both REQMOD and RESPMOD | |
| 9532 | transactions. Squid does not enforce that requirement. You can specify | |
| 9533 | services with the same service_url and different vectoring_points. You | |
| 9534 | can even specify multiple identical services as long as their | |
| 9535 | service_names differ. | |
| 9536 | ||
| 9537 | To activate a service, use the adaptation_access directive. To group | |
| 9538 | services, use adaptation_service_chain and adaptation_service_set. | |
| 9539 | ||
| 9540 | Service options are separated by white space. ICAP services support | |
| 9541 | the following name=value options: | |
| 9542 | ||
| 9543 | bypass=on|off|1|0 | |
| 9544 | If set to 'on' or '1', the ICAP service is treated as | |
| 9545 | optional. If the service cannot be reached or malfunctions, | |
| 9546 | Squid will try to ignore any errors and process the message as | |
| 9547 | if the service was not enabled. No all ICAP errors can be | |
| 9548 | bypassed. If set to 0, the ICAP service is treated as | |
| 9549 | essential and all ICAP errors will result in an error page | |
| 9550 | returned to the HTTP client. | |
| 9551 | ||
| 9552 | Bypass is off by default: services are treated as essential. | |
| 9553 | ||
| 9554 | routing=on|off|1|0 | |
| 9555 | If set to 'on' or '1', the ICAP service is allowed to | |
| 9556 | dynamically change the current message adaptation plan by | |
| 9557 | returning a chain of services to be used next. The services | |
| 9558 | are specified using the X-Next-Services ICAP response header | |
| 9559 | value, formatted as a comma-separated list of service names. | |
| 9560 | Each named service should be configured in squid.conf. Other | |
| 9561 | services are ignored. An empty X-Next-Services value results | |
| 9562 | in an empty plan which ends the current adaptation. | |
| 9563 | ||
| 9564 | Dynamic adaptation plan may cross or cover multiple supported | |
| 9565 | vectoring points in their natural processing order. | |
| 9566 | ||
| 9567 | Routing is not allowed by default: the ICAP X-Next-Services | |
| 9568 | response header is ignored. | |
| 9569 | ||
| 9570 | ipv6=on|off | |
| 9571 | Only has effect on split-stack systems. The default on those systems | |
| 9572 | is to use IPv4-only connections. When set to 'on' this option will | |
| 9573 | make Squid use IPv6-only connections to contact this ICAP service. | |
| 9574 | ||
| 9575 | on-overload=block|bypass|wait|force | |
| 9576 | If the service Max-Connections limit has been reached, do | |
| 9577 | one of the following for each new ICAP transaction: | |
| 9578 | * block: send an HTTP error response to the client | |
| 9579 | * bypass: ignore the "over-connected" ICAP service | |
| 9580 | * wait: wait (in a FIFO queue) for an ICAP connection slot | |
| 9581 | * force: proceed, ignoring the Max-Connections limit | |
| 9582 | ||
| 9583 | In SMP mode with N workers, each worker assumes the service | |
| 9584 | connection limit is Max-Connections/N, even though not all | |
| 9585 | workers may use a given service. | |
| 9586 | ||
| 9587 | The default value is "bypass" if service is bypassable, | |
| 9588 | otherwise it is set to "wait". | |
| 9589 | ||
| 9590 | ||
| 9591 | max-conn=number | |
| 9592 | Use the given number as the Max-Connections limit, regardless | |
| 9593 | of the Max-Connections value given by the service, if any. | |
| 9594 | ||
| 9595 | connection-encryption=on|off | |
| 9596 | Determines the ICAP service effect on the connections_encrypted | |
| 9597 | ACL. | |
| 9598 | ||
| 9599 | The default is "on" for Secure ICAP services (i.e., those | |
| 9600 | with the icaps:// service URIs scheme) and "off" for plain ICAP | |
| 9601 | services. | |
| 9602 | ||
| 9603 | Does not affect ICAP connections (e.g., does not turn Secure | |
| 9604 | ICAP on or off). | |
| 9605 | ||
| 9606 | ==== ICAPS / TLS OPTIONS ==== | |
| 9607 | ||
| 9608 | These options are used for Secure ICAP (icaps://....) services only. | |
| 9609 | ||
| 9610 | tls-cert=/path/to/ssl/certificate | |
| 9611 | A client X.509 certificate to use when connecting to | |
| 9612 | this ICAP server. | |
| 9613 | ||
| 9614 | tls-key=/path/to/ssl/key | |
| 9615 | The private key corresponding to the previous | |
| 9616 | tls-cert= option. | |
| 9617 | ||
| 9618 | If tls-key= is not specified tls-cert= is assumed to | |
| 9619 | reference a PEM file containing both the certificate | |
| 9620 | and private key. | |
| 9621 | ||
| 9622 | tls-cipher=... The list of valid TLS/SSL ciphers to use when connecting | |
| 9623 | to this icap server. | |
| 9624 | ||
| 9625 | tls-min-version=1.N | |
| 9626 | The minimum TLS protocol version to permit. To control | |
| 9627 | SSLv3 use the tls-options= parameter. | |
| 9628 | Supported Values: 1.0 (default), 1.1, 1.2 | |
| 9629 | ||
| 9630 | tls-options=... Specify various OpenSSL library options: | |
| 9631 | ||
| 9632 | NO_SSLv3 Disallow the use of SSLv3 | |
| 9633 | ||
| 9634 | SINGLE_DH_USE | |
| 9635 | Always create a new key when using | |
| 9636 | temporary/ephemeral DH key exchanges | |
| 9637 | ||
| 9638 | ALL Enable various bug workarounds | |
| 9639 | suggested as "harmless" by OpenSSL | |
| 9640 | Be warned that this reduces SSL/TLS | |
| 9641 | strength to some attacks. | |
| 9642 | ||
| 9643 | See the OpenSSL SSL_CTX_set_options documentation for a | |
| 9644 | more complete list. Options relevant only to SSLv2 are | |
| 9645 | not supported. | |
| 9646 | ||
| 9647 | tls-cafile= PEM file containing CA certificates to use when verifying | |
| 9648 | the icap server certificate. | |
| 9649 | Use to specify intermediate CA certificate(s) if not sent | |
| 9650 | by the server. Or the full CA chain for the server when | |
| 9651 | using the tls-default-ca=off flag. | |
| 9652 | May be repeated to load multiple files. | |
| 9653 | ||
| 9654 | tls-capath=... A directory containing additional CA certificates to | |
| 9655 | use when verifying the icap server certificate. | |
| 9656 | Requires OpenSSL or LibreSSL. | |
| 9657 | ||
| 9658 | tls-crlfile=... A certificate revocation list file to use when | |
| 9659 | verifying the icap server certificate. | |
| 9660 | ||
| 9661 | tls-flags=... Specify various flags modifying the Squid TLS implementation: | |
| 9662 | ||
| 9663 | DONT_VERIFY_PEER | |
| 9664 | Accept certificates even if they fail to | |
| 9665 | verify. | |
| 9666 | DONT_VERIFY_DOMAIN | |
| 9667 | Don't verify the icap server certificate | |
| 9668 | matches the server name | |
| 9669 | ||
| 9670 | tls-default-ca[=off] | |
| 9671 | Whether to use the system Trusted CAs. Default is ON. | |
| 9672 | ||
| 9673 | tls-domain= The icap server name as advertised in it's certificate. | |
| 9674 | Used for verifying the correctness of the received icap | |
| 9675 | server certificate. If not specified the icap server | |
| 9676 | hostname extracted from ICAP URI will be used. | |
| 9677 | ||
| 9678 | Older icap_service format without optional named parameters is | |
| 9679 | deprecated but supported for backward compatibility. | |
| 9680 | ||
| 9681 | Example: | |
| 9682 | icap_service svcBlocker reqmod_precache icap://icap1.mydomain.net:1344/reqmod bypass=0 | |
| 9683 | icap_service svcLogger reqmod_precache icaps://icap2.mydomain.net:11344/reqmod routing=on | |
| 9684 | DOC_END | |
| 9685 | ||
| 9686 | NAME: icap_class | |
| 9687 | TYPE: icap_class_type | |
| 9688 | IFDEF: ICAP_CLIENT | |
| 9689 | LOC: none | |
| 9690 | DEFAULT: none | |
| 9691 | DOC_START | |
| 9692 | This deprecated option was documented to define an ICAP service | |
| 9693 | chain, even though it actually defined a set of similar, redundant | |
| 9694 | services, and the chains were not supported. | |
| 9695 | ||
| 9696 | To define a set of redundant services, please use the | |
| 9697 | adaptation_service_set directive. For service chains, use | |
| 9698 | adaptation_service_chain. | |
| 9699 | DOC_END | |
| 9700 | ||
| 9701 | NAME: icap_access | |
| 9702 | TYPE: icap_access_type | |
| 9703 | IFDEF: ICAP_CLIENT | |
| 9704 | LOC: none | |
| 9705 | DEFAULT: none | |
| 9706 | DOC_START | |
| 9707 | This option is deprecated. Please use adaptation_access, which | |
| 9708 | has the same ICAP functionality, but comes with better | |
| 9709 | documentation, and eCAP support. | |
| 9710 | DOC_END | |
| 9711 | ||
| 9712 | COMMENT_START | |
| 9713 | eCAP OPTIONS | |
| 9714 | ----------------------------------------------------------------------------- | |
| 9715 | COMMENT_END | |
| 9716 | ||
| 9717 | NAME: ecap_enable | |
| 9718 | TYPE: onoff | |
| 9719 | IFDEF: USE_ECAP | |
| 9720 | COMMENT: on|off | |
| 9721 | LOC: Adaptation::Ecap::TheConfig.onoff | |
| 9722 | DEFAULT: off | |
| 9723 | DOC_START | |
| 9724 | Controls whether eCAP support is enabled. | |
| 9725 | DOC_END | |
| 9726 | ||
| 9727 | NAME: ecap_service | |
| 9728 | TYPE: ecap_service_type | |
| 9729 | IFDEF: USE_ECAP | |
| 9730 | LOC: Adaptation::Ecap::TheConfig | |
| 9731 | DEFAULT: none | |
| 9732 | DOC_START | |
| 9733 | Defines a single eCAP service | |
| 9734 | ||
| 9735 | ecap_service id vectoring_point uri [option ...] | |
| 9736 | ||
| 9737 | id: ID | |
| 9738 | an opaque identifier or name which is used to direct traffic to | |
| 9739 | this specific service. Must be unique among all adaptation | |
| 9740 | services in squid.conf. | |
| 9741 | ||
| 9742 | vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache | |
| 9743 | This specifies at which point of transaction processing the | |
| 9744 | eCAP service should be activated. *_postcache vectoring points | |
| 9745 | are not yet supported. | |
| 9746 | ||
| 9747 | uri: ecap://vendor/service_name?custom&cgi=style¶meters=optional | |
| 9748 | Squid uses the eCAP service URI to match this configuration | |
| 9749 | line with one of the dynamically loaded services. Each loaded | |
| 9750 | eCAP service must have a unique URI. Obtain the right URI from | |
| 9751 | the service provider. | |
| 9752 | ||
| 9753 | To activate a service, use the adaptation_access directive. To group | |
| 9754 | services, use adaptation_service_chain and adaptation_service_set. | |
| 9755 | ||
| 9756 | Service options are separated by white space. eCAP services support | |
| 9757 | the following name=value options: | |
| 9758 | ||
| 9759 | bypass=on|off|1|0 | |
| 9760 | If set to 'on' or '1', the eCAP service is treated as optional. | |
| 9761 | If the service cannot be reached or malfunctions, Squid will try | |
| 9762 | to ignore any errors and process the message as if the service | |
| 9763 | was not enabled. No all eCAP errors can be bypassed. | |
| 9764 | If set to 'off' or '0', the eCAP service is treated as essential | |
| 9765 | and all eCAP errors will result in an error page returned to the | |
| 9766 | HTTP client. | |
| 9767 | ||
| 9768 | Bypass is off by default: services are treated as essential. | |
| 9769 | ||
| 9770 | routing=on|off|1|0 | |
| 9771 | If set to 'on' or '1', the eCAP service is allowed to | |
| 9772 | dynamically change the current message adaptation plan by | |
| 9773 | returning a chain of services to be used next. | |
| 9774 | ||
| 9775 | Dynamic adaptation plan may cross or cover multiple supported | |
| 9776 | vectoring points in their natural processing order. | |
| 9777 | ||
| 9778 | Routing is not allowed by default. | |
| 9779 | ||
| 9780 | connection-encryption=on|off | |
| 9781 | Determines the eCAP service effect on the connections_encrypted | |
| 9782 | ACL. | |
| 9783 | ||
| 9784 | Defaults to "on", which does not taint the master transaction | |
| 9785 | w.r.t. that ACL. | |
| 9786 | ||
| 9787 | Does not affect eCAP API calls. | |
| 9788 | ||
| 9789 | Older ecap_service format without optional named parameters is | |
| 9790 | deprecated but supported for backward compatibility. | |
| 9791 | ||
| 9792 | ||
| 9793 | Example: | |
| 9794 | ecap_service s1 reqmod_precache ecap://filters.R.us/leakDetector?on_error=block bypass=off | |
| 9795 | ecap_service s2 respmod_precache ecap://filters.R.us/virusFilter config=/etc/vf.cfg bypass=on | |
| 9796 | DOC_END | |
| 9797 | ||
| 9798 | NAME: loadable_modules | |
| 9799 | TYPE: SBufList | |
| 9800 | IFDEF: USE_LOADABLE_MODULES | |
| 9801 | LOC: Config.loadable_module_names | |
| 9802 | DEFAULT: none | |
| 9803 | DOC_START | |
| 9804 | Instructs Squid to load the specified dynamic module(s) or activate | |
| 9805 | preloaded module(s). | |
| 9806 | Example: | |
| 9807 | loadable_modules @DEFAULT_PREFIX@/lib/MinimalAdapter.so | |
| 9808 | DOC_END | |
| 9809 | ||
| 9810 | COMMENT_START | |
| 9811 | MESSAGE ADAPTATION OPTIONS | |
| 9812 | ----------------------------------------------------------------------------- | |
| 9813 | COMMENT_END | |
| 9814 | ||
| 9815 | NAME: adaptation_service_set | |
| 9816 | TYPE: adaptation_service_set_type | |
| 9817 | IFDEF: USE_ADAPTATION | |
| 9818 | LOC: none | |
| 9819 | DEFAULT: none | |
| 9820 | DOC_START | |
| 9821 | ||
| 9822 | Configures an ordered set of similar, redundant services. This is | |
| 9823 | useful when hot standby or backup adaptation servers are available. | |
| 9824 | ||
| 9825 | adaptation_service_set set_name service_name1 service_name2 ... | |
| 9826 | ||
| 9827 | The named services are used in the set declaration order. The first | |
| 9828 | applicable adaptation service from the set is used first. The next | |
| 9829 | applicable service is tried if and only if the transaction with the | |
| 9830 | previous service fails and the message waiting to be adapted is still | |
| 9831 | intact. | |
| 9832 | ||
| 9833 | When adaptation starts, broken services are ignored as if they were | |
| 9834 | not a part of the set. A broken service is a down optional service. | |
| 9835 | ||
| 9836 | The services in a set must be attached to the same vectoring point | |
| 9837 | (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD). | |
| 9838 | ||
| 9839 | If all services in a set are optional then adaptation failures are | |
| 9840 | bypassable. If all services in the set are essential, then a | |
| 9841 | transaction failure with one service may still be retried using | |
| 9842 | another service from the set, but when all services fail, the master | |
| 9843 | transaction fails as well. | |
| 9844 | ||
| 9845 | A set may contain a mix of optional and essential services, but that | |
| 9846 | is likely to lead to surprising results because broken services become | |
| 9847 | ignored (see above), making previously bypassable failures fatal. | |
| 9848 | Technically, it is the bypassability of the last failed service that | |
| 9849 | matters. | |
| 9850 | ||
| 9851 | See also: adaptation_access adaptation_service_chain | |
| 9852 | ||
| 9853 | Example: | |
| 9854 | adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup | |
| 9855 | adaptation service_set svcLogger loggerLocal loggerRemote | |
| 9856 | DOC_END | |
| 9857 | ||
| 9858 | NAME: adaptation_service_chain | |
| 9859 | TYPE: adaptation_service_chain_type | |
| 9860 | IFDEF: USE_ADAPTATION | |
| 9861 | LOC: none | |
| 9862 | DEFAULT: none | |
| 9863 | DOC_START | |
| 9864 | ||
| 9865 | Configures a list of complementary services that will be applied | |
| 9866 | one-by-one, forming an adaptation chain or pipeline. This is useful | |
| 9867 | when Squid must perform different adaptations on the same message. | |
| 9868 | ||
| 9869 | adaptation_service_chain chain_name service_name1 svc_name2 ... | |
| 9870 | ||
| 9871 | The named services are used in the chain declaration order. The first | |
| 9872 | applicable adaptation service from the chain is used first. The next | |
| 9873 | applicable service is applied to the successful adaptation results of | |
| 9874 | the previous service in the chain. | |
| 9875 | ||
| 9876 | When adaptation starts, broken services are ignored as if they were | |
| 9877 | not a part of the chain. A broken service is a down optional service. | |
| 9878 | ||
| 9879 | Request satisfaction terminates the adaptation chain because Squid | |
| 9880 | does not currently allow declaration of RESPMOD services at the | |
| 9881 | "reqmod_precache" vectoring point (see icap_service or ecap_service). | |
| 9882 | ||
| 9883 | The services in a chain must be attached to the same vectoring point | |
| 9884 | (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD). | |
| 9885 | ||
| 9886 | A chain may contain a mix of optional and essential services. If an | |
| 9887 | essential adaptation fails (or the failure cannot be bypassed for | |
| 9888 | other reasons), the master transaction fails. Otherwise, the failure | |
| 9889 | is bypassed as if the failed adaptation service was not in the chain. | |
| 9890 | ||
| 9891 | See also: adaptation_access adaptation_service_set | |
| 9892 | ||
| 9893 | Example: | |
| 9894 | adaptation_service_chain svcRequest requestLogger urlFilter leakDetector | |
| 9895 | DOC_END | |
| 9896 | ||
| 9897 | NAME: adaptation_access | |
| 9898 | TYPE: adaptation_access_type | |
| 9899 | IFDEF: USE_ADAPTATION | |
| 9900 | LOC: none | |
| 9901 | DEFAULT: none | |
| 9902 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. | |
| 9903 | DOC_START | |
| 9904 | Sends an HTTP transaction to an ICAP or eCAP adaptation service. | |
| 9905 | ||
| 9906 | adaptation_access service_name allow|deny [!]aclname... | |
| 9907 | adaptation_access set_name allow|deny [!]aclname... | |
| 9908 | ||
| 9909 | At each supported vectoring point, the adaptation_access | |
| 9910 | statements are processed in the order they appear in this | |
| 9911 | configuration file. Statements pointing to the following services | |
| 9912 | are ignored (i.e., skipped without checking their ACL): | |
| 9913 | ||
| 9914 | - services serving different vectoring points | |
| 9915 | - "broken-but-bypassable" services | |
| 9916 | - "up" services configured to ignore such transactions | |
| 9917 | (e.g., based on the ICAP Transfer-Ignore header). | |
| 9918 | ||
| 9919 | When a set_name is used, all services in the set are checked | |
| 9920 | using the same rules, to find the first applicable one. See | |
| 9921 | adaptation_service_set for details. | |
| 9922 | ||
| 9923 | If an access list is checked and there is a match, the | |
| 9924 | processing stops: For an "allow" rule, the corresponding | |
| 9925 | adaptation service is used for the transaction. For a "deny" | |
| 9926 | rule, no adaptation service is activated. | |
| 9927 | ||
| 9928 | It is currently not possible to apply more than one adaptation | |
| 9929 | service at the same vectoring point to the same HTTP transaction. | |
| 9930 | ||
| 9931 | See also: icap_service and ecap_service | |
| 9932 | ||
| 9933 | Example: | |
| 9934 | adaptation_access service_1 allow all | |
| 9935 | DOC_END | |
| 9936 | ||
| 9937 | NAME: adaptation_service_iteration_limit | |
| 9938 | TYPE: int | |
| 9939 | IFDEF: USE_ADAPTATION | |
| 9940 | LOC: Adaptation::Config::service_iteration_limit | |
| 9941 | DEFAULT: 16 | |
| 9942 | DOC_START | |
| 9943 | Limits the number of iterations allowed when applying adaptation | |
| 9944 | services to a message. If your longest adaptation set or chain | |
| 9945 | may have more than 16 services, increase the limit beyond its | |
| 9946 | default value of 16. If detecting infinite iteration loops sooner | |
| 9947 | is critical, make the iteration limit match the actual number | |
| 9948 | of services in your longest adaptation set or chain. | |
| 9949 | ||
| 9950 | Infinite adaptation loops are most likely with routing services. | |
| 9951 | ||
| 9952 | See also: icap_service routing=1 | |
| 9953 | DOC_END | |
| 9954 | ||
| 9955 | NAME: adaptation_masterx_shared_names | |
| 9956 | TYPE: string | |
| 9957 | IFDEF: USE_ADAPTATION | |
| 9958 | LOC: Adaptation::Config::masterx_shared_name | |
| 9959 | DEFAULT: none | |
| 9960 | DOC_START | |
| 9961 | For each master transaction (i.e., the HTTP request and response | |
| 9962 | sequence, including all related ICAP and eCAP exchanges), Squid | |
| 9963 | maintains a table of metadata. The table entries are (name, value) | |
| 9964 | pairs shared among eCAP and ICAP exchanges. The table is destroyed | |
| 9965 | with the master transaction. | |
| 9966 | ||
| 9967 | This option specifies the table entry names that Squid must accept | |
| 9968 | from and forward to the adaptation transactions. | |
| 9969 | ||
| 9970 | An ICAP REQMOD or RESPMOD transaction may set an entry in the | |
| 9971 | shared table by returning an ICAP header field with a name | |
| 9972 | specified in adaptation_masterx_shared_names. | |
| 9973 | ||
| 9974 | An eCAP REQMOD or RESPMOD transaction may set an entry in the | |
| 9975 | shared table by implementing the libecap::visitEachOption() API | |
| 9976 | to provide an option with a name specified in | |
| 9977 | adaptation_masterx_shared_names. | |
| 9978 | ||
| 9979 | Squid will store and forward the set entry to subsequent adaptation | |
| 9980 | transactions within the same master transaction scope. | |
| 9981 | ||
| 9982 | Only one shared entry name is supported at this time. | |
| 9983 | ||
| 9984 | Example: | |
| 9985 | # share authentication information among ICAP services | |
| 9986 | adaptation_masterx_shared_names X-Subscriber-ID | |
| 9987 | DOC_END | |
| 9988 | ||
| 9989 | NAME: adaptation_meta | |
| 9990 | TYPE: note | |
| 9991 | IFDEF: USE_ADAPTATION | |
| 9992 | LOC: Adaptation::Config::metaHeaders() | |
| 9993 | DEFAULT: none | |
| 9994 | DOC_START | |
| 9995 | This option allows Squid administrator to add custom ICAP request | |
| 9996 | headers or eCAP options to Squid ICAP requests or eCAP transactions. | |
| 9997 | Use it to pass custom authentication tokens and other | |
| 9998 | transaction-state related meta information to an ICAP/eCAP service. | |
| 9999 | ||
| 10000 | The addition of a meta header is ACL-driven: | |
| 10001 | adaptation_meta name value [!]aclname ... | |
| 10002 | ||
| 10003 | Processing for a given header name stops after the first ACL list match. | |
| 10004 | Thus, it is impossible to add two headers with the same name. If no ACL | |
| 10005 | lists match for a given header name, no such header is added. For | |
| 10006 | example: | |
| 10007 | ||
| 10008 | # do not debug transactions except for those that need debugging | |
| 10009 | adaptation_meta X-Debug 1 needs_debugging | |
| 10010 | ||
| 10011 | # log all transactions except for those that must remain secret | |
| 10012 | adaptation_meta X-Log 1 !keep_secret | |
| 10013 | ||
| 10014 | # mark transactions from users in the "G 1" group | |
| 10015 | adaptation_meta X-Authenticated-Groups "G 1" authed_as_G1 | |
| 10016 | ||
| 10017 | The "value" parameter may be a regular squid.conf token or a "double | |
| 10018 | quoted string". Within the quoted string, use backslash (\) to escape | |
| 10019 | any character, which is currently only useful for escaping backslashes | |
| 10020 | and double quotes. For example, | |
| 10021 | "this string has one backslash (\\) and two \"quotes\"" | |
| 10022 | ||
| 10023 | Used adaptation_meta header values may be logged via %note | |
| 10024 | logformat code. If multiple adaptation_meta headers with the same name | |
| 10025 | are used during master transaction lifetime, the header values are | |
| 10026 | logged in the order they were used and duplicate values are ignored | |
| 10027 | (only the first repeated value will be logged). | |
| 10028 | DOC_END | |
| 10029 | ||
| 10030 | NAME: icap_retry | |
| 10031 | TYPE: acl_access | |
| 10032 | IFDEF: ICAP_CLIENT | |
| 10033 | LOC: Adaptation::Icap::TheConfig.repeat | |
| 10034 | DEFAULT_IF_NONE: deny all | |
| 10035 | DOC_START | |
| 10036 | This ACL determines which retriable ICAP transactions are | |
| 10037 | retried. Transactions that received a complete ICAP response | |
| 10038 | and did not have to consume or produce HTTP bodies to receive | |
| 10039 | that response are usually retriable. | |
| 10040 | ||
| 10041 | icap_retry allow|deny [!]aclname ... | |
| 10042 | ||
| 10043 | Squid automatically retries some ICAP I/O timeouts and errors | |
| 10044 | due to persistent connection race conditions. | |
| 10045 | ||
| 10046 | See also: icap_retry_limit | |
| 10047 | DOC_END | |
| 10048 | ||
| 10049 | NAME: icap_retry_limit | |
| 10050 | TYPE: int | |
| 10051 | IFDEF: ICAP_CLIENT | |
| 10052 | LOC: Adaptation::Icap::TheConfig.repeat_limit | |
| 10053 | DEFAULT: 0 | |
| 10054 | DEFAULT_DOC: No retries are allowed. | |
| 10055 | DOC_START | |
| 10056 | Limits the number of retries allowed. | |
| 10057 | ||
| 10058 | Communication errors due to persistent connection race | |
| 10059 | conditions are unavoidable, automatically retried, and do not | |
| 10060 | count against this limit. | |
| 10061 | ||
| 10062 | See also: icap_retry | |
| 10063 | DOC_END | |
| 10064 | ||
| 10065 | ||
| 10066 | COMMENT_START | |
| 10067 | DNS OPTIONS | |
| 10068 | ----------------------------------------------------------------------------- | |
| 10069 | COMMENT_END | |
| 10070 | ||
| 10071 | NAME: check_hostnames | |
| 10072 | TYPE: onoff | |
| 10073 | DEFAULT: off | |
| 10074 | LOC: Config.onoff.check_hostnames | |
| 10075 | DOC_START | |
| 10076 | For security and stability reasons Squid can check | |
| 10077 | hostnames for Internet standard RFC compliance. If you want | |
| 10078 | Squid to perform these checks turn this directive on. | |
| 10079 | DOC_END | |
| 10080 | ||
| 10081 | NAME: allow_underscore | |
| 10082 | TYPE: onoff | |
| 10083 | DEFAULT: on | |
| 10084 | LOC: Config.onoff.allow_underscore | |
| 10085 | DOC_START | |
| 10086 | Underscore characters is not strictly allowed in Internet hostnames | |
| 10087 | but nevertheless used by many sites. Set this to off if you want | |
| 10088 | Squid to be strict about the standard. | |
| 10089 | This check is performed only when check_hostnames is set to on. | |
| 10090 | DOC_END | |
| 10091 | ||
| 10092 | NAME: dns_retransmit_interval | |
| 10093 | TYPE: time_msec | |
| 10094 | DEFAULT: 5 seconds | |
| 10095 | LOC: Config.Timeout.idns_retransmit | |
| 10096 | DOC_START | |
| 10097 | Initial retransmit interval for DNS queries. The interval is | |
| 10098 | doubled each time all configured DNS servers have been tried. | |
| 10099 | DOC_END | |
| 10100 | ||
| 10101 | NAME: dns_timeout | |
| 10102 | TYPE: time_msec | |
| 10103 | DEFAULT: 30 seconds | |
| 10104 | LOC: Config.Timeout.idns_query | |
| 10105 | DOC_START | |
| 10106 | DNS Query timeout. If no response is received to a DNS query | |
| 10107 | within this time all DNS servers for the queried domain | |
| 10108 | are assumed to be unavailable. | |
| 10109 | DOC_END | |
| 10110 | ||
| 10111 | NAME: dns_packet_max | |
| 10112 | TYPE: b_ssize_t | |
| 10113 | DEFAULT_DOC: EDNS disabled | |
| 10114 | DEFAULT: none | |
| 10115 | LOC: Config.dns.packet_max | |
| 10116 | DOC_START | |
| 10117 | Maximum number of bytes packet size to advertise via EDNS. | |
| 10118 | Set to "none" to disable EDNS large packet support. | |
| 10119 | ||
| 10120 | For legacy reasons DNS UDP replies will default to 512 bytes which | |
| 10121 | is too small for many responses. EDNS provides a means for Squid to | |
| 10122 | negotiate receiving larger responses back immediately without having | |
| 10123 | to failover with repeat requests. Responses larger than this limit | |
| 10124 | will retain the old behaviour of failover to TCP DNS. | |
| 10125 | ||
| 10126 | Squid has no real fixed limit internally, but allowing packet sizes | |
| 10127 | over 1500 bytes requires network jumbogram support and is usually not | |
| 10128 | necessary. | |
| 10129 | ||
| 10130 | WARNING: The RFC also indicates that some older resolvers will reply | |
| 10131 | with failure of the whole request if the extension is added. Some | |
| 10132 | resolvers have already been identified which will reply with mangled | |
| 10133 | EDNS response on occasion. Usually in response to many-KB jumbogram | |
| 10134 | sizes being advertised by Squid. | |
| 10135 | Squid will currently treat these both as an unable-to-resolve domain | |
| 10136 | even if it would be resolvable without EDNS. | |
| 10137 | DOC_END | |
| 10138 | ||
| 10139 | NAME: dns_defnames | |
| 10140 | COMMENT: on|off | |
| 10141 | TYPE: onoff | |
| 10142 | DEFAULT: off | |
| 10143 | DEFAULT_DOC: Search for single-label domain names is disabled. | |
| 10144 | LOC: Config.onoff.res_defnames | |
| 10145 | DOC_START | |
| 10146 | Normally the RES_DEFNAMES resolver option is disabled | |
| 10147 | (see res_init(3)). This prevents caches in a hierarchy | |
| 10148 | from interpreting single-component hostnames locally. To allow | |
| 10149 | Squid to handle single-component names, enable this option. | |
| 10150 | DOC_END | |
| 10151 | ||
| 10152 | NAME: dns_multicast_local | |
| 10153 | COMMENT: on|off | |
| 10154 | TYPE: onoff | |
| 10155 | DEFAULT: off | |
| 10156 | DEFAULT_DOC: Search for .local and .arpa names is disabled. | |
| 10157 | LOC: Config.onoff.dns_mdns | |
| 10158 | DOC_START | |
| 10159 | When set to on, Squid sends multicast DNS lookups on the local | |
| 10160 | network for domains ending in .local and .arpa. | |
| 10161 | This enables local servers and devices to be contacted in an | |
| 10162 | ad-hoc or zero-configuration network environment. | |
| 10163 | DOC_END | |
| 10164 | ||
| 10165 | NAME: dns_nameservers | |
| 10166 | TYPE: SBufList | |
| 10167 | DEFAULT: none | |
| 10168 | DEFAULT_DOC: Use operating system definitions | |
| 10169 | LOC: Config.dns.nameservers | |
| 10170 | DOC_START | |
| 10171 | Use this if you want to specify a list of DNS name servers | |
| 10172 | (IP addresses) to use instead of those given in your | |
| 10173 | /etc/resolv.conf file. | |
| 10174 | ||
| 10175 | On Windows platforms, if no value is specified here or in | |
| 10176 | the /etc/resolv.conf file, the list of DNS name servers are | |
| 10177 | taken from the Windows registry, both static and dynamic DHCP | |
| 10178 | configurations are supported. | |
| 10179 | ||
| 10180 | Example: dns_nameservers 10.0.0.1 192.172.0.4 | |
| 10181 | DOC_END | |
| 10182 | ||
| 10183 | NAME: hosts_file | |
| 10184 | TYPE: string | |
| 10185 | DEFAULT: @DEFAULT_HOSTS@ | |
| 10186 | LOC: Config.etcHostsPath | |
| 10187 | DOC_START | |
| 10188 | Location of the host-local IP name-address associations | |
| 10189 | database. Most Operating Systems have such a file on different | |
| 10190 | default locations: | |
| 10191 | - Un*X & Linux: /etc/hosts | |
| 10192 | - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts | |
| 10193 | (%SystemRoot% value install default is c:\winnt) | |
| 10194 | - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts | |
| 10195 | (%SystemRoot% value install default is c:\windows) | |
| 10196 | - Windows 9x/Me: %windir%\hosts | |
| 10197 | (%windir% value is usually c:\windows) | |
| 10198 | - Cygwin: /etc/hosts | |
| 10199 | ||
| 10200 | The file contains newline-separated definitions, in the | |
| 10201 | form ip_address_in_dotted_form name [name ...] names are | |
| 10202 | whitespace-separated. Lines beginning with an hash (#) | |
| 10203 | character are comments. | |
| 10204 | ||
| 10205 | The file is checked at startup and upon configuration. | |
| 10206 | If set to 'none', it won't be checked. | |
| 10207 | If append_domain is used, that domain will be added to | |
| 10208 | domain-local (i.e. not containing any dot character) host | |
| 10209 | definitions. | |
| 10210 | DOC_END | |
| 10211 | ||
| 10212 | NAME: append_domain | |
| 10213 | TYPE: string | |
| 10214 | LOC: Config.appendDomain | |
| 10215 | DEFAULT: none | |
| 10216 | DEFAULT_DOC: Use operating system definitions | |
| 10217 | DOC_START | |
| 10218 | Appends local domain name to hostnames without any dots in | |
| 10219 | them. append_domain must begin with a period. | |
| 10220 | ||
| 10221 | Be warned there are now Internet names with no dots in | |
| 10222 | them using only top-domain names, so setting this may | |
| 10223 | cause some Internet sites to become unavailable. | |
| 10224 | ||
| 10225 | Example: | |
| 10226 | append_domain .yourdomain.com | |
| 10227 | DOC_END | |
| 10228 | ||
| 10229 | NAME: ignore_unknown_nameservers | |
| 10230 | TYPE: onoff | |
| 10231 | LOC: Config.onoff.ignore_unknown_nameservers | |
| 10232 | DEFAULT: on | |
| 10233 | DOC_START | |
| 10234 | By default Squid checks that DNS responses are received | |
| 10235 | from the same IP addresses they are sent to. If they | |
| 10236 | don't match, Squid ignores the response and writes a warning | |
| 10237 | message to cache.log. You can allow responses from unknown | |
| 10238 | nameservers by setting this option to 'off'. | |
| 10239 | DOC_END | |
| 10240 | ||
| 10241 | NAME: ipcache_size | |
| 10242 | COMMENT: (number of entries) | |
| 10243 | TYPE: int | |
| 10244 | DEFAULT: 1024 | |
| 10245 | LOC: Config.ipcache.size | |
| 10246 | DOC_START | |
| 10247 | Maximum number of DNS IP cache entries. | |
| 10248 | DOC_END | |
| 10249 | ||
| 10250 | NAME: ipcache_low | |
| 10251 | COMMENT: (percent) | |
| 10252 | TYPE: int | |
| 10253 | DEFAULT: 90 | |
| 10254 | LOC: Config.ipcache.low | |
| 10255 | DOC_NONE | |
| 10256 | ||
| 10257 | NAME: ipcache_high | |
| 10258 | COMMENT: (percent) | |
| 10259 | TYPE: int | |
| 10260 | DEFAULT: 95 | |
| 10261 | LOC: Config.ipcache.high | |
| 10262 | DOC_START | |
| 10263 | The size, low-, and high-water marks for the IP cache. | |
| 10264 | DOC_END | |
| 10265 | ||
| 10266 | NAME: fqdncache_size | |
| 10267 | COMMENT: (number of entries) | |
| 10268 | TYPE: int | |
| 10269 | DEFAULT: 1024 | |
| 10270 | LOC: Config.fqdncache.size | |
| 10271 | DOC_START | |
| 10272 | Maximum number of FQDN cache entries. | |
| 10273 | DOC_END | |
| 10274 | ||
| 10275 | COMMENT_START | |
| 10276 | MISCELLANEOUS | |
| 10277 | ----------------------------------------------------------------------------- | |
| 10278 | COMMENT_END | |
| 10279 | ||
| 10280 | NAME: configuration_includes_quoted_values | |
| 10281 | COMMENT: on|off | |
| 10282 | TYPE: configuration_includes_quoted_values | |
| 10283 | DEFAULT: off | |
| 10284 | LOC: ConfigParser::RecognizeQuotedValues | |
| 10285 | DOC_START | |
| 10286 | If set, Squid will recognize each "quoted string" after a configuration | |
| 10287 | directive as a single parameter. The quotes are stripped before the | |
| 10288 | parameter value is interpreted or used. | |
| 10289 | See "Values with spaces, quotes, and other special characters" | |
| 10290 | section for more details. | |
| 10291 | DOC_END | |
| 10292 | ||
| 10293 | NAME: memory_pools | |
| 10294 | COMMENT: on|off | |
| 10295 | TYPE: onoff | |
| 10296 | DEFAULT: on | |
| 10297 | LOC: Config.onoff.mem_pools | |
| 10298 | DOC_START | |
| 10299 | If set, Squid will keep pools of allocated (but unused) memory | |
| 10300 | available for future use. If memory is a premium on your | |
| 10301 | system and you believe your malloc library outperforms Squid | |
| 10302 | routines, disable this. | |
| 10303 | DOC_END | |
| 10304 | ||
| 10305 | NAME: memory_pools_limit | |
| 10306 | COMMENT: (bytes) | |
| 10307 | TYPE: b_int64_t | |
| 10308 | DEFAULT: 5 MB | |
| 10309 | LOC: Config.MemPools.limit | |
| 10310 | DOC_START | |
| 10311 | Used only with memory_pools on: | |
| 10312 | memory_pools_limit 50 MB | |
| 10313 | ||
| 10314 | If set to a non-zero value, Squid will keep at most the specified | |
| 10315 | limit of allocated (but unused) memory in memory pools. All free() | |
| 10316 | requests that exceed this limit will be handled by your malloc | |
| 10317 | library. Squid does not pre-allocate any memory, just safe-keeps | |
| 10318 | objects that otherwise would be free()d. Thus, it is safe to set | |
| 10319 | memory_pools_limit to a reasonably high value even if your | |
| 10320 | configuration will use less memory. | |
| 10321 | ||
| 10322 | If set to none, Squid will keep all memory it can. That is, there | |
| 10323 | will be no limit on the total amount of memory used for safe-keeping. | |
| 10324 | ||
| 10325 | To disable memory allocation optimization, do not set | |
| 10326 | memory_pools_limit to 0 or none. Set memory_pools to "off" instead. | |
| 10327 | ||
| 10328 | An overhead for maintaining memory pools is not taken into account | |
| 10329 | when the limit is checked. This overhead is close to four bytes per | |
| 10330 | object kept. However, pools may actually _save_ memory because of | |
| 10331 | reduced memory thrashing in your malloc library. | |
| 10332 | DOC_END | |
| 10333 | ||
| 10334 | NAME: forwarded_for | |
| 10335 | COMMENT: on|off|transparent|truncate|delete | |
| 10336 | TYPE: string | |
| 10337 | DEFAULT: on | |
| 10338 | LOC: opt_forwarded_for | |
| 10339 | DOC_START | |
| 10340 | If set to "on", Squid will append your client's IP address | |
| 10341 | in the HTTP requests it forwards. By default it looks like: | |
| 10342 | ||
| 10343 | X-Forwarded-For: 192.1.2.3 | |
| 10344 | ||
| 10345 | If set to "off", it will appear as | |
| 10346 | ||
| 10347 | X-Forwarded-For: unknown | |
| 10348 | ||
| 10349 | If set to "transparent", Squid will not alter the | |
| 10350 | X-Forwarded-For header in any way. | |
| 10351 | ||
| 10352 | If set to "delete", Squid will delete the entire | |
| 10353 | X-Forwarded-For header. | |
| 10354 | ||
| 10355 | If set to "truncate", Squid will remove all existing | |
| 10356 | X-Forwarded-For entries, and place the client IP as the sole entry. | |
| 10357 | DOC_END | |
| 10358 | ||
| 10359 | NAME: cachemgr_passwd | |
| 10360 | TYPE: cachemgrpasswd | |
| 10361 | DEFAULT: none | |
| 10362 | DEFAULT_DOC: No password. Actions which require password are denied. | |
| 10363 | LOC: Config.passwd_list | |
| 10364 | DOC_START | |
| 10365 | Specify passwords for cachemgr operations. | |
| 10366 | ||
| 10367 | Usage: cachemgr_passwd password action action ... | |
| 10368 | ||
| 10369 | Some valid actions are (see cache manager menu for a full list): | |
| 10370 | 5min | |
| 10371 | 60min | |
| 10372 | authenticator | |
| 10373 | cbdata | |
| 10374 | client_list | |
| 10375 | comm_incoming | |
| 10376 | config * | |
| 10377 | counters | |
| 10378 | delay | |
| 10379 | digest_stats | |
| 10380 | dns | |
| 10381 | events | |
| 10382 | filedescriptors | |
| 10383 | fqdncache | |
| 10384 | histograms | |
| 10385 | http_headers | |
| 10386 | info | |
| 10387 | io | |
| 10388 | ipcache | |
| 10389 | mem | |
| 10390 | menu | |
| 10391 | netdb | |
| 10392 | objects | |
| 10393 | offline_toggle * | |
| 10394 | pconn | |
| 10395 | peer_select | |
| 10396 | reconfigure * | |
| 10397 | redirector | |
| 10398 | refresh | |
| 10399 | server_list | |
| 10400 | shutdown * | |
| 10401 | store_digest | |
| 10402 | storedir | |
| 10403 | utilization | |
| 10404 | via_headers | |
| 10405 | vm_objects | |
| 10406 | ||
| 10407 | * Indicates actions which will not be performed without a | |
| 10408 | valid password, others can be performed if not listed here. | |
| 10409 | ||
| 10410 | To disable an action, set the password to "disable". | |
| 10411 | To allow performing an action without a password, set the | |
| 10412 | password to "none". | |
| 10413 | ||
| 10414 | Use the keyword "all" to set the same password for all actions. | |
| 10415 | ||
| 10416 | Example: | |
| 10417 | cachemgr_passwd secret shutdown | |
| 10418 | cachemgr_passwd lesssssssecret info stats/objects | |
| 10419 | cachemgr_passwd disable all | |
| 10420 | DOC_END | |
| 10421 | ||
| 10422 | NAME: client_db | |
| 10423 | COMMENT: on|off | |
| 10424 | TYPE: onoff | |
| 10425 | DEFAULT: on | |
| 10426 | LOC: Config.onoff.client_db | |
| 10427 | DOC_START | |
| 10428 | If you want to disable collecting per-client statistics, | |
| 10429 | turn off client_db here. | |
| 10430 | DOC_END | |
| 10431 | ||
| 10432 | NAME: refresh_all_ims | |
| 10433 | COMMENT: on|off | |
| 10434 | TYPE: onoff | |
| 10435 | DEFAULT: off | |
| 10436 | LOC: Config.onoff.refresh_all_ims | |
| 10437 | DOC_START | |
| 10438 | When you enable this option, squid will always check | |
| 10439 | the origin server for an update when a client sends an | |
| 10440 | If-Modified-Since request. Many browsers use IMS | |
| 10441 | requests when the user requests a reload, and this | |
| 10442 | ensures those clients receive the latest version. | |
| 10443 | ||
| 10444 | By default (off), squid may return a Not Modified response | |
| 10445 | based on the age of the cached version. | |
| 10446 | DOC_END | |
| 10447 | ||
| 10448 | NAME: reload_into_ims | |
| 10449 | IFDEF: USE_HTTP_VIOLATIONS | |
| 10450 | COMMENT: on|off | |
| 10451 | TYPE: onoff | |
| 10452 | DEFAULT: off | |
| 10453 | LOC: Config.onoff.reload_into_ims | |
| 10454 | DOC_START | |
| 10455 | When you enable this option, client no-cache or ``reload'' | |
| 10456 | requests will be changed to If-Modified-Since requests. | |
| 10457 | Doing this VIOLATES the HTTP standard. Enabling this | |
| 10458 | feature could make you liable for problems which it | |
| 10459 | causes. | |
| 10460 | ||
| 10461 | see also refresh_pattern for a more selective approach. | |
| 10462 | DOC_END | |
| 10463 | ||
| 10464 | NAME: connect_retries | |
| 10465 | TYPE: int | |
| 10466 | LOC: Config.connect_retries | |
| 10467 | DEFAULT: 0 | |
| 10468 | DEFAULT_DOC: Do not retry failed connections. | |
| 10469 | DOC_START | |
| 10470 | Limits the number of reopening attempts when establishing a single | |
| 10471 | TCP connection. All these attempts must still complete before the | |
| 10472 | applicable connection opening timeout expires. | |
| 10473 | ||
| 10474 | By default and when connect_retries is set to zero, Squid does not | |
| 10475 | retry failed connection opening attempts. | |
| 10476 | ||
| 10477 | The (not recommended) maximum is 10 tries. An attempt to configure a | |
| 10478 | higher value results in the value of 10 being used (with a warning). | |
| 10479 | ||
| 10480 | Squid may open connections to retry various high-level forwarding | |
| 10481 | failures. For an outside observer, that activity may look like a | |
| 10482 | low-level connection reopening attempt, but those high-level retries | |
| 10483 | are governed by forward_max_tries instead. | |
| 10484 | ||
| 10485 | See also: connect_timeout, forward_timeout, icap_connect_timeout, | |
| 10486 | and forward_max_tries. | |
| 10487 | DOC_END | |
| 10488 | ||
| 10489 | NAME: retry_on_error | |
| 10490 | TYPE: onoff | |
| 10491 | LOC: Config.retry.onerror | |
| 10492 | DEFAULT: off | |
| 10493 | DOC_START | |
| 10494 | If set to ON Squid will automatically retry requests when | |
| 10495 | receiving an error response with status 403 (Forbidden), | |
| 10496 | 500 (Internal Error), 501 or 503 (Service not available). | |
| 10497 | Status 502 and 504 (Gateway errors) are always retried. | |
| 10498 | ||
| 10499 | This is mainly useful if you are in a complex cache hierarchy to | |
| 10500 | work around access control errors. | |
| 10501 | ||
| 10502 | NOTE: This retry will attempt to find another working destination. | |
| 10503 | Which is different from the server which just failed. | |
| 10504 | DOC_END | |
| 10505 | ||
| 10506 | NAME: as_whois_server | |
| 10507 | TYPE: string | |
| 10508 | LOC: Config.as_whois_server | |
| 10509 | DEFAULT: whois.ra.net | |
| 10510 | DOC_START | |
| 10511 | WHOIS server to query for AS numbers. NOTE: AS numbers are | |
| 10512 | queried only when Squid starts up, not for every request. | |
| 10513 | DOC_END | |
| 10514 | ||
| 10515 | NAME: offline_mode | |
| 10516 | TYPE: onoff | |
| 10517 | LOC: Config.onoff.offline | |
| 10518 | DEFAULT: off | |
| 10519 | DOC_START | |
| 10520 | Enable this option and Squid will never try to validate cached | |
| 10521 | objects. | |
| 10522 | DOC_END | |
| 10523 | ||
| 10524 | NAME: uri_whitespace | |
| 10525 | TYPE: uri_whitespace | |
| 10526 | LOC: Config.uri_whitespace | |
| 10527 | DEFAULT: strip | |
| 10528 | DOC_START | |
| 10529 | What to do with requests that have whitespace characters in the | |
| 10530 | URI. Options: | |
| 10531 | ||
| 10532 | strip: The whitespace characters are stripped out of the URL. | |
| 10533 | This is the behavior recommended by RFC2396 and RFC3986 | |
| 10534 | for tolerant handling of generic URI. | |
| 10535 | NOTE: This is one difference between generic URI and HTTP URLs. | |
| 10536 | ||
| 10537 | deny: The request is denied. The user receives an "Invalid | |
| 10538 | Request" message. | |
| 10539 | This is the behaviour recommended by RFC2616 for safe | |
| 10540 | handling of HTTP request URL. | |
| 10541 | ||
| 10542 | allow: The request is allowed and the URI is not changed. The | |
| 10543 | whitespace characters remain in the URI. Note the | |
| 10544 | whitespace is passed to redirector processes if they | |
| 10545 | are in use. | |
| 10546 | Note this may be considered a violation of RFC2616 | |
| 10547 | request parsing where whitespace is prohibited in the | |
| 10548 | URL field. | |
| 10549 | ||
| 10550 | encode: The request is allowed and the whitespace characters are | |
| 10551 | encoded according to RFC1738. | |
| 10552 | ||
| 10553 | chop: The request is allowed and the URI is chopped at the | |
| 10554 | first whitespace. | |
| 10555 | ||
| 10556 | ||
| 10557 | NOTE the current Squid implementation of encode and chop violates | |
| 10558 | RFC2616 by not using a 301 redirect after altering the URL. | |
| 10559 | DOC_END | |
| 10560 | ||
| 10561 | NAME: chroot | |
| 10562 | TYPE: string | |
| 10563 | LOC: Config.chroot_dir | |
| 10564 | DEFAULT: none | |
| 10565 | DOC_START | |
| 10566 | Specifies a directory where Squid should do a chroot() while | |
| 10567 | initializing. This also causes Squid to fully drop root | |
| 10568 | privileges after initializing. This means, for example, if you | |
| 10569 | use a HTTP port less than 1024 and try to reconfigure, you may | |
| 10570 | get an error saying that Squid can not open the port. | |
| 10571 | DOC_END | |
| 10572 | ||
| 10573 | NAME: pipeline_prefetch | |
| 10574 | TYPE: pipelinePrefetch | |
| 10575 | LOC: Config.pipeline_max_prefetch | |
| 10576 | DEFAULT: 0 | |
| 10577 | DEFAULT_DOC: Do not pre-parse pipelined requests. | |
| 10578 | DOC_START | |
| 10579 | HTTP clients may send a pipeline of 1+N requests to Squid using a | |
| 10580 | single connection, without waiting for Squid to respond to the first | |
| 10581 | of those requests. This option limits the number of concurrent | |
| 10582 | requests Squid will try to handle in parallel. If set to N, Squid | |
| 10583 | will try to receive and process up to 1+N requests on the same | |
| 10584 | connection concurrently. | |
| 10585 | ||
| 10586 | Defaults to 0 (off) for bandwidth management and access logging | |
| 10587 | reasons. | |
| 10588 | ||
| 10589 | NOTE: pipelining requires persistent connections to clients. | |
| 10590 | ||
| 10591 | WARNING: pipelining breaks NTLM and Negotiate/Kerberos authentication. | |
| 10592 | DOC_END | |
| 10593 | ||
| 10594 | NAME: high_response_time_warning | |
| 10595 | TYPE: int | |
| 10596 | COMMENT: (msec) | |
| 10597 | LOC: Config.warnings.high_rptm | |
| 10598 | DEFAULT: 0 | |
| 10599 | DEFAULT_DOC: disabled. | |
| 10600 | DOC_START | |
| 10601 | If the one-minute median response time exceeds this value, | |
| 10602 | Squid prints a WARNING with debug level 0 to get the | |
| 10603 | administrators attention. The value is in milliseconds. | |
| 10604 | DOC_END | |
| 10605 | ||
| 10606 | NAME: high_page_fault_warning | |
| 10607 | TYPE: int | |
| 10608 | LOC: Config.warnings.high_pf | |
| 10609 | DEFAULT: 0 | |
| 10610 | DEFAULT_DOC: disabled. | |
| 10611 | DOC_START | |
| 10612 | If the one-minute average page fault rate exceeds this | |
| 10613 | value, Squid prints a WARNING with debug level 0 to get | |
| 10614 | the administrators attention. The value is in page faults | |
| 10615 | per second. | |
| 10616 | DOC_END | |
| 10617 | ||
| 10618 | NAME: high_memory_warning | |
| 10619 | TYPE: b_size_t | |
| 10620 | LOC: Config.warnings.high_memory | |
| 10621 | IFDEF: HAVE_MSTATS&&HAVE_GNUMALLOC_H | |
| 10622 | DEFAULT: 0 KB | |
| 10623 | DEFAULT_DOC: disabled. | |
| 10624 | DOC_START | |
| 10625 | If the memory usage (as determined by gnumalloc, if available and used) | |
| 10626 | exceeds this amount, Squid prints a WARNING with debug level 0 to get | |
| 10627 | the administrators attention. | |
| 10628 | DOC_END | |
| 10629 | # TODO: link high_memory_warning to mempools? | |
| 10630 | ||
| 10631 | NAME: sleep_after_fork | |
| 10632 | COMMENT: (microseconds) | |
| 10633 | TYPE: int | |
| 10634 | LOC: Config.sleep_after_fork | |
| 10635 | DEFAULT: 0 | |
| 10636 | DOC_START | |
| 10637 | When this is set to a non-zero value, the main Squid process | |
| 10638 | sleeps the specified number of microseconds after a fork() | |
| 10639 | system call. This sleep may help the situation where your | |
| 10640 | system reports fork() failures due to lack of (virtual) | |
| 10641 | memory. Note, however, if you have a lot of child | |
| 10642 | processes, these sleep delays will add up and your | |
| 10643 | Squid will not service requests for some amount of time | |
| 10644 | until all the child processes have been started. | |
| 10645 | DOC_END | |
| 10646 | ||
| 10647 | NAME: windows_ipaddrchangemonitor | |
| 10648 | IFDEF: _SQUID_WINDOWS_ | |
| 10649 | COMMENT: on|off | |
| 10650 | TYPE: onoff | |
| 10651 | DEFAULT: on | |
| 10652 | LOC: Config.onoff.WIN32_IpAddrChangeMonitor | |
| 10653 | DOC_START | |
| 10654 | On Windows Squid by default will monitor IP address changes and will | |
| 10655 | reconfigure itself after any detected event. This is very useful for | |
| 10656 | proxies connected to internet with dial-up interfaces. | |
| 10657 | In some cases (a Proxy server acting as VPN gateway is one) it could be | |
| 10658 | desiderable to disable this behaviour setting this to 'off'. | |
| 10659 | Note: after changing this, Squid service must be restarted. | |
| 10660 | DOC_END | |
| 10661 | ||
| 10662 | NAME: eui_lookup | |
| 10663 | TYPE: onoff | |
| 10664 | IFDEF: USE_SQUID_EUI | |
| 10665 | DEFAULT: on | |
| 10666 | LOC: Eui::TheConfig.euiLookup | |
| 10667 | DOC_START | |
| 10668 | Whether to lookup the EUI or MAC address of a connected client. | |
| 10669 | DOC_END | |
| 10670 | ||
| 10671 | NAME: max_filedescriptors max_filedesc | |
| 10672 | TYPE: int | |
| 10673 | DEFAULT: 0 | |
| 10674 | DEFAULT_DOC: Use operating system soft limit set by ulimit. | |
| 10675 | LOC: Config.max_filedescriptors | |
| 10676 | DOC_START | |
| 10677 | Set the maximum number of filedescriptors, either below the | |
| 10678 | operating system default or up to the hard limit. | |
| 10679 | ||
| 10680 | Remove from squid.conf to inherit the current ulimit soft | |
| 10681 | limit setting. | |
| 10682 | ||
| 10683 | Note: Changing this requires a restart of Squid. Also | |
| 10684 | not all I/O types supports large values (eg on Windows). | |
| 10685 | DOC_END | |
| 10686 | ||
| 10687 | NAME: force_request_body_continuation | |
| 10688 | TYPE: acl_access | |
| 10689 | LOC: Config.accessList.forceRequestBodyContinuation | |
| 10690 | DEFAULT: none | |
| 10691 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
| 10692 | DOC_START | |
| 10693 | This option controls how Squid handles data upload requests from HTTP | |
| 10694 | and FTP agents that require a "Please Continue" control message response | |
| 10695 | to actually send the request body to Squid. It is mostly useful in | |
| 10696 | adaptation environments. | |
| 10697 | ||
| 10698 | When Squid receives an HTTP request with an "Expect: 100-continue" | |
| 10699 | header or an FTP upload command (e.g., STOR), Squid normally sends the | |
| 10700 | request headers or FTP command information to an adaptation service (or | |
| 10701 | peer) and waits for a response. Most adaptation services (and some | |
| 10702 | broken peers) may not respond to Squid at that stage because they may | |
| 10703 | decide to wait for the HTTP request body or FTP data transfer. However, | |
| 10704 | that request body or data transfer may never come because Squid has not | |
| 10705 | responded with the HTTP 100 or FTP 150 (Please Continue) control message | |
| 10706 | to the request sender yet! | |
| 10707 | ||
| 10708 | An allow match tells Squid to respond with the HTTP 100 or FTP 150 | |
| 10709 | (Please Continue) control message on its own, before forwarding the | |
| 10710 | request to an adaptation service or peer. Such a response usually forces | |
| 10711 | the request sender to proceed with sending the body. A deny match tells | |
| 10712 | Squid to delay that control response until the origin server confirms | |
| 10713 | that the request body is needed. Delaying is the default behavior. | |
| 10714 | DOC_END | |
| 10715 | ||
| 10716 | NAME: http_upgrade_request_protocols | |
| 10717 | TYPE: http_upgrade_request_protocols | |
| 10718 | LOC: Config.http_upgrade_request_protocols | |
| 10719 | DEFAULT: none | |
| 10720 | DEFAULT_DOC: Upgrade header dropped, effectively blocking an upgrade attempt. | |
| 10721 | DOC_START | |
| 10722 | Controls client-initiated and server-confirmed switching from HTTP to | |
| 10723 | another protocol (or to several protocols) using HTTP Upgrade mechanism | |
| 10724 | defined in RFC 7230 Section 6.7. Squid itself does not understand the | |
| 10725 | protocols being upgraded to and participates in the upgraded | |
| 10726 | communication only as a dumb TCP proxy. Admins should not allow | |
| 10727 | upgrading to protocols that require a more meaningful proxy | |
| 10728 | participation. | |
| 10729 | ||
| 10730 | Usage: http_upgrade_request_protocols <protocol> allow|deny [!]acl ... | |
| 10731 | ||
| 10732 | The required "protocol" parameter is either an all-caps word OTHER or an | |
| 10733 | explicit protocol name (e.g. "WebSocket") optionally followed by a slash | |
| 10734 | and a version token (e.g. "HTTP/3"). Explicit protocol names and | |
| 10735 | versions are case sensitive. | |
| 10736 | ||
| 10737 | When an HTTP client sends an Upgrade request header, Squid iterates over | |
| 10738 | the client-offered protocols and, for each protocol P (with an optional | |
| 10739 | version V), evaluates the first non-empty set of | |
| 10740 | http_upgrade_request_protocols rules (if any) from the following list: | |
| 10741 | ||
| 10742 | * All rules with an explicit protocol name equal to P. | |
| 10743 | * All rules that use OTHER instead of a protocol name. | |
| 10744 | ||
| 10745 | In other words, rules using OTHER are considered for protocol P if and | |
| 10746 | only if there are no rules mentioning P by name. | |
| 10747 | ||
| 10748 | If both of the above sets are empty, then Squid removes protocol P from | |
| 10749 | the Upgrade offer. | |
| 10750 | ||
| 10751 | If the client sent a versioned protocol offer P/X, then explicit rules | |
| 10752 | referring to the same-name but different-version protocol P/Y are | |
| 10753 | declared inapplicable. Inapplicable rules are not evaluated (i.e. are | |
| 10754 | ignored). However, inapplicable rules still belong to the first set of | |
| 10755 | rules for P. | |
| 10756 | ||
| 10757 | Within the applicable rule subset, individual rules are evaluated in | |
| 10758 | their configuration order. If all ACLs of an applicable "allow" rule | |
| 10759 | match, then the protocol offered by the client is forwarded to the next | |
| 10760 | hop as is. If all ACLs of an applicable "deny" rule match, then the | |
| 10761 | offer is dropped. If no applicable rules have matching ACLs, then the | |
| 10762 | offer is also dropped. The first matching rule also ends rules | |
| 10763 | evaluation for the offered protocol. | |
| 10764 | ||
| 10765 | If all client-offered protocols are removed, then Squid forwards the | |
| 10766 | client request without the Upgrade header. Squid never sends an empty | |
| 10767 | Upgrade request header. | |
| 10768 | ||
| 10769 | An Upgrade request header with a value violating HTTP syntax is dropped | |
| 10770 | and ignored without an attempt to use extractable individual protocol | |
| 10771 | offers. | |
| 10772 | ||
| 10773 | Upon receiving an HTTP 101 (Switching Protocols) control message, Squid | |
| 10774 | checks that the server listed at least one protocol name and sent a | |
| 10775 | Connection:upgrade response header. Squid does not understand individual | |
| 10776 | protocol naming and versioning concepts enough to implement stricter | |
| 10777 | checks, but an admin can restrict HTTP 101 (Switching Protocols) | |
| 10778 | responses further using http_reply_access. Responses denied by | |
| 10779 | http_reply_access rules and responses flagged by the internal Upgrade | |
| 10780 | checks result in HTTP 502 (Bad Gateway) ERR_INVALID_RESP errors and | |
| 10781 | Squid-to-server connection closures. | |
| 10782 | ||
| 10783 | If Squid sends an Upgrade request header, and the next hop (e.g., the | |
| 10784 | origin server) responds with an acceptable HTTP 101 (Switching | |
| 10785 | Protocols), then Squid forwards that message to the client and becomes | |
| 10786 | a TCP tunnel. | |
| 10787 | ||
| 10788 | The presence of an Upgrade request header alone does not preclude cache | |
| 10789 | lookups. In other words, an Upgrade request might be satisfied from the | |
| 10790 | cache, using regular HTTP caching rules. | |
| 10791 | ||
| 10792 | This clause only supports fast acl types. | |
| 10793 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 10794 | ||
| 10795 | Each of the following groups of configuration lines represents a | |
| 10796 | separate configuration example: | |
| 10797 | ||
| 10798 | # never upgrade to protocol Foo; all others are OK | |
| 10799 | http_upgrade_request_protocols Foo deny all | |
| 10800 | http_upgrade_request_protocols OTHER allow all | |
| 10801 | ||
| 10802 | # only allow upgrades to protocol Bar (except for its first version) | |
| 10803 | http_upgrade_request_protocols Bar/1 deny all | |
| 10804 | http_upgrade_request_protocols Bar allow all | |
| 10805 | http_upgrade_request_protocols OTHER deny all # this rule is optional | |
| 10806 | ||
| 10807 | # only allow upgrades to protocol Baz, and only if Baz is the only offer | |
| 10808 | acl UpgradeHeaderHasMultipleOffers ... | |
| 10809 | http_upgrade_request_protocols Baz deny UpgradeHeaderHasMultipleOffers | |
| 10810 | http_upgrade_request_protocols Baz allow all | |
| 10811 | DOC_END | |
| 10812 | ||
| 10813 | NAME: server_pconn_for_nonretriable | |
| 10814 | TYPE: acl_access | |
| 10815 | DEFAULT: none | |
| 10816 | DEFAULT_DOC: Open new connections for forwarding requests Squid cannot retry safely. | |
| 10817 | LOC: Config.accessList.serverPconnForNonretriable | |
| 10818 | DOC_START | |
| 10819 | This option provides fine-grained control over persistent connection | |
| 10820 | reuse when forwarding HTTP requests that Squid cannot retry. It is useful | |
| 10821 | in environments where opening new connections is very expensive | |
| 10822 | (e.g., all connections are secured with TLS with complex client and server | |
| 10823 | certificate validation) and race conditions associated with persistent | |
| 10824 | connections are very rare and/or only cause minor problems. | |
| 10825 | ||
| 10826 | HTTP prohibits retrying unsafe and non-idempotent requests (e.g., POST). | |
| 10827 | Squid limitations also prohibit retrying all requests with bodies (e.g., PUT). | |
| 10828 | By default, when forwarding such "risky" requests, Squid opens a new | |
| 10829 | connection to the server or cache_peer, even if there is an idle persistent | |
| 10830 | connection available. When Squid is configured to risk sending a non-retriable | |
| 10831 | request on a previously used persistent connection, and the server closes | |
| 10832 | the connection before seeing that risky request, the user gets an error response | |
| 10833 | from Squid. In most cases, that error response will be HTTP 502 (Bad Gateway) | |
| 10834 | with ERR_ZERO_SIZE_OBJECT or ERR_WRITE_ERROR (peer connection reset) error detail. | |
| 10835 | ||
| 10836 | If an allow rule matches, Squid reuses an available idle persistent connection | |
| 10837 | (if any) for the request that Squid cannot retry. If a deny rule matches, then | |
| 10838 | Squid opens a new connection for the request that Squid cannot retry. | |
| 10839 | ||
| 10840 | This option does not affect requests that Squid can retry. They will reuse idle | |
| 10841 | persistent connections (if any). | |
| 10842 | ||
| 10843 | This clause only supports fast acl types. | |
| 10844 | See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
| 10845 | ||
| 10846 | Example: | |
| 10847 | acl SpeedIsWorthTheRisk method POST | |
| 10848 | server_pconn_for_nonretriable allow SpeedIsWorthTheRisk | |
| 10849 | DOC_END | |
| 10850 | ||
| 10851 | NAME: happy_eyeballs_connect_timeout | |
| 10852 | COMMENT: (msec) | |
| 10853 | TYPE: int | |
| 10854 | DEFAULT: 250 | |
| 10855 | LOC: Config.happyEyeballs.connect_timeout | |
| 10856 | DOC_START | |
| 10857 | This Happy Eyeballs (RFC 8305) tuning directive specifies the minimum | |
| 10858 | delay between opening a primary to-server connection and opening a | |
| 10859 | spare to-server connection for the same master transaction. This delay | |
| 10860 | is similar to the Connection Attempt Delay in RFC 8305, but it is only | |
| 10861 | applied to the first spare connection attempt. Subsequent spare | |
| 10862 | connection attempts use happy_eyeballs_connect_gap, and primary | |
| 10863 | connection attempts are not artificially delayed at all. | |
| 10864 | ||
| 10865 | Terminology: The "primary" and "spare" designations are determined by | |
| 10866 | the order of DNS answers received by Squid: If Squid DNS AAAA query | |
| 10867 | was answered first, then primary connections are connections to IPv6 | |
| 10868 | peer addresses (while spare connections use IPv4 addresses). | |
| 10869 | Similarly, if Squid DNS A query was answered first, then primary | |
| 10870 | connections are connections to IPv4 peer addresses (while spare | |
| 10871 | connections use IPv6 addresses). | |
| 10872 | ||
| 10873 | Shorter happy_eyeballs_connect_timeout values reduce master | |
| 10874 | transaction response time, potentially improving user-perceived | |
| 10875 | response times (i.e., making user eyeballs happier). Longer delays | |
| 10876 | reduce both concurrent connection level and server bombardment with | |
| 10877 | connection requests, potentially improving overall Squid performance | |
| 10878 | and reducing the chance of being blocked by servers for opening too | |
| 10879 | many unused connections. | |
| 10880 | ||
| 10881 | RFC 8305 prohibits happy_eyeballs_connect_timeout values smaller than | |
| 10882 | 10 (milliseconds) to "avoid congestion collapse in the presence of | |
| 10883 | high packet-loss rates". | |
| 10884 | ||
| 10885 | The following Happy Eyeballs directives place additional connection | |
| 10886 | opening restrictions: happy_eyeballs_connect_gap and | |
| 10887 | happy_eyeballs_connect_limit. | |
| 10888 | DOC_END | |
| 10889 | ||
| 10890 | NAME: happy_eyeballs_connect_gap | |
| 10891 | COMMENT: (msec) | |
| 10892 | TYPE: int | |
| 10893 | DEFAULT: -1 | |
| 10894 | DEFAULT_DOC: no artificial delays between spare attempts | |
| 10895 | LOC: Config.happyEyeballs.connect_gap | |
| 10896 | DOC_START | |
| 10897 | This Happy Eyeballs (RFC 8305) tuning directive specifies the | |
| 10898 | minimum delay between opening spare to-server connections (to any | |
| 10899 | server; i.e. across all concurrent master transactions in a Squid | |
| 10900 | instance). Each SMP worker currently multiplies the configured gap | |
| 10901 | by the total number of workers so that the combined spare connection | |
| 10902 | opening rate of a Squid instance obeys the configured limit. The | |
| 10903 | workers do not coordinate connection openings yet; a micro burst | |
| 10904 | of spare connection openings may violate the configured gap. | |
| 10905 | ||
| 10906 | This directive has similar trade-offs as | |
| 10907 | happy_eyeballs_connect_timeout, but its focus is on limiting traffic | |
| 10908 | amplification effects for Squid as a whole, while | |
| 10909 | happy_eyeballs_connect_timeout works on an individual master | |
| 10910 | transaction level. | |
| 10911 | ||
| 10912 | The following Happy Eyeballs directives place additional connection | |
| 10913 | opening restrictions: happy_eyeballs_connect_timeout and | |
| 10914 | happy_eyeballs_connect_limit. See the former for related terminology. | |
| 10915 | DOC_END | |
| 10916 | ||
| 10917 | NAME: happy_eyeballs_connect_limit | |
| 10918 | TYPE: int | |
| 10919 | DEFAULT: -1 | |
| 10920 | DEFAULT_DOC: no artificial limit on the number of concurrent spare attempts | |
| 10921 | LOC: Config.happyEyeballs.connect_limit | |
| 10922 | DOC_START | |
| 10923 | This Happy Eyeballs (RFC 8305) tuning directive specifies the | |
| 10924 | maximum number of spare to-server connections (to any server; i.e. | |
| 10925 | across all concurrent master transactions in a Squid instance). | |
| 10926 | Each SMP worker gets an equal share of the total limit. However, | |
| 10927 | the workers do not share the actual connection counts yet, so one | |
| 10928 | (busier) worker cannot "borrow" spare connection slots from another | |
| 10929 | (less loaded) worker. | |
| 10930 | ||
| 10931 | Setting this limit to zero disables concurrent use of primary and | |
| 10932 | spare TCP connections: Spare connection attempts are made only after | |
| 10933 | all primary attempts fail. However, Squid would still use the | |
| 10934 | DNS-related optimizations of the Happy Eyeballs approach. | |
| 10935 | ||
| 10936 | This directive has similar trade-offs as happy_eyeballs_connect_gap, | |
| 10937 | but its focus is on limiting Squid overheads, while | |
| 10938 | happy_eyeballs_connect_gap focuses on the origin server and peer | |
| 10939 | overheads. | |
| 10940 | ||
| 10941 | The following Happy Eyeballs directives place additional connection | |
| 10942 | opening restrictions: happy_eyeballs_connect_timeout and | |
| 10943 | happy_eyeballs_connect_gap. See the former for related terminology. | |
| 10944 | DOC_END | |
| 10945 | ||
| 10946 | EOF |