1 ## Copyright (C) 1996-2015 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 spaces, quotes, and other special characters
60 Squid supports directive parameters with spaces, quotes, and other
61 special characters. Surround such parameters with "double quotes". Use
62 the configuration_includes_quoted_values directive to enable or
65 Squid supports reading configuration option parameters from external
66 files using the syntax:
67 parameters("/path/filename")
69 acl whitelist dstdomain parameters("/etc/squid/whitelist.txt")
71 Conditional configuration
73 If-statements can be used to make configuration directives
77 ... regular configuration directives ...
79 ... regular configuration directives ...]
82 The else part is optional. The keywords "if", "else", and "endif"
83 must be typed on their own lines, as if they were regular
84 configuration directives.
86 NOTE: An else-if condition is not supported.
88 These individual conditions types are supported:
91 Always evaluates to true.
93 Always evaluates to false.
95 Equality comparison of two integer numbers.
100 The following SMP-related preprocessor macros can be used.
102 ${process_name} expands to the current Squid process "name"
103 (e.g., squid1, squid2, or cache1).
105 ${process_number} expands to the current Squid process
106 identifier, which is an integer number (e.g., 1, 2, 3) unique
107 across all Squid processes of the current service instance.
109 ${service_name} expands into the current Squid service instance
110 name identifier which is provided by -n on the command line.
114 # options still not yet ported from 2.7 to 3.x
115 NAME: broken_vary_encoding
118 This option is not yet supported by Squid-3.
124 This option is not yet supported by Squid-3.
130 This option is not yet supported by Squid-3.
133 NAME: external_refresh_check
136 This option is not yet supported by Squid-3.
139 NAME: location_rewrite_program location_rewrite_access location_rewrite_children location_rewrite_concurrency
142 This option is not yet supported by Squid-3.
145 NAME: refresh_stale_hit
148 This option is not yet supported by Squid-3.
151 # Options removed in 3.6
152 NAME: cache_peer_domain cache_host_domain
155 Replace with dstdomain ACLs and cache_peer_access.
158 NAME: sslproxy_cafile
161 Remove this line. Use tls_outgoing_options cafile= instead.
164 NAME: sslproxy_capath
167 Remove this line. Use tls_outgoing_options capath= instead.
170 NAME: sslproxy_cipher
173 Remove this line. Use tls_outgoing_options cipher= instead.
176 NAME: sslproxy_client_certificate
179 Remove this line. Use tls_outgoing_options cert= instead.
182 NAME: sslproxy_client_key
185 Remove this line. Use tls_outgoing_options key= instead.
191 Remove this line. Use tls_outgoing_options flags= instead.
194 NAME: sslproxy_options
197 Remove this line. Use tls_outgoing_options options= instead.
200 NAME: sslproxy_version
203 Remove this line. Use tls_outgoing_options version= instead.
206 # Options removed in 3.5
207 NAME: hierarchy_stoplist
210 Remove this line. Use always_direct or cache_peer_access ACLs instead if you need to prevent cache_peer use.
213 # Options removed in 3.4
217 Remove this line. Use acls with access_log directives to control access logging
223 Remove this line. Use acls with icap_log directives to control icap logging
226 # Options Removed in 3.3
227 NAME: ignore_ims_on_miss
230 Remove this line. The HTTP/1.1 feature is now configured by 'cache_miss_revalidate'.
233 # Options Removed in 3.2
234 NAME: chunked_request_body_max_size
237 Remove this line. Squid is now HTTP/1.1 compliant.
240 NAME: dns_v4_fallback
243 Remove this line. Squid performs a 'Happy Eyeballs' algorithm, the 'fallback' algorithm is no longer relevant.
246 NAME: emulate_httpd_log
249 Replace this with an access_log directive using the format 'common' or 'combined'.
255 Use a regular access.log with ACL limiting it to MISS events.
261 Remove this line. Configure FTP page display using the CSS controls in errorpages.css instead.
264 NAME: ignore_expect_100
267 Remove this line. The HTTP/1.1 feature is now fully supported by default.
273 Remove this option from your config. To log FQDN use %>A in the log format.
276 NAME: log_ip_on_direct
279 Remove this option from your config. To log server or peer names use %<A in the log format.
282 NAME: maximum_single_addr_tries
285 Replaced by connect_retries. The behaviour has changed, please read the documentation before altering.
288 NAME: referer_log referrer_log
291 Replace this with an access_log directive using the format 'referrer'.
297 Remove this line. The feature is supported by default in storage types where update is implemented.
300 NAME: url_rewrite_concurrency
303 Remove this line. Set the 'concurrency=' option of url_rewrite_children instead.
309 Replace this with an access_log directive using the format 'useragent'.
312 # Options Removed in 3.1
316 Remove this line. DNS is no longer tested on startup.
319 NAME: extension_methods
322 Remove this line. All valid methods for HTTP are accepted by default.
325 # 2.7 Options Removed/Replaced in 3.2
330 # 2.7 Options Removed/Replaced in 3.1
338 Remove this line. HTTP/1.1 is supported by default.
341 NAME: upgrade_http0.9
344 Remove this line. ICY/1.0 streaming protocol is supported by default.
347 NAME: zph_local zph_mode zph_option zph_parent zph_sibling
350 Alter these entries. Use the qos_flows directive instead.
353 # Options Removed in 3.0
357 Since squid-3.0 replace with request_header_access or reply_header_access
358 depending on whether you wish to match client requests or server replies.
361 NAME: httpd_accel_no_pmtu_disc
364 Since squid-3.0 use the 'disable-pmtu-discovery' flag on http_port instead.
367 NAME: wais_relay_host
370 Replace this line with 'cache_peer' configuration.
373 NAME: wais_relay_port
376 Replace this line with 'cache_peer' configuration.
380 OPTIONS FOR AUTHENTICATION
381 -----------------------------------------------------------------------------
390 This is used to define parameters for the various authentication
391 schemes supported by Squid.
393 format: auth_param scheme parameter [setting]
395 The order in which authentication schemes are presented to the client is
396 dependent on the order the scheme first appears in config file. IE
397 has a bug (it's not RFC 2617 compliant) in that it will use the basic
398 scheme if basic is the first entry presented, even if more secure
399 schemes are presented. For now use the order in the recommended
400 settings section below. If other browsers have difficulties (don't
401 recognize the schemes offered even if you are using basic) either
402 put basic first, or disable the other schemes (by commenting out their
405 Once an authentication scheme is fully configured, it can only be
406 shutdown by shutting squid down and restarting. Changes can be made on
407 the fly and activated with a reconfigure. I.E. You can change to a
408 different helper, but not unconfigure the helper completely.
410 Please note that while this directive defines how Squid processes
411 authentication it does not automatically activate authentication.
412 To use authentication you must in addition make use of ACLs based
413 on login name in http_access (proxy_auth, proxy_auth_regex or
414 external with %LOGIN used in the format tag). The browser will be
415 challenged for authentication on the first such acl encountered
416 in http_access processing and will also be re-challenged for new
417 login credentials if the request is being denied by a proxy_auth
420 WARNING: authentication can't be used in a transparently intercepting
421 proxy as the client then thinks it is talking to an origin server and
422 not the proxy. This is a limitation of bending the TCP/IP protocol to
423 transparently intercepting port 80, not a limitation in Squid.
424 Ports flagged 'transparent', 'intercept', or 'tproxy' have
425 authentication disabled.
427 === Parameters common to all schemes. ===
430 Specifies the command for the external authenticator.
432 By default, each authentication scheme is not used unless a
433 program is specified.
435 See http://wiki.squid-cache.org/Features/AddonHelpers for
436 more details on helper operations and creating your own.
439 Specifies a string to be append to request line format for
440 the authentication helper. "Quoted" format values may contain
441 spaces and logformat %macros. In theory, any logformat %macro
442 can be used. In practice, a %macro expands as a dash (-) if
443 the helper request is sent before the required macro
444 information is available to Squid.
446 By default, Squid uses request formats provided in
447 scheme-specific examples below (search for %credentials).
449 The expanded key_extras value is added to the Squid credentials
450 cache and, hence, will affect authentication. It can be used to
451 autenticate different users with identical user names (e.g.,
452 when user authentication depends on http_port).
454 Avoid adding frequently changing information to key_extras. For
455 example, if you add user source IP, and it changes frequently
456 in your environment, then max_user_ip ACL is going to treat
457 every user+IP combination as a unique "user", breaking the ACL
458 and wasting a lot of memory on those user records. It will also
459 force users to authenticate from scratch whenever their IP
463 Specifies the protection scope (aka realm name) which is to be
464 reported to the client for the authentication scheme. It is
465 commonly part of the text the user will see when prompted for
466 their username and password.
468 For Basic the default is "Squid proxy-caching web server".
469 For Digest there is no default, this parameter is mandatory.
470 For NTLM and Negotiate this parameter is ignored.
472 "children" numberofchildren [startup=N] [idle=N] [concurrency=N] [queue-size=N]
474 The maximum number of authenticator processes to spawn. If
475 you start too few Squid will have to wait for them to process
476 a backlog of credential verifications, slowing it down. When
477 password verifications are done via a (slow) network you are
478 likely to need lots of authenticator processes.
480 The startup= and idle= options permit some skew in the exact
481 amount run. A minimum of startup=N will begin during startup
482 and reconfigure. Squid will start more in groups of up to
483 idle=N in an attempt to meet traffic needs and to keep idle=N
484 free above those traffic needs up to the maximum.
486 The concurrency= option sets the number of concurrent requests
487 the helper can process. The default of 0 is used for helpers
488 who only supports one request at a time. Setting this to a
489 number greater than 0 changes the protocol used to include a
490 channel ID field first on the request/response line, allowing
491 multiple requests to be sent to the same helper in parallel
492 without waiting for the response.
494 Concurrency must not be set unless it's known the helper
495 supports the input format with channel-ID fields.
497 The queue-size= option sets the maximum number of queued
498 requests. If the queued requests exceed queue size for more
499 than 3 minutes then squid aborts its operation.
500 The default value is set to 2*numberofchildren/
502 NOTE: NTLM and Negotiate schemes do not support concurrency
503 in the Squid code module even though some helpers can.
506 IF HAVE_AUTH_MODULE_BASIC
507 === Basic authentication parameters ===
510 HTTP uses iso-latin-1 as character set, while some
511 authentication backends such as LDAP expects UTF-8. If this is
512 set to on Squid will translate the HTTP iso-latin-1 charset to
513 UTF-8 before sending the username and password to the helper.
515 "credentialsttl" timetolive
516 Specifies how long squid assumes an externally validated
517 username:password pair is valid for - in other words how
518 often the helper program is called for that user. Set this
519 low to force revalidation with short lived passwords.
521 NOTE: setting this high does not impact your susceptibility
522 to replay attacks unless you are using an one-time password
523 system (such as SecureID). If you are using such a system,
524 you will be vulnerable to replay attacks unless you also
525 use the max_user_ip ACL in an http_access rule.
527 "casesensitive" on|off
528 Specifies if usernames are case sensitive. Most user databases
529 are case insensitive allowing the same username to be spelled
530 using both lower and upper case letters, but some are case
531 sensitive. This makes a big difference for user_max_ip ACL
532 processing and similar.
535 IF HAVE_AUTH_MODULE_DIGEST
536 === Digest authentication parameters ===
539 HTTP uses iso-latin-1 as character set, while some
540 authentication backends such as LDAP expects UTF-8. If this is
541 set to on Squid will translate the HTTP iso-latin-1 charset to
542 UTF-8 before sending the username and password to the helper.
544 "nonce_garbage_interval" timeinterval
545 Specifies the interval that nonces that have been issued
546 to client_agent's are checked for validity.
548 "nonce_max_duration" timeinterval
549 Specifies the maximum length of time a given nonce will be
552 "nonce_max_count" number
553 Specifies the maximum number of times a given nonce can be
556 "nonce_strictness" on|off
557 Determines if squid requires strict increment-by-1 behavior
558 for nonce counts, or just incrementing (off - for use when
559 user agents generate nonce counts that occasionally miss 1
560 (ie, 1,2,4,6)). Default off.
562 "check_nonce_count" on|off
563 This directive if set to off can disable the nonce count check
564 completely to work around buggy digest qop implementations in
565 certain mainstream browser versions. Default on to check the
566 nonce count to protect from authentication replay attacks.
568 "post_workaround" on|off
569 This is a workaround to certain buggy browsers who send an
570 incorrect request digest in POST requests when reusing the
571 same nonce as acquired earlier on a GET request.
574 IF HAVE_AUTH_MODULE_NEGOTIATE
575 === Negotiate authentication parameters ===
578 If you experience problems with PUT/POST requests when using
579 the this authentication scheme then you can try setting this
580 to off. This will cause Squid to forcibly close the connection
581 on the initial request where the browser asks which schemes
582 are supported by the proxy.
585 IF HAVE_AUTH_MODULE_NTLM
586 === NTLM authentication parameters ===
589 If you experience problems with PUT/POST requests when using
590 the this authentication scheme then you can try setting this
591 to off. This will cause Squid to forcibly close the connection
592 on the initial request where the browser asks which schemes
593 are supported by the proxy.
596 === Example Configuration ===
598 This configuration displays the recommended authentication scheme
599 order from most to least secure with recommended minimum configuration
600 settings for each scheme:
602 #auth_param negotiate program <uncomment and complete this line to activate>
603 #auth_param negotiate children 20 startup=0 idle=1
604 #auth_param negotiate keep_alive on
606 #auth_param digest program <uncomment and complete this line to activate>
607 #auth_param digest children 20 startup=0 idle=1
608 #auth_param digest realm Squid proxy-caching web server
609 #auth_param digest nonce_garbage_interval 5 minutes
610 #auth_param digest nonce_max_duration 30 minutes
611 #auth_param digest nonce_max_count 50
613 #auth_param ntlm program <uncomment and complete this line to activate>
614 #auth_param ntlm children 20 startup=0 idle=1
615 #auth_param ntlm keep_alive on
617 #auth_param basic program <uncomment and complete this line>
618 #auth_param basic children 5 startup=5 idle=1
619 #auth_param basic realm Squid proxy-caching web server
620 #auth_param basic credentialsttl 2 hours
623 NAME: authenticate_cache_garbage_interval
626 LOC: Config.authenticateGCInterval
628 The time period between garbage collection across the username cache.
629 This is a trade-off between memory utilization (long intervals - say
630 2 days) and CPU (short intervals - say 1 minute). Only change if you
634 NAME: authenticate_ttl
637 LOC: Config.authenticateTTL
639 The time a user & their credentials stay in the logged in
640 user cache since their last request. When the garbage
641 interval passes, all user credentials that have passed their
642 TTL are removed from memory.
645 NAME: authenticate_ip_ttl
647 LOC: Config.authenticateIpTTL
650 If you use proxy authentication and the 'max_user_ip' ACL,
651 this directive controls how long Squid remembers the IP
652 addresses associated with each user. Use a small value
653 (e.g., 60 seconds) if your users might change addresses
654 quickly, as is the case with dialup. You might be safe
655 using a larger value (e.g., 2 hours) in a corporate LAN
656 environment with relatively static address assignments.
661 -----------------------------------------------------------------------------
664 NAME: external_acl_type
665 TYPE: externalAclHelper
666 LOC: Config.externalAclHelperList
669 This option defines external acl classes using a helper program
670 to look up the status
672 external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..]
676 ttl=n TTL in seconds for cached results (defaults to 3600
680 TTL for cached negative lookups (default same
683 grace=n Percentage remaining of TTL where a refresh of a
684 cached entry should be initiated without needing to
685 wait for a new reply. (default is for no grace period)
687 cache=n Limit the result cache size, default is 262144.
688 The expanded FORMAT value is used as the cache key, so
689 if the details in FORMAT are highly variable a larger
690 cache may be needed to produce reduction in helper load.
693 Maximum number of acl helper processes spawned to service
694 external acl lookups of this type. (default 20)
697 Minimum number of acl helper processes to spawn during
698 startup and reconfigure to service external acl lookups
699 of this type. (default 0)
702 Number of acl helper processes to keep ahead of traffic
703 loads. Squid will spawn this many at once whenever load
704 rises above the capabilities of existing processes.
705 Up to the value of children-max. (default 1)
707 concurrency=n concurrency level per process. Only used with helpers
708 capable of processing more than one query at a time.
710 queue-size=N The queue-size= option sets the maximum number of queued
711 requests. If the queued requests exceed queue size
713 The default value is set to 2*children-max.
715 protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers.
717 ipv4 / ipv6 IP protocol used to communicate with this helper.
718 The default is to auto-detect IPv6 and use it when available.
721 FORMAT specifications
723 %LOGIN Authenticated user login name
724 %EXT_USER Username from previous external acl
725 %EXT_LOG Log details from previous external acl
726 %EXT_TAG Tag from previous external acl
727 %IDENT Ident user name
729 %SRCPORT Client source port
732 %PROTO Requested URL scheme
734 %PATH Requested URL path
735 %METHOD Request method
736 %MYADDR Squid interface address
737 %MYPORT Squid http_port number
738 %PATH Requested URL-path (including query-string if any)
739 %USER_CERT SSL User certificate in PEM format
740 %USER_CERTCHAIN SSL User certificate chain in PEM format
741 %USER_CERT_xx SSL User certificate subject attribute xx
742 %USER_CA_CERT_xx SSL User certificate issuer attribute xx
743 %ssl::>sni SSL client SNI sent to Squid
744 %ssl::<cert_subject SSL server certificate DN
745 %ssl::<cert_issuer SSL server certificate issuer DN
747 %>{Header} HTTP request header "Header"
749 HTTP request header "Hdr" list member "member"
751 HTTP request header list member using ; as
752 list separator. ; can be any non-alphanumeric
755 %<{Header} HTTP reply header "Header"
757 HTTP reply header "Hdr" list member "member"
759 HTTP reply header list member using ; as
760 list separator. ; can be any non-alphanumeric
763 %ACL The name of the ACL being tested.
764 %DATA The ACL arguments. If not used then any arguments
765 is automatically added at the end of the line
767 NOTE: this will encode the arguments as one token,
768 whereas the default will pass each separately.
770 %% The percent sign. Useful for helpers which need
771 an unchanging input format.
774 General request syntax:
776 [channel-ID] FORMAT-values [acl-values ...]
779 FORMAT-values consists of transaction details expanded with
780 whitespace separation per the config file FORMAT specification
781 using the FORMAT macros listed above.
783 acl-values consists of any string specified in the referencing
784 config 'acl ... external' line. see the "acl external" directive.
786 Request values sent to the helper are URL escaped to protect
787 each value in requests against whitespaces.
789 If using protocol=2.5 then the request sent to the helper is not
790 URL escaped to protect against whitespace.
792 NOTE: protocol=3.0 is deprecated as no longer necessary.
794 When using the concurrency= option the protocol is changed by
795 introducing a query channel tag in front of the request/response.
796 The query channel tag is a number between 0 and concurrency-1.
797 This value must be echoed back unchanged to Squid as the first part
798 of the response relating to its request.
801 The helper receives lines expanded per the above format specification
802 and for each input line returns 1 line starting with OK/ERR/BH result
803 code and optionally followed by additional keywords with more details.
806 General result syntax:
808 [channel-ID] result keyword=value ...
810 Result consists of one of the codes:
813 the ACL test produced a match.
816 the ACL test does not produce a match.
819 An internal error occurred in the helper, preventing
820 a result being identified.
822 The meaning of 'a match' is determined by your squid.conf
823 access control configuration. See the Squid wiki for details.
827 user= The users name (login)
829 password= The users password (for login= cache_peer option)
831 message= Message describing the reason for this response.
832 Available as %o in error pages.
833 Useful on (ERR and BH results).
835 tag= Apply a tag to a request. Only sets a tag once,
836 does not alter existing tags.
838 log= String to be logged in access.log. Available as
839 %ea in logformat specifications.
841 clt_conn_tag= Associates a TAG with the client TCP connection.
842 Please see url_rewrite_program related documentation
845 Any keywords may be sent on any response whether OK, ERR or BH.
847 All response keyword values need to be a single token with URL
848 escaping, or enclosed in double quotes (") and escaped using \ on
849 any double quotes or \ characters within the value. The wrapping
850 double quotes are removed before the value is interpreted by Squid.
851 \r and \n are also replace by CR and LF.
853 Some example key values:
857 user="J. \"Bob\" Smith"
864 DEFAULT: ssl::certHasExpired ssl_error X509_V_ERR_CERT_HAS_EXPIRED
865 DEFAULT: ssl::certNotYetValid ssl_error X509_V_ERR_CERT_NOT_YET_VALID
866 DEFAULT: ssl::certDomainMismatch ssl_error SQUID_X509_V_ERR_DOMAIN_MISMATCH
867 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
868 DEFAULT: ssl::certSelfSigned ssl_error X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT
871 DEFAULT: manager url_regex -i ^cache_object:// +i ^https?://[^/]+/squid-internal-mgr/
872 DEFAULT: localhost src 127.0.0.1/32 ::1
873 DEFAULT: to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
874 DEFAULT_DOC: ACLs all, manager, localhost, and to_localhost are predefined.
876 Defining an Access List
878 Every access list definition must begin with an aclname and acltype,
879 followed by either type-specific arguments or a quoted filename that
882 acl aclname acltype argument ...
883 acl aclname acltype "file" ...
885 When using "file", the file should contain one item per line.
887 Some acl types supports options which changes their default behaviour.
888 The available options are:
890 -i,+i By default, regular expressions are CASE-SENSITIVE. To make them
891 case-insensitive, use the -i option. To return case-sensitive
892 use the +i option between patterns, or make a new ACL line
895 -n Disable lookups and address type conversions. If lookup or
896 conversion is required because the parameter type (IP or
897 domain name) does not match the message address type (domain
898 name or IP), then the ACL would immediately declare a mismatch
899 without any warnings or lookups.
901 -- Used to stop processing all options, in the case the first acl
902 value has '-' character as first character (for example the '-'
903 is a valid domain name)
905 Some acl types require suspending the current request in order
906 to access some external data source.
907 Those which do are marked with the tag [slow], those which
908 don't are marked as [fast].
909 See http://wiki.squid-cache.org/SquidFaq/SquidAcl
910 for further information
912 ***** ACL TYPES AVAILABLE *****
914 acl aclname src ip-address/mask ... # clients IP address [fast]
915 acl aclname src addr1-addr2/mask ... # range of addresses [fast]
916 acl aclname dst [-n] ip-address/mask ... # URL host's IP address [slow]
917 acl aclname localip ip-address/mask ... # IP address the client connected to [fast]
919 acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation)
920 # The arp ACL requires the special configure option --enable-arp-acl.
921 # Furthermore, the ARP ACL code is not portable to all operating systems.
922 # It works on Linux, Solaris, Windows, FreeBSD, and some
923 # other *BSD variants.
926 # NOTE: Squid can only determine the MAC address for clients that are on
927 # the same subnet. If the client is on a different subnet,
928 # then Squid cannot find out its MAC address.
930 acl aclname srcdomain .foo.com ...
931 # reverse lookup, from client IP [slow]
932 acl aclname dstdomain [-n] .foo.com ...
933 # Destination server from URL [fast]
934 acl aclname srcdom_regex [-i] \.foo\.com ...
935 # regex matching client name [slow]
936 acl aclname dstdom_regex [-n] [-i] \.foo\.com ...
937 # regex matching server [fast]
939 # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
940 # based URL is used and no match is found. The name "none" is used
941 # if the reverse lookup fails.
943 acl aclname src_as number ...
944 acl aclname dst_as number ...
946 # Except for access control, AS numbers can be used for
947 # routing of requests to specific caches. Here's an
948 # example for routing all requests for AS#1241 and only
949 # those to mycache.mydomain.net:
950 # acl asexample dst_as 1241
951 # cache_peer_access mycache.mydomain.net allow asexample
952 # cache_peer_access mycache_mydomain.net deny all
954 acl aclname peername myPeer ...
956 # match against a named cache_peer entry
957 # set unique name= on cache_peer lines for reliable use.
959 acl aclname time [day-abbrevs] [h1:m1-h2:m2]
969 # h1:m1 must be less than h2:m2
971 acl aclname url_regex [-i] ^http:// ...
972 # regex matching on whole URL [fast]
973 acl aclname urllogin [-i] [^a-zA-Z0-9] ...
974 # regex matching on URL login field
975 acl aclname urlpath_regex [-i] \.gif$ ...
976 # regex matching on URL path [fast]
978 acl aclname port 80 70 21 0-1024... # destination TCP port [fast]
980 acl aclname localport 3128 ... # TCP port the client connected to [fast]
981 # NP: for interception mode this is usually '80'
983 acl aclname myportname 3128 ... # *_port name [fast]
985 acl aclname proto HTTP FTP ... # request protocol [fast]
987 acl aclname method GET POST ... # HTTP request method [fast]
989 acl aclname http_status 200 301 500- 400-403 ...
990 # status code in reply [fast]
992 acl aclname browser [-i] regexp ...
993 # pattern match on User-Agent header (see also req_header below) [fast]
995 acl aclname referer_regex [-i] regexp ...
996 # pattern match on Referer header [fast]
997 # Referer is highly unreliable, so use with care
999 acl aclname ident username ...
1000 acl aclname ident_regex [-i] pattern ...
1001 # string match on ident output [slow]
1002 # use REQUIRED to accept any non-null ident.
1004 acl aclname proxy_auth [-i] username ...
1005 acl aclname proxy_auth_regex [-i] pattern ...
1006 # perform http authentication challenge to the client and match against
1007 # supplied credentials [slow]
1009 # takes a list of allowed usernames.
1010 # use REQUIRED to accept any valid username.
1012 # Will use proxy authentication in forward-proxy scenarios, and plain
1013 # http authenticaiton in reverse-proxy scenarios
1015 # NOTE: when a Proxy-Authentication header is sent but it is not
1016 # needed during ACL checking the username is NOT logged
1019 # NOTE: proxy_auth requires a EXTERNAL authentication program
1020 # to check username/password combinations (see
1021 # auth_param directive).
1023 # NOTE: proxy_auth can't be used in a transparent/intercepting proxy
1024 # as the browser needs to be configured for using a proxy in order
1025 # to respond to proxy authentication.
1027 acl aclname snmp_community string ...
1028 # A community string to limit access to your SNMP Agent [fast]
1031 # acl snmppublic snmp_community public
1033 acl aclname maxconn number
1034 # This will be matched when the client's IP address has
1035 # more than <number> TCP connections established. [fast]
1036 # NOTE: This only measures direct TCP links so X-Forwarded-For
1037 # indirect clients are not counted.
1039 acl aclname max_user_ip [-s] number
1040 # This will be matched when the user attempts to log in from more
1041 # than <number> different ip addresses. The authenticate_ip_ttl
1042 # parameter controls the timeout on the ip entries. [fast]
1043 # If -s is specified the limit is strict, denying browsing
1044 # from any further IP addresses until the ttl has expired. Without
1045 # -s Squid will just annoy the user by "randomly" denying requests.
1046 # (the counter is reset each time the limit is reached and a
1047 # request is denied)
1048 # NOTE: in acceleration mode or where there is mesh of child proxies,
1049 # clients may appear to come from multiple addresses if they are
1050 # going through proxy farms, so a limit of 1 may cause user problems.
1052 acl aclname random probability
1053 # Pseudo-randomly match requests. Based on the probability given.
1054 # Probability may be written as a decimal (0.333), fraction (1/3)
1055 # or ratio of matches:non-matches (3:5).
1057 acl aclname req_mime_type [-i] mime-type ...
1058 # regex match against the mime type of the request generated
1059 # by the client. Can be used to detect file upload or some
1060 # types HTTP tunneling requests [fast]
1061 # NOTE: This does NOT match the reply. You cannot use this
1062 # to match the returned file type.
1064 acl aclname req_header header-name [-i] any\.regex\.here
1065 # regex match against any of the known request headers. May be
1066 # thought of as a superset of "browser", "referer" and "mime-type"
1069 acl aclname rep_mime_type [-i] mime-type ...
1070 # regex match against the mime type of the reply received by
1071 # squid. Can be used to detect file download or some
1072 # types HTTP tunneling requests. [fast]
1073 # NOTE: This has no effect in http_access rules. It only has
1074 # effect in rules that affect the reply data stream such as
1075 # http_reply_access.
1077 acl aclname rep_header header-name [-i] any\.regex\.here
1078 # regex match against any of the known reply headers. May be
1079 # thought of as a superset of "browser", "referer" and "mime-type"
1082 acl aclname external class_name [arguments...]
1083 # external ACL lookup via a helper class defined by the
1084 # external_acl_type directive [slow]
1086 acl aclname user_cert attribute values...
1087 # match against attributes in a user SSL certificate
1088 # attribute is one of DN/C/O/CN/L/ST [fast]
1090 acl aclname ca_cert attribute values...
1091 # match against attributes a users issuing CA SSL certificate
1092 # attribute is one of DN/C/O/CN/L/ST [fast]
1094 acl aclname ext_user username ...
1095 acl aclname ext_user_regex [-i] pattern ...
1096 # string match on username returned by external acl helper [slow]
1097 # use REQUIRED to accept any non-null user name.
1099 acl aclname tag tagvalue ...
1100 # string match on tag returned by external acl helper [fast]
1101 # DEPRECATED. Only the first tag will match with this ACL.
1102 # Use the 'note' ACL instead for handling multiple tag values.
1104 acl aclname hier_code codename ...
1105 # string match against squid hierarchy code(s); [fast]
1106 # e.g., DIRECT, PARENT_HIT, NONE, etc.
1108 # NOTE: This has no effect in http_access rules. It only has
1109 # effect in rules that affect the reply data stream such as
1110 # http_reply_access.
1112 acl aclname note name [value ...]
1113 # match transaction annotation [fast]
1114 # Without values, matches any annotation with a given name.
1115 # With value(s), matches any annotation with a given name that
1116 # also has one of the given values.
1117 # Names and values are compared using a string equality test.
1118 # Annotation sources include note and adaptation_meta directives
1119 # as well as helper and eCAP responses.
1121 acl aclname adaptation_service service ...
1122 # Matches the name of any icap_service, ecap_service,
1123 # adaptation_service_set, or adaptation_service_chain that Squid
1124 # has used (or attempted to use) for the master transaction.
1125 # This ACL must be defined after the corresponding adaptation
1126 # service is named in squid.conf. This ACL is usable with
1127 # adaptation_meta because it starts matching immediately after
1128 # the service has been selected for adaptation.
1131 acl aclname ssl_error errorname
1132 # match against SSL certificate validation error [fast]
1134 # For valid error names see in @DEFAULT_ERROR_DIR@/templates/error-details.txt
1137 # The following can be used as shortcuts for certificate properties:
1138 # [ssl::]certHasExpired: the "not after" field is in the past
1139 # [ssl::]certNotYetValid: the "not before" field is in the future
1140 # [ssl::]certUntrusted: The certificate issuer is not to be trusted.
1141 # [ssl::]certSelfSigned: The certificate is self signed.
1142 # [ssl::]certDomainMismatch: The certificate CN domain does not
1143 # match the name the name of the host we are connecting to.
1145 # The ssl::certHasExpired, ssl::certNotYetValid, ssl::certDomainMismatch,
1146 # ssl::certUntrusted, and ssl::certSelfSigned can also be used as
1147 # predefined ACLs, just like the 'all' ACL.
1149 # NOTE: The ssl_error ACL is only supported with sslproxy_cert_error,
1150 # sslproxy_cert_sign, and sslproxy_cert_adapt options.
1152 acl aclname server_cert_fingerprint [-sha1] fingerprint
1153 # match against server SSL certificate fingerprint [fast]
1155 # The fingerprint is the digest of the DER encoded version
1156 # of the whole certificate. The user should use the form: XX:XX:...
1157 # Optional argument specifies the digest algorithm to use.
1158 # The SHA1 digest algorithm is the default and is currently
1159 # the only algorithm supported (-sha1).
1161 acl aclname at_step step
1162 # match against the current step during ssl_bump evaluation [fast]
1163 # Never matches and should not be used outside the ssl_bump context.
1165 # At each SslBump step, Squid evaluates ssl_bump directives to find
1166 # the next bumping action (e.g., peek or splice). Valid SslBump step
1167 # values and the corresponding ssl_bump evaluation moments are:
1168 # SslBump1: After getting TCP-level and HTTP CONNECT info.
1169 # SslBump2: After getting SSL Client Hello info.
1170 # SslBump3: After getting SSL Server Hello info.
1172 acl aclname ssl::server_name .foo.com ...
1173 # matches server name obtained from various sources [fast]
1175 # The server name is obtained during Ssl-Bump steps from such sources
1176 # as CONNECT request URI, client SNI, and SSL server certificate CN.
1177 # During each Ssl-Bump step, Squid may improve its understanding of a
1178 # "true server name". Unlike dstdomain, this ACL does not perform
1181 acl aclname ssl::server_name_regex [-i] \.foo\.com ...
1182 # regex matches server name obtained from various sources [fast]
1184 acl aclname any-of acl1 acl2 ...
1185 # match any one of the acls [fast or slow]
1186 # The first matching ACL stops further ACL evaluation.
1188 # ACLs from multiple any-of lines with the same name are ORed.
1189 # For example, A = (a1 or a2) or (a3 or a4) can be written as
1190 # acl A any-of a1 a2
1191 # acl A any-of a3 a4
1193 # This group ACL is fast if all evaluated ACLs in the group are fast
1194 # and slow otherwise.
1196 acl aclname all-of acl1 acl2 ...
1197 # match all of the acls [fast or slow]
1198 # The first mismatching ACL stops further ACL evaluation.
1200 # ACLs from multiple all-of lines with the same name are ORed.
1201 # For example, B = (b1 and b2) or (b3 and b4) can be written as
1202 # acl B all-of b1 b2
1203 # acl B all-of b3 b4
1205 # This group ACL is fast if all evaluated ACLs in the group are fast
1206 # and slow otherwise.
1209 acl macaddress arp 09:00:2b:23:45:67
1210 acl myexample dst_as 1241
1211 acl password proxy_auth REQUIRED
1212 acl fileupload req_mime_type -i ^multipart/form-data$
1213 acl javascript rep_mime_type -i ^application/x-javascript$
1217 # Recommended minimum configuration:
1220 # Example rule allowing access from your local networks.
1221 # Adapt to list your (internal) IP networks from where browsing
1223 acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
1224 acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)
1225 acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN)
1226 acl localhet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines
1227 acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN)
1228 acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN)
1229 acl localnet src fc00::/7 # RFC 4193 local private network range
1230 acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
1232 acl SSL_ports port 443
1233 acl Safe_ports port 80 # http
1234 acl Safe_ports port 21 # ftp
1235 acl Safe_ports port 443 # https
1236 acl Safe_ports port 70 # gopher
1237 acl Safe_ports port 210 # wais
1238 acl Safe_ports port 1025-65535 # unregistered ports
1239 acl Safe_ports port 280 # http-mgmt
1240 acl Safe_ports port 488 # gss-http
1241 acl Safe_ports port 591 # filemaker
1242 acl Safe_ports port 777 # multiling http
1243 acl CONNECT method CONNECT
1247 NAME: proxy_protocol_access
1249 LOC: Config.accessList.proxyProtocol
1251 DEFAULT_DOC: all TCP connections to ports with require-proxy-header will be denied
1253 Determine which client proxies can be trusted to provide correct
1254 information regarding real client IP address using PROXY protocol.
1256 Requests may pass through a chain of several other proxies
1257 before reaching us. The original source details may by sent in:
1258 * HTTP message Forwarded header, or
1259 * HTTP message X-Forwarded-For header, or
1260 * PROXY protocol connection header.
1262 This directive is solely for validating new PROXY protocol
1263 connections received from a port flagged with require-proxy-header.
1264 It is checked only once after TCP connection setup.
1266 A deny match results in TCP connection closure.
1268 An allow match is required for Squid to permit the corresponding
1269 TCP connection, before Squid even looks for HTTP request headers.
1270 If there is an allow match, Squid starts using PROXY header information
1271 to determine the source address of the connection for all future ACL
1272 checks, logging, etc.
1274 SECURITY CONSIDERATIONS:
1276 Any host from which we accept client IP details can place
1277 incorrect information in the relevant header, and Squid
1278 will use the incorrect information as if it were the
1279 source address of the request. This may enable remote
1280 hosts to bypass any access control restrictions that are
1281 based on the client's source addresses.
1283 This clause only supports fast acl types.
1284 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1287 NAME: follow_x_forwarded_for
1289 IFDEF: FOLLOW_X_FORWARDED_FOR
1290 LOC: Config.accessList.followXFF
1291 DEFAULT_IF_NONE: deny all
1292 DEFAULT_DOC: X-Forwarded-For header will be ignored.
1294 Determine which client proxies can be trusted to provide correct
1295 information regarding real client IP address.
1297 Requests may pass through a chain of several other proxies
1298 before reaching us. The original source details may by sent in:
1299 * HTTP message Forwarded header, or
1300 * HTTP message X-Forwarded-For header, or
1301 * PROXY protocol connection header.
1303 PROXY protocol connections are controlled by the proxy_protocol_access
1304 directive which is checked before this.
1306 If a request reaches us from a source that is allowed by this
1307 directive, then we trust the information it provides regarding
1308 the IP of the client it received from (if any).
1310 For the purpose of ACLs used in this directive the src ACL type always
1311 matches the address we are testing and srcdomain matches its rDNS.
1313 On each HTTP request Squid checks for X-Forwarded-For header fields.
1314 If found the header values are iterated in reverse order and an allow
1315 match is required for Squid to continue on to the next value.
1316 The verification ends when a value receives a deny match, cannot be
1317 tested, or there are no more values to test.
1318 NOTE: Squid does not yet follow the Forwarded HTTP header.
1320 The end result of this process is an IP address that we will
1321 refer to as the indirect client address. This address may
1322 be treated as the client address for access control, ICAP, delay
1323 pools and logging, depending on the acl_uses_indirect_client,
1324 icap_uses_indirect_client, delay_pool_uses_indirect_client,
1325 log_uses_indirect_client and tproxy_uses_indirect_client options.
1327 This clause only supports fast acl types.
1328 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1330 SECURITY CONSIDERATIONS:
1332 Any host from which we accept client IP details can place
1333 incorrect information in the relevant header, and Squid
1334 will use the incorrect information as if it were the
1335 source address of the request. This may enable remote
1336 hosts to bypass any access control restrictions that are
1337 based on the client's source addresses.
1341 acl localhost src 127.0.0.1
1342 acl my_other_proxy srcdomain .proxy.example.com
1343 follow_x_forwarded_for allow localhost
1344 follow_x_forwarded_for allow my_other_proxy
1347 NAME: acl_uses_indirect_client
1350 IFDEF: FOLLOW_X_FORWARDED_FOR
1352 LOC: Config.onoff.acl_uses_indirect_client
1354 Controls whether the indirect client address
1355 (see follow_x_forwarded_for) is used instead of the
1356 direct client address in acl matching.
1358 NOTE: maxconn ACL considers direct TCP links and indirect
1359 clients will always have zero. So no match.
1362 NAME: delay_pool_uses_indirect_client
1365 IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_DELAY_POOLS
1367 LOC: Config.onoff.delay_pool_uses_indirect_client
1369 Controls whether the indirect client address
1370 (see follow_x_forwarded_for) is used instead of the
1371 direct client address in delay pools.
1374 NAME: log_uses_indirect_client
1377 IFDEF: FOLLOW_X_FORWARDED_FOR
1379 LOC: Config.onoff.log_uses_indirect_client
1381 Controls whether the indirect client address
1382 (see follow_x_forwarded_for) is used instead of the
1383 direct client address in the access log.
1386 NAME: tproxy_uses_indirect_client
1389 IFDEF: FOLLOW_X_FORWARDED_FOR&&LINUX_NETFILTER
1391 LOC: Config.onoff.tproxy_uses_indirect_client
1393 Controls whether the indirect client address
1394 (see follow_x_forwarded_for) is used instead of the
1395 direct client address when spoofing the outgoing client.
1397 This has no effect on requests arriving in non-tproxy
1400 SECURITY WARNING: Usage of this option is dangerous
1401 and should not be used trivially. Correct configuration
1402 of follow_x_forewarded_for with a limited set of trusted
1403 sources is required to prevent abuse of your proxy.
1406 NAME: spoof_client_ip
1408 LOC: Config.accessList.spoof_client_ip
1410 DEFAULT_DOC: Allow spoofing on all TPROXY traffic.
1412 Control client IP address spoofing of TPROXY traffic based on
1413 defined access lists.
1415 spoof_client_ip allow|deny [!]aclname ...
1417 If there are no "spoof_client_ip" lines present, the default
1418 is to "allow" spoofing of any suitable request.
1420 Note that the cache_peer "no-tproxy" option overrides this ACL.
1422 This clause supports fast acl types.
1423 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1428 LOC: Config.accessList.http
1429 DEFAULT_IF_NONE: deny all
1430 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
1432 Allowing or Denying access based on defined access lists
1434 To allow or deny a message received on an HTTP, HTTPS, or FTP port:
1435 http_access allow|deny [!]aclname ...
1437 NOTE on default values:
1439 If there are no "access" lines present, the default is to deny
1442 If none of the "access" lines cause a match, the default is the
1443 opposite of the last line in the list. If the last line was
1444 deny, the default is allow. Conversely, if the last line
1445 is allow, the default will be deny. For these reasons, it is a
1446 good idea to have an "deny all" entry at the end of your access
1447 lists to avoid potential confusion.
1449 This clause supports both fast and slow acl types.
1450 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1455 # Recommended minimum Access Permission configuration:
1457 # Deny requests to certain unsafe ports
1458 http_access deny !Safe_ports
1460 # Deny CONNECT to other than secure SSL ports
1461 http_access deny CONNECT !SSL_ports
1463 # Only allow cachemgr access from localhost
1464 http_access allow localhost manager
1465 http_access deny manager
1467 # We strongly recommend the following be uncommented to protect innocent
1468 # web applications running on the proxy server who think the only
1469 # one who can access services on "localhost" is a local user
1470 #http_access deny to_localhost
1473 # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
1476 # Example rule allowing access from your local networks.
1477 # Adapt localnet in the ACL section to list your (internal) IP networks
1478 # from where browsing should be allowed
1479 http_access allow localnet
1480 http_access allow localhost
1482 # And finally deny all other access to this proxy
1483 http_access deny all
1487 NAME: adapted_http_access http_access2
1489 LOC: Config.accessList.adapted_http
1491 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
1493 Allowing or Denying access based on defined access lists
1495 Essentially identical to http_access, but runs after redirectors
1496 and ICAP/eCAP adaptation. Allowing access control based on their
1499 If not set then only http_access is used.
1502 NAME: http_reply_access
1504 LOC: Config.accessList.reply
1506 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
1508 Allow replies to client requests. This is complementary to http_access.
1510 http_reply_access allow|deny [!] aclname ...
1512 NOTE: if there are no access lines present, the default is to allow
1515 If none of the access lines cause a match the opposite of the
1516 last line will apply. Thus it is good practice to end the rules
1517 with an "allow all" or "deny all" entry.
1519 This clause supports both fast and slow acl types.
1520 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1525 LOC: Config.accessList.icp
1527 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
1529 Allowing or Denying access to the ICP port based on defined
1532 icp_access allow|deny [!]aclname ...
1534 NOTE: The default if no icp_access lines are present is to
1535 deny all traffic. This default may cause problems with peers
1538 This clause only supports fast acl types.
1539 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1541 # Allow ICP queries from local networks only
1542 #icp_access allow localnet
1543 #icp_access deny all
1549 LOC: Config.accessList.htcp
1551 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
1553 Allowing or Denying access to the HTCP port based on defined
1556 htcp_access allow|deny [!]aclname ...
1558 See also htcp_clr_access for details on access control for
1559 cache purge (CLR) HTCP messages.
1561 NOTE: The default if no htcp_access lines are present is to
1562 deny all traffic. This default may cause problems with peers
1563 using the htcp option.
1565 This clause only supports fast acl types.
1566 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1568 # Allow HTCP queries from local networks only
1569 #htcp_access allow localnet
1570 #htcp_access deny all
1573 NAME: htcp_clr_access
1576 LOC: Config.accessList.htcp_clr
1578 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
1580 Allowing or Denying access to purge content using HTCP based
1581 on defined access lists.
1582 See htcp_access for details on general HTCP access control.
1584 htcp_clr_access allow|deny [!]aclname ...
1586 This clause only supports fast acl types.
1587 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1589 # Allow HTCP CLR requests from trusted peers
1590 acl htcp_clr_peer src 192.0.2.2 2001:DB8::2
1591 htcp_clr_access allow htcp_clr_peer
1592 htcp_clr_access deny all
1597 LOC: Config.accessList.miss
1599 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
1601 Determins whether network access is permitted when satisfying a request.
1604 to force your neighbors to use you as a sibling instead of
1607 acl localclients src 192.0.2.0/24 2001:DB8::a:0/64
1608 miss_access deny !localclients
1609 miss_access allow all
1611 This means only your local clients are allowed to fetch relayed/MISS
1612 replies from the network and all other clients can only fetch cached
1615 The default for this setting allows all clients who passed the
1616 http_access rules to relay via this proxy.
1618 This clause only supports fast acl types.
1619 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1622 NAME: ident_lookup_access
1626 DEFAULT_DOC: Unless rules exist in squid.conf, IDENT is not fetched.
1627 LOC: Ident::TheConfig.identLookup
1629 A list of ACL elements which, if matched, cause an ident
1630 (RFC 931) lookup to be performed for this request. For
1631 example, you might choose to always perform ident lookups
1632 for your main multi-user Unix boxes, but not for your Macs
1633 and PCs. By default, ident lookups are not performed for
1636 To enable ident lookups for specific client addresses, you
1637 can follow this example:
1639 acl ident_aware_hosts src 198.168.1.0/24
1640 ident_lookup_access allow ident_aware_hosts
1641 ident_lookup_access deny all
1643 Only src type ACL checks are fully supported. A srcdomain
1644 ACL might work at times, but it will not always provide
1647 This clause only supports fast acl types.
1648 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1651 NAME: reply_body_max_size
1652 COMMENT: size [acl acl...]
1655 DEFAULT_DOC: No limit is applied.
1656 LOC: Config.ReplyBodySize
1658 This option specifies the maximum size of a reply body. It can be
1659 used to prevent users from downloading very large files, such as
1660 MP3's and movies. When the reply headers are received, the
1661 reply_body_max_size lines are processed, and the first line where
1662 all (if any) listed ACLs are true is used as the maximum body size
1665 This size is checked twice. First when we get the reply headers,
1666 we check the content-length value. If the content length value exists
1667 and is larger than the allowed size, the request is denied and the
1668 user receives an error message that says "the request or reply
1669 is too large." If there is no content-length, and the reply
1670 size exceeds this limit, the client's connection is just closed
1671 and they will receive a partial reply.
1673 WARNING: downstream caches probably can not detect a partial reply
1674 if there is no content-length header, so they will cache
1675 partial responses and give them out as hits. You should NOT
1676 use this option if you have downstream caches.
1678 WARNING: A maximum size smaller than the size of squid's error messages
1679 will cause an infinite loop and crash squid. Ensure that the smallest
1680 non-zero value you use is greater that the maximum header size plus
1681 the size of your largest error page.
1683 If you set this parameter none (the default), there will be
1686 Configuration Format is:
1687 reply_body_max_size SIZE UNITS [acl ...]
1689 reply_body_max_size 10 MB
1693 NAME: on_unsupported_protocol
1694 TYPE: on_unsupported_protocol
1695 LOC: Config.accessList.on_unsupported_protocol
1697 DEFAULT_DOC: Respond with an error message to unidentifiable traffic
1699 Determines Squid behavior when encountering strange requests at the
1700 beginning of an accepted TCP connection or the beginning of a bumped
1701 CONNECT tunnel. Controlling Squid reaction to unexpected traffic is
1702 especially useful in interception environments where Squid is likely
1703 to see connections for unsupported protocols that Squid should either
1704 terminate or tunnel at TCP level.
1706 on_unsupported_protocol <action> [!]acl ...
1708 The first matching action wins. Only fast ACLs are supported.
1710 Supported actions are:
1712 tunnel: Establish a TCP connection with the intended server and
1713 blindly shovel TCP packets between the client and server.
1715 respond: Respond with an error message, using the transfer protocol
1716 for the Squid port that received the request (e.g., HTTP
1717 for connections intercepted at the http_port). This is the
1720 Squid expects the following traffic patterns:
1722 http_port: a plain HTTP request
1723 https_port: SSL/TLS handshake followed by an [encrypted] HTTP request
1724 ftp_port: a plain FTP command (no on_unsupported_protocol support yet!)
1725 CONNECT tunnel on http_port: same as https_port
1726 CONNECT tunnel on https_port: same as https_port
1728 Currently, this directive has effect on intercepted connections and
1729 bumped tunnels only. Other cases are not supported because Squid
1730 cannot know the intended destination of other traffic.
1733 # define what Squid errors indicate receiving non-HTTP traffic:
1734 acl foreignProtocol squid_error ERR_PROTOCOL_UNKNOWN ERR_TOO_BIG
1735 # define what Squid errors indicate receiving nothing:
1736 acl serverTalksFirstProtocol squid_error ERR_REQUEST_START_TIMEOUT
1737 # tunnel everything that does not look like HTTP:
1738 on_unsupported_protocol tunnel foreignProtocol
1739 # tunnel if we think the client waits for the server to talk first:
1740 on_unsupported_protocol tunnel serverTalksFirstProtocol
1741 # in all other error cases, just send an HTTP "error page" response:
1742 on_unsupported_protocol respond all
1744 See also: squid_error ACL
1749 -----------------------------------------------------------------------------
1752 NAME: http_port ascii_port
1757 Usage: port [mode] [options]
1758 hostname:port [mode] [options]
1759 1.2.3.4:port [mode] [options]
1761 The socket addresses where Squid will listen for HTTP client
1762 requests. You may specify multiple socket addresses.
1763 There are three forms: port alone, hostname with port, and
1764 IP address with port. If you specify a hostname or IP
1765 address, Squid binds the socket to that specific
1766 address. Most likely, you do not need to bind to a specific
1767 address, so you can use the port number alone.
1769 If you are running Squid in accelerator mode, you
1770 probably want to listen on port 80 also, or instead.
1772 The -a command line option may be used to specify additional
1773 port(s) where Squid listens for proxy request. Such ports will
1774 be plain proxy ports with no options.
1776 You may specify multiple socket addresses on multiple lines.
1780 intercept Support for IP-Layer interception of
1781 outgoing requests without browser settings.
1782 NP: disables authentication and IPv6 on the port.
1784 tproxy Support Linux TPROXY for spoofing outgoing
1785 connections using the client IP address.
1786 NP: disables authentication and maybe IPv6 on the port.
1788 accel Accelerator / reverse proxy mode
1790 ssl-bump For each CONNECT request allowed by ssl_bump ACLs,
1791 establish secure connection with the client and with
1792 the server, decrypt HTTPS messages as they pass through
1793 Squid, and treat them as unencrypted HTTP messages,
1794 becoming the man-in-the-middle.
1796 The ssl_bump option is required to fully enable
1797 bumping of CONNECT requests.
1799 Omitting the mode flag causes default forward proxy mode to be used.
1802 Accelerator Mode Options:
1804 defaultsite=domainname
1805 What to use for the Host: header if it is not present
1806 in a request. Determines what site (not origin server)
1807 accelerators should consider the default.
1809 no-vhost Disable using HTTP/1.1 Host header for virtual domain support.
1811 protocol= Protocol to reconstruct accelerated and intercepted
1812 requests with. Defaults to HTTP/1.1 for http_port and
1813 HTTPS/1.1 for https_port.
1814 When an unsupported value is configured Squid will
1815 produce a FATAL error.
1816 Values: HTTP or HTTP/1.1, HTTPS or HTTPS/1.1
1818 vport Virtual host port support. Using the http_port number
1819 instead of the port passed on Host: headers.
1821 vport=NN Virtual host port support. Using the specified port
1822 number instead of the port passed on Host: headers.
1825 Act as if this Squid is the origin server.
1826 This currently means generate new Date: and Expires:
1827 headers on HIT instead of adding Age:.
1829 ignore-cc Ignore request Cache-Control headers.
1831 WARNING: This option violates HTTP specifications if
1832 used in non-accelerator setups.
1834 allow-direct Allow direct forwarding in accelerator mode. Normally
1835 accelerated requests are denied direct forwarding as if
1836 never_direct was used.
1838 WARNING: this option opens accelerator mode to security
1839 vulnerabilities usually only affecting in interception
1840 mode. Make sure to protect forwarding with suitable
1841 http_access rules when using this.
1844 SSL Bump Mode Options:
1845 In addition to these options ssl-bump requires TLS/SSL options.
1847 generate-host-certificates[=<on|off>]
1848 Dynamically create SSL server certificates for the
1849 destination hosts of bumped CONNECT requests.When
1850 enabled, the cert and key options are used to sign
1851 generated certificates. Otherwise generated
1852 certificate will be selfsigned.
1853 If there is a CA certificate lifetime of the generated
1854 certificate equals lifetime of the CA certificate. If
1855 generated certificate is selfsigned lifetime is three
1857 This option is enabled by default when ssl-bump is used.
1858 See the ssl-bump option above for more information.
1860 dynamic_cert_mem_cache_size=SIZE
1861 Approximate total RAM size spent on cached generated
1862 certificates. If set to zero, caching is disabled. The
1863 default value is 4MB.
1867 cert= Path to SSL certificate (PEM format).
1869 key= Path to SSL private key file (PEM format)
1870 if not specified, the certificate file is
1871 assumed to be a combined certificate and
1874 version= The version of SSL/TLS supported
1875 1 automatic (default)
1881 cipher= Colon separated list of supported ciphers.
1882 NOTE: some ciphers such as EDH ciphers depend on
1883 additional settings. If those settings are
1884 omitted the ciphers may be silently ignored
1885 by the OpenSSL library.
1887 options= Various SSL implementation options. The most important
1890 NO_SSLv3 Disallow the use of SSLv3
1892 NO_TLSv1 Disallow the use of TLSv1.0
1894 NO_TLSv1_1 Disallow the use of TLSv1.1
1896 NO_TLSv1_2 Disallow the use of TLSv1.2
1899 Always create a new key when using
1900 temporary/ephemeral DH key exchanges
1903 Disable use of RFC5077 session tickets.
1904 Some servers may have problems
1905 understanding the TLS extension due
1906 to ambiguous specification in RFC4507.
1908 ALL Enable various bug workarounds
1909 suggested as "harmless" by OpenSSL
1910 Be warned that this reduces SSL/TLS
1911 strength to some attacks.
1913 See the OpenSSL SSL_CTX_set_options documentation for a
1916 clientca= File containing the list of CAs to use when
1917 requesting a client certificate.
1919 cafile= File containing additional CA certificates to
1920 use when verifying client certificates. If unset
1921 clientca will be used.
1923 capath= Directory containing additional CA certificates
1924 and CRL lists to use when verifying client certificates.
1926 crlfile= File of additional CRL lists to use when verifying
1927 the client certificate, in addition to CRLs stored in
1928 the capath. Implies VERIFY_CRL flag below.
1930 dhparams= File containing DH parameters for temporary/ephemeral
1931 DH key exchanges. See OpenSSL documentation for details
1932 on how to create this file.
1933 WARNING: EDH ciphers will be silently disabled if this
1936 sslflags= Various flags modifying the use of SSL:
1938 Don't request client certificates
1939 immediately, but wait until acl processing
1940 requires a certificate (not yet implemented).
1942 Don't use the default CA lists built in
1945 Don't allow for session reuse. Each connection
1946 will result in a new SSL session.
1948 Verify CRL lists when accepting client
1951 Verify CRL lists for all certificates in the
1952 client certificate chain.
1954 sslcontext= SSL session ID context identifier.
1958 connection-auth[=on|off]
1959 use connection-auth=off to tell Squid to prevent
1960 forwarding Microsoft connection oriented authentication
1961 (NTLM, Negotiate and Kerberos)
1963 disable-pmtu-discovery=
1964 Control Path-MTU discovery usage:
1965 off lets OS decide on what to do (default).
1966 transparent disable PMTU discovery when transparent
1968 always disable always PMTU discovery.
1970 In many setups of transparently intercepting proxies
1971 Path-MTU discovery can not work on traffic towards the
1972 clients. This is the case when the intercepting device
1973 does not fully track connections and fails to forward
1974 ICMP must fragment messages to the cache server. If you
1975 have such setup and experience that certain clients
1976 sporadically hang or never complete requests set
1977 disable-pmtu-discovery option to 'transparent'.
1979 name= Specifies a internal name for the port. Defaults to
1980 the port specification (port or addr:port)
1982 tcpkeepalive[=idle,interval,timeout]
1983 Enable TCP keepalive probes of idle connections.
1984 In seconds; idle is the initial time before TCP starts
1985 probing the connection, interval how often to probe, and
1986 timeout the time before giving up.
1988 require-proxy-header
1989 Require PROXY protocol version 1 or 2 connections.
1990 The proxy_protocol_access is required to whitelist
1991 downstream proxies which can be trusted.
1993 If you run Squid on a dual-homed machine with an internal
1994 and an external interface we recommend you to specify the
1995 internal address:port in http_port. This way Squid will only be
1996 visible on the internal address.
2000 # Squid normally listens to port 3128
2001 http_port @DEFAULT_HTTP_PORT@
2011 Usage: [ip:]port cert=certificate.pem [key=key.pem] [mode] [options...]
2013 The socket address where Squid will listen for client requests made
2014 over TLS or SSL connections. Commonly referred to as HTTPS.
2016 This is most useful for situations where you are running squid in
2017 accelerator mode and you want to do the SSL work at the accelerator level.
2019 You may specify multiple socket addresses on multiple lines,
2020 each with their own SSL certificate and/or options.
2024 accel Accelerator / reverse proxy mode
2026 intercept Support for IP-Layer interception of
2027 outgoing requests without browser settings.
2028 NP: disables authentication and IPv6 on the port.
2030 tproxy Support Linux TPROXY for spoofing outgoing
2031 connections using the client IP address.
2032 NP: disables authentication and maybe IPv6 on the port.
2034 ssl-bump For each intercepted connection allowed by ssl_bump
2035 ACLs, establish a secure connection with the client and with
2036 the server, decrypt HTTPS messages as they pass through
2037 Squid, and treat them as unencrypted HTTP messages,
2038 becoming the man-in-the-middle.
2040 An "ssl_bump server-first" match is required to
2041 fully enable bumping of intercepted SSL connections.
2043 Requires tproxy or intercept.
2045 Omitting the mode flag causes default forward proxy mode to be used.
2048 See http_port for a list of generic options
2053 cert= Path to SSL certificate (PEM format).
2055 key= Path to SSL private key file (PEM format)
2056 if not specified, the certificate file is
2057 assumed to be a combined certificate and
2060 version= The version of SSL/TLS supported
2061 1 automatic (default)
2065 cipher= Colon separated list of supported ciphers.
2067 options= Various SSL engine options. The most important
2070 NO_SSLv3 Disallow the use of SSLv3
2072 NO_TLSv1 Disallow the use of TLSv1.0
2074 NO_TLSv1_1 Disallow the use of TLSv1.1
2076 NO_TLSv1_2 Disallow the use of TLSv1.2
2079 Always create a new key when using
2080 temporary/ephemeral DH key exchanges
2083 Disable use of RFC5077 session tickets.
2084 Some servers may have problems
2085 understanding the TLS extension due
2086 to ambiguous specification in RFC4507.
2088 ALL Enable various bug workarounds
2089 suggested as "harmless" by OpenSSL
2090 Be warned that this reduces SSL/TLS
2091 strength to some attacks.
2093 See the OpenSSL SSL_CTX_set_options documentation for a
2096 clientca= File containing the list of CAs to use when
2097 requesting a client certificate.
2099 cafile= File containing additional CA certificates to
2100 use when verifying client certificates. If unset
2101 clientca will be used.
2103 capath= Directory containing additional CA certificates
2104 and CRL lists to use when verifying client certificates.
2106 crlfile= File of additional CRL lists to use when verifying
2107 the client certificate, in addition to CRLs stored in
2108 the capath. Implies VERIFY_CRL flag below.
2110 dhparams= File containing DH parameters for temporary/ephemeral
2113 sslflags= Various flags modifying the use of SSL:
2115 Don't request client certificates
2116 immediately, but wait until acl processing
2117 requires a certificate (not yet implemented).
2119 Don't use the default CA lists built in
2122 Don't allow for session reuse. Each connection
2123 will result in a new SSL session.
2125 Verify CRL lists when accepting client
2128 Verify CRL lists for all certificates in the
2129 client certificate chain.
2131 sslcontext= SSL session ID context identifier.
2133 generate-host-certificates[=<on|off>]
2134 Dynamically create SSL server certificates for the
2135 destination hosts of bumped SSL requests.When
2136 enabled, the cert and key options are used to sign
2137 generated certificates. Otherwise generated
2138 certificate will be selfsigned.
2139 If there is CA certificate life time of generated
2140 certificate equals lifetime of CA certificate. If
2141 generated certificate is selfsigned lifetime is three
2143 This option is enabled by default when SslBump is used.
2144 See the sslBump option above for more information.
2146 dynamic_cert_mem_cache_size=SIZE
2147 Approximate total RAM size spent on cached generated
2148 certificates. If set to zero, caching is disabled. The
2149 default value is 4MB.
2151 See http_port for a list of available options.
2159 Enables Native FTP proxy by specifying the socket address where Squid
2160 listens for FTP client requests. See http_port directive for various
2161 ways to specify the listening address and mode.
2163 Usage: ftp_port address [mode] [options]
2165 WARNING: This is a new, experimental, complex feature that has seen
2166 limited production exposure. Some Squid modules (e.g., caching) do not
2167 currently work with native FTP proxying, and many features have not
2168 even been tested for compatibility. Test well before deploying!
2170 Native FTP proxying differs substantially from proxying HTTP requests
2171 with ftp:// URIs because Squid works as an FTP server and receives
2172 actual FTP commands (rather than HTTP requests with FTP URLs).
2174 Native FTP commands accepted at ftp_port are internally converted or
2175 wrapped into HTTP-like messages. The same happens to Native FTP
2176 responses received from FTP origin servers. Those HTTP-like messages
2177 are shoveled through regular access control and adaptation layers
2178 between the FTP client and the FTP origin server. This allows Squid to
2179 examine, adapt, block, and log FTP exchanges. Squid reuses most HTTP
2180 mechanisms when shoveling wrapped FTP messages. For example,
2181 http_access and adaptation_access directives are used.
2185 intercept Same as http_port intercept. The FTP origin address is
2186 determined based on the intended destination of the
2187 intercepted connection.
2189 tproxy Support Linux TPROXY for spoofing outgoing
2190 connections using the client IP address.
2191 NP: disables authentication and maybe IPv6 on the port.
2193 By default (i.e., without an explicit mode option), Squid extracts the
2194 FTP origin address from the login@origin parameter of the FTP USER
2195 command. Many popular FTP clients support such native FTP proxying.
2199 name=token Specifies an internal name for the port. Defaults to
2200 the port address. Usable with myportname ACL.
2203 Enables tracking of FTP directories by injecting extra
2204 PWD commands and adjusting Request-URI (in wrapping
2205 HTTP requests) to reflect the current FTP server
2206 directory. Tracking is disabled by default.
2208 protocol=FTP Protocol to reconstruct accelerated and intercepted
2209 requests with. Defaults to FTP. No other accepted
2210 values have been tested with. An unsupported value
2211 results in a FATAL error. Accepted values are FTP,
2212 HTTP (or HTTP/1.1), and HTTPS (or HTTPS/1.1).
2214 Other http_port modes and options that are not specific to HTTP and
2215 HTTPS may also work.
2218 NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp
2221 LOC: Ip::Qos::TheConfig.tosToServer
2223 Allows you to select a TOS/Diffserv value for packets outgoing
2224 on the server side, based on an ACL.
2226 tcp_outgoing_tos ds-field [!]aclname ...
2228 Example where normal_service_net uses the TOS value 0x00
2229 and good_service_net uses 0x20
2231 acl normal_service_net src 10.0.0.0/24
2232 acl good_service_net src 10.0.1.0/24
2233 tcp_outgoing_tos 0x00 normal_service_net
2234 tcp_outgoing_tos 0x20 good_service_net
2236 TOS/DSCP values really only have local significance - so you should
2237 know what you're specifying. For more information, see RFC2474,
2238 RFC2475, and RFC3260.
2240 The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
2241 "default" to use whatever default your host has.
2242 Note that only multiples of 4 are usable as the two rightmost bits have
2243 been redefined for use by ECN (RFC 3168 section 23.1).
2244 The squid parser will enforce this by masking away the ECN bits.
2246 Processing proceeds in the order specified, and stops at first fully
2249 Only fast ACLs are supported.
2252 NAME: clientside_tos
2255 LOC: Ip::Qos::TheConfig.tosToClient
2257 Allows you to select a TOS/DSCP value for packets being transmitted
2258 on the client-side, based on an ACL.
2260 clientside_tos ds-field [!]aclname ...
2262 Example where normal_service_net uses the TOS value 0x00
2263 and good_service_net uses 0x20
2265 acl normal_service_net src 10.0.0.0/24
2266 acl good_service_net src 10.0.1.0/24
2267 clientside_tos 0x00 normal_service_net
2268 clientside_tos 0x20 good_service_net
2270 Note: This feature is incompatible with qos_flows. Any TOS values set here
2271 will be overwritten by TOS values in qos_flows.
2273 The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
2274 "default" to use whatever default your host has.
2275 Note that only multiples of 4 are usable as the two rightmost bits have
2276 been redefined for use by ECN (RFC 3168 section 23.1).
2277 The squid parser will enforce this by masking away the ECN bits.
2281 NAME: tcp_outgoing_mark
2283 IFDEF: SO_MARK&&USE_LIBCAP
2285 LOC: Ip::Qos::TheConfig.nfmarkToServer
2287 Allows you to apply a Netfilter mark value to outgoing packets
2288 on the server side, based on an ACL.
2290 tcp_outgoing_mark mark-value [!]aclname ...
2292 Example where normal_service_net uses the mark value 0x00
2293 and good_service_net uses 0x20
2295 acl normal_service_net src 10.0.0.0/24
2296 acl good_service_net src 10.0.1.0/24
2297 tcp_outgoing_mark 0x00 normal_service_net
2298 tcp_outgoing_mark 0x20 good_service_net
2300 Only fast ACLs are supported.
2303 NAME: clientside_mark
2305 IFDEF: SO_MARK&&USE_LIBCAP
2307 LOC: Ip::Qos::TheConfig.nfmarkToClient
2309 Allows you to apply a Netfilter mark value to packets being transmitted
2310 on the client-side, based on an ACL.
2312 clientside_mark mark-value [!]aclname ...
2314 Example where normal_service_net uses the mark value 0x00
2315 and good_service_net uses 0x20
2317 acl normal_service_net src 10.0.0.0/24
2318 acl good_service_net src 10.0.1.0/24
2319 clientside_mark 0x00 normal_service_net
2320 clientside_mark 0x20 good_service_net
2322 Note: This feature is incompatible with qos_flows. Any mark values set here
2323 will be overwritten by mark values in qos_flows.
2330 LOC: Ip::Qos::TheConfig
2332 Allows you to select a TOS/DSCP value to mark outgoing
2333 connections to the client, based on where the reply was sourced.
2334 For platforms using netfilter, allows you to set a netfilter mark
2335 value instead of, or in addition to, a TOS value.
2337 By default this functionality is disabled. To enable it with the default
2338 settings simply use "qos_flows mark" or "qos_flows tos". Default
2339 settings will result in the netfilter mark or TOS value being copied
2340 from the upstream connection to the client. Note that it is the connection
2341 CONNMARK value not the packet MARK value that is copied.
2343 It is not currently possible to copy the mark or TOS value from the
2344 client to the upstream connection request.
2346 TOS values really only have local significance - so you should
2347 know what you're specifying. For more information, see RFC2474,
2348 RFC2475, and RFC3260.
2350 The TOS/DSCP byte must be exactly that - a octet value 0 - 255.
2351 Note that only multiples of 4 are usable as the two rightmost bits have
2352 been redefined for use by ECN (RFC 3168 section 23.1).
2353 The squid parser will enforce this by masking away the ECN bits.
2355 Mark values can be any unsigned 32-bit integer value.
2357 This setting is configured by setting the following values:
2359 tos|mark Whether to set TOS or netfilter mark values
2361 local-hit=0xFF Value to mark local cache hits.
2363 sibling-hit=0xFF Value to mark hits from sibling peers.
2365 parent-hit=0xFF Value to mark hits from parent peers.
2367 miss=0xFF[/mask] Value to mark cache misses. Takes precedence
2368 over the preserve-miss feature (see below), unless
2369 mask is specified, in which case only the bits
2370 specified in the mask are written.
2372 The TOS variant of the following features are only possible on Linux
2373 and require your kernel to be patched with the TOS preserving ZPH
2374 patch, available from http://zph.bratcheda.org
2375 No patch is needed to preserve the netfilter mark, which will work
2376 with all variants of netfilter.
2378 disable-preserve-miss
2379 This option disables the preservation of the TOS or netfilter
2380 mark. By default, the existing TOS or netfilter mark value of
2381 the response coming from the remote server will be retained
2382 and masked with miss-mark.
2383 NOTE: in the case of a netfilter mark, the mark must be set on
2384 the connection (using the CONNMARK target) not on the packet
2388 Allows you to mask certain bits in the TOS or mark value
2389 received from the remote server, before copying the value to
2390 the TOS sent towards clients.
2391 Default for tos: 0xFF (TOS from server is not changed).
2392 Default for mark: 0xFFFFFFFF (mark from server is not changed).
2394 All of these features require the --enable-zph-qos compilation flag
2395 (enabled by default). Netfilter marking also requires the
2396 libnetfilter_conntrack libraries (--with-netfilter-conntrack) and
2397 libcap 2.09+ (--with-libcap).
2401 NAME: tcp_outgoing_address
2404 DEFAULT_DOC: Address selection is performed by the operating system.
2405 LOC: Config.accessList.outgoing_address
2407 Allows you to map requests to different outgoing IP addresses
2408 based on the username or source address of the user making
2411 tcp_outgoing_address ipaddr [[!]aclname] ...
2414 Forwarding clients with dedicated IPs for certain subnets.
2416 acl normal_service_net src 10.0.0.0/24
2417 acl good_service_net src 10.0.2.0/24
2419 tcp_outgoing_address 2001:db8::c001 good_service_net
2420 tcp_outgoing_address 10.1.0.2 good_service_net
2422 tcp_outgoing_address 2001:db8::beef normal_service_net
2423 tcp_outgoing_address 10.1.0.1 normal_service_net
2425 tcp_outgoing_address 2001:db8::1
2426 tcp_outgoing_address 10.1.0.3
2428 Processing proceeds in the order specified, and stops at first fully
2431 Squid will add an implicit IP version test to each line.
2432 Requests going to IPv4 websites will use the outgoing 10.1.0.* addresses.
2433 Requests going to IPv6 websites will use the outgoing 2001:db8:* addresses.
2436 NOTE: The use of this directive using client dependent ACLs is
2437 incompatible with the use of server side persistent connections. To
2438 ensure correct results it is best to set server_persistent_connections
2439 to off when using this directive in such configurations.
2441 NOTE: The use of this directive to set a local IP on outgoing TCP links
2442 is incompatible with using TPROXY to set client IP out outbound TCP links.
2443 When needing to contact peers use the no-tproxy cache_peer option and the
2444 client_dst_passthru directive re-enable normal forwarding such as this.
2448 NAME: host_verify_strict
2451 LOC: Config.onoff.hostStrictVerify
2453 Regardless of this option setting, when dealing with intercepted
2454 traffic, Squid always verifies that the destination IP address matches
2455 the Host header domain or IP (called 'authority form URL').
2457 This enforcement is performed to satisfy a MUST-level requirement in
2458 RFC 2616 section 14.23: "The Host field value MUST represent the naming
2459 authority of the origin server or gateway given by the original URL".
2462 Squid always responds with an HTTP 409 (Conflict) error
2463 page and logs a security warning if there is no match.
2465 Squid verifies that the destination IP address matches
2466 the Host header for forward-proxy and reverse-proxy traffic
2467 as well. For those traffic types, Squid also enables the
2468 following checks, comparing the corresponding Host header
2469 and Request-URI components:
2471 * The host names (domain or IP) must be identical,
2472 but valueless or missing Host header disables all checks.
2473 For the two host names to match, both must be either IP
2476 * Port numbers must be identical, but if a port is missing
2477 the scheme-default port is assumed.
2480 When set to OFF (the default):
2481 Squid allows suspicious requests to continue but logs a
2482 security warning and blocks caching of the response.
2484 * Forward-proxy traffic is not checked at all.
2486 * Reverse-proxy traffic is not checked at all.
2488 * Intercepted traffic which passes verification is handled
2489 according to client_dst_passthru.
2491 * Intercepted requests which fail verification are sent
2492 to the client original destination instead of DIRECT.
2493 This overrides 'client_dst_passthru off'.
2495 For now suspicious intercepted CONNECT requests are always
2496 responded to with an HTTP 409 (Conflict) error page.
2501 As described in CVE-2009-0801 when the Host: header alone is used
2502 to determine the destination of a request it becomes trivial for
2503 malicious scripts on remote websites to bypass browser same-origin
2504 security policy and sandboxing protections.
2506 The cause of this is that such applets are allowed to perform their
2507 own HTTP stack, in which case the same-origin policy of the browser
2508 sandbox only verifies that the applet tries to contact the same IP
2509 as from where it was loaded at the IP level. The Host: header may
2510 be different from the connected IP and approved origin.
2514 NAME: client_dst_passthru
2517 LOC: Config.onoff.client_dst_passthru
2519 With NAT or TPROXY intercepted traffic Squid may pass the request
2520 directly to the original client destination IP or seek a faster
2521 source using the HTTP Host header.
2523 Using Host to locate alternative servers can provide faster
2524 connectivity with a range of failure recovery options.
2525 But can also lead to connectivity trouble when the client and
2526 server are attempting stateful interactions unaware of the proxy.
2528 This option (on by default) prevents alternative DNS entries being
2529 located to send intercepted traffic DIRECT to an origin server.
2530 The clients original destination IP and port will be used instead.
2532 Regardless of this option setting, when dealing with intercepted
2533 traffic Squid will verify the Host: header and any traffic which
2534 fails Host verification will be treated as if this option were ON.
2536 see host_verify_strict for details on the verification process.
2541 -----------------------------------------------------------------------------
2544 NAME: tls_outgoing_options
2545 IFDEF: USE_GNUTLS||USE_OPENSSL
2546 TYPE: securePeerOptions
2548 LOC: Security::ProxyOutgoingConfig
2550 disable Do not support https:// URLs.
2552 cert=/path/to/client/certificate
2553 A client TLS certificate to use when connecting.
2555 key=/path/to/client/private_key
2556 The private TLS key corresponding to the cert= above.
2557 If key= is not specified cert= is assumed to reference
2558 a PEM file containing both the certificate and the key.
2561 The TLS/SSL version to use when connecting
2562 1 = automatic (default)
2568 cipher=... The list of valid TLS ciphers to use.
2570 options=... Specify various TLS/SSL implementation options:
2572 NO_SSLv3 Disallow the use of SSLv3
2574 NO_TLSv1 Disallow the use of TLSv1.0
2576 NO_TLSv1_1 Disallow the use of TLSv1.1
2578 NO_TLSv1_2 Disallow the use of TLSv1.2
2581 Always create a new key when using
2582 temporary/ephemeral DH key exchanges
2585 Disable use of RFC5077 session tickets.
2586 Some servers may have problems
2587 understanding the TLS extension due
2588 to ambiguous specification in RFC4507.
2590 ALL Enable various bug workarounds
2591 suggested as "harmless" by OpenSSL
2592 Be warned that this reduces SSL/TLS
2593 strength to some attacks.
2595 See the OpenSSL SSL_CTX_set_options documentation for a
2598 cafile=... A file containing additional CA certificates to use
2599 when verifying the peer certificate.
2601 capath=... A directory containing additional CA certificates to
2602 use when verifying the peer certificate.
2604 crlfile=... A certificate revocation list file to use when
2605 verifying the peer certificate.
2607 flags=... Specify various flags modifying the TLS implementation:
2610 Accept certificates even if they fail to
2613 Don't use the default CA list built in
2616 Don't verify the peer certificate
2617 matches the server name
2619 domain= The peer name as advertised in its certificate.
2620 Used for verifying the correctness of the received peer
2621 certificate. If not specified the peer hostname will be
2627 -----------------------------------------------------------------------------
2630 NAME: ssl_unclean_shutdown
2634 LOC: Config.SSL.unclean_shutdown
2636 Some browsers (especially MSIE) bugs out on SSL shutdown
2643 LOC: Config.SSL.ssl_engine
2646 The OpenSSL engine to use. You will need to set this if you
2647 would like to use hardware SSL acceleration for example.
2650 NAME: sslproxy_session_ttl
2653 LOC: Config.SSL.session_ttl
2656 Sets the timeout value for SSL sessions
2659 NAME: sslproxy_session_cache_size
2662 LOC: Config.SSL.sessionCacheSize
2665 Sets the cache size to use for ssl session
2668 NAME: sslproxy_cert_sign_hash
2671 LOC: Config.SSL.certSignHash
2674 Sets the hashing algorithm to use when signing generated certificates.
2675 Valid algorithm names depend on the OpenSSL library used. The following
2676 names are usually available: sha1, sha256, sha512, and md5. Please see
2677 your OpenSSL library manual for the available hashes. By default, Squids
2678 that support this option use sha256 hashes.
2680 Squid does not forcefully purge cached certificates that were generated
2681 with an algorithm other than the currently configured one. They remain
2682 in the cache, subject to the regular cache eviction policy, and become
2683 useful if the algorithm changes again.
2688 TYPE: sslproxy_ssl_bump
2689 LOC: Config.accessList.ssl_bump
2690 DEFAULT_DOC: Become a TCP tunnel without decrypting proxied traffic.
2693 This option is consulted when a CONNECT request is received on
2694 an http_port (or a new connection is intercepted at an
2695 https_port), provided that port was configured with an ssl-bump
2696 flag. The subsequent data on the connection is either treated as
2697 HTTPS and decrypted OR tunneled at TCP level without decryption,
2698 depending on the first matching bumping "action".
2700 ssl_bump <action> [!]acl ...
2702 The following bumping actions are currently supported:
2705 Become a TCP tunnel without decrypting proxied traffic.
2706 This is the default action.
2709 Establish a secure connection with the server and, using a
2710 mimicked server certificate, with the client.
2713 Receive client (step SslBump1) or server (step SslBump2)
2714 certificate while preserving the possibility of splicing the
2715 connection. Peeking at the server certificate (during step 2)
2716 usually precludes bumping of the connection at step 3.
2719 Receive client (step SslBump1) or server (step SslBump2)
2720 certificate while preserving the possibility of bumping the
2721 connection. Staring at the server certificate (during step 2)
2722 usually precludes splicing of the connection at step 3.
2725 Close client and server connections.
2727 Backward compatibility actions available at step SslBump1:
2730 Bump the connection. Establish a secure connection with the
2731 client first, then connect to the server. This old mode does
2732 not allow Squid to mimic server SSL certificate and does not
2733 work with intercepted SSL connections.
2736 Bump the connection. Establish a secure connection with the
2737 server first, then establish a secure connection with the
2738 client, using a mimicked server certificate. Works with both
2739 CONNECT requests and intercepted SSL connections, but does
2740 not allow to make decisions based on SSL handshake info.
2743 Decide whether to bump or splice the connection based on
2744 client-to-squid and server-to-squid SSL hello messages.
2748 Same as the "splice" action.
2750 All ssl_bump rules are evaluated at each of the supported bumping
2751 steps. Rules with actions that are impossible at the current step are
2752 ignored. The first matching ssl_bump action wins and is applied at the
2753 end of the current step. If no rules match, the splice action is used.
2754 See the at_step ACL for a list of the supported SslBump steps.
2756 This clause supports both fast and slow acl types.
2757 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2759 See also: http_port ssl-bump, https_port ssl-bump, and acl at_step.
2762 # Example: Bump all requests except those originating from
2763 # localhost or those going to example.com.
2765 acl broken_sites dstdomain .example.com
2766 ssl_bump splice localhost
2767 ssl_bump splice broken_sites
2771 NAME: sslproxy_cert_error
2774 DEFAULT_DOC: Server certificate errors terminate the transaction.
2775 LOC: Config.ssl_client.cert_error
2778 Use this ACL to bypass server certificate validation errors.
2780 For example, the following lines will bypass all validation errors
2781 when talking to servers for example.com. All other
2782 validation errors will result in ERR_SECURE_CONNECT_FAIL error.
2784 acl BrokenButTrustedServers dstdomain example.com
2785 sslproxy_cert_error allow BrokenButTrustedServers
2786 sslproxy_cert_error deny all
2788 This clause only supports fast acl types.
2789 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2790 Using slow acl types may result in server crashes
2792 Without this option, all server certificate validation errors
2793 terminate the transaction to protect Squid and the client.
2795 SQUID_X509_V_ERR_INFINITE_VALIDATION error cannot be bypassed
2796 but should not happen unless your OpenSSL library is buggy.
2799 Bypassing validation errors is dangerous because an
2800 error usually implies that the server cannot be trusted
2801 and the connection may be insecure.
2803 See also: sslproxy_flags and DONT_VERIFY_PEER.
2806 NAME: sslproxy_cert_sign
2809 POSTSCRIPTUM: signUntrusted ssl::certUntrusted
2810 POSTSCRIPTUM: signSelf ssl::certSelfSigned
2811 POSTSCRIPTUM: signTrusted all
2812 TYPE: sslproxy_cert_sign
2813 LOC: Config.ssl_client.cert_sign
2816 sslproxy_cert_sign <signing algorithm> acl ...
2818 The following certificate signing algorithms are supported:
2821 Sign using the configured CA certificate which is usually
2822 placed in and trusted by end-user browsers. This is the
2823 default for trusted origin server certificates.
2826 Sign to guarantee an X509_V_ERR_CERT_UNTRUSTED browser error.
2827 This is the default for untrusted origin server certificates
2828 that are not self-signed (see ssl::certUntrusted).
2831 Sign using a self-signed certificate with the right CN to
2832 generate a X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT error in the
2833 browser. This is the default for self-signed origin server
2834 certificates (see ssl::certSelfSigned).
2836 This clause only supports fast acl types.
2838 When sslproxy_cert_sign acl(s) match, Squid uses the corresponding
2839 signing algorithm to generate the certificate and ignores all
2840 subsequent sslproxy_cert_sign options (the first match wins). If no
2841 acl(s) match, the default signing algorithm is determined by errors
2842 detected when obtaining and validating the origin server certificate.
2844 WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can
2845 be used with sslproxy_cert_adapt, but if and only if Squid is bumping a
2846 CONNECT request that carries a domain name. In all other cases (CONNECT
2847 to an IP address or an intercepted SSL connection), Squid cannot detect
2848 the domain mismatch at certificate generation time when
2849 bump-server-first is used.
2852 NAME: sslproxy_cert_adapt
2855 TYPE: sslproxy_cert_adapt
2856 LOC: Config.ssl_client.cert_adapt
2859 sslproxy_cert_adapt <adaptation algorithm> acl ...
2861 The following certificate adaptation algorithms are supported:
2864 Sets the "Not After" property to the "Not After" property of
2865 the CA certificate used to sign generated certificates.
2868 Sets the "Not Before" property to the "Not Before" property of
2869 the CA certificate used to sign generated certificates.
2871 setCommonName or setCommonName{CN}
2872 Sets Subject.CN property to the host name specified as a
2873 CN parameter or, if no explicit CN parameter was specified,
2874 extracted from the CONNECT request. It is a misconfiguration
2875 to use setCommonName without an explicit parameter for
2876 intercepted or tproxied SSL connections.
2878 This clause only supports fast acl types.
2880 Squid first groups sslproxy_cert_adapt options by adaptation algorithm.
2881 Within a group, when sslproxy_cert_adapt acl(s) match, Squid uses the
2882 corresponding adaptation algorithm to generate the certificate and
2883 ignores all subsequent sslproxy_cert_adapt options in that algorithm's
2884 group (i.e., the first match wins within each algorithm group). If no
2885 acl(s) match, the default mimicking action takes place.
2887 WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can
2888 be used with sslproxy_cert_adapt, but if and only if Squid is bumping a
2889 CONNECT request that carries a domain name. In all other cases (CONNECT
2890 to an IP address or an intercepted SSL connection), Squid cannot detect
2891 the domain mismatch at certificate generation time when
2892 bump-server-first is used.
2895 NAME: sslpassword_program
2898 LOC: Config.Program.ssl_password
2901 Specify a program used for entering SSL key passphrases
2902 when using encrypted SSL certificate keys. If not specified
2903 keys must either be unencrypted, or Squid started with the -N
2904 option to allow it to query interactively for the passphrase.
2906 The key file name is given as argument to the program allowing
2907 selection of the right password if you have multiple encrypted
2912 OPTIONS RELATING TO EXTERNAL SSL_CRTD
2913 -----------------------------------------------------------------------------
2916 NAME: sslcrtd_program
2919 DEFAULT: @DEFAULT_SSL_CRTD@ -s @DEFAULT_SSL_DB_DIR@ -M 4MB
2920 LOC: Ssl::TheConfig.ssl_crtd
2922 Specify the location and options of the executable for ssl_crtd process.
2923 @DEFAULT_SSL_CRTD@ program requires -s and -M parameters
2924 For more information use:
2925 @DEFAULT_SSL_CRTD@ -h
2928 NAME: sslcrtd_children
2929 TYPE: HelperChildConfig
2931 DEFAULT: 32 startup=5 idle=1
2932 LOC: Ssl::TheConfig.ssl_crtdChildren
2934 The maximum number of processes spawn to service ssl server.
2935 The maximum this may be safely set to is 32.
2937 The startup= and idle= options allow some measure of skew in your
2942 Sets the minimum number of processes to spawn when Squid
2943 starts or reconfigures. When set to zero the first request will
2944 cause spawning of the first child process to handle it.
2946 Starting too few children temporary slows Squid under load while it
2947 tries to spawn enough additional processes to cope with traffic.
2951 Sets a minimum of how many processes Squid is to try and keep available
2952 at all times. When traffic begins to rise above what the existing
2953 processes can handle this many more will be spawned up to the maximum
2954 configured. A minimum setting of 1 is required.
2958 Sets the maximum number of queued requests.
2959 If the queued requests exceed queue size for more than 3 minutes
2960 squid aborts its operation.
2961 The default value is set to 2*numberofchildren.
2963 You must have at least one ssl_crtd process.
2966 NAME: sslcrtvalidator_program
2970 LOC: Ssl::TheConfig.ssl_crt_validator
2972 Specify the location and options of the executable for ssl_crt_validator
2975 Usage: sslcrtvalidator_program [ttl=n] [cache=n] path ...
2978 ttl=n TTL in seconds for cached results. The default is 60 secs
2979 cache=n limit the result cache size. The default value is 2048
2982 NAME: sslcrtvalidator_children
2983 TYPE: HelperChildConfig
2985 DEFAULT: 32 startup=5 idle=1 concurrency=1
2986 LOC: Ssl::TheConfig.ssl_crt_validator_Children
2988 The maximum number of processes spawn to service SSL server.
2989 The maximum this may be safely set to is 32.
2991 The startup= and idle= options allow some measure of skew in your
2996 Sets the minimum number of processes to spawn when Squid
2997 starts or reconfigures. When set to zero the first request will
2998 cause spawning of the first child process to handle it.
3000 Starting too few children temporary slows Squid under load while it
3001 tries to spawn enough additional processes to cope with traffic.
3005 Sets a minimum of how many processes Squid is to try and keep available
3006 at all times. When traffic begins to rise above what the existing
3007 processes can handle this many more will be spawned up to the maximum
3008 configured. A minimum setting of 1 is required.
3012 The number of requests each certificate validator helper can handle in
3013 parallel. A value of 0 indicates the certficate validator does not
3014 support concurrency. Defaults to 1.
3016 When this directive is set to a value >= 1 then the protocol
3017 used to communicate with the helper is modified to include
3018 a request ID in front of the request/response. The request
3019 ID from the request must be echoed back with the response
3024 Sets the maximum number of queued requests.
3025 If the queued requests exceed queue size for more than 3 minutes
3026 squid aborts its operation.
3027 The default value is set to 2*numberofchildren.
3029 You must have at least one ssl_crt_validator process.
3033 OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
3034 -----------------------------------------------------------------------------
3042 To specify other caches in a hierarchy, use the format:
3044 cache_peer hostname type http-port icp-port [options]
3049 # hostname type port port options
3050 # -------------------- -------- ----- ----- -----------
3051 cache_peer parent.foo.net parent 3128 3130 default
3052 cache_peer sib1.foo.net sibling 3128 3130 proxy-only
3053 cache_peer sib2.foo.net sibling 3128 3130 proxy-only
3054 cache_peer example.com parent 80 0 default
3055 cache_peer cdn.example.com sibling 3128 0
3057 type: either 'parent', 'sibling', or 'multicast'.
3059 proxy-port: The port number where the peer accept HTTP requests.
3060 For other Squid proxies this is usually 3128
3061 For web servers this is usually 80
3063 icp-port: Used for querying neighbor caches about objects.
3064 Set to 0 if the peer does not support ICP or HTCP.
3065 See ICP and HTCP options below for additional details.
3068 ==== ICP OPTIONS ====
3070 You MUST also set icp_port and icp_access explicitly when using these options.
3071 The defaults will prevent peer traffic using ICP.
3074 no-query Disable ICP queries to this neighbor.
3077 Indicates the named peer is a member of a multicast group.
3078 ICP queries will not be sent directly to the peer, but ICP
3079 replies will be accepted from it.
3081 closest-only Indicates that, for ICP_OP_MISS replies, we'll only forward
3082 CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes.
3085 To only send ICP queries to this neighbor infrequently.
3086 This is used to keep the neighbor round trip time updated
3087 and is usually used in conjunction with weighted-round-robin.
3090 ==== HTCP OPTIONS ====
3092 You MUST also set htcp_port and htcp_access explicitly when using these options.
3093 The defaults will prevent peer traffic using HTCP.
3096 htcp Send HTCP, instead of ICP, queries to the neighbor.
3097 You probably also want to set the "icp-port" to 4827
3098 instead of 3130. This directive accepts a comma separated
3099 list of options described below.
3101 htcp=oldsquid Send HTCP to old Squid versions (2.5 or earlier).
3103 htcp=no-clr Send HTCP to the neighbor but without
3104 sending any CLR requests. This cannot be used with
3107 htcp=only-clr Send HTCP to the neighbor but ONLY CLR requests.
3108 This cannot be used with no-clr.
3111 Send HTCP to the neighbor including CLRs but only when
3112 they do not result from PURGE requests.
3115 Forward any HTCP CLR requests this proxy receives to the peer.
3118 ==== PEER SELECTION METHODS ====
3120 The default peer selection method is ICP, with the first responding peer
3121 being used as source. These options can be used for better load balancing.
3124 default This is a parent cache which can be used as a "last-resort"
3125 if a peer cannot be located by any of the peer-selection methods.
3126 If specified more than once, only the first is used.
3128 round-robin Load-Balance parents which should be used in a round-robin
3129 fashion in the absence of any ICP queries.
3130 weight=N can be used to add bias.
3132 weighted-round-robin
3133 Load-Balance parents which should be used in a round-robin
3134 fashion with the frequency of each parent being based on the
3135 round trip time. Closer parents are used more often.
3136 Usually used for background-ping parents.
3137 weight=N can be used to add bias.
3139 carp Load-Balance parents which should be used as a CARP array.
3140 The requests will be distributed among the parents based on the
3141 CARP load balancing hash function based on their weight.
3143 userhash Load-balance parents based on the client proxy_auth or ident username.
3145 sourcehash Load-balance parents based on the client source IP.
3148 To be used only for cache peers of type "multicast".
3149 ALL members of this multicast group have "sibling"
3150 relationship with it, not "parent". This is to a multicast
3151 group when the requested object would be fetched only from
3152 a "parent" cache, anyway. It's useful, e.g., when
3153 configuring a pool of redundant Squid proxies, being
3154 members of the same multicast group.
3157 ==== PEER SELECTION OPTIONS ====
3159 weight=N use to affect the selection of a peer during any weighted
3160 peer-selection mechanisms.
3161 The weight must be an integer; default is 1,
3162 larger weights are favored more.
3163 This option does not affect parent selection if a peering
3164 protocol is not in use.
3166 basetime=N Specify a base amount to be subtracted from round trip
3168 It is subtracted before division by weight in calculating
3169 which parent to fectch from. If the rtt is less than the
3170 base time the rtt is set to a minimal value.
3172 ttl=N Specify a TTL to use when sending multicast ICP queries
3174 Only useful when sending to a multicast group.
3175 Because we don't accept ICP replies from random
3176 hosts, you must configure other group members as
3177 peers with the 'multicast-responder' option.
3179 no-delay To prevent access to this neighbor from influencing the
3182 digest-url=URL Tell Squid to fetch the cache digest (if digests are
3183 enabled) for this host from the specified URL rather
3184 than the Squid default location.
3187 ==== CARP OPTIONS ====
3189 carp-key=key-specification
3190 use a different key than the full URL to hash against the peer.
3191 the key-specification is a comma-separated list of the keywords
3192 scheme, host, port, path, params
3193 Order is not important.
3195 ==== ACCELERATOR / REVERSE-PROXY OPTIONS ====
3197 originserver Causes this parent to be contacted as an origin server.
3198 Meant to be used in accelerator setups when the peer
3202 Set the Host header of requests forwarded to this peer.
3203 Useful in accelerator setups where the server (peer)
3204 expects a certain domain name but clients may request
3205 others. ie example.com or www.example.com
3207 no-digest Disable request of cache digests.
3210 Disables requesting ICMP RTT database (NetDB).
3213 ==== AUTHENTICATION OPTIONS ====
3216 If this is a personal/workgroup proxy and your parent
3217 requires proxy authentication.
3219 Note: The string can include URL escapes (i.e. %20 for
3220 spaces). This also means % must be written as %%.
3223 Send login details received from client to this peer.
3224 Both Proxy- and WWW-Authorization headers are passed
3225 without alteration to the peer.
3226 Authentication is not required by Squid for this to work.
3228 Note: This will pass any form of authentication but
3229 only Basic auth will work through a proxy unless the
3230 connection-auth options are also used.
3232 login=PASS Send login details received from client to this peer.
3233 Authentication is not required by this option.
3235 If there are no client-provided authentication headers
3236 to pass on, but username and password are available
3237 from an external ACL user= and password= result tags
3238 they may be sent instead.
3240 Note: To combine this with proxy_auth both proxies must
3241 share the same user database as HTTP only allows for
3242 a single login (one for proxy, one for origin server).
3243 Also be warned this will expose your users proxy
3244 password to the peer. USE WITH CAUTION
3247 Send the username to the upstream cache, but with a
3248 fixed password. This is meant to be used when the peer
3249 is in another administrative domain, but it is still
3250 needed to identify each user.
3251 The star can optionally be followed by some extra
3252 information which is added to the username. This can
3253 be used to identify this proxy to the peer, similar to
3254 the login=username:password option above.
3257 If this is a personal/workgroup proxy and your parent
3258 requires a secure proxy authentication.
3259 The first principal from the default keytab or defined by
3260 the environment variable KRB5_KTNAME will be used.
3262 WARNING: The connection may transmit requests from multiple
3263 clients. Negotiate often assumes end-to-end authentication
3264 and a single-client. Which is not strictly true here.
3266 login=NEGOTIATE:principal_name
3267 If this is a personal/workgroup proxy and your parent
3268 requires a secure proxy authentication.
3269 The principal principal_name from the default keytab or
3270 defined by the environment variable KRB5_KTNAME will be
3273 WARNING: The connection may transmit requests from multiple
3274 clients. Negotiate often assumes end-to-end authentication
3275 and a single-client. Which is not strictly true here.
3277 connection-auth=on|off
3278 Tell Squid that this peer does or not support Microsoft
3279 connection oriented authentication, and any such
3280 challenges received from there should be ignored.
3281 Default is auto to automatically determine the status
3285 ==== SSL / HTTPS / TLS OPTIONS ====
3287 ssl Encrypt connections to this peer with SSL/TLS.
3289 sslcert=/path/to/ssl/certificate
3290 A client SSL certificate to use when connecting to
3293 sslkey=/path/to/ssl/key
3294 The private SSL key corresponding to sslcert above.
3295 If 'sslkey' is not specified 'sslcert' is assumed to
3296 reference a combined file containing both the
3297 certificate and the key.
3299 sslversion=1|3|4|5|6
3300 The SSL version to use when connecting to this peer
3301 1 = automatic (default)
3307 sslcipher=... The list of valid SSL ciphers to use when connecting
3310 ssloptions=... Specify various SSL implementation options:
3312 NO_SSLv3 Disallow the use of SSLv3
3314 NO_TLSv1 Disallow the use of TLSv1.0
3316 NO_TLSv1_1 Disallow the use of TLSv1.1
3318 NO_TLSv1_2 Disallow the use of TLSv1.2
3321 Always create a new key when using
3322 temporary/ephemeral DH key exchanges
3325 Disable use of RFC5077 session tickets.
3326 Some servers may have problems
3327 understanding the TLS extension due
3328 to ambiguous specification in RFC4507.
3330 ALL Enable various bug workarounds
3331 suggested as "harmless" by OpenSSL
3332 Be warned that this reduces SSL/TLS
3333 strength to some attacks.
3335 See the OpenSSL SSL_CTX_set_options documentation for a
3338 sslcafile=... A file containing additional CA certificates to use
3339 when verifying the peer certificate.
3341 sslcapath=... A directory containing additional CA certificates to
3342 use when verifying the peer certificate.
3344 sslcrlfile=... A certificate revocation list file to use when
3345 verifying the peer certificate.
3347 sslflags=... Specify various flags modifying the SSL implementation:
3350 Accept certificates even if they fail to
3354 Don't use the default CA list built in
3358 Don't verify the peer certificate
3359 matches the server name
3361 ssldomain= The peer name as advertised in it's certificate.
3362 Used for verifying the correctness of the received peer
3363 certificate. If not specified the peer hostname will be
3367 Enable the "Front-End-Https: On" header needed when
3368 using Squid as a SSL frontend in front of Microsoft OWA.
3369 See MS KB document Q307347 for details on this header.
3370 If set to auto the header will only be added if the
3371 request is forwarded as a https:// URL.
3374 ==== GENERAL OPTIONS ====
3377 A peer-specific connect timeout.
3378 Also see the peer_connect_timeout directive.
3380 connect-fail-limit=N
3381 How many times connecting to a peer must fail before
3382 it is marked as down. Standby connection failures
3383 count towards this limit. Default is 10.
3385 allow-miss Disable Squid's use of only-if-cached when forwarding
3386 requests to siblings. This is primarily useful when
3387 icp_hit_stale is used by the sibling. To extensive use
3388 of this option may result in forwarding loops, and you
3389 should avoid having two-way peerings with this option.
3390 For example to deny peer usage on requests from peer
3391 by denying cache_peer_access if the source is a peer.
3393 max-conn=N Limit the number of concurrent connections the Squid
3394 may open to this peer, including already opened idle
3395 and standby connections. There is no peer-specific
3396 connection limit by default.
3398 A peer exceeding the limit is not used for new
3399 requests unless a standby connection is available.
3401 max-conn currently works poorly with idle persistent
3402 connections: When a peer reaches its max-conn limit,
3403 and there are idle persistent connections to the peer,
3404 the peer may not be selected because the limiting code
3405 does not know whether Squid can reuse those idle
3408 standby=N Maintain a pool of N "hot standby" connections to an
3409 UP peer, available for requests when no idle
3410 persistent connection is available (or safe) to use.
3411 By default and with zero N, no such pool is maintained.
3412 N must not exceed the max-conn limit (if any).
3414 At start or after reconfiguration, Squid opens new TCP
3415 standby connections until there are N connections
3416 available and then replenishes the standby pool as
3417 opened connections are used up for requests. A used
3418 connection never goes back to the standby pool, but
3419 may go to the regular idle persistent connection pool
3420 shared by all peers and origin servers.
3422 Squid never opens multiple new standby connections
3423 concurrently. This one-at-a-time approach minimizes
3424 flooding-like effect on peers. Furthermore, just a few
3425 standby connections should be sufficient in most cases
3426 to supply most new requests with a ready-to-use
3429 Standby connections obey server_idle_pconn_timeout.
3430 For the feature to work as intended, the peer must be
3431 configured to accept and keep them open longer than
3432 the idle timeout at the connecting Squid, to minimize
3433 race conditions typical to idle used persistent
3434 connections. Default request_timeout and
3435 server_idle_pconn_timeout values ensure such a
3438 name=xxx Unique name for the peer.
3439 Required if you have multiple peers on the same host
3440 but different ports.
3441 This name can be used in cache_peer_access and similar
3442 directives to dentify the peer.
3443 Can be used by outgoing access controls through the
3446 no-tproxy Do not use the client-spoof TPROXY support when forwarding
3447 requests to this peer. Use normal address selection instead.
3448 This overrides the spoof_client_ip ACL.
3450 proxy-only objects fetched from the peer will not be stored locally.
3454 NAME: cache_peer_access
3459 Use to limit the requests for which a neighbor proxy will be
3460 queried. Peers with no restrictions are queried for all requests.
3463 cache_peer_access cache-host allow|deny [!]aclname ...
3465 The syntax is identical to 'http_access' and the other lists of
3466 ACL elements. See the comments for 'http_access', or the
3467 Squid FAQ (http://wiki.squid-cache.org/SquidFaq/SquidAcl).
3470 NAME: neighbor_type_domain
3471 TYPE: hostdomaintype
3473 DEFAULT_DOC: The peer type from cache_peer directive is used for all requests to that peer.
3476 Modify the cache_peer neighbor type when passing requests
3477 about specific domains to the peer.
3480 neighbor_type_domain neighbor parent|sibling domain domain ...
3483 cache_peer foo.example.com parent 3128 3130
3484 neighbor_type_domain foo.example.com sibling .au .de
3486 The above configuration treats all requests to foo.example.com as a
3487 parent proxy unless the request is for a .au or .de ccTLD domain name.
3490 NAME: dead_peer_timeout
3494 LOC: Config.Timeout.deadPeer
3496 This controls how long Squid waits to declare a peer cache
3497 as "dead." If there are no ICP replies received in this
3498 amount of time, Squid will declare the peer dead and not
3499 expect to receive any further ICP replies. However, it
3500 continues to send ICP queries, and will mark the peer as
3501 alive upon receipt of the first subsequent ICP reply.
3503 This timeout also affects when Squid expects to receive ICP
3504 replies from peers. If more than 'dead_peer' seconds have
3505 passed since the last ICP reply was received, Squid will not
3506 expect to receive an ICP reply on the next query. Thus, if
3507 your time between requests is greater than this timeout, you
3508 will see a lot of requests sent DIRECT to origin servers
3509 instead of to your parents.
3512 NAME: forward_max_tries
3515 LOC: Config.forward_max_tries
3517 Controls how many different forward paths Squid will try
3518 before giving up. See also forward_timeout.
3520 NOTE: connect_retries (default: none) can make each of these
3521 possible forwarding paths be tried multiple times.
3525 MEMORY CACHE OPTIONS
3526 -----------------------------------------------------------------------------
3533 LOC: Config.memMaxSize
3535 NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
3536 IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
3537 USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
3538 THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
3540 'cache_mem' specifies the ideal amount of memory to be used
3542 * In-Transit objects
3544 * Negative-Cached objects
3546 Data for these objects are stored in 4 KB blocks. This
3547 parameter specifies the ideal upper limit on the total size of
3548 4 KB blocks allocated. In-Transit objects take the highest
3551 In-transit objects have priority over the others. When
3552 additional space is needed for incoming data, negative-cached
3553 and hot objects will be released. In other words, the
3554 negative-cached and hot objects will fill up any unused space
3555 not needed for in-transit objects.
3557 If circumstances require, this limit will be exceeded.
3558 Specifically, if your incoming request rate requires more than
3559 'cache_mem' of memory to hold in-transit objects, Squid will
3560 exceed this limit to satisfy the new requests. When the load
3561 decreases, blocks will be freed until the high-water mark is
3562 reached. Thereafter, blocks will be used to store hot
3565 If shared memory caching is enabled, Squid does not use the shared
3566 cache space for in-transit objects, but they still consume as much
3567 local memory as they need. For more details about the shared memory
3568 cache, see memory_cache_shared.
3571 NAME: maximum_object_size_in_memory
3575 LOC: Config.Store.maxInMemObjSize
3577 Objects greater than this size will not be attempted to kept in
3578 the memory cache. This should be set high enough to keep objects
3579 accessed frequently in memory to improve performance whilst low
3580 enough to keep larger objects from hoarding cache_mem.
3583 NAME: memory_cache_shared
3586 LOC: Config.memShared
3588 DEFAULT_DOC: "on" where supported if doing memory caching with multiple SMP workers.
3590 Controls whether the memory cache is shared among SMP workers.
3592 The shared memory cache is meant to occupy cache_mem bytes and replace
3593 the non-shared memory cache, although some entities may still be
3594 cached locally by workers for now (e.g., internal and in-transit
3595 objects may be served from a local memory cache even if shared memory
3596 caching is enabled).
3598 By default, the memory cache is shared if and only if all of the
3599 following conditions are satisfied: Squid runs in SMP mode with
3600 multiple workers, cache_mem is positive, and Squid environment
3601 supports required IPC primitives (e.g., POSIX shared memory segments
3602 and GCC-style atomic operations).
3604 To avoid blocking locks, shared memory uses opportunistic algorithms
3605 that do not guarantee that every cachable entity that could have been
3606 shared among SMP workers will actually be shared.
3608 Currently, entities exceeding 32KB in size cannot be shared.
3611 NAME: memory_cache_mode
3615 DEFAULT_DOC: Keep the most recently fetched objects in memory
3617 Controls which objects to keep in the memory cache (cache_mem)
3619 always Keep most recently fetched objects in memory (default)
3621 disk Only disk cache hits are kept in memory, which means
3622 an object must first be cached on disk and then hit
3623 a second time before cached in memory.
3625 network Only objects fetched from network is kept in memory
3628 NAME: memory_replacement_policy
3630 LOC: Config.memPolicy
3633 The memory replacement policy parameter determines which
3634 objects are purged from memory when memory space is needed.
3636 See cache_replacement_policy for details on algorithms.
3641 -----------------------------------------------------------------------------
3644 NAME: cache_replacement_policy
3646 LOC: Config.replPolicy
3649 The cache replacement policy parameter determines which
3650 objects are evicted (replaced) when disk space is needed.
3652 lru : Squid's original list based LRU policy
3653 heap GDSF : Greedy-Dual Size Frequency
3654 heap LFUDA: Least Frequently Used with Dynamic Aging
3655 heap LRU : LRU policy implemented using a heap
3657 Applies to any cache_dir lines listed below this directive.
3659 The LRU policies keeps recently referenced objects.
3661 The heap GDSF policy optimizes object hit rate by keeping smaller
3662 popular objects in cache so it has a better chance of getting a
3663 hit. It achieves a lower byte hit rate than LFUDA though since
3664 it evicts larger (possibly popular) objects.
3666 The heap LFUDA policy keeps popular objects in cache regardless of
3667 their size and thus optimizes byte hit rate at the expense of
3668 hit rate since one large, popular object will prevent many
3669 smaller, slightly less popular objects from being cached.
3671 Both policies utilize a dynamic aging mechanism that prevents
3672 cache pollution that can otherwise occur with frequency-based
3673 replacement policies.
3675 NOTE: if using the LFUDA replacement policy you should increase
3676 the value of maximum_object_size above its default of 4 MB to
3677 to maximize the potential byte hit rate improvement of LFUDA.
3679 For more information about the GDSF and LFUDA cache replacement
3680 policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
3681 and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
3684 NAME: minimum_object_size
3688 DEFAULT_DOC: no limit
3689 LOC: Config.Store.minObjectSize
3691 Objects smaller than this size will NOT be saved on disk. The
3692 value is specified in bytes, and the default is 0 KB, which
3693 means all responses can be stored.
3696 NAME: maximum_object_size
3700 LOC: Config.Store.maxObjectSize
3702 Set the default value for max-size parameter on any cache_dir.
3703 The value is specified in bytes, and the default is 4 MB.
3705 If you wish to get a high BYTES hit ratio, you should probably
3706 increase this (one 32 MB object hit counts for 3200 10KB
3709 If you wish to increase hit ratio more than you want to
3710 save bandwidth you should leave this low.
3712 NOTE: if using the LFUDA replacement policy you should increase
3713 this value to maximize the byte hit rate improvement of LFUDA!
3714 See cache_replacement_policy for a discussion of this policy.
3720 DEFAULT_DOC: No disk cache. Store cache ojects only in memory.
3721 LOC: Config.cacheSwap
3724 cache_dir Type Directory-Name Fs-specific-data [options]
3726 You can specify multiple cache_dir lines to spread the
3727 cache among different disk partitions.
3729 Type specifies the kind of storage system to use. Only "ufs"
3730 is built by default. To enable any of the other storage systems
3731 see the --enable-storeio configure option.
3733 'Directory' is a top-level directory where cache swap
3734 files will be stored. If you want to use an entire disk
3735 for caching, this can be the mount-point directory.
3736 The directory must exist and be writable by the Squid
3737 process. Squid will NOT create this directory for you.
3739 In SMP configurations, cache_dir must not precede the workers option
3740 and should use configuration macros or conditionals to give each
3741 worker interested in disk caching a dedicated cache directory.
3744 ==== The ufs store type ====
3746 "ufs" is the old well-known Squid storage format that has always
3750 cache_dir ufs Directory-Name Mbytes L1 L2 [options]
3752 'Mbytes' is the amount of disk space (MB) to use under this
3753 directory. The default is 100 MB. Change this to suit your
3754 configuration. Do NOT put the size of your disk drive here.
3755 Instead, if you want Squid to use the entire disk drive,
3756 subtract 20% and use that value.
3758 'L1' is the number of first-level subdirectories which
3759 will be created under the 'Directory'. The default is 16.
3761 'L2' is the number of second-level subdirectories which
3762 will be created under each first-level directory. The default
3766 ==== The aufs store type ====
3768 "aufs" uses the same storage format as "ufs", utilizing
3769 POSIX-threads to avoid blocking the main Squid process on
3770 disk-I/O. This was formerly known in Squid as async-io.
3773 cache_dir aufs Directory-Name Mbytes L1 L2 [options]
3775 see argument descriptions under ufs above
3778 ==== The diskd store type ====
3780 "diskd" uses the same storage format as "ufs", utilizing a
3781 separate process to avoid blocking the main Squid process on
3785 cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
3787 see argument descriptions under ufs above
3789 Q1 specifies the number of unacknowledged I/O requests when Squid
3790 stops opening new files. If this many messages are in the queues,
3791 Squid won't open new files. Default is 64
3793 Q2 specifies the number of unacknowledged messages when Squid
3794 starts blocking. If this many messages are in the queues,
3795 Squid blocks until it receives some replies. Default is 72
3797 When Q1 < Q2 (the default), the cache directory is optimized
3798 for lower response time at the expense of a decrease in hit
3799 ratio. If Q1 > Q2, the cache directory is optimized for
3800 higher hit ratio at the expense of an increase in response
3804 ==== The rock store type ====
3807 cache_dir rock Directory-Name Mbytes [options]
3809 The Rock Store type is a database-style storage. All cached
3810 entries are stored in a "database" file, using fixed-size slots.
3811 A single entry occupies one or more slots.
3813 If possible, Squid using Rock Store creates a dedicated kid
3814 process called "disker" to avoid blocking Squid worker(s) on disk
3815 I/O. One disker kid is created for each rock cache_dir. Diskers
3816 are created only when Squid, running in daemon mode, has support
3817 for the IpcIo disk I/O module.
3819 swap-timeout=msec: Squid will not start writing a miss to or
3820 reading a hit from disk if it estimates that the swap operation
3821 will take more than the specified number of milliseconds. By
3822 default and when set to zero, disables the disk I/O time limit
3823 enforcement. Ignored when using blocking I/O module because
3824 blocking synchronous I/O does not allow Squid to estimate the
3825 expected swap wait time.
3827 max-swap-rate=swaps/sec: Artificially limits disk access using
3828 the specified I/O rate limit. Swap out requests that
3829 would cause the average I/O rate to exceed the limit are
3830 delayed. Individual swap in requests (i.e., hits or reads) are
3831 not delayed, but they do contribute to measured swap rate and
3832 since they are placed in the same FIFO queue as swap out
3833 requests, they may wait longer if max-swap-rate is smaller.
3834 This is necessary on file systems that buffer "too
3835 many" writes and then start blocking Squid and other processes
3836 while committing those writes to disk. Usually used together
3837 with swap-timeout to avoid excessive delays and queue overflows
3838 when disk demand exceeds available disk "bandwidth". By default
3839 and when set to zero, disables the disk I/O rate limit
3840 enforcement. Currently supported by IpcIo module only.
3842 slot-size=bytes: The size of a database "record" used for
3843 storing cached responses. A cached response occupies at least
3844 one slot and all database I/O is done using individual slots so
3845 increasing this parameter leads to more disk space waste while
3846 decreasing it leads to more disk I/O overheads. Should be a
3847 multiple of your operating system I/O page size. Defaults to
3848 16KBytes. A housekeeping header is stored with each slot and
3849 smaller slot-sizes will be rejected. The header is smaller than
3853 ==== COMMON OPTIONS ====
3855 no-store no new objects should be stored to this cache_dir.
3857 min-size=n the minimum object size in bytes this cache_dir
3858 will accept. It's used to restrict a cache_dir
3859 to only store large objects (e.g. AUFS) while
3860 other stores are optimized for smaller objects
3864 max-size=n the maximum object size in bytes this cache_dir
3866 The value in maximum_object_size directive sets
3867 the default unless more specific details are
3868 available (ie a small store capacity).
3870 Note: To make optimal use of the max-size limits you should order
3871 the cache_dir lines with the smallest max-size value first.
3875 # Uncomment and adjust the following to add a disk cache directory.
3876 #cache_dir ufs @DEFAULT_SWAP_DIR@ 100 16 256
3880 NAME: store_dir_select_algorithm
3882 LOC: Config.store_dir_select_algorithm
3885 How Squid selects which cache_dir to use when the response
3886 object will fit into more than one.
3888 Regardless of which algorithm is used the cache_dir min-size
3889 and max-size parameters are obeyed. As such they can affect
3890 the selection algorithm by limiting the set of considered
3897 This algorithm is suited to caches with similar cache_dir
3898 sizes and disk speeds.
3900 The disk with the least I/O pending is selected.
3901 When there are multiple disks with the same I/O load ranking
3902 the cache_dir with most available capacity is selected.
3904 When a mix of cache_dir sizes are configured the faster disks
3905 have a naturally lower I/O loading and larger disks have more
3906 capacity. So space used to store objects and data throughput
3907 may be very unbalanced towards larger disks.
3912 This algorithm is suited to caches with unequal cache_dir
3915 Each cache_dir is selected in a rotation. The next suitable
3918 Available cache_dir capacity is only considered in relation
3919 to whether the object will fit and meets the min-size and
3920 max-size parameters.
3922 Disk I/O loading is only considered to prevent overload on slow
3923 disks. This algorithm does not spread objects by size, so any
3924 I/O loading per-disk may appear very unbalanced and volatile.
3926 If several cache_dirs use similar min-size, max-size, or other
3927 limits to to reject certain responses, then do not group such
3928 cache_dir lines together, to avoid round-robin selection bias
3929 towards the first cache_dir after the group. Instead, interleave
3930 cache_dir lines from different groups. For example:
3932 store_dir_select_algorithm round-robin
3933 cache_dir rock /hdd1 ... min-size=100000
3934 cache_dir rock /ssd1 ... max-size=99999
3935 cache_dir rock /hdd2 ... min-size=100000
3936 cache_dir rock /ssd2 ... max-size=99999
3937 cache_dir rock /hdd3 ... min-size=100000
3938 cache_dir rock /ssd3 ... max-size=99999
3941 NAME: max_open_disk_fds
3943 LOC: Config.max_open_disk_fds
3945 DEFAULT_DOC: no limit
3947 To avoid having disk as the I/O bottleneck Squid can optionally
3948 bypass the on-disk cache if more than this amount of disk file
3949 descriptors are open.
3951 A value of 0 indicates no limit.
3954 NAME: cache_swap_low
3955 COMMENT: (percent, 0-100)
3958 LOC: Config.Swap.lowWaterMark
3960 The low-water mark for cache object replacement.
3961 Replacement begins when the swap (disk) usage is above the
3962 low-water mark and attempts to maintain utilization near the
3963 low-water mark. As swap utilization gets close to high-water
3964 mark object eviction becomes more aggressive. If utilization is
3965 close to the low-water mark less replacement is done each time.
3967 Defaults are 90% and 95%. If you have a large cache, 5% could be
3968 hundreds of MB. If this is the case you may wish to set these
3969 numbers closer together.
3971 See also cache_swap_high
3974 NAME: cache_swap_high
3975 COMMENT: (percent, 0-100)
3978 LOC: Config.Swap.highWaterMark
3980 The high-water mark for cache object replacement.
3981 Replacement begins when the swap (disk) usage is above the
3982 low-water mark and attempts to maintain utilization near the
3983 low-water mark. As swap utilization gets close to high-water
3984 mark object eviction becomes more aggressive. If utilization is
3985 close to the low-water mark less replacement is done each time.
3987 Defaults are 90% and 95%. If you have a large cache, 5% could be
3988 hundreds of MB. If this is the case you may wish to set these
3989 numbers closer together.
3991 See also cache_swap_low
3996 -----------------------------------------------------------------------------
4003 DEFAULT_DOC: The format definitions squid, common, combined, referrer, useragent are built in.
4007 logformat <name> <format specification>
4009 Defines an access log format.
4011 The <format specification> is a string with embedded % format codes
4013 % format codes all follow the same basic structure where all but
4014 the formatcode is optional. Output strings are automatically escaped
4015 as required according to their context and the output format
4016 modifiers are usually not needed, but can be specified if an explicit
4017 output format is desired.
4019 % ["|[|'|#] [-] [[0]width] [{argument}] formatcode
4021 " output in quoted string format
4022 [ output in squid text log format as used by log_mime_hdrs
4023 # output in URL quoted format
4028 width minimum and/or maximum field width:
4029 [width_min][.width_max]
4030 When minimum starts with 0, the field is zero-padded.
4031 String values exceeding maximum width are truncated.
4033 {arg} argument such as header name etc
4037 % a literal % character
4038 sn Unique sequence number per log line entry
4039 err_code The ID of an error response served by Squid or
4040 a similar internal error identifier.
4041 err_detail Additional err_code-dependent error information.
4042 note The annotation specified by the argument. Also
4043 logs the adaptation meta headers set by the
4044 adaptation_meta configuration parameter.
4045 If no argument given all annotations logged.
4046 The argument may include a separator to use with
4049 By default, multiple note values are separated with ","
4050 and multiple notes are separated with "\r\n".
4051 When logging named notes with %{name}note, the
4052 explicitly configured separator is used between note
4053 values. When logging all notes with %note, the
4054 explicitly configured separator is used between
4055 individual notes. There is currently no way to
4056 specify both value and notes separators when logging
4057 all notes with %note.
4059 Connection related format codes:
4061 >a Client source IP address
4063 >p Client source port
4064 >eui Client source EUI (MAC address, EUI-48 or EUI-64 identifier)
4065 >la Local IP address the client connected to
4066 >lp Local port number the client connected to
4067 >qos Client connection TOS/DSCP value set by Squid
4068 >nfmark Client connection netfilter mark set by Squid
4070 la Local listening IP address the client connection was connected to.
4071 lp Local listening port number the client connection was connected to.
4073 <a Server IP address of the last server or peer connection
4074 <A Server FQDN or peer name
4075 <p Server port number of the last server or peer connection
4076 <la Local IP address of the last server or peer connection
4077 <lp Local port number of the last server or peer connection
4078 <qos Server connection TOS/DSCP value set by Squid
4079 <nfmark Server connection netfilter mark set by Squid
4081 Time related format codes:
4083 ts Seconds since epoch
4084 tu subsecond time (milliseconds)
4085 tl Local time. Optional strftime format argument
4086 default %d/%b/%Y:%H:%M:%S %z
4087 tg GMT time. Optional strftime format argument
4088 default %d/%b/%Y:%H:%M:%S %z
4089 tr Response time (milliseconds)
4090 dt Total time spent making DNS lookups (milliseconds)
4091 tS Approximate master transaction start time in
4092 <full seconds since epoch>.<fractional seconds> format.
4093 Currently, Squid considers the master transaction
4094 started when a complete HTTP request header initiating
4095 the transaction is received from the client. This is
4096 the same value that Squid uses to calculate transaction
4097 response time when logging %tr to access.log. Currently,
4098 Squid uses millisecond resolution for %tS values,
4099 similar to the default access.log "current time" field
4102 Access Control related format codes:
4104 et Tag returned by external acl
4105 ea Log string returned by external acl
4106 un User name (any available)
4107 ul User name from authentication
4108 ue User name from external acl helper
4109 ui User name from ident
4110 us User name from SSL
4111 credentials Client credentials. The exact meaning depends on
4112 the authentication scheme: For Basic authentication,
4113 it is the password; for Digest, the realm sent by the
4114 client; for NTLM and Negotiate, the client challenge
4115 or client credentials prefixed with "YR " or "KK ".
4117 HTTP related format codes:
4121 [http::]rm Request method (GET/POST etc)
4122 [http::]>rm Request method from client
4123 [http::]<rm Request method sent to server or peer
4124 [http::]ru Request URL from client (historic, filtered for logging)
4125 [http::]>ru Request URL from client
4126 [http::]<ru Request URL sent to server or peer
4127 [http::]>rs Request URL scheme from client
4128 [http::]<rs Request URL scheme sent to server or peer
4129 [http::]>rd Request URL domain from client
4130 [http::]<rd Request URL domain sent to server or peer
4131 [http::]>rP Request URL port from client
4132 [http::]<rP Request URL port sent to server or peer
4133 [http::]rp Request URL path excluding hostname
4134 [http::]>rp Request URL path excluding hostname from client
4135 [http::]<rp Request URL path excluding hostname sent to server or peer
4136 [http::]rv Request protocol version
4137 [http::]>rv Request protocol version from client
4138 [http::]<rv Request protocol version sent to server or peer
4140 [http::]>h Original received request header.
4141 Usually differs from the request header sent by
4142 Squid, although most fields are often preserved.
4143 Accepts optional header field name/value filter
4144 argument using name[:[separator]element] format.
4145 [http::]>ha Received request header after adaptation and
4146 redirection (pre-cache REQMOD vectoring point).
4147 Usually differs from the request header sent by
4148 Squid, although most fields are often preserved.
4149 Optional header name argument as for >h
4154 [http::]<Hs HTTP status code received from the next hop
4155 [http::]>Hs HTTP status code sent to the client
4157 [http::]<h Reply header. Optional header name argument
4160 [http::]mt MIME content type
4165 [http::]st Total size of request + reply traffic with client
4166 [http::]>st Total size of request received from client.
4167 Excluding chunked encoding bytes.
4168 [http::]<st Total size of reply sent to client (after adaptation)
4170 [http::]>sh Size of request headers received from client
4171 [http::]<sh Size of reply headers sent to client (after adaptation)
4173 [http::]<sH Reply high offset sent
4174 [http::]<sS Upstream object size
4176 [http::]<bs Number of HTTP-equivalent message body bytes
4177 received from the next hop, excluding chunked
4178 transfer encoding and control messages.
4179 Generated FTP/Gopher listings are treated as
4185 [http::]<pt Peer response time in milliseconds. The timer starts
4186 when the last request byte is sent to the next hop
4187 and stops when the last response byte is received.
4188 [http::]<tt Total time in milliseconds. The timer
4189 starts with the first connect request (or write I/O)
4190 sent to the first selected peer. The timer stops
4191 with the last I/O with the last peer.
4193 Squid handling related format codes:
4195 Ss Squid request status (TCP_MISS etc)
4196 Sh Squid hierarchy status (DEFAULT_PARENT etc)
4198 SSL-related format codes:
4200 ssl::bump_mode SslBump decision for the transaction:
4202 For CONNECT requests that initiated bumping of
4203 a connection and for any request received on
4204 an already bumped connection, Squid logs the
4205 corresponding SslBump mode ("server-first" or
4206 "client-first"). See the ssl_bump option for
4207 more information about these modes.
4209 A "none" token is logged for requests that
4210 triggered "ssl_bump" ACL evaluation matching
4211 either a "none" rule or no rules at all.
4213 In all other cases, a single dash ("-") is
4216 ssl::>sni SSL client SNI sent to Squid. Available only
4217 after the peek, stare, or splice SSL bumping
4220 If ICAP is enabled, the following code becomes available (as
4221 well as ICAP log codes documented with the icap_log option):
4223 icap::tt Total ICAP processing time for the HTTP
4224 transaction. The timer ticks when ICAP
4225 ACLs are checked and when ICAP
4226 transaction is in progress.
4228 If adaptation is enabled the following three codes become available:
4230 adapt::<last_h The header of the last ICAP response or
4231 meta-information from the last eCAP
4232 transaction related to the HTTP transaction.
4233 Like <h, accepts an optional header name
4236 adapt::sum_trs Summed adaptation transaction response
4237 times recorded as a comma-separated list in
4238 the order of transaction start time. Each time
4239 value is recorded as an integer number,
4240 representing response time of one or more
4241 adaptation (ICAP or eCAP) transaction in
4242 milliseconds. When a failed transaction is
4243 being retried or repeated, its time is not
4244 logged individually but added to the
4245 replacement (next) transaction. See also:
4248 adapt::all_trs All adaptation transaction response times.
4249 Same as adaptation_strs but response times of
4250 individual transactions are never added
4251 together. Instead, all transaction response
4252 times are recorded individually.
4254 You can prefix adapt::*_trs format codes with adaptation
4255 service name in curly braces to record response time(s) specific
4256 to that service. For example: %{my_service}adapt::sum_trs
4258 If SSL is enabled, the following formating codes become available:
4260 %ssl::>cert_subject The Subject field of the received client
4261 SSL certificate or a dash ('-') if Squid has
4262 received an invalid/malformed certificate or
4263 no certificate at all. Consider encoding the
4264 logged value because Subject often has spaces.
4266 %ssl::>cert_issuer The Issuer field of the received client
4267 SSL certificate or a dash ('-') if Squid has
4268 received an invalid/malformed certificate or
4269 no certificate at all. Consider encoding the
4270 logged value because Issuer often has spaces.
4272 The default formats available (which do not need re-defining) are:
4274 logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
4275 logformat common %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh
4276 logformat combined %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
4277 logformat referrer %ts.%03tu %>a %{Referer}>h %ru
4278 logformat useragent %>a [%tl] "%{User-Agent}>h"
4280 NOTE: When the log_mime_hdrs directive is set to ON.
4281 The squid, common and combined formats have a safely encoded copy
4282 of the mime headers appended to each line within a pair of brackets.
4284 NOTE: The common and combined formats are not quite true to the Apache definition.
4285 The logs from Squid contain an extra status and hierarchy code appended.
4289 NAME: access_log cache_access_log
4291 LOC: Config.Log.accesslogs
4292 DEFAULT_IF_NONE: daemon:@DEFAULT_ACCESS_LOG@ squid
4294 Configures whether and how Squid logs HTTP and ICP transactions.
4295 If access logging is enabled, a single line is logged for every
4296 matching HTTP or ICP request. The recommended directive formats are:
4298 access_log <module>:<place> [option ...] [acl acl ...]
4299 access_log none [acl acl ...]
4301 The following directive format is accepted but may be deprecated:
4302 access_log <module>:<place> [<logformat name> [acl acl ...]]
4304 In most cases, the first ACL name must not contain the '=' character
4305 and should not be equal to an existing logformat name. You can always
4306 start with an 'all' ACL to work around those restrictions.
4308 Will log to the specified module:place using the specified format (which
4309 must be defined in a logformat directive) those entries which match
4310 ALL the acl's specified (which must be defined in acl clauses).
4311 If no acl is specified, all requests will be logged to this destination.
4313 ===== Available options for the recommended directive format =====
4315 logformat=name Names log line format (either built-in or
4316 defined by a logformat directive). Defaults
4319 buffer-size=64KB Defines approximate buffering limit for log
4320 records (see buffered_logs). Squid should not
4321 keep more than the specified size and, hence,
4322 should flush records before the buffer becomes
4323 full to avoid overflows under normal
4324 conditions (the exact flushing algorithm is
4325 module-dependent though). The on-error option
4326 controls overflow handling.
4328 on-error=die|drop Defines action on unrecoverable errors. The
4329 'drop' action ignores (i.e., does not log)
4330 affected log records. The default 'die' action
4331 kills the affected worker. The drop action
4332 support has not been tested for modules other
4335 rotate=N Specifies the number of log file rotations to
4336 make when you run 'squid -k rotate'. The default
4337 is to obey the logfile_rotate directive. Setting
4338 rotate=0 will disable the file name rotation,
4339 but the log files are still closed and re-opened.
4340 This will enable you to rename the logfiles
4341 yourself just before sending the rotate signal.
4342 Only supported by the stdio module.
4344 ===== Modules Currently available =====
4346 none Do not log any requests matching these ACL.
4347 Do not specify Place or logformat name.
4349 stdio Write each log line to disk immediately at the completion of
4351 Place: the filename and path to be written.
4353 daemon Very similar to stdio. But instead of writing to disk the log
4354 line is passed to a daemon helper for asychronous handling instead.
4355 Place: varies depending on the daemon.
4357 log_file_daemon Place: the file name and path to be written.
4359 syslog To log each request via syslog facility.
4360 Place: The syslog facility and priority level for these entries.
4361 Place Format: facility.priority
4363 where facility could be any of:
4364 authpriv, daemon, local0 ... local7 or user.
4366 And priority could be any of:
4367 err, warning, notice, info, debug.
4369 udp To send each log line as text data to a UDP receiver.
4370 Place: The destination host name or IP and port.
4371 Place Format: //host:port
4373 tcp To send each log line as text data to a TCP receiver.
4374 Lines may be accumulated before sending (see buffered_logs).
4375 Place: The destination host name or IP and port.
4376 Place Format: //host:port
4379 access_log daemon:@DEFAULT_ACCESS_LOG@ squid
4385 LOC: Config.Log.icaplogs
4388 ICAP log files record ICAP transaction summaries, one line per
4391 The icap_log option format is:
4392 icap_log <filepath> [<logformat name> [acl acl ...]]
4393 icap_log none [acl acl ...]]
4395 Please see access_log option documentation for details. The two
4396 kinds of logs share the overall configuration approach and many
4399 ICAP processing of a single HTTP message or transaction may
4400 require multiple ICAP transactions. In such cases, multiple
4401 ICAP transaction log lines will correspond to a single access
4404 ICAP log uses logformat codes that make sense for an ICAP
4405 transaction. Header-related codes are applied to the HTTP header
4406 embedded in an ICAP server response, with the following caveats:
4407 For REQMOD, there is no HTTP response header unless the ICAP
4408 server performed request satisfaction. For RESPMOD, the HTTP
4409 request header is the header sent to the ICAP server. For
4410 OPTIONS, there are no HTTP headers.
4412 The following format codes are also available for ICAP logs:
4414 icap::<A ICAP server IP address. Similar to <A.
4416 icap::<service_name ICAP service name from the icap_service
4417 option in Squid configuration file.
4419 icap::ru ICAP Request-URI. Similar to ru.
4421 icap::rm ICAP request method (REQMOD, RESPMOD, or
4422 OPTIONS). Similar to existing rm.
4424 icap::>st Bytes sent to the ICAP server (TCP payload
4425 only; i.e., what Squid writes to the socket).
4427 icap::<st Bytes received from the ICAP server (TCP
4428 payload only; i.e., what Squid reads from
4431 icap::<bs Number of message body bytes received from the
4432 ICAP server. ICAP message body, if any, usually
4433 includes encapsulated HTTP message headers and
4434 possibly encapsulated HTTP message body. The
4435 HTTP body part is dechunked before its size is
4438 icap::tr Transaction response time (in
4439 milliseconds). The timer starts when
4440 the ICAP transaction is created and
4441 stops when the transaction is completed.
4444 icap::tio Transaction I/O time (in milliseconds). The
4445 timer starts when the first ICAP request
4446 byte is scheduled for sending. The timers
4447 stops when the last byte of the ICAP response
4450 icap::to Transaction outcome: ICAP_ERR* for all
4451 transaction errors, ICAP_OPT for OPTION
4452 transactions, ICAP_ECHO for 204
4453 responses, ICAP_MOD for message
4454 modification, and ICAP_SAT for request
4455 satisfaction. Similar to Ss.
4457 icap::Hs ICAP response status code. Similar to Hs.
4459 icap::>h ICAP request header(s). Similar to >h.
4461 icap::<h ICAP response header(s). Similar to <h.
4463 The default ICAP log format, which can be used without an explicit
4464 definition, is called icap_squid:
4466 logformat icap_squid %ts.%03tu %6icap::tr %>a %icap::to/%03icap::Hs %icap::<size %icap::rm %icap::ru% %un -/%icap::<A -
4468 See also: logformat, log_icap, and %adapt::<last_h
4471 NAME: logfile_daemon
4473 DEFAULT: @DEFAULT_LOGFILED@
4474 LOC: Log::TheConfig.logfile_daemon
4476 Specify the path to the logfile-writing daemon. This daemon is
4477 used to write the access and store logs, if configured.
4479 Squid sends a number of commands to the log daemon:
4480 L<data>\n - logfile data
4485 r<n>\n - set rotate count to <n>
4486 b<n>\n - 1 = buffer output, 0 = don't buffer output
4488 No responses is expected.
4491 NAME: stats_collection
4493 LOC: Config.accessList.stats_collection
4495 DEFAULT_DOC: Allow logging for all transactions.
4496 COMMENT: allow|deny acl acl...
4498 This options allows you to control which requests gets accounted
4499 in performance counters.
4501 This clause only supports fast acl types.
4502 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4505 NAME: cache_store_log
4508 LOC: Config.Log.store
4510 Logs the activities of the storage manager. Shows which
4511 objects are ejected from the cache, and which objects are
4512 saved and for how long.
4513 There are not really utilities to analyze this data, so you can safely
4514 disable it (the default).
4516 Store log uses modular logging outputs. See access_log for the list
4517 of modules supported.
4520 cache_store_log stdio:@DEFAULT_STORE_LOG@
4521 cache_store_log daemon:@DEFAULT_STORE_LOG@
4524 NAME: cache_swap_state cache_swap_log
4526 LOC: Config.Log.swap
4528 DEFAULT_DOC: Store the journal inside its cache_dir
4530 Location for the cache "swap.state" file. This index file holds
4531 the metadata of objects saved on disk. It is used to rebuild
4532 the cache during startup. Normally this file resides in each
4533 'cache_dir' directory, but you may specify an alternate
4534 pathname here. Note you must give a full filename, not just
4535 a directory. Since this is the index for the whole object
4536 list you CANNOT periodically rotate it!
4538 If %s can be used in the file name it will be replaced with a
4539 a representation of the cache_dir name where each / is replaced
4540 with '.'. This is needed to allow adding/removing cache_dir
4541 lines when cache_swap_log is being used.
4543 If have more than one 'cache_dir', and %s is not used in the name
4544 these swap logs will have names such as:
4550 The numbered extension (which is added automatically)
4551 corresponds to the order of the 'cache_dir' lines in this
4552 configuration file. If you change the order of the 'cache_dir'
4553 lines in this file, these index files will NOT correspond to
4554 the correct 'cache_dir' entry (unless you manually rename
4555 them). We recommend you do NOT use this option. It is
4556 better to keep these index files in each 'cache_dir' directory.
4559 NAME: logfile_rotate
4562 LOC: Config.Log.rotateNumber
4564 Specifies the default number of logfile rotations to make when you
4565 type 'squid -k rotate'. The default is 10, which will rotate
4566 with extensions 0 through 9. Setting logfile_rotate to 0 will
4567 disable the file name rotation, but the logfiles are still closed
4568 and re-opened. This will enable you to rename the logfiles
4569 yourself just before sending the rotate signal.
4571 Note, from Squid-3.1 this option is only a default for cache.log,
4572 that log can be rotated separately by using debug_options.
4574 Note, from Squid-3.6 this option is only a default for access.log
4575 recorded by stdio: module. Those logs can be rotated separately by
4576 using the rotate=N option on their access_log directive.
4578 Note, the 'squid -k rotate' command normally sends a USR1
4579 signal to the running squid process. In certain situations
4580 (e.g. on Linux with Async I/O), USR1 is used for other
4581 purposes, so -k rotate uses another signal. It is best to get
4582 in the habit of using 'squid -k rotate' instead of 'kill -USR1
4589 DEFAULT: @DEFAULT_MIME_TABLE@
4590 LOC: Config.mimeTablePathname
4592 Path to Squid's icon configuration file.
4594 You shouldn't need to change this, but the default file contains
4595 examples and formatting information if you do.
4601 LOC: Config.onoff.log_mime_hdrs
4604 The Cache can record both the request and the response MIME
4605 headers for each HTTP transaction. The headers are encoded
4606 safely and will appear as two bracketed fields at the end of
4607 the access log (for either the native or httpd-emulated log
4608 formats). To enable this logging set log_mime_hdrs to 'on'.
4613 DEFAULT: @DEFAULT_PID_FILE@
4614 LOC: Config.pidFilename
4616 A filename to write the process-id to. To disable, enter "none".
4619 NAME: client_netmask
4621 LOC: Config.Addrs.client_netmask
4623 DEFAULT_DOC: Log full client IP address
4625 A netmask for client addresses in logfiles and cachemgr output.
4626 Change this to protect the privacy of your cache clients.
4627 A netmask of 255.255.255.0 will log all IP's in that range with
4628 the last digit set to '0'.
4631 NAME: strip_query_terms
4633 LOC: Config.onoff.strip_query_terms
4636 By default, Squid strips query terms from requested URLs before
4637 logging. This protects your user's privacy and reduces log size.
4639 When investigating HIT/MISS or other caching behaviour you
4640 will need to disable this to see the full URL used by Squid.
4647 LOC: Config.onoff.buffered_logs
4649 Whether to write/send access_log records ASAP or accumulate them and
4650 then write/send them in larger chunks. Buffering may improve
4651 performance because it decreases the number of I/Os. However,
4652 buffering increases the delay before log records become available to
4653 the final recipient (e.g., a disk file or logging daemon) and,
4654 hence, increases the risk of log records loss.
4656 Note that even when buffered_logs are off, Squid may have to buffer
4657 records if it cannot write/send them immediately due to pending I/Os
4658 (e.g., the I/O writing the previous log record) or connectivity loss.
4660 Currently honored by 'daemon' and 'tcp' access_log modules only.
4663 NAME: netdb_filename
4665 DEFAULT: stdio:@DEFAULT_NETDB_FILE@
4666 LOC: Config.netdbFilename
4669 Where Squid stores it's netdb journal.
4670 When enabled this journal preserves netdb state between restarts.
4672 To disable, enter "none".
4676 OPTIONS FOR TROUBLESHOOTING
4677 -----------------------------------------------------------------------------
4682 DEFAULT_IF_NONE: @DEFAULT_CACHE_LOG@
4683 LOC: Debug::cache_log
4685 Squid administrative logging file.
4687 This is where general information about Squid behavior goes. You can
4688 increase the amount of data logged to this file and how often it is
4689 rotated with "debug_options"
4695 DEFAULT_DOC: Log all critical and important messages.
4696 LOC: Debug::debugOptions
4698 Logging options are set as section,level where each source file
4699 is assigned a unique section. Lower levels result in less
4700 output, Full debugging (level 9) can result in a very large
4701 log file, so be careful.
4703 The magic word "ALL" sets debugging levels for all sections.
4704 The default is to run with "ALL,1" to record important warnings.
4706 The rotate=N option can be used to keep more or less of these logs
4707 than would otherwise be kept by logfile_rotate.
4708 For most uses a single log should be enough to monitor current
4709 events affecting Squid.
4714 LOC: Config.coredump_dir
4715 DEFAULT_IF_NONE: none
4716 DEFAULT_DOC: Use the directory from where Squid was started.
4718 By default Squid leaves core files in the directory from where
4719 it was started. If you set 'coredump_dir' to a directory
4720 that exists, Squid will chdir() to that directory at startup
4721 and coredump files will be left there.
4725 # Leave coredumps in the first cache dir
4726 coredump_dir @DEFAULT_SWAP_DIR@
4732 OPTIONS FOR FTP GATEWAYING
4733 -----------------------------------------------------------------------------
4739 LOC: Config.Ftp.anon_user
4741 If you want the anonymous login password to be more informative
4742 (and enable the use of picky FTP servers), set this to something
4743 reasonable for your domain, like wwwuser@somewhere.net
4745 The reason why this is domainless by default is the
4746 request can be made on the behalf of a user in any domain,
4747 depending on how the cache is used.
4748 Some FTP server also validate the email address is valid
4749 (for example perl.com).
4755 LOC: Config.Ftp.passive
4757 If your firewall does not allow Squid to use passive
4758 connections, turn off this option.
4760 Use of ftp_epsv_all option requires this to be ON.
4766 LOC: Config.Ftp.epsv_all
4768 FTP Protocol extensions permit the use of a special "EPSV ALL" command.
4770 NATs may be able to put the connection on a "fast path" through the
4771 translator, as the EPRT command will never be used and therefore,
4772 translation of the data portion of the segments will never be needed.
4774 When a client only expects to do two-way FTP transfers this may be
4776 If squid finds that it must do a three-way FTP transfer after issuing
4777 an EPSV ALL command, the FTP session will fail.
4779 If you have any doubts about this option do not use it.
4780 Squid will nicely attempt all other connection methods.
4782 Requires ftp_passive to be ON (default) for any effect.
4788 LOC: Config.accessList.ftp_epsv
4790 FTP Protocol extensions permit the use of a special "EPSV" command.
4792 NATs may be able to put the connection on a "fast path" through the
4793 translator using EPSV, as the EPRT command will never be used
4794 and therefore, translation of the data portion of the segments
4795 will never be needed.
4797 EPSV is often required to interoperate with FTP servers on IPv6
4798 networks. On the other hand, it may break some IPv4 servers.
4800 By default, EPSV may try EPSV with any FTP server. To fine tune
4801 that decision, you may restrict EPSV to certain clients or servers
4804 ftp_epsv allow|deny al1 acl2 ...
4806 WARNING: Disabling EPSV may cause problems with external NAT and IPv6.
4808 Only fast ACLs are supported.
4809 Requires ftp_passive to be ON (default) for any effect.
4815 LOC: Config.Ftp.eprt
4817 FTP Protocol extensions permit the use of a special "EPRT" command.
4819 This extension provides a protocol neutral alternative to the
4820 IPv4-only PORT command. When supported it enables active FTP data
4821 channels over IPv6 and efficient NAT handling.
4823 Turning this OFF will prevent EPRT being attempted and will skip
4824 straight to using PORT for IPv4 servers.
4826 Some devices are known to not handle this extension correctly and
4827 may result in crashes. Devices which suport EPRT enough to fail
4828 cleanly will result in Squid attempting PORT anyway. This directive
4829 should only be disabled when EPRT results in device failures.
4831 WARNING: Doing so will convert Squid back to the old behavior with all
4832 the related problems with external NAT devices/layers and IPv4-only FTP.
4835 NAME: ftp_sanitycheck
4838 LOC: Config.Ftp.sanitycheck
4840 For security and data integrity reasons Squid by default performs
4841 sanity checks of the addresses of FTP data connections ensure the
4842 data connection is to the requested server. If you need to allow
4843 FTP connections to servers using another IP address for the data
4844 connection turn this off.
4847 NAME: ftp_telnet_protocol
4850 LOC: Config.Ftp.telnet
4852 The FTP protocol is officially defined to use the telnet protocol
4853 as transport channel for the control connection. However, many
4854 implementations are broken and does not respect this aspect of
4857 If you have trouble accessing files with ASCII code 255 in the
4858 path or similar problems involving this ASCII code you can
4859 try setting this directive to off. If that helps, report to the
4860 operator of the FTP server in question that their FTP server
4861 is broken and does not follow the FTP standard.
4865 OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
4866 -----------------------------------------------------------------------------
4871 DEFAULT: @DEFAULT_DISKD@
4872 LOC: Config.Program.diskd
4874 Specify the location of the diskd executable.
4875 Note this is only useful if you have compiled in
4876 diskd as one of the store io modules.
4879 NAME: unlinkd_program
4882 DEFAULT: @DEFAULT_UNLINKD@
4883 LOC: Config.Program.unlinkd
4885 Specify the location of the executable for file deletion process.
4888 NAME: pinger_program
4890 DEFAULT: @DEFAULT_PINGER@
4891 LOC: Config.pinger.program
4894 Specify the location of the executable for the pinger process.
4900 LOC: Config.pinger.enable
4903 Control whether the pinger is active at run-time.
4904 Enables turning ICMP pinger on and off with a simple
4905 squid -k reconfigure.
4910 OPTIONS FOR URL REWRITING
4911 -----------------------------------------------------------------------------
4914 NAME: url_rewrite_program redirect_program
4916 LOC: Config.Program.redirect
4919 Specify the location of the executable URL rewriter to use.
4920 Since they can perform almost any function there isn't one included.
4922 For each requested URL, the rewriter will receive on line with the format
4924 [channel-ID <SP>] URL [<SP> extras]<NL>
4926 See url_rewrite_extras on how to send "extras" with optional values to
4928 After processing the request the helper must reply using the following format:
4930 [channel-ID <SP>] result [<SP> kv-pairs]
4932 The result code can be:
4934 OK status=30N url="..."
4935 Redirect the URL to the one supplied in 'url='.
4936 'status=' is optional and contains the status code to send
4937 the client in Squids HTTP response. It must be one of the
4938 HTTP redirect status codes: 301, 302, 303, 307, 308.
4939 When no status is given Squid will use 302.
4941 OK rewrite-url="..."
4942 Rewrite the URL to the one supplied in 'rewrite-url='.
4943 The new URL is fetched directly by Squid and returned to
4944 the client as the response to its request.
4947 When neither of url= and rewrite-url= are sent Squid does
4951 Do not change the URL.
4954 An internal error occurred in the helper, preventing
4955 a result being identified. The 'message=' key name is
4956 reserved for delivering a log message.
4959 In addition to the above kv-pairs Squid also understands the following
4960 optional kv-pairs received from URL rewriters:
4962 Associates a TAG with the client TCP connection.
4963 The TAG is treated as a regular annotation but persists across
4964 future requests on the client connection rather than just the
4965 current request. A helper may update the TAG during subsequent
4966 requests be returning a new kv-pair.
4968 When using the concurrency= option the protocol is changed by
4969 introducing a query channel tag in front of the request/response.
4970 The query channel tag is a number between 0 and concurrency-1.
4971 This value must be echoed back unchanged to Squid as the first part
4972 of the response relating to its request.
4974 WARNING: URL re-writing ability should be avoided whenever possible.
4975 Use the URL redirect form of response instead.
4977 Re-write creates a difference in the state held by the client
4978 and server. Possibly causing confusion when the server response
4979 contains snippets of its view state. Embeded URLs, response
4980 and content Location headers, etc. are not re-written by this
4983 By default, a URL rewriter is not used.
4986 NAME: url_rewrite_children redirect_children
4987 TYPE: HelperChildConfig
4988 DEFAULT: 20 startup=0 idle=1 concurrency=0
4989 LOC: Config.redirectChildren
4991 The maximum number of redirector processes to spawn. If you limit
4992 it too few Squid will have to wait for them to process a backlog of
4993 URLs, slowing it down. If you allow too many they will use RAM
4994 and other system resources noticably.
4996 The startup= and idle= options allow some measure of skew in your
5001 Sets a minimum of how many processes are to be spawned when Squid
5002 starts or reconfigures. When set to zero the first request will
5003 cause spawning of the first child process to handle it.
5005 Starting too few will cause an initial slowdown in traffic as Squid
5006 attempts to simultaneously spawn enough processes to cope.
5010 Sets a minimum of how many processes Squid is to try and keep available
5011 at all times. When traffic begins to rise above what the existing
5012 processes can handle this many more will be spawned up to the maximum
5013 configured. A minimum setting of 1 is required.
5017 The number of requests each redirector helper can handle in
5018 parallel. Defaults to 0 which indicates the redirector
5019 is a old-style single threaded redirector.
5021 When this directive is set to a value >= 1 then the protocol
5022 used to communicate with the helper is modified to include
5023 an ID in front of the request/response. The ID from the request
5024 must be echoed back with the response to that request.
5028 Sets the maximum number of queued requests.
5029 If the queued requests exceed queue size and redirector_bypass
5030 configuration option is set, then redirector is bypassed. Otherwise, if
5031 overloading persists squid may abort its operation.
5032 The default value is set to 2*numberofchildren.
5035 NAME: url_rewrite_host_header redirect_rewrites_host_header
5038 LOC: Config.onoff.redir_rewrites_host
5040 To preserve same-origin security policies in browsers and
5041 prevent Host: header forgery by redirectors Squid rewrites
5042 any Host: header in redirected requests.
5044 If you are running an accelerator this may not be a wanted
5045 effect of a redirector. This directive enables you disable
5046 Host: alteration in reverse-proxy traffic.
5048 WARNING: Entries are cached on the result of the URL rewriting
5049 process, so be careful if you have domain-virtual hosts.
5051 WARNING: Squid and other software verifies the URL and Host
5052 are matching, so be careful not to relay through other proxies
5053 or inspecting firewalls with this disabled.
5056 NAME: url_rewrite_access redirector_access
5059 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
5060 LOC: Config.accessList.redirector
5062 If defined, this access list specifies which requests are
5063 sent to the redirector processes.
5065 This clause supports both fast and slow acl types.
5066 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5069 NAME: url_rewrite_bypass redirector_bypass
5071 LOC: Config.onoff.redirector_bypass
5074 When this is 'on', a request will not go through the
5075 redirector if all the helpers are busy. If this is 'off'
5076 and the redirector queue grows too large, Squid will exit
5077 with a FATAL error and ask you to increase the number of
5078 redirectors. You should only enable this if the redirectors
5079 are not critical to your caching system. If you use
5080 redirectors for access control, and you enable this option,
5081 users may have access to pages they should not
5082 be allowed to request.
5083 This options sets default queue-size option of the url_rewrite_children
5087 NAME: url_rewrite_extras
5088 TYPE: TokenOrQuotedString
5089 LOC: Config.redirector_extras
5090 DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp"
5092 Specifies a string to be append to request line format for the
5093 rewriter helper. "Quoted" format values may contain spaces and
5094 logformat %macros. In theory, any logformat %macro can be used.
5095 In practice, a %macro expands as a dash (-) if the helper request is
5096 sent before the required macro information is available to Squid.
5099 NAME: url_rewrite_timeout
5100 TYPE: UrlHelperTimeout
5101 LOC: Config.onUrlRewriteTimeout
5103 DEFAULT_DOC: Squid waits for the helper response forever
5105 Squid times active requests to redirector. The timeout value and Squid
5106 reaction to a timed out request are configurable using the following
5109 url_rewrite_timeout timeout time-units on_timeout=<action> [response=<quoted-response>]
5111 supported timeout actions:
5112 fail Squid return a ERR_GATEWAY_FAILURE error page
5114 bypass Do not re-write the URL
5116 retry Send the lookup to the helper again
5118 use_configured_response
5119 Use the <quoted-response> as helper response
5123 OPTIONS FOR STORE ID
5124 -----------------------------------------------------------------------------
5127 NAME: store_id_program storeurl_rewrite_program
5129 LOC: Config.Program.store_id
5132 Specify the location of the executable StoreID helper to use.
5133 Since they can perform almost any function there isn't one included.
5135 For each requested URL, the helper will receive one line with the format
5137 [channel-ID <SP>] URL [<SP> extras]<NL>
5140 After processing the request the helper must reply using the following format:
5142 [channel-ID <SP>] result [<SP> kv-pairs]
5144 The result code can be:
5147 Use the StoreID supplied in 'store-id='.
5150 The default is to use HTTP request URL as the store ID.
5153 An internal error occured in the helper, preventing
5154 a result being identified.
5156 In addition to the above kv-pairs Squid also understands the following
5157 optional kv-pairs received from URL rewriters:
5159 Associates a TAG with the client TCP connection.
5160 Please see url_rewrite_program related documentation for this
5163 Helper programs should be prepared to receive and possibly ignore
5164 additional whitespace-separated tokens on each input line.
5166 When using the concurrency= option the protocol is changed by
5167 introducing a query channel tag in front of the request/response.
5168 The query channel tag is a number between 0 and concurrency-1.
5169 This value must be echoed back unchanged to Squid as the first part
5170 of the response relating to its request.
5172 NOTE: when using StoreID refresh_pattern will apply to the StoreID
5173 returned from the helper and not the URL.
5175 WARNING: Wrong StoreID value returned by a careless helper may result
5176 in the wrong cached response returned to the user.
5178 By default, a StoreID helper is not used.
5181 NAME: store_id_extras
5182 TYPE: TokenOrQuotedString
5183 LOC: Config.storeId_extras
5184 DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp"
5186 Specifies a string to be append to request line format for the
5187 StoreId helper. "Quoted" format values may contain spaces and
5188 logformat %macros. In theory, any logformat %macro can be used.
5189 In practice, a %macro expands as a dash (-) if the helper request is
5190 sent before the required macro information is available to Squid.
5193 NAME: store_id_children storeurl_rewrite_children
5194 TYPE: HelperChildConfig
5195 DEFAULT: 20 startup=0 idle=1 concurrency=0
5196 LOC: Config.storeIdChildren
5198 The maximum number of StoreID helper processes to spawn. If you limit
5199 it too few Squid will have to wait for them to process a backlog of
5200 requests, slowing it down. If you allow too many they will use RAM
5201 and other system resources noticably.
5203 The startup= and idle= options allow some measure of skew in your
5208 Sets a minimum of how many processes are to be spawned when Squid
5209 starts or reconfigures. When set to zero the first request will
5210 cause spawning of the first child process to handle it.
5212 Starting too few will cause an initial slowdown in traffic as Squid
5213 attempts to simultaneously spawn enough processes to cope.
5217 Sets a minimum of how many processes Squid is to try and keep available
5218 at all times. When traffic begins to rise above what the existing
5219 processes can handle this many more will be spawned up to the maximum
5220 configured. A minimum setting of 1 is required.
5224 The number of requests each storeID helper can handle in
5225 parallel. Defaults to 0 which indicates the helper
5226 is a old-style single threaded program.
5228 When this directive is set to a value >= 1 then the protocol
5229 used to communicate with the helper is modified to include
5230 an ID in front of the request/response. The ID from the request
5231 must be echoed back with the response to that request.
5235 Sets the maximum number of queued requests.
5236 If the queued requests exceed queue size and store_id_bypass
5237 configuration option is set, then storeID helper is bypassed. Otherwise,
5238 if overloading persists squid may abort its operation.
5239 The default value is set to 2*numberofchildren.
5242 NAME: store_id_access storeurl_rewrite_access
5245 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
5246 LOC: Config.accessList.store_id
5248 If defined, this access list specifies which requests are
5249 sent to the StoreID processes. By default all requests
5252 This clause supports both fast and slow acl types.
5253 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5256 NAME: store_id_bypass storeurl_rewrite_bypass
5258 LOC: Config.onoff.store_id_bypass
5261 When this is 'on', a request will not go through the
5262 helper if all helpers are busy. If this is 'off'
5263 and the helper queue grows too large, Squid will exit
5264 with a FATAL error and ask you to increase the number of
5265 helpers. You should only enable this if the helperss
5266 are not critical to your caching system. If you use
5267 helpers for critical caching components, and you enable this
5268 option, users may not get objects from cache.
5269 This options sets default queue-size option of the store_id_children
5274 OPTIONS FOR TUNING THE CACHE
5275 -----------------------------------------------------------------------------
5278 NAME: cache no_cache
5281 DEFAULT_DOC: By default, this directive is unused and has no effect.
5282 LOC: Config.accessList.noCache
5284 Requests denied by this directive will not be served from the cache
5285 and their responses will not be stored in the cache. This directive
5286 has no effect on other transactions and on already cached responses.
5288 This clause supports both fast and slow acl types.
5289 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5291 This and the two other similar caching directives listed below are
5292 checked at different transaction processing stages, have different
5293 access to response information, affect different cache operations,
5294 and differ in slow ACLs support:
5296 * cache: Checked before Squid makes a hit/miss determination.
5297 No access to reply information!
5298 Denies both serving a hit and storing a miss.
5299 Supports both fast and slow ACLs.
5300 * send_hit: Checked after a hit was detected.
5301 Has access to reply (hit) information.
5302 Denies serving a hit only.
5303 Supports fast ACLs only.
5304 * store_miss: Checked before storing a cachable miss.
5305 Has access to reply (miss) information.
5306 Denies storing a miss only.
5307 Supports fast ACLs only.
5309 If you are not sure which of the three directives to use, apply the
5310 following decision logic:
5312 * If your ACL(s) are of slow type _and_ need response info, redesign.
5313 Squid does not support that particular combination at this time.
5315 * If your directive ACL(s) are of slow type, use "cache"; and/or
5316 * if your directive ACL(s) need no response info, use "cache".
5318 * If you do not want the response cached, use store_miss; and/or
5319 * if you do not want a hit on a cached response, use send_hit.
5325 DEFAULT_DOC: By default, this directive is unused and has no effect.
5326 LOC: Config.accessList.sendHit
5328 Responses denied by this directive will not be served from the cache
5329 (but may still be cached, see store_miss). This directive has no
5330 effect on the responses it allows and on the cached objects.
5332 Please see the "cache" directive for a summary of differences among
5333 store_miss, send_hit, and cache directives.
5335 Unlike the "cache" directive, send_hit only supports fast acl
5336 types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5340 # apply custom Store ID mapping to some URLs
5341 acl MapMe dstdomain .c.example.com
5342 store_id_program ...
5343 store_id_access allow MapMe
5345 # but prevent caching of special responses
5346 # such as 302 redirects that cause StoreID loops
5347 acl Ordinary http_status 200-299
5348 store_miss deny MapMe !Ordinary
5350 # and do not serve any previously stored special responses
5351 # from the cache (in case they were already cached before
5352 # the above store_miss rule was in effect).
5353 send_hit deny MapMe !Ordinary
5359 DEFAULT_DOC: By default, this directive is unused and has no effect.
5360 LOC: Config.accessList.storeMiss
5362 Responses denied by this directive will not be cached (but may still
5363 be served from the cache, see send_hit). This directive has no
5364 effect on the responses it allows and on the already cached responses.
5366 Please see the "cache" directive for a summary of differences among
5367 store_miss, send_hit, and cache directives. See the
5368 send_hit directive for a usage example.
5370 Unlike the "cache" directive, store_miss only supports fast acl
5371 types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5377 LOC: Config.maxStale
5380 This option puts an upper limit on how stale content Squid
5381 will serve from the cache if cache validation fails.
5382 Can be overriden by the refresh_pattern max-stale option.
5385 NAME: refresh_pattern
5386 TYPE: refreshpattern
5390 usage: refresh_pattern [-i] regex min percent max [options]
5392 By default, regular expressions are CASE-SENSITIVE. To make
5393 them case-insensitive, use the -i option.
5395 'Min' is the time (in minutes) an object without an explicit
5396 expiry time should be considered fresh. The recommended
5397 value is 0, any higher values may cause dynamic applications
5398 to be erroneously cached unless the application designer
5399 has taken the appropriate actions.
5401 'Percent' is a percentage of the objects age (time since last
5402 modification age) an object without explicit expiry time
5403 will be considered fresh.
5405 'Max' is an upper limit on how long objects without an explicit
5406 expiry time will be considered fresh.
5408 options: override-expire
5413 ignore-must-revalidate
5420 override-expire enforces min age even if the server
5421 sent an explicit expiry time (e.g., with the
5422 Expires: header or Cache-Control: max-age). Doing this
5423 VIOLATES the HTTP standard. Enabling this feature
5424 could make you liable for problems which it causes.
5426 Note: override-expire does not enforce staleness - it only extends
5427 freshness / min. If the server returns a Expires time which
5428 is longer than your max time, Squid will still consider
5429 the object fresh for that period of time.
5431 override-lastmod enforces min age even on objects
5432 that were modified recently.
5434 reload-into-ims changes a client no-cache or ``reload''
5435 request for a cached entry into a conditional request using
5436 If-Modified-Since and/or If-None-Match headers, provided the
5437 cached entry has a Last-Modified and/or a strong ETag header.
5438 Doing this VIOLATES the HTTP standard. Enabling this feature
5439 could make you liable for problems which it causes.
5441 ignore-reload ignores a client no-cache or ``reload''
5442 header. Doing this VIOLATES the HTTP standard. Enabling
5443 this feature could make you liable for problems which
5446 ignore-no-store ignores any ``Cache-control: no-store''
5447 headers received from a server. Doing this VIOLATES
5448 the HTTP standard. Enabling this feature could make you
5449 liable for problems which it causes.
5451 ignore-must-revalidate ignores any ``Cache-Control: must-revalidate``
5452 headers received from a server. Doing this VIOLATES
5453 the HTTP standard. Enabling this feature could make you
5454 liable for problems which it causes.
5456 ignore-private ignores any ``Cache-control: private''
5457 headers received from a server. Doing this VIOLATES
5458 the HTTP standard. Enabling this feature could make you
5459 liable for problems which it causes.
5461 ignore-auth caches responses to requests with authorization,
5462 as if the originserver had sent ``Cache-control: public''
5463 in the response header. Doing this VIOLATES the HTTP standard.
5464 Enabling this feature could make you liable for problems which
5467 refresh-ims causes squid to contact the origin server
5468 when a client issues an If-Modified-Since request. This
5469 ensures that the client will receive an updated version
5470 if one is available.
5472 store-stale stores responses even if they don't have explicit
5473 freshness or a validator (i.e., Last-Modified or an ETag)
5474 present, or if they're already stale. By default, Squid will
5475 not cache such responses because they usually can't be
5476 reused. Note that such responses will be stale by default.
5478 max-stale=NN provide a maximum staleness factor. Squid won't
5479 serve objects more stale than this even if it failed to
5480 validate the object. Default: use the max_stale global limit.
5482 Basically a cached object is:
5484 FRESH if expires < now, else STALE
5486 FRESH if lm-factor < percent, else STALE
5490 The refresh_pattern lines are checked in the order listed here.
5491 The first entry which matches is used. If none of the entries
5492 match the default will be used.
5494 Note, you must uncomment all the default lines if you want
5495 to change one. The default setting is only active if none is
5501 # Add any of your own refresh_pattern entries above these.
5503 refresh_pattern ^ftp: 1440 20% 10080
5504 refresh_pattern ^gopher: 1440 0% 1440
5505 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
5506 refresh_pattern . 0 20% 4320
5510 NAME: quick_abort_min
5514 LOC: Config.quickAbort.min
5517 NAME: quick_abort_max
5521 LOC: Config.quickAbort.max
5524 NAME: quick_abort_pct
5528 LOC: Config.quickAbort.pct
5530 The cache by default continues downloading aborted requests
5531 which are almost completed (less than 16 KB remaining). This
5532 may be undesirable on slow (e.g. SLIP) links and/or very busy
5533 caches. Impatient users may tie up file descriptors and
5534 bandwidth by repeatedly requesting and immediately aborting
5537 When the user aborts a request, Squid will check the
5538 quick_abort values to the amount of data transferred until
5541 If the transfer has less than 'quick_abort_min' KB remaining,
5542 it will finish the retrieval.
5544 If the transfer has more than 'quick_abort_max' KB remaining,
5545 it will abort the retrieval.
5547 If more than 'quick_abort_pct' of the transfer has completed,
5548 it will finish the retrieval.
5550 If you do not want any retrieval to continue after the client
5551 has aborted, set both 'quick_abort_min' and 'quick_abort_max'
5554 If you want retrievals to always continue if they are being
5555 cached set 'quick_abort_min' to '-1 KB'.
5558 NAME: read_ahead_gap
5559 COMMENT: buffer-size
5561 LOC: Config.readAheadGap
5564 The amount of data the cache will buffer ahead of what has been
5565 sent to the client when retrieving an object from another server.
5569 IFDEF: USE_HTTP_VIOLATIONS
5572 LOC: Config.negativeTtl
5575 Set the Default Time-to-Live (TTL) for failed requests.
5576 Certain types of failures (such as "connection refused" and
5577 "404 Not Found") are able to be negatively-cached for a short time.
5578 Modern web servers should provide Expires: header, however if they
5579 do not this can provide a minimum TTL.
5580 The default is not to cache errors with unknown expiry details.
5582 Note that this is different from negative caching of DNS lookups.
5584 WARNING: Doing this VIOLATES the HTTP standard. Enabling
5585 this feature could make you liable for problems which it
5589 NAME: positive_dns_ttl
5592 LOC: Config.positiveDnsTtl
5595 Upper limit on how long Squid will cache positive DNS responses.
5596 Default is 6 hours (360 minutes). This directive must be set
5597 larger than negative_dns_ttl.
5600 NAME: negative_dns_ttl
5603 LOC: Config.negativeDnsTtl
5606 Time-to-Live (TTL) for negative caching of failed DNS lookups.
5607 This also sets the lower cache limit on positive lookups.
5608 Minimum value is 1 second, and it is not recommendable to go
5609 much below 10 seconds.
5612 NAME: range_offset_limit
5613 COMMENT: size [acl acl...]
5615 LOC: Config.rangeOffsetLimit
5618 usage: (size) [units] [[!]aclname]
5620 Sets an upper limit on how far (number of bytes) into the file
5621 a Range request may be to cause Squid to prefetch the whole file.
5622 If beyond this limit, Squid forwards the Range request as it is and
5623 the result is NOT cached.
5625 This is to stop a far ahead range request (lets say start at 17MB)
5626 from making Squid fetch the whole object up to that point before
5627 sending anything to the client.
5629 Multiple range_offset_limit lines may be specified, and they will
5630 be searched from top to bottom on each request until a match is found.
5631 The first match found will be used. If no line matches a request, the
5632 default limit of 0 bytes will be used.
5634 'size' is the limit specified as a number of units.
5636 'units' specifies whether to use bytes, KB, MB, etc.
5637 If no units are specified bytes are assumed.
5639 A size of 0 causes Squid to never fetch more than the
5640 client requested. (default)
5642 A size of 'none' causes Squid to always fetch the object from the
5643 beginning so it may cache the result. (2.0 style)
5645 'aclname' is the name of a defined ACL.
5647 NP: Using 'none' as the byte value here will override any quick_abort settings
5648 that may otherwise apply to the range request. The range request will
5649 be fully fetched from start to finish regardless of the client
5650 actions. This affects bandwidth usage.
5653 NAME: minimum_expiry_time
5656 LOC: Config.minimum_expiry_time
5659 The minimum caching time according to (Expires - Date)
5660 headers Squid honors if the object can't be revalidated.
5661 The default is 60 seconds.
5663 In reverse proxy environments it might be desirable to honor
5664 shorter object lifetimes. It is most likely better to make
5665 your server return a meaningful Last-Modified header however.
5667 In ESI environments where page fragments often have short
5668 lifetimes, this will often be best set to 0.
5671 NAME: store_avg_object_size
5675 LOC: Config.Store.avgObjectSize
5677 Average object size, used to estimate number of objects your
5678 cache can hold. The default is 13 KB.
5680 This is used to pre-seed the cache index memory allocation to
5681 reduce expensive reallocate operations while handling clients
5682 traffic. Too-large values may result in memory allocation during
5683 peak traffic, too-small values will result in wasted memory.
5685 Check the cache manager 'info' report metrics for the real
5686 object sizes seen by your Squid before tuning this.
5689 NAME: store_objects_per_bucket
5692 LOC: Config.Store.objectsPerBucket
5694 Target number of objects per bucket in the store hash table.
5695 Lowering this value increases the total number of buckets and
5696 also the storage maintenance rate. The default is 20.
5701 -----------------------------------------------------------------------------
5704 NAME: request_header_max_size
5708 LOC: Config.maxRequestHeaderSize
5710 This specifies the maximum size for HTTP headers in a request.
5711 Request headers are usually relatively small (about 512 bytes).
5712 Placing a limit on the request header size will catch certain
5713 bugs (for example with persistent connections) and possibly
5714 buffer-overflow or denial-of-service attacks.
5717 NAME: reply_header_max_size
5721 LOC: Config.maxReplyHeaderSize
5723 This specifies the maximum size for HTTP headers in a reply.
5724 Reply headers are usually relatively small (about 512 bytes).
5725 Placing a limit on the reply header size will catch certain
5726 bugs (for example with persistent connections) and possibly
5727 buffer-overflow or denial-of-service attacks.
5730 NAME: request_body_max_size
5734 DEFAULT_DOC: No limit.
5735 LOC: Config.maxRequestBodySize
5737 This specifies the maximum size for an HTTP request body.
5738 In other words, the maximum size of a PUT/POST request.
5739 A user who attempts to send a request with a body larger
5740 than this limit receives an "Invalid Request" error message.
5741 If you set this parameter to a zero (the default), there will
5742 be no limit imposed.
5744 See also client_request_buffer_max_size for an alternative
5745 limitation on client uploads which can be configured.
5748 NAME: client_request_buffer_max_size
5752 LOC: Config.maxRequestBufferSize
5754 This specifies the maximum buffer size of a client request.
5755 It prevents squid eating too much memory when somebody uploads
5760 IFDEF: USE_HTTP_VIOLATIONS
5763 DEFAULT_DOC: Obey RFC 2616.
5764 LOC: Config.accessList.brokenPosts
5766 A list of ACL elements which, if matched, causes Squid to send
5767 an extra CRLF pair after the body of a PUT/POST request.
5769 Some HTTP servers has broken implementations of PUT/POST,
5770 and rely on an extra CRLF pair sent by some WWW clients.
5772 Quote from RFC2616 section 4.1 on this matter:
5774 Note: certain buggy HTTP/1.0 client implementations generate an
5775 extra CRLF's after a POST request. To restate what is explicitly
5776 forbidden by the BNF, an HTTP/1.1 client must not preface or follow
5777 a request with an extra CRLF.
5779 This clause only supports fast acl types.
5780 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5783 acl buggy_server url_regex ^http://....
5784 broken_posts allow buggy_server
5787 NAME: adaptation_uses_indirect_client icap_uses_indirect_client
5790 IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_ADAPTATION
5792 LOC: Adaptation::Config::use_indirect_client
5794 Controls whether the indirect client IP address (instead of the direct
5795 client IP address) is passed to adaptation services.
5797 See also: follow_x_forwarded_for adaptation_send_client_ip
5801 IFDEF: USE_HTTP_VIOLATIONS
5805 LOC: Config.onoff.via
5807 If set (default), Squid will include a Via header in requests and
5808 replies as required by RFC2616.
5814 LOC: Config.onoff.ie_refresh
5817 Microsoft Internet Explorer up until version 5.5 Service
5818 Pack 1 has an issue with transparent proxies, wherein it
5819 is impossible to force a refresh. Turning this on provides
5820 a partial fix to the problem, by causing all IMS-REFRESH
5821 requests from older IE versions to check the origin server
5822 for fresh content. This reduces hit ratio by some amount
5823 (~10% in my experience), but allows users to actually get
5824 fresh content when they want it. Note because Squid
5825 cannot tell if the user is using 5.5 or 5.5SP1, the behavior
5826 of 5.5 is unchanged from old versions of Squid (i.e. a
5827 forced refresh is impossible). Newer versions of IE will,
5828 hopefully, continue to have the new behavior and will be
5829 handled based on that assumption. This option defaults to
5830 the old Squid behavior, which is better for hit ratios but
5831 worse for clients using IE, if they need to be able to
5832 force fresh content.
5835 NAME: vary_ignore_expire
5838 LOC: Config.onoff.vary_ignore_expire
5841 Many HTTP servers supporting Vary gives such objects
5842 immediate expiry time with no cache-control header
5843 when requested by a HTTP/1.0 client. This option
5844 enables Squid to ignore such expiry times until
5845 HTTP/1.1 is fully implemented.
5847 WARNING: If turned on this may eventually cause some
5848 varying objects not intended for caching to get cached.
5851 NAME: request_entities
5853 LOC: Config.onoff.request_entities
5856 Squid defaults to deny GET and HEAD requests with request entities,
5857 as the meaning of such requests are undefined in the HTTP standard
5858 even if not explicitly forbidden.
5860 Set this directive to on if you have clients which insists
5861 on sending request entities in GET or HEAD requests. But be warned
5862 that there is server software (both proxies and web servers) which
5863 can fail to properly process this kind of request which may make you
5864 vulnerable to cache pollution attacks if enabled.
5867 NAME: request_header_access
5868 IFDEF: USE_HTTP_VIOLATIONS
5869 TYPE: http_header_access
5870 LOC: Config.request_header_access
5872 DEFAULT_DOC: No limits.
5874 Usage: request_header_access header_name allow|deny [!]aclname ...
5876 WARNING: Doing this VIOLATES the HTTP standard. Enabling
5877 this feature could make you liable for problems which it
5880 This option replaces the old 'anonymize_headers' and the
5881 older 'http_anonymizer' option with something that is much
5882 more configurable. A list of ACLs for each header name allows
5883 removal of specific header fields under specific conditions.
5885 This option only applies to outgoing HTTP request headers (i.e.,
5886 headers sent by Squid to the next HTTP hop such as a cache peer
5887 or an origin server). The option has no effect during cache hit
5888 detection. The equivalent adaptation vectoring point in ICAP
5889 terminology is post-cache REQMOD.
5891 The option is applied to individual outgoing request header
5892 fields. For each request header field F, Squid uses the first
5893 qualifying sets of request_header_access rules:
5895 1. Rules with header_name equal to F's name.
5896 2. Rules with header_name 'Other', provided F's name is not
5897 on the hard-coded list of commonly used HTTP header names.
5898 3. Rules with header_name 'All'.
5900 Within that qualifying rule set, rule ACLs are checked as usual.
5901 If ACLs of an "allow" rule match, the header field is allowed to
5902 go through as is. If ACLs of a "deny" rule match, the header is
5903 removed and request_header_replace is then checked to identify
5904 if the removed header has a replacement. If no rules within the
5905 set have matching ACLs, the header field is left as is.
5907 For example, to achieve the same behavior as the old
5908 'http_anonymizer standard' option, you should use:
5910 request_header_access From deny all
5911 request_header_access Referer deny all
5912 request_header_access User-Agent deny all
5914 Or, to reproduce the old 'http_anonymizer paranoid' feature
5917 request_header_access Authorization allow all
5918 request_header_access Proxy-Authorization allow all
5919 request_header_access Cache-Control allow all
5920 request_header_access Content-Length allow all
5921 request_header_access Content-Type allow all
5922 request_header_access Date allow all
5923 request_header_access Host allow all
5924 request_header_access If-Modified-Since allow all
5925 request_header_access Pragma allow all
5926 request_header_access Accept allow all
5927 request_header_access Accept-Charset allow all
5928 request_header_access Accept-Encoding allow all
5929 request_header_access Accept-Language allow all
5930 request_header_access Connection allow all
5931 request_header_access All deny all
5933 HTTP reply headers are controlled with the reply_header_access directive.
5935 By default, all headers are allowed (no anonymizing is performed).
5938 NAME: reply_header_access
5939 IFDEF: USE_HTTP_VIOLATIONS
5940 TYPE: http_header_access
5941 LOC: Config.reply_header_access
5943 DEFAULT_DOC: No limits.
5945 Usage: reply_header_access header_name allow|deny [!]aclname ...
5947 WARNING: Doing this VIOLATES the HTTP standard. Enabling
5948 this feature could make you liable for problems which it
5951 This option only applies to reply headers, i.e., from the
5952 server to the client.
5954 This is the same as request_header_access, but in the other
5955 direction. Please see request_header_access for detailed
5958 For example, to achieve the same behavior as the old
5959 'http_anonymizer standard' option, you should use:
5961 reply_header_access Server deny all
5962 reply_header_access WWW-Authenticate deny all
5963 reply_header_access Link deny all
5965 Or, to reproduce the old 'http_anonymizer paranoid' feature
5968 reply_header_access Allow allow all
5969 reply_header_access WWW-Authenticate allow all
5970 reply_header_access Proxy-Authenticate allow all
5971 reply_header_access Cache-Control allow all
5972 reply_header_access Content-Encoding allow all
5973 reply_header_access Content-Length allow all
5974 reply_header_access Content-Type allow all
5975 reply_header_access Date allow all
5976 reply_header_access Expires allow all
5977 reply_header_access Last-Modified allow all
5978 reply_header_access Location allow all
5979 reply_header_access Pragma allow all
5980 reply_header_access Content-Language allow all
5981 reply_header_access Retry-After allow all
5982 reply_header_access Title allow all
5983 reply_header_access Content-Disposition allow all
5984 reply_header_access Connection allow all
5985 reply_header_access All deny all
5987 HTTP request headers are controlled with the request_header_access directive.
5989 By default, all headers are allowed (no anonymizing is
5993 NAME: request_header_replace header_replace
5994 IFDEF: USE_HTTP_VIOLATIONS
5995 TYPE: http_header_replace
5996 LOC: Config.request_header_access
5999 Usage: request_header_replace header_name message
6000 Example: request_header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
6002 This option allows you to change the contents of headers
6003 denied with request_header_access above, by replacing them
6004 with some fixed string.
6006 This only applies to request headers, not reply headers.
6008 By default, headers are removed if denied.
6011 NAME: reply_header_replace
6012 IFDEF: USE_HTTP_VIOLATIONS
6013 TYPE: http_header_replace
6014 LOC: Config.reply_header_access
6017 Usage: reply_header_replace header_name message
6018 Example: reply_header_replace Server Foo/1.0
6020 This option allows you to change the contents of headers
6021 denied with reply_header_access above, by replacing them
6022 with some fixed string.
6024 This only applies to reply headers, not request headers.
6026 By default, headers are removed if denied.
6029 NAME: request_header_add
6030 TYPE: HeaderWithAclList
6031 LOC: Config.request_header_add
6034 Usage: request_header_add field-name field-value acl1 [acl2] ...
6035 Example: request_header_add X-Client-CA "CA=%ssl::>cert_issuer" all
6037 This option adds header fields to outgoing HTTP requests (i.e.,
6038 request headers sent by Squid to the next HTTP hop such as a
6039 cache peer or an origin server). The option has no effect during
6040 cache hit detection. The equivalent adaptation vectoring point
6041 in ICAP terminology is post-cache REQMOD.
6043 Field-name is a token specifying an HTTP header name. If a
6044 standard HTTP header name is used, Squid does not check whether
6045 the new header conflicts with any existing headers or violates
6046 HTTP rules. If the request to be modified already contains a
6047 field with the same name, the old field is preserved but the
6048 header field values are not merged.
6050 Field-value is either a token or a quoted string. If quoted
6051 string format is used, then the surrounding quotes are removed
6052 while escape sequences and %macros are processed.
6054 In theory, all of the logformat codes can be used as %macros.
6055 However, unlike logging (which happens at the very end of
6056 transaction lifetime), the transaction may not yet have enough
6057 information to expand a macro when the new header value is needed.
6058 And some information may already be available to Squid but not yet
6059 committed where the macro expansion code can access it (report
6060 such instances!). The macro will be expanded into a single dash
6061 ('-') in such cases. Not all macros have been tested.
6063 One or more Squid ACLs may be specified to restrict header
6064 injection to matching requests. As always in squid.conf, all
6065 ACLs in an option ACL list must be satisfied for the insertion
6066 to happen. The request_header_add option supports fast ACLs
6075 This option used to log custom information about the master
6076 transaction. For example, an admin may configure Squid to log
6077 which "user group" the transaction belongs to, where "user group"
6078 will be determined based on a set of ACLs and not [just]
6079 authentication information.
6080 Values of key/value pairs can be logged using %{key}note macros:
6082 note key value acl ...
6083 logformat myFormat ... %{key}note ...
6086 NAME: relaxed_header_parser
6087 COMMENT: on|off|warn
6089 LOC: Config.onoff.relaxed_header_parser
6092 In the default "on" setting Squid accepts certain forms
6093 of non-compliant HTTP messages where it is unambiguous
6094 what the sending application intended even if the message
6095 is not correctly formatted. The messages is then normalized
6096 to the correct form when forwarded by Squid.
6098 If set to "warn" then a warning will be emitted in cache.log
6099 each time such HTTP error is encountered.
6101 If set to "off" then such HTTP errors will cause the request
6102 or response to be rejected.
6105 NAME: collapsed_forwarding
6108 LOC: Config.onoff.collapsed_forwarding
6111 This option controls whether Squid is allowed to merge multiple
6112 potentially cachable requests for the same URI before Squid knows
6113 whether the response is going to be cachable.
6115 This feature is disabled by default: Enabling collapsed forwarding
6116 needlessly delays forwarding requests that look cachable (when they are
6117 collapsed) but then need to be forwarded individually anyway because
6118 they end up being for uncachable content. However, in some cases, such
6119 as accelleration of highly cachable content with periodic or groupped
6120 expiration times, the gains from collapsing [large volumes of
6121 simultenous refresh requests] outweigh losses from such delays.
6126 -----------------------------------------------------------------------------
6129 NAME: forward_timeout
6132 LOC: Config.Timeout.forward
6135 This parameter specifies how long Squid should at most attempt in
6136 finding a forwarding path for the request before giving up.
6139 NAME: connect_timeout
6142 LOC: Config.Timeout.connect
6145 This parameter specifies how long to wait for the TCP connect to
6146 the requested server or peer to complete before Squid should
6147 attempt to find another path where to forward the request.
6150 NAME: peer_connect_timeout
6153 LOC: Config.Timeout.peer_connect
6156 This parameter specifies how long to wait for a pending TCP
6157 connection to a peer cache. The default is 30 seconds. You
6158 may also set different timeout values for individual neighbors
6159 with the 'connect-timeout' option on a 'cache_peer' line.
6165 LOC: Config.Timeout.read
6168 Applied on peer server connections.
6170 After each successful read(), the timeout will be extended by this
6171 amount. If no data is read again after this amount of time,
6172 the request is aborted and logged with ERR_READ_TIMEOUT.
6174 The default is 15 minutes.
6180 LOC: Config.Timeout.write
6183 This timeout is tracked for all connections that have data
6184 available for writing and are waiting for the socket to become
6185 ready. After each successful write, the timeout is extended by
6186 the configured amount. If Squid has data to write but the
6187 connection is not ready for the configured duration, the
6188 transaction associated with the connection is terminated. The
6189 default is 15 minutes.
6192 NAME: request_timeout
6194 LOC: Config.Timeout.request
6197 How long to wait for complete HTTP request headers after initial
6198 connection establishment.
6201 NAME: request_start_timeout
6203 LOC: Config.Timeout.request_start_timeout
6206 How long to wait for the first request byte after initial
6207 connection establishment.
6210 NAME: client_idle_pconn_timeout persistent_request_timeout
6212 LOC: Config.Timeout.clientIdlePconn
6215 How long to wait for the next HTTP request on a persistent
6216 client connection after the previous request completes.
6219 NAME: ftp_client_idle_timeout
6221 LOC: Config.Timeout.ftpClientIdle
6224 How long to wait for an FTP request on a connection to Squid ftp_port.
6225 Many FTP clients do not deal with idle connection closures well,
6226 necessitating a longer default timeout than client_idle_pconn_timeout
6227 used for incoming HTTP requests.
6230 NAME: client_lifetime
6233 LOC: Config.Timeout.lifetime
6236 The maximum amount of time a client (browser) is allowed to
6237 remain connected to the cache process. This protects the Cache
6238 from having a lot of sockets (and hence file descriptors) tied up
6239 in a CLOSE_WAIT state from remote clients that go away without
6240 properly shutting down (either because of a network failure or
6241 because of a poor client implementation). The default is one
6244 NOTE: The default value is intended to be much larger than any
6245 client would ever need to be connected to your cache. You
6246 should probably change client_lifetime only as a last resort.
6247 If you seem to have many client connections tying up
6248 filedescriptors, we recommend first tuning the read_timeout,
6249 request_timeout, persistent_request_timeout and quick_abort values.
6252 NAME: pconn_lifetime
6255 LOC: Config.Timeout.pconnLifetime
6258 Desired maximum lifetime of a persistent connection.
6259 When set, Squid will close a now-idle persistent connection that
6260 exceeded configured lifetime instead of moving the connection into
6261 the idle connection pool (or equivalent). No effect on ongoing/active
6262 transactions. Connection lifetime is the time period from the
6263 connection acceptance or opening time until "now".
6265 This limit is useful in environments with long-lived connections
6266 where Squid configuration or environmental factors change during a
6267 single connection lifetime. If unrestricted, some connections may
6268 last for hours and even days, ignoring those changes that should
6269 have affected their behavior or their existence.
6271 Currently, a new lifetime value supplied via Squid reconfiguration
6272 has no effect on already idle connections unless they become busy.
6274 When set to '0' this limit is not used.
6277 NAME: half_closed_clients
6279 LOC: Config.onoff.half_closed_clients
6282 Some clients may shutdown the sending side of their TCP
6283 connections, while leaving their receiving sides open. Sometimes,
6284 Squid can not tell the difference between a half-closed and a
6285 fully-closed TCP connection.
6287 By default, Squid will immediately close client connections when
6288 read(2) returns "no more data to read."
6290 Change this option to 'on' and Squid will keep open connections
6291 until a read(2) or write(2) on the socket returns an error.
6292 This may show some benefits for reverse proxies. But if not
6293 it is recommended to leave OFF.
6296 NAME: server_idle_pconn_timeout pconn_timeout
6298 LOC: Config.Timeout.serverIdlePconn
6301 Timeout for idle persistent connections to servers and other
6308 LOC: Ident::TheConfig.timeout
6311 Maximum time to wait for IDENT lookups to complete.
6313 If this is too high, and you enabled IDENT lookups from untrusted
6314 users, you might be susceptible to denial-of-service by having
6315 many ident requests going at once.
6318 NAME: shutdown_lifetime
6321 LOC: Config.shutdownLifetime
6324 When SIGTERM or SIGHUP is received, the cache is put into
6325 "shutdown pending" mode until all active sockets are closed.
6326 This value is the lifetime to set for all open descriptors
6327 during shutdown mode. Any active clients after this many
6328 seconds will receive a 'timeout' message.
6332 ADMINISTRATIVE PARAMETERS
6333 -----------------------------------------------------------------------------
6339 LOC: Config.adminEmail
6341 Email-address of local cache manager who will receive
6342 mail if the cache dies. The default is "webmaster".
6348 LOC: Config.EmailFrom
6350 From: email-address for mail sent when the cache dies.
6351 The default is to use 'squid@unique_hostname'.
6353 See also: unique_hostname directive.
6359 LOC: Config.EmailProgram
6361 Email program used to send mail if the cache dies.
6362 The default is "mail". The specified program must comply
6363 with the standard Unix mail syntax:
6364 mail-program recipient < mailfile
6366 Optional command line options can be specified.
6369 NAME: cache_effective_user
6371 DEFAULT: @DEFAULT_CACHE_EFFECTIVE_USER@
6372 LOC: Config.effectiveUser
6374 If you start Squid as root, it will change its effective/real
6375 UID/GID to the user specified below. The default is to change
6376 to UID of @DEFAULT_CACHE_EFFECTIVE_USER@.
6377 see also; cache_effective_group
6380 NAME: cache_effective_group
6383 DEFAULT_DOC: Use system group memberships of the cache_effective_user account
6384 LOC: Config.effectiveGroup
6386 Squid sets the GID to the effective user's default group ID
6387 (taken from the password file) and supplementary group list
6388 from the groups membership.
6390 If you want Squid to run with a specific GID regardless of
6391 the group memberships of the effective user then set this
6392 to the group (or GID) you want Squid to run as. When set
6393 all other group privileges of the effective user are ignored
6394 and only this GID is effective. If Squid is not started as
6395 root the user starting Squid MUST be member of the specified
6398 This option is not recommended by the Squid Team.
6399 Our preference is for administrators to configure a secure
6400 user account for squid with UID/GID matching system policies.
6403 NAME: httpd_suppress_version_string
6407 LOC: Config.onoff.httpd_suppress_version_string
6409 Suppress Squid version string info in HTTP headers and HTML error pages.
6412 NAME: visible_hostname
6414 LOC: Config.visibleHostname
6416 DEFAULT_DOC: Automatically detect the system host name
6418 If you want to present a special hostname in error messages, etc,
6419 define this. Otherwise, the return value of gethostname()
6420 will be used. If you have multiple caches in a cluster and
6421 get errors about IP-forwarding you must set them to have individual
6422 names with this setting.
6425 NAME: unique_hostname
6427 LOC: Config.uniqueHostname
6429 DEFAULT_DOC: Copy the value from visible_hostname
6431 If you want to have multiple machines with the same
6432 'visible_hostname' you must give each machine a different
6433 'unique_hostname' so forwarding loops can be detected.
6436 NAME: hostname_aliases
6438 LOC: Config.hostnameAliases
6441 A list of other DNS names your cache has.
6449 Minimum umask which should be enforced while the proxy
6450 is running, in addition to the umask set at startup.
6452 For a traditional octal representation of umasks, start
6457 OPTIONS FOR THE CACHE REGISTRATION SERVICE
6458 -----------------------------------------------------------------------------
6460 This section contains parameters for the (optional) cache
6461 announcement service. This service is provided to help
6462 cache administrators locate one another in order to join or
6463 create cache hierarchies.
6465 An 'announcement' message is sent (via UDP) to the registration
6466 service by Squid. By default, the announcement message is NOT
6467 SENT unless you enable it with 'announce_period' below.
6469 The announcement message includes your hostname, plus the
6470 following information from this configuration file:
6476 All current information is processed regularly and made
6477 available on the Web at http://www.ircache.net/Cache/Tracker/.
6480 NAME: announce_period
6482 LOC: Config.Announce.period
6484 DEFAULT_DOC: Announcement messages disabled.
6486 This is how frequently to send cache announcements.
6488 To enable announcing your cache, just set an announce period.
6491 announce_period 1 day
6496 DEFAULT: tracker.ircache.net
6497 LOC: Config.Announce.host
6499 Set the hostname where announce registration messages will be sent.
6501 See also announce_port and announce_file
6507 LOC: Config.Announce.file
6509 The contents of this file will be included in the announce
6510 registration messages.
6516 LOC: Config.Announce.port
6518 Set the port where announce registration messages will be sent.
6520 See also announce_host and announce_file
6524 HTTPD-ACCELERATOR OPTIONS
6525 -----------------------------------------------------------------------------
6528 NAME: httpd_accel_surrogate_id
6531 DEFAULT_DOC: visible_hostname is used if no specific ID is set.
6532 LOC: Config.Accel.surrogate_id
6534 Surrogates (http://www.esi.org/architecture_spec_1.0.html)
6535 need an identification token to allow control targeting. Because
6536 a farm of surrogates may all perform the same tasks, they may share
6537 an identification token.
6540 NAME: http_accel_surrogate_remote
6544 LOC: Config.onoff.surrogate_is_remote
6546 Remote surrogates (such as those in a CDN) honour the header
6547 "Surrogate-Control: no-store-remote".
6549 Set this to on to have squid behave as a remote surrogate.
6553 IFDEF: USE_SQUID_ESI
6554 COMMENT: libxml2|expat|custom
6556 LOC: ESIParser::Type
6559 ESI markup is not strictly XML compatible. The custom ESI parser
6560 will give higher performance, but cannot handle non ASCII character
6565 DELAY POOL PARAMETERS
6566 -----------------------------------------------------------------------------
6570 TYPE: delay_pool_count
6572 IFDEF: USE_DELAY_POOLS
6575 This represents the number of delay pools to be used. For example,
6576 if you have one class 2 delay pool and one class 3 delays pool, you
6577 have a total of 2 delay pools.
6579 See also delay_parameters, delay_class, delay_access for pool
6580 configuration details.
6584 TYPE: delay_pool_class
6586 IFDEF: USE_DELAY_POOLS
6589 This defines the class of each delay pool. There must be exactly one
6590 delay_class line for each delay pool. For example, to define two
6591 delay pools, one of class 2 and one of class 3, the settings above
6595 delay_pools 4 # 4 delay pools
6596 delay_class 1 2 # pool 1 is a class 2 pool
6597 delay_class 2 3 # pool 2 is a class 3 pool
6598 delay_class 3 4 # pool 3 is a class 4 pool
6599 delay_class 4 5 # pool 4 is a class 5 pool
6601 The delay pool classes are:
6603 class 1 Everything is limited by a single aggregate
6606 class 2 Everything is limited by a single aggregate
6607 bucket as well as an "individual" bucket chosen
6608 from bits 25 through 32 of the IPv4 address.
6610 class 3 Everything is limited by a single aggregate
6611 bucket as well as a "network" bucket chosen
6612 from bits 17 through 24 of the IP address and a
6613 "individual" bucket chosen from bits 17 through
6614 32 of the IPv4 address.
6616 class 4 Everything in a class 3 delay pool, with an
6617 additional limit on a per user basis. This
6618 only takes effect if the username is established
6619 in advance - by forcing authentication in your
6622 class 5 Requests are grouped according their tag (see
6623 external_acl's tag= reply).
6626 Each pool also requires a delay_parameters directive to configure the pool size
6627 and speed limits used whenever the pool is applied to a request. Along with
6628 a set of delay_access directives to determine when it is used.
6630 NOTE: If an IP address is a.b.c.d
6631 -> bits 25 through 32 are "d"
6632 -> bits 17 through 24 are "c"
6633 -> bits 17 through 32 are "c * 256 + d"
6635 NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to
6636 IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic.
6638 This clause only supports fast acl types.
6639 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6641 See also delay_parameters and delay_access.
6645 TYPE: delay_pool_access
6647 DEFAULT_DOC: Deny using the pool, unless allow rules exist in squid.conf for the pool.
6648 IFDEF: USE_DELAY_POOLS
6651 This is used to determine which delay pool a request falls into.
6653 delay_access is sorted per pool and the matching starts with pool 1,
6654 then pool 2, ..., and finally pool N. The first delay pool where the
6655 request is allowed is selected for the request. If it does not allow
6656 the request to any pool then the request is not delayed (default).
6658 For example, if you want some_big_clients in delay
6659 pool 1 and lotsa_little_clients in delay pool 2:
6661 delay_access 1 allow some_big_clients
6662 delay_access 1 deny all
6663 delay_access 2 allow lotsa_little_clients
6664 delay_access 2 deny all
6665 delay_access 3 allow authenticated_clients
6667 See also delay_parameters and delay_class.
6671 NAME: delay_parameters
6672 TYPE: delay_pool_rates
6674 IFDEF: USE_DELAY_POOLS
6677 This defines the parameters for a delay pool. Each delay pool has
6678 a number of "buckets" associated with it, as explained in the
6679 description of delay_class.
6681 For a class 1 delay pool, the syntax is:
6683 delay_parameters pool aggregate
6685 For a class 2 delay pool:
6687 delay_parameters pool aggregate individual
6689 For a class 3 delay pool:
6691 delay_parameters pool aggregate network individual
6693 For a class 4 delay pool:
6695 delay_parameters pool aggregate network individual user
6697 For a class 5 delay pool:
6699 delay_parameters pool tagrate
6701 The option variables are:
6703 pool a pool number - ie, a number between 1 and the
6704 number specified in delay_pools as used in
6707 aggregate the speed limit parameters for the aggregate bucket
6710 individual the speed limit parameters for the individual
6711 buckets (class 2, 3).
6713 network the speed limit parameters for the network buckets
6716 user the speed limit parameters for the user buckets
6719 tagrate the speed limit parameters for the tag buckets
6722 A pair of delay parameters is written restore/maximum, where restore is
6723 the number of bytes (not bits - modem and network speeds are usually
6724 quoted in bits) per second placed into the bucket, and maximum is the
6725 maximum number of bytes which can be in the bucket at any time.
6727 There must be one delay_parameters line for each delay pool.
6730 For example, if delay pool number 1 is a class 2 delay pool as in the
6731 above example, and is being used to strictly limit each host to 64Kbit/sec
6732 (plus overheads), with no overall limit, the line is:
6734 delay_parameters 1 none 8000/8000
6736 Note that 8 x 8000 KByte/sec -> 64Kbit/sec.
6738 Note that the word 'none' is used to represent no limit.
6741 And, if delay pool number 2 is a class 3 delay pool as in the above
6742 example, and you want to limit it to a total of 256Kbit/sec (strict limit)
6743 with each 8-bit network permitted 64Kbit/sec (strict limit) and each
6744 individual host permitted 4800bit/sec with a bucket maximum size of 64Kbits
6745 to permit a decent web page to be downloaded at a decent speed
6746 (if the network is not being limited due to overuse) but slow down
6747 large downloads more significantly:
6749 delay_parameters 2 32000/32000 8000/8000 600/8000
6751 Note that 8 x 32000 KByte/sec -> 256Kbit/sec.
6752 8 x 8000 KByte/sec -> 64Kbit/sec.
6753 8 x 600 Byte/sec -> 4800bit/sec.
6756 Finally, for a class 4 delay pool as in the example - each user will
6757 be limited to 128Kbits/sec no matter how many workstations they are logged into.:
6759 delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
6762 See also delay_class and delay_access.
6766 NAME: delay_initial_bucket_level
6767 COMMENT: (percent, 0-100)
6770 IFDEF: USE_DELAY_POOLS
6771 LOC: Config.Delay.initial
6773 The initial bucket percentage is used to determine how much is put
6774 in each bucket when squid starts, is reconfigured, or first notices
6775 a host accessing it (in class 2 and class 3, individual hosts and
6776 networks only have buckets associated with them once they have been
6781 CLIENT DELAY POOL PARAMETERS
6782 -----------------------------------------------------------------------------
6785 NAME: client_delay_pools
6786 TYPE: client_delay_pool_count
6788 IFDEF: USE_DELAY_POOLS
6789 LOC: Config.ClientDelay
6791 This option specifies the number of client delay pools used. It must
6792 preceed other client_delay_* options.
6795 client_delay_pools 2
6797 See also client_delay_parameters and client_delay_access.
6800 NAME: client_delay_initial_bucket_level
6801 COMMENT: (percent, 0-no_limit)
6804 IFDEF: USE_DELAY_POOLS
6805 LOC: Config.ClientDelay.initial
6807 This option determines the initial bucket size as a percentage of
6808 max_bucket_size from client_delay_parameters. Buckets are created
6809 at the time of the "first" connection from the matching IP. Idle
6810 buckets are periodically deleted up.
6812 You can specify more than 100 percent but note that such "oversized"
6813 buckets are not refilled until their size goes down to max_bucket_size
6814 from client_delay_parameters.
6817 client_delay_initial_bucket_level 50
6820 NAME: client_delay_parameters
6821 TYPE: client_delay_pool_rates
6823 IFDEF: USE_DELAY_POOLS
6824 LOC: Config.ClientDelay
6827 This option configures client-side bandwidth limits using the
6830 client_delay_parameters pool speed_limit max_bucket_size
6832 pool is an integer ID used for client_delay_access matching.
6834 speed_limit is bytes added to the bucket per second.
6836 max_bucket_size is the maximum size of a bucket, enforced after any
6837 speed_limit additions.
6839 Please see the delay_parameters option for more information and
6843 client_delay_parameters 1 1024 2048
6844 client_delay_parameters 2 51200 16384
6846 See also client_delay_access.
6850 NAME: client_delay_access
6851 TYPE: client_delay_pool_access
6853 DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool.
6854 IFDEF: USE_DELAY_POOLS
6855 LOC: Config.ClientDelay
6857 This option determines the client-side delay pool for the
6860 client_delay_access pool_ID allow|deny acl_name
6862 All client_delay_access options are checked in their pool ID
6863 order, starting with pool 1. The first checked pool with allowed
6864 request is selected for the request. If no ACL matches or there
6865 are no client_delay_access options, the request bandwidth is not
6868 The ACL-selected pool is then used to find the
6869 client_delay_parameters for the request. Client-side pools are
6870 not used to aggregate clients. Clients are always aggregated
6871 based on their source IP addresses (one bucket per source IP).
6873 This clause only supports fast acl types.
6874 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6875 Additionally, only the client TCP connection details are available.
6876 ACLs testing HTTP properties will not work.
6878 Please see delay_access for more examples.
6881 client_delay_access 1 allow low_rate_network
6882 client_delay_access 2 allow vips_network
6885 See also client_delay_parameters and client_delay_pools.
6889 WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
6890 -----------------------------------------------------------------------------
6895 LOC: Config.Wccp.router
6897 DEFAULT_DOC: WCCP disabled.
6900 Use this option to define your WCCP ``home'' router for
6903 wccp_router supports a single WCCP(v1) router
6905 wccp2_router supports multiple WCCPv2 routers
6907 only one of the two may be used at the same time and defines
6908 which version of WCCP to use.
6912 TYPE: IpAddress_list
6913 LOC: Config.Wccp2.router
6915 DEFAULT_DOC: WCCPv2 disabled.
6918 Use this option to define your WCCP ``home'' router for
6921 wccp_router supports a single WCCP(v1) router
6923 wccp2_router supports multiple WCCPv2 routers
6925 only one of the two may be used at the same time and defines
6926 which version of WCCP to use.
6931 LOC: Config.Wccp.version
6935 This directive is only relevant if you need to set up WCCP(v1)
6936 to some very old and end-of-life Cisco routers. In all other
6937 setups it must be left unset or at the default setting.
6938 It defines an internal version in the WCCP(v1) protocol,
6939 with version 4 being the officially documented protocol.
6941 According to some users, Cisco IOS 11.2 and earlier only
6942 support WCCP version 3. If you're using that or an earlier
6943 version of IOS, you may need to change this value to 3, otherwise
6944 do not specify this parameter.
6947 NAME: wccp2_rebuild_wait
6949 LOC: Config.Wccp2.rebuildwait
6953 If this is enabled Squid will wait for the cache dir rebuild to finish
6954 before sending the first wccp2 HereIAm packet
6957 NAME: wccp2_forwarding_method
6959 LOC: Config.Wccp2.forwarding_method
6963 WCCP2 allows the setting of forwarding methods between the
6964 router/switch and the cache. Valid values are as follows:
6966 gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
6967 l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
6969 Currently (as of IOS 12.4) cisco routers only support GRE.
6970 Cisco switches only support the L2 redirect assignment method.
6973 NAME: wccp2_return_method
6975 LOC: Config.Wccp2.return_method
6979 WCCP2 allows the setting of return methods between the
6980 router/switch and the cache for packets that the cache
6981 decides not to handle. Valid values are as follows:
6983 gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
6984 l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
6986 Currently (as of IOS 12.4) cisco routers only support GRE.
6987 Cisco switches only support the L2 redirect assignment.
6989 If the "ip wccp redirect exclude in" command has been
6990 enabled on the cache interface, then it is still safe for
6991 the proxy server to use a l2 redirect method even if this
6992 option is set to GRE.
6995 NAME: wccp2_assignment_method
6997 LOC: Config.Wccp2.assignment_method
7001 WCCP2 allows the setting of methods to assign the WCCP hash
7002 Valid values are as follows:
7004 hash - Hash assignment
7005 mask - Mask assignment
7007 As a general rule, cisco routers support the hash assignment method
7008 and cisco switches support the mask assignment method.
7013 LOC: Config.Wccp2.info
7014 DEFAULT_IF_NONE: standard 0
7015 DEFAULT_DOC: Use the 'web-cache' standard service.
7018 WCCP2 allows for multiple traffic services. There are two
7019 types: "standard" and "dynamic". The standard type defines
7020 one service id - http (id 0). The dynamic service ids can be from
7021 51 to 255 inclusive. In order to use a dynamic service id
7022 one must define the type of traffic to be redirected; this is done
7023 using the wccp2_service_info option.
7025 The "standard" type does not require a wccp2_service_info option,
7026 just specifying the service id will suffice.
7028 MD5 service authentication can be enabled by adding
7029 "password=<password>" to the end of this service declaration.
7033 wccp2_service standard 0 # for the 'web-cache' standard service
7034 wccp2_service dynamic 80 # a dynamic service type which will be
7035 # fleshed out with subsequent options.
7036 wccp2_service standard 0 password=foo
7039 NAME: wccp2_service_info
7040 TYPE: wccp2_service_info
7041 LOC: Config.Wccp2.info
7045 Dynamic WCCPv2 services require further information to define the
7046 traffic you wish to have diverted.
7050 wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
7051 priority=<priority> ports=<port>,<port>..
7053 The relevant WCCPv2 flags:
7054 + src_ip_hash, dst_ip_hash
7055 + source_port_hash, dst_port_hash
7056 + src_ip_alt_hash, dst_ip_alt_hash
7057 + src_port_alt_hash, dst_port_alt_hash
7060 The port list can be one to eight entries.
7064 wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
7065 priority=240 ports=80
7067 Note: the service id must have been defined by a previous
7068 'wccp2_service dynamic <id>' entry.
7073 LOC: Config.Wccp2.weight
7077 Each cache server gets assigned a set of the destination
7078 hash proportional to their weight.
7083 LOC: Config.Wccp.address
7085 DEFAULT_DOC: Address selected by the operating system.
7088 Use this option if you require WCCPv2 to use a specific
7091 The default behavior is to not bind to any specific address.
7096 LOC: Config.Wccp2.address
7098 DEFAULT_DOC: Address selected by the operating system.
7101 Use this option if you require WCCP to use a specific
7104 The default behavior is to not bind to any specific address.
7108 PERSISTENT CONNECTION HANDLING
7109 -----------------------------------------------------------------------------
7111 Also see "pconn_timeout" in the TIMEOUTS section
7114 NAME: client_persistent_connections
7116 LOC: Config.onoff.client_pconns
7119 Persistent connection support for clients.
7120 Squid uses persistent connections (when allowed). You can use
7121 this option to disable persistent connections with clients.
7124 NAME: server_persistent_connections
7126 LOC: Config.onoff.server_pconns
7129 Persistent connection support for servers.
7130 Squid uses persistent connections (when allowed). You can use
7131 this option to disable persistent connections with servers.
7134 NAME: persistent_connection_after_error
7136 LOC: Config.onoff.error_pconns
7139 With this directive the use of persistent connections after
7140 HTTP errors can be disabled. Useful if you have clients
7141 who fail to handle errors on persistent connections proper.
7144 NAME: detect_broken_pconn
7146 LOC: Config.onoff.detect_broken_server_pconns
7149 Some servers have been found to incorrectly signal the use
7150 of HTTP/1.0 persistent connections even on replies not
7151 compatible, causing significant delays. This server problem
7152 has mostly been seen on redirects.
7154 By enabling this directive Squid attempts to detect such
7155 broken replies and automatically assume the reply is finished
7156 after 10 seconds timeout.
7160 CACHE DIGEST OPTIONS
7161 -----------------------------------------------------------------------------
7164 NAME: digest_generation
7165 IFDEF: USE_CACHE_DIGESTS
7167 LOC: Config.onoff.digest_generation
7170 This controls whether the server will generate a Cache Digest
7171 of its contents. By default, Cache Digest generation is
7172 enabled if Squid is compiled with --enable-cache-digests defined.
7175 NAME: digest_bits_per_entry
7176 IFDEF: USE_CACHE_DIGESTS
7178 LOC: Config.digest.bits_per_entry
7181 This is the number of bits of the server's Cache Digest which
7182 will be associated with the Digest entry for a given HTTP
7183 Method and URL (public key) combination. The default is 5.
7186 NAME: digest_rebuild_period
7187 IFDEF: USE_CACHE_DIGESTS
7190 LOC: Config.digest.rebuild_period
7193 This is the wait time between Cache Digest rebuilds.
7196 NAME: digest_rewrite_period
7198 IFDEF: USE_CACHE_DIGESTS
7200 LOC: Config.digest.rewrite_period
7203 This is the wait time between Cache Digest writes to
7207 NAME: digest_swapout_chunk_size
7210 IFDEF: USE_CACHE_DIGESTS
7211 LOC: Config.digest.swapout_chunk_size
7214 This is the number of bytes of the Cache Digest to write to
7215 disk at a time. It defaults to 4096 bytes (4KB), the Squid
7219 NAME: digest_rebuild_chunk_percentage
7220 COMMENT: (percent, 0-100)
7221 IFDEF: USE_CACHE_DIGESTS
7223 LOC: Config.digest.rebuild_chunk_percentage
7226 This is the percentage of the Cache Digest to be scanned at a
7227 time. By default it is set to 10% of the Cache Digest.
7232 -----------------------------------------------------------------------------
7237 LOC: Config.Port.snmp
7239 DEFAULT_DOC: SNMP disabled.
7242 The port number where Squid listens for SNMP requests. To enable
7243 SNMP support set this to a suitable port number. Port number
7244 3401 is often used for the Squid SNMP agent. By default it's
7245 set to "0" (disabled)
7253 LOC: Config.accessList.snmp
7255 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
7258 Allowing or denying access to the SNMP port.
7260 All access to the agent is denied by default.
7263 snmp_access allow|deny [!]aclname ...
7265 This clause only supports fast acl types.
7266 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
7269 snmp_access allow snmppublic localhost
7270 snmp_access deny all
7273 NAME: snmp_incoming_address
7275 LOC: Config.Addrs.snmp_incoming
7277 DEFAULT_DOC: Accept SNMP packets from all machine interfaces.
7280 Just like 'udp_incoming_address', but for the SNMP port.
7282 snmp_incoming_address is used for the SNMP socket receiving
7283 messages from SNMP agents.
7285 The default snmp_incoming_address is to listen on all
7286 available network interfaces.
7289 NAME: snmp_outgoing_address
7291 LOC: Config.Addrs.snmp_outgoing
7293 DEFAULT_DOC: Use snmp_incoming_address or an address selected by the operating system.
7296 Just like 'udp_outgoing_address', but for the SNMP port.
7298 snmp_outgoing_address is used for SNMP packets returned to SNMP
7301 If snmp_outgoing_address is not set it will use the same socket
7302 as snmp_incoming_address. Only change this if you want to have
7303 SNMP replies sent using another address than where this Squid
7304 listens for SNMP queries.
7306 NOTE, snmp_incoming_address and snmp_outgoing_address can not have
7307 the same value since they both use the same port.
7312 -----------------------------------------------------------------------------
7315 NAME: icp_port udp_port
7318 DEFAULT_DOC: ICP disabled.
7319 LOC: Config.Port.icp
7321 The port number where Squid sends and receives ICP queries to
7322 and from neighbor caches. The standard UDP port for ICP is 3130.
7325 icp_port @DEFAULT_ICP_PORT@
7332 DEFAULT_DOC: HTCP disabled.
7333 LOC: Config.Port.htcp
7335 The port number where Squid sends and receives HTCP queries to
7336 and from neighbor caches. To turn it on you want to set it to
7343 NAME: log_icp_queries
7347 LOC: Config.onoff.log_udp
7349 If set, ICP queries are logged to access.log. You may wish
7350 do disable this if your ICP load is VERY high to speed things
7351 up or to simplify log analysis.
7354 NAME: udp_incoming_address
7356 LOC:Config.Addrs.udp_incoming
7358 DEFAULT_DOC: Accept packets from all machine interfaces.
7360 udp_incoming_address is used for UDP packets received from other
7363 The default behavior is to not bind to any specific address.
7365 Only change this if you want to have all UDP queries received on
7366 a specific interface/address.
7368 NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS
7369 modules. Altering it will affect all of them in the same manner.
7371 see also; udp_outgoing_address
7373 NOTE, udp_incoming_address and udp_outgoing_address can not
7374 have the same value since they both use the same port.
7377 NAME: udp_outgoing_address
7379 LOC: Config.Addrs.udp_outgoing
7381 DEFAULT_DOC: Use udp_incoming_address or an address selected by the operating system.
7383 udp_outgoing_address is used for UDP packets sent out to other
7386 The default behavior is to not bind to any specific address.
7388 Instead it will use the same socket as udp_incoming_address.
7389 Only change this if you want to have UDP queries sent using another
7390 address than where this Squid listens for UDP queries from other
7393 NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS
7394 modules. Altering it will affect all of them in the same manner.
7396 see also; udp_incoming_address
7398 NOTE, udp_incoming_address and udp_outgoing_address can not
7399 have the same value since they both use the same port.
7406 LOC: Config.onoff.icp_hit_stale
7408 If you want to return ICP_HIT for stale cache objects, set this
7409 option to 'on'. If you have sibling relationships with caches
7410 in other administrative domains, this should be 'off'. If you only
7411 have sibling relationships with caches under your control,
7412 it is probably okay to set this to 'on'.
7413 If set to 'on', your siblings should use the option "allow-miss"
7414 on their cache_peer lines for connecting to you.
7417 NAME: minimum_direct_hops
7420 LOC: Config.minDirectHops
7422 If using the ICMP pinging stuff, do direct fetches for sites
7423 which are no more than this many hops away.
7426 NAME: minimum_direct_rtt
7430 LOC: Config.minDirectRtt
7432 If using the ICMP pinging stuff, do direct fetches for sites
7433 which are no more than this many rtt milliseconds away.
7439 LOC: Config.Netdb.low
7441 The low water mark for the ICMP measurement database.
7443 Note: high watermark controlled by netdb_high directive.
7445 These watermarks are counts, not percents. The defaults are
7446 (low) 900 and (high) 1000. When the high water mark is
7447 reached, database entries will be deleted until the low
7454 LOC: Config.Netdb.high
7456 The high water mark for the ICMP measurement database.
7458 Note: low watermark controlled by netdb_low directive.
7460 These watermarks are counts, not percents. The defaults are
7461 (low) 900 and (high) 1000. When the high water mark is
7462 reached, database entries will be deleted until the low
7466 NAME: netdb_ping_period
7468 LOC: Config.Netdb.period
7471 The minimum period for measuring a site. There will be at
7472 least this much delay between successive pings to the same
7473 network. The default is five minutes.
7480 LOC: Config.onoff.query_icmp
7482 If you want to ask your peers to include ICMP data in their ICP
7483 replies, enable this option.
7485 If your peer has configured Squid (during compilation) with
7486 '--enable-icmp' that peer will send ICMP pings to origin server
7487 sites of the URLs it receives. If you enable this option the
7488 ICP replies from that peer will include the ICMP data (if available).
7489 Then, when choosing a parent cache, Squid will choose the parent with
7490 the minimal RTT to the origin server. When this happens, the
7491 hierarchy field of the access.log will be
7492 "CLOSEST_PARENT_MISS". This option is off by default.
7495 NAME: test_reachability
7499 LOC: Config.onoff.test_reachability
7501 When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
7502 instead of ICP_MISS if the target host is NOT in the ICMP
7503 database, or has a zero RTT.
7506 NAME: icp_query_timeout
7509 DEFAULT_DOC: Dynamic detection.
7511 LOC: Config.Timeout.icp_query
7513 Normally Squid will automatically determine an optimal ICP
7514 query timeout value based on the round-trip-time of recent ICP
7515 queries. If you want to override the value determined by
7516 Squid, set this 'icp_query_timeout' to a non-zero value. This
7517 value is specified in MILLISECONDS, so, to use a 2-second
7518 timeout (the old default), you would write:
7520 icp_query_timeout 2000
7523 NAME: maximum_icp_query_timeout
7527 LOC: Config.Timeout.icp_query_max
7529 Normally the ICP query timeout is determined dynamically. But
7530 sometimes it can lead to very large values (say 5 seconds).
7531 Use this option to put an upper limit on the dynamic timeout
7532 value. Do NOT use this option to always use a fixed (instead
7533 of a dynamic) timeout value. To set a fixed timeout see the
7534 'icp_query_timeout' directive.
7537 NAME: minimum_icp_query_timeout
7541 LOC: Config.Timeout.icp_query_min
7543 Normally the ICP query timeout is determined dynamically. But
7544 sometimes it can lead to very small timeouts, even lower than
7545 the normal latency variance on your link due to traffic.
7546 Use this option to put an lower limit on the dynamic timeout
7547 value. Do NOT use this option to always use a fixed (instead
7548 of a dynamic) timeout value. To set a fixed timeout see the
7549 'icp_query_timeout' directive.
7552 NAME: background_ping_rate
7556 LOC: Config.backgroundPingRate
7558 Controls how often the ICP pings are sent to siblings that
7559 have background-ping set.
7563 MULTICAST ICP OPTIONS
7564 -----------------------------------------------------------------------------
7569 LOC: Config.mcast_group_list
7572 This tag specifies a list of multicast groups which your server
7573 should join to receive multicasted ICP queries.
7575 NOTE! Be very careful what you put here! Be sure you
7576 understand the difference between an ICP _query_ and an ICP
7577 _reply_. This option is to be set only if you want to RECEIVE
7578 multicast queries. Do NOT set this option to SEND multicast
7579 ICP (use cache_peer for that). ICP replies are always sent via
7580 unicast, so this option does not affect whether or not you will
7581 receive replies from multicast group members.
7583 You must be very careful to NOT use a multicast address which
7584 is already in use by another group of caches.
7586 If you are unsure about multicast, please read the Multicast
7587 chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
7589 Usage: mcast_groups 239.128.16.128 224.0.1.20
7591 By default, Squid doesn't listen on any multicast groups.
7594 NAME: mcast_miss_addr
7595 IFDEF: MULTICAST_MISS_STREAM
7597 LOC: Config.mcast_miss.addr
7599 DEFAULT_DOC: disabled.
7601 If you enable this option, every "cache miss" URL will
7602 be sent out on the specified multicast address.
7604 Do not enable this option unless you are are absolutely
7605 certain you understand what you are doing.
7608 NAME: mcast_miss_ttl
7609 IFDEF: MULTICAST_MISS_STREAM
7611 LOC: Config.mcast_miss.ttl
7614 This is the time-to-live value for packets multicasted
7615 when multicasting off cache miss URLs is enabled. By
7616 default this is set to 'site scope', i.e. 16.
7619 NAME: mcast_miss_port
7620 IFDEF: MULTICAST_MISS_STREAM
7622 LOC: Config.mcast_miss.port
7625 This is the port number to be used in conjunction with
7629 NAME: mcast_miss_encode_key
7630 IFDEF: MULTICAST_MISS_STREAM
7632 LOC: Config.mcast_miss.encode_key
7633 DEFAULT: XXXXXXXXXXXXXXXX
7635 The URLs that are sent in the multicast miss stream are
7636 encrypted. This is the encryption key.
7639 NAME: mcast_icp_query_timeout
7643 LOC: Config.Timeout.mcast_icp_query
7645 For multicast peers, Squid regularly sends out ICP "probes" to
7646 count how many other peers are listening on the given multicast
7647 address. This value specifies how long Squid should wait to
7648 count all the replies. The default is 2000 msec, or 2
7653 INTERNAL ICON OPTIONS
7654 -----------------------------------------------------------------------------
7657 NAME: icon_directory
7659 LOC: Config.icons.directory
7660 DEFAULT: @DEFAULT_ICON_DIR@
7662 Where the icons are stored. These are normally kept in
7666 NAME: global_internal_static
7668 LOC: Config.onoff.global_internal_static
7671 This directive controls is Squid should intercept all requests for
7672 /squid-internal-static/ no matter which host the URL is requesting
7673 (default on setting), or if nothing special should be done for
7674 such URLs (off setting). The purpose of this directive is to make
7675 icons etc work better in complex cache hierarchies where it may
7676 not always be possible for all corners in the cache mesh to reach
7677 the server generating a directory listing.
7680 NAME: short_icon_urls
7682 LOC: Config.icons.use_short_names
7685 If this is enabled Squid will use short URLs for icons.
7686 If disabled it will revert to the old behavior of including
7687 it's own name and port in the URL.
7689 If you run a complex cache hierarchy with a mix of Squid and
7690 other proxies you may need to disable this directive.
7695 -----------------------------------------------------------------------------
7698 NAME: error_directory
7700 LOC: Config.errorDirectory
7702 DEFAULT_DOC: Send error pages in the clients preferred language
7704 If you wish to create your own versions of the default
7705 error files to customize them to suit your company copy
7706 the error/template files to another directory and point
7709 WARNING: This option will disable multi-language support
7710 on error pages if used.
7712 The squid developers are interested in making squid available in
7713 a wide variety of languages. If you are making translations for a
7714 language that Squid does not currently provide please consider
7715 contributing your translation back to the project.
7716 http://wiki.squid-cache.org/Translations
7718 The squid developers working on translations are happy to supply drop-in
7719 translated error files in exchange for any new language contributions.
7722 NAME: error_default_language
7723 IFDEF: USE_ERR_LOCALES
7725 LOC: Config.errorDefaultLanguage
7727 DEFAULT_DOC: Generate English language pages.
7729 Set the default language which squid will send error pages in
7730 if no existing translation matches the clients language
7733 If unset (default) generic English will be used.
7735 The squid developers are interested in making squid available in
7736 a wide variety of languages. If you are interested in making
7737 translations for any language see the squid wiki for details.
7738 http://wiki.squid-cache.org/Translations
7741 NAME: error_log_languages
7742 IFDEF: USE_ERR_LOCALES
7744 LOC: Config.errorLogMissingLanguages
7747 Log to cache.log what languages users are attempting to
7748 auto-negotiate for translations.
7750 Successful negotiations are not logged. Only failures
7751 have meaning to indicate that Squid may need an upgrade
7752 of its error page translations.
7755 NAME: err_page_stylesheet
7757 LOC: Config.errorStylesheet
7758 DEFAULT: @DEFAULT_CONFIG_DIR@/errorpage.css
7760 CSS Stylesheet to pattern the display of Squid default error pages.
7762 For information on CSS see http://www.w3.org/Style/CSS/
7767 LOC: Config.errHtmlText
7770 HTML text to include in error messages. Make this a "mailto"
7771 URL to your admin address, or maybe just a link to your
7772 organizations Web page.
7774 To include this in your error messages, you must rewrite
7775 the error template files (found in the "errors" directory).
7776 Wherever you want the 'err_html_text' line to appear,
7777 insert a %L tag in the error template file.
7780 NAME: email_err_data
7783 LOC: Config.onoff.emailErrData
7786 If enabled, information about the occurred error will be
7787 included in the mailto links of the ERR pages (if %W is set)
7788 so that the email body contains the data.
7789 Syntax is <A HREF="mailto:%w%W">%w</A>
7794 LOC: Config.denyInfoList
7797 Usage: deny_info err_page_name acl
7798 or deny_info http://... acl
7799 or deny_info TCP_RESET acl
7801 This can be used to return a ERR_ page for requests which
7802 do not pass the 'http_access' rules. Squid remembers the last
7803 acl it evaluated in http_access, and if a 'deny_info' line exists
7804 for that ACL Squid returns a corresponding error page.
7806 The acl is typically the last acl on the http_access deny line which
7807 denied access. The exceptions to this rule are:
7808 - When Squid needs to request authentication credentials. It's then
7809 the first authentication related acl encountered
7810 - When none of the http_access lines matches. It's then the last
7811 acl processed on the last http_access line.
7812 - When the decision to deny access was made by an adaptation service,
7813 the acl name is the corresponding eCAP or ICAP service_name.
7815 NP: If providing your own custom error pages with error_directory
7816 you may also specify them by your custom file name:
7817 Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
7819 By defaut Squid will send "403 Forbidden". A different 4xx or 5xx
7820 may be specified by prefixing the file name with the code and a colon.
7821 e.g. 404:ERR_CUSTOM_ACCESS_DENIED
7823 Alternatively you can tell Squid to reset the TCP connection
7824 by specifying TCP_RESET.
7826 Or you can specify an error URL or URL pattern. The browsers will
7827 get redirected to the specified URL after formatting tags have
7828 been replaced. Redirect will be done with 302 or 307 according to
7829 HTTP/1.1 specs. A different 3xx code may be specified by prefixing
7830 the URL. e.g. 303:http://example.com/
7833 %a - username (if available. Password NOT included)
7836 %E - Error description
7838 %H - Request domain name
7839 %i - Client IP Address
7841 %o - Message result from external ACL helper
7842 %p - Request Port number
7843 %P - Request Protocol name
7844 %R - Request URL path
7845 %T - Timestamp in RFC 1123 format
7846 %U - Full canonical URL from client
7847 (HTTPS URLs terminate with *)
7848 %u - Full canonical URL from client
7849 %w - Admin email from squid.conf
7851 %% - Literal percent (%) code
7856 OPTIONS INFLUENCING REQUEST FORWARDING
7857 -----------------------------------------------------------------------------
7860 NAME: nonhierarchical_direct
7862 LOC: Config.onoff.nonhierarchical_direct
7865 By default, Squid will send any non-hierarchical requests
7866 (not cacheable request type) direct to origin servers.
7868 When this is set to "off", Squid will prefer to send these
7869 requests to parents.
7871 Note that in most configurations, by turning this off you will only
7872 add latency to these request without any improvement in global hit
7875 This option only sets a preference. If the parent is unavailable a
7876 direct connection to the origin server may still be attempted. To
7877 completely prevent direct connections use never_direct.
7882 LOC: Config.onoff.prefer_direct
7885 Normally Squid tries to use parents for most requests. If you for some
7886 reason like it to first try going direct and only use a parent if
7887 going direct fails set this to on.
7889 By combining nonhierarchical_direct off and prefer_direct on you
7890 can set up Squid to use a parent as a backup path if going direct
7893 Note: If you want Squid to use parents for all requests see
7894 the never_direct directive. prefer_direct only modifies how Squid
7895 acts on cacheable requests.
7898 NAME: cache_miss_revalidate
7902 LOC: Config.onoff.cache_miss_revalidate
7904 RFC 7232 defines a conditional request mechanism to prevent
7905 response objects being unnecessarily transferred over the network.
7906 If that mechanism is used by the client and a cache MISS occurs
7907 it can prevent new cache entries being created.
7909 This option determines whether Squid on cache MISS will pass the
7910 client revalidation request to the server or tries to fetch new
7911 content for caching. It can be useful while the cache is mostly
7912 empty to more quickly have the cache populated by generating
7913 non-conditional GETs.
7915 When set to 'on' (default), Squid will pass all client If-* headers
7916 to the server. This permits server responses without a cacheable
7917 payload to be delivered and on MISS no new cache entry is created.
7919 When set to 'off' and if the request is cacheable, Squid will
7920 remove the clients If-Modified-Since and If-None-Match headers from
7921 the request sent to the server. This requests a 200 status response
7922 from the server to create a new cache entry with.
7927 LOC: Config.accessList.AlwaysDirect
7929 DEFAULT_DOC: Prevent any cache_peer being used for this request.
7931 Usage: always_direct allow|deny [!]aclname ...
7933 Here you can use ACL elements to specify requests which should
7934 ALWAYS be forwarded by Squid to the origin servers without using
7935 any peers. For example, to always directly forward requests for
7936 local servers ignoring any parents or siblings you may have use
7939 acl local-servers dstdomain my.domain.net
7940 always_direct allow local-servers
7942 To always forward FTP requests directly, use
7945 always_direct allow FTP
7947 NOTE: There is a similar, but opposite option named
7948 'never_direct'. You need to be aware that "always_direct deny
7949 foo" is NOT the same thing as "never_direct allow foo". You
7950 may need to use a deny rule to exclude a more-specific case of
7951 some other rule. Example:
7953 acl local-external dstdomain external.foo.net
7954 acl local-servers dstdomain .foo.net
7955 always_direct deny local-external
7956 always_direct allow local-servers
7958 NOTE: If your goal is to make the client forward the request
7959 directly to the origin server bypassing Squid then this needs
7960 to be done in the client configuration. Squid configuration
7961 can only tell Squid how Squid should fetch the object.
7963 NOTE: This directive is not related to caching. The replies
7964 is cached as usual even if you use always_direct. To not cache
7965 the replies see the 'cache' directive.
7967 This clause supports both fast and slow acl types.
7968 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
7973 LOC: Config.accessList.NeverDirect
7975 DEFAULT_DOC: Allow DNS results to be used for this request.
7977 Usage: never_direct allow|deny [!]aclname ...
7979 never_direct is the opposite of always_direct. Please read
7980 the description for always_direct if you have not already.
7982 With 'never_direct' you can use ACL elements to specify
7983 requests which should NEVER be forwarded directly to origin
7984 servers. For example, to force the use of a proxy for all
7985 requests, except those in your local domain use something like:
7987 acl local-servers dstdomain .foo.net
7988 never_direct deny local-servers
7989 never_direct allow all
7991 or if Squid is inside a firewall and there are local intranet
7992 servers inside the firewall use something like:
7994 acl local-intranet dstdomain .foo.net
7995 acl local-external dstdomain external.foo.net
7996 always_direct deny local-external
7997 always_direct allow local-intranet
7998 never_direct allow all
8000 This clause supports both fast and slow acl types.
8001 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
8005 ADVANCED NETWORKING OPTIONS
8006 -----------------------------------------------------------------------------
8009 NAME: incoming_udp_average incoming_icp_average
8012 LOC: Config.comm_incoming.udp.average
8014 Heavy voodoo here. I can't even believe you are reading this.
8015 Are you crazy? Don't even think about adjusting these unless
8016 you understand the algorithms in comm_select.c first!
8019 NAME: incoming_tcp_average incoming_http_average
8022 LOC: Config.comm_incoming.tcp.average
8024 Heavy voodoo here. I can't even believe you are reading this.
8025 Are you crazy? Don't even think about adjusting these unless
8026 you understand the algorithms in comm_select.c first!
8029 NAME: incoming_dns_average
8032 LOC: Config.comm_incoming.dns.average
8034 Heavy voodoo here. I can't even believe you are reading this.
8035 Are you crazy? Don't even think about adjusting these unless
8036 you understand the algorithms in comm_select.c first!
8039 NAME: min_udp_poll_cnt min_icp_poll_cnt
8042 LOC: Config.comm_incoming.udp.min_poll
8044 Heavy voodoo here. I can't even believe you are reading this.
8045 Are you crazy? Don't even think about adjusting these unless
8046 you understand the algorithms in comm_select.c first!
8049 NAME: min_dns_poll_cnt
8052 LOC: Config.comm_incoming.dns.min_poll
8054 Heavy voodoo here. I can't even believe you are reading this.
8055 Are you crazy? Don't even think about adjusting these unless
8056 you understand the algorithms in comm_select.c first!
8059 NAME: min_tcp_poll_cnt min_http_poll_cnt
8062 LOC: Config.comm_incoming.tcp.min_poll
8064 Heavy voodoo here. I can't even believe you are reading this.
8065 Are you crazy? Don't even think about adjusting these unless
8066 you understand the algorithms in comm_select.c first!
8072 LOC: Config.accept_filter
8076 The name of an accept(2) filter to install on Squid's
8077 listen socket(s). This feature is perhaps specific to
8078 FreeBSD and requires support in the kernel.
8080 The 'httpready' filter delays delivering new connections
8081 to Squid until a full HTTP request has been received.
8082 See the accf_http(9) man page for details.
8084 The 'dataready' filter delays delivering new connections
8085 to Squid until there is some data to process.
8086 See the accf_dataready(9) man page for details.
8090 The 'data' filter delays delivering of new connections
8091 to Squid until there is some data to process by TCP_ACCEPT_DEFER.
8092 You may optionally specify a number of seconds to wait by
8093 'data=N' where N is the number of seconds. Defaults to 30
8094 if not specified. See the tcp(7) man page for details.
8097 accept_filter httpready
8102 NAME: client_ip_max_connections
8104 LOC: Config.client_ip_max_connections
8106 DEFAULT_DOC: No limit.
8108 Set an absolute limit on the number of connections a single
8109 client IP can use. Any more than this and Squid will begin to drop
8110 new connections from the client until it closes some links.
8112 Note that this is a global limit. It affects all HTTP, HTCP, Gopher and FTP
8113 connections from the client. For finer control use the ACL access controls.
8115 Requires client_db to be enabled (the default).
8117 WARNING: This may noticably slow down traffic received via external proxies
8118 or NAT devices and cause them to rebound error messages back to their clients.
8121 NAME: tcp_recv_bufsize
8125 DEFAULT_DOC: Use operating system TCP defaults.
8126 LOC: Config.tcpRcvBufsz
8128 Size of receive buffer to set for TCP sockets. Probably just
8129 as easy to change your kernel's default.
8130 Omit from squid.conf to use the default buffer size.
8135 -----------------------------------------------------------------------------
8142 LOC: Adaptation::Icap::TheConfig.onoff
8145 If you want to enable the ICAP module support, set this to on.
8148 NAME: icap_connect_timeout
8151 LOC: Adaptation::Icap::TheConfig.connect_timeout_raw
8154 This parameter specifies how long to wait for the TCP connect to
8155 the requested ICAP server to complete before giving up and either
8156 terminating the HTTP transaction or bypassing the failure.
8158 The default for optional services is peer_connect_timeout.
8159 The default for essential services is connect_timeout.
8160 If this option is explicitly set, its value applies to all services.
8163 NAME: icap_io_timeout
8167 DEFAULT_DOC: Use read_timeout.
8168 LOC: Adaptation::Icap::TheConfig.io_timeout_raw
8171 This parameter specifies how long to wait for an I/O activity on
8172 an established, active ICAP connection before giving up and
8173 either terminating the HTTP transaction or bypassing the
8177 NAME: icap_service_failure_limit
8178 COMMENT: limit [in memory-depth time-units]
8179 TYPE: icap_service_failure_limit
8181 LOC: Adaptation::Icap::TheConfig
8184 The limit specifies the number of failures that Squid tolerates
8185 when establishing a new TCP connection with an ICAP service. If
8186 the number of failures exceeds the limit, the ICAP service is
8187 not used for new ICAP requests until it is time to refresh its
8190 A negative value disables the limit. Without the limit, an ICAP
8191 service will not be considered down due to connectivity failures
8192 between ICAP OPTIONS requests.
8194 Squid forgets ICAP service failures older than the specified
8195 value of memory-depth. The memory fading algorithm
8196 is approximate because Squid does not remember individual
8197 errors but groups them instead, splitting the option
8198 value into ten time slots of equal length.
8200 When memory-depth is 0 and by default this option has no
8201 effect on service failure expiration.
8203 Squid always forgets failures when updating service settings
8204 using an ICAP OPTIONS transaction, regardless of this option
8208 # suspend service usage after 10 failures in 5 seconds:
8209 icap_service_failure_limit 10 in 5 seconds
8212 NAME: icap_service_revival_delay
8215 LOC: Adaptation::Icap::TheConfig.service_revival_delay
8218 The delay specifies the number of seconds to wait after an ICAP
8219 OPTIONS request failure before requesting the options again. The
8220 failed ICAP service is considered "down" until fresh OPTIONS are
8223 The actual delay cannot be smaller than the hardcoded minimum
8224 delay of 30 seconds.
8227 NAME: icap_preview_enable
8231 LOC: Adaptation::Icap::TheConfig.preview_enable
8234 The ICAP Preview feature allows the ICAP server to handle the
8235 HTTP message by looking only at the beginning of the message body
8236 or even without receiving the body at all. In some environments,
8237 previews greatly speedup ICAP processing.
8239 During an ICAP OPTIONS transaction, the server may tell Squid what
8240 HTTP messages should be previewed and how big the preview should be.
8241 Squid will not use Preview if the server did not request one.
8243 To disable ICAP Preview for all ICAP services, regardless of
8244 individual ICAP server OPTIONS responses, set this option to "off".
8246 icap_preview_enable off
8249 NAME: icap_preview_size
8252 LOC: Adaptation::Icap::TheConfig.preview_size
8254 DEFAULT_DOC: No preview sent.
8256 The default size of preview data to be sent to the ICAP server.
8257 This value might be overwritten on a per server basis by OPTIONS requests.
8260 NAME: icap_206_enable
8264 LOC: Adaptation::Icap::TheConfig.allow206_enable
8267 206 (Partial Content) responses is an ICAP extension that allows the
8268 ICAP agents to optionally combine adapted and original HTTP message
8269 content. The decision to combine is postponed until the end of the
8270 ICAP response. Squid supports Partial Content extension by default.
8272 Activation of the Partial Content extension is negotiated with each
8273 ICAP service during OPTIONS exchange. Most ICAP servers should handle
8274 negotation correctly even if they do not support the extension, but
8275 some might fail. To disable Partial Content support for all ICAP
8276 services and to avoid any negotiation, set this option to "off".
8282 NAME: icap_default_options_ttl
8285 LOC: Adaptation::Icap::TheConfig.default_options_ttl
8288 The default TTL value for ICAP OPTIONS responses that don't have
8289 an Options-TTL header.
8292 NAME: icap_persistent_connections
8296 LOC: Adaptation::Icap::TheConfig.reuse_connections
8299 Whether or not Squid should use persistent connections to
8303 NAME: adaptation_send_client_ip icap_send_client_ip
8305 IFDEF: USE_ADAPTATION
8307 LOC: Adaptation::Config::send_client_ip
8310 If enabled, Squid shares HTTP client IP information with adaptation
8311 services. For ICAP, Squid adds the X-Client-IP header to ICAP requests.
8312 For eCAP, Squid sets the libecap::metaClientIp transaction option.
8314 See also: adaptation_uses_indirect_client
8317 NAME: adaptation_send_username icap_send_client_username
8319 IFDEF: USE_ADAPTATION
8321 LOC: Adaptation::Config::send_username
8324 This sends authenticated HTTP client username (if available) to
8325 the adaptation service.
8327 For ICAP, the username value is encoded based on the
8328 icap_client_username_encode option and is sent using the header
8329 specified by the icap_client_username_header option.
8332 NAME: icap_client_username_header
8335 LOC: Adaptation::Icap::TheConfig.client_username_header
8336 DEFAULT: X-Client-Username
8338 ICAP request header name to use for adaptation_send_username.
8341 NAME: icap_client_username_encode
8345 LOC: Adaptation::Icap::TheConfig.client_username_encode
8348 Whether to base64 encode the authenticated client username.
8352 TYPE: icap_service_type
8354 LOC: Adaptation::Icap::TheConfig
8357 Defines a single ICAP service using the following format:
8359 icap_service id vectoring_point uri [option ...]
8362 an opaque identifier or name which is used to direct traffic to
8363 this specific service. Must be unique among all adaptation
8364 services in squid.conf.
8366 vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
8367 This specifies at which point of transaction processing the
8368 ICAP service should be activated. *_postcache vectoring points
8369 are not yet supported.
8371 uri: icap://servername:port/servicepath
8372 ICAP server and service location.
8374 ICAP does not allow a single service to handle both REQMOD and RESPMOD
8375 transactions. Squid does not enforce that requirement. You can specify
8376 services with the same service_url and different vectoring_points. You
8377 can even specify multiple identical services as long as their
8378 service_names differ.
8380 To activate a service, use the adaptation_access directive. To group
8381 services, use adaptation_service_chain and adaptation_service_set.
8383 Service options are separated by white space. ICAP services support
8384 the following name=value options:
8387 If set to 'on' or '1', the ICAP service is treated as
8388 optional. If the service cannot be reached or malfunctions,
8389 Squid will try to ignore any errors and process the message as
8390 if the service was not enabled. No all ICAP errors can be
8391 bypassed. If set to 0, the ICAP service is treated as
8392 essential and all ICAP errors will result in an error page
8393 returned to the HTTP client.
8395 Bypass is off by default: services are treated as essential.
8398 If set to 'on' or '1', the ICAP service is allowed to
8399 dynamically change the current message adaptation plan by
8400 returning a chain of services to be used next. The services
8401 are specified using the X-Next-Services ICAP response header
8402 value, formatted as a comma-separated list of service names.
8403 Each named service should be configured in squid.conf. Other
8404 services are ignored. An empty X-Next-Services value results
8405 in an empty plan which ends the current adaptation.
8407 Dynamic adaptation plan may cross or cover multiple supported
8408 vectoring points in their natural processing order.
8410 Routing is not allowed by default: the ICAP X-Next-Services
8411 response header is ignored.
8414 Only has effect on split-stack systems. The default on those systems
8415 is to use IPv4-only connections. When set to 'on' this option will
8416 make Squid use IPv6-only connections to contact this ICAP service.
8418 on-overload=block|bypass|wait|force
8419 If the service Max-Connections limit has been reached, do
8420 one of the following for each new ICAP transaction:
8421 * block: send an HTTP error response to the client
8422 * bypass: ignore the "over-connected" ICAP service
8423 * wait: wait (in a FIFO queue) for an ICAP connection slot
8424 * force: proceed, ignoring the Max-Connections limit
8426 In SMP mode with N workers, each worker assumes the service
8427 connection limit is Max-Connections/N, even though not all
8428 workers may use a given service.
8430 The default value is "bypass" if service is bypassable,
8431 otherwise it is set to "wait".
8435 Use the given number as the Max-Connections limit, regardless
8436 of the Max-Connections value given by the service, if any.
8438 Older icap_service format without optional named parameters is
8439 deprecated but supported for backward compatibility.
8442 icap_service svcBlocker reqmod_precache icap://icap1.mydomain.net:1344/reqmod bypass=0
8443 icap_service svcLogger reqmod_precache icap://icap2.mydomain.net:1344/respmod routing=on
8447 TYPE: icap_class_type
8452 This deprecated option was documented to define an ICAP service
8453 chain, even though it actually defined a set of similar, redundant
8454 services, and the chains were not supported.
8456 To define a set of redundant services, please use the
8457 adaptation_service_set directive. For service chains, use
8458 adaptation_service_chain.
8462 TYPE: icap_access_type
8467 This option is deprecated. Please use adaptation_access, which
8468 has the same ICAP functionality, but comes with better
8469 documentation, and eCAP support.
8474 -----------------------------------------------------------------------------
8481 LOC: Adaptation::Ecap::TheConfig.onoff
8484 Controls whether eCAP support is enabled.
8488 TYPE: ecap_service_type
8490 LOC: Adaptation::Ecap::TheConfig
8493 Defines a single eCAP service
8495 ecap_service id vectoring_point uri [option ...]
8498 an opaque identifier or name which is used to direct traffic to
8499 this specific service. Must be unique among all adaptation
8500 services in squid.conf.
8502 vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
8503 This specifies at which point of transaction processing the
8504 eCAP service should be activated. *_postcache vectoring points
8505 are not yet supported.
8507 uri: ecap://vendor/service_name?custom&cgi=style¶meters=optional
8508 Squid uses the eCAP service URI to match this configuration
8509 line with one of the dynamically loaded services. Each loaded
8510 eCAP service must have a unique URI. Obtain the right URI from
8511 the service provider.
8513 To activate a service, use the adaptation_access directive. To group
8514 services, use adaptation_service_chain and adaptation_service_set.
8516 Service options are separated by white space. eCAP services support
8517 the following name=value options:
8520 If set to 'on' or '1', the eCAP service is treated as optional.
8521 If the service cannot be reached or malfunctions, Squid will try
8522 to ignore any errors and process the message as if the service
8523 was not enabled. No all eCAP errors can be bypassed.
8524 If set to 'off' or '0', the eCAP service is treated as essential
8525 and all eCAP errors will result in an error page returned to the
8528 Bypass is off by default: services are treated as essential.
8531 If set to 'on' or '1', the eCAP service is allowed to
8532 dynamically change the current message adaptation plan by
8533 returning a chain of services to be used next.
8535 Dynamic adaptation plan may cross or cover multiple supported
8536 vectoring points in their natural processing order.
8538 Routing is not allowed by default.
8540 Older ecap_service format without optional named parameters is
8541 deprecated but supported for backward compatibility.
8545 ecap_service s1 reqmod_precache ecap://filters.R.us/leakDetector?on_error=block bypass=off
8546 ecap_service s2 respmod_precache ecap://filters.R.us/virusFilter config=/etc/vf.cfg bypass=on
8549 NAME: loadable_modules
8551 IFDEF: USE_LOADABLE_MODULES
8552 LOC: Config.loadable_module_names
8555 Instructs Squid to load the specified dynamic module(s) or activate
8556 preloaded module(s).
8558 loadable_modules @DEFAULT_PREFIX@/lib/MinimalAdapter.so
8562 MESSAGE ADAPTATION OPTIONS
8563 -----------------------------------------------------------------------------
8566 NAME: adaptation_service_set
8567 TYPE: adaptation_service_set_type
8568 IFDEF: USE_ADAPTATION
8573 Configures an ordered set of similar, redundant services. This is
8574 useful when hot standby or backup adaptation servers are available.
8576 adaptation_service_set set_name service_name1 service_name2 ...
8578 The named services are used in the set declaration order. The first
8579 applicable adaptation service from the set is used first. The next
8580 applicable service is tried if and only if the transaction with the
8581 previous service fails and the message waiting to be adapted is still
8584 When adaptation starts, broken services are ignored as if they were
8585 not a part of the set. A broken service is a down optional service.
8587 The services in a set must be attached to the same vectoring point
8588 (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
8590 If all services in a set are optional then adaptation failures are
8591 bypassable. If all services in the set are essential, then a
8592 transaction failure with one service may still be retried using
8593 another service from the set, but when all services fail, the master
8594 transaction fails as well.
8596 A set may contain a mix of optional and essential services, but that
8597 is likely to lead to surprising results because broken services become
8598 ignored (see above), making previously bypassable failures fatal.
8599 Technically, it is the bypassability of the last failed service that
8602 See also: adaptation_access adaptation_service_chain
8605 adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup
8606 adaptation service_set svcLogger loggerLocal loggerRemote
8609 NAME: adaptation_service_chain
8610 TYPE: adaptation_service_chain_type
8611 IFDEF: USE_ADAPTATION
8616 Configures a list of complementary services that will be applied
8617 one-by-one, forming an adaptation chain or pipeline. This is useful
8618 when Squid must perform different adaptations on the same message.
8620 adaptation_service_chain chain_name service_name1 svc_name2 ...
8622 The named services are used in the chain declaration order. The first
8623 applicable adaptation service from the chain is used first. The next
8624 applicable service is applied to the successful adaptation results of
8625 the previous service in the chain.
8627 When adaptation starts, broken services are ignored as if they were
8628 not a part of the chain. A broken service is a down optional service.
8630 Request satisfaction terminates the adaptation chain because Squid
8631 does not currently allow declaration of RESPMOD services at the
8632 "reqmod_precache" vectoring point (see icap_service or ecap_service).
8634 The services in a chain must be attached to the same vectoring point
8635 (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
8637 A chain may contain a mix of optional and essential services. If an
8638 essential adaptation fails (or the failure cannot be bypassed for
8639 other reasons), the master transaction fails. Otherwise, the failure
8640 is bypassed as if the failed adaptation service was not in the chain.
8642 See also: adaptation_access adaptation_service_set
8645 adaptation_service_chain svcRequest requestLogger urlFilter leakDetector
8648 NAME: adaptation_access
8649 TYPE: adaptation_access_type
8650 IFDEF: USE_ADAPTATION
8653 DEFAULT_DOC: Allow, unless rules exist in squid.conf.
8655 Sends an HTTP transaction to an ICAP or eCAP adaptation service.
8657 adaptation_access service_name allow|deny [!]aclname...
8658 adaptation_access set_name allow|deny [!]aclname...
8660 At each supported vectoring point, the adaptation_access
8661 statements are processed in the order they appear in this
8662 configuration file. Statements pointing to the following services
8663 are ignored (i.e., skipped without checking their ACL):
8665 - services serving different vectoring points
8666 - "broken-but-bypassable" services
8667 - "up" services configured to ignore such transactions
8668 (e.g., based on the ICAP Transfer-Ignore header).
8670 When a set_name is used, all services in the set are checked
8671 using the same rules, to find the first applicable one. See
8672 adaptation_service_set for details.
8674 If an access list is checked and there is a match, the
8675 processing stops: For an "allow" rule, the corresponding
8676 adaptation service is used for the transaction. For a "deny"
8677 rule, no adaptation service is activated.
8679 It is currently not possible to apply more than one adaptation
8680 service at the same vectoring point to the same HTTP transaction.
8682 See also: icap_service and ecap_service
8685 adaptation_access service_1 allow all
8688 NAME: adaptation_service_iteration_limit
8690 IFDEF: USE_ADAPTATION
8691 LOC: Adaptation::Config::service_iteration_limit
8694 Limits the number of iterations allowed when applying adaptation
8695 services to a message. If your longest adaptation set or chain
8696 may have more than 16 services, increase the limit beyond its
8697 default value of 16. If detecting infinite iteration loops sooner
8698 is critical, make the iteration limit match the actual number
8699 of services in your longest adaptation set or chain.
8701 Infinite adaptation loops are most likely with routing services.
8703 See also: icap_service routing=1
8706 NAME: adaptation_masterx_shared_names
8708 IFDEF: USE_ADAPTATION
8709 LOC: Adaptation::Config::masterx_shared_name
8712 For each master transaction (i.e., the HTTP request and response
8713 sequence, including all related ICAP and eCAP exchanges), Squid
8714 maintains a table of metadata. The table entries are (name, value)
8715 pairs shared among eCAP and ICAP exchanges. The table is destroyed
8716 with the master transaction.
8718 This option specifies the table entry names that Squid must accept
8719 from and forward to the adaptation transactions.
8721 An ICAP REQMOD or RESPMOD transaction may set an entry in the
8722 shared table by returning an ICAP header field with a name
8723 specified in adaptation_masterx_shared_names.
8725 An eCAP REQMOD or RESPMOD transaction may set an entry in the
8726 shared table by implementing the libecap::visitEachOption() API
8727 to provide an option with a name specified in
8728 adaptation_masterx_shared_names.
8730 Squid will store and forward the set entry to subsequent adaptation
8731 transactions within the same master transaction scope.
8733 Only one shared entry name is supported at this time.
8736 # share authentication information among ICAP services
8737 adaptation_masterx_shared_names X-Subscriber-ID
8740 NAME: adaptation_meta
8742 IFDEF: USE_ADAPTATION
8743 LOC: Adaptation::Config::metaHeaders
8746 This option allows Squid administrator to add custom ICAP request
8747 headers or eCAP options to Squid ICAP requests or eCAP transactions.
8748 Use it to pass custom authentication tokens and other
8749 transaction-state related meta information to an ICAP/eCAP service.
8751 The addition of a meta header is ACL-driven:
8752 adaptation_meta name value [!]aclname ...
8754 Processing for a given header name stops after the first ACL list match.
8755 Thus, it is impossible to add two headers with the same name. If no ACL
8756 lists match for a given header name, no such header is added. For
8759 # do not debug transactions except for those that need debugging
8760 adaptation_meta X-Debug 1 needs_debugging
8762 # log all transactions except for those that must remain secret
8763 adaptation_meta X-Log 1 !keep_secret
8765 # mark transactions from users in the "G 1" group
8766 adaptation_meta X-Authenticated-Groups "G 1" authed_as_G1
8768 The "value" parameter may be a regular squid.conf token or a "double
8769 quoted string". Within the quoted string, use backslash (\) to escape
8770 any character, which is currently only useful for escaping backslashes
8771 and double quotes. For example,
8772 "this string has one backslash (\\) and two \"quotes\""
8774 Used adaptation_meta header values may be logged via %note
8775 logformat code. If multiple adaptation_meta headers with the same name
8776 are used during master transaction lifetime, the header values are
8777 logged in the order they were used and duplicate values are ignored
8778 (only the first repeated value will be logged).
8784 LOC: Adaptation::Icap::TheConfig.repeat
8785 DEFAULT_IF_NONE: deny all
8787 This ACL determines which retriable ICAP transactions are
8788 retried. Transactions that received a complete ICAP response
8789 and did not have to consume or produce HTTP bodies to receive
8790 that response are usually retriable.
8792 icap_retry allow|deny [!]aclname ...
8794 Squid automatically retries some ICAP I/O timeouts and errors
8795 due to persistent connection race conditions.
8797 See also: icap_retry_limit
8800 NAME: icap_retry_limit
8803 LOC: Adaptation::Icap::TheConfig.repeat_limit
8805 DEFAULT_DOC: No retries are allowed.
8807 Limits the number of retries allowed.
8809 Communication errors due to persistent connection race
8810 conditions are unavoidable, automatically retried, and do not
8811 count against this limit.
8813 See also: icap_retry
8819 -----------------------------------------------------------------------------
8822 NAME: check_hostnames
8825 LOC: Config.onoff.check_hostnames
8827 For security and stability reasons Squid can check
8828 hostnames for Internet standard RFC compliance. If you want
8829 Squid to perform these checks turn this directive on.
8832 NAME: allow_underscore
8835 LOC: Config.onoff.allow_underscore
8837 Underscore characters is not strictly allowed in Internet hostnames
8838 but nevertheless used by many sites. Set this to off if you want
8839 Squid to be strict about the standard.
8840 This check is performed only when check_hostnames is set to on.
8843 NAME: dns_retransmit_interval
8846 LOC: Config.Timeout.idns_retransmit
8848 Initial retransmit interval for DNS queries. The interval is
8849 doubled each time all configured DNS servers have been tried.
8855 LOC: Config.Timeout.idns_query
8857 DNS Query timeout. If no response is received to a DNS query
8858 within this time all DNS servers for the queried domain
8859 are assumed to be unavailable.
8862 NAME: dns_packet_max
8864 DEFAULT_DOC: EDNS disabled
8866 LOC: Config.dns.packet_max
8868 Maximum number of bytes packet size to advertise via EDNS.
8869 Set to "none" to disable EDNS large packet support.
8871 For legacy reasons DNS UDP replies will default to 512 bytes which
8872 is too small for many responses. EDNS provides a means for Squid to
8873 negotiate receiving larger responses back immediately without having
8874 to failover with repeat requests. Responses larger than this limit
8875 will retain the old behaviour of failover to TCP DNS.
8877 Squid has no real fixed limit internally, but allowing packet sizes
8878 over 1500 bytes requires network jumbogram support and is usually not
8881 WARNING: The RFC also indicates that some older resolvers will reply
8882 with failure of the whole request if the extension is added. Some
8883 resolvers have already been identified which will reply with mangled
8884 EDNS response on occasion. Usually in response to many-KB jumbogram
8885 sizes being advertised by Squid.
8886 Squid will currently treat these both as an unable-to-resolve domain
8887 even if it would be resolvable without EDNS.
8894 DEFAULT_DOC: Search for single-label domain names is disabled.
8895 LOC: Config.onoff.res_defnames
8897 Normally the RES_DEFNAMES resolver option is disabled
8898 (see res_init(3)). This prevents caches in a hierarchy
8899 from interpreting single-component hostnames locally. To allow
8900 Squid to handle single-component names, enable this option.
8903 NAME: dns_multicast_local
8907 DEFAULT_DOC: Search for .local and .arpa names is disabled.
8908 LOC: Config.onoff.dns_mdns
8910 When set to on, Squid sends multicast DNS lookups on the local
8911 network for domains ending in .local and .arpa.
8912 This enables local servers and devices to be contacted in an
8913 ad-hoc or zero-configuration network environment.
8916 NAME: dns_nameservers
8919 DEFAULT_DOC: Use operating system definitions
8920 LOC: Config.dns_nameservers
8922 Use this if you want to specify a list of DNS name servers
8923 (IP addresses) to use instead of those given in your
8924 /etc/resolv.conf file.
8926 On Windows platforms, if no value is specified here or in
8927 the /etc/resolv.conf file, the list of DNS name servers are
8928 taken from the Windows registry, both static and dynamic DHCP
8929 configurations are supported.
8931 Example: dns_nameservers 10.0.0.1 192.172.0.4
8936 DEFAULT: @DEFAULT_HOSTS@
8937 LOC: Config.etcHostsPath
8939 Location of the host-local IP name-address associations
8940 database. Most Operating Systems have such a file on different
8942 - Un*X & Linux: /etc/hosts
8943 - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
8944 (%SystemRoot% value install default is c:\winnt)
8945 - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
8946 (%SystemRoot% value install default is c:\windows)
8947 - Windows 9x/Me: %windir%\hosts
8948 (%windir% value is usually c:\windows)
8949 - Cygwin: /etc/hosts
8951 The file contains newline-separated definitions, in the
8952 form ip_address_in_dotted_form name [name ...] names are
8953 whitespace-separated. Lines beginning with an hash (#)
8954 character are comments.
8956 The file is checked at startup and upon configuration.
8957 If set to 'none', it won't be checked.
8958 If append_domain is used, that domain will be added to
8959 domain-local (i.e. not containing any dot character) host
8965 LOC: Config.appendDomain
8967 DEFAULT_DOC: Use operating system definitions
8969 Appends local domain name to hostnames without any dots in
8970 them. append_domain must begin with a period.
8972 Be warned there are now Internet names with no dots in
8973 them using only top-domain names, so setting this may
8974 cause some Internet sites to become unavailable.
8977 append_domain .yourdomain.com
8980 NAME: ignore_unknown_nameservers
8982 LOC: Config.onoff.ignore_unknown_nameservers
8985 By default Squid checks that DNS responses are received
8986 from the same IP addresses they are sent to. If they
8987 don't match, Squid ignores the response and writes a warning
8988 message to cache.log. You can allow responses from unknown
8989 nameservers by setting this option to 'off'.
8995 LOC: Config.dns.v4_first
8997 With the IPv6 Internet being as fast or faster than IPv4 Internet
8998 for most networks Squid prefers to contact websites over IPv6.
9000 This option reverses the order of preference to make Squid contact
9001 dual-stack websites over IPv4 first. Squid will still perform both
9002 IPv6 and IPv4 DNS lookups before connecting.
9005 This option will restrict the situations under which IPv6
9006 connectivity is used (and tested). Hiding network problems
9007 which would otherwise be detected and warned about.
9011 COMMENT: (number of entries)
9014 LOC: Config.ipcache.size
9016 Maximum number of DNS IP cache entries.
9023 LOC: Config.ipcache.low
9030 LOC: Config.ipcache.high
9032 The size, low-, and high-water marks for the IP cache.
9035 NAME: fqdncache_size
9036 COMMENT: (number of entries)
9039 LOC: Config.fqdncache.size
9041 Maximum number of FQDN cache entries.
9046 -----------------------------------------------------------------------------
9049 NAME: configuration_includes_quoted_values
9051 TYPE: configuration_includes_quoted_values
9053 LOC: ConfigParser::RecognizeQuotedValues
9055 If set, Squid will recognize each "quoted string" after a configuration
9056 directive as a single parameter. The quotes are stripped before the
9057 parameter value is interpreted or used.
9058 See "Values with spaces, quotes, and other special characters"
9059 section for more details.
9066 LOC: Config.onoff.mem_pools
9068 If set, Squid will keep pools of allocated (but unused) memory
9069 available for future use. If memory is a premium on your
9070 system and you believe your malloc library outperforms Squid
9071 routines, disable this.
9074 NAME: memory_pools_limit
9078 LOC: Config.MemPools.limit
9080 Used only with memory_pools on:
9081 memory_pools_limit 50 MB
9083 If set to a non-zero value, Squid will keep at most the specified
9084 limit of allocated (but unused) memory in memory pools. All free()
9085 requests that exceed this limit will be handled by your malloc
9086 library. Squid does not pre-allocate any memory, just safe-keeps
9087 objects that otherwise would be free()d. Thus, it is safe to set
9088 memory_pools_limit to a reasonably high value even if your
9089 configuration will use less memory.
9091 If set to none, Squid will keep all memory it can. That is, there
9092 will be no limit on the total amount of memory used for safe-keeping.
9094 To disable memory allocation optimization, do not set
9095 memory_pools_limit to 0 or none. Set memory_pools to "off" instead.
9097 An overhead for maintaining memory pools is not taken into account
9098 when the limit is checked. This overhead is close to four bytes per
9099 object kept. However, pools may actually _save_ memory because of
9100 reduced memory thrashing in your malloc library.
9104 COMMENT: on|off|transparent|truncate|delete
9107 LOC: opt_forwarded_for
9109 If set to "on", Squid will append your client's IP address
9110 in the HTTP requests it forwards. By default it looks like:
9112 X-Forwarded-For: 192.1.2.3
9114 If set to "off", it will appear as
9116 X-Forwarded-For: unknown
9118 If set to "transparent", Squid will not alter the
9119 X-Forwarded-For header in any way.
9121 If set to "delete", Squid will delete the entire
9122 X-Forwarded-For header.
9124 If set to "truncate", Squid will remove all existing
9125 X-Forwarded-For entries, and place the client IP as the sole entry.
9128 NAME: cachemgr_passwd
9129 TYPE: cachemgrpasswd
9131 DEFAULT_DOC: No password. Actions which require password are denied.
9132 LOC: Config.passwd_list
9134 Specify passwords for cachemgr operations.
9136 Usage: cachemgr_passwd password action action ...
9138 Some valid actions are (see cache manager menu for a full list):
9178 * Indicates actions which will not be performed without a
9179 valid password, others can be performed if not listed here.
9181 To disable an action, set the password to "disable".
9182 To allow performing an action without a password, set the
9185 Use the keyword "all" to set the same password for all actions.
9188 cachemgr_passwd secret shutdown
9189 cachemgr_passwd lesssssssecret info stats/objects
9190 cachemgr_passwd disable all
9197 LOC: Config.onoff.client_db
9199 If you want to disable collecting per-client statistics,
9200 turn off client_db here.
9203 NAME: refresh_all_ims
9207 LOC: Config.onoff.refresh_all_ims
9209 When you enable this option, squid will always check
9210 the origin server for an update when a client sends an
9211 If-Modified-Since request. Many browsers use IMS
9212 requests when the user requests a reload, and this
9213 ensures those clients receive the latest version.
9215 By default (off), squid may return a Not Modified response
9216 based on the age of the cached version.
9219 NAME: reload_into_ims
9220 IFDEF: USE_HTTP_VIOLATIONS
9224 LOC: Config.onoff.reload_into_ims
9226 When you enable this option, client no-cache or ``reload''
9227 requests will be changed to If-Modified-Since requests.
9228 Doing this VIOLATES the HTTP standard. Enabling this
9229 feature could make you liable for problems which it
9232 see also refresh_pattern for a more selective approach.
9235 NAME: connect_retries
9237 LOC: Config.connect_retries
9239 DEFAULT_DOC: Do not retry failed connections.
9241 This sets the maximum number of connection attempts made for each
9242 TCP connection. The connect_retries attempts must all still
9243 complete within the connection timeout period.
9245 The default is not to re-try if the first connection attempt fails.
9246 The (not recommended) maximum is 10 tries.
9248 A warning message will be generated if it is set to a too-high
9249 value and the configured value will be over-ridden.
9251 Note: These re-tries are in addition to forward_max_tries
9252 which limit how many different addresses may be tried to find
9256 NAME: retry_on_error
9258 LOC: Config.retry.onerror
9261 If set to ON Squid will automatically retry requests when
9262 receiving an error response with status 403 (Forbidden),
9263 500 (Internal Error), 501 or 503 (Service not available).
9264 Status 502 and 504 (Gateway errors) are always retried.
9266 This is mainly useful if you are in a complex cache hierarchy to
9267 work around access control errors.
9269 NOTE: This retry will attempt to find another working destination.
9270 Which is different from the server which just failed.
9273 NAME: as_whois_server
9275 LOC: Config.as_whois_server
9276 DEFAULT: whois.ra.net
9278 WHOIS server to query for AS numbers. NOTE: AS numbers are
9279 queried only when Squid starts up, not for every request.
9284 LOC: Config.onoff.offline
9287 Enable this option and Squid will never try to validate cached
9291 NAME: uri_whitespace
9292 TYPE: uri_whitespace
9293 LOC: Config.uri_whitespace
9296 What to do with requests that have whitespace characters in the
9299 strip: The whitespace characters are stripped out of the URL.
9300 This is the behavior recommended by RFC2396 and RFC3986
9301 for tolerant handling of generic URI.
9302 NOTE: This is one difference between generic URI and HTTP URLs.
9304 deny: The request is denied. The user receives an "Invalid
9306 This is the behaviour recommended by RFC2616 for safe
9307 handling of HTTP request URL.
9309 allow: The request is allowed and the URI is not changed. The
9310 whitespace characters remain in the URI. Note the
9311 whitespace is passed to redirector processes if they
9313 Note this may be considered a violation of RFC2616
9314 request parsing where whitespace is prohibited in the
9317 encode: The request is allowed and the whitespace characters are
9318 encoded according to RFC1738.
9320 chop: The request is allowed and the URI is chopped at the
9324 NOTE the current Squid implementation of encode and chop violates
9325 RFC2616 by not using a 301 redirect after altering the URL.
9330 LOC: Config.chroot_dir
9333 Specifies a directory where Squid should do a chroot() while
9334 initializing. This also causes Squid to fully drop root
9335 privileges after initializing. This means, for example, if you
9336 use a HTTP port less than 1024 and try to reconfigure, you may
9337 get an error saying that Squid can not open the port.
9340 NAME: balance_on_multiple_ip
9342 LOC: Config.onoff.balance_on_multiple_ip
9345 Modern IP resolvers in squid sort lookup results by preferred access.
9346 By default squid will use these IP in order and only rotates to
9347 the next listed when the most preffered fails.
9349 Some load balancing servers based on round robin DNS have been
9350 found not to preserve user session state across requests
9351 to different IP addresses.
9353 Enabling this directive Squid rotates IP's per request.
9356 NAME: pipeline_prefetch
9357 TYPE: pipelinePrefetch
9358 LOC: Config.pipeline_max_prefetch
9360 DEFAULT_DOC: Do not pre-parse pipelined requests.
9362 HTTP clients may send a pipeline of 1+N requests to Squid using a
9363 single connection, without waiting for Squid to respond to the first
9364 of those requests. This option limits the number of concurrent
9365 requests Squid will try to handle in parallel. If set to N, Squid
9366 will try to receive and process up to 1+N requests on the same
9367 connection concurrently.
9369 Defaults to 0 (off) for bandwidth management and access logging
9372 NOTE: pipelining requires persistent connections to clients.
9374 WARNING: pipelining breaks NTLM and Negotiate/Kerberos authentication.
9377 NAME: high_response_time_warning
9380 LOC: Config.warnings.high_rptm
9382 DEFAULT_DOC: disabled.
9384 If the one-minute median response time exceeds this value,
9385 Squid prints a WARNING with debug level 0 to get the
9386 administrators attention. The value is in milliseconds.
9389 NAME: high_page_fault_warning
9391 LOC: Config.warnings.high_pf
9393 DEFAULT_DOC: disabled.
9395 If the one-minute average page fault rate exceeds this
9396 value, Squid prints a WARNING with debug level 0 to get
9397 the administrators attention. The value is in page faults
9401 NAME: high_memory_warning
9403 LOC: Config.warnings.high_memory
9404 IFDEF: HAVE_MSTATS&&HAVE_GNUMALLOC_H
9406 DEFAULT_DOC: disabled.
9408 If the memory usage (as determined by gnumalloc, if available and used)
9409 exceeds this amount, Squid prints a WARNING with debug level 0 to get
9410 the administrators attention.
9412 # TODO: link high_memory_warning to mempools?
9414 NAME: sleep_after_fork
9415 COMMENT: (microseconds)
9417 LOC: Config.sleep_after_fork
9420 When this is set to a non-zero value, the main Squid process
9421 sleeps the specified number of microseconds after a fork()
9422 system call. This sleep may help the situation where your
9423 system reports fork() failures due to lack of (virtual)
9424 memory. Note, however, if you have a lot of child
9425 processes, these sleep delays will add up and your
9426 Squid will not service requests for some amount of time
9427 until all the child processes have been started.
9428 On Windows value less then 1000 (1 milliseconds) are
9432 NAME: windows_ipaddrchangemonitor
9433 IFDEF: _SQUID_WINDOWS_
9437 LOC: Config.onoff.WIN32_IpAddrChangeMonitor
9439 On Windows Squid by default will monitor IP address changes and will
9440 reconfigure itself after any detected event. This is very useful for
9441 proxies connected to internet with dial-up interfaces.
9442 In some cases (a Proxy server acting as VPN gateway is one) it could be
9443 desiderable to disable this behaviour setting this to 'off'.
9444 Note: after changing this, Squid service must be restarted.
9449 IFDEF: USE_SQUID_EUI
9451 LOC: Eui::TheConfig.euiLookup
9453 Whether to lookup the EUI or MAC address of a connected client.
9456 NAME: max_filedescriptors max_filedesc
9459 DEFAULT_DOC: Use operating system limits set by ulimit.
9460 LOC: Config.max_filedescriptors
9462 Reduce the maximum number of filedescriptors supported below
9463 the usual operating system defaults.
9465 Remove from squid.conf to inherit the current ulimit setting.
9467 Note: Changing this requires a restart of Squid. Also
9468 not all I/O types supports large values (eg on Windows).
9475 DEFAULT_DOC: SMP support disabled.
9477 Number of main Squid processes or "workers" to fork and maintain.
9478 0: "no daemon" mode, like running "squid -N ..."
9479 1: "no SMP" mode, start one main Squid process daemon (default)
9480 N: start N main Squid process daemons (i.e., SMP mode)
9482 In SMP mode, each worker does nearly all what a single Squid daemon
9483 does (e.g., listen on http_port and forward HTTP requests).
9486 NAME: cpu_affinity_map
9487 TYPE: CpuAffinityMap
9488 LOC: Config.cpuAffinityMap
9490 DEFAULT_DOC: Let operating system decide.
9492 Usage: cpu_affinity_map process_numbers=P1,P2,... cores=C1,C2,...
9494 Sets 1:1 mapping between Squid processes and CPU cores. For example,
9496 cpu_affinity_map process_numbers=1,2,3,4 cores=1,3,5,7
9498 affects processes 1 through 4 only and places them on the first
9499 four even cores, starting with core #1.
9501 CPU cores are numbered starting from 1. Requires support for
9502 sched_getaffinity(2) and sched_setaffinity(2) system calls.
9504 Multiple cpu_affinity_map options are merged.
9509 NAME: force_request_body_continuation
9511 LOC: Config.accessList.forceRequestBodyContinuation
9513 DEFAULT_DOC: Deny, unless rules exist in squid.conf.
9515 This option controls how Squid handles data upload requests from HTTP
9516 and FTP agents that require a "Please Continue" control message response
9517 to actually send the request body to Squid. It is mostly useful in
9518 adaptation environments.
9520 When Squid receives an HTTP request with an "Expect: 100-continue"
9521 header or an FTP upload command (e.g., STOR), Squid normally sends the
9522 request headers or FTP command information to an adaptation service (or
9523 peer) and waits for a response. Most adaptation services (and some
9524 broken peers) may not respond to Squid at that stage because they may
9525 decide to wait for the HTTP request body or FTP data transfer. However,
9526 that request body or data transfer may never come because Squid has not
9527 responded with the HTTP 100 or FTP 150 (Please Continue) control message
9528 to the request sender yet!
9530 An allow match tells Squid to respond with the HTTP 100 or FTP 150
9531 (Please Continue) control message on its own, before forwarding the
9532 request to an adaptation service or peer. Such a response usually forces
9533 the request sender to proceed with sending the body. A deny match tells
9534 Squid to delay that control response until the origin server confirms
9535 that the request body is needed. Delaying is the default behavior.