1 ## Copyright (C) 1996-2020 The Squid Software Foundation and contributors
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.
10 ----------------------------
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/
16 You may wish to look at the Squid home page and wiki for the
17 FAQ and other documentation:
18 http://www.squid-cache.org/
19 http://wiki.squid-cache.org/SquidFaq
20 http://wiki.squid-cache.org/ConfigExamples
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.
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.
33 Configuration options can be included using the "include" directive.
34 Include takes a list of files to include. Quoting and wildcards are
39 include /path/to/included/file/squid.acl.config
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
46 Values with byte units
48 Squid accepts size units on some size related directives. All
49 such directives are documented with a default value displaying
52 Units accepted by Squid are:
54 KB - Kilobyte (1024 bytes)
58 Values with time units
60 Time-related directives marked with either "time-units" or
61 "time-units-small" accept a time unit. The supported time units are:
63 nanosecond (time-units-small only)
64 microsecond (time-units-small only)
73 year - 31557790080 milliseconds (just over 365 days)
76 Values with spaces, quotes, and other special characters
78 Squid supports directive parameters with spaces, quotes, and other
79 special characters. Surround such parameters with "double quotes". Use
80 the configuration_includes_quoted_values directive to enable or
83 Squid supports reading configuration option parameters from external
84 files using the syntax:
85 parameters("/path/filename")
87 acl whitelist dstdomain parameters("/etc/squid/whitelist.txt")
89 Conditional configuration
91 If-statements can be used to make configuration directives
95 ... regular configuration directives ...
97 ... regular configuration directives ...]
100 The else part is optional. The keywords "if", "else", and "endif"
101 must be typed on their own lines, as if they were regular
102 configuration directives.
104 NOTE: An else-if condition is not supported.
106 These individual conditions types are supported:
109 Always evaluates to true.
111 Always evaluates to false.
112 <integer> = <integer>
113 Equality comparison of two integer numbers.
118 The following SMP-related preprocessor macros can be used.
120 ${process_name} expands to the current Squid process "name"
121 (e.g., squid1, squid2, or cache1).
123 ${process_number} expands to the current Squid process
124 identifier, which is an integer number (e.g., 1, 2, 3) unique
125 across all Squid processes of the current service instance.
127 ${service_name} expands into the current Squid service instance
128 name identifier which is provided by -n on the command line.
132 Logformat macros can be used in many places outside of the logformat
133 directive. In theory, all of the logformat codes can be used as %macros,
134 where they are supported. In practice, a %macro expands as a dash (-) when
135 the transaction does not yet have enough information and a value is needed.
137 There is no definitive list of what tokens are available at the various
138 stages of the transaction.
140 And some information may already be available to Squid but not yet
141 committed where the macro expansion code can access it (report
142 such instances!). The macro will be expanded into a single dash
143 ('-') in such cases. Not all macros have been tested.
147 # options still not yet ported from 2.7 to 3.x
148 NAME: broken_vary_encoding
151 This option is not yet supported by Squid-3.
157 This option is not yet supported by Squid-3.
163 This option is not yet supported by Squid-3.
166 NAME: external_refresh_check
169 This option is not yet supported by Squid-3.
172 NAME: location_rewrite_program location_rewrite_access location_rewrite_children location_rewrite_concurrency
175 This option is not yet supported by Squid-3.
178 NAME: refresh_stale_hit
181 This option is not yet supported by Squid-3.
184 # Options removed in 4.x
185 NAME: cache_peer_domain cache_host_domain
188 Replace with dstdomain ACLs and cache_peer_access.
194 Remove this line. The behaviour enabled by this is no longer needed.
197 NAME: sslproxy_cafile
200 Remove this line. Use tls_outgoing_options cafile= instead.
203 NAME: sslproxy_capath
206 Remove this line. Use tls_outgoing_options capath= instead.
209 NAME: sslproxy_cipher
212 Remove this line. Use tls_outgoing_options cipher= instead.
215 NAME: sslproxy_client_certificate
218 Remove this line. Use tls_outgoing_options cert= instead.
221 NAME: sslproxy_client_key
224 Remove this line. Use tls_outgoing_options key= instead.
230 Remove this line. Use tls_outgoing_options flags= instead.
233 NAME: sslproxy_options
236 Remove this line. Use tls_outgoing_options options= instead.
239 NAME: sslproxy_version
242 Remove this line. Use tls_outgoing_options options= instead.
245 # Options removed in 3.5
246 NAME: hierarchy_stoplist
249 Remove this line. Use always_direct or cache_peer_access ACLs instead if you need to prevent cache_peer use.
252 # Options removed in 3.4
256 Remove this line. Use acls with access_log directives to control access logging
262 Remove this line. Use acls with icap_log directives to control icap logging
265 # Options Removed in 3.3
266 NAME: ignore_ims_on_miss
269 Remove this line. The HTTP/1.1 feature is now configured by 'cache_miss_revalidate'.
272 # Options Removed in 3.2
273 NAME: balance_on_multiple_ip
276 Remove this line. Squid performs a 'Happy Eyeballs' algorithm, this multiple-IP algorithm is not longer relevant.
279 NAME: chunked_request_body_max_size
282 Remove this line. Squid is now HTTP/1.1 compliant.
285 NAME: dns_v4_fallback
288 Remove this line. Squid performs a 'Happy Eyeballs' algorithm, the 'fallback' algorithm is no longer relevant.
291 NAME: emulate_httpd_log
294 Replace this with an access_log directive using the format 'common' or 'combined'.
300 Use a regular access.log with ACL limiting it to MISS events.
306 Remove this line. Configure FTP page display using the CSS controls in errorpages.css instead.
309 NAME: ignore_expect_100
312 Remove this line. The HTTP/1.1 feature is now fully supported by default.
318 Remove this option from your config. To log FQDN use %>A in the log format.
321 NAME: log_ip_on_direct
324 Remove this option from your config. To log server or peer names use %<A in the log format.
327 NAME: maximum_single_addr_tries
330 Replaced by connect_retries. The behaviour has changed, please read the documentation before altering.
333 NAME: referer_log referrer_log
336 Replace this with an access_log directive using the format 'referrer'.
342 Remove this line. The feature is supported by default in storage types where update is implemented.
345 NAME: url_rewrite_concurrency
348 Remove this line. Set the 'concurrency=' option of url_rewrite_children instead.
354 Replace this with an access_log directive using the format 'useragent'.
357 # Options Removed in 3.1
361 Remove this line. DNS is no longer tested on startup.
364 NAME: extension_methods
367 Remove this line. All valid methods for HTTP are accepted by default.
370 # 2.7 Options Removed/Replaced in 3.2
375 # 2.7 Options Removed/Replaced in 3.1
383 Remove this line. HTTP/1.1 is supported by default.
386 NAME: upgrade_http0.9
389 Remove this line. ICY/1.0 streaming protocol is supported by default.
392 NAME: zph_local zph_mode zph_option zph_parent zph_sibling
395 Alter these entries. Use the qos_flows directive instead.
398 # Options Removed in 3.0
402 Since squid-3.0 replace with request_header_access or reply_header_access
403 depending on whether you wish to match client requests or server replies.
406 NAME: httpd_accel_no_pmtu_disc
409 Since squid-3.0 use the 'disable-pmtu-discovery' flag on http_port instead.
412 NAME: wais_relay_host
415 Replace this line with 'cache_peer' configuration.
418 NAME: wais_relay_port
421 Replace this line with 'cache_peer' configuration.
426 -----------------------------------------------------------------------------
433 DEFAULT_DOC: SMP support disabled.
435 Number of main Squid processes or "workers" to fork and maintain.
436 0: "no daemon" mode, like running "squid -N ..."
437 1: "no SMP" mode, start one main Squid process daemon (default)
438 N: start N main Squid process daemons (i.e., SMP mode)
440 In SMP mode, each worker does nearly all what a single Squid daemon
441 does (e.g., listen on http_port and forward HTTP requests).
444 NAME: cpu_affinity_map
446 LOC: Config.cpuAffinityMap
448 DEFAULT_DOC: Let operating system decide.
450 Usage: cpu_affinity_map process_numbers=P1,P2,... cores=C1,C2,...
452 Sets 1:1 mapping between Squid processes and CPU cores. For example,
454 cpu_affinity_map process_numbers=1,2,3,4 cores=1,3,5,7
456 affects processes 1 through 4 only and places them on the first
457 four even cores, starting with core #1.
459 CPU cores are numbered starting from 1. Requires support for
460 sched_getaffinity(2) and sched_setaffinity(2) system calls.
462 Multiple cpu_affinity_map options are merged.
467 NAME: shared_memory_locking
470 LOC: Config.shmLocking
473 Whether to ensure that all required shared memory is available by
474 "locking" that shared memory into RAM when Squid starts. The
475 alternative is faster startup time followed by slightly slower
476 performance and, if not enough RAM is actually available during
477 runtime, mysterious crashes.
479 SMP Squid uses many shared memory segments. These segments are
480 brought into Squid memory space using an mmap(2) system call. During
481 Squid startup, the mmap() call often succeeds regardless of whether
482 the system has enough RAM. In general, Squid cannot tell whether the
483 kernel applies this "optimistic" memory allocation policy (but
484 popular modern kernels usually use it).
486 Later, if Squid attempts to actually access the mapped memory
487 regions beyond what the kernel is willing to allocate, the
488 "optimistic" kernel simply kills Squid kid with a SIGBUS signal.
489 Some of the memory limits enforced by the kernel are currently
490 poorly understood: We do not know how to detect and check them. This
491 option ensures that the mapped memory will be available.
493 This option may have a positive performance side-effect: Locking
494 memory at start avoids runtime paging I/O. Paging slows Squid down.
496 Locking memory may require a large enough RLIMIT_MEMLOCK OS limit,
497 CAP_IPC_LOCK capability, or equivalent.
500 NAME: hopeless_kid_revival_delay
503 LOC: Config.hopelessKidRevivalDelay
506 Normally, when a kid process dies, Squid immediately restarts the
507 kid. A kid experiencing frequent deaths is marked as "hopeless" for
508 the duration specified by this directive. Hopeless kids are not
509 automatically restarted.
511 Currently, zero values are not supported because they result in
512 misconfigured SMP Squid instances running forever, endlessly
513 restarting each dying kid. To effectively disable hopeless kids
514 revival, set the delay to a huge value (e.g., 1 year).
516 Reconfiguration also clears all hopeless kids designations, allowing
517 for manual revival of hopeless kids.
521 OPTIONS FOR AUTHENTICATION
522 -----------------------------------------------------------------------------
528 LOC: Auth::TheConfig.schemes
531 This is used to define parameters for the various authentication
532 schemes supported by Squid.
534 format: auth_param scheme parameter [setting]
536 The order in which authentication schemes are presented to the client is
537 dependent on the order the scheme first appears in config file. IE
538 has a bug (it's not RFC 2617 compliant) in that it will use the basic
539 scheme if basic is the first entry presented, even if more secure
540 schemes are presented. For now use the order in the recommended
541 settings section below. If other browsers have difficulties (don't
542 recognize the schemes offered even if you are using basic) either
543 put basic first, or disable the other schemes (by commenting out their
546 Once an authentication scheme is fully configured, it can only be
547 shutdown by shutting squid down and restarting. Changes can be made on
548 the fly and activated with a reconfigure. I.E. You can change to a
549 different helper, but not unconfigure the helper completely.
551 Please note that while this directive defines how Squid processes
552 authentication it does not automatically activate authentication.
553 To use authentication you must in addition make use of ACLs based
554 on login name in http_access (proxy_auth, proxy_auth_regex or
555 external with %LOGIN used in the format tag). The browser will be
556 challenged for authentication on the first such acl encountered
557 in http_access processing and will also be re-challenged for new
558 login credentials if the request is being denied by a proxy_auth
561 WARNING: authentication can't be used in a transparently intercepting
562 proxy as the client then thinks it is talking to an origin server and
563 not the proxy. This is a limitation of bending the TCP/IP protocol to
564 transparently intercepting port 80, not a limitation in Squid.
565 Ports flagged 'transparent', 'intercept', or 'tproxy' have
566 authentication disabled.
568 === Parameters common to all schemes. ===
571 Specifies the command for the external authenticator.
573 By default, each authentication scheme is not used unless a
574 program is specified.
576 See http://wiki.squid-cache.org/Features/AddonHelpers for
577 more details on helper operations and creating your own.
580 Specifies a string to be append to request line format for
581 the authentication helper. "Quoted" format values may contain
582 spaces and logformat %macros. In theory, any logformat %macro
583 can be used. In practice, a %macro expands as a dash (-) if
584 the helper request is sent before the required macro
585 information is available to Squid.
587 By default, Squid uses request formats provided in
588 scheme-specific examples below (search for %credentials).
590 The expanded key_extras value is added to the Squid credentials
591 cache and, hence, will affect authentication. It can be used to
592 authenticate different users with identical user names (e.g.,
593 when user authentication depends on http_port).
595 Avoid adding frequently changing information to key_extras. For
596 example, if you add user source IP, and it changes frequently
597 in your environment, then max_user_ip ACL is going to treat
598 every user+IP combination as a unique "user", breaking the ACL
599 and wasting a lot of memory on those user records. It will also
600 force users to authenticate from scratch whenever their IP
604 Specifies the protection scope (aka realm name) which is to be
605 reported to the client for the authentication scheme. It is
606 commonly part of the text the user will see when prompted for
607 their username and password.
609 For Basic the default is "Squid proxy-caching web server".
610 For Digest there is no default, this parameter is mandatory.
611 For NTLM and Negotiate this parameter is ignored.
613 "children" numberofchildren [startup=N] [idle=N] [concurrency=N]
614 [queue-size=N] [on-persistent-overload=action]
615 [reservation-timeout=seconds]
617 The maximum number of authenticator processes to spawn. If
618 you start too few Squid will have to wait for them to process
619 a backlog of credential verifications, slowing it down. When
620 password verifications are done via a (slow) network you are
621 likely to need lots of authenticator processes.
623 The startup= and idle= options permit some skew in the exact
624 amount run. A minimum of startup=N will begin during startup
625 and reconfigure. Squid will start more in groups of up to
626 idle=N in an attempt to meet traffic needs and to keep idle=N
627 free above those traffic needs up to the maximum.
629 The concurrency= option sets the number of concurrent requests
630 the helper can process. The default of 0 is used for helpers
631 who only supports one request at a time. Setting this to a
632 number greater than 0 changes the protocol used to include a
633 channel ID field first on the request/response line, allowing
634 multiple requests to be sent to the same helper in parallel
635 without waiting for the response.
637 Concurrency must not be set unless it's known the helper
638 supports the input format with channel-ID fields.
640 The queue-size option sets the maximum number of queued
641 requests. A request is queued when no existing child can
642 accept it due to concurrency limit and no new child can be
643 started due to numberofchildren limit. The default maximum is
644 2*numberofchildren. Squid is allowed to temporarily exceed the
645 configured maximum, marking the affected helper as
646 "overloaded". If the helper overload lasts more than 3
647 minutes, the action prescribed by the on-persistent-overload
650 The on-persistent-overload=action option specifies Squid
651 reaction to a new helper request arriving when the helper
652 has been overloaded for more that 3 minutes already. The number
653 of queued requests determines whether the helper is overloaded
654 (see the queue-size option).
656 Two actions are supported:
658 die Squid worker quits. This is the default behavior.
660 ERR Squid treats the helper request as if it was
661 immediately submitted, and the helper immediately
662 replied with an ERR response. This action has no effect
663 on the already queued and in-progress helper requests.
665 NOTE: NTLM and Negotiate schemes do not support concurrency
666 in the Squid code module even though some helpers can.
668 The reservation-timeout=seconds option allows NTLM and Negotiate
669 helpers to forget about clients that abandon their in-progress
670 connection authentication without closing the connection. The
671 timeout is measured since the last helper response received by
672 Squid for the client. Fractional seconds are not supported.
674 After the timeout, the helper will be used for other clients if
675 there are no unreserved helpers available. In the latter case,
676 the old client attempt to resume authentication will not be
677 forwarded to the helper (and the client should open a new HTTP
678 connection and retry authentication from scratch).
680 By default, reservations do not expire and clients that keep
681 their connections open without completing authentication may
682 exhaust all NTLM and Negotiate helpers.
685 If you experience problems with PUT/POST requests when using
686 the NTLM or Negotiate schemes then you can try setting this
687 to off. This will cause Squid to forcibly close the connection
688 on the initial request where the browser asks which schemes
689 are supported by the proxy.
691 For Basic and Digest this parameter is ignored.
694 Useful for sending credentials to authentication backends that
695 expect UTF-8 encoding (e.g., LDAP).
697 When this option is enabled, Squid uses HTTP Accept-Language
698 request header to guess the received credentials encoding
699 (ISO-Latin-1, CP1251, or UTF-8) and then converts the first
700 two encodings into UTF-8.
702 When this option is disabled and by default, Squid sends
703 credentials in their original (i.e. received) encoding.
705 This parameter is only honored for Basic and Digest schemes.
706 For Basic, the entire username:password credentials are
707 checked and, if necessary, re-encoded. For Digest -- just the
708 username component. For NTLM and Negotiate schemes, this
709 parameter is ignored.
711 IF HAVE_AUTH_MODULE_BASIC
712 === Basic authentication parameters ===
714 "credentialsttl" timetolive
715 Specifies how long squid assumes an externally validated
716 username:password pair is valid for - in other words how
717 often the helper program is called for that user. Set this
718 low to force revalidation with short lived passwords.
720 NOTE: setting this high does not impact your susceptibility
721 to replay attacks unless you are using an one-time password
722 system (such as SecureID). If you are using such a system,
723 you will be vulnerable to replay attacks unless you also
724 use the max_user_ip ACL in an http_access rule.
726 "casesensitive" on|off
727 Specifies if usernames are case sensitive. Most user databases
728 are case insensitive allowing the same username to be spelled
729 using both lower and upper case letters, but some are case
730 sensitive. This makes a big difference for user_max_ip ACL
731 processing and similar.
734 IF HAVE_AUTH_MODULE_DIGEST
735 === Digest authentication parameters ===
737 "nonce_garbage_interval" timeinterval
738 Specifies the interval that nonces that have been issued
739 to client_agent's are checked for validity.
741 "nonce_max_duration" timeinterval
742 Specifies the maximum length of time a given nonce will be
745 "nonce_max_count" number
746 Specifies the maximum number of times a given nonce can be
749 "nonce_strictness" on|off
750 Determines if squid requires strict increment-by-1 behavior
751 for nonce counts, or just incrementing (off - for use when
752 user agents generate nonce counts that occasionally miss 1
753 (ie, 1,2,4,6)). Default off.
755 "check_nonce_count" on|off
756 This directive if set to off can disable the nonce count check
757 completely to work around buggy digest qop implementations in
758 certain mainstream browser versions. Default on to check the
759 nonce count to protect from authentication replay attacks.
761 "post_workaround" on|off
762 This is a workaround to certain buggy browsers who send an
763 incorrect request digest in POST requests when reusing the
764 same nonce as acquired earlier on a GET request.
768 === Example Configuration ===
770 This configuration displays the recommended authentication scheme
771 order from most to least secure with recommended minimum configuration
772 settings for each scheme:
774 #auth_param negotiate program <uncomment and complete this line to activate>
775 #auth_param negotiate children 20 startup=0 idle=1
777 #auth_param digest program <uncomment and complete this line to activate>
778 #auth_param digest children 20 startup=0 idle=1
779 #auth_param digest realm Squid proxy-caching web server
780 #auth_param digest nonce_garbage_interval 5 minutes
781 #auth_param digest nonce_max_duration 30 minutes
782 #auth_param digest nonce_max_count 50
784 #auth_param ntlm program <uncomment and complete this line to activate>
785 #auth_param ntlm children 20 startup=0 idle=1
787 #auth_param basic program <uncomment and complete this line>
788 #auth_param basic children 5 startup=5 idle=1
789 #auth_param basic credentialsttl 2 hours
792 NAME: authenticate_cache_garbage_interval
796 LOC: Auth::TheConfig.garbageCollectInterval
798 The time period between garbage collection across the username cache.
799 This is a trade-off between memory utilization (long intervals - say
800 2 days) and CPU (short intervals - say 1 minute). Only change if you
804 NAME: authenticate_ttl
808 LOC: Auth::TheConfig.credentialsTtl
810 The time a user & their credentials stay in the logged in
811 user cache since their last request. When the garbage
812 interval passes, all user credentials that have passed their
813 TTL are removed from memory.
816 NAME: authenticate_ip_ttl
819 LOC: Auth::TheConfig.ipTtl
822 If you use proxy authentication and the 'max_user_ip' ACL,
823 this directive controls how long Squid remembers the IP
824 addresses associated with each user. Use a small value
825 (e.g., 60 seconds) if your users might change addresses
826 quickly, as is the case with dialup. You might be safe
827 using a larger value (e.g., 2 hours) in a corporate LAN
828 environment with relatively static address assignments.
833 -----------------------------------------------------------------------------
836 NAME: external_acl_type
837 TYPE: externalAclHelper
838 LOC: Config.externalAclHelperList
841 This option defines external acl classes using a helper program
842 to look up the status
844 external_acl_type name [options] FORMAT /path/to/helper [helper arguments]
848 ttl=n TTL in seconds for cached results (defaults to 3600
852 TTL for cached negative lookups (default same
855 grace=n Percentage remaining of TTL where a refresh of a
856 cached entry should be initiated without needing to
857 wait for a new reply. (default is for no grace period)
859 cache=n The maximum number of entries in the result cache. The
860 default limit is 262144 entries. Each cache entry usually
861 consumes at least 256 bytes. Squid currently does not remove
862 expired cache entries until the limit is reached, so a proxy
863 will sooner or later reach the limit. The expanded FORMAT
864 value is used as the cache key, so if the details in FORMAT
865 are highly variable, a larger cache may be needed to produce
866 reduction in helper load.
869 Maximum number of acl helper processes spawned to service
870 external acl lookups of this type. (default 5)
873 Minimum number of acl helper processes to spawn during
874 startup and reconfigure to service external acl lookups
875 of this type. (default 0)
878 Number of acl helper processes to keep ahead of traffic
879 loads. Squid will spawn this many at once whenever load
880 rises above the capabilities of existing processes.
881 Up to the value of children-max. (default 1)
883 concurrency=n concurrency level per process. Only used with helpers
884 capable of processing more than one query at a time.
886 queue-size=N The queue-size option sets the maximum number of
887 queued requests. A request is queued when no existing
888 helper can accept it due to concurrency limit and no
889 new helper can be started due to children-max limit.
890 If the queued requests exceed queue size, the acl is
891 ignored. The default value is set to 2*children-max.
893 protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers.
895 ipv4 / ipv6 IP protocol used to communicate with this helper.
896 The default is to auto-detect IPv6 and use it when available.
899 FORMAT is a series of %macro codes. See logformat directive for a full list
900 of the accepted codes. Although note that at the time of any external ACL
901 being tested data may not be available and thus some %macro expand to '-'.
903 In addition to the logformat codes; when processing external ACLs these
904 additional macros are made available:
906 %ACL The name of the ACL being tested.
908 %DATA The ACL arguments specified in the referencing config
909 'acl ... external' line, separated by spaces (an
910 "argument string"). see acl external.
912 If there are no ACL arguments %DATA expands to '-'.
914 If you do not specify a DATA macro inside FORMAT,
915 Squid automatically appends %DATA to your FORMAT.
916 Note that Squid-3.x may expand %DATA to whitespace
917 or nothing in this case.
919 By default, Squid applies URL-encoding to each ACL
920 argument inside the argument string. If an explicit
921 encoding modifier is used (e.g., %#DATA), then Squid
922 encodes the whole argument string as a single token
923 (e.g., with %#DATA, spaces between arguments become
926 If SSL is enabled, the following formatting codes become available:
928 %USER_CERT SSL User certificate in PEM format
929 %USER_CERTCHAIN SSL User certificate chain in PEM format
930 %USER_CERT_xx SSL User certificate subject attribute xx
931 %USER_CA_CERT_xx SSL User certificate issuer attribute xx
934 NOTE: all other format codes accepted by older Squid versions
938 General request syntax:
940 [channel-ID] FORMAT-values
943 FORMAT-values consists of transaction details expanded with
944 whitespace separation per the config file FORMAT specification
945 using the FORMAT macros listed above.
947 Request values sent to the helper are URL escaped to protect
948 each value in requests against whitespaces.
950 If using protocol=2.5 then the request sent to the helper is not
951 URL escaped to protect against whitespace.
953 NOTE: protocol=3.0 is deprecated as no longer necessary.
955 When using the concurrency= option the protocol is changed by
956 introducing a query channel tag in front of the request/response.
957 The query channel tag is a number between 0 and concurrency-1.
958 This value must be echoed back unchanged to Squid as the first part
959 of the response relating to its request.
962 The helper receives lines expanded per the above format specification
963 and for each input line returns 1 line starting with OK/ERR/BH result
964 code and optionally followed by additional keywords with more details.
967 General result syntax:
969 [channel-ID] result keyword=value ...
971 Result consists of one of the codes:
974 the ACL test produced a match.
977 the ACL test does not produce a match.
980 An internal error occurred in the helper, preventing
981 a result being identified.
983 The meaning of 'a match' is determined by your squid.conf
984 access control configuration. See the Squid wiki for details.
988 user= The users name (login)
990 password= The users password (for login= cache_peer option)
992 message= Message describing the reason for this response.
993 Available as %o in error pages.
994 Useful on (ERR and BH results).
996 tag= Apply a tag to a request. Only sets a tag once,
997 does not alter existing tags.
999 log= String to be logged in access.log. Available as
1000 %ea in logformat specifications.
1002 clt_conn_tag= Associates a TAG with the client TCP connection.
1003 Please see url_rewrite_program related documentation
1006 Any keywords may be sent on any response whether OK, ERR or BH.
1008 All response keyword values need to be a single token with URL
1009 escaping, or enclosed in double quotes (") and escaped using \ on
1010 any double quotes or \ characters within the value. The wrapping
1011 double quotes are removed before the value is interpreted by Squid.
1012 \r and \n are also replace by CR and LF.
1014 Some example key values:
1018 user="J. \"Bob\" Smith"
1025 DEFAULT: ssl::certHasExpired ssl_error X509_V_ERR_CERT_HAS_EXPIRED
1026 DEFAULT: ssl::certNotYetValid ssl_error X509_V_ERR_CERT_NOT_YET_VALID
1027 DEFAULT: ssl::certDomainMismatch ssl_error SQUID_X509_V_ERR_DOMAIN_MISMATCH
1028 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
1029 DEFAULT: ssl::certSelfSigned ssl_error X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT
1031 DEFAULT: all src all
1032 DEFAULT: manager url_regex -i ^cache_object:// +i ^https?://[^/]+/squid-internal-mgr/
1033 DEFAULT: localhost src 127.0.0.1/32 ::1
1034 DEFAULT: to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1/128 ::/128
1035 DEFAULT: CONNECT method CONNECT
1036 DEFAULT_DOC: ACLs all, manager, localhost, to_localhost, and CONNECT are predefined.
1038 Defining an Access List
1040 Every access list definition must begin with an aclname and acltype,
1041 followed by either type-specific arguments or a quoted filename that
1044 acl aclname acltype argument ...
1045 acl aclname acltype "file" ...
1047 When using "file", the file should contain one item per line.
1052 Some acl types supports options which changes their default behaviour:
1054 -i,+i By default, regular expressions are CASE-SENSITIVE. To make them
1055 case-insensitive, use the -i option. To return case-sensitive
1056 use the +i option between patterns, or make a new ACL line
1059 -n Disable lookups and address type conversions. If lookup or
1060 conversion is required because the parameter type (IP or
1061 domain name) does not match the message address type (domain
1062 name or IP), then the ACL would immediately declare a mismatch
1063 without any warnings or lookups.
1066 Perform a list membership test, interpreting values as
1067 comma-separated token lists and matching against individual
1068 tokens instead of whole values.
1069 The optional "delimiters" parameter specifies one or more
1070 alternative non-alphanumeric delimiter characters.
1071 non-alphanumeric delimiter characters.
1073 -- Used to stop processing all options, in the case the first acl
1074 value has '-' character as first character (for example the '-'
1075 is a valid domain name)
1077 Some acl types require suspending the current request in order
1078 to access some external data source.
1079 Those which do are marked with the tag [slow], those which
1080 don't are marked as [fast].
1081 See http://wiki.squid-cache.org/SquidFaq/SquidAcl
1082 for further information
1084 ***** ACL TYPES AVAILABLE *****
1086 acl aclname src ip-address/mask ... # clients IP address [fast]
1087 acl aclname src addr1-addr2/mask ... # range of addresses [fast]
1088 acl aclname dst [-n] ip-address/mask ... # URL host's IP address [slow]
1089 acl aclname localip ip-address/mask ... # IP address the client connected to [fast]
1092 acl aclname arp mac-address ...
1093 acl aclname eui64 eui64-address ...
1095 # MAC (EUI-48) and EUI-64 addresses use xx:xx:xx:xx:xx:xx notation.
1097 # The 'arp' ACL code is not portable to all operating systems.
1098 # It works on Linux, Solaris, Windows, FreeBSD, and some other
1101 # The eui_lookup directive is required to be 'on' (the default)
1102 # and Squid built with --enable-eui for MAC/EUI addresses to be
1103 # available for this ACL.
1105 # Squid can only determine the MAC/EUI address for IPv4
1106 # clients that are on the same subnet. If the client is on a
1107 # different subnet, then Squid cannot find out its address.
1109 # IPv6 protocol does not contain ARP. MAC/EUI is either
1110 # encoded directly in the IPv6 address or not available.
1112 acl aclname clientside_mark mark[/mask] ...
1113 # matches CONNMARK of an accepted connection [fast]
1114 # DEPRECATED. Use the 'client_connection_mark' instead.
1116 acl aclname client_connection_mark mark[/mask] ...
1117 # matches CONNMARK of an accepted connection [fast]
1119 # mark and mask are unsigned integers (hex, octal, or decimal).
1120 # If multiple marks are given, then the ACL matches if at least
1123 # Uses netfilter-conntrack library.
1124 # Requires building Squid with --enable-linux-netfilter.
1126 # The client, various intermediaries, and Squid itself may set
1127 # CONNMARK at various times. The last CONNMARK set wins. This ACL
1128 # checks the mark present on an accepted connection or set by
1129 # Squid afterwards, depending on the ACL check timing. This ACL
1130 # effectively ignores any mark set by other agents after Squid has
1131 # accepted the connection.
1133 acl aclname srcdomain .foo.com ...
1134 # reverse lookup, from client IP [slow]
1135 acl aclname dstdomain [-n] .foo.com ...
1136 # Destination server from URL [fast]
1137 acl aclname srcdom_regex [-i] \.foo\.com ...
1138 # regex matching client name [slow]
1139 acl aclname dstdom_regex [-n] [-i] \.foo\.com ...
1140 # regex matching server [fast]
1142 # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
1143 # based URL is used and no match is found. The name "none" is used
1144 # if the reverse lookup fails.
1146 acl aclname src_as number ...
1147 acl aclname dst_as number ...
1149 # Except for access control, AS numbers can be used for
1150 # routing of requests to specific caches. Here's an
1151 # example for routing all requests for AS#1241 and only
1152 # those to mycache.mydomain.net:
1153 # acl asexample dst_as 1241
1154 # cache_peer_access mycache.mydomain.net allow asexample
1155 # cache_peer_access mycache_mydomain.net deny all
1157 acl aclname peername myPeer ...
1158 acl aclname peername_regex [-i] regex-pattern ...
1160 # match against a named cache_peer entry
1161 # set unique name= on cache_peer lines for reliable use.
1163 acl aclname time [day-abbrevs] [h1:m1-h2:m2]
1173 # h1:m1 must be less than h2:m2
1175 acl aclname url_regex [-i] ^http:// ...
1176 # regex matching on whole URL [fast]
1177 acl aclname urllogin [-i] [^a-zA-Z0-9] ...
1178 # regex matching on URL login field
1179 acl aclname urlpath_regex [-i] \.gif$ ...
1180 # regex matching on URL path [fast]
1182 acl aclname port 80 70 21 0-1024... # destination TCP port [fast]
1183 # ranges are allowed
1184 acl aclname localport 3128 ... # TCP port the client connected to [fast]
1185 # NP: for interception mode this is usually '80'
1187 acl aclname myportname 3128 ... # *_port name [fast]
1189 acl aclname proto HTTP FTP ... # request protocol [fast]
1191 acl aclname method GET POST ... # HTTP request method [fast]
1193 acl aclname http_status 200 301 500- 400-403 ...
1194 # status code in reply [fast]
1196 acl aclname browser [-i] regexp ...
1197 # pattern match on User-Agent header (see also req_header below) [fast]
1199 acl aclname referer_regex [-i] regexp ...
1200 # pattern match on Referer header [fast]
1201 # Referer is highly unreliable, so use with care
1203 acl aclname ident [-i] username ...
1204 acl aclname ident_regex [-i] pattern ...
1205 # string match on ident output [slow]
1206 # use REQUIRED to accept any non-null ident.
1208 acl aclname proxy_auth [-i] username ...
1209 acl aclname proxy_auth_regex [-i] pattern ...
1210 # perform http authentication challenge to the client and match against
1211 # supplied credentials [slow]
1213 # takes a list of allowed usernames.
1214 # use REQUIRED to accept any valid username.
1216 # Will use proxy authentication in forward-proxy scenarios, and plain
1217 # http authentication in reverse-proxy scenarios
1219 # NOTE: when a Proxy-Authentication header is sent but it is not
1220 # needed during ACL checking the username is NOT logged
1223 # NOTE: proxy_auth requires a EXTERNAL authentication program
1224 # to check username/password combinations (see
1225 # auth_param directive).
1227 # NOTE: proxy_auth can't be used in a transparent/intercepting proxy
1228 # as the browser needs to be configured for using a proxy in order
1229 # to respond to proxy authentication.
1231 acl aclname snmp_community string ...
1232 # A community string to limit access to your SNMP Agent [fast]
1235 # acl snmppublic snmp_community public
1237 acl aclname maxconn number
1238 # This will be matched when the client's IP address has
1239 # more than <number> TCP connections established. [fast]
1240 # NOTE: This only measures direct TCP links so X-Forwarded-For
1241 # indirect clients are not counted.
1243 acl aclname max_user_ip [-s] number
1244 # This will be matched when the user attempts to log in from more
1245 # than <number> different ip addresses. The authenticate_ip_ttl
1246 # parameter controls the timeout on the ip entries. [fast]
1247 # If -s is specified the limit is strict, denying browsing
1248 # from any further IP addresses until the ttl has expired. Without
1249 # -s Squid will just annoy the user by "randomly" denying requests.
1250 # (the counter is reset each time the limit is reached and a
1251 # request is denied)
1252 # NOTE: in acceleration mode or where there is mesh of child proxies,
1253 # clients may appear to come from multiple addresses if they are
1254 # going through proxy farms, so a limit of 1 may cause user problems.
1256 acl aclname random probability
1257 # Pseudo-randomly match requests. Based on the probability given.
1258 # Probability may be written as a decimal (0.333), fraction (1/3)
1259 # or ratio of matches:non-matches (3:5).
1261 acl aclname req_mime_type [-i] mime-type ...
1262 # regex match against the mime type of the request generated
1263 # by the client. Can be used to detect file upload or some
1264 # types HTTP tunneling requests [fast]
1265 # NOTE: This does NOT match the reply. You cannot use this
1266 # to match the returned file type.
1268 acl aclname req_header header-name [-i] any\.regex\.here
1269 # regex match against any of the known request headers. May be
1270 # thought of as a superset of "browser", "referer" and "mime-type"
1273 acl aclname rep_mime_type [-i] mime-type ...
1274 # regex match against the mime type of the reply received by
1275 # squid. Can be used to detect file download or some
1276 # types HTTP tunneling requests. [fast]
1277 # NOTE: This has no effect in http_access rules. It only has
1278 # effect in rules that affect the reply data stream such as
1279 # http_reply_access.
1281 acl aclname rep_header header-name [-i] any\.regex\.here
1282 # regex match against any of the known reply headers. May be
1283 # thought of as a superset of "browser", "referer" and "mime-type"
1286 acl aclname external class_name [arguments...]
1287 # external ACL lookup via a helper class defined by the
1288 # external_acl_type directive [slow]
1290 acl aclname user_cert attribute values...
1291 # match against attributes in a user SSL certificate
1292 # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast]
1294 acl aclname ca_cert attribute values...
1295 # match against attributes a users issuing CA SSL certificate
1296 # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast]
1298 acl aclname ext_user [-i] username ...
1299 acl aclname ext_user_regex [-i] pattern ...
1300 # string match on username returned by external acl helper [slow]
1301 # use REQUIRED to accept any non-null user name.
1303 acl aclname tag tagvalue ...
1304 # string match on tag returned by external acl helper [fast]
1305 # DEPRECATED. Only the first tag will match with this ACL.
1306 # Use the 'note' ACL instead for handling multiple tag values.
1308 acl aclname hier_code codename ...
1309 # string match against squid hierarchy code(s); [fast]
1310 # e.g., DIRECT, PARENT_HIT, NONE, etc.
1312 # NOTE: This has no effect in http_access rules. It only has
1313 # effect in rules that affect the reply data stream such as
1314 # http_reply_access.
1316 acl aclname note [-m[=delimiters]] name [value ...]
1317 # match transaction annotation [fast]
1318 # Without values, matches any annotation with a given name.
1319 # With value(s), matches any annotation with a given name that
1320 # also has one of the given values.
1321 # If the -m flag is used, then the value of the named
1322 # annotation is interpreted as a list of tokens, and the ACL
1323 # matches individual name=token pairs rather than whole
1324 # name=value pairs. See "ACL Options" above for more info.
1325 # Annotation sources include note and adaptation_meta directives
1326 # as well as helper and eCAP responses.
1328 acl aclname annotate_transaction [-m[=delimiters]] key=value ...
1329 acl aclname annotate_transaction [-m[=delimiters]] key+=value ...
1330 # Always matches. [fast]
1331 # Used for its side effect: This ACL immediately adds a
1332 # key=value annotation to the current master transaction.
1333 # The added annotation can then be tested using note ACL and
1334 # logged (or sent to helpers) using %note format code.
1336 # Annotations can be specified using replacement and addition
1337 # formats. The key=value form replaces old same-key annotation
1338 # value(s). The key+=value form appends a new value to the old
1339 # same-key annotation. Both forms create a new key=value
1340 # annotation if no same-key annotation exists already. If
1341 # -m flag is used, then the value is interpreted as a list
1342 # and the annotation will contain key=token pair(s) instead of the
1343 # whole key=value pair.
1345 # This ACL is especially useful for recording complex multi-step
1346 # ACL-driven decisions. For example, the following configuration
1347 # avoids logging transactions accepted after aclX matched:
1349 # # First, mark transactions accepted after aclX matched
1350 # acl markSpecial annotate_transaction special=true
1351 # http_access allow acl001
1353 # http_access deny acl100
1354 # http_access allow aclX markSpecial
1356 # # Second, do not log marked transactions:
1357 # acl markedSpecial note special true
1358 # access_log ... deny markedSpecial
1360 # # Note that the following would not have worked because aclX
1361 # # alone does not determine whether the transaction was allowed:
1362 # access_log ... deny aclX # Wrong!
1364 # Warning: This ACL annotates the transaction even when negated
1365 # and even if subsequent ACLs fail to match. For example, the
1366 # following three rules will have exactly the same effect as far
1367 # as annotations set by the "mark" ACL are concerned:
1369 # some_directive acl1 ... mark # rule matches if mark is reached
1370 # some_directive acl1 ... !mark # rule never matches
1371 # some_directive acl1 ... mark !all # rule never matches
1373 acl aclname annotate_client [-m[=delimiters]] key=value ...
1374 acl aclname annotate_client [-m[=delimiters]] key+=value ...
1376 # Always matches. [fast]
1377 # Used for its side effect: This ACL immediately adds a
1378 # key=value annotation to the current client-to-Squid
1379 # connection. Connection annotations are propagated to the current
1380 # and all future master transactions on the annotated connection.
1381 # See the annotate_transaction ACL for details.
1383 # For example, the following configuration avoids rewriting URLs
1384 # of transactions bumped by SslBump:
1386 # # First, mark bumped connections:
1387 # acl markBumped annotate_client bumped=true
1388 # ssl_bump peek acl1
1389 # ssl_bump stare acl2
1390 # ssl_bump bump acl3 markBumped
1391 # ssl_bump splice all
1393 # # Second, do not send marked transactions to the redirector:
1394 # acl markedBumped note bumped true
1395 # url_rewrite_access deny markedBumped
1397 # # Note that the following would not have worked because acl3 alone
1398 # # does not determine whether the connection is going to be bumped:
1399 # url_rewrite_access deny acl3 # Wrong!
1401 acl aclname adaptation_service service ...
1402 # Matches the name of any icap_service, ecap_service,
1403 # adaptation_service_set, or adaptation_service_chain that Squid
1404 # has used (or attempted to use) for the master transaction.
1405 # This ACL must be defined after the corresponding adaptation
1406 # service is named in squid.conf. This ACL is usable with
1407 # adaptation_meta because it starts matching immediately after
1408 # the service has been selected for adaptation.
1410 acl aclname transaction_initiator initiator ...
1411 # Matches transaction's initiator [fast]
1413 # Supported initiators are:
1414 # esi: matches transactions fetching ESI resources
1415 # certificate-fetching: matches transactions fetching
1416 # a missing intermediate TLS certificate
1417 # cache-digest: matches transactions fetching Cache Digests
1419 # htcp: matches HTCP requests from peers
1420 # icp: matches ICP requests to peers
1421 # icmp: matches ICMP RTT database (NetDB) requests to peers
1422 # asn: matches asns db requests
1423 # internal: matches any of the above
1424 # client: matches transactions containing an HTTP or FTP
1425 # client request received at a Squid *_port
1426 # all: matches any transaction, including internal transactions
1427 # without a configurable initiator and hopefully rare
1428 # transactions without a known-to-Squid initiator
1430 # Multiple initiators are ORed.
1432 acl aclname has component
1433 # matches a transaction "component" [fast]
1435 # Supported transaction components are:
1436 # request: transaction has a request header (at least)
1437 # response: transaction has a response header (at least)
1438 # ALE: transaction has an internally-generated Access Log Entry
1439 # structure; bugs notwithstanding, all transaction have it
1441 # For example, the following configuration helps when dealing with HTTP
1442 # clients that close connections without sending a request header:
1444 # acl hasRequest has request
1445 # acl logMe note important_transaction
1446 # # avoid "logMe ACL is used in context without an HTTP request" warnings
1447 # access_log ... logformat=detailed hasRequest logMe
1448 # # log request-less transactions, instead of ignoring them
1449 # access_log ... logformat=brief !hasRequest
1451 # Multiple components are not supported for one "acl" rule, but
1452 # can be specified (and are ORed) using multiple same-name rules:
1454 # # OK, this strange logging daemon needs request or response,
1455 # # but can work without either a request or a response:
1456 # acl hasWhatMyLoggingDaemonNeeds has request
1457 # acl hasWhatMyLoggingDaemonNeeds has response
1459 acl aclname at_step step
1460 # match against the current request processing step [fast]
1462 # GeneratingCONNECT: Generating HTTP CONNECT request headers
1464 # The following ssl_bump processing steps are recognized:
1465 # SslBump1: After getting TCP-level and HTTP CONNECT info.
1466 # SslBump2: After getting SSL Client Hello info.
1467 # SslBump3: After getting SSL Server Hello info.
1471 acl aclname ssl_error errorname
1472 # match against SSL certificate validation error [fast]
1474 # For valid error names see in @DEFAULT_ERROR_DIR@/templates/error-details.txt
1477 # The following can be used as shortcuts for certificate properties:
1478 # [ssl::]certHasExpired: the "not after" field is in the past
1479 # [ssl::]certNotYetValid: the "not before" field is in the future
1480 # [ssl::]certUntrusted: The certificate issuer is not to be trusted.
1481 # [ssl::]certSelfSigned: The certificate is self signed.
1482 # [ssl::]certDomainMismatch: The certificate CN domain does not
1483 # match the name the name of the host we are connecting to.
1485 # The ssl::certHasExpired, ssl::certNotYetValid, ssl::certDomainMismatch,
1486 # ssl::certUntrusted, and ssl::certSelfSigned can also be used as
1487 # predefined ACLs, just like the 'all' ACL.
1489 # NOTE: The ssl_error ACL is only supported with sslproxy_cert_error,
1490 # sslproxy_cert_sign, and sslproxy_cert_adapt options.
1492 acl aclname server_cert_fingerprint [-sha1] fingerprint
1493 # match against server SSL certificate fingerprint [fast]
1495 # The fingerprint is the digest of the DER encoded version
1496 # of the whole certificate. The user should use the form: XX:XX:...
1497 # Optional argument specifies the digest algorithm to use.
1498 # The SHA1 digest algorithm is the default and is currently
1499 # the only algorithm supported (-sha1).
1501 acl aclname ssl::server_name [option] .foo.com ...
1502 # matches server name obtained from various sources [fast]
1504 # The ACL computes server name(s) using such information sources as
1505 # CONNECT request URI, TLS client SNI, and TLS server certificate
1506 # subject (CN and SubjectAltName). The computed server name(s) usually
1507 # change with each SslBump step, as more info becomes available:
1508 # * SNI is used as the server name instead of the request URI,
1509 # * subject name(s) from the server certificate (CN and
1510 # SubjectAltName) are used as the server names instead of SNI.
1512 # When the ACL computes multiple server names, matching any single
1513 # computed name is sufficient for the ACL to match.
1515 # The "none" name can be used to match transactions where the ACL
1516 # could not compute the server name using any information source
1517 # that was both available and allowed to be used by the ACL options at
1518 # the ACL evaluation time.
1520 # Unlike dstdomain, this ACL does not perform DNS lookups.
1522 # An ACL option below may be used to restrict what information
1523 # sources are used to extract the server names from:
1525 # --client-requested
1526 # The server name is SNI regardless of what the server says.
1528 # The server name(s) are the certificate subject name(s), regardless
1529 # of what the client has requested. If the server certificate is
1530 # unavailable, then the name is "none".
1532 # The server name is either SNI (if SNI matches at least one of the
1533 # certificate subject names) or "none" (otherwise). When the server
1534 # certificate is unavailable, the consensus server name is SNI.
1536 # Combining multiple options in one ACL is a fatal configuration
1539 # For all options: If no SNI is available, then the CONNECT request
1540 # target (a.k.a. URI) is used instead of SNI (for an intercepted
1541 # connection, this target is the destination IP address).
1543 acl aclname ssl::server_name_regex [-i] \.foo\.com ...
1544 # regex matches server name obtained from various sources [fast]
1546 acl aclname connections_encrypted
1547 # matches transactions with all HTTP messages received over TLS
1548 # transport connections. [fast]
1550 # The master transaction deals with HTTP messages received from
1551 # various sources. All sources used by the master transaction in the
1552 # past are considered by the ACL. The following rules define whether
1553 # a given message source taints the entire master transaction,
1554 # resulting in ACL mismatches:
1556 # * The HTTP client transport connection is not TLS.
1557 # * An adaptation service connection-encryption flag is off.
1558 # * The peer or origin server transport connection is not TLS.
1560 # Caching currently does not affect these rules. This cache ignorance
1561 # implies that only the current HTTP client transport and REQMOD
1562 # services status determine whether this ACL matches a from-cache
1563 # transaction. The source of the cached response does not have any
1564 # effect on future transaction that use the cached response without
1565 # revalidation. This may change.
1567 # DNS, ICP, and HTCP exchanges during the master transaction do not
1568 # affect these rules.
1570 acl aclname any-of acl1 acl2 ...
1571 # match any one of the acls [fast or slow]
1572 # The first matching ACL stops further ACL evaluation.
1574 # ACLs from multiple any-of lines with the same name are ORed.
1575 # For example, A = (a1 or a2) or (a3 or a4) can be written as
1576 # acl A any-of a1 a2
1577 # acl A any-of a3 a4
1579 # This group ACL is fast if all evaluated ACLs in the group are fast
1580 # and slow otherwise.
1582 acl aclname all-of acl1 acl2 ...
1583 # match all of the acls [fast or slow]
1584 # The first mismatching ACL stops further ACL evaluation.
1586 # ACLs from multiple all-of lines with the same name are ORed.
1587 # For example, B = (b1 and b2) or (b3 and b4) can be written as
1588 # acl B all-of b1 b2
1589 # acl B all-of b3 b4
1591 # This group ACL is fast if all evaluated ACLs in the group are fast
1592 # and slow otherwise.
1595 acl macaddress arp 09:00:2b:23:45:67
1596 acl myexample dst_as 1241
1597 acl password proxy_auth REQUIRED
1598 acl fileupload req_mime_type -i ^multipart/form-data$
1599 acl javascript rep_mime_type -i ^application/x-javascript$
1603 # Recommended minimum configuration:
1606 # Example rule allowing access from your local networks.
1607 # Adapt to list your (internal) IP networks from where browsing
1609 acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
1610 acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)
1611 acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN)
1612 acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines
1613 acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN)
1614 acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN)
1615 acl localnet src fc00::/7 # RFC 4193 local private network range
1616 acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
1618 acl SSL_ports port 443
1619 acl Safe_ports port 80 # http
1620 acl Safe_ports port 21 # ftp
1621 acl Safe_ports port 443 # https
1622 acl Safe_ports port 70 # gopher
1623 acl Safe_ports port 210 # wais
1624 acl Safe_ports port 1025-65535 # unregistered ports
1625 acl Safe_ports port 280 # http-mgmt
1626 acl Safe_ports port 488 # gss-http
1627 acl Safe_ports port 591 # filemaker
1628 acl Safe_ports port 777 # multiling http
1632 NAME: proxy_protocol_access
1634 LOC: Config.accessList.proxyProtocol
1636 DEFAULT_DOC: all TCP connections to ports with require-proxy-header will be denied
1638 Determine which client proxies can be trusted to provide correct
1639 information regarding real client IP address using PROXY protocol.
1641 Requests may pass through a chain of several other proxies
1642 before reaching us. The original source details may by sent in:
1643 * HTTP message Forwarded header, or
1644 * HTTP message X-Forwarded-For header, or
1645 * PROXY protocol connection header.
1647 This directive is solely for validating new PROXY protocol
1648 connections received from a port flagged with require-proxy-header.
1649 It is checked only once after TCP connection setup.
1651 A deny match results in TCP connection closure.
1653 An allow match is required for Squid to permit the corresponding
1654 TCP connection, before Squid even looks for HTTP request headers.
1655 If there is an allow match, Squid starts using PROXY header information
1656 to determine the source address of the connection for all future ACL
1657 checks, logging, etc.
1659 SECURITY CONSIDERATIONS:
1661 Any host from which we accept client IP details can place
1662 incorrect information in the relevant header, and Squid
1663 will use the incorrect information as if it were the
1664 source address of the request. This may enable remote
1665 hosts to bypass any access control restrictions that are
1666 based on the client's source addresses.
1668 This clause only supports fast acl types.
1669 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1672 NAME: follow_x_forwarded_for
1674 IFDEF: FOLLOW_X_FORWARDED_FOR
1675 LOC: Config.accessList.followXFF
1676 DEFAULT_IF_NONE: deny all
1677 DEFAULT_DOC: X-Forwarded-For header will be ignored.
1679 Determine which client proxies can be trusted to provide correct
1680 information regarding real client IP address.
1682 Requests may pass through a chain of several other proxies
1683 before reaching us. The original source details may by sent in:
1684 * HTTP message Forwarded header, or
1685 * HTTP message X-Forwarded-For header, or
1686 * PROXY protocol connection header.
1688 PROXY protocol connections are controlled by the proxy_protocol_access
1689 directive which is checked before this.
1691 If a request reaches us from a source that is allowed by this
1692 directive, then we trust the information it provides regarding
1693 the IP of the client it received from (if any).
1695 For the purpose of ACLs used in this directive the src ACL type always
1696 matches the address we are testing and srcdomain matches its rDNS.
1698 On each HTTP request Squid checks for X-Forwarded-For header fields.
1699 If found the header values are iterated in reverse order and an allow
1700 match is required for Squid to continue on to the next value.
1701 The verification ends when a value receives a deny match, cannot be
1702 tested, or there are no more values to test.
1703 NOTE: Squid does not yet follow the Forwarded HTTP header.
1705 The end result of this process is an IP address that we will
1706 refer to as the indirect client address. This address may
1707 be treated as the client address for access control, ICAP, delay
1708 pools and logging, depending on the acl_uses_indirect_client,
1709 icap_uses_indirect_client, delay_pool_uses_indirect_client,
1710 log_uses_indirect_client and tproxy_uses_indirect_client options.
1712 This clause only supports fast acl types.
1713 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1715 SECURITY CONSIDERATIONS:
1717 Any host from which we accept client IP details can place
1718 incorrect information in the relevant header, and Squid
1719 will use the incorrect information as if it were the
1720 source address of the request. This may enable remote
1721 hosts to bypass any access control restrictions that are
1722 based on the client's source addresses.
1726 acl localhost src 127.0.0.1
1727 acl my_other_proxy srcdomain .proxy.example.com
1728 follow_x_forwarded_for allow localhost
1729 follow_x_forwarded_for allow my_other_proxy
1732 NAME: acl_uses_indirect_client
1735 IFDEF: FOLLOW_X_FORWARDED_FOR
1737 LOC: Config.onoff.acl_uses_indirect_client
1739 Controls whether the indirect client address
1740 (see follow_x_forwarded_for) is used instead of the
1741 direct client address in acl matching.
1743 NOTE: maxconn ACL considers direct TCP links and indirect
1744 clients will always have zero. So no match.
1747 NAME: delay_pool_uses_indirect_client
1750 IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_DELAY_POOLS
1752 LOC: Config.onoff.delay_pool_uses_indirect_client
1754 Controls whether the indirect client address
1755 (see follow_x_forwarded_for) is used instead of the
1756 direct client address in delay pools.
1759 NAME: log_uses_indirect_client
1762 IFDEF: FOLLOW_X_FORWARDED_FOR
1764 LOC: Config.onoff.log_uses_indirect_client
1766 Controls whether the indirect client address
1767 (see follow_x_forwarded_for) is used instead of the
1768 direct client address in the access log.
1771 NAME: tproxy_uses_indirect_client
1774 IFDEF: FOLLOW_X_FORWARDED_FOR&&LINUX_NETFILTER
1776 LOC: Config.onoff.tproxy_uses_indirect_client
1778 Controls whether the indirect client address
1779 (see follow_x_forwarded_for) is used instead of the
1780 direct client address when spoofing the outgoing client.
1782 This has no effect on requests arriving in non-tproxy
1785 SECURITY WARNING: Usage of this option is dangerous
1786 and should not be used trivially. Correct configuration
1787 of follow_x_forwarded_for with a limited set of trusted
1788 sources is required to prevent abuse of your proxy.
1791 NAME: spoof_client_ip
1793 LOC: Config.accessList.spoof_client_ip
1795 DEFAULT_DOC: Allow spoofing on all TPROXY traffic.
1797 Control client IP address spoofing of TPROXY traffic based on
1798 defined access lists.
1800 spoof_client_ip allow|deny [!]aclname ...
1802 If there are no "spoof_client_ip" lines present, the default
1803 is to "allow" spoofing of any suitable request.
1805 Note that the cache_peer "no-tproxy" option overrides this ACL.
1807 This clause supports fast acl types.
1808 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1813 LOC: Config.accessList.http
1814 DEFAULT_IF_NONE: deny all
1815 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
1817 Allowing or Denying access based on defined access lists
1819 To allow or deny a message received on an HTTP, HTTPS, or FTP port:
1820 http_access allow|deny [!]aclname ...
1822 NOTE on default values:
1824 If there are no "access" lines present, the default is to deny
1827 If none of the "access" lines cause a match, the default is the
1828 opposite of the last line in the list. If the last line was
1829 deny, the default is allow. Conversely, if the last line
1830 is allow, the default will be deny. For these reasons, it is a
1831 good idea to have an "deny all" entry at the end of your access
1832 lists to avoid potential confusion.
1834 This clause supports both fast and slow acl types.
1835 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1840 # Recommended minimum Access Permission configuration:
1842 # Deny requests to certain unsafe ports
1843 http_access deny !Safe_ports
1845 # Deny CONNECT to other than secure SSL ports
1846 http_access deny CONNECT !SSL_ports
1848 # Only allow cachemgr access from localhost
1849 http_access allow localhost manager
1850 http_access deny manager
1852 # We strongly recommend the following be uncommented to protect innocent
1853 # web applications running on the proxy server who think the only
1854 # one who can access services on "localhost" is a local user
1855 #http_access deny to_localhost
1858 # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
1861 # Example rule allowing access from your local networks.
1862 # Adapt localnet in the ACL section to list your (internal) IP networks
1863 # from where browsing should be allowed
1864 http_access allow localnet
1865 http_access allow localhost
1867 # And finally deny all other access to this proxy
1868 http_access deny all
1872 NAME: adapted_http_access http_access2
1874 LOC: Config.accessList.adapted_http
1876 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
1878 Allowing or Denying access based on defined access lists
1880 Essentially identical to http_access, but runs after redirectors
1881 and ICAP/eCAP adaptation. Allowing access control based on their
1884 If not set then only http_access is used.
1887 NAME: http_reply_access
1889 LOC: Config.accessList.reply
1891 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
1893 Allow replies to client requests. This is complementary to http_access.
1895 http_reply_access allow|deny [!] aclname ...
1897 NOTE: if there are no access lines present, the default is to allow
1900 If none of the access lines cause a match the opposite of the
1901 last line will apply. Thus it is good practice to end the rules
1902 with an "allow all" or "deny all" entry.
1904 This clause supports both fast and slow acl types.
1905 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1910 LOC: Config.accessList.icp
1912 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
1914 Allowing or Denying access to the ICP port based on defined
1917 icp_access allow|deny [!]aclname ...
1919 NOTE: The default if no icp_access lines are present is to
1920 deny all traffic. This default may cause problems with peers
1923 This clause only supports fast acl types.
1924 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1926 # Allow ICP queries from local networks only
1927 #icp_access allow localnet
1928 #icp_access deny all
1934 LOC: Config.accessList.htcp
1936 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
1938 Allowing or Denying access to the HTCP port based on defined
1941 htcp_access allow|deny [!]aclname ...
1943 See also htcp_clr_access for details on access control for
1944 cache purge (CLR) HTCP messages.
1946 NOTE: The default if no htcp_access lines are present is to
1947 deny all traffic. This default may cause problems with peers
1948 using the htcp option.
1950 This clause only supports fast acl types.
1951 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1953 # Allow HTCP queries from local networks only
1954 #htcp_access allow localnet
1955 #htcp_access deny all
1958 NAME: htcp_clr_access
1961 LOC: Config.accessList.htcp_clr
1963 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
1965 Allowing or Denying access to purge content using HTCP based
1966 on defined access lists.
1967 See htcp_access for details on general HTCP access control.
1969 htcp_clr_access allow|deny [!]aclname ...
1971 This clause only supports fast acl types.
1972 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1974 # Allow HTCP CLR requests from trusted peers
1975 acl htcp_clr_peer src 192.0.2.2 2001:DB8::2
1976 htcp_clr_access allow htcp_clr_peer
1977 htcp_clr_access deny all
1982 LOC: Config.accessList.miss
1984 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
1986 Determines whether network access is permitted when satisfying a request.
1989 to force your neighbors to use you as a sibling instead of
1992 acl localclients src 192.0.2.0/24 2001:DB8::a:0/64
1993 miss_access deny !localclients
1994 miss_access allow all
1996 This means only your local clients are allowed to fetch relayed/MISS
1997 replies from the network and all other clients can only fetch cached
2000 The default for this setting allows all clients who passed the
2001 http_access rules to relay via this proxy.
2003 This clause only supports fast acl types.
2004 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2007 NAME: ident_lookup_access
2011 DEFAULT_DOC: Unless rules exist in squid.conf, IDENT is not fetched.
2012 LOC: Ident::TheConfig.identLookup
2014 A list of ACL elements which, if matched, cause an ident
2015 (RFC 931) lookup to be performed for this request. For
2016 example, you might choose to always perform ident lookups
2017 for your main multi-user Unix boxes, but not for your Macs
2018 and PCs. By default, ident lookups are not performed for
2021 To enable ident lookups for specific client addresses, you
2022 can follow this example:
2024 acl ident_aware_hosts src 198.168.1.0/24
2025 ident_lookup_access allow ident_aware_hosts
2026 ident_lookup_access deny all
2028 Only src type ACL checks are fully supported. A srcdomain
2029 ACL might work at times, but it will not always provide
2032 This clause only supports fast acl types.
2033 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2036 NAME: reply_body_max_size
2037 COMMENT: size [acl acl...]
2040 DEFAULT_DOC: No limit is applied.
2041 LOC: Config.ReplyBodySize
2043 This option specifies the maximum size of a reply body. It can be
2044 used to prevent users from downloading very large files, such as
2045 MP3's and movies. When the reply headers are received, the
2046 reply_body_max_size lines are processed, and the first line where
2047 all (if any) listed ACLs are true is used as the maximum body size
2050 This size is checked twice. First when we get the reply headers,
2051 we check the content-length value. If the content length value exists
2052 and is larger than the allowed size, the request is denied and the
2053 user receives an error message that says "the request or reply
2054 is too large." If there is no content-length, and the reply
2055 size exceeds this limit, the client's connection is just closed
2056 and they will receive a partial reply.
2058 WARNING: downstream caches probably can not detect a partial reply
2059 if there is no content-length header, so they will cache
2060 partial responses and give them out as hits. You should NOT
2061 use this option if you have downstream caches.
2063 WARNING: A maximum size smaller than the size of squid's error messages
2064 will cause an infinite loop and crash squid. Ensure that the smallest
2065 non-zero value you use is greater that the maximum header size plus
2066 the size of your largest error page.
2068 If you set this parameter none (the default), there will be
2071 Configuration Format is:
2072 reply_body_max_size SIZE UNITS [acl ...]
2074 reply_body_max_size 10 MB
2078 NAME: on_unsupported_protocol
2079 TYPE: on_unsupported_protocol
2080 LOC: Config.accessList.on_unsupported_protocol
2082 DEFAULT_DOC: Respond with an error message to unidentifiable traffic
2084 Determines Squid behavior when encountering strange requests at the
2085 beginning of an accepted TCP connection or the beginning of a bumped
2086 CONNECT tunnel. Controlling Squid reaction to unexpected traffic is
2087 especially useful in interception environments where Squid is likely
2088 to see connections for unsupported protocols that Squid should either
2089 terminate or tunnel at TCP level.
2091 on_unsupported_protocol <action> [!]acl ...
2093 The first matching action wins. Only fast ACLs are supported.
2095 Supported actions are:
2097 tunnel: Establish a TCP connection with the intended server and
2098 blindly shovel TCP packets between the client and server.
2100 respond: Respond with an error message, using the transfer protocol
2101 for the Squid port that received the request (e.g., HTTP
2102 for connections intercepted at the http_port). This is the
2105 Squid expects the following traffic patterns:
2107 http_port: a plain HTTP request
2108 https_port: SSL/TLS handshake followed by an [encrypted] HTTP request
2109 ftp_port: a plain FTP command (no on_unsupported_protocol support yet!)
2110 CONNECT tunnel on http_port: same as https_port
2111 CONNECT tunnel on https_port: same as https_port
2113 Currently, this directive has effect on intercepted connections and
2114 bumped tunnels only. Other cases are not supported because Squid
2115 cannot know the intended destination of other traffic.
2118 # define what Squid errors indicate receiving non-HTTP traffic:
2119 acl foreignProtocol squid_error ERR_PROTOCOL_UNKNOWN ERR_TOO_BIG
2120 # define what Squid errors indicate receiving nothing:
2121 acl serverTalksFirstProtocol squid_error ERR_REQUEST_START_TIMEOUT
2122 # tunnel everything that does not look like HTTP:
2123 on_unsupported_protocol tunnel foreignProtocol
2124 # tunnel if we think the client waits for the server to talk first:
2125 on_unsupported_protocol tunnel serverTalksFirstProtocol
2126 # in all other error cases, just send an HTTP "error page" response:
2127 on_unsupported_protocol respond all
2129 See also: squid_error ACL
2135 LOC: Auth::TheConfig.schemeAccess
2137 DEFAULT_DOC: use all auth_param schemes in their configuration order
2139 Use this directive to customize authentication schemes presence and
2140 order in Squid's Unauthorized and Authentication Required responses.
2142 auth_schemes scheme1,scheme2,... [!]aclname ...
2144 where schemeN is the name of one of the authentication schemes
2145 configured using auth_param directives. At least one scheme name is
2146 required. Multiple scheme names are separated by commas. Either
2147 avoid whitespace or quote the entire schemes list.
2149 A special "ALL" scheme name expands to all auth_param-configured
2150 schemes in their configuration order. This directive cannot be used
2151 to configure Squid to offer no authentication schemes at all.
2153 The first matching auth_schemes rule determines the schemes order
2154 for the current Authentication Required transaction. Note that the
2155 future response is not yet available during auth_schemes evaluation.
2157 If this directive is not used or none of its rules match, then Squid
2158 responds with all configured authentication schemes in the order of
2159 auth_param directives in the configuration file.
2161 This directive does not determine when authentication is used or
2162 how each authentication scheme authenticates clients.
2164 The following example sends basic and negotiate authentication
2165 schemes, in that order, when requesting authentication of HTTP
2166 requests matching the isIE ACL (not shown) while sending all
2167 auth_param schemes in their configuration order to other clients:
2169 auth_schemes basic,negotiate isIE
2170 auth_schemes ALL all # explicit default
2172 This directive supports fast ACLs only.
2174 See also: auth_param.
2179 -----------------------------------------------------------------------------
2182 NAME: http_port ascii_port
2187 Usage: port [mode] [options]
2188 hostname:port [mode] [options]
2189 1.2.3.4:port [mode] [options]
2191 The socket addresses where Squid will listen for HTTP client
2192 requests. You may specify multiple socket addresses.
2193 There are three forms: port alone, hostname with port, and
2194 IP address with port. If you specify a hostname or IP
2195 address, Squid binds the socket to that specific
2196 address. Most likely, you do not need to bind to a specific
2197 address, so you can use the port number alone.
2199 If you are running Squid in accelerator mode, you
2200 probably want to listen on port 80 also, or instead.
2202 The -a command line option may be used to specify additional
2203 port(s) where Squid listens for proxy request. Such ports will
2204 be plain proxy ports with no options.
2206 You may specify multiple socket addresses on multiple lines.
2210 intercept Support for IP-Layer NAT interception delivering
2211 traffic to this Squid port.
2212 NP: disables authentication on the port.
2214 tproxy Support Linux TPROXY (or BSD divert-to) with spoofing
2215 of outgoing connections using the client IP address.
2216 NP: disables authentication on the port.
2218 accel Accelerator / reverse proxy mode
2220 ssl-bump For each CONNECT request allowed by ssl_bump ACLs,
2221 establish secure connection with the client and with
2222 the server, decrypt HTTPS messages as they pass through
2223 Squid, and treat them as unencrypted HTTP messages,
2224 becoming the man-in-the-middle.
2226 The ssl_bump option is required to fully enable
2227 bumping of CONNECT requests.
2229 Omitting the mode flag causes default forward proxy mode to be used.
2232 Accelerator Mode Options:
2234 defaultsite=domainname
2235 What to use for the Host: header if it is not present
2236 in a request. Determines what site (not origin server)
2237 accelerators should consider the default.
2239 no-vhost Disable using HTTP/1.1 Host header for virtual domain support.
2241 protocol= Protocol to reconstruct accelerated and intercepted
2242 requests with. Defaults to HTTP/1.1 for http_port and
2243 HTTPS/1.1 for https_port.
2244 When an unsupported value is configured Squid will
2245 produce a FATAL error.
2246 Values: HTTP or HTTP/1.1, HTTPS or HTTPS/1.1
2248 vport Virtual host port support. Using the http_port number
2249 instead of the port passed on Host: headers.
2251 vport=NN Virtual host port support. Using the specified port
2252 number instead of the port passed on Host: headers.
2255 Act as if this Squid is the origin server.
2256 This currently means generate new Date: and Expires:
2257 headers on HIT instead of adding Age:.
2259 ignore-cc Ignore request Cache-Control headers.
2261 WARNING: This option violates HTTP specifications if
2262 used in non-accelerator setups.
2264 allow-direct Allow direct forwarding in accelerator mode. Normally
2265 accelerated requests are denied direct forwarding as if
2266 never_direct was used.
2268 WARNING: this option opens accelerator mode to security
2269 vulnerabilities usually only affecting in interception
2270 mode. Make sure to protect forwarding with suitable
2271 http_access rules when using this.
2274 SSL Bump Mode Options:
2275 In addition to these options ssl-bump requires TLS/SSL options.
2277 generate-host-certificates[=<on|off>]
2278 Dynamically create SSL server certificates for the
2279 destination hosts of bumped CONNECT requests.When
2280 enabled, the cert and key options are used to sign
2281 generated certificates. Otherwise generated
2282 certificate will be selfsigned.
2283 If there is a CA certificate lifetime of the generated
2284 certificate equals lifetime of the CA certificate. If
2285 generated certificate is selfsigned lifetime is three
2287 This option is enabled by default when ssl-bump is used.
2288 See the ssl-bump option above for more information.
2290 dynamic_cert_mem_cache_size=SIZE
2291 Approximate total RAM size spent on cached generated
2292 certificates. If set to zero, caching is disabled. The
2293 default value is 4MB.
2297 tls-cert= Path to file containing an X.509 certificate (PEM format)
2298 to be used in the TLS handshake ServerHello.
2300 If this certificate is constrained by KeyUsage TLS
2301 feature it must allow HTTP server usage, along with
2302 any additional restrictions imposed by your choice
2303 of options= settings.
2305 When OpenSSL is used this file may also contain a
2306 chain of intermediate CA certificates to send in the
2309 When GnuTLS is used this option (and any paired
2310 tls-key= option) may be repeated to load multiple
2311 certificates for different domains.
2313 Also, when generate-host-certificates=on is configured
2314 the first tls-cert= option must be a CA certificate
2315 capable of signing the automatically generated
2318 tls-key= Path to a file containing private key file (PEM format)
2319 for the previous tls-cert= option.
2321 If tls-key= is not specified tls-cert= is assumed to
2322 reference a PEM file containing both the certificate
2325 cipher= Colon separated list of supported ciphers.
2326 NOTE: some ciphers such as EDH ciphers depend on
2327 additional settings. If those settings are
2328 omitted the ciphers may be silently ignored
2329 by the OpenSSL library.
2331 options= Various SSL implementation options. The most important
2334 NO_SSLv3 Disallow the use of SSLv3
2336 NO_TLSv1 Disallow the use of TLSv1.0
2338 NO_TLSv1_1 Disallow the use of TLSv1.1
2340 NO_TLSv1_2 Disallow the use of TLSv1.2
2343 Always create a new key when using
2344 temporary/ephemeral DH key exchanges
2347 Enable ephemeral ECDH key exchange.
2348 The adopted curve should be specified
2349 using the tls-dh option.
2352 Disable use of RFC5077 session tickets.
2353 Some servers may have problems
2354 understanding the TLS extension due
2355 to ambiguous specification in RFC4507.
2357 ALL Enable various bug workarounds
2358 suggested as "harmless" by OpenSSL
2359 Be warned that this reduces SSL/TLS
2360 strength to some attacks.
2362 See the OpenSSL SSL_CTX_set_options documentation for a
2365 clientca= File containing the list of CAs to use when
2366 requesting a client certificate.
2368 tls-cafile= PEM file containing CA certificates to use when verifying
2369 client certificates. If not configured clientca will be
2370 used. May be repeated to load multiple files.
2372 capath= Directory containing additional CA certificates
2373 and CRL lists to use when verifying client certificates.
2374 Requires OpenSSL or LibreSSL.
2376 crlfile= File of additional CRL lists to use when verifying
2377 the client certificate, in addition to CRLs stored in
2378 the capath. Implies VERIFY_CRL flag below.
2381 File containing DH parameters for temporary/ephemeral DH key
2382 exchanges, optionally prefixed by a curve for ephemeral ECDH
2384 See OpenSSL documentation for details on how to create the
2385 DH parameter file. Supported curves for ECDH can be listed
2386 using the "openssl ecparam -list_curves" command.
2387 WARNING: EDH and EECDH ciphers will be silently disabled if
2388 this option is not set.
2390 sslflags= Various flags modifying the use of SSL:
2392 Don't request client certificates
2393 immediately, but wait until acl processing
2394 requires a certificate (not yet implemented).
2396 Don't allow for session reuse. Each connection
2397 will result in a new SSL session.
2399 Verify CRL lists when accepting client
2402 Verify CRL lists for all certificates in the
2403 client certificate chain.
2405 tls-default-ca[=off]
2406 Whether to use the system Trusted CAs. Default is OFF.
2408 tls-no-npn Do not use the TLS NPN extension to advertise HTTP/1.1.
2410 sslcontext= SSL session ID context identifier.
2414 connection-auth[=on|off]
2415 use connection-auth=off to tell Squid to prevent
2416 forwarding Microsoft connection oriented authentication
2417 (NTLM, Negotiate and Kerberos)
2419 disable-pmtu-discovery=
2420 Control Path-MTU discovery usage:
2421 off lets OS decide on what to do (default).
2422 transparent disable PMTU discovery when transparent
2424 always disable always PMTU discovery.
2426 In many setups of transparently intercepting proxies
2427 Path-MTU discovery can not work on traffic towards the
2428 clients. This is the case when the intercepting device
2429 does not fully track connections and fails to forward
2430 ICMP must fragment messages to the cache server. If you
2431 have such setup and experience that certain clients
2432 sporadically hang or never complete requests set
2433 disable-pmtu-discovery option to 'transparent'.
2435 name= Specifies a internal name for the port. Defaults to
2436 the port specification (port or addr:port)
2438 tcpkeepalive[=idle,interval,timeout]
2439 Enable TCP keepalive probes of idle connections.
2440 In seconds; idle is the initial time before TCP starts
2441 probing the connection, interval how often to probe, and
2442 timeout the time before giving up.
2444 require-proxy-header
2445 Require PROXY protocol version 1 or 2 connections.
2446 The proxy_protocol_access is required to whitelist
2447 downstream proxies which can be trusted.
2450 Ask TCP stack to maintain a dedicated listening queue
2451 for each worker accepting requests at this port.
2452 Requires TCP stack that supports the SO_REUSEPORT socket
2455 SECURITY WARNING: Enabling worker-specific queues
2456 allows any process running as Squid's effective user to
2457 easily accept requests destined to this port.
2459 If you run Squid on a dual-homed machine with an internal
2460 and an external interface we recommend you to specify the
2461 internal address:port in http_port. This way Squid will only be
2462 visible on the internal address.
2466 # Squid normally listens to port 3128
2467 http_port @DEFAULT_HTTP_PORT@
2472 IFDEF: USE_GNUTLS||USE_OPENSSL
2477 Usage: [ip:]port [mode] tls-cert=certificate.pem [options]
2479 The socket address where Squid will listen for client requests made
2480 over TLS or SSL connections. Commonly referred to as HTTPS.
2482 This is most useful for situations where you are running squid in
2483 accelerator mode and you want to do the TLS work at the accelerator
2486 You may specify multiple socket addresses on multiple lines,
2487 each with their own certificate and/or options.
2489 The tls-cert= option is mandatory on HTTPS ports.
2491 See http_port for a list of modes and options.
2499 Enables Native FTP proxy by specifying the socket address where Squid
2500 listens for FTP client requests. See http_port directive for various
2501 ways to specify the listening address and mode.
2503 Usage: ftp_port address [mode] [options]
2505 WARNING: This is a new, experimental, complex feature that has seen
2506 limited production exposure. Some Squid modules (e.g., caching) do not
2507 currently work with native FTP proxying, and many features have not
2508 even been tested for compatibility. Test well before deploying!
2510 Native FTP proxying differs substantially from proxying HTTP requests
2511 with ftp:// URIs because Squid works as an FTP server and receives
2512 actual FTP commands (rather than HTTP requests with FTP URLs).
2514 Native FTP commands accepted at ftp_port are internally converted or
2515 wrapped into HTTP-like messages. The same happens to Native FTP
2516 responses received from FTP origin servers. Those HTTP-like messages
2517 are shoveled through regular access control and adaptation layers
2518 between the FTP client and the FTP origin server. This allows Squid to
2519 examine, adapt, block, and log FTP exchanges. Squid reuses most HTTP
2520 mechanisms when shoveling wrapped FTP messages. For example,
2521 http_access and adaptation_access directives are used.
2525 intercept Same as http_port intercept. The FTP origin address is
2526 determined based on the intended destination of the
2527 intercepted connection.
2529 tproxy Support Linux TPROXY for spoofing outgoing
2530 connections using the client IP address.
2531 NP: disables authentication and maybe IPv6 on the port.
2533 By default (i.e., without an explicit mode option), Squid extracts the
2534 FTP origin address from the login@origin parameter of the FTP USER
2535 command. Many popular FTP clients support such native FTP proxying.
2539 name=token Specifies an internal name for the port. Defaults to
2540 the port address. Usable with myportname ACL.
2543 Enables tracking of FTP directories by injecting extra
2544 PWD commands and adjusting Request-URI (in wrapping
2545 HTTP requests) to reflect the current FTP server
2546 directory. Tracking is disabled by default.
2548 protocol=FTP Protocol to reconstruct accelerated and intercepted
2549 requests with. Defaults to FTP. No other accepted
2550 values have been tested with. An unsupported value
2551 results in a FATAL error. Accepted values are FTP,
2552 HTTP (or HTTP/1.1), and HTTPS (or HTTPS/1.1).
2554 Other http_port modes and options that are not specific to HTTP and
2555 HTTPS may also work.
2558 NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp
2561 LOC: Ip::Qos::TheConfig.tosToServer
2563 Allows you to select a TOS/Diffserv value for packets outgoing
2564 on the server side, based on an ACL.
2566 tcp_outgoing_tos ds-field [!]aclname ...
2568 Example where normal_service_net uses the TOS value 0x00
2569 and good_service_net uses 0x20
2571 acl normal_service_net src 10.0.0.0/24
2572 acl good_service_net src 10.0.1.0/24
2573 tcp_outgoing_tos 0x00 normal_service_net
2574 tcp_outgoing_tos 0x20 good_service_net
2576 TOS/DSCP values really only have local significance - so you should
2577 know what you're specifying. For more information, see RFC2474,
2578 RFC2475, and RFC3260.
2580 The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
2581 "default" to use whatever default your host has.
2582 Note that only multiples of 4 are usable as the two rightmost bits have
2583 been redefined for use by ECN (RFC 3168 section 23.1).
2584 The squid parser will enforce this by masking away the ECN bits.
2586 Processing proceeds in the order specified, and stops at first fully
2589 Only fast ACLs are supported.
2592 NAME: clientside_tos
2595 LOC: Ip::Qos::TheConfig.tosToClient
2597 Allows you to select a TOS/DSCP value for packets being transmitted
2598 on the client-side, based on an ACL.
2600 clientside_tos ds-field [!]aclname ...
2602 Example where normal_service_net uses the TOS value 0x00
2603 and good_service_net uses 0x20
2605 acl normal_service_net src 10.0.0.0/24
2606 acl good_service_net src 10.0.1.0/24
2607 clientside_tos 0x00 normal_service_net
2608 clientside_tos 0x20 good_service_net
2610 Note: This feature is incompatible with qos_flows. Any TOS values set here
2611 will be overwritten by TOS values in qos_flows.
2613 The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
2614 "default" to use whatever default your host has.
2615 Note that only multiples of 4 are usable as the two rightmost bits have
2616 been redefined for use by ECN (RFC 3168 section 23.1).
2617 The squid parser will enforce this by masking away the ECN bits.
2619 This clause only supports fast acl types.
2620 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2623 NAME: tcp_outgoing_mark
2625 IFDEF: SO_MARK&&USE_LIBCAP
2627 LOC: Ip::Qos::TheConfig.nfmarkToServer
2629 Allows you to apply a Netfilter mark value to outgoing packets
2630 on the server side, based on an ACL.
2632 tcp_outgoing_mark mark-value [!]aclname ...
2634 Example where normal_service_net uses the mark value 0x00
2635 and good_service_net uses 0x20
2637 acl normal_service_net src 10.0.0.0/24
2638 acl good_service_net src 10.0.1.0/24
2639 tcp_outgoing_mark 0x00 normal_service_net
2640 tcp_outgoing_mark 0x20 good_service_net
2642 Only fast ACLs are supported.
2645 NAME: mark_client_packet clientside_mark
2647 IFDEF: SO_MARK&&USE_LIBCAP
2649 LOC: Ip::Qos::TheConfig.nfmarkToClient
2651 Allows you to apply a Netfilter MARK value to packets being transmitted
2652 on the client-side, based on an ACL.
2654 mark_client_packet mark-value [!]aclname ...
2656 Example where normal_service_net uses the MARK value 0x00
2657 and good_service_net uses 0x20
2659 acl normal_service_net src 10.0.0.0/24
2660 acl good_service_net src 10.0.1.0/24
2661 mark_client_packet 0x00 normal_service_net
2662 mark_client_packet 0x20 good_service_net
2664 Note: This feature is incompatible with qos_flows. Any mark values set here
2665 will be overwritten by mark values in qos_flows.
2667 This clause only supports fast acl types.
2668 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2671 NAME: mark_client_connection
2673 IFDEF: SO_MARK&&USE_LIBCAP
2675 LOC: Ip::Qos::TheConfig.nfConnmarkToClient
2677 Allows you to apply a Netfilter CONNMARK value to a connection
2678 on the client-side, based on an ACL.
2680 mark_client_connection mark-value[/mask] [!]aclname ...
2682 The mark-value and mask are unsigned integers (hex, octal, or decimal).
2683 The mask may be used to preserve marking previously set by other agents
2686 A matching rule replaces the CONNMARK value. If a mask is also
2687 specified, then the masked bits of the original value are zeroed, and
2688 the configured mark-value is ORed with that adjusted value.
2689 For example, applying a mark-value 0xAB/0xF to 0x5F CONNMARK, results
2690 in a 0xFB marking (rather than a 0xAB or 0x5B).
2692 This directive semantics is similar to iptables --set-mark rather than
2693 --set-xmark functionality.
2695 The directive does not interfere with qos_flows (which uses packet MARKs,
2698 Example where squid marks intercepted FTP connections:
2700 acl proto_ftp proto FTP
2701 mark_client_connection 0x200/0xff00 proto_ftp
2703 This clause only supports fast acl types.
2704 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2711 LOC: Ip::Qos::TheConfig
2713 Allows you to select a TOS/DSCP value to mark outgoing
2714 connections to the client, based on where the reply was sourced.
2715 For platforms using netfilter, allows you to set a netfilter mark
2716 value instead of, or in addition to, a TOS value.
2718 By default this functionality is disabled. To enable it with the default
2719 settings simply use "qos_flows mark" or "qos_flows tos". Default
2720 settings will result in the netfilter mark or TOS value being copied
2721 from the upstream connection to the client. Note that it is the connection
2722 CONNMARK value not the packet MARK value that is copied.
2724 It is not currently possible to copy the mark or TOS value from the
2725 client to the upstream connection request.
2727 TOS values really only have local significance - so you should
2728 know what you're specifying. For more information, see RFC2474,
2729 RFC2475, and RFC3260.
2731 The TOS/DSCP byte must be exactly that - a octet value 0 - 255.
2732 Note that only multiples of 4 are usable as the two rightmost bits have
2733 been redefined for use by ECN (RFC 3168 section 23.1).
2734 The squid parser will enforce this by masking away the ECN bits.
2736 Mark values can be any unsigned 32-bit integer value.
2738 This setting is configured by setting the following values:
2740 tos|mark Whether to set TOS or netfilter mark values
2742 local-hit=0xFF Value to mark local cache hits.
2744 sibling-hit=0xFF Value to mark hits from sibling peers.
2746 parent-hit=0xFF Value to mark hits from parent peers.
2748 miss=0xFF[/mask] Value to mark cache misses. Takes precedence
2749 over the preserve-miss feature (see below), unless
2750 mask is specified, in which case only the bits
2751 specified in the mask are written.
2753 The TOS variant of the following features are only possible on Linux
2754 and require your kernel to be patched with the TOS preserving ZPH
2755 patch, available from http://zph.bratcheda.org
2756 No patch is needed to preserve the netfilter mark, which will work
2757 with all variants of netfilter.
2759 disable-preserve-miss
2760 This option disables the preservation of the TOS or netfilter
2761 mark. By default, the existing TOS or netfilter mark value of
2762 the response coming from the remote server will be retained
2763 and masked with miss-mark.
2764 NOTE: in the case of a netfilter mark, the mark must be set on
2765 the connection (using the CONNMARK target) not on the packet
2769 Allows you to mask certain bits in the TOS or mark value
2770 received from the remote server, before copying the value to
2771 the TOS sent towards clients.
2772 Default for tos: 0xFF (TOS from server is not changed).
2773 Default for mark: 0xFFFFFFFF (mark from server is not changed).
2775 All of these features require the --enable-zph-qos compilation flag
2776 (enabled by default). Netfilter marking also requires the
2777 libnetfilter_conntrack libraries (--with-netfilter-conntrack) and
2778 libcap 2.09+ (--with-libcap).
2782 NAME: tcp_outgoing_address
2785 DEFAULT_DOC: Address selection is performed by the operating system.
2786 LOC: Config.accessList.outgoing_address
2788 Allows you to map requests to different outgoing IP addresses
2789 based on the username or source address of the user making
2792 tcp_outgoing_address ipaddr [[!]aclname] ...
2795 Forwarding clients with dedicated IPs for certain subnets.
2797 acl normal_service_net src 10.0.0.0/24
2798 acl good_service_net src 10.0.2.0/24
2800 tcp_outgoing_address 2001:db8::c001 good_service_net
2801 tcp_outgoing_address 10.1.0.2 good_service_net
2803 tcp_outgoing_address 2001:db8::beef normal_service_net
2804 tcp_outgoing_address 10.1.0.1 normal_service_net
2806 tcp_outgoing_address 2001:db8::1
2807 tcp_outgoing_address 10.1.0.3
2809 Processing proceeds in the order specified, and stops at first fully
2812 Squid will add an implicit IP version test to each line.
2813 Requests going to IPv4 websites will use the outgoing 10.1.0.* addresses.
2814 Requests going to IPv6 websites will use the outgoing 2001:db8:* addresses.
2817 NOTE: The use of this directive using client dependent ACLs is
2818 incompatible with the use of server side persistent connections. To
2819 ensure correct results it is best to set server_persistent_connections
2820 to off when using this directive in such configurations.
2822 NOTE: The use of this directive to set a local IP on outgoing TCP links
2823 is incompatible with using TPROXY to set client IP out outbound TCP links.
2824 When needing to contact peers use the no-tproxy cache_peer option and the
2825 client_dst_passthru directive re-enable normal forwarding such as this.
2827 This clause only supports fast acl types.
2828 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2831 NAME: host_verify_strict
2834 LOC: Config.onoff.hostStrictVerify
2836 Regardless of this option setting, when dealing with intercepted
2837 traffic, Squid always verifies that the destination IP address matches
2838 the Host header domain or IP (called 'authority form URL').
2840 This enforcement is performed to satisfy a MUST-level requirement in
2841 RFC 2616 section 14.23: "The Host field value MUST represent the naming
2842 authority of the origin server or gateway given by the original URL".
2845 Squid always responds with an HTTP 409 (Conflict) error
2846 page and logs a security warning if there is no match.
2848 Squid verifies that the destination IP address matches
2849 the Host header for forward-proxy and reverse-proxy traffic
2850 as well. For those traffic types, Squid also enables the
2851 following checks, comparing the corresponding Host header
2852 and Request-URI components:
2854 * The host names (domain or IP) must be identical,
2855 but valueless or missing Host header disables all checks.
2856 For the two host names to match, both must be either IP
2859 * Port numbers must be identical, but if a port is missing
2860 the scheme-default port is assumed.
2863 When set to OFF (the default):
2864 Squid allows suspicious requests to continue but logs a
2865 security warning and blocks caching of the response.
2867 * Forward-proxy traffic is not checked at all.
2869 * Reverse-proxy traffic is not checked at all.
2871 * Intercepted traffic which passes verification is handled
2872 according to client_dst_passthru.
2874 * Intercepted requests which fail verification are sent
2875 to the client original destination instead of DIRECT.
2876 This overrides 'client_dst_passthru off'.
2878 For now suspicious intercepted CONNECT requests are always
2879 responded to with an HTTP 409 (Conflict) error page.
2884 As described in CVE-2009-0801 when the Host: header alone is used
2885 to determine the destination of a request it becomes trivial for
2886 malicious scripts on remote websites to bypass browser same-origin
2887 security policy and sandboxing protections.
2889 The cause of this is that such applets are allowed to perform their
2890 own HTTP stack, in which case the same-origin policy of the browser
2891 sandbox only verifies that the applet tries to contact the same IP
2892 as from where it was loaded at the IP level. The Host: header may
2893 be different from the connected IP and approved origin.
2897 NAME: client_dst_passthru
2900 LOC: Config.onoff.client_dst_passthru
2902 With NAT or TPROXY intercepted traffic Squid may pass the request
2903 directly to the original client destination IP or seek a faster
2904 source using the HTTP Host header.
2906 Using Host to locate alternative servers can provide faster
2907 connectivity with a range of failure recovery options.
2908 But can also lead to connectivity trouble when the client and
2909 server are attempting stateful interactions unaware of the proxy.
2911 This option (on by default) prevents alternative DNS entries being
2912 located to send intercepted traffic DIRECT to an origin server.
2913 The clients original destination IP and port will be used instead.
2915 Regardless of this option setting, when dealing with intercepted
2916 traffic Squid will verify the Host: header and any traffic which
2917 fails Host verification will be treated as if this option were ON.
2919 see host_verify_strict for details on the verification process.
2924 -----------------------------------------------------------------------------
2927 NAME: tls_outgoing_options
2928 IFDEF: USE_GNUTLS||USE_OPENSSL
2929 TYPE: securePeerOptions
2930 DEFAULT: min-version=1.0
2931 LOC: Security::ProxyOutgoingConfig
2933 disable Do not support https:// URLs.
2935 cert=/path/to/client/certificate
2936 A client X.509 certificate to use when connecting.
2938 key=/path/to/client/private_key
2939 The private key corresponding to the cert= above.
2941 If key= is not specified cert= is assumed to
2942 reference a PEM file containing both the certificate
2945 cipher=... The list of valid TLS ciphers to use.
2948 The minimum TLS protocol version to permit.
2949 To control SSLv3 use the options= parameter.
2950 Supported Values: 1.0 (default), 1.1, 1.2, 1.3
2952 options=... Specify various TLS/SSL implementation options.
2954 OpenSSL options most important are:
2956 NO_SSLv3 Disallow the use of SSLv3
2959 Always create a new key when using
2960 temporary/ephemeral DH key exchanges
2963 Disable use of RFC5077 session tickets.
2964 Some servers may have problems
2965 understanding the TLS extension due
2966 to ambiguous specification in RFC4507.
2968 ALL Enable various bug workarounds
2969 suggested as "harmless" by OpenSSL
2970 Be warned that this reduces SSL/TLS
2971 strength to some attacks.
2973 See the OpenSSL SSL_CTX_set_options documentation
2974 for a more complete list.
2976 GnuTLS options most important are:
2979 Disable use of RFC5077 session tickets.
2980 Some servers may have problems
2981 understanding the TLS extension due
2982 to ambiguous specification in RFC4507.
2984 See the GnuTLS Priority Strings documentation
2985 for a more complete list.
2986 http://www.gnutls.org/manual/gnutls.html#Priority-Strings
2989 cafile= PEM file containing CA certificates to use when verifying
2990 the peer certificate. May be repeated to load multiple files.
2992 capath= A directory containing additional CA certificates to
2993 use when verifying the peer certificate.
2994 Requires OpenSSL or LibreSSL.
2996 crlfile=... A certificate revocation list file to use when
2997 verifying the peer certificate.
2999 flags=... Specify various flags modifying the TLS implementation:
3002 Accept certificates even if they fail to
3005 Don't verify the peer certificate
3006 matches the server name
3009 Whether to use the system Trusted CAs. Default is ON.
3011 domain= The peer name as advertised in its certificate.
3012 Used for verifying the correctness of the received peer
3013 certificate. If not specified the peer hostname will be
3019 -----------------------------------------------------------------------------
3022 NAME: ssl_unclean_shutdown
3026 LOC: Config.SSL.unclean_shutdown
3028 Some browsers (especially MSIE) bugs out on SSL shutdown
3035 LOC: Config.SSL.ssl_engine
3038 The OpenSSL engine to use. You will need to set this if you
3039 would like to use hardware SSL acceleration for example.
3042 NAME: sslproxy_session_ttl
3045 LOC: Config.SSL.session_ttl
3048 Sets the timeout value for SSL sessions
3051 NAME: sslproxy_session_cache_size
3054 LOC: Config.SSL.sessionCacheSize
3057 Sets the cache size to use for ssl session
3060 NAME: sslproxy_foreign_intermediate_certs
3063 LOC: Config.ssl_client.foreignIntermediateCertsPath
3066 Many origin servers fail to send their full server certificate
3067 chain for verification, assuming the client already has or can
3068 easily locate any missing intermediate certificates.
3070 Squid uses the certificates from the specified file to fill in
3071 these missing chains when trying to validate origin server
3074 The file is expected to contain zero or more PEM-encoded
3075 intermediate certificates. These certificates are not treated
3076 as trusted root certificates, and any self-signed certificate in
3077 this file will be ignored.
3080 NAME: sslproxy_cert_sign_hash
3083 LOC: Config.SSL.certSignHash
3086 Sets the hashing algorithm to use when signing generated certificates.
3087 Valid algorithm names depend on the OpenSSL library used. The following
3088 names are usually available: sha1, sha256, sha512, and md5. Please see
3089 your OpenSSL library manual for the available hashes. By default, Squids
3090 that support this option use sha256 hashes.
3092 Squid does not forcefully purge cached certificates that were generated
3093 with an algorithm other than the currently configured one. They remain
3094 in the cache, subject to the regular cache eviction policy, and become
3095 useful if the algorithm changes again.
3100 TYPE: sslproxy_ssl_bump
3101 LOC: Config.accessList.ssl_bump
3102 DEFAULT_DOC: Become a TCP tunnel without decrypting proxied traffic.
3105 This option is consulted when a CONNECT request is received on
3106 an http_port (or a new connection is intercepted at an
3107 https_port), provided that port was configured with an ssl-bump
3108 flag. The subsequent data on the connection is either treated as
3109 HTTPS and decrypted OR tunneled at TCP level without decryption,
3110 depending on the first matching bumping "action".
3112 ssl_bump <action> [!]acl ...
3114 The following bumping actions are currently supported:
3117 Become a TCP tunnel without decrypting proxied traffic.
3118 This is the default action.
3121 When used on step SslBump1, establishes a secure connection
3122 with the client first, then connect to the server.
3123 When used on step SslBump2 or SslBump3, establishes a secure
3124 connection with the server and, using a mimicked server
3125 certificate, with the client.
3128 Receive client (step SslBump1) or server (step SslBump2)
3129 certificate while preserving the possibility of splicing the
3130 connection. Peeking at the server certificate (during step 2)
3131 usually precludes bumping of the connection at step 3.
3134 Receive client (step SslBump1) or server (step SslBump2)
3135 certificate while preserving the possibility of bumping the
3136 connection. Staring at the server certificate (during step 2)
3137 usually precludes splicing of the connection at step 3.
3140 Close client and server connections.
3142 Backward compatibility actions available at step SslBump1:
3145 Bump the connection. Establish a secure connection with the
3146 client first, then connect to the server. This old mode does
3147 not allow Squid to mimic server SSL certificate and does not
3148 work with intercepted SSL connections.
3151 Bump the connection. Establish a secure connection with the
3152 server first, then establish a secure connection with the
3153 client, using a mimicked server certificate. Works with both
3154 CONNECT requests and intercepted SSL connections, but does
3155 not allow to make decisions based on SSL handshake info.
3158 Decide whether to bump or splice the connection based on
3159 client-to-squid and server-to-squid SSL hello messages.
3163 Same as the "splice" action.
3165 All ssl_bump rules are evaluated at each of the supported bumping
3166 steps. Rules with actions that are impossible at the current step are
3167 ignored. The first matching ssl_bump action wins and is applied at the
3168 end of the current step. If no rules match, the splice action is used.
3169 See the at_step ACL for a list of the supported SslBump steps.
3171 This clause supports both fast and slow acl types.
3172 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
3174 See also: http_port ssl-bump, https_port ssl-bump, and acl at_step.
3177 # Example: Bump all TLS connections except those originating from
3178 # localhost or those going to example.com.
3180 acl broken_sites ssl::server_name .example.com
3181 ssl_bump splice localhost
3182 ssl_bump splice broken_sites
3186 NAME: sslproxy_cert_error
3189 DEFAULT_DOC: Server certificate errors terminate the transaction.
3190 LOC: Config.ssl_client.cert_error
3193 Use this ACL to bypass server certificate validation errors.
3195 For example, the following lines will bypass all validation errors
3196 when talking to servers for example.com. All other
3197 validation errors will result in ERR_SECURE_CONNECT_FAIL error.
3199 acl BrokenButTrustedServers dstdomain example.com
3200 sslproxy_cert_error allow BrokenButTrustedServers
3201 sslproxy_cert_error deny all
3203 This clause only supports fast acl types.
3204 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
3205 Using slow acl types may result in server crashes
3207 Without this option, all server certificate validation errors
3208 terminate the transaction to protect Squid and the client.
3210 SQUID_X509_V_ERR_INFINITE_VALIDATION error cannot be bypassed
3211 but should not happen unless your OpenSSL library is buggy.
3214 Bypassing validation errors is dangerous because an
3215 error usually implies that the server cannot be trusted
3216 and the connection may be insecure.
3218 See also: sslproxy_flags and DONT_VERIFY_PEER.
3221 NAME: sslproxy_cert_sign
3224 POSTSCRIPTUM: signUntrusted ssl::certUntrusted
3225 POSTSCRIPTUM: signSelf ssl::certSelfSigned
3226 POSTSCRIPTUM: signTrusted all
3227 TYPE: sslproxy_cert_sign
3228 LOC: Config.ssl_client.cert_sign
3231 sslproxy_cert_sign <signing algorithm> acl ...
3233 The following certificate signing algorithms are supported:
3236 Sign using the configured CA certificate which is usually
3237 placed in and trusted by end-user browsers. This is the
3238 default for trusted origin server certificates.
3241 Sign to guarantee an X509_V_ERR_CERT_UNTRUSTED browser error.
3242 This is the default for untrusted origin server certificates
3243 that are not self-signed (see ssl::certUntrusted).
3246 Sign using a self-signed certificate with the right CN to
3247 generate a X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT error in the
3248 browser. This is the default for self-signed origin server
3249 certificates (see ssl::certSelfSigned).
3251 This clause only supports fast acl types.
3253 When sslproxy_cert_sign acl(s) match, Squid uses the corresponding
3254 signing algorithm to generate the certificate and ignores all
3255 subsequent sslproxy_cert_sign options (the first match wins). If no
3256 acl(s) match, the default signing algorithm is determined by errors
3257 detected when obtaining and validating the origin server certificate.
3259 WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can
3260 be used with sslproxy_cert_adapt, but if and only if Squid is bumping a
3261 CONNECT request that carries a domain name. In all other cases (CONNECT
3262 to an IP address or an intercepted SSL connection), Squid cannot detect
3263 the domain mismatch at certificate generation time when
3264 bump-server-first is used.
3267 NAME: sslproxy_cert_adapt
3270 TYPE: sslproxy_cert_adapt
3271 LOC: Config.ssl_client.cert_adapt
3274 sslproxy_cert_adapt <adaptation algorithm> acl ...
3276 The following certificate adaptation algorithms are supported:
3279 Sets the "Not After" property to the "Not After" property of
3280 the CA certificate used to sign generated certificates.
3283 Sets the "Not Before" property to the "Not Before" property of
3284 the CA certificate used to sign generated certificates.
3286 setCommonName or setCommonName{CN}
3287 Sets Subject.CN property to the host name specified as a
3288 CN parameter or, if no explicit CN parameter was specified,
3289 extracted from the CONNECT request. It is a misconfiguration
3290 to use setCommonName without an explicit parameter for
3291 intercepted or tproxied SSL connections.
3293 This clause only supports fast acl types.
3295 Squid first groups sslproxy_cert_adapt options by adaptation algorithm.
3296 Within a group, when sslproxy_cert_adapt acl(s) match, Squid uses the
3297 corresponding adaptation algorithm to generate the certificate and
3298 ignores all subsequent sslproxy_cert_adapt options in that algorithm's
3299 group (i.e., the first match wins within each algorithm group). If no
3300 acl(s) match, the default mimicking action takes place.
3302 WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can
3303 be used with sslproxy_cert_adapt, but if and only if Squid is bumping a
3304 CONNECT request that carries a domain name. In all other cases (CONNECT
3305 to an IP address or an intercepted SSL connection), Squid cannot detect
3306 the domain mismatch at certificate generation time when
3307 bump-server-first is used.
3310 NAME: sslpassword_program
3313 LOC: Config.Program.ssl_password
3316 Specify a program used for entering SSL key passphrases
3317 when using encrypted SSL certificate keys. If not specified
3318 keys must either be unencrypted, or Squid started with the -N
3319 option to allow it to query interactively for the passphrase.
3321 The key file name is given as argument to the program allowing
3322 selection of the right password if you have multiple encrypted
3327 OPTIONS RELATING TO EXTERNAL SSL_CRTD
3328 -----------------------------------------------------------------------------
3331 NAME: sslcrtd_program
3334 DEFAULT: @DEFAULT_SSL_CRTD@ -s @DEFAULT_SSL_DB_DIR@ -M 4MB
3335 LOC: Ssl::TheConfig.ssl_crtd
3337 Specify the location and options of the executable for certificate
3340 @DEFAULT_SSL_CRTD@ program can use a disk cache to improve response
3341 times on repeated requests. To enable caching, specify -s and -M
3342 parameters. If those parameters are not given, the program generates
3343 a new certificate on every request.
3345 For more information use:
3346 @DEFAULT_SSL_CRTD@ -h
3349 NAME: sslcrtd_children
3350 TYPE: HelperChildConfig
3352 DEFAULT: 32 startup=5 idle=1
3353 LOC: Ssl::TheConfig.ssl_crtdChildren
3355 Specifies the maximum number of certificate generation processes that
3356 Squid may spawn (numberofchildren) and several related options. Using
3357 too few of these helper processes (a.k.a. "helpers") creates request
3358 queues. Using too many helpers wastes your system resources. Squid
3359 does not support spawning more than 32 helpers.
3361 Usage: numberofchildren [option]...
3363 The startup= and idle= options allow some measure of skew in your
3368 Sets the minimum number of processes to spawn when Squid
3369 starts or reconfigures. When set to zero the first request will
3370 cause spawning of the first child process to handle it.
3372 Starting too few children temporary slows Squid under load while it
3373 tries to spawn enough additional processes to cope with traffic.
3377 Sets a minimum of how many processes Squid is to try and keep available
3378 at all times. When traffic begins to rise above what the existing
3379 processes can handle this many more will be spawned up to the maximum
3380 configured. A minimum setting of 1 is required.
3384 Sets the maximum number of queued requests. A request is queued when
3385 no existing child is idle and no new child can be started due to
3386 numberofchildren limit. If the queued requests exceed queue size for
3387 more than 3 minutes squid aborts its operation. The default value is
3388 set to 2*numberofchildren.
3390 You must have at least one ssl_crtd process.
3393 NAME: sslcrtvalidator_program
3397 LOC: Ssl::TheConfig.ssl_crt_validator
3399 Specify the location and options of the executable for ssl_crt_validator
3402 Usage: sslcrtvalidator_program [ttl=n] [cache=n] path ...
3405 ttl=n TTL in seconds for cached results. The default is 60 secs
3406 cache=n limit the result cache size. The default value is 2048
3409 NAME: sslcrtvalidator_children
3410 TYPE: HelperChildConfig
3412 DEFAULT: 32 startup=5 idle=1 concurrency=1
3413 LOC: Ssl::TheConfig.ssl_crt_validator_Children
3415 Specifies the maximum number of certificate validation processes that
3416 Squid may spawn (numberofchildren) and several related options. Using
3417 too few of these helper processes (a.k.a. "helpers") creates request
3418 queues. Using too many helpers wastes your system resources. Squid
3419 does not support spawning more than 32 helpers.
3421 Usage: numberofchildren [option]...
3423 The startup= and idle= options allow some measure of skew in your
3428 Sets the minimum number of processes to spawn when Squid
3429 starts or reconfigures. When set to zero the first request will
3430 cause spawning of the first child process to handle it.
3432 Starting too few children temporary slows Squid under load while it
3433 tries to spawn enough additional processes to cope with traffic.
3437 Sets a minimum of how many processes Squid is to try and keep available
3438 at all times. When traffic begins to rise above what the existing
3439 processes can handle this many more will be spawned up to the maximum
3440 configured. A minimum setting of 1 is required.
3444 The number of requests each certificate validator helper can handle in
3445 parallel. A value of 0 indicates the certificate validator does not
3446 support concurrency. Defaults to 1.
3448 When this directive is set to a value >= 1 then the protocol
3449 used to communicate with the helper is modified to include
3450 a request ID in front of the request/response. The request
3451 ID from the request must be echoed back with the response
3456 Sets the maximum number of queued requests. A request is queued when
3457 no existing child can accept it due to concurrency limit and no new
3458 child can be started due to numberofchildren limit. If the queued
3459 requests exceed queue size for more than 3 minutes squid aborts its
3460 operation. The default value is set to 2*numberofchildren.
3462 You must have at least one ssl_crt_validator process.
3466 OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
3467 -----------------------------------------------------------------------------
3475 To specify other caches in a hierarchy, use the format:
3477 cache_peer hostname type http-port icp-port [options]
3482 # hostname type port port options
3483 # -------------------- -------- ----- ----- -----------
3484 cache_peer parent.foo.net parent 3128 3130 default
3485 cache_peer sib1.foo.net sibling 3128 3130 proxy-only
3486 cache_peer sib2.foo.net sibling 3128 3130 proxy-only
3487 cache_peer example.com parent 80 0 default
3488 cache_peer cdn.example.com sibling 3128 0
3490 type: either 'parent', 'sibling', or 'multicast'.
3492 proxy-port: The port number where the peer accept HTTP requests.
3493 For other Squid proxies this is usually 3128
3494 For web servers this is usually 80
3496 icp-port: Used for querying neighbor caches about objects.
3497 Set to 0 if the peer does not support ICP or HTCP.
3498 See ICP and HTCP options below for additional details.
3501 ==== ICP OPTIONS ====
3503 You MUST also set icp_port and icp_access explicitly when using these options.
3504 The defaults will prevent peer traffic using ICP.
3507 no-query Disable ICP queries to this neighbor.
3510 Indicates the named peer is a member of a multicast group.
3511 ICP queries will not be sent directly to the peer, but ICP
3512 replies will be accepted from it.
3514 closest-only Indicates that, for ICP_OP_MISS replies, we'll only forward
3515 CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes.
3518 To only send ICP queries to this neighbor infrequently.
3519 This is used to keep the neighbor round trip time updated
3520 and is usually used in conjunction with weighted-round-robin.
3523 ==== HTCP OPTIONS ====
3525 You MUST also set htcp_port and htcp_access explicitly when using these options.
3526 The defaults will prevent peer traffic using HTCP.
3529 htcp Send HTCP, instead of ICP, queries to the neighbor.
3530 You probably also want to set the "icp-port" to 4827
3531 instead of 3130. This directive accepts a comma separated
3532 list of options described below.
3534 htcp=oldsquid Send HTCP to old Squid versions (2.5 or earlier).
3536 htcp=no-clr Send HTCP to the neighbor but without
3537 sending any CLR requests. This cannot be used with
3540 htcp=only-clr Send HTCP to the neighbor but ONLY CLR requests.
3541 This cannot be used with no-clr.
3544 Send HTCP to the neighbor including CLRs but only when
3545 they do not result from PURGE requests.
3548 Forward any HTCP CLR requests this proxy receives to the peer.
3551 ==== PEER SELECTION METHODS ====
3553 The default peer selection method is ICP, with the first responding peer
3554 being used as source. These options can be used for better load balancing.
3557 default This is a parent cache which can be used as a "last-resort"
3558 if a peer cannot be located by any of the peer-selection methods.
3559 If specified more than once, only the first is used.
3561 round-robin Load-Balance parents which should be used in a round-robin
3562 fashion in the absence of any ICP queries.
3563 weight=N can be used to add bias.
3565 weighted-round-robin
3566 Load-Balance parents which should be used in a round-robin
3567 fashion with the frequency of each parent being based on the
3568 round trip time. Closer parents are used more often.
3569 Usually used for background-ping parents.
3570 weight=N can be used to add bias.
3572 carp Load-Balance parents which should be used as a CARP array.
3573 The requests will be distributed among the parents based on the
3574 CARP load balancing hash function based on their weight.
3576 userhash Load-balance parents based on the client proxy_auth or ident username.
3578 sourcehash Load-balance parents based on the client source IP.
3581 To be used only for cache peers of type "multicast".
3582 ALL members of this multicast group have "sibling"
3583 relationship with it, not "parent". This is to a multicast
3584 group when the requested object would be fetched only from
3585 a "parent" cache, anyway. It's useful, e.g., when
3586 configuring a pool of redundant Squid proxies, being
3587 members of the same multicast group.
3590 ==== PEER SELECTION OPTIONS ====
3592 weight=N use to affect the selection of a peer during any weighted
3593 peer-selection mechanisms.
3594 The weight must be an integer; default is 1,
3595 larger weights are favored more.
3596 This option does not affect parent selection if a peering
3597 protocol is not in use.
3599 basetime=N Specify a base amount to be subtracted from round trip
3601 It is subtracted before division by weight in calculating
3602 which parent to fectch from. If the rtt is less than the
3603 base time the rtt is set to a minimal value.
3605 ttl=N Specify a TTL to use when sending multicast ICP queries
3607 Only useful when sending to a multicast group.
3608 Because we don't accept ICP replies from random
3609 hosts, you must configure other group members as
3610 peers with the 'multicast-responder' option.
3612 no-delay To prevent access to this neighbor from influencing the
3615 digest-url=URL Tell Squid to fetch the cache digest (if digests are
3616 enabled) for this host from the specified URL rather
3617 than the Squid default location.
3620 ==== CARP OPTIONS ====
3622 carp-key=key-specification
3623 use a different key than the full URL to hash against the peer.
3624 the key-specification is a comma-separated list of the keywords
3625 scheme, host, port, path, params
3626 Order is not important.
3628 ==== ACCELERATOR / REVERSE-PROXY OPTIONS ====
3630 originserver Causes this parent to be contacted as an origin server.
3631 Meant to be used in accelerator setups when the peer
3635 Set the Host header of requests forwarded to this peer.
3636 Useful in accelerator setups where the server (peer)
3637 expects a certain domain name but clients may request
3638 others. ie example.com or www.example.com
3640 no-digest Disable request of cache digests.
3643 Disables requesting ICMP RTT database (NetDB).
3646 ==== AUTHENTICATION OPTIONS ====
3649 If this is a personal/workgroup proxy and your parent
3650 requires proxy authentication.
3652 Note: The string can include URL escapes (i.e. %20 for
3653 spaces). This also means % must be written as %%.
3656 Send login details received from client to this peer.
3657 Both Proxy- and WWW-Authorization headers are passed
3658 without alteration to the peer.
3659 Authentication is not required by Squid for this to work.
3661 Note: This will pass any form of authentication but
3662 only Basic auth will work through a proxy unless the
3663 connection-auth options are also used.
3665 login=PASS Send login details received from client to this peer.
3666 Authentication is not required by this option.
3668 If there are no client-provided authentication headers
3669 to pass on, but username and password are available
3670 from an external ACL user= and password= result tags
3671 they may be sent instead.
3673 Note: To combine this with proxy_auth both proxies must
3674 share the same user database as HTTP only allows for
3675 a single login (one for proxy, one for origin server).
3676 Also be warned this will expose your users proxy
3677 password to the peer. USE WITH CAUTION
3680 Send the username to the upstream cache, but with a
3681 fixed password. This is meant to be used when the peer
3682 is in another administrative domain, but it is still
3683 needed to identify each user.
3684 The star can optionally be followed by some extra
3685 information which is added to the username. This can
3686 be used to identify this proxy to the peer, similar to
3687 the login=username:password option above.
3690 If this is a personal/workgroup proxy and your parent
3691 requires a secure proxy authentication.
3692 The first principal from the default keytab or defined by
3693 the environment variable KRB5_KTNAME will be used.
3695 WARNING: The connection may transmit requests from multiple
3696 clients. Negotiate often assumes end-to-end authentication
3697 and a single-client. Which is not strictly true here.
3699 login=NEGOTIATE:principal_name
3700 If this is a personal/workgroup proxy and your parent
3701 requires a secure proxy authentication.
3702 The principal principal_name from the default keytab or
3703 defined by the environment variable KRB5_KTNAME will be
3706 WARNING: The connection may transmit requests from multiple
3707 clients. Negotiate often assumes end-to-end authentication
3708 and a single-client. Which is not strictly true here.
3710 connection-auth=on|off
3711 Tell Squid that this peer does or not support Microsoft
3712 connection oriented authentication, and any such
3713 challenges received from there should be ignored.
3714 Default is auto to automatically determine the status
3718 Do not use a keytab to authenticate to a peer when
3719 login=NEGOTIATE is specified. Let the GSSAPI
3720 implementation determine which already existing
3721 credentials cache to use instead.
3724 ==== SSL / HTTPS / TLS OPTIONS ====
3726 tls Encrypt connections to this peer with TLS.
3728 sslcert=/path/to/ssl/certificate
3729 A client X.509 certificate to use when connecting to
3732 sslkey=/path/to/ssl/key
3733 The private key corresponding to sslcert above.
3735 If sslkey= is not specified sslcert= is assumed to
3736 reference a PEM file containing both the certificate
3739 sslcipher=... The list of valid SSL ciphers to use when connecting
3743 The minimum TLS protocol version to permit. To control
3744 SSLv3 use the tls-options= parameter.
3745 Supported Values: 1.0 (default), 1.1, 1.2
3747 tls-options=... Specify various TLS implementation options.
3749 OpenSSL options most important are:
3751 NO_SSLv3 Disallow the use of SSLv3
3754 Always create a new key when using
3755 temporary/ephemeral DH key exchanges
3758 Disable use of RFC5077 session tickets.
3759 Some servers may have problems
3760 understanding the TLS extension due
3761 to ambiguous specification in RFC4507.
3763 ALL Enable various bug workarounds
3764 suggested as "harmless" by OpenSSL
3765 Be warned that this reduces SSL/TLS
3766 strength to some attacks.
3768 See the OpenSSL SSL_CTX_set_options documentation for a
3771 GnuTLS options most important are:
3774 Disable use of RFC5077 session tickets.
3775 Some servers may have problems
3776 understanding the TLS extension due
3777 to ambiguous specification in RFC4507.
3779 See the GnuTLS Priority Strings documentation
3780 for a more complete list.
3781 http://www.gnutls.org/manual/gnutls.html#Priority-Strings
3783 tls-cafile= PEM file containing CA certificates to use when verifying
3784 the peer certificate. May be repeated to load multiple files.
3786 sslcapath=... A directory containing additional CA certificates to
3787 use when verifying the peer certificate.
3788 Requires OpenSSL or LibreSSL.
3790 sslcrlfile=... A certificate revocation list file to use when
3791 verifying the peer certificate.
3793 sslflags=... Specify various flags modifying the SSL implementation:
3796 Accept certificates even if they fail to
3800 Don't verify the peer certificate
3801 matches the server name
3803 ssldomain= The peer name as advertised in it's certificate.
3804 Used for verifying the correctness of the received peer
3805 certificate. If not specified the peer hostname will be
3808 front-end-https[=off|on|auto]
3809 Enable the "Front-End-Https: On" header needed when
3810 using Squid as a SSL frontend in front of Microsoft OWA.
3811 See MS KB document Q307347 for details on this header.
3812 If set to auto the header will only be added if the
3813 request is forwarded as a https:// URL.
3815 tls-default-ca[=off]
3816 Whether to use the system Trusted CAs. Default is ON.
3818 tls-no-npn Do not use the TLS NPN extension to advertise HTTP/1.1.
3820 ==== GENERAL OPTIONS ====
3823 A peer-specific connect timeout.
3824 Also see the peer_connect_timeout directive.
3826 connect-fail-limit=N
3827 How many times connecting to a peer must fail before
3828 it is marked as down. Standby connection failures
3829 count towards this limit. Default is 10.
3831 allow-miss Disable Squid's use of only-if-cached when forwarding
3832 requests to siblings. This is primarily useful when
3833 icp_hit_stale is used by the sibling. Excessive use
3834 of this option may result in forwarding loops. One way
3835 to prevent peering loops when using this option, is to
3836 deny cache peer usage on requests from a peer:
3838 cache_peer_access peerName deny fromPeer
3840 max-conn=N Limit the number of concurrent connections the Squid
3841 may open to this peer, including already opened idle
3842 and standby connections. There is no peer-specific
3843 connection limit by default.
3845 A peer exceeding the limit is not used for new
3846 requests unless a standby connection is available.
3848 max-conn currently works poorly with idle persistent
3849 connections: When a peer reaches its max-conn limit,
3850 and there are idle persistent connections to the peer,
3851 the peer may not be selected because the limiting code
3852 does not know whether Squid can reuse those idle
3855 standby=N Maintain a pool of N "hot standby" connections to an
3856 UP peer, available for requests when no idle
3857 persistent connection is available (or safe) to use.
3858 By default and with zero N, no such pool is maintained.
3859 N must not exceed the max-conn limit (if any).
3861 At start or after reconfiguration, Squid opens new TCP
3862 standby connections until there are N connections
3863 available and then replenishes the standby pool as
3864 opened connections are used up for requests. A used
3865 connection never goes back to the standby pool, but
3866 may go to the regular idle persistent connection pool
3867 shared by all peers and origin servers.
3869 Squid never opens multiple new standby connections
3870 concurrently. This one-at-a-time approach minimizes
3871 flooding-like effect on peers. Furthermore, just a few
3872 standby connections should be sufficient in most cases
3873 to supply most new requests with a ready-to-use
3876 Standby connections obey server_idle_pconn_timeout.
3877 For the feature to work as intended, the peer must be
3878 configured to accept and keep them open longer than
3879 the idle timeout at the connecting Squid, to minimize
3880 race conditions typical to idle used persistent
3881 connections. Default request_timeout and
3882 server_idle_pconn_timeout values ensure such a
3885 name=xxx Unique name for the peer.
3886 Required if you have multiple peers on the same host
3887 but different ports.
3888 This name can be used in cache_peer_access and similar
3889 directives to identify the peer.
3890 Can be used by outgoing access controls through the
3893 no-tproxy Do not use the client-spoof TPROXY support when forwarding
3894 requests to this peer. Use normal address selection instead.
3895 This overrides the spoof_client_ip ACL.
3897 proxy-only objects fetched from the peer will not be stored locally.
3901 NAME: cache_peer_access
3904 DEFAULT_DOC: No peer usage restrictions.
3907 Restricts usage of cache_peer proxies.
3910 cache_peer_access peer-name allow|deny [!]aclname ...
3912 For the required peer-name parameter, use either the value of the
3913 cache_peer name=value parameter or, if name=value is missing, the
3914 cache_peer hostname parameter.
3916 This directive narrows down the selection of peering candidates, but
3917 does not determine the order in which the selected candidates are
3918 contacted. That order is determined by the peer selection algorithms
3919 (see PEER SELECTION sections in the cache_peer documentation).
3921 If a deny rule matches, the corresponding peer will not be contacted
3922 for the current transaction -- Squid will not send ICP queries and
3923 will not forward HTTP requests to that peer. An allow match leaves
3924 the corresponding peer in the selection. The first match for a given
3925 peer wins for that peer.
3927 The relative order of cache_peer_access directives for the same peer
3928 matters. The relative order of any two cache_peer_access directives
3929 for different peers does not matter. To ease interpretation, it is a
3930 good idea to group cache_peer_access directives for the same peer
3933 A single cache_peer_access directive may be evaluated multiple times
3934 for a given transaction because individual peer selection algorithms
3935 may check it independently from each other. These redundant checks
3936 may be optimized away in future Squid versions.
3938 This clause only supports fast acl types.
3939 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
3943 NAME: neighbor_type_domain
3944 TYPE: hostdomaintype
3946 DEFAULT_DOC: The peer type from cache_peer directive is used for all requests to that peer.
3949 Modify the cache_peer neighbor type when passing requests
3950 about specific domains to the peer.
3953 neighbor_type_domain neighbor parent|sibling domain domain ...
3956 cache_peer foo.example.com parent 3128 3130
3957 neighbor_type_domain foo.example.com sibling .au .de
3959 The above configuration treats all requests to foo.example.com as a
3960 parent proxy unless the request is for a .au or .de ccTLD domain name.
3963 NAME: dead_peer_timeout
3967 LOC: Config.Timeout.deadPeer
3969 This controls how long Squid waits to declare a peer cache
3970 as "dead." If there are no ICP replies received in this
3971 amount of time, Squid will declare the peer dead and not
3972 expect to receive any further ICP replies. However, it
3973 continues to send ICP queries, and will mark the peer as
3974 alive upon receipt of the first subsequent ICP reply.
3976 This timeout also affects when Squid expects to receive ICP
3977 replies from peers. If more than 'dead_peer' seconds have
3978 passed since the last ICP reply was received, Squid will not
3979 expect to receive an ICP reply on the next query. Thus, if
3980 your time between requests is greater than this timeout, you
3981 will see a lot of requests sent DIRECT to origin servers
3982 instead of to your parents.
3985 NAME: forward_max_tries
3988 LOC: Config.forward_max_tries
3990 Limits the number of attempts to forward the request.
3992 For the purpose of this limit, Squid counts all high-level request
3993 forwarding attempts, including any same-destination retries after
3994 certain persistent connection failures and any attempts to use a
3995 different peer. However, low-level connection reopening attempts
3996 (enabled using connect_retries) are not counted.
3998 See also: forward_timeout and connect_retries.
4002 MEMORY CACHE OPTIONS
4003 -----------------------------------------------------------------------------
4010 LOC: Config.memMaxSize
4012 NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
4013 IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
4014 USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
4015 THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
4017 'cache_mem' specifies the ideal amount of memory to be used
4019 * In-Transit objects
4021 * Negative-Cached objects
4023 Data for these objects are stored in 4 KB blocks. This
4024 parameter specifies the ideal upper limit on the total size of
4025 4 KB blocks allocated. In-Transit objects take the highest
4028 In-transit objects have priority over the others. When
4029 additional space is needed for incoming data, negative-cached
4030 and hot objects will be released. In other words, the
4031 negative-cached and hot objects will fill up any unused space
4032 not needed for in-transit objects.
4034 If circumstances require, this limit will be exceeded.
4035 Specifically, if your incoming request rate requires more than
4036 'cache_mem' of memory to hold in-transit objects, Squid will
4037 exceed this limit to satisfy the new requests. When the load
4038 decreases, blocks will be freed until the high-water mark is
4039 reached. Thereafter, blocks will be used to store hot
4042 If shared memory caching is enabled, Squid does not use the shared
4043 cache space for in-transit objects, but they still consume as much
4044 local memory as they need. For more details about the shared memory
4045 cache, see memory_cache_shared.
4048 NAME: maximum_object_size_in_memory
4052 LOC: Config.Store.maxInMemObjSize
4054 Objects greater than this size will not be attempted to kept in
4055 the memory cache. This should be set high enough to keep objects
4056 accessed frequently in memory to improve performance whilst low
4057 enough to keep larger objects from hoarding cache_mem.
4060 NAME: memory_cache_shared
4063 LOC: Config.memShared
4065 DEFAULT_DOC: "on" where supported if doing memory caching with multiple SMP workers.
4067 Controls whether the memory cache is shared among SMP workers.
4069 The shared memory cache is meant to occupy cache_mem bytes and replace
4070 the non-shared memory cache, although some entities may still be
4071 cached locally by workers for now (e.g., internal and in-transit
4072 objects may be served from a local memory cache even if shared memory
4073 caching is enabled).
4075 By default, the memory cache is shared if and only if all of the
4076 following conditions are satisfied: Squid runs in SMP mode with
4077 multiple workers, cache_mem is positive, and Squid environment
4078 supports required IPC primitives (e.g., POSIX shared memory segments
4079 and GCC-style atomic operations).
4081 To avoid blocking locks, shared memory uses opportunistic algorithms
4082 that do not guarantee that every cachable entity that could have been
4083 shared among SMP workers will actually be shared.
4086 NAME: memory_cache_mode
4090 DEFAULT_DOC: Keep the most recently fetched objects in memory
4092 Controls which objects to keep in the memory cache (cache_mem)
4094 always Keep most recently fetched objects in memory (default)
4096 disk Only disk cache hits are kept in memory, which means
4097 an object must first be cached on disk and then hit
4098 a second time before cached in memory.
4100 network Only objects fetched from network is kept in memory
4103 NAME: memory_replacement_policy
4105 LOC: Config.memPolicy
4108 The memory replacement policy parameter determines which
4109 objects are purged from memory when memory space is needed.
4111 See cache_replacement_policy for details on algorithms.
4116 -----------------------------------------------------------------------------
4119 NAME: cache_replacement_policy
4121 LOC: Config.replPolicy
4124 The cache replacement policy parameter determines which
4125 objects are evicted (replaced) when disk space is needed.
4127 lru : Squid's original list based LRU policy
4128 heap GDSF : Greedy-Dual Size Frequency
4129 heap LFUDA: Least Frequently Used with Dynamic Aging
4130 heap LRU : LRU policy implemented using a heap
4132 Applies to any cache_dir lines listed below this directive.
4134 The LRU policies keeps recently referenced objects.
4136 The heap GDSF policy optimizes object hit rate by keeping smaller
4137 popular objects in cache so it has a better chance of getting a
4138 hit. It achieves a lower byte hit rate than LFUDA though since
4139 it evicts larger (possibly popular) objects.
4141 The heap LFUDA policy keeps popular objects in cache regardless of
4142 their size and thus optimizes byte hit rate at the expense of
4143 hit rate since one large, popular object will prevent many
4144 smaller, slightly less popular objects from being cached.
4146 Both policies utilize a dynamic aging mechanism that prevents
4147 cache pollution that can otherwise occur with frequency-based
4148 replacement policies.
4150 NOTE: if using the LFUDA replacement policy you should increase
4151 the value of maximum_object_size above its default of 4 MB to
4152 to maximize the potential byte hit rate improvement of LFUDA.
4154 For more information about the GDSF and LFUDA cache replacement
4155 policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
4156 and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
4159 NAME: minimum_object_size
4163 DEFAULT_DOC: no limit
4164 LOC: Config.Store.minObjectSize
4166 Objects smaller than this size will NOT be saved on disk. The
4167 value is specified in bytes, and the default is 0 KB, which
4168 means all responses can be stored.
4171 NAME: maximum_object_size
4175 LOC: Config.Store.maxObjectSize
4177 Set the default value for max-size parameter on any cache_dir.
4178 The value is specified in bytes, and the default is 4 MB.
4180 If you wish to get a high BYTES hit ratio, you should probably
4181 increase this (one 32 MB object hit counts for 3200 10KB
4184 If you wish to increase hit ratio more than you want to
4185 save bandwidth you should leave this low.
4187 NOTE: if using the LFUDA replacement policy you should increase
4188 this value to maximize the byte hit rate improvement of LFUDA!
4189 See cache_replacement_policy for a discussion of this policy.
4195 DEFAULT_DOC: No disk cache. Store cache objects only in memory.
4196 LOC: Config.cacheSwap
4199 cache_dir Type Directory-Name Fs-specific-data [options]
4201 You can specify multiple cache_dir lines to spread the
4202 cache among different disk partitions.
4204 Type specifies the kind of storage system to use. Only "ufs"
4205 is built by default. To enable any of the other storage systems
4206 see the --enable-storeio configure option.
4208 'Directory' is a top-level directory where cache swap
4209 files will be stored. If you want to use an entire disk
4210 for caching, this can be the mount-point directory.
4211 The directory must exist and be writable by the Squid
4212 process. Squid will NOT create this directory for you.
4214 In SMP configurations, cache_dir must not precede the workers option
4215 and should use configuration macros or conditionals to give each
4216 worker interested in disk caching a dedicated cache directory.
4219 ==== The ufs store type ====
4221 "ufs" is the old well-known Squid storage format that has always
4225 cache_dir ufs Directory-Name Mbytes L1 L2 [options]
4227 'Mbytes' is the amount of disk space (MB) to use under this
4228 directory. The default is 100 MB. Change this to suit your
4229 configuration. Do NOT put the size of your disk drive here.
4230 Instead, if you want Squid to use the entire disk drive,
4231 subtract 20% and use that value.
4233 'L1' is the number of first-level subdirectories which
4234 will be created under the 'Directory'. The default is 16.
4236 'L2' is the number of second-level subdirectories which
4237 will be created under each first-level directory. The default
4241 ==== The aufs store type ====
4243 "aufs" uses the same storage format as "ufs", utilizing
4244 POSIX-threads to avoid blocking the main Squid process on
4245 disk-I/O. This was formerly known in Squid as async-io.
4248 cache_dir aufs Directory-Name Mbytes L1 L2 [options]
4250 see argument descriptions under ufs above
4253 ==== The diskd store type ====
4255 "diskd" uses the same storage format as "ufs", utilizing a
4256 separate process to avoid blocking the main Squid process on
4260 cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
4262 see argument descriptions under ufs above
4264 Q1 specifies the number of unacknowledged I/O requests when Squid
4265 stops opening new files. If this many messages are in the queues,
4266 Squid won't open new files. Default is 64
4268 Q2 specifies the number of unacknowledged messages when Squid
4269 starts blocking. If this many messages are in the queues,
4270 Squid blocks until it receives some replies. Default is 72
4272 When Q1 < Q2 (the default), the cache directory is optimized
4273 for lower response time at the expense of a decrease in hit
4274 ratio. If Q1 > Q2, the cache directory is optimized for
4275 higher hit ratio at the expense of an increase in response
4279 ==== The rock store type ====
4282 cache_dir rock Directory-Name Mbytes [options]
4284 The Rock Store type is a database-style storage. All cached
4285 entries are stored in a "database" file, using fixed-size slots.
4286 A single entry occupies one or more slots.
4288 If possible, Squid using Rock Store creates a dedicated kid
4289 process called "disker" to avoid blocking Squid worker(s) on disk
4290 I/O. One disker kid is created for each rock cache_dir. Diskers
4291 are created only when Squid, running in daemon mode, has support
4292 for the IpcIo disk I/O module.
4294 swap-timeout=msec: Squid will not start writing a miss to or
4295 reading a hit from disk if it estimates that the swap operation
4296 will take more than the specified number of milliseconds. By
4297 default and when set to zero, disables the disk I/O time limit
4298 enforcement. Ignored when using blocking I/O module because
4299 blocking synchronous I/O does not allow Squid to estimate the
4300 expected swap wait time.
4302 max-swap-rate=swaps/sec: Artificially limits disk access using
4303 the specified I/O rate limit. Swap out requests that
4304 would cause the average I/O rate to exceed the limit are
4305 delayed. Individual swap in requests (i.e., hits or reads) are
4306 not delayed, but they do contribute to measured swap rate and
4307 since they are placed in the same FIFO queue as swap out
4308 requests, they may wait longer if max-swap-rate is smaller.
4309 This is necessary on file systems that buffer "too
4310 many" writes and then start blocking Squid and other processes
4311 while committing those writes to disk. Usually used together
4312 with swap-timeout to avoid excessive delays and queue overflows
4313 when disk demand exceeds available disk "bandwidth". By default
4314 and when set to zero, disables the disk I/O rate limit
4315 enforcement. Currently supported by IpcIo module only.
4317 slot-size=bytes: The size of a database "record" used for
4318 storing cached responses. A cached response occupies at least
4319 one slot and all database I/O is done using individual slots so
4320 increasing this parameter leads to more disk space waste while
4321 decreasing it leads to more disk I/O overheads. Should be a
4322 multiple of your operating system I/O page size. Defaults to
4323 16KBytes. A housekeeping header is stored with each slot and
4324 smaller slot-sizes will be rejected. The header is smaller than
4328 ==== COMMON OPTIONS ====
4330 no-store no new objects should be stored to this cache_dir.
4332 min-size=n the minimum object size in bytes this cache_dir
4333 will accept. It's used to restrict a cache_dir
4334 to only store large objects (e.g. AUFS) while
4335 other stores are optimized for smaller objects
4339 max-size=n the maximum object size in bytes this cache_dir
4341 The value in maximum_object_size directive sets
4342 the default unless more specific details are
4343 available (ie a small store capacity).
4345 Note: To make optimal use of the max-size limits you should order
4346 the cache_dir lines with the smallest max-size value first.
4350 # Uncomment and adjust the following to add a disk cache directory.
4351 #cache_dir ufs @DEFAULT_SWAP_DIR@ 100 16 256
4355 NAME: store_dir_select_algorithm
4357 LOC: Config.store_dir_select_algorithm
4360 How Squid selects which cache_dir to use when the response
4361 object will fit into more than one.
4363 Regardless of which algorithm is used the cache_dir min-size
4364 and max-size parameters are obeyed. As such they can affect
4365 the selection algorithm by limiting the set of considered
4372 This algorithm is suited to caches with similar cache_dir
4373 sizes and disk speeds.
4375 The disk with the least I/O pending is selected.
4376 When there are multiple disks with the same I/O load ranking
4377 the cache_dir with most available capacity is selected.
4379 When a mix of cache_dir sizes are configured the faster disks
4380 have a naturally lower I/O loading and larger disks have more
4381 capacity. So space used to store objects and data throughput
4382 may be very unbalanced towards larger disks.
4387 This algorithm is suited to caches with unequal cache_dir
4390 Each cache_dir is selected in a rotation. The next suitable
4393 Available cache_dir capacity is only considered in relation
4394 to whether the object will fit and meets the min-size and
4395 max-size parameters.
4397 Disk I/O loading is only considered to prevent overload on slow
4398 disks. This algorithm does not spread objects by size, so any
4399 I/O loading per-disk may appear very unbalanced and volatile.
4401 If several cache_dirs use similar min-size, max-size, or other
4402 limits to to reject certain responses, then do not group such
4403 cache_dir lines together, to avoid round-robin selection bias
4404 towards the first cache_dir after the group. Instead, interleave
4405 cache_dir lines from different groups. For example:
4407 store_dir_select_algorithm round-robin
4408 cache_dir rock /hdd1 ... min-size=100000
4409 cache_dir rock /ssd1 ... max-size=99999
4410 cache_dir rock /hdd2 ... min-size=100000
4411 cache_dir rock /ssd2 ... max-size=99999
4412 cache_dir rock /hdd3 ... min-size=100000
4413 cache_dir rock /ssd3 ... max-size=99999
4416 NAME: paranoid_hit_validation
4417 COMMENT: time-units-small
4418 TYPE: time_nanoseconds
4420 DEFAULT_DOC: validation disabled
4421 LOC: Config.paranoid_hit_validation
4423 Controls whether Squid should perform paranoid validation of cache entry
4424 metadata integrity every time a cache entry is hit. This low-level
4425 validation should always succeed. Each failed validation results in a
4426 cache miss, a BUG line reported to cache.log, and the invalid entry
4427 marked as unusable (and eventually purged from the cache).
4429 Squid can only validate shared cache memory and rock cache_dir entries.
4431 * Zero (default) value means that the validation is disabled.
4433 * Positive values enable validation:
4434 - values less than 1 day approximate the maximum time that Squid is allowed
4435 to spend validating a single cache hit.
4436 - values greater or equal to 1 day are considered as no limitation:
4437 in this case all checks will be performed, regardless of how much time
4440 Hits are usually stored using 16KB slots (for rock, the size is
4441 configurable via cache_dir slot-size). Larger hits require scanning more
4442 slots and, hence, take more time. When validation is enabled, at least one
4443 slot is always validated, regardless of the configured time limit.
4445 A worker process validating an entry cannot do anything else (i.e. the
4446 validation is blocking). The validation overhead is environment dependent,
4447 but developers have observed Squid spending 3-10 microseconds to check each
4448 slot of a Rock or shared memory hit entry. If Squid cuts validation short
4449 because it runs out of configured time, it treats the entry as valid.
4451 When hit validation is enabled, its statistics is included in Cache
4452 Manager mgr:counters, mgr:5min, and mgr:60min reports.
4455 NAME: max_open_disk_fds
4457 LOC: Config.max_open_disk_fds
4459 DEFAULT_DOC: no limit
4461 To avoid having disk as the I/O bottleneck Squid can optionally
4462 bypass the on-disk cache if more than this amount of disk file
4463 descriptors are open.
4465 A value of 0 indicates no limit.
4468 NAME: cache_swap_low
4469 COMMENT: (percent, 0-100)
4472 LOC: Config.Swap.lowWaterMark
4474 The low-water mark for AUFS/UFS/diskd cache object eviction by
4475 the cache_replacement_policy algorithm.
4477 Removal begins when the swap (disk) usage of a cache_dir is
4478 above this low-water mark and attempts to maintain utilization
4479 near the low-water mark.
4481 As swap utilization increases towards the high-water mark set
4482 by cache_swap_high object eviction becomes more aggressive.
4484 The value difference in percentages between low- and high-water
4485 marks represent an eviction rate of 300 objects per second and
4486 the rate continues to scale in aggressiveness by multiples of
4487 this above the high-water mark.
4489 Defaults are 90% and 95%. If you have a large cache, 5% could be
4490 hundreds of MB. If this is the case you may wish to set these
4491 numbers closer together.
4493 See also cache_swap_high and cache_replacement_policy
4496 NAME: cache_swap_high
4497 COMMENT: (percent, 0-100)
4500 LOC: Config.Swap.highWaterMark
4502 The high-water mark for AUFS/UFS/diskd cache object eviction by
4503 the cache_replacement_policy algorithm.
4505 Removal begins when the swap (disk) usage of a cache_dir is
4506 above the low-water mark set by cache_swap_low and attempts to
4507 maintain utilization near the low-water mark.
4509 As swap utilization increases towards this high-water mark object
4510 eviction becomes more aggressive.
4512 The value difference in percentages between low- and high-water
4513 marks represent an eviction rate of 300 objects per second and
4514 the rate continues to scale in aggressiveness by multiples of
4515 this above the high-water mark.
4517 Defaults are 90% and 95%. If you have a large cache, 5% could be
4518 hundreds of MB. If this is the case you may wish to set these
4519 numbers closer together.
4521 See also cache_swap_low and cache_replacement_policy
4526 -----------------------------------------------------------------------------
4533 DEFAULT_DOC: The format definitions squid, common, combined, referrer, useragent are built in.
4537 logformat <name> <format specification>
4539 Defines an access log format.
4541 The <format specification> is a string with embedded % format codes
4543 % format codes all follow the same basic structure where all
4544 components but the formatcode are optional and usually unnecessary,
4545 especially when dealing with common codes.
4547 % [encoding] [-] [[0]width] [{arg}] formatcode [{arg}]
4549 encoding escapes or otherwise protects "special" characters:
4551 " Quoted string encoding where quote(") and
4552 backslash(\) characters are \-escaped while
4553 CR, LF, and TAB characters are encoded as \r,
4554 \n, and \t two-character sequences.
4556 [ Custom Squid encoding where percent(%), square
4557 brackets([]), backslash(\) and characters with
4558 codes outside of [32,126] range are %-encoded.
4559 SP is not encoded. Used by log_mime_hdrs.
4561 # URL encoding (a.k.a. percent-encoding) where
4562 all URL unsafe and control characters (per RFC
4563 1738) are %-encoded.
4565 / Shell-like encoding where quote(") and
4566 backslash(\) characters are \-escaped while CR
4567 and LF characters are encoded as \r and \n
4568 two-character sequences. Values containing SP
4569 character(s) are surrounded by quotes(").
4571 ' Raw/as-is encoding with no escaping/quoting.
4573 Default encoding: When no explicit encoding is
4574 specified, each %code determines its own encoding.
4575 Most %codes use raw/as-is encoding, but some codes use
4576 a so called "pass-through URL encoding" where all URL
4577 unsafe and control characters (per RFC 1738) are
4578 %-encoded, but the percent character(%) is left as is.
4582 width minimum and/or maximum field width:
4583 [width_min][.width_max]
4584 When minimum starts with 0, the field is zero-padded.
4585 String values exceeding maximum width are truncated.
4587 {arg} argument such as header name etc. This field may be
4588 placed before or after the token, but not both at once.
4592 % a literal % character
4593 sn Unique sequence number per log line entry
4594 err_code The ID of an error response served by Squid or
4595 a similar internal error identifier.
4596 err_detail Additional err_code-dependent error information.
4597 note The annotation specified by the argument. Also
4598 logs the adaptation meta headers set by the
4599 adaptation_meta configuration parameter.
4600 If no argument given all annotations logged.
4601 The argument may include a separator to use with
4604 By default, multiple note values are separated with ","
4605 and multiple notes are separated with "\r\n".
4606 When logging named notes with %{name}note, the
4607 explicitly configured separator is used between note
4608 values. When logging all notes with %note, the
4609 explicitly configured separator is used between
4610 individual notes. There is currently no way to
4611 specify both value and notes separators when logging
4612 all notes with %note.
4613 master_xaction The master transaction identifier is an unsigned
4614 integer. These IDs are guaranteed to monotonically
4615 increase within a single worker process lifetime, with
4616 higher values corresponding to transactions that were
4617 accepted or initiated later. Due to current implementation
4618 deficiencies, some IDs are skipped (i.e. never logged).
4619 Concurrent workers and restarted workers use similar,
4620 overlapping sequences of master transaction IDs.
4622 Connection related format codes:
4624 >a Client source IP address
4626 >p Client source port
4627 >eui Client source EUI (MAC address, EUI-48 or EUI-64 identifier)
4628 >la Local IP address the client connected to
4629 >lp Local port number the client connected to
4630 >qos Client connection TOS/DSCP value set by Squid
4631 >nfmark Client connection netfilter packet MARK set by Squid
4633 transport::>connection_id Identifies a transport connection
4634 accepted by Squid (e.g., a connection carrying the
4635 logged HTTP request). Currently, Squid only supports
4636 TCP transport connections.
4638 The logged identifier is an unsigned integer. These
4639 IDs are guaranteed to monotonically increase within a
4640 single worker process lifetime, with higher values
4641 corresponding to connections that were accepted later.
4642 Many IDs are skipped (i.e. never logged). Concurrent
4643 workers and restarted workers use similar, partially
4644 overlapping sequences of IDs.
4646 la Local listening IP address the client connection was connected to.
4647 lp Local listening port number the client connection was connected to.
4649 <a Server IP address of the last server or peer connection
4650 <A Server FQDN or peer name
4651 <p Server port number of the last server or peer connection
4652 <la Local IP address of the last server or peer connection
4653 <lp Local port number of the last server or peer connection
4654 <qos Server connection TOS/DSCP value set by Squid
4655 <nfmark Server connection netfilter packet MARK set by Squid
4657 >handshake Raw client handshake
4658 Initial client bytes received by Squid on a newly
4659 accepted TCP connection or inside a just established
4660 CONNECT tunnel. Squid stops accumulating handshake
4661 bytes as soon as the handshake parser succeeds or
4662 fails (determining whether the client is using the
4665 For HTTP clients, the handshake is the request line.
4666 For TLS clients, the handshake consists of all TLS
4667 records up to and including the TLS record that
4668 contains the last byte of the first ClientHello
4669 message. For clients using an unsupported protocol,
4670 this field contains the bytes received by Squid at the
4671 time of the handshake parsing failure.
4673 See the on_unsupported_protocol directive for more
4674 information on Squid handshake traffic expectations.
4676 Current support is limited to these contexts:
4677 - http_port connections, but only when the
4678 on_unsupported_protocol directive is in use.
4679 - https_port connections (and CONNECT tunnels) that
4680 are subject to the ssl_bump peek or stare action.
4682 To protect binary handshake data, this field is always
4683 base64-encoded (RFC 4648 Section 4). If logformat
4684 field encoding is configured, that encoding is applied
4685 on top of base64. Otherwise, the computed base64 value
4688 Time related format codes:
4690 ts Seconds since epoch
4691 tu subsecond time (milliseconds)
4692 tl Local time. Optional strftime format argument
4693 default %d/%b/%Y:%H:%M:%S %z
4694 tg GMT time. Optional strftime format argument
4695 default %d/%b/%Y:%H:%M:%S %z
4696 tr Response time (milliseconds)
4697 dt Total time spent making DNS lookups (milliseconds)
4698 tS Approximate master transaction start time in
4699 <full seconds since epoch>.<fractional seconds> format.
4700 Currently, Squid considers the master transaction
4701 started when a complete HTTP request header initiating
4702 the transaction is received from the client. This is
4703 the same value that Squid uses to calculate transaction
4704 response time when logging %tr to access.log. Currently,
4705 Squid uses millisecond resolution for %tS values,
4706 similar to the default access.log "current time" field
4709 Access Control related format codes:
4711 et Tag returned by external acl
4712 ea Log string returned by external acl
4713 un User name (any available)
4714 ul User name from authentication
4715 ue User name from external acl helper
4716 ui User name from ident
4717 un A user name. Expands to the first available name
4718 from the following list of information sources:
4719 - authenticated user name, like %ul
4720 - user name supplied by an external ACL, like %ue
4721 - SSL client name, like %us
4722 - ident user name, like %ui
4723 credentials Client credentials. The exact meaning depends on
4724 the authentication scheme: For Basic authentication,
4725 it is the password; for Digest, the realm sent by the
4726 client; for NTLM and Negotiate, the client challenge
4727 or client credentials prefixed with "YR " or "KK ".
4729 HTTP related format codes:
4733 [http::]rm Request method (GET/POST etc)
4734 [http::]>rm Request method from client
4735 [http::]<rm Request method sent to server or peer
4737 [http::]ru Request URL received (or computed) and sanitized
4739 Logs request URI received from the client, a
4740 request adaptation service, or a request
4741 redirector (whichever was applied last).
4743 Computed URLs are URIs of internally generated
4744 requests and various "error:..." URIs.
4746 Honors strip_query_terms and uri_whitespace.
4748 This field is not encoded by default. Encoding
4749 this field using variants of %-encoding will
4750 clash with uri_whitespace modifications that
4751 also use %-encoding.
4753 [http::]>ru Request URL received from the client (or computed)
4755 Computed URLs are URIs of internally generated
4756 requests and various "error:..." URIs.
4758 Unlike %ru, this request URI is not affected
4759 by request adaptation, URL rewriting services,
4760 and strip_query_terms.
4762 Honors uri_whitespace.
4764 This field is using pass-through URL encoding
4765 by default. Encoding this field using other
4766 variants of %-encoding will clash with
4767 uri_whitespace modifications that also use
4770 [http::]<ru Request URL sent to server or peer
4771 [http::]>rs Request URL scheme from client
4772 [http::]<rs Request URL scheme sent to server or peer
4773 [http::]>rd Request URL domain from client
4774 [http::]<rd Request URL domain sent to server or peer
4775 [http::]>rP Request URL port from client
4776 [http::]<rP Request URL port sent to server or peer
4777 [http::]rp Request URL path excluding hostname
4778 [http::]>rp Request URL path excluding hostname from client
4779 [http::]<rp Request URL path excluding hostname sent to server or peer
4780 [http::]rv Request protocol version
4781 [http::]>rv Request protocol version from client
4782 [http::]<rv Request protocol version sent to server or peer
4784 [http::]>h Original received request header.
4785 Usually differs from the request header sent by
4786 Squid, although most fields are often preserved.
4787 Accepts optional header field name/value filter
4788 argument using name[:[separator]element] format.
4789 [http::]>ha Received request header after adaptation and
4790 redirection (pre-cache REQMOD vectoring point).
4791 Usually differs from the request header sent by
4792 Squid, although most fields are often preserved.
4793 Optional header name argument as for >h
4797 [http::]<Hs HTTP status code received from the next hop
4798 [http::]>Hs HTTP status code sent to the client
4800 [http::]<h Reply header. Optional header name argument
4803 [http::]mt MIME content type
4808 [http::]st Total size of request + reply traffic with client
4809 [http::]>st Total size of request received from client.
4810 Excluding chunked encoding bytes.
4811 [http::]<st Total size of reply sent to client (after adaptation)
4813 [http::]>sh Size of request headers received from client
4814 [http::]<sh Size of reply headers sent to client (after adaptation)
4816 [http::]<sH Reply high offset sent
4817 [http::]<sS Upstream object size
4819 [http::]<bs Number of HTTP-equivalent message body bytes
4820 received from the next hop, excluding chunked
4821 transfer encoding and control messages.
4822 Generated FTP/Gopher listings are treated as
4827 [http::]<pt Peer response time in milliseconds. The timer starts
4828 when the last request byte is sent to the next hop
4829 and stops when the last response byte is received.
4830 [http::]<tt Total time in milliseconds. The timer
4831 starts with the first connect request (or write I/O)
4832 sent to the first selected peer. The timer stops
4833 with the last I/O with the last peer.
4835 Squid handling related format codes:
4837 Ss Squid request status (TCP_MISS etc)
4838 Sh Squid hierarchy status (DEFAULT_PARENT etc)
4840 SSL-related format codes:
4842 ssl::bump_mode SslBump decision for the transaction:
4844 For CONNECT requests that initiated bumping of
4845 a connection and for any request received on
4846 an already bumped connection, Squid logs the
4847 corresponding SslBump mode ("splice", "bump",
4848 "peek", "stare", "terminate", "server-first"
4849 or "client-first"). See the ssl_bump option
4850 for more information about these modes.
4852 A "none" token is logged for requests that
4853 triggered "ssl_bump" ACL evaluation matching
4856 In all other cases, a single dash ("-") is
4859 ssl::>sni SSL client SNI sent to Squid.
4862 The Subject field of the received client
4863 SSL certificate or a dash ('-') if Squid has
4864 received an invalid/malformed certificate or
4865 no certificate at all. Consider encoding the
4866 logged value because Subject often has spaces.
4869 The Issuer field of the received client
4870 SSL certificate or a dash ('-') if Squid has
4871 received an invalid/malformed certificate or
4872 no certificate at all. Consider encoding the
4873 logged value because Issuer often has spaces.
4876 The Subject field of the received server
4877 TLS certificate or a dash ('-') if this is
4878 not available. Consider encoding the logged
4879 value because Subject often has spaces.
4882 The Issuer field of the received server
4883 TLS certificate or a dash ('-') if this is
4884 not available. Consider encoding the logged
4885 value because Issuer often has spaces.
4888 The received server x509 certificate in PEM
4889 format, including BEGIN and END lines (or a
4890 dash ('-') if the certificate is unavailable).
4892 WARNING: Large certificates will exceed the
4893 current 8KB access.log record limit, resulting
4894 in truncated records. Such truncation usually
4895 happens in the middle of a record field. The
4896 limit applies to all access logging modules.
4898 The logged certificate may have failed
4899 validation and may not be trusted by Squid.
4900 This field does not include any intermediate
4901 certificates that may have been received from
4902 the server or fetched during certificate
4905 Currently, Squid only collects server
4906 certificates during step3 of SslBump
4907 processing; connections that were not subject
4908 to ssl_bump rules or that did not match a peek
4909 or stare rule at step2 will not have the
4910 server certificate information.
4912 This field is using pass-through URL encoding
4916 The list of certificate validation errors
4917 detected by Squid (including OpenSSL and
4918 certificate validation helper components). The
4919 errors are listed in the discovery order. By
4920 default, the error codes are separated by ':'.
4921 Accepts an optional separator argument.
4923 %ssl::>negotiated_version The negotiated TLS version of the
4926 %ssl::<negotiated_version The negotiated TLS version of the
4927 last server or peer connection.
4929 %ssl::>received_hello_version The TLS version of the Hello
4930 message received from TLS client.
4932 %ssl::<received_hello_version The TLS version of the Hello
4933 message received from TLS server.
4935 %ssl::>received_supported_version The maximum TLS version
4936 supported by the TLS client.
4938 %ssl::<received_supported_version The maximum TLS version
4939 supported by the TLS server.
4941 %ssl::>negotiated_cipher The negotiated cipher of the
4944 %ssl::<negotiated_cipher The negotiated cipher of the
4945 last server or peer connection.
4947 If ICAP is enabled, the following code becomes available (as
4948 well as ICAP log codes documented with the icap_log option):
4950 icap::tt Total ICAP processing time for the HTTP
4951 transaction. The timer ticks when ICAP
4952 ACLs are checked and when ICAP
4953 transaction is in progress.
4955 If adaptation is enabled the following codes become available:
4957 adapt::<last_h The header of the last ICAP response or
4958 meta-information from the last eCAP
4959 transaction related to the HTTP transaction.
4960 Like <h, accepts an optional header name
4963 adapt::sum_trs Summed adaptation transaction response
4964 times recorded as a comma-separated list in
4965 the order of transaction start time. Each time
4966 value is recorded as an integer number,
4967 representing response time of one or more
4968 adaptation (ICAP or eCAP) transaction in
4969 milliseconds. When a failed transaction is
4970 being retried or repeated, its time is not
4971 logged individually but added to the
4972 replacement (next) transaction. See also:
4975 adapt::all_trs All adaptation transaction response times.
4976 Same as adaptation_strs but response times of
4977 individual transactions are never added
4978 together. Instead, all transaction response
4979 times are recorded individually.
4981 You can prefix adapt::*_trs format codes with adaptation
4982 service name in curly braces to record response time(s) specific
4983 to that service. For example: %{my_service}adapt::sum_trs
4985 Format codes related to the PROXY protocol:
4987 proxy_protocol::>h PROXY protocol header, including optional TLVs.
4989 Supports the same field and element reporting/extraction logic
4990 as %http::>h. For configuration and reporting purposes, Squid
4991 maps each PROXY TLV to an HTTP header field: the TLV type
4992 (configured as a decimal integer) is the field name, and the
4993 TLV value is the field value. All TLVs of "LOCAL" connections
4994 (in PROXY protocol terminology) are currently skipped/ignored.
4996 Squid also maps the following standard PROXY protocol header
4997 blocks to pseudo HTTP headers (their names use PROXY
4998 terminology and start with a colon, following HTTP tradition
4999 for pseudo headers): :command, :version, :src_addr, :dst_addr,
5000 :src_port, and :dst_port.
5002 Without optional parameters, this logformat code logs
5003 pseudo headers and TLVs.
5005 This format code uses pass-through URL encoding by default.
5008 # relay custom PROXY TLV #224 to adaptation services
5009 adaptation_meta Client-Foo "%proxy_protocol::>h{224}"
5013 The default formats available (which do not need re-defining) are:
5015 logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
5016 logformat common %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh
5017 logformat combined %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
5018 logformat referrer %ts.%03tu %>a %{Referer}>h %ru
5019 logformat useragent %>a [%tl] "%{User-Agent}>h"
5021 NOTE: When the log_mime_hdrs directive is set to ON.
5022 The squid, common and combined formats have a safely encoded copy
5023 of the mime headers appended to each line within a pair of brackets.
5025 NOTE: The common and combined formats are not quite true to the Apache definition.
5026 The logs from Squid contain an extra status and hierarchy code appended.
5030 NAME: access_log cache_access_log
5032 LOC: Config.Log.accesslogs
5033 DEFAULT_IF_NONE: daemon:@DEFAULT_ACCESS_LOG@ squid
5035 Configures whether and how Squid logs HTTP and ICP transactions.
5036 If access logging is enabled, a single line is logged for every
5037 matching HTTP or ICP request. The recommended directive formats are:
5039 access_log <module>:<place> [option ...] [acl acl ...]
5040 access_log none [acl acl ...]
5042 The following directive format is accepted but may be deprecated:
5043 access_log <module>:<place> [<logformat name> [acl acl ...]]
5045 In most cases, the first ACL name must not contain the '=' character
5046 and should not be equal to an existing logformat name. You can always
5047 start with an 'all' ACL to work around those restrictions.
5049 Will log to the specified module:place using the specified format (which
5050 must be defined in a logformat directive) those entries which match
5051 ALL the acl's specified (which must be defined in acl clauses).
5052 If no acl is specified, all requests will be logged to this destination.
5054 ===== Available options for the recommended directive format =====
5056 logformat=name Names log line format (either built-in or
5057 defined by a logformat directive). Defaults
5060 buffer-size=64KB Defines approximate buffering limit for log
5061 records (see buffered_logs). Squid should not
5062 keep more than the specified size and, hence,
5063 should flush records before the buffer becomes
5064 full to avoid overflows under normal
5065 conditions (the exact flushing algorithm is
5066 module-dependent though). The on-error option
5067 controls overflow handling.
5069 on-error=die|drop Defines action on unrecoverable errors. The
5070 'drop' action ignores (i.e., does not log)
5071 affected log records. The default 'die' action
5072 kills the affected worker. The drop action
5073 support has not been tested for modules other
5076 rotate=N Specifies the number of log file rotations to
5077 make when you run 'squid -k rotate'. The default
5078 is to obey the logfile_rotate directive. Setting
5079 rotate=0 will disable the file name rotation,
5080 but the log files are still closed and re-opened.
5081 This will enable you to rename the logfiles
5082 yourself just before sending the rotate signal.
5083 Only supported by the stdio module.
5085 ===== Modules Currently available =====
5087 none Do not log any requests matching these ACL.
5088 Do not specify Place or logformat name.
5090 stdio Write each log line to disk immediately at the completion of
5092 Place: the filename and path to be written.
5094 daemon Very similar to stdio. But instead of writing to disk the log
5095 line is passed to a daemon helper for asychronous handling instead.
5096 Place: varies depending on the daemon.
5098 log_file_daemon Place: the file name and path to be written.
5100 syslog To log each request via syslog facility.
5101 Place: The syslog facility and priority level for these entries.
5102 Place Format: facility.priority
5104 where facility could be any of:
5105 authpriv, daemon, local0 ... local7 or user.
5107 And priority could be any of:
5108 err, warning, notice, info, debug.
5110 udp To send each log line as text data to a UDP receiver.
5111 Place: The destination host name or IP and port.
5112 Place Format: //host:port
5114 tcp To send each log line as text data to a TCP receiver.
5115 Lines may be accumulated before sending (see buffered_logs).
5116 Place: The destination host name or IP and port.
5117 Place Format: //host:port
5120 access_log daemon:@DEFAULT_ACCESS_LOG@ squid
5126 LOC: Config.Log.icaplogs
5129 ICAP log files record ICAP transaction summaries, one line per
5132 The icap_log option format is:
5133 icap_log <filepath> [<logformat name> [acl acl ...]]
5134 icap_log none [acl acl ...]]
5136 Please see access_log option documentation for details. The two
5137 kinds of logs share the overall configuration approach and many
5140 ICAP processing of a single HTTP message or transaction may
5141 require multiple ICAP transactions. In such cases, multiple
5142 ICAP transaction log lines will correspond to a single access
5145 ICAP log supports many access.log logformat %codes. In ICAP context,
5146 HTTP message-related %codes are applied to the HTTP message embedded
5147 in an ICAP message. Logformat "%http::>..." codes are used for HTTP
5148 messages embedded in ICAP requests while "%http::<..." codes are used
5149 for HTTP messages embedded in ICAP responses. For example:
5151 http::>h To-be-adapted HTTP message headers sent by Squid to
5152 the ICAP service. For REQMOD transactions, these are
5153 HTTP request headers. For RESPMOD, these are HTTP
5154 response headers, but Squid currently cannot log them
5155 (i.e., %http::>h will expand to "-" for RESPMOD).
5157 http::<h Adapted HTTP message headers sent by the ICAP
5158 service to Squid (i.e., HTTP request headers in regular
5159 REQMOD; HTTP response headers in RESPMOD and during
5160 request satisfaction in REQMOD).
5162 ICAP OPTIONS transactions do not embed HTTP messages.
5164 Several logformat codes below deal with ICAP message bodies. An ICAP
5165 message body, if any, typically includes a complete HTTP message
5166 (required HTTP headers plus optional HTTP message body). When
5167 computing HTTP message body size for these logformat codes, Squid
5168 either includes or excludes chunked encoding overheads; see
5169 code-specific documentation for details.
5171 For Secure ICAP services, all size-related information is currently
5172 computed before/after TLS encryption/decryption, as if TLS was not
5175 The following format codes are also available for ICAP logs:
5177 icap::<A ICAP server IP address. Similar to <A.
5179 icap::<service_name ICAP service name from the icap_service
5180 option in Squid configuration file.
5182 icap::ru ICAP Request-URI. Similar to ru.
5184 icap::rm ICAP request method (REQMOD, RESPMOD, or
5185 OPTIONS). Similar to existing rm.
5187 icap::>st The total size of the ICAP request sent to the ICAP
5188 server (ICAP headers + ICAP body), including chunking
5191 icap::<st The total size of the ICAP response received from the
5192 ICAP server (ICAP headers + ICAP body), including
5193 chunking metadata (if any).
5195 icap::<bs The size of the ICAP response body received from the
5196 ICAP server, excluding chunking metadata (if any).
5198 icap::tr Transaction response time (in
5199 milliseconds). The timer starts when
5200 the ICAP transaction is created and
5201 stops when the transaction is completed.
5204 icap::tio Transaction I/O time (in milliseconds). The
5205 timer starts when the first ICAP request
5206 byte is scheduled for sending. The timers
5207 stops when the last byte of the ICAP response
5210 icap::to Transaction outcome: ICAP_ERR* for all
5211 transaction errors, ICAP_OPT for OPTION
5212 transactions, ICAP_ECHO for 204
5213 responses, ICAP_MOD for message
5214 modification, and ICAP_SAT for request
5215 satisfaction. Similar to Ss.
5217 icap::Hs ICAP response status code. Similar to Hs.
5219 icap::>h ICAP request header(s). Similar to >h.
5221 icap::<h ICAP response header(s). Similar to <h.
5223 The default ICAP log format, which can be used without an explicit
5224 definition, is called icap_squid:
5226 logformat icap_squid %ts.%03tu %6icap::tr %>A %icap::to/%03icap::Hs %icap::<st %icap::rm %icap::ru %un -/%icap::<A -
5228 See also: logformat and %adapt::<last_h
5231 NAME: logfile_daemon
5233 DEFAULT: @DEFAULT_LOGFILED@
5234 LOC: Log::TheConfig.logfile_daemon
5236 Specify the path to the logfile-writing daemon. This daemon is
5237 used to write the access and store logs, if configured.
5239 Squid sends a number of commands to the log daemon:
5240 L<data>\n - logfile data
5245 r<n>\n - set rotate count to <n>
5246 b<n>\n - 1 = buffer output, 0 = don't buffer output
5248 No responses is expected.
5251 NAME: stats_collection
5253 LOC: Config.accessList.stats_collection
5255 DEFAULT_DOC: Allow logging for all transactions.
5256 COMMENT: allow|deny acl acl...
5258 This options allows you to control which requests gets accounted
5259 in performance counters.
5261 This clause only supports fast acl types.
5262 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5265 NAME: cache_store_log
5268 LOC: Config.Log.store
5270 Logs the activities of the storage manager. Shows which
5271 objects are ejected from the cache, and which objects are
5272 saved and for how long.
5273 There are not really utilities to analyze this data, so you can safely
5274 disable it (the default).
5276 Store log uses modular logging outputs. See access_log for the list
5277 of modules supported.
5280 cache_store_log stdio:@DEFAULT_STORE_LOG@
5281 cache_store_log daemon:@DEFAULT_STORE_LOG@
5284 NAME: cache_swap_state cache_swap_log
5286 LOC: Config.Log.swap
5288 DEFAULT_DOC: Store the journal inside its cache_dir
5290 Location for the cache "swap.state" file. This index file holds
5291 the metadata of objects saved on disk. It is used to rebuild
5292 the cache during startup. Normally this file resides in each
5293 'cache_dir' directory, but you may specify an alternate
5294 pathname here. Note you must give a full filename, not just
5295 a directory. Since this is the index for the whole object
5296 list you CANNOT periodically rotate it!
5298 If %s can be used in the file name it will be replaced with a
5299 a representation of the cache_dir name where each / is replaced
5300 with '.'. This is needed to allow adding/removing cache_dir
5301 lines when cache_swap_log is being used.
5303 If have more than one 'cache_dir', and %s is not used in the name
5304 these swap logs will have names such as:
5310 The numbered extension (which is added automatically)
5311 corresponds to the order of the 'cache_dir' lines in this
5312 configuration file. If you change the order of the 'cache_dir'
5313 lines in this file, these index files will NOT correspond to
5314 the correct 'cache_dir' entry (unless you manually rename
5315 them). We recommend you do NOT use this option. It is
5316 better to keep these index files in each 'cache_dir' directory.
5319 NAME: logfile_rotate
5322 LOC: Config.Log.rotateNumber
5324 Specifies the default number of logfile rotations to make when you
5325 type 'squid -k rotate'. The default is 10, which will rotate
5326 with extensions 0 through 9. Setting logfile_rotate to 0 will
5327 disable the file name rotation, but the logfiles are still closed
5328 and re-opened. This will enable you to rename the logfiles
5329 yourself just before sending the rotate signal.
5331 Note, from Squid-3.1 this option is only a default for cache.log,
5332 that log can be rotated separately by using debug_options.
5334 Note, from Squid-4 this option is only a default for access.log
5335 recorded by stdio: module. Those logs can be rotated separately by
5336 using the rotate=N option on their access_log directive.
5338 Note, the 'squid -k rotate' command normally sends a USR1
5339 signal to the running squid process. In certain situations
5340 (e.g. on Linux with Async I/O), USR1 is used for other
5341 purposes, so -k rotate uses another signal. It is best to get
5342 in the habit of using 'squid -k rotate' instead of 'kill -USR1
5349 DEFAULT: @DEFAULT_MIME_TABLE@
5350 LOC: Config.mimeTablePathname
5352 Path to Squid's icon configuration file.
5354 You shouldn't need to change this, but the default file contains
5355 examples and formatting information if you do.
5361 LOC: Config.onoff.log_mime_hdrs
5364 The Cache can record both the request and the response MIME
5365 headers for each HTTP transaction. The headers are encoded
5366 safely and will appear as two bracketed fields at the end of
5367 the access log (for either the native or httpd-emulated log
5368 formats). To enable this logging set log_mime_hdrs to 'on'.
5373 DEFAULT: @DEFAULT_PID_FILE@
5374 LOC: Config.pidFilename
5376 A filename to write the process-id to. To disable, enter "none".
5379 NAME: client_netmask
5381 LOC: Config.Addrs.client_netmask
5383 DEFAULT_DOC: Log full client IP address
5385 A netmask for client addresses in logfiles and cachemgr output.
5386 Change this to protect the privacy of your cache clients.
5387 A netmask of 255.255.255.0 will log all IP's in that range with
5388 the last digit set to '0'.
5391 NAME: strip_query_terms
5393 LOC: Config.onoff.strip_query_terms
5396 By default, Squid strips query terms from requested URLs before
5397 logging. This protects your user's privacy and reduces log size.
5399 When investigating HIT/MISS or other caching behaviour you
5400 will need to disable this to see the full URL used by Squid.
5407 LOC: Config.onoff.buffered_logs
5409 Whether to write/send access_log records ASAP or accumulate them and
5410 then write/send them in larger chunks. Buffering may improve
5411 performance because it decreases the number of I/Os. However,
5412 buffering increases the delay before log records become available to
5413 the final recipient (e.g., a disk file or logging daemon) and,
5414 hence, increases the risk of log records loss.
5416 Note that even when buffered_logs are off, Squid may have to buffer
5417 records if it cannot write/send them immediately due to pending I/Os
5418 (e.g., the I/O writing the previous log record) or connectivity loss.
5420 Currently honored by 'daemon' and 'tcp' access_log modules only.
5423 NAME: netdb_filename
5425 DEFAULT: stdio:@DEFAULT_NETDB_FILE@
5426 LOC: Config.netdbFilename
5429 Where Squid stores it's netdb journal.
5430 When enabled this journal preserves netdb state between restarts.
5432 To disable, enter "none".
5436 OPTIONS FOR TROUBLESHOOTING
5437 -----------------------------------------------------------------------------
5442 DEFAULT_IF_NONE: @DEFAULT_CACHE_LOG@
5443 LOC: Debug::cache_log
5445 Squid administrative logging file.
5447 This is where general information about Squid behavior goes. You can
5448 increase the amount of data logged to this file and how often it is
5449 rotated with "debug_options"
5455 DEFAULT_DOC: Log all critical and important messages.
5456 LOC: Debug::debugOptions
5458 Logging options are set as section,level where each source file
5459 is assigned a unique section. Lower levels result in less
5460 output, Full debugging (level 9) can result in a very large
5461 log file, so be careful.
5463 The magic word "ALL" sets debugging levels for all sections.
5464 The default is to run with "ALL,1" to record important warnings.
5466 The rotate=N option can be used to keep more or less of these logs
5467 than would otherwise be kept by logfile_rotate.
5468 For most uses a single log should be enough to monitor current
5469 events affecting Squid.
5474 LOC: Config.coredump_dir
5475 DEFAULT_IF_NONE: none
5476 DEFAULT_DOC: Use the directory from where Squid was started.
5478 By default Squid leaves core files in the directory from where
5479 it was started. If you set 'coredump_dir' to a directory
5480 that exists, Squid will chdir() to that directory at startup
5481 and coredump files will be left there.
5485 # Leave coredumps in the first cache dir
5486 coredump_dir @DEFAULT_SWAP_DIR@
5492 OPTIONS FOR FTP GATEWAYING
5493 -----------------------------------------------------------------------------
5499 LOC: Config.Ftp.anon_user
5501 If you want the anonymous login password to be more informative
5502 (and enable the use of picky FTP servers), set this to something
5503 reasonable for your domain, like wwwuser@somewhere.net
5505 The reason why this is domainless by default is the
5506 request can be made on the behalf of a user in any domain,
5507 depending on how the cache is used.
5508 Some FTP server also validate the email address is valid
5509 (for example perl.com).
5515 LOC: Config.Ftp.passive
5517 If your firewall does not allow Squid to use passive
5518 connections, turn off this option.
5520 Use of ftp_epsv_all option requires this to be ON.
5526 LOC: Config.Ftp.epsv_all
5528 FTP Protocol extensions permit the use of a special "EPSV ALL" command.
5530 NATs may be able to put the connection on a "fast path" through the
5531 translator, as the EPRT command will never be used and therefore,
5532 translation of the data portion of the segments will never be needed.
5534 When a client only expects to do two-way FTP transfers this may be
5536 If squid finds that it must do a three-way FTP transfer after issuing
5537 an EPSV ALL command, the FTP session will fail.
5539 If you have any doubts about this option do not use it.
5540 Squid will nicely attempt all other connection methods.
5542 Requires ftp_passive to be ON (default) for any effect.
5548 LOC: Config.accessList.ftp_epsv
5550 FTP Protocol extensions permit the use of a special "EPSV" command.
5552 NATs may be able to put the connection on a "fast path" through the
5553 translator using EPSV, as the EPRT command will never be used
5554 and therefore, translation of the data portion of the segments
5555 will never be needed.
5557 EPSV is often required to interoperate with FTP servers on IPv6
5558 networks. On the other hand, it may break some IPv4 servers.
5560 By default, EPSV may try EPSV with any FTP server. To fine tune
5561 that decision, you may restrict EPSV to certain clients or servers
5564 ftp_epsv allow|deny al1 acl2 ...
5566 WARNING: Disabling EPSV may cause problems with external NAT and IPv6.
5568 Only fast ACLs are supported.
5569 Requires ftp_passive to be ON (default) for any effect.
5575 LOC: Config.Ftp.eprt
5577 FTP Protocol extensions permit the use of a special "EPRT" command.
5579 This extension provides a protocol neutral alternative to the
5580 IPv4-only PORT command. When supported it enables active FTP data
5581 channels over IPv6 and efficient NAT handling.
5583 Turning this OFF will prevent EPRT being attempted and will skip
5584 straight to using PORT for IPv4 servers.
5586 Some devices are known to not handle this extension correctly and
5587 may result in crashes. Devices which support EPRT enough to fail
5588 cleanly will result in Squid attempting PORT anyway. This directive
5589 should only be disabled when EPRT results in device failures.
5591 WARNING: Doing so will convert Squid back to the old behavior with all
5592 the related problems with external NAT devices/layers and IPv4-only FTP.
5595 NAME: ftp_sanitycheck
5598 LOC: Config.Ftp.sanitycheck
5600 For security and data integrity reasons Squid by default performs
5601 sanity checks of the addresses of FTP data connections ensure the
5602 data connection is to the requested server. If you need to allow
5603 FTP connections to servers using another IP address for the data
5604 connection turn this off.
5607 NAME: ftp_telnet_protocol
5610 LOC: Config.Ftp.telnet
5612 The FTP protocol is officially defined to use the telnet protocol
5613 as transport channel for the control connection. However, many
5614 implementations are broken and does not respect this aspect of
5617 If you have trouble accessing files with ASCII code 255 in the
5618 path or similar problems involving this ASCII code you can
5619 try setting this directive to off. If that helps, report to the
5620 operator of the FTP server in question that their FTP server
5621 is broken and does not follow the FTP standard.
5625 OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
5626 -----------------------------------------------------------------------------
5631 DEFAULT: @DEFAULT_DISKD@
5632 LOC: Config.Program.diskd
5634 Specify the location of the diskd executable.
5635 Note this is only useful if you have compiled in
5636 diskd as one of the store io modules.
5639 NAME: unlinkd_program
5642 DEFAULT: @DEFAULT_UNLINKD@
5643 LOC: Config.Program.unlinkd
5645 Specify the location of the executable for file deletion process.
5648 NAME: pinger_program
5651 DEFAULT: @DEFAULT_PINGER@
5654 Specify the location of the executable for the pinger process.
5663 Control whether the pinger is active at run-time.
5664 Enables turning ICMP pinger on and off with a simple
5665 squid -k reconfigure.
5670 OPTIONS FOR URL REWRITING
5671 -----------------------------------------------------------------------------
5674 NAME: url_rewrite_program redirect_program
5676 LOC: Config.Program.redirect
5679 Specify the location of the executable URL rewriter to use.
5680 Since they can perform almost any function there isn't one included.
5682 For each requested URL, the rewriter will receive on line with the format
5684 [channel-ID <SP>] URL [<SP> extras]<NL>
5686 See url_rewrite_extras on how to send "extras" with optional values to
5688 After processing the request the helper must reply using the following format:
5690 [channel-ID <SP>] result [<SP> kv-pairs]
5692 The result code can be:
5694 OK status=30N url="..."
5695 Redirect the URL to the one supplied in 'url='.
5696 'status=' is optional and contains the status code to send
5697 the client in Squids HTTP response. It must be one of the
5698 HTTP redirect status codes: 301, 302, 303, 307, 308.
5699 When no status is given Squid will use 302.
5701 OK rewrite-url="..."
5702 Rewrite the URL to the one supplied in 'rewrite-url='.
5703 The new URL is fetched directly by Squid and returned to
5704 the client as the response to its request.
5707 When neither of url= and rewrite-url= are sent Squid does
5711 Do not change the URL.
5714 An internal error occurred in the helper, preventing
5715 a result being identified. The 'message=' key name is
5716 reserved for delivering a log message.
5719 In addition to the above kv-pairs Squid also understands the following
5720 optional kv-pairs received from URL rewriters:
5722 Associates a TAG with the client TCP connection.
5723 The TAG is treated as a regular annotation but persists across
5724 future requests on the client connection rather than just the
5725 current request. A helper may update the TAG during subsequent
5726 requests be returning a new kv-pair.
5728 When using the concurrency= option the protocol is changed by
5729 introducing a query channel tag in front of the request/response.
5730 The query channel tag is a number between 0 and concurrency-1.
5731 This value must be echoed back unchanged to Squid as the first part
5732 of the response relating to its request.
5734 WARNING: URL re-writing ability should be avoided whenever possible.
5735 Use the URL redirect form of response instead.
5737 Re-write creates a difference in the state held by the client
5738 and server. Possibly causing confusion when the server response
5739 contains snippets of its view state. Embedded URLs, response
5740 and content Location headers, etc. are not re-written by this
5743 By default, a URL rewriter is not used.
5746 NAME: url_rewrite_children redirect_children
5747 TYPE: HelperChildConfig
5748 DEFAULT: 20 startup=0 idle=1 concurrency=0
5749 LOC: Config.redirectChildren
5751 Specifies the maximum number of redirector processes that Squid may
5752 spawn (numberofchildren) and several related options. Using too few of
5753 these helper processes (a.k.a. "helpers") creates request queues.
5754 Using too many helpers wastes your system resources.
5756 Usage: numberofchildren [option]...
5758 The startup= and idle= options allow some measure of skew in your
5763 Sets a minimum of how many processes are to be spawned when Squid
5764 starts or reconfigures. When set to zero the first request will
5765 cause spawning of the first child process to handle it.
5767 Starting too few will cause an initial slowdown in traffic as Squid
5768 attempts to simultaneously spawn enough processes to cope.
5772 Sets a minimum of how many processes Squid is to try and keep available
5773 at all times. When traffic begins to rise above what the existing
5774 processes can handle this many more will be spawned up to the maximum
5775 configured. A minimum setting of 1 is required.
5779 The number of requests each redirector helper can handle in
5780 parallel. Defaults to 0 which indicates the redirector
5781 is a old-style single threaded redirector.
5783 When this directive is set to a value >= 1 then the protocol
5784 used to communicate with the helper is modified to include
5785 an ID in front of the request/response. The ID from the request
5786 must be echoed back with the response to that request.
5790 Sets the maximum number of queued requests. A request is queued when
5791 no existing child can accept it due to concurrency limit and no new
5792 child can be started due to numberofchildren limit. The default
5793 maximum is zero if url_rewrite_bypass is enabled and
5794 2*numberofchildren otherwise. If the queued requests exceed queue size
5795 and redirector_bypass configuration option is set, then redirector is
5796 bypassed. Otherwise, Squid is allowed to temporarily exceed the
5797 configured maximum, marking the affected helper as "overloaded". If
5798 the helper overload lasts more than 3 minutes, the action prescribed
5799 by the on-persistent-overload option applies.
5801 on-persistent-overload=action
5803 Specifies Squid reaction to a new helper request arriving when the helper
5804 has been overloaded for more that 3 minutes already. The number of queued
5805 requests determines whether the helper is overloaded (see the queue-size
5808 Two actions are supported:
5810 die Squid worker quits. This is the default behavior.
5812 ERR Squid treats the helper request as if it was
5813 immediately submitted, and the helper immediately
5814 replied with an ERR response. This action has no effect
5815 on the already queued and in-progress helper requests.
5818 NAME: url_rewrite_host_header redirect_rewrites_host_header
5821 LOC: Config.onoff.redir_rewrites_host
5823 To preserve same-origin security policies in browsers and
5824 prevent Host: header forgery by redirectors Squid rewrites
5825 any Host: header in redirected requests.
5827 If you are running an accelerator this may not be a wanted
5828 effect of a redirector. This directive enables you disable
5829 Host: alteration in reverse-proxy traffic.
5831 WARNING: Entries are cached on the result of the URL rewriting
5832 process, so be careful if you have domain-virtual hosts.
5834 WARNING: Squid and other software verifies the URL and Host
5835 are matching, so be careful not to relay through other proxies
5836 or inspecting firewalls with this disabled.
5839 NAME: url_rewrite_access redirector_access
5842 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
5843 LOC: Config.accessList.redirector
5845 If defined, this access list specifies which requests are
5846 sent to the redirector processes.
5848 This clause supports both fast and slow acl types.
5849 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5852 NAME: url_rewrite_bypass redirector_bypass
5854 LOC: Config.onoff.redirector_bypass
5857 When this is 'on', a request will not go through the
5858 redirector if all the helpers are busy. If this is 'off' and the
5859 redirector queue grows too large, the action is prescribed by the
5860 on-persistent-overload option. You should only enable this if the
5861 redirectors are not critical to your caching system. If you use
5862 redirectors for access control, and you enable this option,
5863 users may have access to pages they should not
5864 be allowed to request.
5866 Enabling this option sets the default url_rewrite_children queue-size
5870 NAME: url_rewrite_extras
5871 TYPE: TokenOrQuotedString
5872 LOC: Config.redirector_extras
5873 DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp"
5875 Specifies a string to be append to request line format for the
5876 rewriter helper. "Quoted" format values may contain spaces and
5877 logformat %macros. In theory, any logformat %macro can be used.
5878 In practice, a %macro expands as a dash (-) if the helper request is
5879 sent before the required macro information is available to Squid.
5882 NAME: url_rewrite_timeout
5883 TYPE: UrlHelperTimeout
5884 LOC: Config.onUrlRewriteTimeout
5886 DEFAULT_DOC: Squid waits for the helper response forever
5888 Squid times active requests to redirector. The timeout value and Squid
5889 reaction to a timed out request are configurable using the following
5892 url_rewrite_timeout timeout time-units on_timeout=<action> [response=<quoted-response>]
5894 supported timeout actions:
5895 fail Squid return a ERR_GATEWAY_FAILURE error page
5897 bypass Do not re-write the URL
5899 retry Send the lookup to the helper again
5901 use_configured_response
5902 Use the <quoted-response> as helper response
5906 OPTIONS FOR STORE ID
5907 -----------------------------------------------------------------------------
5910 NAME: store_id_program storeurl_rewrite_program
5912 LOC: Config.Program.store_id
5915 Specify the location of the executable StoreID helper to use.
5916 Since they can perform almost any function there isn't one included.
5918 For each requested URL, the helper will receive one line with the format
5920 [channel-ID <SP>] URL [<SP> extras]<NL>
5923 After processing the request the helper must reply using the following format:
5925 [channel-ID <SP>] result [<SP> kv-pairs]
5927 The result code can be:
5930 Use the StoreID supplied in 'store-id='.
5933 The default is to use HTTP request URL as the store ID.
5936 An internal error occurred in the helper, preventing
5937 a result being identified.
5939 In addition to the above kv-pairs Squid also understands the following
5940 optional kv-pairs received from URL rewriters:
5942 Associates a TAG with the client TCP connection.
5943 Please see url_rewrite_program related documentation for this
5946 Helper programs should be prepared to receive and possibly ignore
5947 additional whitespace-separated tokens on each input line.
5949 When using the concurrency= option the protocol is changed by
5950 introducing a query channel tag in front of the request/response.
5951 The query channel tag is a number between 0 and concurrency-1.
5952 This value must be echoed back unchanged to Squid as the first part
5953 of the response relating to its request.
5955 NOTE: when using StoreID refresh_pattern will apply to the StoreID
5956 returned from the helper and not the URL.
5958 WARNING: Wrong StoreID value returned by a careless helper may result
5959 in the wrong cached response returned to the user.
5961 By default, a StoreID helper is not used.
5964 NAME: store_id_extras
5965 TYPE: TokenOrQuotedString
5966 LOC: Config.storeId_extras
5967 DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp"
5969 Specifies a string to be append to request line format for the
5970 StoreId helper. "Quoted" format values may contain spaces and
5971 logformat %macros. In theory, any logformat %macro can be used.
5972 In practice, a %macro expands as a dash (-) if the helper request is
5973 sent before the required macro information is available to Squid.
5976 NAME: store_id_children storeurl_rewrite_children
5977 TYPE: HelperChildConfig
5978 DEFAULT: 20 startup=0 idle=1 concurrency=0
5979 LOC: Config.storeIdChildren
5981 Specifies the maximum number of StoreID helper processes that Squid
5982 may spawn (numberofchildren) and several related options. Using
5983 too few of these helper processes (a.k.a. "helpers") creates request
5984 queues. Using too many helpers wastes your system resources.
5986 Usage: numberofchildren [option]...
5988 The startup= and idle= options allow some measure of skew in your
5993 Sets a minimum of how many processes are to be spawned when Squid
5994 starts or reconfigures. When set to zero the first request will
5995 cause spawning of the first child process to handle it.
5997 Starting too few will cause an initial slowdown in traffic as Squid
5998 attempts to simultaneously spawn enough processes to cope.
6002 Sets a minimum of how many processes Squid is to try and keep available
6003 at all times. When traffic begins to rise above what the existing
6004 processes can handle this many more will be spawned up to the maximum
6005 configured. A minimum setting of 1 is required.
6009 The number of requests each storeID helper can handle in
6010 parallel. Defaults to 0 which indicates the helper
6011 is a old-style single threaded program.
6013 When this directive is set to a value >= 1 then the protocol
6014 used to communicate with the helper is modified to include
6015 an ID in front of the request/response. The ID from the request
6016 must be echoed back with the response to that request.
6020 Sets the maximum number of queued requests to N. A request is queued
6021 when no existing child can accept it due to concurrency limit and no
6022 new child can be started due to numberofchildren limit. The default
6023 maximum is 2*numberofchildren. If the queued requests exceed queue
6024 size and redirector_bypass configuration option is set, then
6025 redirector is bypassed. Otherwise, Squid is allowed to temporarily
6026 exceed the configured maximum, marking the affected helper as
6027 "overloaded". If the helper overload lasts more than 3 minutes, the
6028 action prescribed by the on-persistent-overload option applies.
6030 on-persistent-overload=action
6032 Specifies Squid reaction to a new helper request arriving when the helper
6033 has been overloaded for more that 3 minutes already. The number of queued
6034 requests determines whether the helper is overloaded (see the queue-size
6037 Two actions are supported:
6039 die Squid worker quits. This is the default behavior.
6041 ERR Squid treats the helper request as if it was
6042 immediately submitted, and the helper immediately
6043 replied with an ERR response. This action has no effect
6044 on the already queued and in-progress helper requests.
6047 NAME: store_id_access storeurl_rewrite_access
6050 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
6051 LOC: Config.accessList.store_id
6053 If defined, this access list specifies which requests are
6054 sent to the StoreID processes. By default all requests
6057 This clause supports both fast and slow acl types.
6058 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6061 NAME: store_id_bypass storeurl_rewrite_bypass
6063 LOC: Config.onoff.store_id_bypass
6066 When this is 'on', a request will not go through the
6067 helper if all helpers are busy. If this is 'off' and the helper
6068 queue grows too large, the action is prescribed by the
6069 on-persistent-overload option. You should only enable this if the
6070 helpers are not critical to your caching system. If you use
6071 helpers for critical caching components, and you enable this
6072 option, users may not get objects from cache.
6073 This options sets default queue-size option of the store_id_children
6078 OPTIONS FOR TUNING THE CACHE
6079 -----------------------------------------------------------------------------
6082 NAME: cache no_cache
6085 DEFAULT_DOC: By default, this directive is unused and has no effect.
6086 LOC: Config.accessList.noCache
6088 Requests denied by this directive will not be served from the cache
6089 and their responses will not be stored in the cache. This directive
6090 has no effect on other transactions and on already cached responses.
6092 This clause supports both fast and slow acl types.
6093 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6095 This and the two other similar caching directives listed below are
6096 checked at different transaction processing stages, have different
6097 access to response information, affect different cache operations,
6098 and differ in slow ACLs support:
6100 * cache: Checked before Squid makes a hit/miss determination.
6101 No access to reply information!
6102 Denies both serving a hit and storing a miss.
6103 Supports both fast and slow ACLs.
6104 * send_hit: Checked after a hit was detected.
6105 Has access to reply (hit) information.
6106 Denies serving a hit only.
6107 Supports fast ACLs only.
6108 * store_miss: Checked before storing a cachable miss.
6109 Has access to reply (miss) information.
6110 Denies storing a miss only.
6111 Supports fast ACLs only.
6113 If you are not sure which of the three directives to use, apply the
6114 following decision logic:
6116 * If your ACL(s) are of slow type _and_ need response info, redesign.
6117 Squid does not support that particular combination at this time.
6119 * If your directive ACL(s) are of slow type, use "cache"; and/or
6120 * if your directive ACL(s) need no response info, use "cache".
6122 * If you do not want the response cached, use store_miss; and/or
6123 * if you do not want a hit on a cached response, use send_hit.
6129 DEFAULT_DOC: By default, this directive is unused and has no effect.
6130 LOC: Config.accessList.sendHit
6132 Responses denied by this directive will not be served from the cache
6133 (but may still be cached, see store_miss). This directive has no
6134 effect on the responses it allows and on the cached objects.
6136 Please see the "cache" directive for a summary of differences among
6137 store_miss, send_hit, and cache directives.
6139 Unlike the "cache" directive, send_hit only supports fast acl
6140 types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6144 # apply custom Store ID mapping to some URLs
6145 acl MapMe dstdomain .c.example.com
6146 store_id_program ...
6147 store_id_access allow MapMe
6149 # but prevent caching of special responses
6150 # such as 302 redirects that cause StoreID loops
6151 acl Ordinary http_status 200-299
6152 store_miss deny MapMe !Ordinary
6154 # and do not serve any previously stored special responses
6155 # from the cache (in case they were already cached before
6156 # the above store_miss rule was in effect).
6157 send_hit deny MapMe !Ordinary
6163 DEFAULT_DOC: By default, this directive is unused and has no effect.
6164 LOC: Config.accessList.storeMiss
6166 Responses denied by this directive will not be cached (but may still
6167 be served from the cache, see send_hit). This directive has no
6168 effect on the responses it allows and on the already cached responses.
6170 Please see the "cache" directive for a summary of differences among
6171 store_miss, send_hit, and cache directives. See the
6172 send_hit directive for a usage example.
6174 Unlike the "cache" directive, store_miss only supports fast acl
6175 types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6181 LOC: Config.maxStale
6184 This option puts an upper limit on how stale content Squid
6185 will serve from the cache if cache validation fails.
6186 Can be overridden by the refresh_pattern max-stale option.
6189 NAME: refresh_pattern
6190 TYPE: refreshpattern
6194 usage: refresh_pattern [-i] regex min percent max [options]
6196 By default, regular expressions are CASE-SENSITIVE. To make
6197 them case-insensitive, use the -i option.
6199 'Min' is the time (in minutes) an object without an explicit
6200 expiry time should be considered fresh. The recommended
6201 value is 0, any higher values may cause dynamic applications
6202 to be erroneously cached unless the application designer
6203 has taken the appropriate actions.
6205 'Percent' is a percentage of the objects age (time since last
6206 modification age) an object without explicit expiry time
6207 will be considered fresh.
6209 'Max' is an upper limit on how long objects without an explicit
6210 expiry time will be considered fresh. The value is also used
6211 to form Cache-Control: max-age header for a request sent from
6212 Squid to origin/parent.
6214 options: override-expire
6224 override-expire enforces min age even if the server
6225 sent an explicit expiry time (e.g., with the
6226 Expires: header or Cache-Control: max-age). Doing this
6227 VIOLATES the HTTP standard. Enabling this feature
6228 could make you liable for problems which it causes.
6230 Note: override-expire does not enforce staleness - it only extends
6231 freshness / min. If the server returns a Expires time which
6232 is longer than your max time, Squid will still consider
6233 the object fresh for that period of time.
6235 override-lastmod enforces min age even on objects
6236 that were modified recently.
6238 reload-into-ims changes a client no-cache or ``reload''
6239 request for a cached entry into a conditional request using
6240 If-Modified-Since and/or If-None-Match headers, provided the
6241 cached entry has a Last-Modified and/or a strong ETag header.
6242 Doing this VIOLATES the HTTP standard. Enabling this feature
6243 could make you liable for problems which it causes.
6245 ignore-reload ignores a client no-cache or ``reload''
6246 header. Doing this VIOLATES the HTTP standard. Enabling
6247 this feature could make you liable for problems which
6250 ignore-no-store ignores any ``Cache-control: no-store''
6251 headers received from a server. Doing this VIOLATES
6252 the HTTP standard. Enabling this feature could make you
6253 liable for problems which it causes.
6255 ignore-private ignores any ``Cache-control: private''
6256 headers received from a server. Doing this VIOLATES
6257 the HTTP standard. Enabling this feature could make you
6258 liable for problems which it causes.
6260 refresh-ims causes squid to contact the origin server
6261 when a client issues an If-Modified-Since request. This
6262 ensures that the client will receive an updated version
6263 if one is available.
6265 store-stale stores responses even if they don't have explicit
6266 freshness or a validator (i.e., Last-Modified or an ETag)
6267 present, or if they're already stale. By default, Squid will
6268 not cache such responses because they usually can't be
6269 reused. Note that such responses will be stale by default.
6271 max-stale=NN provide a maximum staleness factor. Squid won't
6272 serve objects more stale than this even if it failed to
6273 validate the object. Default: use the max_stale global limit.
6275 Basically a cached object is:
6277 FRESH if expire > now, else STALE
6279 FRESH if lm-factor < percent, else STALE
6283 The refresh_pattern lines are checked in the order listed here.
6284 The first entry which matches is used. If none of the entries
6285 match the default will be used.
6287 Note, you must uncomment all the default lines if you want
6288 to change one. The default setting is only active if none is
6294 # Add any of your own refresh_pattern entries above these.
6296 refresh_pattern ^ftp: 1440 20% 10080
6297 refresh_pattern ^gopher: 1440 0% 1440
6298 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
6299 refresh_pattern . 0 20% 4320
6303 NAME: quick_abort_min
6307 LOC: Config.quickAbort.min
6310 NAME: quick_abort_max
6314 LOC: Config.quickAbort.max
6317 NAME: quick_abort_pct
6321 LOC: Config.quickAbort.pct
6323 The cache by default continues downloading aborted requests
6324 which are almost completed (less than 16 KB remaining). This
6325 may be undesirable on slow (e.g. SLIP) links and/or very busy
6326 caches. Impatient users may tie up file descriptors and
6327 bandwidth by repeatedly requesting and immediately aborting
6330 When the user aborts a request, Squid will check the
6331 quick_abort values to the amount of data transferred until
6334 If the transfer has less than 'quick_abort_min' KB remaining,
6335 it will finish the retrieval.
6337 If the transfer has more than 'quick_abort_max' KB remaining,
6338 it will abort the retrieval.
6340 If more than 'quick_abort_pct' of the transfer has completed,
6341 it will finish the retrieval.
6343 If you do not want any retrieval to continue after the client
6344 has aborted, set both 'quick_abort_min' and 'quick_abort_max'
6347 If you want retrievals to always continue if they are being
6348 cached set 'quick_abort_min' to '-1 KB'.
6351 NAME: read_ahead_gap
6352 COMMENT: buffer-size
6354 LOC: Config.readAheadGap
6357 The amount of data the cache will buffer ahead of what has been
6358 sent to the client when retrieving an object from another server.
6362 IFDEF: USE_HTTP_VIOLATIONS
6365 LOC: Config.negativeTtl
6368 Set the Default Time-to-Live (TTL) for failed requests.
6369 Certain types of failures (such as "connection refused" and
6370 "404 Not Found") are able to be negatively-cached for a short time.
6371 Modern web servers should provide Expires: header, however if they
6372 do not this can provide a minimum TTL.
6373 The default is not to cache errors with unknown expiry details.
6375 Note that this is different from negative caching of DNS lookups.
6377 WARNING: Doing this VIOLATES the HTTP standard. Enabling
6378 this feature could make you liable for problems which it
6382 NAME: positive_dns_ttl
6385 LOC: Config.positiveDnsTtl
6388 Upper limit on how long Squid will cache positive DNS responses.
6389 Default is 6 hours (360 minutes). This directive must be set
6390 larger than negative_dns_ttl.
6393 NAME: negative_dns_ttl
6396 LOC: Config.negativeDnsTtl
6399 Time-to-Live (TTL) for negative caching of failed DNS lookups.
6400 This also sets the lower cache limit on positive lookups.
6401 Minimum value is 1 second, and it is not recommendable to go
6402 much below 10 seconds.
6405 NAME: range_offset_limit
6406 COMMENT: size [acl acl...]
6408 LOC: Config.rangeOffsetLimit
6411 usage: (size) [units] [[!]aclname]
6413 Sets an upper limit on how far (number of bytes) into the file
6414 a Range request may be to cause Squid to prefetch the whole file.
6415 If beyond this limit, Squid forwards the Range request as it is and
6416 the result is NOT cached.
6418 This is to stop a far ahead range request (lets say start at 17MB)
6419 from making Squid fetch the whole object up to that point before
6420 sending anything to the client.
6422 Multiple range_offset_limit lines may be specified, and they will
6423 be searched from top to bottom on each request until a match is found.
6424 The first match found will be used. If no line matches a request, the
6425 default limit of 0 bytes will be used.
6427 'size' is the limit specified as a number of units.
6429 'units' specifies whether to use bytes, KB, MB, etc.
6430 If no units are specified bytes are assumed.
6432 A size of 0 causes Squid to never fetch more than the
6433 client requested. (default)
6435 A size of 'none' causes Squid to always fetch the object from the
6436 beginning so it may cache the result. (2.0 style)
6438 'aclname' is the name of a defined ACL.
6440 NP: Using 'none' as the byte value here will override any quick_abort settings
6441 that may otherwise apply to the range request. The range request will
6442 be fully fetched from start to finish regardless of the client
6443 actions. This affects bandwidth usage.
6446 NAME: minimum_expiry_time
6449 LOC: Config.minimum_expiry_time
6452 The minimum caching time according to (Expires - Date)
6453 headers Squid honors if the object can't be revalidated.
6454 The default is 60 seconds.
6456 In reverse proxy environments it might be desirable to honor
6457 shorter object lifetimes. It is most likely better to make
6458 your server return a meaningful Last-Modified header however.
6460 In ESI environments where page fragments often have short
6461 lifetimes, this will often be best set to 0.
6464 NAME: store_avg_object_size
6468 LOC: Config.Store.avgObjectSize
6470 Average object size, used to estimate number of objects your
6471 cache can hold. The default is 13 KB.
6473 This is used to pre-seed the cache index memory allocation to
6474 reduce expensive reallocate operations while handling clients
6475 traffic. Too-large values may result in memory allocation during
6476 peak traffic, too-small values will result in wasted memory.
6478 Check the cache manager 'info' report metrics for the real
6479 object sizes seen by your Squid before tuning this.
6482 NAME: store_objects_per_bucket
6485 LOC: Config.Store.objectsPerBucket
6487 Target number of objects per bucket in the store hash table.
6488 Lowering this value increases the total number of buckets and
6489 also the storage maintenance rate. The default is 20.
6494 -----------------------------------------------------------------------------
6497 NAME: request_header_max_size
6501 LOC: Config.maxRequestHeaderSize
6503 This specifies the maximum size for HTTP headers in a request.
6504 Request headers are usually relatively small (about 512 bytes).
6505 Placing a limit on the request header size will catch certain
6506 bugs (for example with persistent connections) and possibly
6507 buffer-overflow or denial-of-service attacks.
6510 NAME: reply_header_max_size
6514 LOC: Config.maxReplyHeaderSize
6516 This specifies the maximum size for HTTP headers in a reply.
6517 Reply headers are usually relatively small (about 512 bytes).
6518 Placing a limit on the reply header size will catch certain
6519 bugs (for example with persistent connections) and possibly
6520 buffer-overflow or denial-of-service attacks.
6523 NAME: request_body_max_size
6527 DEFAULT_DOC: No limit.
6528 LOC: Config.maxRequestBodySize
6530 This specifies the maximum size for an HTTP request body.
6531 In other words, the maximum size of a PUT/POST request.
6532 A user who attempts to send a request with a body larger
6533 than this limit receives an "Invalid Request" error message.
6534 If you set this parameter to a zero (the default), there will
6535 be no limit imposed.
6537 See also client_request_buffer_max_size for an alternative
6538 limitation on client uploads which can be configured.
6541 NAME: client_request_buffer_max_size
6545 LOC: Config.maxRequestBufferSize
6547 This specifies the maximum buffer size of a client request.
6548 It prevents squid eating too much memory when somebody uploads
6553 IFDEF: USE_HTTP_VIOLATIONS
6556 DEFAULT_DOC: Obey RFC 2616.
6557 LOC: Config.accessList.brokenPosts
6559 A list of ACL elements which, if matched, causes Squid to send
6560 an extra CRLF pair after the body of a PUT/POST request.
6562 Some HTTP servers has broken implementations of PUT/POST,
6563 and rely on an extra CRLF pair sent by some WWW clients.
6565 Quote from RFC2616 section 4.1 on this matter:
6567 Note: certain buggy HTTP/1.0 client implementations generate an
6568 extra CRLF's after a POST request. To restate what is explicitly
6569 forbidden by the BNF, an HTTP/1.1 client must not preface or follow
6570 a request with an extra CRLF.
6572 This clause only supports fast acl types.
6573 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6576 acl buggy_server url_regex ^http://....
6577 broken_posts allow buggy_server
6580 NAME: adaptation_uses_indirect_client icap_uses_indirect_client
6583 IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_ADAPTATION
6585 LOC: Adaptation::Config::use_indirect_client
6587 Controls whether the indirect client IP address (instead of the direct
6588 client IP address) is passed to adaptation services.
6590 See also: follow_x_forwarded_for adaptation_send_client_ip
6594 IFDEF: USE_HTTP_VIOLATIONS
6598 LOC: Config.onoff.via
6600 If set (default), Squid will include a Via header in requests and
6601 replies as required by RFC2616.
6604 NAME: vary_ignore_expire
6607 LOC: Config.onoff.vary_ignore_expire
6610 Many HTTP servers supporting Vary gives such objects
6611 immediate expiry time with no cache-control header
6612 when requested by a HTTP/1.0 client. This option
6613 enables Squid to ignore such expiry times until
6614 HTTP/1.1 is fully implemented.
6616 WARNING: If turned on this may eventually cause some
6617 varying objects not intended for caching to get cached.
6620 NAME: request_entities
6622 LOC: Config.onoff.request_entities
6625 Squid defaults to deny GET and HEAD requests with request entities,
6626 as the meaning of such requests are undefined in the HTTP standard
6627 even if not explicitly forbidden.
6629 Set this directive to on if you have clients which insists
6630 on sending request entities in GET or HEAD requests. But be warned
6631 that there is server software (both proxies and web servers) which
6632 can fail to properly process this kind of request which may make you
6633 vulnerable to cache pollution attacks if enabled.
6636 NAME: request_header_access
6637 IFDEF: USE_HTTP_VIOLATIONS
6638 TYPE: http_header_access
6639 LOC: Config.request_header_access
6641 DEFAULT_DOC: No limits.
6643 Usage: request_header_access header_name allow|deny [!]aclname ...
6645 WARNING: Doing this VIOLATES the HTTP standard. Enabling
6646 this feature could make you liable for problems which it
6649 This option replaces the old 'anonymize_headers' and the
6650 older 'http_anonymizer' option with something that is much
6651 more configurable. A list of ACLs for each header name allows
6652 removal of specific header fields under specific conditions.
6654 This option only applies to outgoing HTTP request headers (i.e.,
6655 headers sent by Squid to the next HTTP hop such as a cache peer
6656 or an origin server). The option has no effect during cache hit
6657 detection. The equivalent adaptation vectoring point in ICAP
6658 terminology is post-cache REQMOD.
6660 The option is applied to individual outgoing request header
6661 fields. For each request header field F, Squid uses the first
6662 qualifying sets of request_header_access rules:
6664 1. Rules with header_name equal to F's name.
6665 2. Rules with header_name 'Other', provided F's name is not
6666 on the hard-coded list of commonly used HTTP header names.
6667 3. Rules with header_name 'All'.
6669 Within that qualifying rule set, rule ACLs are checked as usual.
6670 If ACLs of an "allow" rule match, the header field is allowed to
6671 go through as is. If ACLs of a "deny" rule match, the header is
6672 removed and request_header_replace is then checked to identify
6673 if the removed header has a replacement. If no rules within the
6674 set have matching ACLs, the header field is left as is.
6676 For example, to achieve the same behavior as the old
6677 'http_anonymizer standard' option, you should use:
6679 request_header_access From deny all
6680 request_header_access Referer deny all
6681 request_header_access User-Agent deny all
6683 Or, to reproduce the old 'http_anonymizer paranoid' feature
6686 request_header_access Authorization allow all
6687 request_header_access Proxy-Authorization allow all
6688 request_header_access Cache-Control allow all
6689 request_header_access Content-Length allow all
6690 request_header_access Content-Type allow all
6691 request_header_access Date allow all
6692 request_header_access Host allow all
6693 request_header_access If-Modified-Since allow all
6694 request_header_access Pragma allow all
6695 request_header_access Accept allow all
6696 request_header_access Accept-Charset allow all
6697 request_header_access Accept-Encoding allow all
6698 request_header_access Accept-Language allow all
6699 request_header_access Connection allow all
6700 request_header_access All deny all
6702 HTTP reply headers are controlled with the reply_header_access directive.
6704 By default, all headers are allowed (no anonymizing is performed).
6707 NAME: reply_header_access
6708 IFDEF: USE_HTTP_VIOLATIONS
6709 TYPE: http_header_access
6710 LOC: Config.reply_header_access
6712 DEFAULT_DOC: No limits.
6714 Usage: reply_header_access header_name allow|deny [!]aclname ...
6716 WARNING: Doing this VIOLATES the HTTP standard. Enabling
6717 this feature could make you liable for problems which it
6720 This option only applies to reply headers, i.e., from the
6721 server to the client.
6723 This is the same as request_header_access, but in the other
6724 direction. Please see request_header_access for detailed
6727 For example, to achieve the same behavior as the old
6728 'http_anonymizer standard' option, you should use:
6730 reply_header_access Server deny all
6731 reply_header_access WWW-Authenticate deny all
6732 reply_header_access Link deny all
6734 Or, to reproduce the old 'http_anonymizer paranoid' feature
6737 reply_header_access Allow allow all
6738 reply_header_access WWW-Authenticate allow all
6739 reply_header_access Proxy-Authenticate allow all
6740 reply_header_access Cache-Control allow all
6741 reply_header_access Content-Encoding allow all
6742 reply_header_access Content-Length allow all
6743 reply_header_access Content-Type allow all
6744 reply_header_access Date allow all
6745 reply_header_access Expires allow all
6746 reply_header_access Last-Modified allow all
6747 reply_header_access Location allow all
6748 reply_header_access Pragma allow all
6749 reply_header_access Content-Language allow all
6750 reply_header_access Retry-After allow all
6751 reply_header_access Title allow all
6752 reply_header_access Content-Disposition allow all
6753 reply_header_access Connection allow all
6754 reply_header_access All deny all
6756 HTTP request headers are controlled with the request_header_access directive.
6758 By default, all headers are allowed (no anonymizing is
6762 NAME: request_header_replace header_replace
6763 IFDEF: USE_HTTP_VIOLATIONS
6764 TYPE: http_header_replace
6765 LOC: Config.request_header_access
6768 Usage: request_header_replace header_name message
6769 Example: request_header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
6771 This option allows you to change the contents of headers
6772 denied with request_header_access above, by replacing them
6773 with some fixed string.
6775 This only applies to request headers, not reply headers.
6777 By default, headers are removed if denied.
6780 NAME: reply_header_replace
6781 IFDEF: USE_HTTP_VIOLATIONS
6782 TYPE: http_header_replace
6783 LOC: Config.reply_header_access
6786 Usage: reply_header_replace header_name message
6787 Example: reply_header_replace Server Foo/1.0
6789 This option allows you to change the contents of headers
6790 denied with reply_header_access above, by replacing them
6791 with some fixed string.
6793 This only applies to reply headers, not request headers.
6795 By default, headers are removed if denied.
6798 NAME: request_header_add
6799 TYPE: HeaderWithAclList
6800 LOC: Config.request_header_add
6803 Usage: request_header_add field-name field-value [ acl ... ]
6804 Example: request_header_add X-Client-CA "CA=%ssl::>cert_issuer" all
6806 This option adds header fields to outgoing HTTP requests (i.e.,
6807 request headers sent by Squid to the next HTTP hop such as a
6808 cache peer or an origin server). The option has no effect during
6809 cache hit detection. The equivalent adaptation vectoring point
6810 in ICAP terminology is post-cache REQMOD.
6812 Field-name is a token specifying an HTTP header name. If a
6813 standard HTTP header name is used, Squid does not check whether
6814 the new header conflicts with any existing headers or violates
6815 HTTP rules. If the request to be modified already contains a
6816 field with the same name, the old field is preserved but the
6817 header field values are not merged.
6819 Field-value is either a token or a quoted string. If quoted
6820 string format is used, then the surrounding quotes are removed
6821 while escape sequences and %macros are processed.
6823 One or more Squid ACLs may be specified to restrict header
6824 injection to matching requests. As always in squid.conf, all
6825 ACLs in the ACL list must be satisfied for the insertion to
6826 happen. The request_header_add supports fast ACLs only.
6828 See also: reply_header_add.
6831 NAME: reply_header_add
6832 TYPE: HeaderWithAclList
6833 LOC: Config.reply_header_add
6836 Usage: reply_header_add field-name field-value [ acl ... ]
6837 Example: reply_header_add X-Client-CA "CA=%ssl::>cert_issuer" all
6839 This option adds header fields to outgoing HTTP responses (i.e., response
6840 headers delivered by Squid to the client). This option has no effect on
6841 cache hit detection. The equivalent adaptation vectoring point in
6842 ICAP terminology is post-cache RESPMOD. This option does not apply to
6843 successful CONNECT replies.
6845 Field-name is a token specifying an HTTP header name. If a
6846 standard HTTP header name is used, Squid does not check whether
6847 the new header conflicts with any existing headers or violates
6848 HTTP rules. If the response to be modified already contains a
6849 field with the same name, the old field is preserved but the
6850 header field values are not merged.
6852 Field-value is either a token or a quoted string. If quoted
6853 string format is used, then the surrounding quotes are removed
6854 while escape sequences and %macros are processed.
6856 One or more Squid ACLs may be specified to restrict header
6857 injection to matching responses. As always in squid.conf, all
6858 ACLs in the ACL list must be satisfied for the insertion to
6859 happen. The reply_header_add option supports fast ACLs only.
6861 See also: request_header_add.
6869 This option used to log custom information about the master
6870 transaction. For example, an admin may configure Squid to log
6871 which "user group" the transaction belongs to, where "user group"
6872 will be determined based on a set of ACLs and not [just]
6873 authentication information.
6874 Values of key/value pairs can be logged using %{key}note macros:
6876 note key value acl ...
6877 logformat myFormat ... %{key}note ...
6879 This clause only supports fast acl types.
6880 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6883 NAME: relaxed_header_parser
6884 COMMENT: on|off|warn
6886 LOC: Config.onoff.relaxed_header_parser
6889 In the default "on" setting Squid accepts certain forms
6890 of non-compliant HTTP messages where it is unambiguous
6891 what the sending application intended even if the message
6892 is not correctly formatted. The messages is then normalized
6893 to the correct form when forwarded by Squid.
6895 If set to "warn" then a warning will be emitted in cache.log
6896 each time such HTTP error is encountered.
6898 If set to "off" then such HTTP errors will cause the request
6899 or response to be rejected.
6902 NAME: collapsed_forwarding
6905 LOC: Config.onoff.collapsed_forwarding
6908 This option controls whether Squid is allowed to merge multiple
6909 potentially cachable requests for the same URI before Squid knows
6910 whether the response is going to be cachable.
6912 When enabled, instead of forwarding each concurrent request for
6913 the same URL, Squid just sends the first of them. The other, so
6914 called "collapsed" requests, wait for the response to the first
6915 request and, if it happens to be cachable, use that response.
6916 Here, "concurrent requests" means "received after the first
6917 request headers were parsed and before the corresponding response
6918 headers were parsed".
6920 This feature is disabled by default: enabling collapsed
6921 forwarding needlessly delays forwarding requests that look
6922 cachable (when they are collapsed) but then need to be forwarded
6923 individually anyway because they end up being for uncachable
6924 content. However, in some cases, such as acceleration of highly
6925 cachable content with periodic or grouped expiration times, the
6926 gains from collapsing [large volumes of simultaneous refresh
6927 requests] outweigh losses from such delays.
6929 Squid collapses two kinds of requests: regular client requests
6930 received on one of the listening ports and internal "cache
6931 revalidation" requests which are triggered by those regular
6932 requests hitting a stale cached object. Revalidation collapsing
6933 is currently disabled for Squid instances containing SMP-aware
6934 disk or memory caches and for Vary-controlled cached objects.
6937 NAME: collapsed_forwarding_access
6940 DEFAULT_DOC: Requests may be collapsed if collapsed_forwarding is on.
6941 LOC: Config.accessList.collapsedForwardingAccess
6943 Use this directive to restrict collapsed forwarding to a subset of
6944 eligible requests. The directive is checked for regular HTTP
6945 requests, internal revalidation requests, and HTCP/ICP requests.
6947 collapsed_forwarding_access allow|deny [!]aclname ...
6949 This directive cannot force collapsing. It has no effect on
6950 collapsing unless collapsed_forwarding is 'on', and all other
6951 collapsing preconditions are satisfied.
6953 * A denied request will not collapse, and future transactions will
6954 not collapse on it (even if they are allowed to collapse).
6956 * An allowed request may collapse, or future transactions may
6957 collapse on it (provided they are allowed to collapse).
6959 This directive is evaluated before receiving HTTP response headers
6960 and without access to Squid-to-peer connection (if any).
6962 Only fast ACLs are supported.
6964 See also: collapsed_forwarding.
6967 NAME: shared_transient_entries_limit collapsed_forwarding_shared_entries_limit
6968 COMMENT: (number of entries)
6970 LOC: Config.shared_transient_entries_limit
6973 This directive limits the size of a table used for sharing current
6974 transaction information among SMP workers. A table entry stores meta
6975 information about a single cache entry being delivered to Squid
6976 client(s) by one or more SMP workers. A single table entry consumes
6977 less than 128 shared memory bytes.
6979 The limit should be significantly larger than the number of
6980 concurrent non-collapsed cachable responses leaving Squid. For a
6981 cache that handles less than 5000 concurrent requests, the default
6982 setting of 16384 should be plenty.
6984 Using excessively large values wastes shared memory. Limiting the
6985 table size too much results in hash collisions, leading to lower hit
6986 ratio and missed SMP request collapsing opportunities: Transactions
6987 left without a table entry cannot cache their responses and are
6988 invisible to other concurrent requests for the same resource.
6990 A zero limit is allowed but unsupported. A positive small limit
6991 lowers hit ratio, but zero limit disables a lot of essential
6992 synchronization among SMP workers, leading to HTTP violations (e.g.,
6993 stale hit responses). It also disables shared collapsed forwarding:
6994 A worker becomes unable to collapse its requests on transactions in
6995 other workers, resulting in more trips to the origin server and more
7001 -----------------------------------------------------------------------------
7004 NAME: forward_timeout
7007 LOC: Config.Timeout.forward
7010 This parameter specifies how long Squid should at most attempt in
7011 finding a forwarding path for the request before giving up.
7014 NAME: connect_timeout
7017 LOC: Config.Timeout.connect
7020 This parameter specifies how long to wait for the TCP connect to
7021 the requested server or peer to complete before Squid should
7022 attempt to find another path where to forward the request.
7025 NAME: peer_connect_timeout
7028 LOC: Config.Timeout.peer_connect
7031 This parameter specifies how long to wait for a pending TCP
7032 connection to a peer cache. The default is 30 seconds. You
7033 may also set different timeout values for individual neighbors
7034 with the 'connect-timeout' option on a 'cache_peer' line.
7040 LOC: Config.Timeout.read
7043 Applied on peer server connections.
7045 After each successful read(), the timeout will be extended by this
7046 amount. If no data is read again after this amount of time,
7047 the request is aborted and logged with ERR_READ_TIMEOUT.
7049 The default is 15 minutes.
7055 LOC: Config.Timeout.write
7058 This timeout is tracked for all connections that have data
7059 available for writing and are waiting for the socket to become
7060 ready. After each successful write, the timeout is extended by
7061 the configured amount. If Squid has data to write but the
7062 connection is not ready for the configured duration, the
7063 transaction associated with the connection is terminated. The
7064 default is 15 minutes.
7067 NAME: request_timeout
7069 LOC: Config.Timeout.request
7072 How long to wait for complete HTTP request headers after initial
7073 connection establishment.
7076 NAME: request_start_timeout
7078 LOC: Config.Timeout.request_start_timeout
7081 How long to wait for the first request byte after initial
7082 connection establishment.
7085 NAME: client_idle_pconn_timeout persistent_request_timeout
7087 LOC: Config.Timeout.clientIdlePconn
7090 How long to wait for the next HTTP request on a persistent
7091 client connection after the previous request completes.
7094 NAME: ftp_client_idle_timeout
7096 LOC: Config.Timeout.ftpClientIdle
7099 How long to wait for an FTP request on a connection to Squid ftp_port.
7100 Many FTP clients do not deal with idle connection closures well,
7101 necessitating a longer default timeout than client_idle_pconn_timeout
7102 used for incoming HTTP requests.
7105 NAME: client_lifetime
7108 LOC: Config.Timeout.lifetime
7111 The maximum amount of time a client (browser) is allowed to
7112 remain connected to the cache process. This protects the Cache
7113 from having a lot of sockets (and hence file descriptors) tied up
7114 in a CLOSE_WAIT state from remote clients that go away without
7115 properly shutting down (either because of a network failure or
7116 because of a poor client implementation). The default is one
7119 NOTE: The default value is intended to be much larger than any
7120 client would ever need to be connected to your cache. You
7121 should probably change client_lifetime only as a last resort.
7122 If you seem to have many client connections tying up
7123 filedescriptors, we recommend first tuning the read_timeout,
7124 request_timeout, persistent_request_timeout and quick_abort values.
7127 NAME: pconn_lifetime
7130 LOC: Config.Timeout.pconnLifetime
7133 Desired maximum lifetime of a persistent connection.
7134 When set, Squid will close a now-idle persistent connection that
7135 exceeded configured lifetime instead of moving the connection into
7136 the idle connection pool (or equivalent). No effect on ongoing/active
7137 transactions. Connection lifetime is the time period from the
7138 connection acceptance or opening time until "now".
7140 This limit is useful in environments with long-lived connections
7141 where Squid configuration or environmental factors change during a
7142 single connection lifetime. If unrestricted, some connections may
7143 last for hours and even days, ignoring those changes that should
7144 have affected their behavior or their existence.
7146 Currently, a new lifetime value supplied via Squid reconfiguration
7147 has no effect on already idle connections unless they become busy.
7149 When set to '0' this limit is not used.
7152 NAME: half_closed_clients
7154 LOC: Config.onoff.half_closed_clients
7157 Some clients may shutdown the sending side of their TCP
7158 connections, while leaving their receiving sides open. Sometimes,
7159 Squid can not tell the difference between a half-closed and a
7160 fully-closed TCP connection.
7162 By default, Squid will immediately close client connections when
7163 read(2) returns "no more data to read."
7165 Change this option to 'on' and Squid will keep open connections
7166 until a read(2) or write(2) on the socket returns an error.
7167 This may show some benefits for reverse proxies. But if not
7168 it is recommended to leave OFF.
7171 NAME: server_idle_pconn_timeout pconn_timeout
7173 LOC: Config.Timeout.serverIdlePconn
7176 Timeout for idle persistent connections to servers and other
7183 LOC: Ident::TheConfig.timeout
7186 Maximum time to wait for IDENT lookups to complete.
7188 If this is too high, and you enabled IDENT lookups from untrusted
7189 users, you might be susceptible to denial-of-service by having
7190 many ident requests going at once.
7193 NAME: shutdown_lifetime
7196 LOC: Config.shutdownLifetime
7199 When SIGTERM or SIGHUP is received, the cache is put into
7200 "shutdown pending" mode until all active sockets are closed.
7201 This value is the lifetime to set for all open descriptors
7202 during shutdown mode. Any active clients after this many
7203 seconds will receive a 'timeout' message.
7207 ADMINISTRATIVE PARAMETERS
7208 -----------------------------------------------------------------------------
7214 LOC: Config.adminEmail
7216 Email-address of local cache manager who will receive
7217 mail if the cache dies. The default is "webmaster".
7223 LOC: Config.EmailFrom
7225 From: email-address for mail sent when the cache dies.
7226 The default is to use 'squid@unique_hostname'.
7228 See also: unique_hostname directive.
7234 LOC: Config.EmailProgram
7236 Email program used to send mail if the cache dies.
7237 The default is "mail". The specified program must comply
7238 with the standard Unix mail syntax:
7239 mail-program recipient < mailfile
7241 Optional command line options can be specified.
7244 NAME: cache_effective_user
7246 DEFAULT: @DEFAULT_CACHE_EFFECTIVE_USER@
7247 LOC: Config.effectiveUser
7249 If you start Squid as root, it will change its effective/real
7250 UID/GID to the user specified below. The default is to change
7251 to UID of @DEFAULT_CACHE_EFFECTIVE_USER@.
7252 see also; cache_effective_group
7255 NAME: cache_effective_group
7258 DEFAULT_DOC: Use system group memberships of the cache_effective_user account
7259 LOC: Config.effectiveGroup
7261 Squid sets the GID to the effective user's default group ID
7262 (taken from the password file) and supplementary group list
7263 from the groups membership.
7265 If you want Squid to run with a specific GID regardless of
7266 the group memberships of the effective user then set this
7267 to the group (or GID) you want Squid to run as. When set
7268 all other group privileges of the effective user are ignored
7269 and only this GID is effective. If Squid is not started as
7270 root the user starting Squid MUST be member of the specified
7273 This option is not recommended by the Squid Team.
7274 Our preference is for administrators to configure a secure
7275 user account for squid with UID/GID matching system policies.
7278 NAME: httpd_suppress_version_string
7282 LOC: Config.onoff.httpd_suppress_version_string
7284 Suppress Squid version string info in HTTP headers and HTML error pages.
7287 NAME: visible_hostname
7289 LOC: Config.visibleHostname
7291 DEFAULT_DOC: Automatically detect the system host name
7293 If you want to present a special hostname in error messages, etc,
7294 define this. Otherwise, the return value of gethostname()
7295 will be used. If you have multiple caches in a cluster and
7296 get errors about IP-forwarding you must set them to have individual
7297 names with this setting.
7300 NAME: unique_hostname
7302 LOC: Config.uniqueHostname
7304 DEFAULT_DOC: Copy the value from visible_hostname
7306 If you want to have multiple machines with the same
7307 'visible_hostname' you must give each machine a different
7308 'unique_hostname' so forwarding loops can be detected.
7311 NAME: hostname_aliases
7313 LOC: Config.hostnameAliases
7316 A list of other DNS names your cache has.
7324 Minimum umask which should be enforced while the proxy
7325 is running, in addition to the umask set at startup.
7327 For a traditional octal representation of umasks, start
7332 OPTIONS FOR THE CACHE REGISTRATION SERVICE
7333 -----------------------------------------------------------------------------
7335 This section contains parameters for the (optional) cache
7336 announcement service. This service is provided to help
7337 cache administrators locate one another in order to join or
7338 create cache hierarchies.
7340 An 'announcement' message is sent (via UDP) to the registration
7341 service by Squid. By default, the announcement message is NOT
7342 SENT unless you enable it with 'announce_period' below.
7344 The announcement message includes your hostname, plus the
7345 following information from this configuration file:
7351 All current information is processed regularly and made
7352 available on the Web at http://www.ircache.net/Cache/Tracker/.
7355 NAME: announce_period
7357 LOC: Config.Announce.period
7359 DEFAULT_DOC: Announcement messages disabled.
7361 This is how frequently to send cache announcements.
7363 To enable announcing your cache, just set an announce period.
7366 announce_period 1 day
7371 DEFAULT: tracker.ircache.net
7372 LOC: Config.Announce.host
7374 Set the hostname where announce registration messages will be sent.
7376 See also announce_port and announce_file
7382 LOC: Config.Announce.file
7384 The contents of this file will be included in the announce
7385 registration messages.
7391 LOC: Config.Announce.port
7393 Set the port where announce registration messages will be sent.
7395 See also announce_host and announce_file
7399 HTTPD-ACCELERATOR OPTIONS
7400 -----------------------------------------------------------------------------
7403 NAME: httpd_accel_surrogate_id
7406 DEFAULT_DOC: visible_hostname is used if no specific ID is set.
7407 LOC: Config.Accel.surrogate_id
7409 Surrogates (http://www.esi.org/architecture_spec_1.0.html)
7410 need an identification token to allow control targeting. Because
7411 a farm of surrogates may all perform the same tasks, they may share
7412 an identification token.
7414 When the surrogate is a reverse-proxy, this ID is also
7415 used as cdn-id for CDN-Loop detection (RFC 8586).
7418 NAME: http_accel_surrogate_remote
7422 LOC: Config.onoff.surrogate_is_remote
7424 Remote surrogates (such as those in a CDN) honour the header
7425 "Surrogate-Control: no-store-remote".
7427 Set this to on to have squid behave as a remote surrogate.
7431 IFDEF: USE_SQUID_ESI
7432 COMMENT: libxml2|expat
7434 LOC: ESIParser::Type
7436 DEFAULT_DOC: Selects libxml2 if available at ./configure time or libexpat otherwise.
7438 Selects the XML parsing library to use when interpreting responses with
7441 To disable ESI handling completely, ./configure Squid with --disable-esi.
7445 DELAY POOL PARAMETERS
7446 -----------------------------------------------------------------------------
7450 TYPE: delay_pool_count
7452 IFDEF: USE_DELAY_POOLS
7455 This represents the number of delay pools to be used. For example,
7456 if you have one class 2 delay pool and one class 3 delays pool, you
7457 have a total of 2 delay pools.
7459 See also delay_parameters, delay_class, delay_access for pool
7460 configuration details.
7464 TYPE: delay_pool_class
7466 IFDEF: USE_DELAY_POOLS
7469 This defines the class of each delay pool. There must be exactly one
7470 delay_class line for each delay pool. For example, to define two
7471 delay pools, one of class 2 and one of class 3, the settings above
7475 delay_pools 4 # 4 delay pools
7476 delay_class 1 2 # pool 1 is a class 2 pool
7477 delay_class 2 3 # pool 2 is a class 3 pool
7478 delay_class 3 4 # pool 3 is a class 4 pool
7479 delay_class 4 5 # pool 4 is a class 5 pool
7481 The delay pool classes are:
7483 class 1 Everything is limited by a single aggregate
7486 class 2 Everything is limited by a single aggregate
7487 bucket as well as an "individual" bucket chosen
7488 from bits 25 through 32 of the IPv4 address.
7490 class 3 Everything is limited by a single aggregate
7491 bucket as well as a "network" bucket chosen
7492 from bits 17 through 24 of the IP address and a
7493 "individual" bucket chosen from bits 17 through
7494 32 of the IPv4 address.
7496 class 4 Everything in a class 3 delay pool, with an
7497 additional limit on a per user basis. This
7498 only takes effect if the username is established
7499 in advance - by forcing authentication in your
7502 class 5 Requests are grouped according their tag (see
7503 external_acl's tag= reply).
7506 Each pool also requires a delay_parameters directive to configure the pool size
7507 and speed limits used whenever the pool is applied to a request. Along with
7508 a set of delay_access directives to determine when it is used.
7510 NOTE: If an IP address is a.b.c.d
7511 -> bits 25 through 32 are "d"
7512 -> bits 17 through 24 are "c"
7513 -> bits 17 through 32 are "c * 256 + d"
7515 NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to
7516 IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic.
7518 This clause only supports fast acl types.
7519 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
7521 See also delay_parameters and delay_access.
7525 TYPE: delay_pool_access
7527 DEFAULT_DOC: Deny using the pool, unless allow rules exist in squid.conf for the pool.
7528 IFDEF: USE_DELAY_POOLS
7531 This is used to determine which delay pool a request falls into.
7533 delay_access is sorted per pool and the matching starts with pool 1,
7534 then pool 2, ..., and finally pool N. The first delay pool where the
7535 request is allowed is selected for the request. If it does not allow
7536 the request to any pool then the request is not delayed (default).
7538 For example, if you want some_big_clients in delay
7539 pool 1 and lotsa_little_clients in delay pool 2:
7541 delay_access 1 allow some_big_clients
7542 delay_access 1 deny all
7543 delay_access 2 allow lotsa_little_clients
7544 delay_access 2 deny all
7545 delay_access 3 allow authenticated_clients
7547 See also delay_parameters and delay_class.
7551 NAME: delay_parameters
7552 TYPE: delay_pool_rates
7554 IFDEF: USE_DELAY_POOLS
7557 This defines the parameters for a delay pool. Each delay pool has
7558 a number of "buckets" associated with it, as explained in the
7559 description of delay_class.
7561 For a class 1 delay pool, the syntax is:
7563 delay_parameters pool aggregate
7565 For a class 2 delay pool:
7567 delay_parameters pool aggregate individual
7569 For a class 3 delay pool:
7571 delay_parameters pool aggregate network individual
7573 For a class 4 delay pool:
7575 delay_parameters pool aggregate network individual user
7577 For a class 5 delay pool:
7579 delay_parameters pool tagrate
7581 The option variables are:
7583 pool a pool number - ie, a number between 1 and the
7584 number specified in delay_pools as used in
7587 aggregate the speed limit parameters for the aggregate bucket
7590 individual the speed limit parameters for the individual
7591 buckets (class 2, 3).
7593 network the speed limit parameters for the network buckets
7596 user the speed limit parameters for the user buckets
7599 tagrate the speed limit parameters for the tag buckets
7602 A pair of delay parameters is written restore/maximum, where restore is
7603 the number of bytes (not bits - modem and network speeds are usually
7604 quoted in bits) per second placed into the bucket, and maximum is the
7605 maximum number of bytes which can be in the bucket at any time.
7607 There must be one delay_parameters line for each delay pool.
7610 For example, if delay pool number 1 is a class 2 delay pool as in the
7611 above example, and is being used to strictly limit each host to 64Kbit/sec
7612 (plus overheads), with no overall limit, the line is:
7614 delay_parameters 1 none 8000/8000
7616 Note that 8 x 8K Byte/sec -> 64K bit/sec.
7618 Note that the word 'none' is used to represent no limit.
7621 And, if delay pool number 2 is a class 3 delay pool as in the above
7622 example, and you want to limit it to a total of 256Kbit/sec (strict limit)
7623 with each 8-bit network permitted 64Kbit/sec (strict limit) and each
7624 individual host permitted 4800bit/sec with a bucket maximum size of 64Kbits
7625 to permit a decent web page to be downloaded at a decent speed
7626 (if the network is not being limited due to overuse) but slow down
7627 large downloads more significantly:
7629 delay_parameters 2 32000/32000 8000/8000 600/8000
7631 Note that 8 x 32K Byte/sec -> 256K bit/sec.
7632 8 x 8K Byte/sec -> 64K bit/sec.
7633 8 x 600 Byte/sec -> 4800 bit/sec.
7636 Finally, for a class 4 delay pool as in the example - each user will
7637 be limited to 128Kbits/sec no matter how many workstations they are logged into.:
7639 delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
7642 See also delay_class and delay_access.
7646 NAME: delay_initial_bucket_level
7647 COMMENT: (percent, 0-100)
7650 IFDEF: USE_DELAY_POOLS
7651 LOC: Config.Delay.initial
7653 The initial bucket percentage is used to determine how much is put
7654 in each bucket when squid starts, is reconfigured, or first notices
7655 a host accessing it (in class 2 and class 3, individual hosts and
7656 networks only have buckets associated with them once they have been
7661 CLIENT DELAY POOL PARAMETERS
7662 -----------------------------------------------------------------------------
7665 NAME: client_delay_pools
7666 TYPE: client_delay_pool_count
7668 IFDEF: USE_DELAY_POOLS
7669 LOC: Config.ClientDelay
7671 This option specifies the number of client delay pools used. It must
7672 preceed other client_delay_* options.
7675 client_delay_pools 2
7677 See also client_delay_parameters and client_delay_access.
7680 NAME: client_delay_initial_bucket_level
7681 COMMENT: (percent, 0-no_limit)
7684 IFDEF: USE_DELAY_POOLS
7685 LOC: Config.ClientDelay.initial
7687 This option determines the initial bucket size as a percentage of
7688 max_bucket_size from client_delay_parameters. Buckets are created
7689 at the time of the "first" connection from the matching IP. Idle
7690 buckets are periodically deleted up.
7692 You can specify more than 100 percent but note that such "oversized"
7693 buckets are not refilled until their size goes down to max_bucket_size
7694 from client_delay_parameters.
7697 client_delay_initial_bucket_level 50
7700 NAME: client_delay_parameters
7701 TYPE: client_delay_pool_rates
7703 IFDEF: USE_DELAY_POOLS
7704 LOC: Config.ClientDelay
7707 This option configures client-side bandwidth limits using the
7710 client_delay_parameters pool speed_limit max_bucket_size
7712 pool is an integer ID used for client_delay_access matching.
7714 speed_limit is bytes added to the bucket per second.
7716 max_bucket_size is the maximum size of a bucket, enforced after any
7717 speed_limit additions.
7719 Please see the delay_parameters option for more information and
7723 client_delay_parameters 1 1024 2048
7724 client_delay_parameters 2 51200 16384
7726 See also client_delay_access.
7730 NAME: client_delay_access
7731 TYPE: client_delay_pool_access
7733 DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool.
7734 IFDEF: USE_DELAY_POOLS
7735 LOC: Config.ClientDelay
7737 This option determines the client-side delay pool for the
7740 client_delay_access pool_ID allow|deny acl_name
7742 All client_delay_access options are checked in their pool ID
7743 order, starting with pool 1. The first checked pool with allowed
7744 request is selected for the request. If no ACL matches or there
7745 are no client_delay_access options, the request bandwidth is not
7748 The ACL-selected pool is then used to find the
7749 client_delay_parameters for the request. Client-side pools are
7750 not used to aggregate clients. Clients are always aggregated
7751 based on their source IP addresses (one bucket per source IP).
7753 This clause only supports fast acl types.
7754 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
7755 Additionally, only the client TCP connection details are available.
7756 ACLs testing HTTP properties will not work.
7758 Please see delay_access for more examples.
7761 client_delay_access 1 allow low_rate_network
7762 client_delay_access 2 allow vips_network
7765 See also client_delay_parameters and client_delay_pools.
7768 NAME: response_delay_pool
7769 TYPE: response_delay_pool_parameters
7771 IFDEF: USE_DELAY_POOLS
7772 LOC: Config.MessageDelay
7774 This option configures client response bandwidth limits using the
7777 response_delay_pool name [option=value] ...
7779 name the response delay pool name
7783 individual-restore The speed limit of an individual
7784 bucket(bytes/s). To be used in conjunction
7785 with 'individual-maximum'.
7787 individual-maximum The maximum number of bytes which can
7788 be placed into the individual bucket. To be used
7789 in conjunction with 'individual-restore'.
7791 aggregate-restore The speed limit for the aggregate
7792 bucket(bytes/s). To be used in conjunction with
7793 'aggregate-maximum'.
7795 aggregate-maximum The maximum number of bytes which can
7796 be placed into the aggregate bucket. To be used
7797 in conjunction with 'aggregate-restore'.
7799 initial-bucket-level The initial bucket size as a percentage
7800 of individual-maximum.
7802 Individual and(or) aggregate bucket options may not be specified,
7803 meaning no individual and(or) aggregate speed limitation.
7804 See also response_delay_pool_access and delay_parameters for
7805 terminology details.
7808 NAME: response_delay_pool_access
7809 TYPE: response_delay_pool_access
7811 DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool.
7812 IFDEF: USE_DELAY_POOLS
7813 LOC: Config.MessageDelay
7815 Determines whether a specific named response delay pool is used
7816 for the transaction. The syntax for this directive is:
7818 response_delay_pool_access pool_name allow|deny acl_name
7820 All response_delay_pool_access options are checked in the order
7821 they appear in this configuration file. The first rule with a
7822 matching ACL wins. If (and only if) an "allow" rule won, Squid
7823 assigns the response to the corresponding named delay pool.
7827 WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
7828 -----------------------------------------------------------------------------
7833 LOC: Config.Wccp.router
7835 DEFAULT_DOC: WCCP disabled.
7838 Use this option to define your WCCP ``home'' router for
7841 wccp_router supports a single WCCP(v1) router
7843 wccp2_router supports multiple WCCPv2 routers
7845 only one of the two may be used at the same time and defines
7846 which version of WCCP to use.
7850 TYPE: IpAddress_list
7851 LOC: Config.Wccp2.router
7853 DEFAULT_DOC: WCCPv2 disabled.
7856 Use this option to define your WCCP ``home'' router for
7859 wccp_router supports a single WCCP(v1) router
7861 wccp2_router supports multiple WCCPv2 routers
7863 only one of the two may be used at the same time and defines
7864 which version of WCCP to use.
7869 LOC: Config.Wccp.version
7873 This directive is only relevant if you need to set up WCCP(v1)
7874 to some very old and end-of-life Cisco routers. In all other
7875 setups it must be left unset or at the default setting.
7876 It defines an internal version in the WCCP(v1) protocol,
7877 with version 4 being the officially documented protocol.
7879 According to some users, Cisco IOS 11.2 and earlier only
7880 support WCCP version 3. If you're using that or an earlier
7881 version of IOS, you may need to change this value to 3, otherwise
7882 do not specify this parameter.
7885 NAME: wccp2_rebuild_wait
7887 LOC: Config.Wccp2.rebuildwait
7891 If this is enabled Squid will wait for the cache dir rebuild to finish
7892 before sending the first wccp2 HereIAm packet
7895 NAME: wccp2_forwarding_method
7897 LOC: Config.Wccp2.forwarding_method
7901 WCCP2 allows the setting of forwarding methods between the
7902 router/switch and the cache. Valid values are as follows:
7904 gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
7905 l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
7907 Currently (as of IOS 12.4) cisco routers only support GRE.
7908 Cisco switches only support the L2 redirect assignment method.
7911 NAME: wccp2_return_method
7913 LOC: Config.Wccp2.return_method
7917 WCCP2 allows the setting of return methods between the
7918 router/switch and the cache for packets that the cache
7919 decides not to handle. Valid values are as follows:
7921 gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
7922 l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
7924 Currently (as of IOS 12.4) cisco routers only support GRE.
7925 Cisco switches only support the L2 redirect assignment.
7927 If the "ip wccp redirect exclude in" command has been
7928 enabled on the cache interface, then it is still safe for
7929 the proxy server to use a l2 redirect method even if this
7930 option is set to GRE.
7933 NAME: wccp2_assignment_method
7935 LOC: Config.Wccp2.assignment_method
7939 WCCP2 allows the setting of methods to assign the WCCP hash
7940 Valid values are as follows:
7942 hash - Hash assignment
7943 mask - Mask assignment
7945 As a general rule, cisco routers support the hash assignment method
7946 and cisco switches support the mask assignment method.
7951 LOC: Config.Wccp2.info
7952 DEFAULT_IF_NONE: standard 0
7953 DEFAULT_DOC: Use the 'web-cache' standard service.
7956 WCCP2 allows for multiple traffic services. There are two
7957 types: "standard" and "dynamic". The standard type defines
7958 one service id - http (id 0). The dynamic service ids can be from
7959 51 to 255 inclusive. In order to use a dynamic service id
7960 one must define the type of traffic to be redirected; this is done
7961 using the wccp2_service_info option.
7963 The "standard" type does not require a wccp2_service_info option,
7964 just specifying the service id will suffice.
7966 MD5 service authentication can be enabled by adding
7967 "password=<password>" to the end of this service declaration.
7971 wccp2_service standard 0 # for the 'web-cache' standard service
7972 wccp2_service dynamic 80 # a dynamic service type which will be
7973 # fleshed out with subsequent options.
7974 wccp2_service standard 0 password=foo
7977 NAME: wccp2_service_info
7978 TYPE: wccp2_service_info
7979 LOC: Config.Wccp2.info
7983 Dynamic WCCPv2 services require further information to define the
7984 traffic you wish to have diverted.
7988 wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
7989 priority=<priority> ports=<port>,<port>..
7991 The relevant WCCPv2 flags:
7992 + src_ip_hash, dst_ip_hash
7993 + source_port_hash, dst_port_hash
7994 + src_ip_alt_hash, dst_ip_alt_hash
7995 + src_port_alt_hash, dst_port_alt_hash
7998 The port list can be one to eight entries.
8002 wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
8003 priority=240 ports=80
8005 Note: the service id must have been defined by a previous
8006 'wccp2_service dynamic <id>' entry.
8011 LOC: Config.Wccp2.weight
8015 Each cache server gets assigned a set of the destination
8016 hash proportional to their weight.
8021 LOC: Config.Wccp.address
8023 DEFAULT_DOC: Address selected by the operating system.
8026 Use this option if you require WCCP(v1) to use a specific
8029 The default behavior is to not bind to any specific address.
8034 LOC: Config.Wccp2.address
8036 DEFAULT_DOC: Address selected by the operating system.
8039 Use this option if you require WCCPv2 to use a specific
8042 The default behavior is to not bind to any specific address.
8046 PERSISTENT CONNECTION HANDLING
8047 -----------------------------------------------------------------------------
8049 Also see "pconn_timeout" in the TIMEOUTS section
8052 NAME: client_persistent_connections
8054 LOC: Config.onoff.client_pconns
8057 Persistent connection support for clients.
8058 Squid uses persistent connections (when allowed). You can use
8059 this option to disable persistent connections with clients.
8062 NAME: server_persistent_connections
8064 LOC: Config.onoff.server_pconns
8067 Persistent connection support for servers.
8068 Squid uses persistent connections (when allowed). You can use
8069 this option to disable persistent connections with servers.
8072 NAME: persistent_connection_after_error
8074 LOC: Config.onoff.error_pconns
8077 With this directive the use of persistent connections after
8078 HTTP errors can be disabled. Useful if you have clients
8079 who fail to handle errors on persistent connections proper.
8082 NAME: detect_broken_pconn
8084 LOC: Config.onoff.detect_broken_server_pconns
8087 Some servers have been found to incorrectly signal the use
8088 of HTTP/1.0 persistent connections even on replies not
8089 compatible, causing significant delays. This server problem
8090 has mostly been seen on redirects.
8092 By enabling this directive Squid attempts to detect such
8093 broken replies and automatically assume the reply is finished
8094 after 10 seconds timeout.
8098 CACHE DIGEST OPTIONS
8099 -----------------------------------------------------------------------------
8102 NAME: digest_generation
8103 IFDEF: USE_CACHE_DIGESTS
8105 LOC: Config.onoff.digest_generation
8108 This controls whether the server will generate a Cache Digest
8109 of its contents. By default, Cache Digest generation is
8110 enabled if Squid is compiled with --enable-cache-digests defined.
8113 NAME: digest_bits_per_entry
8114 IFDEF: USE_CACHE_DIGESTS
8116 LOC: Config.digest.bits_per_entry
8119 This is the number of bits of the server's Cache Digest which
8120 will be associated with the Digest entry for a given HTTP
8121 Method and URL (public key) combination. The default is 5.
8124 NAME: digest_rebuild_period
8125 IFDEF: USE_CACHE_DIGESTS
8128 LOC: Config.digest.rebuild_period
8131 This is the wait time between Cache Digest rebuilds.
8134 NAME: digest_rewrite_period
8136 IFDEF: USE_CACHE_DIGESTS
8138 LOC: Config.digest.rewrite_period
8141 This is the wait time between Cache Digest writes to
8145 NAME: digest_swapout_chunk_size
8148 IFDEF: USE_CACHE_DIGESTS
8149 LOC: Config.digest.swapout_chunk_size
8152 This is the number of bytes of the Cache Digest to write to
8153 disk at a time. It defaults to 4096 bytes (4KB), the Squid
8157 NAME: digest_rebuild_chunk_percentage
8158 COMMENT: (percent, 0-100)
8159 IFDEF: USE_CACHE_DIGESTS
8161 LOC: Config.digest.rebuild_chunk_percentage
8164 This is the percentage of the Cache Digest to be scanned at a
8165 time. By default it is set to 10% of the Cache Digest.
8170 -----------------------------------------------------------------------------
8175 LOC: Config.Port.snmp
8177 DEFAULT_DOC: SNMP disabled.
8180 The port number where Squid listens for SNMP requests. To enable
8181 SNMP support set this to a suitable port number. Port number
8182 3401 is often used for the Squid SNMP agent. By default it's
8183 set to "0" (disabled)
8191 LOC: Config.accessList.snmp
8193 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
8196 Allowing or denying access to the SNMP port.
8198 All access to the agent is denied by default.
8201 snmp_access allow|deny [!]aclname ...
8203 This clause only supports fast acl types.
8204 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
8207 snmp_access allow snmppublic localhost
8208 snmp_access deny all
8211 NAME: snmp_incoming_address
8213 LOC: Config.Addrs.snmp_incoming
8215 DEFAULT_DOC: Accept SNMP packets from all machine interfaces.
8218 Just like 'udp_incoming_address', but for the SNMP port.
8220 snmp_incoming_address is used for the SNMP socket receiving
8221 messages from SNMP agents.
8223 The default snmp_incoming_address is to listen on all
8224 available network interfaces.
8227 NAME: snmp_outgoing_address
8229 LOC: Config.Addrs.snmp_outgoing
8231 DEFAULT_DOC: Use snmp_incoming_address or an address selected by the operating system.
8234 Just like 'udp_outgoing_address', but for the SNMP port.
8236 snmp_outgoing_address is used for SNMP packets returned to SNMP
8239 If snmp_outgoing_address is not set it will use the same socket
8240 as snmp_incoming_address. Only change this if you want to have
8241 SNMP replies sent using another address than where this Squid
8242 listens for SNMP queries.
8244 NOTE, snmp_incoming_address and snmp_outgoing_address can not have
8245 the same value since they both use the same port.
8250 -----------------------------------------------------------------------------
8253 NAME: icp_port udp_port
8256 DEFAULT_DOC: ICP disabled.
8257 LOC: Config.Port.icp
8259 The port number where Squid sends and receives ICP queries to
8260 and from neighbor caches. The standard UDP port for ICP is 3130.
8263 icp_port @DEFAULT_ICP_PORT@
8270 DEFAULT_DOC: HTCP disabled.
8271 LOC: Config.Port.htcp
8273 The port number where Squid sends and receives HTCP queries to
8274 and from neighbor caches. To turn it on you want to set it to
8281 NAME: log_icp_queries
8285 LOC: Config.onoff.log_udp
8287 If set, ICP queries are logged to access.log. You may wish
8288 do disable this if your ICP load is VERY high to speed things
8289 up or to simplify log analysis.
8292 NAME: udp_incoming_address
8294 LOC:Config.Addrs.udp_incoming
8296 DEFAULT_DOC: Accept packets from all machine interfaces.
8298 udp_incoming_address is used for UDP packets received from other
8301 The default behavior is to not bind to any specific address.
8303 Only change this if you want to have all UDP queries received on
8304 a specific interface/address.
8306 NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS
8307 modules. Altering it will affect all of them in the same manner.
8309 see also; udp_outgoing_address
8311 NOTE, udp_incoming_address and udp_outgoing_address can not
8312 have the same value since they both use the same port.
8315 NAME: udp_outgoing_address
8317 LOC: Config.Addrs.udp_outgoing
8319 DEFAULT_DOC: Use udp_incoming_address or an address selected by the operating system.
8321 udp_outgoing_address is used for UDP packets sent out to other
8324 The default behavior is to not bind to any specific address.
8326 Instead it will use the same socket as udp_incoming_address.
8327 Only change this if you want to have UDP queries sent using another
8328 address than where this Squid listens for UDP queries from other
8331 NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS
8332 modules. Altering it will affect all of them in the same manner.
8334 see also; udp_incoming_address
8336 NOTE, udp_incoming_address and udp_outgoing_address can not
8337 have the same value since they both use the same port.
8344 LOC: Config.onoff.icp_hit_stale
8346 If you want to return ICP_HIT for stale cache objects, set this
8347 option to 'on'. If you have sibling relationships with caches
8348 in other administrative domains, this should be 'off'. If you only
8349 have sibling relationships with caches under your control,
8350 it is probably okay to set this to 'on'.
8351 If set to 'on', your siblings should use the option "allow-miss"
8352 on their cache_peer lines for connecting to you.
8355 NAME: minimum_direct_hops
8358 LOC: Config.minDirectHops
8360 If using the ICMP pinging stuff, do direct fetches for sites
8361 which are no more than this many hops away.
8364 NAME: minimum_direct_rtt
8368 LOC: Config.minDirectRtt
8370 If using the ICMP pinging stuff, do direct fetches for sites
8371 which are no more than this many rtt milliseconds away.
8377 LOC: Config.Netdb.low
8379 The low water mark for the ICMP measurement database.
8381 Note: high watermark controlled by netdb_high directive.
8383 These watermarks are counts, not percents. The defaults are
8384 (low) 900 and (high) 1000. When the high water mark is
8385 reached, database entries will be deleted until the low
8392 LOC: Config.Netdb.high
8394 The high water mark for the ICMP measurement database.
8396 Note: low watermark controlled by netdb_low directive.
8398 These watermarks are counts, not percents. The defaults are
8399 (low) 900 and (high) 1000. When the high water mark is
8400 reached, database entries will be deleted until the low
8404 NAME: netdb_ping_period
8406 LOC: Config.Netdb.period
8409 The minimum period for measuring a site. There will be at
8410 least this much delay between successive pings to the same
8411 network. The default is five minutes.
8418 LOC: Config.onoff.query_icmp
8420 If you want to ask your peers to include ICMP data in their ICP
8421 replies, enable this option.
8423 If your peer has configured Squid (during compilation) with
8424 '--enable-icmp' that peer will send ICMP pings to origin server
8425 sites of the URLs it receives. If you enable this option the
8426 ICP replies from that peer will include the ICMP data (if available).
8427 Then, when choosing a parent cache, Squid will choose the parent with
8428 the minimal RTT to the origin server. When this happens, the
8429 hierarchy field of the access.log will be
8430 "CLOSEST_PARENT_MISS". This option is off by default.
8433 NAME: test_reachability
8437 LOC: Config.onoff.test_reachability
8439 When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
8440 instead of ICP_MISS if the target host is NOT in the ICMP
8441 database, or has a zero RTT.
8444 NAME: icp_query_timeout
8447 DEFAULT_DOC: Dynamic detection.
8449 LOC: Config.Timeout.icp_query
8451 Normally Squid will automatically determine an optimal ICP
8452 query timeout value based on the round-trip-time of recent ICP
8453 queries. If you want to override the value determined by
8454 Squid, set this 'icp_query_timeout' to a non-zero value. This
8455 value is specified in MILLISECONDS, so, to use a 2-second
8456 timeout (the old default), you would write:
8458 icp_query_timeout 2000
8461 NAME: maximum_icp_query_timeout
8465 LOC: Config.Timeout.icp_query_max
8467 Normally the ICP query timeout is determined dynamically. But
8468 sometimes it can lead to very large values (say 5 seconds).
8469 Use this option to put an upper limit on the dynamic timeout
8470 value. Do NOT use this option to always use a fixed (instead
8471 of a dynamic) timeout value. To set a fixed timeout see the
8472 'icp_query_timeout' directive.
8475 NAME: minimum_icp_query_timeout
8479 LOC: Config.Timeout.icp_query_min
8481 Normally the ICP query timeout is determined dynamically. But
8482 sometimes it can lead to very small timeouts, even lower than
8483 the normal latency variance on your link due to traffic.
8484 Use this option to put an lower limit on the dynamic timeout
8485 value. Do NOT use this option to always use a fixed (instead
8486 of a dynamic) timeout value. To set a fixed timeout see the
8487 'icp_query_timeout' directive.
8490 NAME: background_ping_rate
8494 LOC: Config.backgroundPingRate
8496 Controls how often the ICP pings are sent to siblings that
8497 have background-ping set.
8501 MULTICAST ICP OPTIONS
8502 -----------------------------------------------------------------------------
8507 LOC: Config.mcast_group_list
8510 This tag specifies a list of multicast groups which your server
8511 should join to receive multicasted ICP queries.
8513 NOTE! Be very careful what you put here! Be sure you
8514 understand the difference between an ICP _query_ and an ICP
8515 _reply_. This option is to be set only if you want to RECEIVE
8516 multicast queries. Do NOT set this option to SEND multicast
8517 ICP (use cache_peer for that). ICP replies are always sent via
8518 unicast, so this option does not affect whether or not you will
8519 receive replies from multicast group members.
8521 You must be very careful to NOT use a multicast address which
8522 is already in use by another group of caches.
8524 If you are unsure about multicast, please read the Multicast
8525 chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
8527 Usage: mcast_groups 239.128.16.128 224.0.1.20
8529 By default, Squid doesn't listen on any multicast groups.
8532 NAME: mcast_miss_addr
8533 IFDEF: MULTICAST_MISS_STREAM
8535 LOC: Config.mcast_miss.addr
8537 DEFAULT_DOC: disabled.
8539 If you enable this option, every "cache miss" URL will
8540 be sent out on the specified multicast address.
8542 Do not enable this option unless you are are absolutely
8543 certain you understand what you are doing.
8546 NAME: mcast_miss_ttl
8547 IFDEF: MULTICAST_MISS_STREAM
8549 LOC: Config.mcast_miss.ttl
8552 This is the time-to-live value for packets multicasted
8553 when multicasting off cache miss URLs is enabled. By
8554 default this is set to 'site scope', i.e. 16.
8557 NAME: mcast_miss_port
8558 IFDEF: MULTICAST_MISS_STREAM
8560 LOC: Config.mcast_miss.port
8563 This is the port number to be used in conjunction with
8567 NAME: mcast_miss_encode_key
8568 IFDEF: MULTICAST_MISS_STREAM
8570 LOC: Config.mcast_miss.encode_key
8571 DEFAULT: XXXXXXXXXXXXXXXX
8573 The URLs that are sent in the multicast miss stream are
8574 encrypted. This is the encryption key.
8577 NAME: mcast_icp_query_timeout
8581 LOC: Config.Timeout.mcast_icp_query
8583 For multicast peers, Squid regularly sends out ICP "probes" to
8584 count how many other peers are listening on the given multicast
8585 address. This value specifies how long Squid should wait to
8586 count all the replies. The default is 2000 msec, or 2
8591 INTERNAL ICON OPTIONS
8592 -----------------------------------------------------------------------------
8595 NAME: icon_directory
8597 LOC: Config.icons.directory
8598 DEFAULT: @DEFAULT_ICON_DIR@
8600 Where the icons are stored. These are normally kept in
8604 NAME: global_internal_static
8606 LOC: Config.onoff.global_internal_static
8609 This directive controls is Squid should intercept all requests for
8610 /squid-internal-static/ no matter which host the URL is requesting
8611 (default on setting), or if nothing special should be done for
8612 such URLs (off setting). The purpose of this directive is to make
8613 icons etc work better in complex cache hierarchies where it may
8614 not always be possible for all corners in the cache mesh to reach
8615 the server generating a directory listing.
8618 NAME: short_icon_urls
8620 LOC: Config.icons.use_short_names
8623 If this is enabled Squid will use short URLs for icons.
8624 If disabled it will revert to the old behavior of including
8625 it's own name and port in the URL.
8627 If you run a complex cache hierarchy with a mix of Squid and
8628 other proxies you may need to disable this directive.
8633 -----------------------------------------------------------------------------
8636 NAME: error_directory
8638 LOC: Config.errorDirectory
8640 DEFAULT_DOC: Send error pages in the clients preferred language
8642 If you wish to create your own versions of the default
8643 error files to customize them to suit your company copy
8644 the error/template files to another directory and point
8647 WARNING: This option will disable multi-language support
8648 on error pages if used.
8650 The squid developers are interested in making squid available in
8651 a wide variety of languages. If you are making translations for a
8652 language that Squid does not currently provide please consider
8653 contributing your translation back to the project.
8654 http://wiki.squid-cache.org/Translations
8656 The squid developers working on translations are happy to supply drop-in
8657 translated error files in exchange for any new language contributions.
8660 NAME: error_default_language
8661 IFDEF: USE_ERR_LOCALES
8663 LOC: Config.errorDefaultLanguage
8665 DEFAULT_DOC: Generate English language pages.
8667 Set the default language which squid will send error pages in
8668 if no existing translation matches the clients language
8671 If unset (default) generic English will be used.
8673 The squid developers are interested in making squid available in
8674 a wide variety of languages. If you are interested in making
8675 translations for any language see the squid wiki for details.
8676 http://wiki.squid-cache.org/Translations
8679 NAME: error_log_languages
8680 IFDEF: USE_ERR_LOCALES
8682 LOC: Config.errorLogMissingLanguages
8685 Log to cache.log what languages users are attempting to
8686 auto-negotiate for translations.
8688 Successful negotiations are not logged. Only failures
8689 have meaning to indicate that Squid may need an upgrade
8690 of its error page translations.
8693 NAME: err_page_stylesheet
8695 LOC: Config.errorStylesheet
8696 DEFAULT: @DEFAULT_CONFIG_DIR@/errorpage.css
8698 CSS Stylesheet to pattern the display of Squid default error pages.
8700 For information on CSS see http://www.w3.org/Style/CSS/
8705 LOC: Config.errHtmlText
8708 HTML text to include in error messages. Make this a "mailto"
8709 URL to your admin address, or maybe just a link to your
8710 organizations Web page.
8712 To include this in your error messages, you must rewrite
8713 the error template files (found in the "errors" directory).
8714 Wherever you want the 'err_html_text' line to appear,
8715 insert a %L tag in the error template file.
8718 NAME: email_err_data
8721 LOC: Config.onoff.emailErrData
8724 If enabled, information about the occurred error will be
8725 included in the mailto links of the ERR pages (if %W is set)
8726 so that the email body contains the data.
8727 Syntax is <A HREF="mailto:%w%W">%w</A>
8732 LOC: Config.denyInfoList
8735 Usage: deny_info err_page_name acl
8736 or deny_info http://... acl
8737 or deny_info TCP_RESET acl
8739 This can be used to return a ERR_ page for requests which
8740 do not pass the 'http_access' rules. Squid remembers the last
8741 acl it evaluated in http_access, and if a 'deny_info' line exists
8742 for that ACL Squid returns a corresponding error page.
8744 The acl is typically the last acl on the http_access deny line which
8745 denied access. The exceptions to this rule are:
8746 - When Squid needs to request authentication credentials. It's then
8747 the first authentication related acl encountered
8748 - When none of the http_access lines matches. It's then the last
8749 acl processed on the last http_access line.
8750 - When the decision to deny access was made by an adaptation service,
8751 the acl name is the corresponding eCAP or ICAP service_name.
8753 NP: If providing your own custom error pages with error_directory
8754 you may also specify them by your custom file name:
8755 Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
8757 By default Squid will send "403 Forbidden". A different 4xx or 5xx
8758 may be specified by prefixing the file name with the code and a colon.
8759 e.g. 404:ERR_CUSTOM_ACCESS_DENIED
8761 Alternatively you can tell Squid to reset the TCP connection
8762 by specifying TCP_RESET.
8764 Or you can specify an error URL or URL pattern. The browsers will
8765 get redirected to the specified URL after formatting tags have
8766 been replaced. Redirect will be done with 302 or 307 according to
8767 HTTP/1.1 specs. A different 3xx code may be specified by prefixing
8768 the URL. e.g. 303:http://example.com/
8771 %a - username (if available. Password NOT included)
8772 %A - Local listening IP address the client connection was connected to
8775 %E - Error description
8777 %H - Request domain name
8778 %i - Client IP Address
8780 %O - Unescaped message result from external ACL helper
8781 %o - Message result from external ACL helper
8782 %p - Request Port number
8783 %P - Request Protocol name
8784 %R - Request URL path
8785 %T - Timestamp in RFC 1123 format
8786 %U - Full canonical URL from client
8787 (HTTPS URLs terminate with *)
8788 %u - Full canonical URL from client
8789 %w - Admin email from squid.conf
8791 %% - Literal percent (%) code
8796 OPTIONS INFLUENCING REQUEST FORWARDING
8797 -----------------------------------------------------------------------------
8800 NAME: nonhierarchical_direct
8802 LOC: Config.onoff.nonhierarchical_direct
8805 By default, Squid will send any non-hierarchical requests
8806 (not cacheable request type) direct to origin servers.
8808 When this is set to "off", Squid will prefer to send these
8809 requests to parents.
8811 Note that in most configurations, by turning this off you will only
8812 add latency to these request without any improvement in global hit
8815 This option only sets a preference. If the parent is unavailable a
8816 direct connection to the origin server may still be attempted. To
8817 completely prevent direct connections use never_direct.
8822 LOC: Config.onoff.prefer_direct
8825 Normally Squid tries to use parents for most requests. If you for some
8826 reason like it to first try going direct and only use a parent if
8827 going direct fails set this to on.
8829 By combining nonhierarchical_direct off and prefer_direct on you
8830 can set up Squid to use a parent as a backup path if going direct
8833 Note: If you want Squid to use parents for all requests see
8834 the never_direct directive. prefer_direct only modifies how Squid
8835 acts on cacheable requests.
8838 NAME: cache_miss_revalidate
8842 LOC: Config.onoff.cache_miss_revalidate
8844 RFC 7232 defines a conditional request mechanism to prevent
8845 response objects being unnecessarily transferred over the network.
8846 If that mechanism is used by the client and a cache MISS occurs
8847 it can prevent new cache entries being created.
8849 This option determines whether Squid on cache MISS will pass the
8850 client revalidation request to the server or tries to fetch new
8851 content for caching. It can be useful while the cache is mostly
8852 empty to more quickly have the cache populated by generating
8853 non-conditional GETs.
8855 When set to 'on' (default), Squid will pass all client If-* headers
8856 to the server. This permits server responses without a cacheable
8857 payload to be delivered and on MISS no new cache entry is created.
8859 When set to 'off' and if the request is cacheable, Squid will
8860 remove the clients If-Modified-Since and If-None-Match headers from
8861 the request sent to the server. This requests a 200 status response
8862 from the server to create a new cache entry with.
8867 LOC: Config.accessList.AlwaysDirect
8869 DEFAULT_DOC: Prevent any cache_peer being used for this request.
8871 Usage: always_direct allow|deny [!]aclname ...
8873 Here you can use ACL elements to specify requests which should
8874 ALWAYS be forwarded by Squid to the origin servers without using
8875 any peers. For example, to always directly forward requests for
8876 local servers ignoring any parents or siblings you may have use
8879 acl local-servers dstdomain my.domain.net
8880 always_direct allow local-servers
8882 To always forward FTP requests directly, use
8885 always_direct allow FTP
8887 NOTE: There is a similar, but opposite option named
8888 'never_direct'. You need to be aware that "always_direct deny
8889 foo" is NOT the same thing as "never_direct allow foo". You
8890 may need to use a deny rule to exclude a more-specific case of
8891 some other rule. Example:
8893 acl local-external dstdomain external.foo.net
8894 acl local-servers dstdomain .foo.net
8895 always_direct deny local-external
8896 always_direct allow local-servers
8898 NOTE: If your goal is to make the client forward the request
8899 directly to the origin server bypassing Squid then this needs
8900 to be done in the client configuration. Squid configuration
8901 can only tell Squid how Squid should fetch the object.
8903 NOTE: This directive is not related to caching. The replies
8904 is cached as usual even if you use always_direct. To not cache
8905 the replies see the 'cache' directive.
8907 This clause supports both fast and slow acl types.
8908 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
8913 LOC: Config.accessList.NeverDirect
8915 DEFAULT_DOC: Allow DNS results to be used for this request.
8917 Usage: never_direct allow|deny [!]aclname ...
8919 never_direct is the opposite of always_direct. Please read
8920 the description for always_direct if you have not already.
8922 With 'never_direct' you can use ACL elements to specify
8923 requests which should NEVER be forwarded directly to origin
8924 servers. For example, to force the use of a proxy for all
8925 requests, except those in your local domain use something like:
8927 acl local-servers dstdomain .foo.net
8928 never_direct deny local-servers
8929 never_direct allow all
8931 or if Squid is inside a firewall and there are local intranet
8932 servers inside the firewall use something like:
8934 acl local-intranet dstdomain .foo.net
8935 acl local-external dstdomain external.foo.net
8936 always_direct deny local-external
8937 always_direct allow local-intranet
8938 never_direct allow all
8940 This clause supports both fast and slow acl types.
8941 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
8945 ADVANCED NETWORKING OPTIONS
8946 -----------------------------------------------------------------------------
8949 NAME: incoming_udp_average incoming_icp_average
8952 LOC: Config.comm_incoming.udp.average
8954 Heavy voodoo here. I can't even believe you are reading this.
8955 Are you crazy? Don't even think about adjusting these unless
8956 you understand the algorithms in comm_select.c first!
8959 NAME: incoming_tcp_average incoming_http_average
8962 LOC: Config.comm_incoming.tcp.average
8964 Heavy voodoo here. I can't even believe you are reading this.
8965 Are you crazy? Don't even think about adjusting these unless
8966 you understand the algorithms in comm_select.c first!
8969 NAME: incoming_dns_average
8972 LOC: Config.comm_incoming.dns.average
8974 Heavy voodoo here. I can't even believe you are reading this.
8975 Are you crazy? Don't even think about adjusting these unless
8976 you understand the algorithms in comm_select.c first!
8979 NAME: min_udp_poll_cnt min_icp_poll_cnt
8982 LOC: Config.comm_incoming.udp.min_poll
8984 Heavy voodoo here. I can't even believe you are reading this.
8985 Are you crazy? Don't even think about adjusting these unless
8986 you understand the algorithms in comm_select.c first!
8989 NAME: min_dns_poll_cnt
8992 LOC: Config.comm_incoming.dns.min_poll
8994 Heavy voodoo here. I can't even believe you are reading this.
8995 Are you crazy? Don't even think about adjusting these unless
8996 you understand the algorithms in comm_select.c first!
8999 NAME: min_tcp_poll_cnt min_http_poll_cnt
9002 LOC: Config.comm_incoming.tcp.min_poll
9004 Heavy voodoo here. I can't even believe you are reading this.
9005 Are you crazy? Don't even think about adjusting these unless
9006 you understand the algorithms in comm_select.c first!
9012 LOC: Config.accept_filter
9016 The name of an accept(2) filter to install on Squid's
9017 listen socket(s). This feature is perhaps specific to
9018 FreeBSD and requires support in the kernel.
9020 The 'httpready' filter delays delivering new connections
9021 to Squid until a full HTTP request has been received.
9022 See the accf_http(9) man page for details.
9024 The 'dataready' filter delays delivering new connections
9025 to Squid until there is some data to process.
9026 See the accf_dataready(9) man page for details.
9030 The 'data' filter delays delivering of new connections
9031 to Squid until there is some data to process by TCP_ACCEPT_DEFER.
9032 You may optionally specify a number of seconds to wait by
9033 'data=N' where N is the number of seconds. Defaults to 30
9034 if not specified. See the tcp(7) man page for details.
9037 accept_filter httpready
9042 NAME: client_ip_max_connections
9044 LOC: Config.client_ip_max_connections
9046 DEFAULT_DOC: No limit.
9048 Set an absolute limit on the number of connections a single
9049 client IP can use. Any more than this and Squid will begin to drop
9050 new connections from the client until it closes some links.
9052 Note that this is a global limit. It affects all HTTP, HTCP, Gopher and FTP
9053 connections from the client. For finer control use the ACL access controls.
9055 Requires client_db to be enabled (the default).
9057 WARNING: This may noticeably slow down traffic received via external proxies
9058 or NAT devices and cause them to rebound error messages back to their clients.
9061 NAME: tcp_recv_bufsize
9065 DEFAULT_DOC: Use operating system TCP defaults.
9066 LOC: Config.tcpRcvBufsz
9068 Size of receive buffer to set for TCP sockets. Probably just
9069 as easy to change your kernel's default.
9070 Omit from squid.conf to use the default buffer size.
9075 -----------------------------------------------------------------------------
9082 LOC: Adaptation::Icap::TheConfig.onoff
9085 If you want to enable the ICAP module support, set this to on.
9088 NAME: icap_connect_timeout
9091 LOC: Adaptation::Icap::TheConfig.connect_timeout_raw
9094 This parameter specifies how long to wait for the TCP connect to
9095 the requested ICAP server to complete before giving up and either
9096 terminating the HTTP transaction or bypassing the failure.
9098 The default for optional services is peer_connect_timeout.
9099 The default for essential services is connect_timeout.
9100 If this option is explicitly set, its value applies to all services.
9103 NAME: icap_io_timeout
9107 DEFAULT_DOC: Use read_timeout.
9108 LOC: Adaptation::Icap::TheConfig.io_timeout_raw
9111 This parameter specifies how long to wait for an I/O activity on
9112 an established, active ICAP connection before giving up and
9113 either terminating the HTTP transaction or bypassing the
9117 NAME: icap_service_failure_limit
9118 COMMENT: limit [in memory-depth time-units]
9119 TYPE: icap_service_failure_limit
9121 LOC: Adaptation::Icap::TheConfig
9124 The limit specifies the number of failures that Squid tolerates
9125 when establishing a new TCP connection with an ICAP service. If
9126 the number of failures exceeds the limit, the ICAP service is
9127 not used for new ICAP requests until it is time to refresh its
9130 A negative value disables the limit. Without the limit, an ICAP
9131 service will not be considered down due to connectivity failures
9132 between ICAP OPTIONS requests.
9134 Squid forgets ICAP service failures older than the specified
9135 value of memory-depth. The memory fading algorithm
9136 is approximate because Squid does not remember individual
9137 errors but groups them instead, splitting the option
9138 value into ten time slots of equal length.
9140 When memory-depth is 0 and by default this option has no
9141 effect on service failure expiration.
9143 Squid always forgets failures when updating service settings
9144 using an ICAP OPTIONS transaction, regardless of this option
9148 # suspend service usage after 10 failures in 5 seconds:
9149 icap_service_failure_limit 10 in 5 seconds
9152 NAME: icap_service_revival_delay
9155 LOC: Adaptation::Icap::TheConfig.service_revival_delay
9158 The delay specifies the number of seconds to wait after an ICAP
9159 OPTIONS request failure before requesting the options again. The
9160 failed ICAP service is considered "down" until fresh OPTIONS are
9163 The actual delay cannot be smaller than the hardcoded minimum
9164 delay of 30 seconds.
9167 NAME: icap_preview_enable
9171 LOC: Adaptation::Icap::TheConfig.preview_enable
9174 The ICAP Preview feature allows the ICAP server to handle the
9175 HTTP message by looking only at the beginning of the message body
9176 or even without receiving the body at all. In some environments,
9177 previews greatly speedup ICAP processing.
9179 During an ICAP OPTIONS transaction, the server may tell Squid what
9180 HTTP messages should be previewed and how big the preview should be.
9181 Squid will not use Preview if the server did not request one.
9183 To disable ICAP Preview for all ICAP services, regardless of
9184 individual ICAP server OPTIONS responses, set this option to "off".
9186 icap_preview_enable off
9189 NAME: icap_preview_size
9192 LOC: Adaptation::Icap::TheConfig.preview_size
9194 DEFAULT_DOC: No preview sent.
9196 The default size of preview data to be sent to the ICAP server.
9197 This value might be overwritten on a per server basis by OPTIONS requests.
9200 NAME: icap_206_enable
9204 LOC: Adaptation::Icap::TheConfig.allow206_enable
9207 206 (Partial Content) responses is an ICAP extension that allows the
9208 ICAP agents to optionally combine adapted and original HTTP message
9209 content. The decision to combine is postponed until the end of the
9210 ICAP response. Squid supports Partial Content extension by default.
9212 Activation of the Partial Content extension is negotiated with each
9213 ICAP service during OPTIONS exchange. Most ICAP servers should handle
9214 negotiation correctly even if they do not support the extension, but
9215 some might fail. To disable Partial Content support for all ICAP
9216 services and to avoid any negotiation, set this option to "off".
9222 NAME: icap_default_options_ttl
9225 LOC: Adaptation::Icap::TheConfig.default_options_ttl
9228 The default TTL value for ICAP OPTIONS responses that don't have
9229 an Options-TTL header.
9232 NAME: icap_persistent_connections
9236 LOC: Adaptation::Icap::TheConfig.reuse_connections
9239 Whether or not Squid should use persistent connections to
9243 NAME: adaptation_send_client_ip icap_send_client_ip
9245 IFDEF: USE_ADAPTATION
9247 LOC: Adaptation::Config::send_client_ip
9250 If enabled, Squid shares HTTP client IP information with adaptation
9251 services. For ICAP, Squid adds the X-Client-IP header to ICAP requests.
9252 For eCAP, Squid sets the libecap::metaClientIp transaction option.
9254 See also: adaptation_uses_indirect_client
9257 NAME: adaptation_send_username icap_send_client_username
9259 IFDEF: USE_ADAPTATION
9261 LOC: Adaptation::Config::send_username
9264 This sends authenticated HTTP client username (if available) to
9265 the adaptation service.
9267 For ICAP, the username value is encoded based on the
9268 icap_client_username_encode option and is sent using the header
9269 specified by the icap_client_username_header option.
9272 NAME: icap_client_username_header
9275 LOC: Adaptation::Icap::TheConfig.client_username_header
9276 DEFAULT: X-Client-Username
9278 ICAP request header name to use for adaptation_send_username.
9281 NAME: icap_client_username_encode
9285 LOC: Adaptation::Icap::TheConfig.client_username_encode
9288 Whether to base64 encode the authenticated client username.
9292 TYPE: icap_service_type
9294 LOC: Adaptation::Icap::TheConfig
9297 Defines a single ICAP service using the following format:
9299 icap_service id vectoring_point uri [option ...]
9302 an opaque identifier or name which is used to direct traffic to
9303 this specific service. Must be unique among all adaptation
9304 services in squid.conf.
9306 vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
9307 This specifies at which point of transaction processing the
9308 ICAP service should be activated. *_postcache vectoring points
9309 are not yet supported.
9311 uri: icap://servername:port/servicepath
9312 ICAP server and service location.
9313 icaps://servername:port/servicepath
9314 The "icap:" URI scheme is used for traditional ICAP server and
9315 service location (default port is 1344, connections are not
9316 encrypted). The "icaps:" URI scheme is for Secure ICAP
9317 services that use SSL/TLS-encrypted ICAP connections (by
9318 default, on port 11344).
9320 ICAP does not allow a single service to handle both REQMOD and RESPMOD
9321 transactions. Squid does not enforce that requirement. You can specify
9322 services with the same service_url and different vectoring_points. You
9323 can even specify multiple identical services as long as their
9324 service_names differ.
9326 To activate a service, use the adaptation_access directive. To group
9327 services, use adaptation_service_chain and adaptation_service_set.
9329 Service options are separated by white space. ICAP services support
9330 the following name=value options:
9333 If set to 'on' or '1', the ICAP service is treated as
9334 optional. If the service cannot be reached or malfunctions,
9335 Squid will try to ignore any errors and process the message as
9336 if the service was not enabled. No all ICAP errors can be
9337 bypassed. If set to 0, the ICAP service is treated as
9338 essential and all ICAP errors will result in an error page
9339 returned to the HTTP client.
9341 Bypass is off by default: services are treated as essential.
9344 If set to 'on' or '1', the ICAP service is allowed to
9345 dynamically change the current message adaptation plan by
9346 returning a chain of services to be used next. The services
9347 are specified using the X-Next-Services ICAP response header
9348 value, formatted as a comma-separated list of service names.
9349 Each named service should be configured in squid.conf. Other
9350 services are ignored. An empty X-Next-Services value results
9351 in an empty plan which ends the current adaptation.
9353 Dynamic adaptation plan may cross or cover multiple supported
9354 vectoring points in their natural processing order.
9356 Routing is not allowed by default: the ICAP X-Next-Services
9357 response header is ignored.
9360 Only has effect on split-stack systems. The default on those systems
9361 is to use IPv4-only connections. When set to 'on' this option will
9362 make Squid use IPv6-only connections to contact this ICAP service.
9364 on-overload=block|bypass|wait|force
9365 If the service Max-Connections limit has been reached, do
9366 one of the following for each new ICAP transaction:
9367 * block: send an HTTP error response to the client
9368 * bypass: ignore the "over-connected" ICAP service
9369 * wait: wait (in a FIFO queue) for an ICAP connection slot
9370 * force: proceed, ignoring the Max-Connections limit
9372 In SMP mode with N workers, each worker assumes the service
9373 connection limit is Max-Connections/N, even though not all
9374 workers may use a given service.
9376 The default value is "bypass" if service is bypassable,
9377 otherwise it is set to "wait".
9381 Use the given number as the Max-Connections limit, regardless
9382 of the Max-Connections value given by the service, if any.
9384 connection-encryption=on|off
9385 Determines the ICAP service effect on the connections_encrypted
9388 The default is "on" for Secure ICAP services (i.e., those
9389 with the icaps:// service URIs scheme) and "off" for plain ICAP
9392 Does not affect ICAP connections (e.g., does not turn Secure
9395 ==== ICAPS / TLS OPTIONS ====
9397 These options are used for Secure ICAP (icaps://....) services only.
9399 tls-cert=/path/to/ssl/certificate
9400 A client X.509 certificate to use when connecting to
9403 tls-key=/path/to/ssl/key
9404 The private key corresponding to the previous
9407 If tls-key= is not specified tls-cert= is assumed to
9408 reference a PEM file containing both the certificate
9411 tls-cipher=... The list of valid TLS/SSL ciphers to use when connecting
9412 to this icap server.
9415 The minimum TLS protocol version to permit. To control
9416 SSLv3 use the tls-options= parameter.
9417 Supported Values: 1.0 (default), 1.1, 1.2
9419 tls-options=... Specify various OpenSSL library options:
9421 NO_SSLv3 Disallow the use of SSLv3
9424 Always create a new key when using
9425 temporary/ephemeral DH key exchanges
9427 ALL Enable various bug workarounds
9428 suggested as "harmless" by OpenSSL
9429 Be warned that this reduces SSL/TLS
9430 strength to some attacks.
9432 See the OpenSSL SSL_CTX_set_options documentation for a
9433 more complete list. Options relevant only to SSLv2 are
9436 tls-cafile= PEM file containing CA certificates to use when verifying
9437 the icap server certificate.
9438 Use to specify intermediate CA certificate(s) if not sent
9439 by the server. Or the full CA chain for the server when
9440 using the tls-default-ca=off flag.
9441 May be repeated to load multiple files.
9443 tls-capath=... A directory containing additional CA certificates to
9444 use when verifying the icap server certificate.
9445 Requires OpenSSL or LibreSSL.
9447 tls-crlfile=... A certificate revocation list file to use when
9448 verifying the icap server certificate.
9450 tls-flags=... Specify various flags modifying the Squid TLS implementation:
9453 Accept certificates even if they fail to
9456 Don't verify the icap server certificate
9457 matches the server name
9459 tls-default-ca[=off]
9460 Whether to use the system Trusted CAs. Default is ON.
9462 tls-domain= The icap server name as advertised in it's certificate.
9463 Used for verifying the correctness of the received icap
9464 server certificate. If not specified the icap server
9465 hostname extracted from ICAP URI will be used.
9467 Older icap_service format without optional named parameters is
9468 deprecated but supported for backward compatibility.
9471 icap_service svcBlocker reqmod_precache icap://icap1.mydomain.net:1344/reqmod bypass=0
9472 icap_service svcLogger reqmod_precache icaps://icap2.mydomain.net:11344/reqmod routing=on
9476 TYPE: icap_class_type
9481 This deprecated option was documented to define an ICAP service
9482 chain, even though it actually defined a set of similar, redundant
9483 services, and the chains were not supported.
9485 To define a set of redundant services, please use the
9486 adaptation_service_set directive. For service chains, use
9487 adaptation_service_chain.
9491 TYPE: icap_access_type
9496 This option is deprecated. Please use adaptation_access, which
9497 has the same ICAP functionality, but comes with better
9498 documentation, and eCAP support.
9503 -----------------------------------------------------------------------------
9510 LOC: Adaptation::Ecap::TheConfig.onoff
9513 Controls whether eCAP support is enabled.
9517 TYPE: ecap_service_type
9519 LOC: Adaptation::Ecap::TheConfig
9522 Defines a single eCAP service
9524 ecap_service id vectoring_point uri [option ...]
9527 an opaque identifier or name which is used to direct traffic to
9528 this specific service. Must be unique among all adaptation
9529 services in squid.conf.
9531 vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
9532 This specifies at which point of transaction processing the
9533 eCAP service should be activated. *_postcache vectoring points
9534 are not yet supported.
9536 uri: ecap://vendor/service_name?custom&cgi=style¶meters=optional
9537 Squid uses the eCAP service URI to match this configuration
9538 line with one of the dynamically loaded services. Each loaded
9539 eCAP service must have a unique URI. Obtain the right URI from
9540 the service provider.
9542 To activate a service, use the adaptation_access directive. To group
9543 services, use adaptation_service_chain and adaptation_service_set.
9545 Service options are separated by white space. eCAP services support
9546 the following name=value options:
9549 If set to 'on' or '1', the eCAP service is treated as optional.
9550 If the service cannot be reached or malfunctions, Squid will try
9551 to ignore any errors and process the message as if the service
9552 was not enabled. No all eCAP errors can be bypassed.
9553 If set to 'off' or '0', the eCAP service is treated as essential
9554 and all eCAP errors will result in an error page returned to the
9557 Bypass is off by default: services are treated as essential.
9560 If set to 'on' or '1', the eCAP service is allowed to
9561 dynamically change the current message adaptation plan by
9562 returning a chain of services to be used next.
9564 Dynamic adaptation plan may cross or cover multiple supported
9565 vectoring points in their natural processing order.
9567 Routing is not allowed by default.
9569 connection-encryption=on|off
9570 Determines the eCAP service effect on the connections_encrypted
9573 Defaults to "on", which does not taint the master transaction
9576 Does not affect eCAP API calls.
9578 Older ecap_service format without optional named parameters is
9579 deprecated but supported for backward compatibility.
9583 ecap_service s1 reqmod_precache ecap://filters.R.us/leakDetector?on_error=block bypass=off
9584 ecap_service s2 respmod_precache ecap://filters.R.us/virusFilter config=/etc/vf.cfg bypass=on
9587 NAME: loadable_modules
9589 IFDEF: USE_LOADABLE_MODULES
9590 LOC: Config.loadable_module_names
9593 Instructs Squid to load the specified dynamic module(s) or activate
9594 preloaded module(s).
9596 loadable_modules @DEFAULT_PREFIX@/lib/MinimalAdapter.so
9600 MESSAGE ADAPTATION OPTIONS
9601 -----------------------------------------------------------------------------
9604 NAME: adaptation_service_set
9605 TYPE: adaptation_service_set_type
9606 IFDEF: USE_ADAPTATION
9611 Configures an ordered set of similar, redundant services. This is
9612 useful when hot standby or backup adaptation servers are available.
9614 adaptation_service_set set_name service_name1 service_name2 ...
9616 The named services are used in the set declaration order. The first
9617 applicable adaptation service from the set is used first. The next
9618 applicable service is tried if and only if the transaction with the
9619 previous service fails and the message waiting to be adapted is still
9622 When adaptation starts, broken services are ignored as if they were
9623 not a part of the set. A broken service is a down optional service.
9625 The services in a set must be attached to the same vectoring point
9626 (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
9628 If all services in a set are optional then adaptation failures are
9629 bypassable. If all services in the set are essential, then a
9630 transaction failure with one service may still be retried using
9631 another service from the set, but when all services fail, the master
9632 transaction fails as well.
9634 A set may contain a mix of optional and essential services, but that
9635 is likely to lead to surprising results because broken services become
9636 ignored (see above), making previously bypassable failures fatal.
9637 Technically, it is the bypassability of the last failed service that
9640 See also: adaptation_access adaptation_service_chain
9643 adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup
9644 adaptation service_set svcLogger loggerLocal loggerRemote
9647 NAME: adaptation_service_chain
9648 TYPE: adaptation_service_chain_type
9649 IFDEF: USE_ADAPTATION
9654 Configures a list of complementary services that will be applied
9655 one-by-one, forming an adaptation chain or pipeline. This is useful
9656 when Squid must perform different adaptations on the same message.
9658 adaptation_service_chain chain_name service_name1 svc_name2 ...
9660 The named services are used in the chain declaration order. The first
9661 applicable adaptation service from the chain is used first. The next
9662 applicable service is applied to the successful adaptation results of
9663 the previous service in the chain.
9665 When adaptation starts, broken services are ignored as if they were
9666 not a part of the chain. A broken service is a down optional service.
9668 Request satisfaction terminates the adaptation chain because Squid
9669 does not currently allow declaration of RESPMOD services at the
9670 "reqmod_precache" vectoring point (see icap_service or ecap_service).
9672 The services in a chain must be attached to the same vectoring point
9673 (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
9675 A chain may contain a mix of optional and essential services. If an
9676 essential adaptation fails (or the failure cannot be bypassed for
9677 other reasons), the master transaction fails. Otherwise, the failure
9678 is bypassed as if the failed adaptation service was not in the chain.
9680 See also: adaptation_access adaptation_service_set
9683 adaptation_service_chain svcRequest requestLogger urlFilter leakDetector
9686 NAME: adaptation_access
9687 TYPE: adaptation_access_type
9688 IFDEF: USE_ADAPTATION
9691 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
9693 Sends an HTTP transaction to an ICAP or eCAP adaptation service.
9695 adaptation_access service_name allow|deny [!]aclname...
9696 adaptation_access set_name allow|deny [!]aclname...
9698 At each supported vectoring point, the adaptation_access
9699 statements are processed in the order they appear in this
9700 configuration file. Statements pointing to the following services
9701 are ignored (i.e., skipped without checking their ACL):
9703 - services serving different vectoring points
9704 - "broken-but-bypassable" services
9705 - "up" services configured to ignore such transactions
9706 (e.g., based on the ICAP Transfer-Ignore header).
9708 When a set_name is used, all services in the set are checked
9709 using the same rules, to find the first applicable one. See
9710 adaptation_service_set for details.
9712 If an access list is checked and there is a match, the
9713 processing stops: For an "allow" rule, the corresponding
9714 adaptation service is used for the transaction. For a "deny"
9715 rule, no adaptation service is activated.
9717 It is currently not possible to apply more than one adaptation
9718 service at the same vectoring point to the same HTTP transaction.
9720 See also: icap_service and ecap_service
9723 adaptation_access service_1 allow all
9726 NAME: adaptation_service_iteration_limit
9728 IFDEF: USE_ADAPTATION
9729 LOC: Adaptation::Config::service_iteration_limit
9732 Limits the number of iterations allowed when applying adaptation
9733 services to a message. If your longest adaptation set or chain
9734 may have more than 16 services, increase the limit beyond its
9735 default value of 16. If detecting infinite iteration loops sooner
9736 is critical, make the iteration limit match the actual number
9737 of services in your longest adaptation set or chain.
9739 Infinite adaptation loops are most likely with routing services.
9741 See also: icap_service routing=1
9744 NAME: adaptation_masterx_shared_names
9746 IFDEF: USE_ADAPTATION
9747 LOC: Adaptation::Config::masterx_shared_name
9750 For each master transaction (i.e., the HTTP request and response
9751 sequence, including all related ICAP and eCAP exchanges), Squid
9752 maintains a table of metadata. The table entries are (name, value)
9753 pairs shared among eCAP and ICAP exchanges. The table is destroyed
9754 with the master transaction.
9756 This option specifies the table entry names that Squid must accept
9757 from and forward to the adaptation transactions.
9759 An ICAP REQMOD or RESPMOD transaction may set an entry in the
9760 shared table by returning an ICAP header field with a name
9761 specified in adaptation_masterx_shared_names.
9763 An eCAP REQMOD or RESPMOD transaction may set an entry in the
9764 shared table by implementing the libecap::visitEachOption() API
9765 to provide an option with a name specified in
9766 adaptation_masterx_shared_names.
9768 Squid will store and forward the set entry to subsequent adaptation
9769 transactions within the same master transaction scope.
9771 Only one shared entry name is supported at this time.
9774 # share authentication information among ICAP services
9775 adaptation_masterx_shared_names X-Subscriber-ID
9778 NAME: adaptation_meta
9780 IFDEF: USE_ADAPTATION
9781 LOC: Adaptation::Config::metaHeaders
9784 This option allows Squid administrator to add custom ICAP request
9785 headers or eCAP options to Squid ICAP requests or eCAP transactions.
9786 Use it to pass custom authentication tokens and other
9787 transaction-state related meta information to an ICAP/eCAP service.
9789 The addition of a meta header is ACL-driven:
9790 adaptation_meta name value [!]aclname ...
9792 Processing for a given header name stops after the first ACL list match.
9793 Thus, it is impossible to add two headers with the same name. If no ACL
9794 lists match for a given header name, no such header is added. For
9797 # do not debug transactions except for those that need debugging
9798 adaptation_meta X-Debug 1 needs_debugging
9800 # log all transactions except for those that must remain secret
9801 adaptation_meta X-Log 1 !keep_secret
9803 # mark transactions from users in the "G 1" group
9804 adaptation_meta X-Authenticated-Groups "G 1" authed_as_G1
9806 The "value" parameter may be a regular squid.conf token or a "double
9807 quoted string". Within the quoted string, use backslash (\) to escape
9808 any character, which is currently only useful for escaping backslashes
9809 and double quotes. For example,
9810 "this string has one backslash (\\) and two \"quotes\""
9812 Used adaptation_meta header values may be logged via %note
9813 logformat code. If multiple adaptation_meta headers with the same name
9814 are used during master transaction lifetime, the header values are
9815 logged in the order they were used and duplicate values are ignored
9816 (only the first repeated value will be logged).
9822 LOC: Adaptation::Icap::TheConfig.repeat
9823 DEFAULT_IF_NONE: deny all
9825 This ACL determines which retriable ICAP transactions are
9826 retried. Transactions that received a complete ICAP response
9827 and did not have to consume or produce HTTP bodies to receive
9828 that response are usually retriable.
9830 icap_retry allow|deny [!]aclname ...
9832 Squid automatically retries some ICAP I/O timeouts and errors
9833 due to persistent connection race conditions.
9835 See also: icap_retry_limit
9838 NAME: icap_retry_limit
9841 LOC: Adaptation::Icap::TheConfig.repeat_limit
9843 DEFAULT_DOC: No retries are allowed.
9845 Limits the number of retries allowed.
9847 Communication errors due to persistent connection race
9848 conditions are unavoidable, automatically retried, and do not
9849 count against this limit.
9851 See also: icap_retry
9857 -----------------------------------------------------------------------------
9860 NAME: check_hostnames
9863 LOC: Config.onoff.check_hostnames
9865 For security and stability reasons Squid can check
9866 hostnames for Internet standard RFC compliance. If you want
9867 Squid to perform these checks turn this directive on.
9870 NAME: allow_underscore
9873 LOC: Config.onoff.allow_underscore
9875 Underscore characters is not strictly allowed in Internet hostnames
9876 but nevertheless used by many sites. Set this to off if you want
9877 Squid to be strict about the standard.
9878 This check is performed only when check_hostnames is set to on.
9881 NAME: dns_retransmit_interval
9884 LOC: Config.Timeout.idns_retransmit
9886 Initial retransmit interval for DNS queries. The interval is
9887 doubled each time all configured DNS servers have been tried.
9893 LOC: Config.Timeout.idns_query
9895 DNS Query timeout. If no response is received to a DNS query
9896 within this time all DNS servers for the queried domain
9897 are assumed to be unavailable.
9900 NAME: dns_packet_max
9902 DEFAULT_DOC: EDNS disabled
9904 LOC: Config.dns.packet_max
9906 Maximum number of bytes packet size to advertise via EDNS.
9907 Set to "none" to disable EDNS large packet support.
9909 For legacy reasons DNS UDP replies will default to 512 bytes which
9910 is too small for many responses. EDNS provides a means for Squid to
9911 negotiate receiving larger responses back immediately without having
9912 to failover with repeat requests. Responses larger than this limit
9913 will retain the old behaviour of failover to TCP DNS.
9915 Squid has no real fixed limit internally, but allowing packet sizes
9916 over 1500 bytes requires network jumbogram support and is usually not
9919 WARNING: The RFC also indicates that some older resolvers will reply
9920 with failure of the whole request if the extension is added. Some
9921 resolvers have already been identified which will reply with mangled
9922 EDNS response on occasion. Usually in response to many-KB jumbogram
9923 sizes being advertised by Squid.
9924 Squid will currently treat these both as an unable-to-resolve domain
9925 even if it would be resolvable without EDNS.
9932 DEFAULT_DOC: Search for single-label domain names is disabled.
9933 LOC: Config.onoff.res_defnames
9935 Normally the RES_DEFNAMES resolver option is disabled
9936 (see res_init(3)). This prevents caches in a hierarchy
9937 from interpreting single-component hostnames locally. To allow
9938 Squid to handle single-component names, enable this option.
9941 NAME: dns_multicast_local
9945 DEFAULT_DOC: Search for .local and .arpa names is disabled.
9946 LOC: Config.onoff.dns_mdns
9948 When set to on, Squid sends multicast DNS lookups on the local
9949 network for domains ending in .local and .arpa.
9950 This enables local servers and devices to be contacted in an
9951 ad-hoc or zero-configuration network environment.
9954 NAME: dns_nameservers
9957 DEFAULT_DOC: Use operating system definitions
9958 LOC: Config.dns.nameservers
9960 Use this if you want to specify a list of DNS name servers
9961 (IP addresses) to use instead of those given in your
9962 /etc/resolv.conf file.
9964 On Windows platforms, if no value is specified here or in
9965 the /etc/resolv.conf file, the list of DNS name servers are
9966 taken from the Windows registry, both static and dynamic DHCP
9967 configurations are supported.
9969 Example: dns_nameservers 10.0.0.1 192.172.0.4
9974 DEFAULT: @DEFAULT_HOSTS@
9975 LOC: Config.etcHostsPath
9977 Location of the host-local IP name-address associations
9978 database. Most Operating Systems have such a file on different
9980 - Un*X & Linux: /etc/hosts
9981 - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
9982 (%SystemRoot% value install default is c:\winnt)
9983 - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
9984 (%SystemRoot% value install default is c:\windows)
9985 - Windows 9x/Me: %windir%\hosts
9986 (%windir% value is usually c:\windows)
9987 - Cygwin: /etc/hosts
9989 The file contains newline-separated definitions, in the
9990 form ip_address_in_dotted_form name [name ...] names are
9991 whitespace-separated. Lines beginning with an hash (#)
9992 character are comments.
9994 The file is checked at startup and upon configuration.
9995 If set to 'none', it won't be checked.
9996 If append_domain is used, that domain will be added to
9997 domain-local (i.e. not containing any dot character) host
10001 NAME: append_domain
10003 LOC: Config.appendDomain
10005 DEFAULT_DOC: Use operating system definitions
10007 Appends local domain name to hostnames without any dots in
10008 them. append_domain must begin with a period.
10010 Be warned there are now Internet names with no dots in
10011 them using only top-domain names, so setting this may
10012 cause some Internet sites to become unavailable.
10015 append_domain .yourdomain.com
10018 NAME: ignore_unknown_nameservers
10020 LOC: Config.onoff.ignore_unknown_nameservers
10023 By default Squid checks that DNS responses are received
10024 from the same IP addresses they are sent to. If they
10025 don't match, Squid ignores the response and writes a warning
10026 message to cache.log. You can allow responses from unknown
10027 nameservers by setting this option to 'off'.
10033 LOC: Config.dns.v4_first
10035 With the IPv6 Internet being as fast or faster than IPv4 Internet
10036 for most networks Squid prefers to contact websites over IPv6.
10038 This option reverses the order of preference to make Squid contact
10039 dual-stack websites over IPv4 first. Squid will still perform both
10040 IPv6 and IPv4 DNS lookups before connecting.
10043 This option will restrict the situations under which IPv6
10044 connectivity is used (and tested). Hiding network problems
10045 which would otherwise be detected and warned about.
10049 COMMENT: (number of entries)
10052 LOC: Config.ipcache.size
10054 Maximum number of DNS IP cache entries.
10061 LOC: Config.ipcache.low
10068 LOC: Config.ipcache.high
10070 The size, low-, and high-water marks for the IP cache.
10073 NAME: fqdncache_size
10074 COMMENT: (number of entries)
10077 LOC: Config.fqdncache.size
10079 Maximum number of FQDN cache entries.
10084 -----------------------------------------------------------------------------
10087 NAME: configuration_includes_quoted_values
10089 TYPE: configuration_includes_quoted_values
10091 LOC: ConfigParser::RecognizeQuotedValues
10093 If set, Squid will recognize each "quoted string" after a configuration
10094 directive as a single parameter. The quotes are stripped before the
10095 parameter value is interpreted or used.
10096 See "Values with spaces, quotes, and other special characters"
10097 section for more details.
10104 LOC: Config.onoff.mem_pools
10106 If set, Squid will keep pools of allocated (but unused) memory
10107 available for future use. If memory is a premium on your
10108 system and you believe your malloc library outperforms Squid
10109 routines, disable this.
10112 NAME: memory_pools_limit
10116 LOC: Config.MemPools.limit
10118 Used only with memory_pools on:
10119 memory_pools_limit 50 MB
10121 If set to a non-zero value, Squid will keep at most the specified
10122 limit of allocated (but unused) memory in memory pools. All free()
10123 requests that exceed this limit will be handled by your malloc
10124 library. Squid does not pre-allocate any memory, just safe-keeps
10125 objects that otherwise would be free()d. Thus, it is safe to set
10126 memory_pools_limit to a reasonably high value even if your
10127 configuration will use less memory.
10129 If set to none, Squid will keep all memory it can. That is, there
10130 will be no limit on the total amount of memory used for safe-keeping.
10132 To disable memory allocation optimization, do not set
10133 memory_pools_limit to 0 or none. Set memory_pools to "off" instead.
10135 An overhead for maintaining memory pools is not taken into account
10136 when the limit is checked. This overhead is close to four bytes per
10137 object kept. However, pools may actually _save_ memory because of
10138 reduced memory thrashing in your malloc library.
10141 NAME: forwarded_for
10142 COMMENT: on|off|transparent|truncate|delete
10145 LOC: opt_forwarded_for
10147 If set to "on", Squid will append your client's IP address
10148 in the HTTP requests it forwards. By default it looks like:
10150 X-Forwarded-For: 192.1.2.3
10152 If set to "off", it will appear as
10154 X-Forwarded-For: unknown
10156 If set to "transparent", Squid will not alter the
10157 X-Forwarded-For header in any way.
10159 If set to "delete", Squid will delete the entire
10160 X-Forwarded-For header.
10162 If set to "truncate", Squid will remove all existing
10163 X-Forwarded-For entries, and place the client IP as the sole entry.
10166 NAME: cachemgr_passwd
10167 TYPE: cachemgrpasswd
10169 DEFAULT_DOC: No password. Actions which require password are denied.
10170 LOC: Config.passwd_list
10172 Specify passwords for cachemgr operations.
10174 Usage: cachemgr_passwd password action action ...
10176 Some valid actions are (see cache manager menu for a full list):
10216 * Indicates actions which will not be performed without a
10217 valid password, others can be performed if not listed here.
10219 To disable an action, set the password to "disable".
10220 To allow performing an action without a password, set the
10221 password to "none".
10223 Use the keyword "all" to set the same password for all actions.
10226 cachemgr_passwd secret shutdown
10227 cachemgr_passwd lesssssssecret info stats/objects
10228 cachemgr_passwd disable all
10235 LOC: Config.onoff.client_db
10237 If you want to disable collecting per-client statistics,
10238 turn off client_db here.
10241 NAME: refresh_all_ims
10245 LOC: Config.onoff.refresh_all_ims
10247 When you enable this option, squid will always check
10248 the origin server for an update when a client sends an
10249 If-Modified-Since request. Many browsers use IMS
10250 requests when the user requests a reload, and this
10251 ensures those clients receive the latest version.
10253 By default (off), squid may return a Not Modified response
10254 based on the age of the cached version.
10257 NAME: reload_into_ims
10258 IFDEF: USE_HTTP_VIOLATIONS
10262 LOC: Config.onoff.reload_into_ims
10264 When you enable this option, client no-cache or ``reload''
10265 requests will be changed to If-Modified-Since requests.
10266 Doing this VIOLATES the HTTP standard. Enabling this
10267 feature could make you liable for problems which it
10270 see also refresh_pattern for a more selective approach.
10273 NAME: connect_retries
10275 LOC: Config.connect_retries
10277 DEFAULT_DOC: Do not retry failed connections.
10279 Limits the number of reopening attempts when establishing a single
10280 TCP connection. All these attempts must still complete before the
10281 applicable connection opening timeout expires.
10283 By default and when connect_retries is set to zero, Squid does not
10284 retry failed connection opening attempts.
10286 The (not recommended) maximum is 10 tries. An attempt to configure a
10287 higher value results in the value of 10 being used (with a warning).
10289 Squid may open connections to retry various high-level forwarding
10290 failures. For an outside observer, that activity may look like a
10291 low-level connection reopening attempt, but those high-level retries
10292 are governed by forward_max_tries instead.
10294 See also: connect_timeout, forward_timeout, icap_connect_timeout,
10295 ident_timeout, and forward_max_tries.
10298 NAME: retry_on_error
10300 LOC: Config.retry.onerror
10303 If set to ON Squid will automatically retry requests when
10304 receiving an error response with status 403 (Forbidden),
10305 500 (Internal Error), 501 or 503 (Service not available).
10306 Status 502 and 504 (Gateway errors) are always retried.
10308 This is mainly useful if you are in a complex cache hierarchy to
10309 work around access control errors.
10311 NOTE: This retry will attempt to find another working destination.
10312 Which is different from the server which just failed.
10315 NAME: as_whois_server
10317 LOC: Config.as_whois_server
10318 DEFAULT: whois.ra.net
10320 WHOIS server to query for AS numbers. NOTE: AS numbers are
10321 queried only when Squid starts up, not for every request.
10326 LOC: Config.onoff.offline
10329 Enable this option and Squid will never try to validate cached
10333 NAME: uri_whitespace
10334 TYPE: uri_whitespace
10335 LOC: Config.uri_whitespace
10338 What to do with requests that have whitespace characters in the
10341 strip: The whitespace characters are stripped out of the URL.
10342 This is the behavior recommended by RFC2396 and RFC3986
10343 for tolerant handling of generic URI.
10344 NOTE: This is one difference between generic URI and HTTP URLs.
10346 deny: The request is denied. The user receives an "Invalid
10348 This is the behaviour recommended by RFC2616 for safe
10349 handling of HTTP request URL.
10351 allow: The request is allowed and the URI is not changed. The
10352 whitespace characters remain in the URI. Note the
10353 whitespace is passed to redirector processes if they
10355 Note this may be considered a violation of RFC2616
10356 request parsing where whitespace is prohibited in the
10359 encode: The request is allowed and the whitespace characters are
10360 encoded according to RFC1738.
10362 chop: The request is allowed and the URI is chopped at the
10366 NOTE the current Squid implementation of encode and chop violates
10367 RFC2616 by not using a 301 redirect after altering the URL.
10372 LOC: Config.chroot_dir
10375 Specifies a directory where Squid should do a chroot() while
10376 initializing. This also causes Squid to fully drop root
10377 privileges after initializing. This means, for example, if you
10378 use a HTTP port less than 1024 and try to reconfigure, you may
10379 get an error saying that Squid can not open the port.
10382 NAME: pipeline_prefetch
10383 TYPE: pipelinePrefetch
10384 LOC: Config.pipeline_max_prefetch
10386 DEFAULT_DOC: Do not pre-parse pipelined requests.
10388 HTTP clients may send a pipeline of 1+N requests to Squid using a
10389 single connection, without waiting for Squid to respond to the first
10390 of those requests. This option limits the number of concurrent
10391 requests Squid will try to handle in parallel. If set to N, Squid
10392 will try to receive and process up to 1+N requests on the same
10393 connection concurrently.
10395 Defaults to 0 (off) for bandwidth management and access logging
10398 NOTE: pipelining requires persistent connections to clients.
10400 WARNING: pipelining breaks NTLM and Negotiate/Kerberos authentication.
10403 NAME: high_response_time_warning
10406 LOC: Config.warnings.high_rptm
10408 DEFAULT_DOC: disabled.
10410 If the one-minute median response time exceeds this value,
10411 Squid prints a WARNING with debug level 0 to get the
10412 administrators attention. The value is in milliseconds.
10415 NAME: high_page_fault_warning
10417 LOC: Config.warnings.high_pf
10419 DEFAULT_DOC: disabled.
10421 If the one-minute average page fault rate exceeds this
10422 value, Squid prints a WARNING with debug level 0 to get
10423 the administrators attention. The value is in page faults
10427 NAME: high_memory_warning
10429 LOC: Config.warnings.high_memory
10430 IFDEF: HAVE_MSTATS&&HAVE_GNUMALLOC_H
10432 DEFAULT_DOC: disabled.
10434 If the memory usage (as determined by gnumalloc, if available and used)
10435 exceeds this amount, Squid prints a WARNING with debug level 0 to get
10436 the administrators attention.
10438 # TODO: link high_memory_warning to mempools?
10440 NAME: sleep_after_fork
10441 COMMENT: (microseconds)
10443 LOC: Config.sleep_after_fork
10446 When this is set to a non-zero value, the main Squid process
10447 sleeps the specified number of microseconds after a fork()
10448 system call. This sleep may help the situation where your
10449 system reports fork() failures due to lack of (virtual)
10450 memory. Note, however, if you have a lot of child
10451 processes, these sleep delays will add up and your
10452 Squid will not service requests for some amount of time
10453 until all the child processes have been started.
10454 On Windows value less then 1000 (1 milliseconds) are
10458 NAME: windows_ipaddrchangemonitor
10459 IFDEF: _SQUID_WINDOWS_
10463 LOC: Config.onoff.WIN32_IpAddrChangeMonitor
10465 On Windows Squid by default will monitor IP address changes and will
10466 reconfigure itself after any detected event. This is very useful for
10467 proxies connected to internet with dial-up interfaces.
10468 In some cases (a Proxy server acting as VPN gateway is one) it could be
10469 desiderable to disable this behaviour setting this to 'off'.
10470 Note: after changing this, Squid service must be restarted.
10475 IFDEF: USE_SQUID_EUI
10477 LOC: Eui::TheConfig.euiLookup
10479 Whether to lookup the EUI or MAC address of a connected client.
10482 NAME: max_filedescriptors max_filedesc
10485 DEFAULT_DOC: Use operating system soft limit set by ulimit.
10486 LOC: Config.max_filedescriptors
10488 Set the maximum number of filedescriptors, either below the
10489 operating system default or up to the hard limit.
10491 Remove from squid.conf to inherit the current ulimit soft
10494 Note: Changing this requires a restart of Squid. Also
10495 not all I/O types supports large values (eg on Windows).
10498 NAME: force_request_body_continuation
10500 LOC: Config.accessList.forceRequestBodyContinuation
10502 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
10504 This option controls how Squid handles data upload requests from HTTP
10505 and FTP agents that require a "Please Continue" control message response
10506 to actually send the request body to Squid. It is mostly useful in
10507 adaptation environments.
10509 When Squid receives an HTTP request with an "Expect: 100-continue"
10510 header or an FTP upload command (e.g., STOR), Squid normally sends the
10511 request headers or FTP command information to an adaptation service (or
10512 peer) and waits for a response. Most adaptation services (and some
10513 broken peers) may not respond to Squid at that stage because they may
10514 decide to wait for the HTTP request body or FTP data transfer. However,
10515 that request body or data transfer may never come because Squid has not
10516 responded with the HTTP 100 or FTP 150 (Please Continue) control message
10517 to the request sender yet!
10519 An allow match tells Squid to respond with the HTTP 100 or FTP 150
10520 (Please Continue) control message on its own, before forwarding the
10521 request to an adaptation service or peer. Such a response usually forces
10522 the request sender to proceed with sending the body. A deny match tells
10523 Squid to delay that control response until the origin server confirms
10524 that the request body is needed. Delaying is the default behavior.
10527 NAME: http_upgrade_request_protocols
10528 TYPE: http_upgrade_request_protocols
10529 LOC: Config.http_upgrade_request_protocols
10531 DEFAULT_DOC: Upgrade header dropped, effectively blocking an upgrade attempt.
10533 Controls client-initiated and server-confirmed switching from HTTP to
10534 another protocol (or to several protocols) using HTTP Upgrade mechanism
10535 defined in RFC 7230 Section 6.7. Squid itself does not understand the
10536 protocols being upgraded to and participates in the upgraded
10537 communication only as a dumb TCP proxy. Admins should not allow
10538 upgrading to protocols that require a more meaningful proxy
10541 Usage: http_upgrade_request_protocols <protocol> allow|deny [!]acl ...
10543 The required "protocol" parameter is either an all-caps word OTHER or an
10544 explicit protocol name (e.g. "WebSocket") optionally followed by a slash
10545 and a version token (e.g. "HTTP/3"). Explicit protocol names and
10546 versions are case sensitive.
10548 When an HTTP client sends an Upgrade request header, Squid iterates over
10549 the client-offered protocols and, for each protocol P (with an optional
10550 version V), evaluates the first non-empty set of
10551 http_upgrade_request_protocols rules (if any) from the following list:
10553 * All rules with an explicit protocol name equal to P.
10554 * All rules that use OTHER instead of a protocol name.
10556 In other words, rules using OTHER are considered for protocol P if and
10557 only if there are no rules mentioning P by name.
10559 If both of the above sets are empty, then Squid removes protocol P from
10562 If the client sent a versioned protocol offer P/X, then explicit rules
10563 referring to the same-name but different-version protocol P/Y are
10564 declared inapplicable. Inapplicable rules are not evaluated (i.e. are
10565 ignored). However, inapplicable rules still belong to the first set of
10568 Within the applicable rule subset, individual rules are evaluated in
10569 their configuration order. If all ACLs of an applicable "allow" rule
10570 match, then the protocol offered by the client is forwarded to the next
10571 hop as is. If all ACLs of an applicable "deny" rule match, then the
10572 offer is dropped. If no applicable rules have matching ACLs, then the
10573 offer is also dropped. The first matching rule also ends rules
10574 evaluation for the offered protocol.
10576 If all client-offered protocols are removed, then Squid forwards the
10577 client request without the Upgrade header. Squid never sends an empty
10578 Upgrade request header.
10580 An Upgrade request header with a value violating HTTP syntax is dropped
10581 and ignored without an attempt to use extractable individual protocol
10584 Upon receiving an HTTP 101 (Switching Protocols) control message, Squid
10585 checks that the server listed at least one protocol name and sent a
10586 Connection:upgrade response header. Squid does not understand individual
10587 protocol naming and versioning concepts enough to implement stricter
10588 checks, but an admin can restrict HTTP 101 (Switching Protocols)
10589 responses further using http_reply_access. Responses denied by
10590 http_reply_access rules and responses flagged by the internal Upgrade
10591 checks result in HTTP 502 (Bad Gateway) ERR_INVALID_RESP errors and
10592 Squid-to-server connection closures.
10594 If Squid sends an Upgrade request header, and the next hop (e.g., the
10595 origin server) responds with an acceptable HTTP 101 (Switching
10596 Protocols), then Squid forwards that message to the client and becomes
10599 The presence of an Upgrade request header alone does not preclude cache
10600 lookups. In other words, an Upgrade request might be satisfied from the
10601 cache, using regular HTTP caching rules.
10603 This clause only supports fast acl types.
10604 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
10606 Each of the following groups of configuration lines represents a
10607 separate configuration example:
10609 # never upgrade to protocol Foo; all others are OK
10610 http_upgrade_request_protocols Foo deny all
10611 http_upgrade_request_protocols OTHER allow all
10613 # only allow upgrades to protocol Bar (except for its first version)
10614 http_upgrade_request_protocols Bar/1 deny all
10615 http_upgrade_request_protocols Bar allow all
10616 http_upgrade_request_protocols OTHER deny all # this rule is optional
10618 # only allow upgrades to protocol Baz, and only if Baz is the only offer
10619 acl UpgradeHeaderHasMultipleOffers ...
10620 http_upgrade_request_protocols Baz deny UpgradeHeaderHasMultipleOffers
10621 http_upgrade_request_protocols Baz allow all
10624 NAME: server_pconn_for_nonretriable
10627 DEFAULT_DOC: Open new connections for forwarding requests Squid cannot retry safely.
10628 LOC: Config.accessList.serverPconnForNonretriable
10630 This option provides fine-grained control over persistent connection
10631 reuse when forwarding HTTP requests that Squid cannot retry. It is useful
10632 in environments where opening new connections is very expensive
10633 (e.g., all connections are secured with TLS with complex client and server
10634 certificate validation) and race conditions associated with persistent
10635 connections are very rare and/or only cause minor problems.
10637 HTTP prohibits retrying unsafe and non-idempotent requests (e.g., POST).
10638 Squid limitations also prohibit retrying all requests with bodies (e.g., PUT).
10639 By default, when forwarding such "risky" requests, Squid opens a new
10640 connection to the server or cache_peer, even if there is an idle persistent
10641 connection available. When Squid is configured to risk sending a non-retriable
10642 request on a previously used persistent connection, and the server closes
10643 the connection before seeing that risky request, the user gets an error response
10644 from Squid. In most cases, that error response will be HTTP 502 (Bad Gateway)
10645 with ERR_ZERO_SIZE_OBJECT or ERR_WRITE_ERROR (peer connection reset) error detail.
10647 If an allow rule matches, Squid reuses an available idle persistent connection
10648 (if any) for the request that Squid cannot retry. If a deny rule matches, then
10649 Squid opens a new connection for the request that Squid cannot retry.
10651 This option does not affect requests that Squid can retry. They will reuse idle
10652 persistent connections (if any).
10654 This clause only supports fast acl types.
10655 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
10658 acl SpeedIsWorthTheRisk method POST
10659 server_pconn_for_nonretriable allow SpeedIsWorthTheRisk
10662 NAME: happy_eyeballs_connect_timeout
10666 LOC: Config.happyEyeballs.connect_timeout
10668 This Happy Eyeballs (RFC 8305) tuning directive specifies the minimum
10669 delay between opening a primary to-server connection and opening a
10670 spare to-server connection for the same master transaction. This delay
10671 is similar to the Connection Attempt Delay in RFC 8305, but it is only
10672 applied to the first spare connection attempt. Subsequent spare
10673 connection attempts use happy_eyeballs_connect_gap, and primary
10674 connection attempts are not artificially delayed at all.
10676 Terminology: The "primary" and "spare" designations are determined by
10677 the order of DNS answers received by Squid: If Squid DNS AAAA query
10678 was answered first, then primary connections are connections to IPv6
10679 peer addresses (while spare connections use IPv4 addresses).
10680 Similarly, if Squid DNS A query was answered first, then primary
10681 connections are connections to IPv4 peer addresses (while spare
10682 connections use IPv6 addresses).
10684 Shorter happy_eyeballs_connect_timeout values reduce master
10685 transaction response time, potentially improving user-perceived
10686 response times (i.e., making user eyeballs happier). Longer delays
10687 reduce both concurrent connection level and server bombardment with
10688 connection requests, potentially improving overall Squid performance
10689 and reducing the chance of being blocked by servers for opening too
10690 many unused connections.
10692 RFC 8305 prohibits happy_eyeballs_connect_timeout values smaller than
10693 10 (milliseconds) to "avoid congestion collapse in the presence of
10694 high packet-loss rates".
10696 The following Happy Eyeballs directives place additional connection
10697 opening restrictions: happy_eyeballs_connect_gap and
10698 happy_eyeballs_connect_limit.
10701 NAME: happy_eyeballs_connect_gap
10705 DEFAULT_DOC: no artificial delays between spare attempts
10706 LOC: Config.happyEyeballs.connect_gap
10708 This Happy Eyeballs (RFC 8305) tuning directive specifies the
10709 minimum delay between opening spare to-server connections (to any
10710 server; i.e. across all concurrent master transactions in a Squid
10711 instance). Each SMP worker currently multiplies the configured gap
10712 by the total number of workers so that the combined spare connection
10713 opening rate of a Squid instance obeys the configured limit. The
10714 workers do not coordinate connection openings yet; a micro burst
10715 of spare connection openings may violate the configured gap.
10717 This directive has similar trade-offs as
10718 happy_eyeballs_connect_timeout, but its focus is on limiting traffic
10719 amplification effects for Squid as a whole, while
10720 happy_eyeballs_connect_timeout works on an individual master
10723 The following Happy Eyeballs directives place additional connection
10724 opening restrictions: happy_eyeballs_connect_timeout and
10725 happy_eyeballs_connect_limit. See the former for related terminology.
10728 NAME: happy_eyeballs_connect_limit
10731 DEFAULT_DOC: no artificial limit on the number of concurrent spare attempts
10732 LOC: Config.happyEyeballs.connect_limit
10734 This Happy Eyeballs (RFC 8305) tuning directive specifies the
10735 maximum number of spare to-server connections (to any server; i.e.
10736 across all concurrent master transactions in a Squid instance).
10737 Each SMP worker gets an equal share of the total limit. However,
10738 the workers do not share the actual connection counts yet, so one
10739 (busier) worker cannot "borrow" spare connection slots from another
10740 (less loaded) worker.
10742 Setting this limit to zero disables concurrent use of primary and
10743 spare TCP connections: Spare connection attempts are made only after
10744 all primary attempts fail. However, Squid would still use the
10745 DNS-related optimizations of the Happy Eyeballs approach.
10747 This directive has similar trade-offs as happy_eyeballs_connect_gap,
10748 but its focus is on limiting Squid overheads, while
10749 happy_eyeballs_connect_gap focuses on the origin server and peer
10752 The following Happy Eyeballs directives place additional connection
10753 opening restrictions: happy_eyeballs_connect_timeout and
10754 happy_eyeballs_connect_gap. See the former for related terminology.