slyfox1186

install-squid-proxy-debian.sh

Dec 4th, 2022 (edited)
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 375.64 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. clear
  4.  
  5. # YOU NEED TO CUSTOMIZE EACH VARIABLE BELOW WITH YOUR OWN VALUES TO OPTIMIZE SQUID'S PERFORMANCE
  6. # YOU CAN ADD, REMOVE, OR MODIFY THIS SCRIPT AS NEEDED
  7.  
  8. # CHECK SQUID CURRENT STATUS
  9. systemctl status squid.service
  10. if ! systemctl status squid.service; then
  11.     echo -e "Squid service needs to be running to continue! Starting Squid now!\\n"
  12.     sleep 2
  13.     service squid start
  14.     if ! service squid start; then exit 1; fi
  15. else
  16.     echo
  17.     read -t 10 -p 'Sleeping 10 seconds. Press enter to continue.'
  18.     clear
  19. fi
  20.  
  21. # SET DEFAULT USER/OWNER OF SQUID (THE UBUNTU AND DEBIAN DEFAULT IS PROXY)
  22. SQUID_USER='proxy'
  23.  
  24. ####################
  25. ## CACHE SETTINGS ##
  26. ####################
  27.  
  28. # SET CACHE DIRECTORY PATH
  29. CACHE_DIR_SQUID='/var/spool/squid'
  30. # CACHE DIR SQUID SIZE UNITS IN MB
  31. CACHE_DIR_SQUID_SIZE='800000'
  32. CACHE_SWP_HIGH='95'
  33. CACHE_SWP_LOW='90'
  34. # MEMORY CACHE MODE options [ always | disk ]
  35. MEM_CACHE_MODE='always'
  36. # CACHE MEMORY TRANSIT FILE ALLOCATION MAX SIZE LIMIT (CAN BE INCREASED)
  37. CACHE_MEM='1258 MB'
  38.  
  39. # LIMIT CLIENT REQUESTS BUFFER SIZE
  40. CLIENT_RQST_BFR_SIZE='512 KB'
  41.  
  42. # FAVOR IPV6 OVER IPV4
  43. # THIS GREATLY INCREASE OR DECREASE THE SPEED OF YOUR PROXY. IF ONE SETTINGS
  44. # ISN'T SHOWING PROMISE TRY THE OPPOSITE AS SQUID CLAIMS TO PREFER IPV6 OVER
  45. # IPV4 BUT MY EXPERIENCE HAS BEEN THE EXACT OPPOSITE.
  46. DNS_V4_FIRST='on'
  47.  
  48. # FIREWALLD PROGRAM PORTS
  49. PORT_PIHOLE='4711/tcp'
  50. PORT_SQUID='3128/tcp'
  51.  
  52. # FIREWALLD SSH PORTS
  53. SSH_JMACBOOK='26500/tcp'
  54. SSH_PIHOLE='24500/tcp'
  55. SSH_QNAS='25500/tcp'
  56.  
  57. # FIREWALLD SERVICES (THIS SHOULD BE CONSIDERED AT HOME SETTINGS WHERE YOU TRUST THE COMPUTERS ACCESSABLE TO YOUR NETWORK)
  58. SVC01='dhcp'
  59. SVC02='dhcpv6'
  60. SVC03='dns'
  61. SVC04='http'
  62. SVC05='ssh'
  63.  
  64. # SQUID BASIC AUTHORIZATION LIBRARIES
  65. LIB1_SQUID='/usr/lib/squid3/basic_ncsa_auth'
  66. LIB2_SQUID='/usr/lib/squid/basic_ncsa_auth'
  67.  
  68. # THIS PC'S LAN (LOCAL) IP ADDRESS
  69. SERVER_IP='192.168.1.40'
  70.  
  71. # OBJECT SIZES
  72. MIN_OBJ_SIZE='0 KB'
  73. MAX_OBJ_SIZE='10 GB'
  74. MAX_OBJ_SIZE_MEM='1024 KB'
  75.  
  76. # SQUID FILES
  77. SQUID_CONF='/etc/squid/squid.conf'
  78. SQUID_PASSWD='/etc/squid/passwd'
  79. SQUID_WHITELIST='/etc/squid/sites.whitelist'
  80. SQUID_BLACKLIST='/etc/squid/sites.blacklist'
  81.  
  82. # DETECT BROKEN PCON SETTINGS
  83. DETECT_BROKEN_PCONN='off'
  84.  
  85. # find which path exists
  86. if [ -f "${LIB1_SQUID}" ]; then BASIC_NCSA_AUTH="${LIB1_SQUID}"
  87. elif [ -f "${LIB2_SQUID}" ]; then BASIC_NCSA_AUTH="${LIB2_SQUID}"
  88. else
  89.     clear
  90.     echo -e "File error: 'basic_ncsa_auth' was not found. Unable to set the required variable BASIC_NCSA_AUTH\\nPlease Fix...\\n"
  91.     read -p 'Press enter to exit.'
  92.     exit 1
  93. fi
  94.  
  95. # CREATE SQUID.CONF FILE
  96. cat > "${SQUID_CONF}" <<EOF && echo -e "squid.conf was created successfully!" || echo -e "squid.conf failed to create!"
  97. #    WELCOME TO SQUID 5.2
  98. #    ----------------------------
  99. #
  100. #    This is the documentation for the Squid configuration file.
  101. #    This documentation can also be found online at:
  102. #        http://www.squid-cache.org/Doc/config/
  103. #
  104. #    You may wish to look at the Squid home page and wiki for the
  105. #    FAQ and other documentation:
  106. #        http://www.squid-cache.org/
  107. #        http://wiki.squid-cache.org/SquidFaq
  108. #        http://wiki.squid-cache.org/ConfigExamples
  109. #
  110. #    This documentation shows what the defaults for various directives
  111. #    happen to be.  If you don't need to change the default, you should
  112. #    leave the line out of your squid.conf in most cases.
  113. #
  114. #    In some cases "none" refers to no default setting at all,
  115. #    while in other cases it refers to the value of the option
  116. #    - the comments for that keyword indicate if this is the case.
  117. #
  118.  
  119. #  Configuration options can be included using the "include" directive.
  120. #  Include takes a list of files to include. Quoting and wildcards are
  121. #  supported.
  122. #
  123. #  For example,
  124. #
  125. #  include /path/to/included/file/squid.acl.config
  126. #
  127. #  Includes can be nested up to a hard-coded depth of 16 levels.
  128. #  This arbitrary restriction is to prevent recursive include references
  129. #  from causing Squid entering an infinite loop whilst trying to load
  130. #  configuration files.
  131. #
  132. #  Values with byte units
  133. #
  134. #    Squid accepts size units on some size related directives. All
  135. #    such directives are documented with a default value displaying
  136. #    a unit.
  137. #
  138. #    Units accepted by Squid are:
  139. #        bytes - byte
  140. #        KB - Kilobyte (1024 bytes)
  141. #        MB - Megabyte
  142. #        GB - Gigabyte
  143. #
  144. #  Values with time units
  145. #
  146. #    Time-related directives marked with either "time-units" or
  147. #    "time-units-small" accept a time unit. The supported time units are:
  148. #
  149. #        nanosecond (time-units-small only)
  150. #        microsecond (time-units-small only)
  151. #        millisecond
  152. #        second
  153. #        minute
  154. #        hour
  155. #        day
  156. #        week
  157. #        fortnight
  158. #        month - 30 days
  159. #        year - 31557790080 milliseconds (just over 365 days)
  160. #        decade
  161. #
  162. #  Values with spaces, quotes, and other special characters
  163. #
  164. #    Squid supports directive parameters with spaces, quotes, and other
  165. #    special characters. Surround such parameters with "double quotes". Use
  166. #    the configuration_includes_quoted_values directive to enable or
  167. #    disable that support.
  168. #
  169. #    Squid supports reading configuration option parameters from external
  170. #    files using the syntax:
  171. #        parameters("/path/filename")
  172. #    For example:
  173. #        acl allowlist dstdomain parameters("/etc/squid/allowlist.txt")
  174. #
  175. #  Conditional configuration
  176. #
  177. #    If-statements can be used to make configuration directives
  178. #    depend on conditions:
  179. #
  180. #        if <CONDITION>
  181. #            ... regular configuration directives ...
  182. #        [else
  183. #            ... regular configuration directives ...]
  184. #        endif
  185. #
  186. #    The else part is optional. The keywords "if", "else", and "endif"
  187. #    must be typed on their own lines, as if they were regular
  188. #    configuration directives.
  189. #
  190. #    NOTE: An else-if condition is not supported.
  191. #
  192. #    These individual conditions types are supported:
  193. #
  194. #        true
  195. #        Always evaluates to true.
  196. #        false
  197. #        Always evaluates to false.
  198. #        <integer> = <integer>
  199. #            Equality comparison of two integer numbers.
  200. #
  201. #
  202. #  SMP-Related Macros
  203. #
  204. #    The following SMP-related preprocessor macros can be used.
  205. #
  206. #    ${process_name} expands to the current Squid process "name"
  207. #    (e.g., squid1, squid2, or cache1).
  208. #
  209. #    ${process_number} expands to the current Squid process
  210. #    identifier, which is an integer number (e.g., 1, 2, 3) unique
  211. #    across all Squid processes of the current service instance.
  212. #
  213. #    ${service_name} expands into the current Squid service instance
  214. #    name identifier which is provided by -n on the command line.
  215. #
  216. #  Logformat Macros
  217. #
  218. #    Logformat macros can be used in many places outside of the logformat
  219. #    directive. In theory, all of the logformat codes can be used as %macros,
  220. #    where they are supported. In practice, a %macro expands as a dash (-) when
  221. #    the transaction does not yet have enough information and a value is needed.
  222. #
  223. #    There is no definitive list of what tokens are available at the various
  224. #    stages of the transaction.
  225. #
  226. #    And some information may already be available to Squid but not yet
  227. #    committed where the macro expansion code can access it (report
  228. #    such instances!). The macro will be expanded into a single dash
  229. #    ('-') in such cases. Not all macros have been tested.
  230. #
  231.  
  232. #  TAG: broken_vary_encoding
  233. #    This option is not yet supported by Squid-3.
  234. #Default:
  235. # none
  236.  
  237. #  TAG: cache_vary
  238. #    This option is not yet supported by Squid-3.
  239. #Default:
  240. # none
  241.  
  242. #  TAG: error_map
  243. #    This option is not yet supported by Squid-3.
  244. #Default:
  245. # none
  246.  
  247. #  TAG: external_refresh_check
  248. #    This option is not yet supported by Squid-3.
  249. #Default:
  250. # none
  251.  
  252. #  TAG: location_rewrite_program
  253. #    This option is not yet supported by Squid-3.
  254. #Default:
  255. # none
  256.  
  257. #  TAG: refresh_stale_hit
  258. #    This option is not yet supported by Squid-3.
  259. #Default:
  260. # none
  261.  
  262. #  TAG: dns_v4_first
  263. #    Remove this line. Squid no longer supports preferential treatment of DNS A records.
  264. #Default:
  265. dns_v4_first ${DNS_V4_FIRST}
  266.  
  267. #  TAG: cache_peer_domain
  268. #    Replace with dstdomain ACLs and cache_peer_access.
  269. #Default:
  270. # none
  271.  
  272. #  TAG: ie_refresh
  273. #    Remove this line. The behaviour enabled by this is no longer needed.
  274. #Default:
  275. # none
  276.  
  277. #  TAG: sslproxy_cafile
  278. #    Remove this line. Use tls_outgoing_options cafile= instead.
  279. #Default:
  280. # none
  281.  
  282. #  TAG: sslproxy_capath
  283. #    Remove this line. Use tls_outgoing_options capath= instead.
  284. #Default:
  285. # none
  286.  
  287. #  TAG: sslproxy_cipher
  288. #    Remove this line. Use tls_outgoing_options cipher= instead.
  289. #Default:
  290. # none
  291.  
  292. #  TAG: sslproxy_client_certificate
  293. #    Remove this line. Use tls_outgoing_options cert= instead.
  294. #Default:
  295. # none
  296.  
  297. #  TAG: sslproxy_client_key
  298. #    Remove this line. Use tls_outgoing_options key= instead.
  299. #Default:
  300. # none
  301.  
  302. #  TAG: sslproxy_flags
  303. #    Remove this line. Use tls_outgoing_options flags= instead.
  304. #Default:
  305. # none
  306.  
  307. #  TAG: sslproxy_options
  308. #    Remove this line. Use tls_outgoing_options options= instead.
  309. #Default:
  310. # none
  311.  
  312. #  TAG: sslproxy_version
  313. #    Remove this line. Use tls_outgoing_options options= instead.
  314. #Default:
  315. # none
  316.  
  317. #  TAG: hierarchy_stoplist
  318. #    Remove this line. Use always_direct or cache_peer_access ACLs instead if you need to prevent cache_peer use.
  319. #Default:
  320. # none
  321.  
  322. #  TAG: log_access
  323. #    Remove this line. Use acls with access_log directives to control access logging
  324. #Default:
  325. # none
  326.  
  327. #  TAG: log_icap
  328. #    Remove this line. Use acls with icap_log directives to control icap logging
  329. #Default:
  330. # none
  331.  
  332. #  TAG: ignore_ims_on_miss
  333. #    Remove this line. The HTTP/1.1 feature is now configured by 'cache_miss_revalidate'.
  334. #Default:
  335. # none
  336.  
  337. #  TAG: balance_on_multiple_ip
  338. #    Remove this line. Squid performs a 'Happy Eyeballs' algorithm, this multiple-IP algorithm is not longer relevant.
  339. #Default:
  340. # none
  341.  
  342. #  TAG: chunked_request_body_max_size
  343. #    Remove this line. Squid is now HTTP/1.1 compliant.
  344. #Default:
  345. # none
  346.  
  347. #  TAG: dns_v4_fallback
  348. #    Remove this line. Squid performs a 'Happy Eyeballs' algorithm, the 'fallback' algorithm is no longer relevant.
  349. #Default:
  350. # none
  351.  
  352. #  TAG: emulate_httpd_log
  353. #    Replace this with an access_log directive using the format 'common' or 'combined'.
  354. #Default:
  355. # none
  356.  
  357. #  TAG: forward_log
  358. #    Use a regular access.log with ACL limiting it to MISS events.
  359. #Default:
  360. # none
  361.  
  362. #  TAG: ftp_list_width
  363. #    Remove this line. Configure FTP page display using the CSS controls in errorpages.css instead.
  364. #Default:
  365. # none
  366.  
  367. #  TAG: ignore_expect_100
  368. #    Remove this line. The HTTP/1.1 feature is now fully supported by default.
  369. #Default:
  370. # none
  371.  
  372. #  TAG: log_fqdn
  373. #    Remove this option from your config. To log FQDN use %>A in the log format.
  374. #Default:
  375. # log_fqdn on (dpreciated/unusable)
  376.  
  377. #  TAG: log_ip_on_direct
  378. #    Remove this option from your config. To log server or peer names use %<A in the log format.
  379. #Default:
  380. # none
  381.  
  382. #  TAG: maximum_single_addr_tries
  383. #    Replaced by connect_retries. The behaviour has changed, please read the documentation before altering.
  384. #Default:
  385. # none
  386.  
  387. #  TAG: referer_log
  388. #    Replace this with an access_log directive using the format 'referrer'.
  389. #Default:
  390. # none
  391.  
  392. #  TAG: update_headers
  393. #    Remove this line. The feature is supported by default in storage types where update is implemented.
  394. #Default:
  395. # none
  396.  
  397. #  TAG: url_rewrite_concurrency
  398. #    Remove this line. Set the 'concurrency=' option of url_rewrite_children instead.
  399. #Default:
  400. # none
  401.  
  402. #  TAG: useragent_log
  403. #    Replace this with an access_log directive using the format 'useragent'.
  404. #Default:
  405. # none
  406.  
  407. #  TAG: dns_testnames
  408. #    Remove this line. DNS is no longer tested on startup.
  409. #Default:
  410. # none
  411.  
  412. #  TAG: extension_methods
  413. #    Remove this line. All valid methods for HTTP are accepted by default.
  414. #Default:
  415. # none
  416.  
  417. #  TAG: zero_buffers
  418. #Default:
  419. # none
  420.  
  421. #  TAG: incoming_rate
  422. #Default:
  423. # none
  424.  
  425. #  TAG: server_http11
  426. #    Remove this line. HTTP/1.1 is supported by default.
  427. #Default:
  428. # none
  429.  
  430. #  TAG: upgrade_http0.9
  431. #    Remove this line. ICY/1.0 streaming protocol is supported by default.
  432. #Default:
  433. # none
  434.  
  435. #  TAG: zph_local
  436. #    Alter these entries. Use the qos_flows directive instead.
  437. #Default:
  438. # none
  439.  
  440. #  TAG: header_access
  441. #    Since squid-3.0 replace with request_header_access or reply_header_access
  442. #    depending on whether you wish to match client requests or server replies.
  443. #Default:
  444. # none
  445.  
  446. #  TAG: httpd_accel_no_pmtu_disc
  447. #    Since squid-3.0 use the 'disable-pmtu-discovery' flag on http_port instead.
  448. #Default:
  449. # none
  450.  
  451. #  TAG: wais_relay_host
  452. #    Replace this line with 'cache_peer' configuration.
  453. #Default:
  454. # none
  455.  
  456. #  TAG: wais_relay_port
  457. #    Replace this line with 'cache_peer' configuration.
  458. #Default:
  459. # none
  460.  
  461. # OPTIONS FOR SMP
  462. # -----------------------------------------------------------------------------
  463.  
  464. #  TAG: workers
  465. #    Number of main Squid processes or "workers" to fork and maintain.
  466. #    0: "no daemon" mode, like running "squid -N ..."
  467. #    1: "no SMP" mode, start one main Squid process daemon (default)
  468. #    N: start N main Squid process daemons (i.e., SMP mode)
  469. #
  470. #    In SMP mode, each worker does nearly all what a single Squid daemon
  471. #    does (e.g., listen on http_port and forward HTTP requests).
  472. #Default:
  473. # SMP support disabled.
  474.  
  475. #  TAG: cpu_affinity_map
  476. #    Usage: cpu_affinity_map process_numbers=P1,P2,... cores=C1,C2,...
  477. #
  478. #    Sets 1:1 mapping between Squid processes and CPU cores. For example,
  479. #
  480. #        cpu_affinity_map process_numbers=1,2,3,4 cores=1,3,5,7
  481. #
  482. #    affects processes 1 through 4 only and places them on the first
  483. #    four even cores, starting with core #1.
  484. #
  485. #    CPU cores are numbered starting from 1. Requires support for
  486. #    sched_getaffinity(2) and sched_setaffinity(2) system calls.
  487. #
  488. #    Multiple cpu_affinity_map options are merged.
  489. #
  490. #    See also: workers
  491. #Default:
  492. # Let operating system decide.
  493.  
  494. #  TAG: shared_memory_locking    on|off
  495. #    Whether to ensure that all required shared memory is available by
  496. #    "locking" that shared memory into RAM when Squid starts. The
  497. #    alternative is faster startup time followed by slightly slower
  498. #    performance and, if not enough RAM is actually available during
  499. #    runtime, mysterious crashes.
  500. #
  501. #    SMP Squid uses many shared memory segments. These segments are
  502. #    brought into Squid memory space using an mmap(2) system call. During
  503. #    Squid startup, the mmap() call often succeeds regardless of whether
  504. #    the system has enough RAM. In general, Squid cannot tell whether the
  505. #    kernel applies this "optimistic" memory allocation policy (but
  506. #    popular modern kernels usually use it).
  507. #
  508. #    Later, if Squid attempts to actually access the mapped memory
  509. #    regions beyond what the kernel is willing to allocate, the
  510. #    "optimistic" kernel simply kills Squid kid with a SIGBUS signal.
  511. #    Some of the memory limits enforced by the kernel are currently
  512. #    poorly understood: We do not know how to detect and check them. This
  513. #    option ensures that the mapped memory will be available.
  514. #
  515. #    This option may have a positive performance side-effect: Locking
  516. #    memory at start avoids runtime paging I/O. Paging slows Squid down.
  517. #
  518. #    Locking memory may require a large enough RLIMIT_MEMLOCK OS limit,
  519. #    CAP_IPC_LOCK capability, or equivalent.
  520. #Default:
  521. # shared_memory_locking off
  522.  
  523. #  TAG: hopeless_kid_revival_delay    time-units
  524. #    Normally, when a kid process dies, Squid immediately restarts the
  525. #    kid. A kid experiencing frequent deaths is marked as "hopeless" for
  526. #    the duration specified by this directive. Hopeless kids are not
  527. #    automatically restarted.
  528. #
  529. #    Currently, zero values are not supported because they result in
  530. #    misconfigured SMP Squid instances running forever, endlessly
  531. #    restarting each dying kid. To effectively disable hopeless kids
  532. #    revival, set the delay to a huge value (e.g., 1 year).
  533. #
  534. #    Reconfiguration also clears all hopeless kids designations, allowing
  535. #    for manual revival of hopeless kids.
  536. #Default:
  537. # hopeless_kid_revival_delay 1 hour
  538.  
  539. # OPTIONS FOR AUTHENTICATION
  540. # -----------------------------------------------------------------------------
  541.  
  542. #  TAG: auth_param
  543. #    This is used to define parameters for the various authentication
  544. #    schemes supported by Squid.
  545. #
  546. #        format: auth_param scheme parameter [setting]
  547. #
  548. #    The order in which authentication schemes are presented to the client is
  549. #    dependent on the order the scheme first appears in config file. IE
  550. #    has a bug (it's not RFC 2617 compliant) in that it will use the basic
  551. #    scheme if basic is the first entry presented, even if more secure
  552. #    schemes are presented. For now use the order in the recommended
  553. #    settings section below. If other browsers have difficulties (don't
  554. #    recognize the schemes offered even if you are using basic) either
  555. #    put basic first, or disable the other schemes (by commenting out their
  556. #    program entry).
  557. #
  558. #    Once an authentication scheme is fully configured, it can only be
  559. #    shutdown by shutting squid down and restarting. Changes can be made on
  560. #    the fly and activated with a reconfigure. I.E. You can change to a
  561. #    different helper, but not unconfigure the helper completely.
  562. #
  563. #    Please note that while this directive defines how Squid processes
  564. #    authentication it does not automatically activate authentication.
  565. #    To use authentication you must in addition make use of ACLs based
  566. #    on login name in http_access (proxy_auth, proxy_auth_regex or
  567. #    external with %LOGIN used in the format tag). The browser will be
  568. #    challenged for authentication on the first such acl encountered
  569. #    in http_access processing and will also be re-challenged for new
  570. #    login credentials if the request is being denied by a proxy_auth
  571. #    type acl.
  572. #
  573. #    WARNING: authentication can't be used in a transparently intercepting
  574. #    proxy as the client then thinks it is talking to an origin server and
  575. #    not the proxy. This is a limitation of bending the TCP/IP protocol to
  576. #    transparently intercepting port 80, not a limitation in Squid.
  577. #    Ports flagged 'transparent', 'intercept', or 'tproxy' have
  578. #    authentication disabled.
  579. #
  580. #    === Parameters common to all schemes. ===
  581. #
  582. #    "program" cmdline
  583. #        Specifies the command for the external authenticator.
  584. #
  585. #        By default, each authentication scheme is not used unless a
  586. #        program is specified.
  587. #
  588. #        See http://wiki.squid-cache.org/Features/AddonHelpers for
  589. #        more details on helper operations and creating your own.
  590. #
  591. #    "key_extras" format
  592. #        Specifies a string to be append to request line format for
  593. #        the authentication helper. "Quoted" format values may contain
  594. #        spaces and logformat %macros. In theory, any logformat %macro
  595. #        can be used. In practice, a %macro expands as a dash (-) if
  596. #        the helper request is sent before the required macro
  597. #        information is available to Squid.
  598. #
  599. #        By default, Squid uses request formats provided in
  600. #        scheme-specific examples below (search for %credentials).
  601. #
  602. #        The expanded key_extras value is added to the Squid credentials
  603. #        cache and, hence, will affect authentication. It can be used to
  604. #        autenticate different users with identical user names (e.g.,
  605. #        when user authentication depends on http_port).
  606. #
  607. #        Avoid adding frequently changing information to key_extras. For
  608. #        example, if you add user source IP, and it changes frequently
  609. #        in your environment, then max_user_ip ACL is going to treat
  610. #        every user+IP combination as a unique "user", breaking the ACL
  611. #        and wasting a lot of memory on those user records. It will also
  612. #        force users to authenticate from scratch whenever their IP
  613. #        changes.
  614. #
  615. #    "realm" string
  616. #        Specifies the protection scope (aka realm name) which is to be
  617. #        reported to the client for the authentication scheme. It is
  618. #        commonly part of the text the user will see when prompted for
  619. #        their username and password.
  620. #
  621. #        For Basic the default is "Squid proxy-caching web server".
  622. #        For Digest there is no default, this parameter is mandatory.
  623. #        For NTLM and Negotiate this parameter is ignored.
  624. #
  625. #    "children" numberofchildren [startup=N] [idle=N] [concurrency=N]
  626. #        [queue-size=N] [on-persistent-overload=action]
  627. #        [reservation-timeout=seconds]
  628. #
  629. #        The maximum number of authenticator processes to spawn. If
  630. #        you start too few Squid will have to wait for them to process
  631. #        a backlog of credential verifications, slowing it down. When
  632. #        password verifications are done via a (slow) network you are
  633. #        likely to need lots of authenticator processes.
  634. #
  635. #        The startup= and idle= options permit some skew in the exact
  636. #        amount run. A minimum of startup=N will begin during startup
  637. #        and reconfigure. Squid will start more in groups of up to
  638. #        idle=N in an attempt to meet traffic needs and to keep idle=N
  639. #        free above those traffic needs up to the maximum.
  640. #
  641. #        The concurrency= option sets the number of concurrent requests
  642. #        the helper can process.  The default of 0 is used for helpers
  643. #        who only supports one request at a time. Setting this to a
  644. #        number greater than 0 changes the protocol used to include a
  645. #        channel ID field first on the request/response line, allowing
  646. #        multiple requests to be sent to the same helper in parallel
  647. #        without waiting for the response.
  648. #
  649. #        Concurrency must not be set unless it's known the helper
  650. #        supports the input format with channel-ID fields.
  651. #
  652. #        The queue-size option sets the maximum number of queued
  653. #        requests. A request is queued when no existing child can
  654. #        accept it due to concurrency limit and no new child can be
  655. #        started due to numberofchildren limit. The default maximum is
  656. #        2*numberofchildren. Squid is allowed to temporarily exceed the
  657. #        configured maximum, marking the affected helper as
  658. #        "overloaded". If the helper overload lasts more than 3
  659. #        minutes, the action prescribed by the on-persistent-overload
  660. #        option applies.
  661. #
  662. #        The on-persistent-overload=action option specifies Squid
  663. #        reaction to a new helper request arriving when the helper
  664. #        has been overloaded for more that 3 minutes already. The number
  665. #        of queued requests determines whether the helper is overloaded
  666. #        (see the queue-size option).
  667. #
  668. #        Two actions are supported:
  669. #
  670. #          die    Squid worker quits. This is the default behavior.
  671. #
  672. #          ERR    Squid treats the helper request as if it was
  673. #            immediately submitted, and the helper immediately
  674. #            replied with an ERR response. This action has no effect
  675. #            on the already queued and in-progress helper requests.
  676. #
  677. #        NOTE: NTLM and Negotiate schemes do not support concurrency
  678. #            in the Squid code module even though some helpers can.
  679. #
  680. #        The reservation-timeout=seconds option allows NTLM and Negotiate
  681. #        helpers to forget about clients that abandon their in-progress
  682. #        connection authentication without closing the connection. The
  683. #        timeout is measured since the last helper response received by
  684. #        Squid for the client. Fractional seconds are not supported.
  685. #
  686. #        After the timeout, the helper will be used for other clients if
  687. #        there are no unreserved helpers available. In the latter case,
  688. #        the old client attempt to resume authentication will not be
  689. #        forwarded to the helper (and the client should open a new HTTP
  690. #        connection and retry authentication from scratch).
  691. #
  692. #        By default, reservations do not expire and clients that keep
  693. #        their connections open without completing authentication may
  694. #        exhaust all NTLM and Negotiate helpers.
  695. #
  696. #    "keep_alive" on|off
  697. #        If you experience problems with PUT/POST requests when using
  698. #        the NTLM or Negotiate schemes then you can try setting this
  699. #        to off. This will cause Squid to forcibly close the connection
  700. #        on the initial request where the browser asks which schemes
  701. #        are supported by the proxy.
  702. #
  703. #        For Basic and Digest this parameter is ignored.
  704. #
  705. #    "utf8" on|off
  706. #        Useful for sending credentials to authentication backends that
  707. #        expect UTF-8 encoding (e.g., LDAP).
  708. #
  709. #        When this option is enabled, Squid uses HTTP Accept-Language
  710. #        request header to guess the received credentials encoding
  711. #        (ISO-Latin-1, CP1251, or UTF-8) and then converts the first
  712. #        two encodings into UTF-8.
  713. #
  714. #        When this option is disabled and by default, Squid sends
  715. #        credentials in their original (i.e. received) encoding.
  716. #
  717. #        This parameter is only honored for Basic and Digest schemes.
  718. #        For Basic, the entire username:password credentials are
  719. #        checked and, if necessary, re-encoded. For Digest -- just the
  720. #        username component. For NTLM and Negotiate schemes, this
  721. #        parameter is ignored.
  722. #
  723. #
  724. #    === Example Configuration ===
  725. #
  726. #    This configuration displays the recommended authentication scheme
  727. #    order from most to least secure with recommended minimum configuration
  728. #    settings for each scheme:
  729. #
  730. ##auth_param negotiate program <uncomment and complete this line to activate>
  731. ##auth_param negotiate children 20 startup=0 idle=1
  732. ##
  733. ##auth_param digest program <uncomment and complete this line to activate>
  734. ##auth_param digest children 20 startup=0 idle=1
  735. ##auth_param digest realm Squid proxy-caching web server
  736. ##auth_param digest nonce_garbage_interval 5 minutes
  737. ##auth_param digest nonce_max_duration 30 minutes
  738. ##auth_param digest nonce_max_count 50
  739. ##
  740. ##auth_param ntlm program <uncomment and complete this line to activate>
  741. ##auth_param ntlm children 20 startup=0 idle=1
  742. ##
  743. ##auth_param basic program <uncomment and complete this line>
  744. ##auth_param basic children 5 startup=5 idle=1
  745. ##auth_param basic credentialsttl 2 hours
  746. #Default:
  747. # none
  748.  
  749. #  TAG: authenticate_cache_garbage_interval
  750. #    The time period between garbage collection across the username cache.
  751. #    This is a trade-off between memory utilization (long intervals - say
  752. #    2 days) and CPU (short intervals - say 1 minute). Only change if you
  753. #    have good reason to.
  754. #Default:
  755. # authenticate_cache_garbage_interval 1 hour
  756.  
  757. #  TAG: authenticate_ttl
  758. #    The time a user & their credentials stay in the logged in
  759. #    user cache since their last request. When the garbage
  760. #    interval passes, all user credentials that have passed their
  761. #    TTL are removed from memory.
  762. #Default:
  763. # authenticate_ttl 1 hour
  764.  
  765. #  TAG: authenticate_ip_ttl
  766. #    If you use proxy authentication and the 'max_user_ip' ACL,
  767. #    this directive controls how long Squid remembers the IP
  768. #    addresses associated with each user.  Use a small value
  769. #    (e.g., 60 seconds) if your users might change addresses
  770. #    quickly, as is the case with dialup.   You might be safe
  771. #    using a larger value (e.g., 2 hours) in a corporate LAN
  772. #    environment with relatively static address assignments.
  773. #Default:
  774. # authenticate_ip_ttl 1 second
  775.  
  776. # ACCESS CONTROLS
  777. # -----------------------------------------------------------------------------
  778.  
  779. #  TAG: external_acl_type
  780. #    This option defines external acl classes using a helper program
  781. #    to look up the status
  782. #
  783. #      external_acl_type name [options] FORMAT /path/to/helper [helper arguments]
  784. #
  785. #    Options:
  786. #
  787. #      ttl=n        TTL in seconds for cached results (defaults to 3600
  788. #            for 1 hour)
  789. #
  790. #      negative_ttl=n
  791. #            TTL for cached negative lookups (default same
  792. #            as ttl)
  793. #
  794. #      grace=n    Percentage remaining of TTL where a refresh of a
  795. #            cached entry should be initiated without needing to
  796. #            wait for a new reply. (default is for no grace period)
  797. #
  798. #      cache=n    The maximum number of entries in the result cache. The
  799. #            default limit is 262144 entries.  Each cache entry usually
  800. #            consumes at least 256 bytes. Squid currently does not remove
  801. #            expired cache entries until the limit is reached, so a proxy
  802. #            will sooner or later reach the limit. The expanded FORMAT
  803. #            value is used as the cache key, so if the details in FORMAT
  804. #            are highly variable, a larger cache may be needed to produce
  805. #            reduction in helper load.
  806. #
  807. #      children-max=n
  808. #            Maximum number of acl helper processes spawned to service
  809. #            external acl lookups of this type. (default 5)
  810. #
  811. #      children-startup=n
  812. #            Minimum number of acl helper processes to spawn during
  813. #            startup and reconfigure to service external acl lookups
  814. #            of this type. (default 0)
  815. #
  816. #      children-idle=n
  817. #            Number of acl helper processes to keep ahead of traffic
  818. #            loads. Squid will spawn this many at once whenever load
  819. #            rises above the capabilities of existing processes.
  820. #            Up to the value of children-max. (default 1)
  821. #
  822. #      concurrency=n    concurrency level per process. Only used with helpers
  823. #            capable of processing more than one query at a time.
  824. #
  825. #      queue-size=N  The queue-size option sets the maximum number of
  826. #            queued requests. A request is queued when no existing
  827. #            helper can accept it due to concurrency limit and no
  828. #            new helper can be started due to children-max limit.
  829. #            If the queued requests exceed queue size, the acl is
  830. #            ignored. The default value is set to 2*children-max.
  831. #
  832. #      protocol=2.5    Compatibility mode for Squid-2.5 external acl helpers.
  833. #
  834. #      ipv4 / ipv6    IP protocol used to communicate with this helper.
  835. #            The default is to auto-detect IPv6 and use it when available.
  836. #
  837. #
  838. #    FORMAT is a series of %macro codes. See logformat directive for a full list
  839. #    of the accepted codes. Although note that at the time of any external ACL
  840. #    being tested data may not be available and thus some %macro expand to '-'.
  841. #
  842. #    In addition to the logformat codes; when processing external ACLs these
  843. #    additional macros are made available:
  844. #
  845. #      %ACL        The name of the ACL being tested.
  846. #
  847. #      %DATA        The ACL arguments specified in the referencing config
  848. #            'acl ... external' line, separated by spaces (an
  849. #            "argument string"). see acl external.
  850. #
  851. #            If there are no ACL arguments %DATA expands to '-'.
  852. #
  853. #            If you do not specify a DATA macro inside FORMAT,
  854. #            Squid automatically appends %DATA to your FORMAT.
  855. #            Note that Squid-3.x may expand %DATA to whitespace
  856. #            or nothing in this case.
  857. #
  858. #            By default, Squid applies URL-encoding to each ACL
  859. #            argument inside the argument string. If an explicit
  860. #            encoding modifier is used (e.g., %#DATA), then Squid
  861. #            encodes the whole argument string as a single token
  862. #            (e.g., with %#DATA, spaces between arguments become
  863. #            %20).
  864. #
  865. #    If SSL is enabled, the following formating codes become available:
  866. #
  867. #      %USER_CERT        SSL User certificate in PEM format
  868. #      %USER_CERTCHAIN    SSL User certificate chain in PEM format
  869. #      %USER_CERT_xx        SSL User certificate subject attribute xx
  870. #      %USER_CA_CERT_xx    SSL User certificate issuer attribute xx
  871. #
  872. #
  873. #    NOTE: all other format codes accepted by older Squid versions
  874. #        are deprecated.
  875. #
  876. #
  877. #    General request syntax:
  878. #
  879. #      [channel-ID] FORMAT-values
  880. #
  881. #
  882. #    FORMAT-values consists of transaction details expanded with
  883. #    whitespace separation per the config file FORMAT specification
  884. #    using the FORMAT macros listed above.
  885. #
  886. #    Request values sent to the helper are URL escaped to protect
  887. #    each value in requests against whitespaces.
  888. #
  889. #    If using protocol=2.5 then the request sent to the helper is not
  890. #    URL escaped to protect against whitespace.
  891. #
  892. #    NOTE: protocol=3.0 is deprecated as no longer necessary.
  893. #
  894. #    When using the concurrency= option the protocol is changed by
  895. #    introducing a query channel tag in front of the request/response.
  896. #    The query channel tag is a number between 0 and concurrency-1.
  897. #    This value must be echoed back unchanged to Squid as the first part
  898. #    of the response relating to its request.
  899. #
  900. #
  901. #    The helper receives lines expanded per the above format specification
  902. #    and for each input line returns 1 line starting with OK/ERR/BH result
  903. #    code and optionally followed by additional keywords with more details.
  904. #
  905. #
  906. #    General result syntax:
  907. #
  908. #      [channel-ID] result keyword=value ...
  909. #
  910. #    Result consists of one of the codes:
  911. #
  912. #      OK
  913. #        the ACL test produced a match.
  914. #
  915. #      ERR
  916. #        the ACL test does not produce a match.
  917. #
  918. #      BH
  919. #        An internal error occurred in the helper, preventing
  920. #        a result being identified.
  921. #
  922. #    The meaning of 'a match' is determined by your squid.conf
  923. #    access control configuration. See the Squid wiki for details.
  924. #
  925. #    Defined keywords:
  926. #
  927. #      user=        The users name (login)
  928. #
  929. #      password=    The users password (for login= cache_peer option)
  930. #
  931. #      message=    Message describing the reason for this response.
  932. #            Available as %o in error pages.
  933. #            Useful on (ERR and BH results).
  934. #
  935. #      tag=        Apply a tag to a request. Only sets a tag once,
  936. #            does not alter existing tags.
  937. #
  938. #      log=        String to be logged in access.log. Available as
  939. #            %ea in logformat specifications.
  940. #
  941. #      clt_conn_tag= Associates a TAG with the client TCP connection.
  942. #            Please see url_rewrite_program related documentation
  943. #            for this kv-pair.
  944. #
  945. #    Any keywords may be sent on any response whether OK, ERR or BH.
  946. #
  947. #    All response keyword values need to be a single token with URL
  948. #    escaping, or enclosed in double quotes (") and escaped using \ on
  949. #    any double quotes or \ characters within the value. The wrapping
  950. #    double quotes are removed before the value is interpreted by Squid.
  951. #    \r and \n are also replace by CR and LF.
  952. #
  953. #    Some example key values:
  954. #
  955. #        user=John%20Smith
  956. #        user="John Smith"
  957. #        user="J. \"Bob\" Smith"
  958. #Default:
  959. # none
  960.  
  961. #  TAG: acl
  962. #    Defining an Access List
  963. #
  964. #    Every access list definition must begin with an aclname and acltype,
  965. #    followed by either type-specific arguments or a quoted filename that
  966. #    they are read from.
  967. #
  968. #       acl aclname acltype argument ...
  969. #       acl aclname acltype "file" ...
  970. #
  971. #    When using "file", the file should contain one item per line.
  972. #
  973. #
  974. #    ACL Options
  975. #
  976. #    Some acl types supports options which changes their default behaviour:
  977. #
  978. #    -i,+i    By default, regular expressions are CASE-SENSITIVE. To make them
  979. #        case-insensitive, use the -i option. To return case-sensitive
  980. #        use the +i option between patterns, or make a new ACL line
  981. #        without -i.
  982. #
  983. #    -n    Disable lookups and address type conversions.  If lookup or
  984. #        conversion is required because the parameter type (IP or
  985. #        domain name) does not match the message address type (domain
  986. #        name or IP), then the ACL would immediately declare a mismatch
  987. #        without any warnings or lookups.
  988. #
  989. #    -m[=delimiters]
  990. #        Perform a list membership test, interpreting values as
  991. #        comma-separated token lists and matching against individual
  992. #        tokens instead of whole values.
  993. #        The optional "delimiters" parameter specifies one or more
  994. #        alternative non-alphanumeric delimiter characters.
  995. #        non-alphanumeric delimiter characters.
  996. #
  997. #    --    Used to stop processing all options, in the case the first acl
  998. #        value has '-' character as first character (for example the '-'
  999. #        is a valid domain name)
  1000. #
  1001. #    Some acl types require suspending the current request in order
  1002. #    to access some external data source.
  1003. #    Those which do are marked with the tag [slow], those which
  1004. #    don't are marked as [fast].
  1005. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl
  1006. #    for further information
  1007. #
  1008. #    ***** ACL TYPES AVAILABLE *****
  1009. #
  1010. #    acl aclname src ip-address/mask ...    # clients IP address [fast]
  1011. #    acl aclname src addr1-addr2/mask ...    # range of addresses [fast]
  1012. #    acl aclname dst [-n] ip-address/mask ...    # URL host's IP address [slow]
  1013. #    acl aclname localip ip-address/mask ... # IP address the client connected to [fast]
  1014. #
  1015. #if USE_SQUID_EUI
  1016. #    acl aclname arp      mac-address ...
  1017. #    acl aclname eui64    eui64-address ...
  1018. #      # [fast]
  1019. #      # MAC (EUI-48) and EUI-64 addresses use xx:xx:xx:xx:xx:xx notation.
  1020. #      #
  1021. #      # The 'arp' ACL code is not portable to all operating systems.
  1022. #      # It works on Linux, Solaris, Windows, FreeBSD, and some other
  1023. #      # BSD variants.
  1024. #      #
  1025. #      # The eui_lookup directive is required to be 'on' (the default)
  1026. #      # and Squid built with --enable-eui for MAC/EUI addresses to be
  1027. #      # available for this ACL.
  1028. #      #
  1029. #      # Squid can only determine the MAC/EUI address for IPv4
  1030. #      # clients that are on the same subnet. If the client is on a
  1031. #      # different subnet, then Squid cannot find out its address.
  1032. #      #
  1033. #      # IPv6 protocol does not contain ARP. MAC/EUI is either
  1034. #      # encoded directly in the IPv6 address or not available.
  1035. #endif
  1036. #    acl aclname clientside_mark mark[/mask] ...
  1037. #      # matches CONNMARK of an accepted connection [fast]
  1038. #      # DEPRECATED. Use the 'client_connection_mark' instead.
  1039. #
  1040. #    acl aclname client_connection_mark mark[/mask] ...
  1041. #      # matches CONNMARK of an accepted connection [fast]
  1042. #      #
  1043. #      # mark and mask are unsigned integers (hex, octal, or decimal).
  1044. #      # If multiple marks are given, then the ACL matches if at least
  1045. #      # one mark matches.
  1046. #      #
  1047. #      # Uses netfilter-conntrack library.
  1048. #      # Requires building Squid with --enable-linux-netfilter.
  1049. #      #
  1050. #      # The client, various intermediaries, and Squid itself may set
  1051. #      # CONNMARK at various times. The last CONNMARK set wins. This ACL
  1052. #      # checks the mark present on an accepted connection or set by
  1053. #      # Squid afterwards, depending on the ACL check timing. This ACL
  1054. #      # effectively ignores any mark set by other agents after Squid has
  1055. #      # accepted the connection.
  1056. #
  1057. #    acl aclname srcdomain   .foo.com ...
  1058. #      # reverse lookup, from client IP [slow]
  1059. #    acl aclname dstdomain [-n] .foo.com ...
  1060. #      # Destination server from URL [fast]
  1061. #    acl aclname srcdom_regex [-i] \.foo\.com ...
  1062. #      # regex matching client name [slow]
  1063. #    acl aclname dstdom_regex [-n] [-i] \.foo\.com ...
  1064. #      # regex matching server [fast]
  1065. #      #
  1066. #      # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
  1067. #      # based URL is used and no match is found. The name "none" is used
  1068. #      # if the reverse lookup fails.
  1069. #
  1070. #    acl aclname src_as number ...
  1071. #    acl aclname dst_as number ...
  1072. #      # [fast]
  1073. #      # Except for access control, AS numbers can be used for
  1074. #      # routing of requests to specific caches. Here's an
  1075. #      # example for routing all requests for AS#1241 and only
  1076. #      # those to mycache.mydomain.net:
  1077. #      # acl asexample dst_as 1241
  1078. #      # cache_peer_access mycache.mydomain.net allow asexample
  1079. #      # cache_peer_access mycache_mydomain.net deny all
  1080. #
  1081. #    acl aclname peername myPeer ...
  1082. #    acl aclname peername_regex [-i] regex-pattern ...
  1083. #      # [fast]
  1084. #      # match against a named cache_peer entry
  1085. #      # set unique name= on cache_peer lines for reliable use.
  1086. #
  1087. #    acl aclname time [day-abbrevs] [h1:m1-h2:m2]
  1088. #      # [fast]
  1089. #      #  day-abbrevs:
  1090. #      #    S - Sunday
  1091. #      #    M - Monday
  1092. #      #    T - Tuesday
  1093. #      #    W - Wednesday
  1094. #      #    H - Thursday
  1095. #      #    F - Friday
  1096. #      #    A - Saturday
  1097. #      #  h1:m1 must be less than h2:m2
  1098. #
  1099. #    acl aclname url_regex [-i] ^http:// ...
  1100. #      # regex matching on whole URL [fast]
  1101. #    acl aclname urllogin [-i] [^a-zA-Z0-9] ...
  1102. #      # regex matching on URL login field
  1103. #    acl aclname urlpath_regex [-i] \.gif$ ...
  1104. #      # regex matching on URL path [fast]
  1105. #
  1106. #    acl aclname port 80 70 21 0-1024...   # destination TCP port [fast]
  1107. #                                          # ranges are alloed
  1108. #    acl aclname localport 3128 ...          # TCP port the client connected to [fast]
  1109. #                                          # NP: for interception mode this is usually '80'
  1110. #
  1111. #    acl aclname myportname 3128 ...       # *_port name [fast]
  1112. #
  1113. #    acl aclname proto HTTP FTP ...        # request protocol [fast]
  1114. #
  1115. #    acl aclname method GET POST ...       # HTTP request method [fast]
  1116. #
  1117. #    acl aclname http_status 200 301 500- 400-403 ...
  1118. #      # status code in reply [fast]
  1119. #
  1120. #    acl aclname browser [-i] regexp ...
  1121. #      # pattern match on User-Agent header (see also req_header below) [fast]
  1122. #
  1123. #    acl aclname referer_regex [-i] regexp ...
  1124. #      # pattern match on Referer header [fast]
  1125. #      # Referer is highly unreliable, so use with care
  1126. #
  1127. #    acl aclname ident [-i] username ...
  1128. #    acl aclname ident_regex [-i] pattern ...
  1129. #      # string match on ident output [slow]
  1130. #      # use REQUIRED to accept any non-null ident.
  1131. #
  1132. #    acl aclname proxy_auth [-i] username ...
  1133. #    acl aclname proxy_auth_regex [-i] pattern ...
  1134. #      # perform http authentication challenge to the client and match against
  1135. #      # supplied credentials [slow]
  1136. #      #
  1137. #      # takes a list of allowed usernames.
  1138. #      # use REQUIRED to accept any valid username.
  1139. #      #
  1140. #      # Will use proxy authentication in forward-proxy scenarios, and plain
  1141. #      # http authenticaiton in reverse-proxy scenarios
  1142. #      #
  1143. #      # NOTE: when a Proxy-Authentication header is sent but it is not
  1144. #      # needed during ACL checking the username is NOT logged
  1145. #      # in access.log.
  1146. #      #
  1147. #      # NOTE: proxy_auth requires a EXTERNAL authentication program
  1148. #      # to check username/password combinations (see
  1149. #      # auth_param directive).
  1150. #      #
  1151. #      # NOTE: proxy_auth can't be used in a transparent/intercepting proxy
  1152. #      # as the browser needs to be configured for using a proxy in order
  1153. #      # to respond to proxy authentication.
  1154. #
  1155. #    acl aclname snmp_community string ...
  1156. #      # A community string to limit access to your SNMP Agent [fast]
  1157. #      # Example:
  1158. #      #
  1159. #      #    acl snmppublic snmp_community public
  1160. #
  1161. #    acl aclname maxconn number
  1162. #      # This will be matched when the client's IP address has
  1163. #      # more than <number> TCP connections established. [fast]
  1164. #      # NOTE: This only measures direct TCP links so X-Forwarded-For
  1165. #      # indirect clients are not counted.
  1166. #
  1167. #    acl aclname max_user_ip [-s] number
  1168. #      # This will be matched when the user attempts to log in from more
  1169. #      # than <number> different ip addresses. The authenticate_ip_ttl
  1170. #      # parameter controls the timeout on the ip entries. [fast]
  1171. #      # If -s is specified the limit is strict, denying browsing
  1172. #      # from any further IP addresses until the ttl has expired. Without
  1173. #      # -s Squid will just annoy the user by "randomly" denying requests.
  1174. #      # (the counter is reset each time the limit is reached and a
  1175. #      # request is denied)
  1176. #      # NOTE: in acceleration mode or where there is mesh of child proxies,
  1177. #      # clients may appear to come from multiple addresses if they are
  1178. #      # going through proxy farms, so a limit of 1 may cause user problems.
  1179. #
  1180. #    acl aclname random probability
  1181. #      # Pseudo-randomly match requests. Based on the probability given.
  1182. #      # Probability may be written as a decimal (0.333), fraction (1/3)
  1183. #      # or ratio of matches:non-matches (3:5).
  1184. #
  1185. #    acl aclname req_mime_type [-i] mime-type ...
  1186. #      # regex match against the mime type of the request generated
  1187. #      # by the client. Can be used to detect file upload or some
  1188. #      # types HTTP tunneling requests [fast]
  1189. #      # NOTE: This does NOT match the reply. You cannot use this
  1190. #      # to match the returned file type.
  1191. #
  1192. #    acl aclname req_header header-name [-i] any\.regex\.here
  1193. #      # regex match against any of the known request headers.  May be
  1194. #      # thought of as a superset of "browser", "referer" and "mime-type"
  1195. #      # ACL [fast]
  1196. #
  1197. #    acl aclname rep_mime_type [-i] mime-type ...
  1198. #      # regex match against the mime type of the reply received by
  1199. #      # squid. Can be used to detect file download or some
  1200. #      # types HTTP tunneling requests. [fast]
  1201. #      # NOTE: This has no effect in http_access rules. It only has
  1202. #      # effect in rules that affect the reply data stream such as
  1203. #      # http_reply_access.
  1204. #
  1205. #    acl aclname rep_header header-name [-i] any\.regex\.here
  1206. #      # regex match against any of the known reply headers. May be
  1207. #      # thought of as a superset of "browser", "referer" and "mime-type"
  1208. #      # ACLs [fast]
  1209. #
  1210. #    acl aclname external class_name [arguments...]
  1211. #      # external ACL lookup via a helper class defined by the
  1212. #      # external_acl_type directive [slow]
  1213. #
  1214. #    acl aclname user_cert attribute values...
  1215. #      # match against attributes in a user SSL certificate
  1216. #      # attribute is one of DN/C/O/CN/L/ST or a numerical OID [fast]
  1217. #
  1218. #    acl aclname ca_cert attribute values...
  1219. #      # match against attributes a users issuing CA SSL certificate
  1220. #      # attribute is one of DN/C/O/CN/L/ST or a numerical OID  [fast]
  1221. #
  1222. #    acl aclname ext_user [-i] username ...
  1223. #    acl aclname ext_user_regex [-i] pattern ...
  1224. #      # string match on username returned by external acl helper [slow]
  1225. #      # use REQUIRED to accept any non-null user name.
  1226. #
  1227. #    acl aclname tag tagvalue ...
  1228. #      # string match on tag returned by external acl helper [fast]
  1229. #      # DEPRECATED. Only the first tag will match with this ACL.
  1230. #      # Use the 'note' ACL instead for handling multiple tag values.
  1231. #
  1232. #    acl aclname hier_code codename ...
  1233. #      # string match against squid hierarchy code(s); [fast]
  1234. #      #  e.g., DIRECT, PARENT_HIT, NONE, etc.
  1235. #      #
  1236. #      # NOTE: This has no effect in http_access rules. It only has
  1237. #      # effect in rules that affect the reply data stream such as
  1238. #      # http_reply_access.
  1239. #
  1240. #    acl aclname note [-m[=delimiters]] name [value ...]
  1241. #      # match transaction annotation [fast]
  1242. #      # Without values, matches any annotation with a given name.
  1243. #      # With value(s), matches any annotation with a given name that
  1244. #      # also has one of the given values.
  1245. #      # If the -m flag is used, then the value of the named
  1246. #      # annotation is interpreted as a list of tokens, and the ACL
  1247. #      # matches individual name=token pairs rather than whole
  1248. #      # name=value pairs. See "ACL Options" above for more info.
  1249. #      # Annotation sources include note and adaptation_meta directives
  1250. #      # as well as helper and eCAP responses.
  1251. #
  1252. #    acl aclname annotate_transaction [-m[=delimiters]] key=value ...
  1253. #    acl aclname annotate_transaction [-m[=delimiters]] key+=value ...
  1254. #      # Always matches. [fast]
  1255. #      # Used for its side effect: This ACL immediately adds a
  1256. #      # key=value annotation to the current master transaction.
  1257. #      # The added annotation can then be tested using note ACL and
  1258. #      # logged (or sent to helpers) using %note format code.
  1259. #      #
  1260. #      # Annotations can be specified using replacement and addition
  1261. #      # formats. The key=value form replaces old same-key annotation
  1262. #      # value(s). The key+=value form appends a new value to the old
  1263. #      # same-key annotation. Both forms create a new key=value
  1264. #      # annotation if no same-key annotation exists already. If
  1265. #      # -m flag is used, then the value is interpreted as a list
  1266. #      # and the annotation will contain key=token pair(s) instead of the
  1267. #      # whole key=value pair.
  1268. #      #
  1269. #      # This ACL is especially useful for recording complex multi-step
  1270. #      # ACL-driven decisions. For example, the following configuration
  1271. #      # avoids logging transactions accepted after aclX matched:
  1272. #      #
  1273. #      #  # First, mark transactions accepted after aclX matched
  1274. #      #  acl markSpecial annotate_transaction special=true
  1275. #      #  http_access allow acl001
  1276. #      #  ...
  1277. #      #  http_access deny acl100
  1278. #      #  http_access allow aclX markSpecial
  1279. #      #
  1280. #      #  # Second, do not log marked transactions:
  1281. #      #  acl markedSpecial note special true
  1282. #      #  access_log ... deny markedSpecial
  1283. #      #
  1284. #      #  # Note that the following would not have worked because aclX
  1285. #      #  # alone does not determine whether the transaction was allowed:
  1286. #      #  access_log ... deny aclX # Wrong!
  1287. #      #
  1288. #      # Warning: This ACL annotates the transaction even when negated
  1289. #      # and even if subsequent ACLs fail to match. For example, the
  1290. #      # following three rules will have exactly the same effect as far
  1291. #      # as annotations set by the "mark" ACL are concerned:
  1292. #      #
  1293. #      #  some_directive acl1 ... mark # rule matches if mark is reached
  1294. #      #  some_directive acl1 ... !mark     # rule never matches
  1295. #      #  some_directive acl1 ... mark !all # rule never matches
  1296. #
  1297. #    acl aclname annotate_client [-m[=delimiters]] key=value ...
  1298. #    acl aclname annotate_client [-m[=delimiters]] key+=value ...
  1299. #      #
  1300. #      # Always matches. [fast]
  1301. #      # Used for its side effect: This ACL immediately adds a
  1302. #      # key=value annotation to the current client-to-Squid
  1303. #      # connection. Connection annotations are propagated to the current
  1304. #      # and all future master transactions on the annotated connection.
  1305. #      # See the annotate_transaction ACL for details.
  1306. #      #
  1307. #      # For example, the following configuration avoids rewriting URLs
  1308. #      # of transactions bumped by SslBump:
  1309. #      #
  1310. #      #  # First, mark bumped connections:
  1311. #      #  acl markBumped annotate_client bumped=true
  1312. #      #  ssl_bump peek acl1
  1313. #      #  ssl_bump stare acl2
  1314. #      #  ssl_bump bump acl3 markBumped
  1315. #      #  ssl_bump splice all
  1316. #      #
  1317. #      #  # Second, do not send marked transactions to the redirector:
  1318. #      #  acl markedBumped note bumped true
  1319. #      #  url_rewrite_access deny markedBumped
  1320. #      #
  1321. #      #  # Note that the following would not have worked because acl3 alone
  1322. #      #  # does not determine whether the connection is going to be bumped:
  1323. #      #  url_rewrite_access deny acl3 # Wrong!
  1324. #
  1325. #    acl aclname adaptation_service service ...
  1326. #      # Matches the name of any icap_service, ecap_service,
  1327. #      # adaptation_service_set, or adaptation_service_chain that Squid
  1328. #      # has used (or attempted to use) for the master transaction.
  1329. #      # This ACL must be defined after the corresponding adaptation
  1330. #      # service is named in squid.conf. This ACL is usable with
  1331. #      # adaptation_meta because it starts matching immediately after
  1332. #      # the service has been selected for adaptation.
  1333. #
  1334. #    acl aclname transaction_initiator initiator ...
  1335. #      # Matches transaction's initiator [fast]
  1336. #      #
  1337. #      # Supported initiators are:
  1338. #      #  esi: matches transactions fetching ESI resources
  1339. #      #  certificate-fetching: matches transactions fetching
  1340. #      #     a missing intermediate TLS certificate
  1341. #      #  cache-digest: matches transactions fetching Cache Digests
  1342. #      #     from a cache_peer
  1343. #      #  htcp: matches HTCP requests from peers
  1344. #      #  icp: matches ICP requests to peers
  1345. #      #  icmp: matches ICMP RTT database (NetDB) requests to peers
  1346. #      #  asn: matches asns db requests
  1347. #      #  internal: matches any of the above
  1348. #      #  client: matches transactions containing an HTTP or FTP
  1349. #      #     client request received at a Squid *_port
  1350. #      #  all: matches any transaction, including internal transactions
  1351. #      #     without a configurable initiator and hopefully rare
  1352. #      #     transactions without a known-to-Squid initiator
  1353. #      #
  1354. #      # Multiple initiators are ORed.
  1355. #
  1356. #    acl aclname has component
  1357. #      # matches a transaction "component" [fast]
  1358. #      #
  1359. #      # Supported transaction components are:
  1360. #      #  request: transaction has a request header (at least)
  1361. #      #  response: transaction has a response header (at least)
  1362. #      #  ALE: transaction has an internally-generated Access Log Entry
  1363. #      #       structure; bugs notwithstanding, all transaction have it
  1364. #      #
  1365. #      # For example, the following configuration helps when dealing with HTTP
  1366. #      # clients that close connections without sending a request header:
  1367. #      #
  1368. #      #  acl hasRequest has request
  1369. #      #  acl logMe note important_transaction
  1370. #      #  # avoid "logMe ACL is used in context without an HTTP request" warnings
  1371. #      #  access_log ... logformat=detailed hasRequest logMe
  1372. #      #  # log request-less transactions, instead of ignoring them
  1373. #      #  access_log ... logformat=brief !hasRequest
  1374. #      #
  1375. #      # Multiple components are not supported for one "acl" rule, but
  1376. #      # can be specified (and are ORed) using multiple same-name rules:
  1377. #      #
  1378. #      #  # OK, this strange logging daemon needs request or response,
  1379. #      #  # but can work without either a request or a response:
  1380. #      #  acl hasWhatMyLoggingDaemonNeeds has request
  1381. #      #  acl hasWhatMyLoggingDaemonNeeds has response
  1382. #
  1383. #acl aclname at_step step
  1384. #      # match against the current request processing step [fast]
  1385. #      # Valid steps are:
  1386. #      #   GeneratingCONNECT: Generating HTTP CONNECT request headers
  1387. #
  1388. #    acl aclname any-of acl1 acl2 ...
  1389. #      # match any one of the acls [fast or slow]
  1390. #      # The first matching ACL stops further ACL evaluation.
  1391. #      #
  1392. #      # ACLs from multiple any-of lines with the same name are ORed.
  1393. #      # For example, A = (a1 or a2) or (a3 or a4) can be written as
  1394. #      #   acl A any-of a1 a2
  1395. #      #   acl A any-of a3 a4
  1396. #      #
  1397. #      # This group ACL is fast if all evaluated ACLs in the group are fast
  1398. #      # and slow otherwise.
  1399. #
  1400. #    acl aclname all-of acl1 acl2 ...
  1401. #      # match all of the acls [fast or slow]
  1402. #      # The first mismatching ACL stops further ACL evaluation.
  1403. #      #
  1404. #      # ACLs from multiple all-of lines with the same name are ORed.
  1405. #      # For example, B = (b1 and b2) or (b3 and b4) can be written as
  1406. #      #   acl B all-of b1 b2
  1407. #      #   acl B all-of b3 b4
  1408. #      #
  1409. #      # This group ACL is fast if all evaluated ACLs in the group are fast
  1410. #      # and slow otherwise.
  1411. #
  1412. #    Examples:
  1413. #        acl macaddress arp 09:00:2b:23:45:67
  1414. #        acl myexample dst_as 1241
  1415. #        acl password proxy_auth REQUIRED
  1416. #        acl fileupload req_mime_type -i ^multipart/form-data$
  1417. #        acl javascript rep_mime_type -i ^application/x-javascript$
  1418. #
  1419. #Default:
  1420. # ACLs all, manager, localhost, to_localhost, and CONNECT are predefined.
  1421. #
  1422. #
  1423. # Recommended minimum configuration:
  1424. #
  1425.  
  1426. # Example rule allowing access from your local networks.
  1427. # Adapt to list your (internal) IP networks from where browsing should be allowed.
  1428. acl localnet src 0.0.0.1-0.255.255.255          # RFC 1122 "this" network [LAN]
  1429. acl localnet src 10.0.0.0/8                     # RFC 1918 local private network [LAN]
  1430. acl localnet src 100.64.0.0/10                  # RFC 6598 shared address space [CGN]
  1431. acl localnet src 169.254.0.0/16                 # RFC 3927 link-local [directly plugged] machines
  1432. acl localnet src 172.16.0.0/12                  # RFC 1918 local private network [LAN]
  1433. acl localnet src 192.168.0.0/16                 # RFC 1918 local private network [LAN]
  1434. acl localnet src fc00::/7                       # RFC 4193 local private network range
  1435. acl localnet src fe80::/10                      # RFC 4291 link-local [directly plugged] machines
  1436.  
  1437. acl SSL_ports port 443
  1438. acl Safe_ports port 80                          # http
  1439. acl Safe_ports port 21                          # ftp
  1440. acl Safe_ports port 443                         # https
  1441. acl Safe_ports port 70                          # gopher
  1442. acl Safe_ports port 210                         # wais
  1443. acl Safe_ports port 1025-65535                  # unregistered ports
  1444. acl Safe_ports port 280                         # http-mgmt
  1445. acl Safe_ports port 488                         # gss-http
  1446. acl Safe_ports port 591                         # filemaker
  1447. acl Safe_ports port 777                         # multiling http
  1448. acl Safe_ports port 20000                       # pihole gui
  1449. acl Safe_ports port 24500                       # ssh ubuntu-jammy
  1450. acl Safe_ports port 25500                       # ssh qnas
  1451. acl Safe_ports port 26500                       # ssh jmacbook
  1452. acl whitelist dstdomain "${SQUID_WHITELIST}"    # site whitelist file
  1453. acl blocked_sites dstdomain ${SQUID_BLACKLIST}  # site blacklist file
  1454.  
  1455. #  TAG: proxy_protocol_access
  1456. #    Determine which client proxies can be trusted to provide correct
  1457. #    information regarding real client IP address using PROXY protocol.
  1458. #
  1459. #    Requests may pass through a chain of several other proxies
  1460. #    before reaching us. The original source details may by sent in:
  1461. #        * HTTP message Forwarded header, or
  1462. #        * HTTP message X-Forwarded-For header, or
  1463. #        * PROXY protocol connection header.
  1464. #
  1465. #    This directive is solely for validating new PROXY protocol
  1466. #    connections received from a port flagged with require-proxy-header.
  1467. #    It is checked only once after TCP connection setup.
  1468. #
  1469. #    A deny match results in TCP connection closure.
  1470. #
  1471. #    An allow match is required for Squid to permit the corresponding
  1472. #    TCP connection, before Squid even looks for HTTP request headers.
  1473. #    If there is an allow match, Squid starts using PROXY header information
  1474. #    to determine the source address of the connection for all future ACL
  1475. #    checks, logging, etc.
  1476. #
  1477. #    SECURITY CONSIDERATIONS:
  1478. #
  1479. #        Any host from which we accept client IP details can place
  1480. #        incorrect information in the relevant header, and Squid
  1481. #        will use the incorrect information as if it were the
  1482. #        source address of the request.  This may enable remote
  1483. #        hosts to bypass any access control restrictions that are
  1484. #        based on the client's source addresses.
  1485. #
  1486. #    This clause only supports fast acl types.
  1487. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  1488. #Default:
  1489. # all TCP connections to ports with require-proxy-header will be denied
  1490.  
  1491. #  TAG: follow_x_forwarded_for
  1492. #    Determine which client proxies can be trusted to provide correct
  1493. #    information regarding real client IP address.
  1494. #
  1495. #    Requests may pass through a chain of several other proxies
  1496. #    before reaching us. The original source details may by sent in:
  1497. #        * HTTP message Forwarded header, or
  1498. #        * HTTP message X-Forwarded-For header, or
  1499. #        * PROXY protocol connection header.
  1500. #
  1501. #    PROXY protocol connections are controlled by the proxy_protocol_access
  1502. #    directive which is checked before this.
  1503. #
  1504. #    If a request reaches us from a source that is allowed by this
  1505. #    directive, then we trust the information it provides regarding
  1506. #    the IP of the client it received from (if any).
  1507. #
  1508. #    For the purpose of ACLs used in this directive the src ACL type always
  1509. #    matches the address we are testing and srcdomain matches its rDNS.
  1510. #
  1511. #    On each HTTP request Squid checks for X-Forwarded-For header fields.
  1512. #    If found the header values are iterated in reverse order and an allow
  1513. #    match is required for Squid to continue on to the next value.
  1514. #    The verification ends when a value receives a deny match, cannot be
  1515. #    tested, or there are no more values to test.
  1516. #    NOTE: Squid does not yet follow the Forwarded HTTP header.
  1517. #
  1518. #    The end result of this process is an IP address that we will
  1519. #    refer to as the indirect client address.  This address may
  1520. #    be treated as the client address for access control, ICAP, delay
  1521. #    pools and logging, depending on the acl_uses_indirect_client,
  1522. #    icap_uses_indirect_client, delay_pool_uses_indirect_client,
  1523. #    log_uses_indirect_client and tproxy_uses_indirect_client options.
  1524. #
  1525. #    This clause only supports fast acl types.
  1526. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  1527. #
  1528. #    SECURITY CONSIDERATIONS:
  1529. #
  1530. #        Any host from which we accept client IP details can place
  1531. #        incorrect information in the relevant header, and Squid
  1532. #        will use the incorrect information as if it were the
  1533. #        source address of the request.  This may enable remote
  1534. #        hosts to bypass any access control restrictions that are
  1535. #        based on the client's source addresses.
  1536. #
  1537. #    For example:
  1538. #
  1539. #        acl localhost src 127.0.0.1
  1540. #        acl my_other_proxy srcdomain .proxy.example.com
  1541. #        follow_x_forwarded_for allow localhost
  1542. #        follow_x_forwarded_for allow my_other_proxy
  1543. #Default:
  1544. # X-Forwarded-For header will be ignored.
  1545.  
  1546. #  TAG: acl_uses_indirect_client    on|off
  1547. #    Controls whether the indirect client address
  1548. #    (see follow_x_forwarded_for) is used instead of the
  1549. #    direct client address in acl matching.
  1550. #
  1551. #    NOTE: maxconn ACL considers direct TCP links and indirect
  1552. #          clients will always have zero. So no match.
  1553. #Default:
  1554. # acl_uses_indirect_client on
  1555.  
  1556. #  TAG: delay_pool_uses_indirect_client    on|off
  1557. #    Controls whether the indirect client address
  1558. #    (see follow_x_forwarded_for) is used instead of the
  1559. #    direct client address in delay pools.
  1560. #Default:
  1561. # delay_pool_uses_indirect_client on
  1562.  
  1563. #  TAG: log_uses_indirect_client    on|off
  1564. #    Controls whether the indirect client address
  1565. #    (see follow_x_forwarded_for) is used instead of the
  1566. #    direct client address in the access log.
  1567. #Default:
  1568. # log_uses_indirect_client on
  1569.  
  1570. #  TAG: tproxy_uses_indirect_client    on|off
  1571. #    Controls whether the indirect client address
  1572. #    (see follow_x_forwarded_for) is used instead of the
  1573. #    direct client address when spoofing the outgoing client.
  1574. #
  1575. #    This has no effect on requests arriving in non-tproxy
  1576. #    mode ports.
  1577. #
  1578. #    SECURITY WARNING: Usage of this option is dangerous
  1579. #    and should not be used trivially. Correct configuration
  1580. #    of follow_x_forwarded_for with a limited set of trusted
  1581. #    sources is required to prevent abuse of your proxy.
  1582. #Default:
  1583. # tproxy_uses_indirect_client off
  1584.  
  1585. #  TAG: spoof_client_ip
  1586. #    Control client IP address spoofing of TPROXY traffic based on
  1587. #    defined access lists.
  1588. #
  1589. #    spoof_client_ip allow|deny [!]aclname ...
  1590. #
  1591. #    If there are no "spoof_client_ip" lines present, the default
  1592. #    is to "allow" spoofing of any suitable request.
  1593. #
  1594. #    Note that the cache_peer "no-tproxy" option overrides this ACL.
  1595. #
  1596. #    This clause supports fast acl types.
  1597. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  1598. #Default:
  1599. # Allow spoofing on all TPROXY traffic.
  1600.  
  1601. #  TAG: http_access
  1602. #    Allowing or Denying access based on defined access lists
  1603. #
  1604. #    To allow or deny a message received on an HTTP, HTTPS, or FTP port:
  1605. #    http_access allow|deny [!]aclname ...
  1606. #
  1607. #    NOTE on default values:
  1608. #
  1609. #    If there are no "access" lines present, the default is to deny
  1610. #    the request.
  1611. #
  1612. #    If none of the "access" lines cause a match, the default is the
  1613. #    opposite of the last line in the list.  If the last line was
  1614. #    deny, the default is allow.  Conversely, if the last line
  1615. #    is allow, the default will be deny.  For these reasons, it is a
  1616. #    good idea to have an "deny all" entry at the end of your access
  1617. #    lists to avoid potential confusion.
  1618. #
  1619. #    This clause supports both fast and slow acl types.
  1620. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  1621. #
  1622. #Default:
  1623. # Deny, unless rules exist in squid.conf.
  1624. #
  1625.  
  1626. #
  1627. # Recommended minimum Access Permission configuration:
  1628. #
  1629. # Deny requests to certain unsafe ports
  1630. http_access allow !Safe_ports
  1631.  
  1632. # Allow CONNECT to other than secure SSL ports
  1633. http_access allow !SSL_ports
  1634.  
  1635. # Only allow cachemgr access from localhost
  1636. http_access allow localhost manager
  1637. http_access deny manager
  1638.  
  1639. # We strongly recommend the following be uncommented to protect innocent
  1640. # web applications running on the proxy server who think the only
  1641. # one who can access services on "localhost" is a local user
  1642. http_access deny to_localhost
  1643.  
  1644. #
  1645. # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
  1646. #
  1647. include /etc/squid/conf.d/*
  1648.  
  1649. #
  1650. ##############################
  1651. ## START OF CUSTOM COMMANDS ##
  1652. ##############################
  1653. #
  1654.  
  1655. auth_param basic program ${BASIC_NCSA_AUTH} ${SQUID_PASSWD}
  1656. auth_param basic children 5
  1657. auth_param basic realm proxy
  1658. acl authenticated proxy_auth REQUIRED
  1659. acl auth_users proxy_auth REQUIRED
  1660.  
  1661. # Adapt localnet in the ACL section to list your (internal) IP networks from where browsing should be allowed
  1662. http_access allow localnet
  1663. http_access allow localhost
  1664. http_access allow authenticated
  1665. http_access allow whitelist
  1666. http_access deny blocked_sites
  1667.  
  1668. # And finally deny all other access to this proxy
  1669. http_access deny all
  1670.  
  1671. #
  1672. # This specifies the maximum buffer size of a client request.
  1673. # It prevents squid eating too much memory when somebody uploads a large file.
  1674. #
  1675. client_request_buffer_max_size ${CLIENT_RQST_BFR_SIZE}
  1676.  
  1677. # set dns nameserver addresses
  1678. dns_nameservers ${SERVER_IP}
  1679.  
  1680. # Set the file size range the proxy will actively cache
  1681. minimum_object_size ${MIN_OBJ_SIZE}
  1682. maximum_object_size ${MAX_OBJ_SIZE}
  1683. maximum_object_size_in_memory ${MAX_OBJ_SIZE_MEM}
  1684.  
  1685. cache_swap_low ${CACHE_SWP_LOW}
  1686. cache_swap_high ${CACHE_SWP_HIGH}
  1687.  
  1688. # always: Keep most recently fetched objects in memory (default)
  1689. memory_cache_mode ${MEM_CACHE_MODE}
  1690.  
  1691. # Uncomment and adjust the following to add a disk cache directory.
  1692. cache_dir ufs ${CACHE_DIR_SQUID} ${CACHE_DIR_SQUID_SIZE} 16 256
  1693.  
  1694. #
  1695. ########################################
  1696. ## Your custom refresh_patterns below ##
  1697. ########################################
  1698. #
  1699. refresh_pattern \/master$                                    0         0%        0  refresh-ims
  1700. #
  1701. ####################################
  1702. ## default refresh_patterns below ##
  1703. ####################################
  1704. #
  1705. refresh_pattern ^ftp:                                     1440        20%    10080
  1706. refresh_pattern ^gopher:                                  1440         0%     1440
  1707. refresh_pattern -i (/cgi-bin/|\?)                            0         0%        0
  1708. refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$      0         0%        0  refresh-ims
  1709. refresh_pattern \/Release(|\.gpg)$                           0         0%        0  refresh-ims
  1710. refresh_pattern \/InRelease$                                 0         0%        0  refresh-ims
  1711. refresh_pattern \/(Translation-.*)(|\.bz2|\.gz|\.xz)$        0         0%        0  refresh-ims
  1712. # example pattern for deb packages
  1713. refresh_pattern (\.deb|\.udeb)$                         129600       100%   129600
  1714. refresh_pattern .                                            0        20%     4320
  1715. #
  1716.  
  1717. # Cache memory transit file allocation max size limit
  1718. cache_mem ${CACHE_MEM}
  1719.  
  1720. # set default squid proxy port
  1721. http_port ${PORT_SQUID::4}
  1722.  
  1723. # set visible hostname
  1724. visible_hostname debian-bullseye
  1725.  
  1726. # Some servers incorrectly signal the use of HTTP/1.0 persistent connections including on replies
  1727. # not compatible, causing significant delays. Mostly happens on redirects. Enabling attempts to
  1728. # detect broken replies and automatically assumes the reply is finished after a 10 second timeout.
  1729. detect_broken_pconn ${DETECT_BROKEN_PCONN}
  1730.  
  1731. # SET DEFAULT USER/OWNER FOR SQUID
  1732. cache_effective_user ${SQUID_USER}
  1733.  
  1734. http_accel_surrogate_remote on
  1735. esi_parser expat
  1736.  
  1737. #
  1738. ############################
  1739. ## END OF CUSTOM COMMANDS ##
  1740. ############################
  1741. #
  1742.  
  1743. #  TAG: adapted_http_access
  1744. #    Allowing or Denying access based on defined access lists
  1745. #
  1746. #    Essentially identical to http_access, but runs after redirectors
  1747. #    and ICAP/eCAP adaptation. Allowing access control based on their
  1748. #    output.
  1749. #
  1750. #    If not set then only http_access is used.
  1751. #Default:
  1752. # Allow, unless rules exist in squid.conf.
  1753.  
  1754. #  TAG: http_reply_access
  1755. #    Allow replies to client requests. This is complementary to http_access.
  1756. #
  1757. #    http_reply_access allow|deny [!] aclname ...
  1758. #
  1759. #    NOTE: if there are no access lines present, the default is to allow
  1760. #    all replies.
  1761. #
  1762. #    If none of the access lines cause a match the opposite of the
  1763. #    last line will apply. Thus it is good practice to end the rules
  1764. #    with an "allow all" or "deny all" entry.
  1765. #
  1766. #    This clause supports both fast and slow acl types.
  1767. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  1768. #Default:
  1769. # Allow, unless rules exist in squid.conf.
  1770.  
  1771. #  TAG: icp_access
  1772. #    Allowing or Denying access to the ICP port based on defined
  1773. #    access lists
  1774. #
  1775. #    icp_access  allow|deny [!]aclname ...
  1776. #
  1777. #    NOTE: The default if no icp_access lines are present is to
  1778. #    deny all traffic. This default may cause problems with peers
  1779. #    using ICP.
  1780. #
  1781. #    This clause only supports fast acl types.
  1782. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  1783. #
  1784. ## Allow ICP queries from local networks only
  1785. ##icp_access allow localnet
  1786. ##icp_access deny all
  1787. #Default:
  1788. # Deny, unless rules exist in squid.conf.
  1789.  
  1790. #  TAG: htcp_access
  1791. #    Allowing or Denying access to the HTCP port based on defined
  1792. #    access lists
  1793. #
  1794. #    htcp_access  allow|deny [!]aclname ...
  1795. #
  1796. #    See also htcp_clr_access for details on access control for
  1797. #    cache purge (CLR) HTCP messages.
  1798. #
  1799. #    NOTE: The default if no htcp_access lines are present is to
  1800. #    deny all traffic. This default may cause problems with peers
  1801. #    using the htcp option.
  1802. #
  1803. #    This clause only supports fast acl types.
  1804. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  1805. #
  1806. ## Allow HTCP queries from local networks only
  1807. ##htcp_access allow localnet
  1808. ##htcp_access deny all
  1809. #Default:
  1810. # Deny, unless rules exist in squid.conf.
  1811.  
  1812. #  TAG: htcp_clr_access
  1813. #    Allowing or Denying access to purge content using HTCP based
  1814. #    on defined access lists.
  1815. #    See htcp_access for details on general HTCP access control.
  1816. #
  1817. #    htcp_clr_access  allow|deny [!]aclname ...
  1818. #
  1819. #    This clause only supports fast acl types.
  1820. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  1821. #
  1822. ## Allow HTCP CLR requests from trusted peers
  1823. #acl htcp_clr_peer src 192.0.2.2 2001:DB8::2
  1824. #htcp_clr_access allow htcp_clr_peer
  1825. #htcp_clr_access deny all
  1826. #Default:
  1827. # Deny, unless rules exist in squid.conf.
  1828.  
  1829. #  TAG: miss_access
  1830. #    Determines whether network access is permitted when satisfying a request.
  1831. #
  1832. #    For example;
  1833. #        to force your neighbors to use you as a sibling instead of
  1834. #        a parent.
  1835. #
  1836. #        acl localclients src 192.0.2.0/24 2001:DB8::a:0/64
  1837. #        miss_access deny  !localclients
  1838. #        miss_access allow all
  1839. #
  1840. #    This means only your local clients are allowed to fetch relayed/MISS
  1841. #    replies from the network and all other clients can only fetch cached
  1842. #    objects (HITs).
  1843. #
  1844. #    The default for this setting allows all clients who passed the
  1845. #    http_access rules to relay via this proxy.
  1846. #
  1847. #    This clause only supports fast acl types.
  1848. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  1849. #Default:
  1850. # Allow, unless rules exist in squid.conf.
  1851.  
  1852. #  TAG: ident_lookup_access
  1853. #    A list of ACL elements which, if matched, cause an ident
  1854. #    (RFC 931) lookup to be performed for this request.  For
  1855. #    example, you might choose to always perform ident lookups
  1856. #    for your main multi-user Unix boxes, but not for your Macs
  1857. #    and PCs.  By default, ident lookups are not performed for
  1858. #    any requests.
  1859. #
  1860. #    To enable ident lookups for specific client addresses, you
  1861. #    can follow this example:
  1862. #
  1863. #    acl ident_aware_hosts src 198.168.1.0/24
  1864. #    ident_lookup_access allow ident_aware_hosts
  1865. #    ident_lookup_access deny all
  1866. #
  1867. #    Only src type ACL checks are fully supported.  A srcdomain
  1868. #    ACL might work at times, but it will not always provide
  1869. #    the correct result.
  1870. #
  1871. #    This clause only supports fast acl types.
  1872. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  1873. #Default:
  1874. # Unless rules exist in squid.conf, IDENT is not fetched.
  1875.  
  1876. #  TAG: reply_body_max_size    size [acl acl...]
  1877. #    This option specifies the maximum size of a reply body. It can be
  1878. #    used to prevent users from downloading very large files, such as
  1879. #    MP3's and movies. When the reply headers are received, the
  1880. #    reply_body_max_size lines are processed, and the first line where
  1881. #    all (if any) listed ACLs are true is used as the maximum body size
  1882. #    for this reply.
  1883. #
  1884. #    This size is checked twice. First when we get the reply headers,
  1885. #    we check the content-length value.  If the content length value exists
  1886. #    and is larger than the allowed size, the request is denied and the
  1887. #    user receives an error message that says "the request or reply
  1888. #    is too large." If there is no content-length, and the reply
  1889. #    size exceeds this limit, the client's connection is just closed
  1890. #    and they will receive a partial reply.
  1891. #
  1892. #    WARNING: downstream caches probably can not detect a partial reply
  1893. #    if there is no content-length header, so they will cache
  1894. #    partial responses and give them out as hits.  You should NOT
  1895. #    use this option if you have downstream caches.
  1896. #
  1897. #    WARNING: A maximum size smaller than the size of squid's error messages
  1898. #    will cause an infinite loop and crash squid. Ensure that the smallest
  1899. #    non-zero value you use is greater that the maximum header size plus
  1900. #    the size of your largest error page.
  1901. #
  1902. #    If you set this parameter none (the default), there will be
  1903. #    no limit imposed.
  1904. #
  1905. #    Configuration Format is:
  1906. #        reply_body_max_size SIZE UNITS [acl ...]
  1907. #    ie.
  1908. #        reply_body_max_size 10 MB
  1909. #
  1910. #Default:
  1911. # No limit is applied.
  1912.  
  1913. #  TAG: on_unsupported_protocol
  1914. #    Determines Squid behavior when encountering strange requests at the
  1915. #    beginning of an accepted TCP connection or the beginning of a bumped
  1916. #    CONNECT tunnel. Controlling Squid reaction to unexpected traffic is
  1917. #    especially useful in interception environments where Squid is likely
  1918. #    to see connections for unsupported protocols that Squid should either
  1919. #    terminate or tunnel at TCP level.
  1920. #
  1921. #        on_unsupported_protocol <action> [!]acl ...
  1922. #
  1923. #    The first matching action wins. Only fast ACLs are supported.
  1924. #
  1925. #    Supported actions are:
  1926. #
  1927. #    tunnel: Establish a TCP connection with the intended server and
  1928. #        blindly shovel TCP packets between the client and server.
  1929. #
  1930. #    respond: Respond with an error message, using the transfer protocol
  1931. #        for the Squid port that received the request (e.g., HTTP
  1932. #        for connections intercepted at the http_port). This is the
  1933. #        default.
  1934. #
  1935. #    Squid expects the following traffic patterns:
  1936. #
  1937. #      http_port: a plain HTTP request
  1938. #      https_port: SSL/TLS handshake followed by an [encrypted] HTTP request
  1939. #      ftp_port: a plain FTP command (no on_unsupported_protocol support yet!)
  1940. #      CONNECT tunnel on http_port: same as https_port
  1941. #      CONNECT tunnel on https_port: same as https_port
  1942. #
  1943. #    Currently, this directive has effect on intercepted connections and
  1944. #    bumped tunnels only. Other cases are not supported because Squid
  1945. #    cannot know the intended destination of other traffic.
  1946. #
  1947. #    For example:
  1948. #      # define what Squid errors indicate receiving non-HTTP traffic:
  1949. #      acl foreignProtocol squid_error ERR_PROTOCOL_UNKNOWN ERR_TOO_BIG
  1950. #      # define what Squid errors indicate receiving nothing:
  1951. #      acl serverTalksFirstProtocol squid_error ERR_REQUEST_START_TIMEOUT
  1952. #      # tunnel everything that does not look like HTTP:
  1953. #          on_unsupported_protocol tunnel foreignProtocol
  1954. #      # tunnel if we think the client waits for the server to talk first:
  1955. #      on_unsupported_protocol tunnel serverTalksFirstProtocol
  1956. #      # in all other error cases, just send an HTTP "error page" response:
  1957. #      on_unsupported_protocol respond all
  1958. #
  1959. #    See also: squid_error ACL
  1960. #Default:
  1961. # Respond with an error message to unidentifiable traffic
  1962.  
  1963. #  TAG: auth_schemes
  1964. #    Use this directive to customize authentication schemes presence and
  1965. #    order in Squid's Unauthorized and Authentication Required responses.
  1966. #
  1967. #        auth_schemes scheme1,scheme2,... [!]aclname ...
  1968. #
  1969. #    where schemeN is the name of one of the authentication schemes
  1970. #    configured using auth_param directives. At least one scheme name is
  1971. #    required. Multiple scheme names are separated by commas. Either
  1972. #    avoid whitespace or quote the entire schemes list.
  1973. #
  1974. #    A special "ALL" scheme name expands to all auth_param-configured
  1975. #    schemes in their configuration order. This directive cannot be used
  1976. #    to configure Squid to offer no authentication schemes at all.
  1977. #
  1978. #    The first matching auth_schemes rule determines the schemes order
  1979. #    for the current Authentication Required transaction. Note that the
  1980. #    future response is not yet available during auth_schemes evaluation.
  1981. #
  1982. #    If this directive is not used or none of its rules match, then Squid
  1983. #    responds with all configured authentication schemes in the order of
  1984. #    auth_param directives in the configuration file.
  1985. #
  1986. #    This directive does not determine when authentication is used or
  1987. #    how each authentication scheme authenticates clients.
  1988. #
  1989. #    The following example sends basic and negotiate authentication
  1990. #    schemes, in that order, when requesting authentication of HTTP
  1991. #    requests matching the isIE ACL (not shown) while sending all
  1992. #    auth_param schemes in their configuration order to other clients:
  1993. #
  1994. #        auth_schemes basic,negotiate isIE
  1995. #        auth_schemes ALL all # explicit default
  1996. #
  1997. #    This directive supports fast ACLs only.
  1998. #
  1999. #    See also: auth_param.
  2000. #Default:
  2001. # use all auth_param schemes in their configuration order
  2002.  
  2003. # NETWORK OPTIONS
  2004. # -----------------------------------------------------------------------------
  2005.  
  2006. #  TAG: http_port
  2007. #    Usage:    port [mode] [options]
  2008. #        hostname:port [mode] [options]
  2009. #        1.2.3.4:port [mode] [options]
  2010. #
  2011. #    The socket addresses where Squid will listen for HTTP client
  2012. #    requests.  You may specify multiple socket addresses.
  2013. #    There are three forms: port alone, hostname with port, and
  2014. #    IP address with port.  If you specify a hostname or IP
  2015. #    address, Squid binds the socket to that specific
  2016. #    address. Most likely, you do not need to bind to a specific
  2017. #    address, so you can use the port number alone.
  2018. #
  2019. #    If you are running Squid in accelerator mode, you
  2020. #    probably want to listen on port 80 also, or instead.
  2021. #
  2022. #    The -a command line option may be used to specify additional
  2023. #    port(s) where Squid listens for proxy request. Such ports will
  2024. #    be plain proxy ports with no options.
  2025. #
  2026. #    You may specify multiple socket addresses on multiple lines.
  2027. #
  2028. #    Modes:
  2029. #
  2030. #       intercept    Support for IP-Layer NAT interception delivering
  2031. #            traffic to this Squid port.
  2032. #            NP: disables authentication on the port.
  2033. #
  2034. #       tproxy    Support Linux TPROXY (or BSD divert-to) with spoofing
  2035. #            of outgoing connections using the client IP address.
  2036. #            NP: disables authentication on the port.
  2037. #
  2038. #       accel    Accelerator / reverse proxy mode
  2039. #
  2040. #       ssl-bump    For each CONNECT request allowed by ssl_bump ACLs,
  2041. #            establish secure connection with the client and with
  2042. #            the server, decrypt HTTPS messages as they pass through
  2043. #            Squid, and treat them as unencrypted HTTP messages,
  2044. #            becoming the man-in-the-middle.
  2045. #
  2046. #            The ssl_bump option is required to fully enable
  2047. #            bumping of CONNECT requests.
  2048. #
  2049. #    Omitting the mode flag causes default forward proxy mode to be used.
  2050. #
  2051. #
  2052. #    Accelerator Mode Options:
  2053. #
  2054. #       defaultsite=domainname
  2055. #            What to use for the Host: header if it is not present
  2056. #            in a request. Determines what site (not origin server)
  2057. #            accelerators should consider the default.
  2058. #
  2059. #       no-vhost    Disable using HTTP/1.1 Host header for virtual domain support.
  2060. #
  2061. #       protocol=    Protocol to reconstruct accelerated and intercepted
  2062. #            requests with. Defaults to HTTP/1.1 for http_port and
  2063. #            HTTPS/1.1 for https_port.
  2064. #            When an unsupported value is configured Squid will
  2065. #            produce a FATAL error.
  2066. #            Values: HTTP or HTTP/1.1, HTTPS or HTTPS/1.1
  2067. #
  2068. #       vport    Virtual host port support. Using the http_port number
  2069. #            instead of the port passed on Host: headers.
  2070. #
  2071. #       vport=NN    Virtual host port support. Using the specified port
  2072. #            number instead of the port passed on Host: headers.
  2073. #
  2074. #       act-as-origin
  2075. #            Act as if this Squid is the origin server.
  2076. #            This currently means generate new Date: and Expires:
  2077. #            headers on HIT instead of adding Age:.
  2078. #
  2079. #       ignore-cc    Ignore request Cache-Control headers.
  2080. #
  2081. #            WARNING: This option violates HTTP specifications if
  2082. #            used in non-accelerator setups.
  2083. #
  2084. #       allow-direct    Allow direct forwarding in accelerator mode. Normally
  2085. #            accelerated requests are denied direct forwarding as if
  2086. #            never_direct was used.
  2087. #
  2088. #            WARNING: this option opens accelerator mode to security
  2089. #            vulnerabilities usually only affecting in interception
  2090. #            mode. Make sure to protect forwarding with suitable
  2091. #            http_access rules when using this.
  2092. #
  2093. #
  2094. #    SSL Bump Mode Options:
  2095. #        In addition to these options ssl-bump requires TLS/SSL options.
  2096. #
  2097. #       generate-host-certificates[=<on|off>]
  2098. #            Dynamically create SSL server certificates for the
  2099. #            destination hosts of bumped CONNECT requests.When
  2100. #            enabled, the cert and key options are used to sign
  2101. #            generated certificates. Otherwise generated
  2102. #            certificate will be selfsigned.
  2103. #            If there is a CA certificate lifetime of the generated
  2104. #            certificate equals lifetime of the CA certificate. If
  2105. #            generated certificate is selfsigned lifetime is three
  2106. #            years.
  2107. #            This option is enabled by default when ssl-bump is used.
  2108. #            See the ssl-bump option above for more information.
  2109. #
  2110. #       dynamic_cert_mem_cache_size=SIZE
  2111. #            Approximate total RAM size spent on cached generated
  2112. #            certificates. If set to zero, caching is disabled. The
  2113. #            default value is 4MB.
  2114. #
  2115. #    TLS / SSL Options:
  2116. #
  2117. #       tls-cert=    Path to file containing an X.509 certificate (PEM format)
  2118. #            to be used in the TLS handshake ServerHello.
  2119. #
  2120. #            If this certificate is constrained by KeyUsage TLS
  2121. #            feature it must allow HTTP server usage, along with
  2122. #            any additional restrictions imposed by your choice
  2123. #            of options= settings.
  2124. #
  2125. #            When OpenSSL is used this file may also contain a
  2126. #            chain of intermediate CA certificates to send in the
  2127. #            TLS handshake.
  2128. #
  2129. #            When GnuTLS is used this option (and any paired
  2130. #            tls-key= option) may be repeated to load multiple
  2131. #            certificates for different domains.
  2132. #
  2133. #            Also, when generate-host-certificates=on is configured
  2134. #            the first tls-cert= option must be a CA certificate
  2135. #            capable of signing the automatically generated
  2136. #            certificates.
  2137. #
  2138. #       tls-key=    Path to a file containing private key file (PEM format)
  2139. #            for the previous tls-cert= option.
  2140. #
  2141. #            If tls-key= is not specified tls-cert= is assumed to
  2142. #            reference a PEM file containing both the certificate
  2143. #            and private key.
  2144. #
  2145. #       cipher=    Colon separated list of supported ciphers.
  2146. #            NOTE: some ciphers such as EDH ciphers depend on
  2147. #                  additional settings. If those settings are
  2148. #                  omitted the ciphers may be silently ignored
  2149. #                  by the OpenSSL library.
  2150. #
  2151. #       options=    Various SSL implementation options. The most important
  2152. #            being:
  2153. #
  2154. #                NO_SSLv3    Disallow the use of SSLv3
  2155. #
  2156. #                NO_TLSv1    Disallow the use of TLSv1.0
  2157. #
  2158. #                NO_TLSv1_1  Disallow the use of TLSv1.1
  2159. #
  2160. #                NO_TLSv1_2  Disallow the use of TLSv1.2
  2161. #
  2162. #                SINGLE_DH_USE
  2163. #                      Always create a new key when using
  2164. #                      temporary/ephemeral DH key exchanges
  2165. #
  2166. #                SINGLE_ECDH_USE
  2167. #                      Enable ephemeral ECDH key exchange.
  2168. #                      The adopted curve should be specified
  2169. #                      using the tls-dh option.
  2170. #
  2171. #                NO_TICKET
  2172. #                      Disable use of RFC5077 session tickets.
  2173. #                      Some servers may have problems
  2174. #                      understanding the TLS extension due
  2175. #                      to ambiguous specification in RFC4507.
  2176. #
  2177. #                ALL       Enable various bug workarounds
  2178. #                      suggested as "harmless" by OpenSSL
  2179. #                      Be warned that this reduces SSL/TLS
  2180. #                      strength to some attacks.
  2181. #
  2182. #            See the OpenSSL SSL_CTX_set_options documentation for a
  2183. #            more complete list.
  2184. #
  2185. #       clientca=    File containing the list of CAs to use when
  2186. #            requesting a client certificate.
  2187. #
  2188. #       tls-cafile=    PEM file containing CA certificates to use when verifying
  2189. #            client certificates. If not configured clientca will be
  2190. #            used. May be repeated to load multiple files.
  2191. #
  2192. #       capath=    Directory containing additional CA certificates
  2193. #            and CRL lists to use when verifying client certificates.
  2194. #            Requires OpenSSL or LibreSSL.
  2195. #
  2196. #       crlfile=    File of additional CRL lists to use when verifying
  2197. #            the client certificate, in addition to CRLs stored in
  2198. #            the capath. Implies VERIFY_CRL flag below.
  2199. #
  2200. #       tls-dh=[curve:]file
  2201. #            File containing DH parameters for temporary/ephemeral DH key
  2202. #            exchanges, optionally prefixed by a curve for ephemeral ECDH
  2203. #            key exchanges.
  2204. #            See OpenSSL documentation for details on how to create the
  2205. #            DH parameter file. Supported curves for ECDH can be listed
  2206. #            using the "openssl ecparam -list_curves" command.
  2207. #            WARNING: EDH and EECDH ciphers will be silently disabled if
  2208. #                 this option is not set.
  2209. #
  2210. #       sslflags=    Various flags modifying the use of SSL:
  2211. #                DELAYED_AUTH
  2212. #                Don't request client certificates
  2213. #                immediately, but wait until acl processing
  2214. #                requires a certificate (not yet implemented).
  2215. #                CONDITIONAL_AUTH
  2216. #                Request a client certificate during the TLS
  2217. #                handshake, but ignore certificate absence in
  2218. #                the TLS client Hello. If the client does
  2219. #                supply a certificate, it is validated.
  2220. #                NO_SESSION_REUSE
  2221. #                Don't allow for session reuse. Each connection
  2222. #                will result in a new SSL session.
  2223. #                VERIFY_CRL
  2224. #                Verify CRL lists when accepting client
  2225. #                certificates.
  2226. #                VERIFY_CRL_ALL
  2227. #                Verify CRL lists for all certificates in the
  2228. #                client certificate chain.
  2229. #
  2230. #       tls-default-ca[=off]
  2231. #            Whether to use the system Trusted CAs. Default is OFF.
  2232. #
  2233. #       tls-no-npn    Do not use the TLS NPN extension to advertise HTTP/1.1.
  2234. #
  2235. #       sslcontext=    SSL session ID context identifier.
  2236. #
  2237. #    Other Options:
  2238. #
  2239. #       connection-auth[=on|off]
  2240. #                    use connection-auth=off to tell Squid to prevent
  2241. #                    forwarding Microsoft connection oriented authentication
  2242. #            (NTLM, Negotiate and Kerberos)
  2243. #
  2244. #       disable-pmtu-discovery=
  2245. #            Control Path-MTU discovery usage:
  2246. #                off        lets OS decide on what to do (default).
  2247. #                transparent    disable PMTU discovery when transparent
  2248. #                    support is enabled.
  2249. #                always    disable always PMTU discovery.
  2250. #
  2251. #            In many setups of transparently intercepting proxies
  2252. #            Path-MTU discovery can not work on traffic towards the
  2253. #            clients. This is the case when the intercepting device
  2254. #            does not fully track connections and fails to forward
  2255. #            ICMP must fragment messages to the cache server. If you
  2256. #            have such setup and experience that certain clients
  2257. #            sporadically hang or never complete requests set
  2258. #            disable-pmtu-discovery option to 'transparent'.
  2259. #
  2260. #       name=    Specifies a internal name for the port. Defaults to
  2261. #            the port specification (port or addr:port)
  2262. #
  2263. #       tcpkeepalive[=idle,interval,timeout]
  2264. #            Enable TCP keepalive probes of idle connections.
  2265. #            In seconds; idle is the initial time before TCP starts
  2266. #            probing the connection, interval how often to probe, and
  2267. #            timeout the time before giving up.
  2268. #
  2269. #       require-proxy-header
  2270. #            Require PROXY protocol version 1 or 2 connections.
  2271. #            The proxy_protocol_access is required to permit
  2272. #            downstream proxies which can be trusted.
  2273. #
  2274. #       worker-queues
  2275. #            Ask TCP stack to maintain a dedicated listening queue
  2276. #            for each worker accepting requests at this port.
  2277. #            Requires TCP stack that supports the SO_REUSEPORT socket
  2278. #            option.
  2279. #
  2280. #            SECURITY WARNING: Enabling worker-specific queues
  2281. #            allows any process running as Squid's effective user to
  2282. #            easily accept requests destined to this port.
  2283. #
  2284. #    If you run Squid on a dual-homed machine with an internal
  2285. #    and an external interface we recommend you to specify the
  2286. #    internal address:port in http_port. This way Squid will only be
  2287. #    visible on the internal address.
  2288. #
  2289. #
  2290.  
  2291. # Squid normally listens to port 3128
  2292. #
  2293.  
  2294. #  TAG: https_port
  2295. #    Usage:  [ip:]port [mode] tls-cert=certificate.pem [options]
  2296. #
  2297. #    The socket address where Squid will listen for client requests made
  2298. #    over TLS or SSL connections. Commonly referred to as HTTPS.
  2299. #
  2300. #    This is most useful for situations where you are running squid in
  2301. #    accelerator mode and you want to do the TLS work at the accelerator
  2302. #    level.
  2303. #
  2304. #    You may specify multiple socket addresses on multiple lines,
  2305. #    each with their own certificate and/or options.
  2306. #
  2307. #    The tls-cert= option is mandatory on HTTPS ports.
  2308. #
  2309. #    See http_port for a list of modes and options.
  2310. #Default:
  2311. # none
  2312.  
  2313. #  TAG: ftp_port
  2314. #    Enables Native FTP proxy by specifying the socket address where Squid
  2315. #    listens for FTP client requests. See http_port directive for various
  2316. #    ways to specify the listening address and mode.
  2317. #
  2318. #    Usage: ftp_port address [mode] [options]
  2319. #
  2320. #    WARNING: This is a new, experimental, complex feature that has seen
  2321. #    limited production exposure. Some Squid modules (e.g., caching) do not
  2322. #    currently work with native FTP proxying, and many features have not
  2323. #    even been tested for compatibility. Test well before deploying!
  2324. #
  2325. #    Native FTP proxying differs substantially from proxying HTTP requests
  2326. #    with ftp:// URIs because Squid works as an FTP server and receives
  2327. #    actual FTP commands (rather than HTTP requests with FTP URLs).
  2328. #
  2329. #    Native FTP commands accepted at ftp_port are internally converted or
  2330. #    wrapped into HTTP-like messages. The same happens to Native FTP
  2331. #    responses received from FTP origin servers. Those HTTP-like messages
  2332. #    are shoveled through regular access control and adaptation layers
  2333. #    between the FTP client and the FTP origin server. This allows Squid to
  2334. #    examine, adapt, block, and log FTP exchanges. Squid reuses most HTTP
  2335. #    mechanisms when shoveling wrapped FTP messages. For example,
  2336. #    http_access and adaptation_access directives are used.
  2337. #
  2338. #    Modes:
  2339. #
  2340. #       intercept    Same as http_port intercept. The FTP origin address is
  2341. #            determined based on the intended destination of the
  2342. #            intercepted connection.
  2343. #
  2344. #       tproxy    Support Linux TPROXY for spoofing outgoing
  2345. #            connections using the client IP address.
  2346. #            NP: disables authentication and maybe IPv6 on the port.
  2347. #
  2348. #    By default (i.e., without an explicit mode option), Squid extracts the
  2349. #    FTP origin address from the login@origin parameter of the FTP USER
  2350. #    command. Many popular FTP clients support such native FTP proxying.
  2351. #
  2352. #    Options:
  2353. #
  2354. #       name=token    Specifies an internal name for the port. Defaults to
  2355. #            the port address. Usable with myportname ACL.
  2356. #
  2357. #       ftp-track-dirs
  2358. #            Enables tracking of FTP directories by injecting extra
  2359. #            PWD commands and adjusting Request-URI (in wrapping
  2360. #            HTTP requests) to reflect the current FTP server
  2361. #            directory. Tracking is disabled by default.
  2362. #
  2363. #       protocol=FTP    Protocol to reconstruct accelerated and intercepted
  2364. #            requests with. Defaults to FTP. No other accepted
  2365. #            values have been tested with. An unsupported value
  2366. #            results in a FATAL error. Accepted values are FTP,
  2367. #            HTTP (or HTTP/1.1), and HTTPS (or HTTPS/1.1).
  2368. #
  2369. #    Other http_port modes and options that are not specific to HTTP and
  2370. #    HTTPS may also work.
  2371. #Default:
  2372. # none
  2373.  
  2374. #  TAG: tcp_outgoing_tos
  2375. #    Allows you to select a TOS/Diffserv value for packets outgoing
  2376. #    on the server side, based on an ACL.
  2377. #
  2378. #    tcp_outgoing_tos ds-field [!]aclname ...
  2379. #
  2380. #    Example where normal_service_net uses the TOS value 0x00
  2381. #    and good_service_net uses 0x20
  2382. #
  2383. #    acl normal_service_net src 10.0.0.0/24
  2384. #    acl good_service_net src 10.0.1.0/24
  2385. #    tcp_outgoing_tos 0x00 normal_service_net
  2386. #    tcp_outgoing_tos 0x20 good_service_net
  2387. #
  2388. #    TOS/DSCP values really only have local significance - so you should
  2389. #    know what you're specifying. For more information, see RFC2474,
  2390. #    RFC2475, and RFC3260.
  2391. #
  2392. #    The TOS/DSCP byte must be exactly that - a octet value  0 - 255, or
  2393. #    "default" to use whatever default your host has.
  2394. #    Note that only multiples of 4 are usable as the two rightmost bits have
  2395. #    been redefined for use by ECN (RFC 3168 section 23.1).
  2396. #    The squid parser will enforce this by masking away the ECN bits.
  2397. #
  2398. #    Processing proceeds in the order specified, and stops at first fully
  2399. #    matching line.
  2400. #
  2401. #    Only fast ACLs are supported.
  2402. #Default:
  2403. # none
  2404.  
  2405. #  TAG: clientside_tos
  2406. #    Allows you to select a TOS/DSCP value for packets being transmitted
  2407. #    on the client-side, based on an ACL.
  2408. #
  2409. #    clientside_tos ds-field [!]aclname ...
  2410. #
  2411. #    Example where normal_service_net uses the TOS value 0x00
  2412. #    and good_service_net uses 0x20
  2413. #
  2414. #    acl normal_service_net src 10.0.0.0/24
  2415. #    acl good_service_net src 10.0.1.0/24
  2416. #    clientside_tos 0x00 normal_service_net
  2417. #    clientside_tos 0x20 good_service_net
  2418. #
  2419. #    Note: This feature is incompatible with qos_flows. Any TOS values set here
  2420. #    will be overwritten by TOS values in qos_flows.
  2421. #
  2422. #    The TOS/DSCP byte must be exactly that - a octet value  0 - 255, or
  2423. #    "default" to use whatever default your host has.
  2424. #    Note that only multiples of 4 are usable as the two rightmost bits have
  2425. #    been redefined for use by ECN (RFC 3168 section 23.1).
  2426. #    The squid parser will enforce this by masking away the ECN bits.
  2427. #
  2428. #    This clause only supports fast acl types.
  2429. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  2430. #Default:
  2431. # none
  2432.  
  2433. #  TAG: tcp_outgoing_mark
  2434. # Note: This option is only available if Squid is rebuilt with the
  2435. #       Packet MARK (Linux)
  2436. #
  2437. #    Allows you to apply a Netfilter mark value to outgoing packets
  2438. #    on the server side, based on an ACL.
  2439. #
  2440. #    tcp_outgoing_mark mark-value [!]aclname ...
  2441. #
  2442. #    Example where normal_service_net uses the mark value 0x00
  2443. #    and good_service_net uses 0x20
  2444. #
  2445. #    acl normal_service_net src 10.0.0.0/24
  2446. #    acl good_service_net src 10.0.1.0/24
  2447. #    tcp_outgoing_mark 0x00 normal_service_net
  2448. #    tcp_outgoing_mark 0x20 good_service_net
  2449. #
  2450. #    Only fast ACLs are supported.
  2451. #Default:
  2452. # none
  2453.  
  2454. #  TAG: mark_client_packet
  2455. # Note: This option is only available if Squid is rebuilt with the
  2456. #       Packet MARK (Linux)
  2457. #
  2458. #    Allows you to apply a Netfilter MARK value to packets being transmitted
  2459. #    on the client-side, based on an ACL.
  2460. #
  2461. #    mark_client_packet mark-value [!]aclname ...
  2462. #
  2463. #    Example where normal_service_net uses the MARK value 0x00
  2464. #    and good_service_net uses 0x20
  2465. #
  2466. #    acl normal_service_net src 10.0.0.0/24
  2467. #    acl good_service_net src 10.0.1.0/24
  2468. #    mark_client_packet 0x00 normal_service_net
  2469. #    mark_client_packet 0x20 good_service_net
  2470. #
  2471. #    Note: This feature is incompatible with qos_flows. Any mark values set here
  2472. #    will be overwritten by mark values in qos_flows.
  2473. #
  2474. #    This clause only supports fast acl types.
  2475. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  2476. #Default:
  2477. # none
  2478.  
  2479. #  TAG: mark_client_connection
  2480. # Note: This option is only available if Squid is rebuilt with the
  2481. #       Packet MARK (Linux)
  2482. #
  2483. #    Allows you to apply a Netfilter CONNMARK value to a connection
  2484. #    on the client-side, based on an ACL.
  2485. #
  2486. #    mark_client_connection mark-value[/mask] [!]aclname ...
  2487. #
  2488. #    The mark-value and mask are unsigned integers (hex, octal, or decimal).
  2489. #    The mask may be used to preserve marking previously set by other agents
  2490. #    (e.g., iptables).
  2491. #
  2492. #    A matching rule replaces the CONNMARK value. If a mask is also
  2493. #    specified, then the masked bits of the original value are zeroed, and
  2494. #    the configured mark-value is ORed with that adjusted value.
  2495. #    For example, applying a mark-value 0xAB/0xF to 0x5F CONNMARK, results
  2496. #    in a 0xFB marking (rather than a 0xAB or 0x5B).
  2497. #
  2498. #    This directive semantics is similar to iptables --set-mark rather than
  2499. #    --set-xmark functionality.
  2500. #
  2501. #    The directive does not interfere with qos_flows (which uses packet MARKs,
  2502. #    not CONNMARKs).
  2503. #
  2504. #    Example where squid marks intercepted FTP connections:
  2505. #
  2506. #    acl proto_ftp proto FTP
  2507. #    mark_client_connection 0x200/0xff00 proto_ftp
  2508. #
  2509. #    This clause only supports fast acl types.
  2510. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  2511. #Default:
  2512. # none
  2513.  
  2514. #  TAG: qos_flows
  2515. #    Allows you to select a TOS/DSCP value to mark outgoing
  2516. #    connections to the client, based on where the reply was sourced.
  2517. #    For platforms using netfilter, allows you to set a netfilter mark
  2518. #    value instead of, or in addition to, a TOS value.
  2519. #
  2520. #    By default this functionality is disabled. To enable it with the default
  2521. #    settings simply use "qos_flows mark" or "qos_flows tos". Default
  2522. #    settings will result in the netfilter mark or TOS value being copied
  2523. #    from the upstream connection to the client. Note that it is the connection
  2524. #    CONNMARK value not the packet MARK value that is copied.
  2525. #
  2526. #    It is not currently possible to copy the mark or TOS value from the
  2527. #    client to the upstream connection request.
  2528. #
  2529. #    TOS values really only have local significance - so you should
  2530. #    know what you're specifying. For more information, see RFC2474,
  2531. #    RFC2475, and RFC3260.
  2532. #
  2533. #    The TOS/DSCP byte must be exactly that - a octet value  0 - 255.
  2534. #    Note that only multiples of 4 are usable as the two rightmost bits have
  2535. #    been redefined for use by ECN (RFC 3168 section 23.1).
  2536. #    The squid parser will enforce this by masking away the ECN bits.
  2537. #
  2538. #    Mark values can be any unsigned 32-bit integer value.
  2539. #
  2540. #    This setting is configured by setting the following values:
  2541. #
  2542. #    tos|mark                Whether to set TOS or netfilter mark values
  2543. #
  2544. #    local-hit=0xFF        Value to mark local cache hits.
  2545. #
  2546. #    sibling-hit=0xFF    Value to mark hits from sibling peers.
  2547. #
  2548. #    parent-hit=0xFF        Value to mark hits from parent peers.
  2549. #
  2550. #    miss=0xFF[/mask]    Value to mark cache misses. Takes precedence
  2551. #                over the preserve-miss feature (see below), unless
  2552. #                mask is specified, in which case only the bits
  2553. #                specified in the mask are written.
  2554. #
  2555. #    The TOS variant of the following features are only possible on Linux
  2556. #    and require your kernel to be patched with the TOS preserving ZPH
  2557. #    patch, available from http://zph.bratcheda.org
  2558. #    No patch is needed to preserve the netfilter mark, which will work
  2559. #    with all variants of netfilter.
  2560. #
  2561. #    disable-preserve-miss
  2562. #        This option disables the preservation of the TOS or netfilter
  2563. #        mark. By default, the existing TOS or netfilter mark value of
  2564. #        the response coming from the remote server will be retained
  2565. #        and masked with miss-mark.
  2566. #        NOTE: in the case of a netfilter mark, the mark must be set on
  2567. #        the connection (using the CONNMARK target) not on the packet
  2568. #        (MARK target).
  2569. #
  2570. #    miss-mask=0xFF
  2571. #        Allows you to mask certain bits in the TOS or mark value
  2572. #        received from the remote server, before copying the value to
  2573. #        the TOS sent towards clients.
  2574. #        Default for tos: 0xFF (TOS from server is not changed).
  2575. #        Default for mark: 0xFFFFFFFF (mark from server is not changed).
  2576. #
  2577. #    All of these features require the --enable-zph-qos compilation flag
  2578. #    (enabled by default). Netfilter marking also requires the
  2579. #    libnetfilter_conntrack libraries (--with-netfilter-conntrack) and
  2580. #    libcap 2.09+ (--with-libcap).
  2581. #
  2582. #Default:
  2583. # none
  2584.  
  2585. #  TAG: tcp_outgoing_address
  2586. #    Allows you to map requests to different outgoing IP addresses
  2587. #    based on the username or source address of the user making
  2588. #    the request.
  2589. #
  2590. #    tcp_outgoing_address ipaddr [[!]aclname] ...
  2591. #
  2592. #    For example;
  2593. #        Forwarding clients with dedicated IPs for certain subnets.
  2594. #
  2595. #      acl normal_service_net src 10.0.0.0/24
  2596. #      acl good_service_net src 10.0.2.0/24
  2597. #
  2598. #      tcp_outgoing_address 2001:db8::c001 good_service_net
  2599. #      tcp_outgoing_address 10.1.0.2 good_service_net
  2600. #
  2601. #      tcp_outgoing_address 2001:db8::beef normal_service_net
  2602. #      tcp_outgoing_address 10.1.0.1 normal_service_net
  2603. #
  2604. #      tcp_outgoing_address 2001:db8::1
  2605. #      tcp_outgoing_address 10.1.0.3
  2606. #
  2607. #    Processing proceeds in the order specified, and stops at first fully
  2608. #    matching line.
  2609. #
  2610. #    Squid will add an implicit IP version test to each line.
  2611. #    Requests going to IPv4 websites will use the outgoing 10.1.0.* addresses.
  2612. #    Requests going to IPv6 websites will use the outgoing 2001:db8:* addresses.
  2613. #
  2614. #
  2615. #    NOTE: The use of this directive using client dependent ACLs is
  2616. #    incompatible with the use of server side persistent connections. To
  2617. #    ensure correct results it is best to set server_persistent_connections
  2618. #    to off when using this directive in such configurations.
  2619. #
  2620. #    NOTE: The use of this directive to set a local IP on outgoing TCP links
  2621. #    is incompatible with using TPROXY to set client IP out outbound TCP links.
  2622. #    When needing to contact peers use the no-tproxy cache_peer option and the
  2623. #    client_dst_passthru directive re-enable normal forwarding such as this.
  2624. #
  2625. #    This clause only supports fast acl types.
  2626. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  2627. #Default:
  2628. # Address selection is performed by the operating system.
  2629.  
  2630. #  TAG: host_verify_strict
  2631. #    Regardless of this option setting, when dealing with intercepted
  2632. #    traffic, Squid always verifies that the destination IP address matches
  2633. #    the Host header domain or IP (called 'authority form URL').
  2634. #
  2635. #    This enforcement is performed to satisfy a MUST-level requirement in
  2636. #    RFC 2616 section 14.23: "The Host field value MUST represent the naming
  2637. #    authority of the origin server or gateway given by the original URL".
  2638. #
  2639. #    When set to ON:
  2640. #        Squid always responds with an HTTP 409 (Conflict) error
  2641. #        page and logs a security warning if there is no match.
  2642. #
  2643. #        Squid verifies that the destination IP address matches
  2644. #        the Host header for forward-proxy and reverse-proxy traffic
  2645. #        as well. For those traffic types, Squid also enables the
  2646. #        following checks, comparing the corresponding Host header
  2647. #        and Request-URI components:
  2648. #
  2649. #         * The host names (domain or IP) must be identical,
  2650. #           but valueless or missing Host header disables all checks.
  2651. #           For the two host names to match, both must be either IP
  2652. #           or FQDN.
  2653. #
  2654. #         * Port numbers must be identical, but if a port is missing
  2655. #           the scheme-default port is assumed.
  2656. #
  2657. #
  2658. #    When set to OFF (the default):
  2659. #        Squid allows suspicious requests to continue but logs a
  2660. #        security warning and blocks caching of the response.
  2661. #
  2662. #         * Forward-proxy traffic is not checked at all.
  2663. #
  2664. #         * Reverse-proxy traffic is not checked at all.
  2665. #
  2666. #         * Intercepted traffic which passes verification is handled
  2667. #           according to client_dst_passthru.
  2668. #
  2669. #         * Intercepted requests which fail verification are sent
  2670. #           to the client original destination instead of DIRECT.
  2671. #           This overrides 'client_dst_passthru off'.
  2672. #
  2673. #        For now suspicious intercepted CONNECT requests are always
  2674. #        responded to with an HTTP 409 (Conflict) error page.
  2675. #
  2676. #
  2677. #    SECURITY NOTE:
  2678. #
  2679. #    As described in CVE-2009-0801 when the Host: header alone is used
  2680. #    to determine the destination of a request it becomes trivial for
  2681. #    malicious scripts on remote websites to bypass browser same-origin
  2682. #    security policy and sandboxing protections.
  2683. #
  2684. #    The cause of this is that such applets are allowed to perform their
  2685. #    own HTTP stack, in which case the same-origin policy of the browser
  2686. #    sandbox only verifies that the applet tries to contact the same IP
  2687. #    as from where it was loaded at the IP level. The Host: header may
  2688. #    be different from the connected IP and approved origin.
  2689. #
  2690. #Default:
  2691. # host_verify_strict off
  2692.  
  2693. #  TAG: client_dst_passthru
  2694. #    With NAT or TPROXY intercepted traffic Squid may pass the request
  2695. #    directly to the original client destination IP or seek a faster
  2696. #    source using the HTTP Host header.
  2697. #
  2698. #    Using Host to locate alternative servers can provide faster
  2699. #    connectivity with a range of failure recovery options.
  2700. #    But can also lead to connectivity trouble when the client and
  2701. #    server are attempting stateful interactions unaware of the proxy.
  2702. #
  2703. #    This option (on by default) prevents alternative DNS entries being
  2704. #    located to send intercepted traffic DIRECT to an origin server.
  2705. #    The clients original destination IP and port will be used instead.
  2706. #
  2707. #    Regardless of this option setting, when dealing with intercepted
  2708. #    traffic Squid will verify the Host: header and any traffic which
  2709. #    fails Host verification will be treated as if this option were ON.
  2710. #
  2711. #    see host_verify_strict for details on the verification process.
  2712. #Default:
  2713. # client_dst_passthru on
  2714.  
  2715. # TLS OPTIONS
  2716. # -----------------------------------------------------------------------------
  2717.  
  2718. #  TAG: tls_outgoing_options
  2719. #    disable        Do not support https:// URLs.
  2720. #
  2721. #    cert=/path/to/client/certificate
  2722. #            A client X.509 certificate to use when connecting.
  2723. #
  2724. #    key=/path/to/client/private_key
  2725. #            The private key corresponding to the cert= above.
  2726. #
  2727. #            If key= is not specified cert= is assumed to
  2728. #            reference a PEM file containing both the certificate
  2729. #            and private key.
  2730. #
  2731. #    cipher=...    The list of valid TLS ciphers to use.
  2732. #
  2733. #    min-version=1.N
  2734. #            The minimum TLS protocol version to permit.
  2735. #            To control SSLv3 use the options= parameter.
  2736. #            Supported Values: 1.0 (default), 1.1, 1.2, 1.3
  2737. #
  2738. #    options=...    Specify various TLS/SSL implementation options.
  2739. #
  2740. #            OpenSSL options most important are:
  2741. #
  2742. #                NO_SSLv3    Disallow the use of SSLv3
  2743. #
  2744. #                SINGLE_DH_USE
  2745. #                      Always create a new key when using
  2746. #                      temporary/ephemeral DH key exchanges
  2747. #
  2748. #                NO_TICKET
  2749. #                      Disable use of RFC5077 session tickets.
  2750. #                      Some servers may have problems
  2751. #                      understanding the TLS extension due
  2752. #                      to ambiguous specification in RFC4507.
  2753. #
  2754. #                ALL       Enable various bug workarounds
  2755. #                      suggested as "harmless" by OpenSSL
  2756. #                      Be warned that this reduces SSL/TLS
  2757. #                      strength to some attacks.
  2758. #
  2759. #                See the OpenSSL SSL_CTX_set_options documentation
  2760. #                for a more complete list.
  2761. #
  2762. #            GnuTLS options most important are:
  2763. #
  2764. #                %NO_TICKETS
  2765. #                      Disable use of RFC5077 session tickets.
  2766. #                      Some servers may have problems
  2767. #                      understanding the TLS extension due
  2768. #                      to ambiguous specification in RFC4507.
  2769. #
  2770. #                See the GnuTLS Priority Strings documentation
  2771. #                for a more complete list.
  2772. #                http://www.gnutls.org/manual/gnutls.html#Priority-Strings
  2773. #
  2774. #
  2775. #    cafile=        PEM file containing CA certificates to use when verifying
  2776. #            the peer certificate. May be repeated to load multiple files.
  2777. #
  2778. #    capath=        A directory containing additional CA certificates to
  2779. #            use when verifying the peer certificate.
  2780. #            Requires OpenSSL or LibreSSL.
  2781. #
  2782. #    crlfile=...     A certificate revocation list file to use when
  2783. #            verifying the peer certificate.
  2784. #
  2785. #    flags=...    Specify various flags modifying the TLS implementation:
  2786. #
  2787. #            DONT_VERIFY_PEER
  2788. #                Accept certificates even if they fail to
  2789. #                verify.
  2790. #            DONT_VERIFY_DOMAIN
  2791. #                Don't verify the peer certificate
  2792. #                matches the server name
  2793. #
  2794. #    default-ca[=off]
  2795. #            Whether to use the system Trusted CAs. Default is ON.
  2796. #
  2797. #    domain=     The peer name as advertised in its certificate.
  2798. #            Used for verifying the correctness of the received peer
  2799. #            certificate. If not specified the peer hostname will be
  2800. #            used.
  2801. #Default:
  2802. # tls_outgoing_options min-version=1.0
  2803.  
  2804. # SSL OPTIONS
  2805. # -----------------------------------------------------------------------------
  2806.  
  2807. #  TAG: ssl_unclean_shutdown
  2808. # Note: This option is only available if Squid is rebuilt with the
  2809. #       --with-openssl
  2810. #
  2811. #    Some browsers (especially MSIE) bugs out on SSL shutdown
  2812. #    messages.
  2813. #Default:
  2814. # ssl_unclean_shutdown off
  2815.  
  2816. #  TAG: ssl_engine
  2817. # Note: This option is only available if Squid is rebuilt with the
  2818. #       --with-openssl
  2819. #
  2820. #    The OpenSSL engine to use. You will need to set this if you
  2821. #    would like to use hardware SSL acceleration for example.
  2822. #
  2823. #    Note: OpenSSL 3.0 and newer do not provide Engine support.
  2824. #Default:
  2825. # none
  2826.  
  2827. #  TAG: sslproxy_session_ttl
  2828. # Note: This option is only available if Squid is rebuilt with the
  2829. #       --with-openssl
  2830. #
  2831. #    Sets the timeout value for SSL sessions
  2832. #Default:
  2833. # sslproxy_session_ttl 300
  2834.  
  2835. #  TAG: sslproxy_session_cache_size
  2836. # Note: This option is only available if Squid is rebuilt with the
  2837. #       --with-openssl
  2838. #
  2839. #        Sets the cache size to use for ssl session
  2840. #Default:
  2841. # sslproxy_session_cache_size 2 MB
  2842.  
  2843. #  TAG: sslproxy_foreign_intermediate_certs
  2844. # Note: This option is only available if Squid is rebuilt with the
  2845. #       --with-openssl
  2846. #
  2847. #    Many origin servers fail to send their full server certificate
  2848. #    chain for verification, assuming the client already has or can
  2849. #    easily locate any missing intermediate certificates.
  2850. #
  2851. #    Squid uses the certificates from the specified file to fill in
  2852. #    these missing chains when trying to validate origin server
  2853. #    certificate chains.
  2854. #
  2855. #    The file is expected to contain zero or more PEM-encoded
  2856. #    intermediate certificates. These certificates are not treated
  2857. #    as trusted root certificates, and any self-signed certificate in
  2858. #    this file will be ignored.
  2859. #Default:
  2860. # none
  2861.  
  2862. #  TAG: sslproxy_cert_sign_hash
  2863. # Note: This option is only available if Squid is rebuilt with the
  2864. #       --with-openssl
  2865. #
  2866. #    Sets the hashing algorithm to use when signing generated certificates.
  2867. #    Valid algorithm names depend on the OpenSSL library used. The following
  2868. #    names are usually available: sha1, sha256, sha512, and md5. Please see
  2869. #    your OpenSSL library manual for the available hashes. By default, Squids
  2870. #    that support this option use sha256 hashes.
  2871. #
  2872. #    Squid does not forcefully purge cached certificates that were generated
  2873. #    with an algorithm other than the currently configured one. They remain
  2874. #    in the cache, subject to the regular cache eviction policy, and become
  2875. #    useful if the algorithm changes again.
  2876. #Default:
  2877. # none
  2878.  
  2879. #  TAG: ssl_bump
  2880. # Note: This option is only available if Squid is rebuilt with the
  2881. #       --with-openssl
  2882. #
  2883. #    This option is consulted when a CONNECT request is received on
  2884. #    an http_port (or a new connection is intercepted at an
  2885. #    https_port), provided that port was configured with an ssl-bump
  2886. #    flag. The subsequent data on the connection is either treated as
  2887. #    HTTPS and decrypted OR tunneled at TCP level without decryption,
  2888. #    depending on the first matching bumping "action".
  2889. #
  2890. #    ssl_bump <action> [!]acl ...
  2891. #
  2892. #    The following bumping actions are currently supported:
  2893. #
  2894. #        splice
  2895. #        Become a TCP tunnel without decrypting proxied traffic.
  2896. #        This is the default action.
  2897. #
  2898. #        bump
  2899. #        When used on step SslBump1, establishes a secure connection
  2900. #        with the client first, then connect to the server.
  2901. #        When used on step SslBump2 or SslBump3, establishes a secure
  2902. #        connection with the server and, using a mimicked server
  2903. #        certificate, with the client.
  2904. #
  2905. #        peek
  2906. #        Receive client (step SslBump1) or server (step SslBump2)
  2907. #        certificate while preserving the possibility of splicing the
  2908. #        connection. Peeking at the server certificate (during step 2)
  2909. #        usually precludes bumping of the connection at step 3.
  2910. #
  2911. #        stare
  2912. #        Receive client (step SslBump1) or server (step SslBump2)
  2913. #        certificate while preserving the possibility of bumping the
  2914. #        connection. Staring at the server certificate (during step 2)
  2915. #        usually precludes splicing of the connection at step 3.
  2916. #
  2917. #        terminate
  2918. #        Close client and server connections.
  2919. #
  2920. #    Backward compatibility actions available at step SslBump1:
  2921. #
  2922. #        client-first
  2923. #        Bump the connection. Establish a secure connection with the
  2924. #        client first, then connect to the server. This old mode does
  2925. #        not allow Squid to mimic server SSL certificate and does not
  2926. #        work with intercepted SSL connections.
  2927. #
  2928. #        server-first
  2929. #        Bump the connection. Establish a secure connection with the
  2930. #        server first, then establish a secure connection with the
  2931. #        client, using a mimicked server certificate. Works with both
  2932. #        CONNECT requests and intercepted SSL connections, but does
  2933. #        not allow to make decisions based on SSL handshake info.
  2934. #
  2935. #        peek-and-splice
  2936. #        Decide whether to bump or splice the connection based on
  2937. #        client-to-squid and server-to-squid SSL hello messages.
  2938. #        XXX: Remove.
  2939. #
  2940. #        none
  2941. #        Same as the "splice" action.
  2942. #
  2943. #    All ssl_bump rules are evaluated at each of the supported bumping
  2944. #    steps.  Rules with actions that are impossible at the current step are
  2945. #    ignored. The first matching ssl_bump action wins and is applied at the
  2946. #    end of the current step. If no rules match, the splice action is used.
  2947. #    See the at_step ACL for a list of the supported SslBump steps.
  2948. #
  2949. #    This clause supports both fast and slow acl types.
  2950. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  2951. #
  2952. #    See also: http_port ssl-bump, https_port ssl-bump, and acl at_step.
  2953. #
  2954. #
  2955. #    # Example: Bump all TLS connections except those originating from
  2956. #    # localhost or those going to example.com.
  2957. #
  2958. #    acl broken_sites ssl::server_name .example.com
  2959. #    ssl_bump splice localhost
  2960. #    ssl_bump splice broken_sites
  2961. #    ssl_bump bump all
  2962. #Default:
  2963. # Become a TCP tunnel without decrypting proxied traffic.
  2964.  
  2965. #  TAG: sslproxy_cert_error
  2966. # Note: This option is only available if Squid is rebuilt with the
  2967. #       --with-openssl
  2968. #
  2969. #    Use this ACL to bypass server certificate validation errors.
  2970. #
  2971. #    For example, the following lines will bypass all validation errors
  2972. #    when talking to servers for example.com. All other
  2973. #    validation errors will result in ERR_SECURE_CONNECT_FAIL error.
  2974. #
  2975. #        acl BrokenButTrustedServers dstdomain example.com
  2976. #        sslproxy_cert_error allow BrokenButTrustedServers
  2977. #        sslproxy_cert_error deny all
  2978. #
  2979. #    This clause only supports fast acl types.
  2980. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  2981. #    Using slow acl types may result in server crashes
  2982. #
  2983. #    Without this option, all server certificate validation errors
  2984. #    terminate the transaction to protect Squid and the client.
  2985. #
  2986. #    SQUID_X509_V_ERR_INFINITE_VALIDATION error cannot be bypassed
  2987. #    but should not happen unless your OpenSSL library is buggy.
  2988. #
  2989. #    SECURITY WARNING:
  2990. #        Bypassing validation errors is dangerous because an
  2991. #        error usually implies that the server cannot be trusted
  2992. #        and the connection may be insecure.
  2993. #
  2994. #    See also: sslproxy_flags and DONT_VERIFY_PEER.
  2995. #Default:
  2996. # Server certificate errors terminate the transaction.
  2997.  
  2998. #  TAG: sslproxy_cert_sign
  2999. # Note: This option is only available if Squid is rebuilt with the
  3000. #       --with-openssl
  3001. #
  3002. #
  3003. #        sslproxy_cert_sign <signing algorithm> acl ...
  3004. #
  3005. #        The following certificate signing algorithms are supported:
  3006. #
  3007. #       signTrusted
  3008. #        Sign using the configured CA certificate which is usually
  3009. #        placed in and trusted by end-user browsers. This is the
  3010. #        default for trusted origin server certificates.
  3011. #
  3012. #       signUntrusted
  3013. #        Sign to guarantee an X509_V_ERR_CERT_UNTRUSTED browser error.
  3014. #        This is the default for untrusted origin server certificates
  3015. #        that are not self-signed (see ssl::certUntrusted).
  3016. #
  3017. #       signSelf
  3018. #        Sign using a self-signed certificate with the right CN to
  3019. #        generate a X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT error in the
  3020. #        browser. This is the default for self-signed origin server
  3021. #        certificates (see ssl::certSelfSigned).
  3022. #
  3023. #    This clause only supports fast acl types.
  3024. #
  3025. #    When sslproxy_cert_sign acl(s) match, Squid uses the corresponding
  3026. #    signing algorithm to generate the certificate and ignores all
  3027. #    subsequent sslproxy_cert_sign options (the first match wins). If no
  3028. #    acl(s) match, the default signing algorithm is determined by errors
  3029. #    detected when obtaining and validating the origin server certificate.
  3030. #
  3031. #    WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can
  3032. #    be used with sslproxy_cert_adapt, but if and only if Squid is bumping a
  3033. #    CONNECT request that carries a domain name. In all other cases (CONNECT
  3034. #    to an IP address or an intercepted SSL connection), Squid cannot detect
  3035. #    the domain mismatch at certificate generation time when
  3036. #    bump-server-first is used.
  3037. #Default:
  3038. # none
  3039.  
  3040. #  TAG: sslproxy_cert_adapt
  3041. # Note: This option is only available if Squid is rebuilt with the
  3042. #       --with-openssl
  3043. #
  3044. #
  3045. #    sslproxy_cert_adapt <adaptation algorithm> acl ...
  3046. #
  3047. #    The following certificate adaptation algorithms are supported:
  3048. #
  3049. #       setValidAfter
  3050. #        Sets the "Not After" property to the "Not After" property of
  3051. #        the CA certificate used to sign generated certificates.
  3052. #
  3053. #       setValidBefore
  3054. #        Sets the "Not Before" property to the "Not Before" property of
  3055. #        the CA certificate used to sign generated certificates.
  3056. #
  3057. #       setCommonName or setCommonName{CN}
  3058. #        Sets Subject.CN property to the host name specified as a
  3059. #        CN parameter or, if no explicit CN parameter was specified,
  3060. #        extracted from the CONNECT request. It is a misconfiguration
  3061. #        to use setCommonName without an explicit parameter for
  3062. #        intercepted or tproxied SSL connections.
  3063. #
  3064. #    This clause only supports fast acl types.
  3065. #
  3066. #    Squid first groups sslproxy_cert_adapt options by adaptation algorithm.
  3067. #    Within a group, when sslproxy_cert_adapt acl(s) match, Squid uses the
  3068. #    corresponding adaptation algorithm to generate the certificate and
  3069. #    ignores all subsequent sslproxy_cert_adapt options in that algorithm's
  3070. #    group (i.e., the first match wins within each algorithm group). If no
  3071. #    acl(s) match, the default mimicking action takes place.
  3072. #
  3073. #    WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can
  3074. #    be used with sslproxy_cert_adapt, but if and only if Squid is bumping a
  3075. #    CONNECT request that carries a domain name. In all other cases (CONNECT
  3076. #    to an IP address or an intercepted SSL connection), Squid cannot detect
  3077. #    the domain mismatch at certificate generation time when
  3078. #    bump-server-first is used.
  3079. #Default:
  3080. # none
  3081.  
  3082. #  TAG: sslpassword_program
  3083. # Note: This option is only available if Squid is rebuilt with the
  3084. #       --with-openssl
  3085. #
  3086. #    Specify a program used for entering SSL key passphrases
  3087. #    when using encrypted SSL certificate keys. If not specified
  3088. #    keys must either be unencrypted, or Squid started with the -N
  3089. #    option to allow it to query interactively for the passphrase.
  3090. #
  3091. #    The key file name is given as argument to the program allowing
  3092. #    selection of the right password if you have multiple encrypted
  3093. #    keys.
  3094. #Default:
  3095. # none
  3096.  
  3097. # OPTIONS RELATING TO EXTERNAL SSL_CRTD
  3098. # -----------------------------------------------------------------------------
  3099.  
  3100. #  TAG: sslcrtd_program
  3101. # Note: This option is only available if Squid is rebuilt with the
  3102. #       --enable-ssl-crtd
  3103. #
  3104. #    Specify the location and options of the executable for certificate
  3105. #    generator.
  3106. #
  3107. #    /usr/lib/squid/security_file_certgen program can use a disk cache to improve response
  3108. #    times on repeated requests. To enable caching, specify -s and -M
  3109. #    parameters. If those parameters are not given, the program generates
  3110. #    a new certificate on every request.
  3111. #
  3112. #    For more information use:
  3113. #        /usr/lib/squid/security_file_certgen -h
  3114. #Default:
  3115. # sslcrtd_program /usr/lib/squid/security_file_certgen -s /var/spool/squid/ssl_db -M 4MB
  3116.  
  3117. #  TAG: sslcrtd_children
  3118. # Note: This option is only available if Squid is rebuilt with the
  3119. #       --enable-ssl-crtd
  3120. #
  3121. #    Specifies the maximum number of certificate generation processes that
  3122. #    Squid may spawn (numberofchildren) and several related options. Using
  3123. #    too few of these helper processes (a.k.a. "helpers") creates request
  3124. #    queues. Using too many helpers wastes your system resources. Squid
  3125. #    does not support spawning more than 32 helpers.
  3126. #
  3127. #    Usage: numberofchildren [option]...
  3128. #
  3129. #    The startup= and idle= options allow some measure of skew in your
  3130. #    tuning.
  3131. #
  3132. #        startup=N
  3133. #
  3134. #    Sets the minimum number of processes to spawn when Squid
  3135. #    starts or reconfigures. When set to zero the first request will
  3136. #    cause spawning of the first child process to handle it.
  3137. #
  3138. #    Starting too few children temporary slows Squid under load while it
  3139. #    tries to spawn enough additional processes to cope with traffic.
  3140. #
  3141. #        idle=N
  3142. #
  3143. #    Sets a minimum of how many processes Squid is to try and keep available
  3144. #    at all times. When traffic begins to rise above what the existing
  3145. #    processes can handle this many more will be spawned up to the maximum
  3146. #    configured. A minimum setting of 1 is required.
  3147. #
  3148. #        queue-size=N
  3149. #
  3150. #    Sets the maximum number of queued requests. A request is queued when
  3151. #    no existing child is idle and no new child can be started due to
  3152. #    numberofchildren limit. If the queued requests exceed queue size for
  3153. #    more than 3 minutes squid aborts its operation. The default value is
  3154. #    set to 2*numberofchildren.
  3155. #
  3156. #    You must have at least one ssl_crtd process.
  3157. #Default:
  3158. # sslcrtd_children 32 startup=5 idle=1
  3159.  
  3160. #  TAG: sslcrtvalidator_program
  3161. # Note: This option is only available if Squid is rebuilt with the
  3162. #       --with-openssl
  3163. #
  3164. #    Specify the location and options of the executable for ssl_crt_validator
  3165. #    process.
  3166. #
  3167. #    Usage:  sslcrtvalidator_program [ttl=n] [cache=n] path ...
  3168. #
  3169. #    Options:
  3170. #      ttl=n         TTL in seconds for cached results. The default is 60 secs
  3171. #      cache=n       limit the result cache size. The default value is 2048
  3172. #Default:
  3173. # none
  3174.  
  3175. #  TAG: sslcrtvalidator_children
  3176. # Note: This option is only available if Squid is rebuilt with the
  3177. #       --with-openssl
  3178. #
  3179. #    Specifies the maximum number of certificate validation processes that
  3180. #    Squid may spawn (numberofchildren) and several related options. Using
  3181. #    too few of these helper processes (a.k.a. "helpers") creates request
  3182. #    queues. Using too many helpers wastes your system resources. Squid
  3183. #    does not support spawning more than 32 helpers.
  3184. #
  3185. #    Usage: numberofchildren [option]...
  3186. #
  3187. #    The startup= and idle= options allow some measure of skew in your
  3188. #    tuning.
  3189. #
  3190. #        startup=N
  3191. #
  3192. #    Sets the minimum number of processes to spawn when Squid
  3193. #    starts or reconfigures. When set to zero the first request will
  3194. #    cause spawning of the first child process to handle it.
  3195. #
  3196. #    Starting too few children temporary slows Squid under load while it
  3197. #    tries to spawn enough additional processes to cope with traffic.
  3198. #
  3199. #        idle=N
  3200. #
  3201. #    Sets a minimum of how many processes Squid is to try and keep available
  3202. #    at all times. When traffic begins to rise above what the existing
  3203. #    processes can handle this many more will be spawned up to the maximum
  3204. #    configured. A minimum setting of 1 is required.
  3205. #
  3206. #        concurrency=
  3207. #
  3208. #    The number of requests each certificate validator helper can handle in
  3209. #    parallel. A value of 0 indicates the certficate validator does not
  3210. #    support concurrency. Defaults to 1.
  3211. #
  3212. #    When this directive is set to a value >= 1 then the protocol
  3213. #    used to communicate with the helper is modified to include
  3214. #    a request ID in front of the request/response. The request
  3215. #    ID from the request must be echoed back with the response
  3216. #    to that request.
  3217. #
  3218. #        queue-size=N
  3219. #
  3220. #    Sets the maximum number of queued requests. A request is queued when
  3221. #    no existing child can accept it due to concurrency limit and no new
  3222. #    child can be started due to numberofchildren limit. If the queued
  3223. #    requests exceed queue size for more than 3 minutes squid aborts its
  3224. #    operation. The default value is set to 2*numberofchildren.
  3225. #
  3226. #    You must have at least one ssl_crt_validator process.
  3227. #Default:
  3228. # sslcrtvalidator_children 32 startup=5 idle=1 concurrency=1
  3229.  
  3230. # OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
  3231. # -----------------------------------------------------------------------------
  3232.  
  3233. #  TAG: cache_peer
  3234. #    To specify other caches in a hierarchy, use the format:
  3235. #
  3236. #        cache_peer hostname type http-port icp-port [options]
  3237. #
  3238. #    For example,
  3239. #
  3240. #    #                                        proxy  icp
  3241. #    #          hostname             type     port   port  options
  3242. #    #          -------------------- -------- ----- -----  -----------
  3243. #    cache_peer parent.foo.net       parent    3128  3130  default
  3244. #    cache_peer sib1.foo.net         sibling   3128  3130  proxy-only
  3245. #    cache_peer sib2.foo.net         sibling   3128  3130  proxy-only
  3246. #    cache_peer example.com          parent    80       0  default
  3247. #    cache_peer cdn.example.com      sibling   3128     0
  3248. #
  3249. #          type:    either 'parent', 'sibling', or 'multicast'.
  3250. #
  3251. #    proxy-port:    The port number where the peer accept HTTP requests.
  3252. #            For other Squid proxies this is usually 3128
  3253. #            For web servers this is usually 80
  3254. #
  3255. #      icp-port:    Used for querying neighbor caches about objects.
  3256. #            Set to 0 if the peer does not support ICP or HTCP.
  3257. #            See ICP and HTCP options below for additional details.
  3258. #
  3259. #
  3260. #    ==== ICP OPTIONS ====
  3261. #
  3262. #    You MUST also set icp_port and icp_access explicitly when using these options.
  3263. #    The defaults will prevent peer traffic using ICP.
  3264. #
  3265. #
  3266. #    no-query    Disable ICP queries to this neighbor.
  3267. #
  3268. #    multicast-responder
  3269. #            Indicates the named peer is a member of a multicast group.
  3270. #            ICP queries will not be sent directly to the peer, but ICP
  3271. #            replies will be accepted from it.
  3272. #
  3273. #    closest-only    Indicates that, for ICP_OP_MISS replies, we'll only forward
  3274. #            CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes.
  3275. #
  3276. #    background-ping
  3277. #            To only send ICP queries to this neighbor infrequently.
  3278. #            This is used to keep the neighbor round trip time updated
  3279. #            and is usually used in conjunction with weighted-round-robin.
  3280. #
  3281. #
  3282. #    ==== HTCP OPTIONS ====
  3283. #
  3284. #    You MUST also set htcp_port and htcp_access explicitly when using these options.
  3285. #    The defaults will prevent peer traffic using HTCP.
  3286. #
  3287. #
  3288. #    htcp        Send HTCP, instead of ICP, queries to the neighbor.
  3289. #            You probably also want to set the "icp-port" to 4827
  3290. #            instead of 3130. This directive accepts a comma separated
  3291. #            list of options described below.
  3292. #
  3293. #    htcp=oldsquid    Send HTCP to old Squid versions (2.5 or earlier).
  3294. #
  3295. #    htcp=no-clr    Send HTCP to the neighbor but without
  3296. #            sending any CLR requests.  This cannot be used with
  3297. #            only-clr.
  3298. #
  3299. #    htcp=only-clr    Send HTCP to the neighbor but ONLY CLR requests.
  3300. #            This cannot be used with no-clr.
  3301. #
  3302. #    htcp=no-purge-clr
  3303. #            Send HTCP to the neighbor including CLRs but only when
  3304. #            they do not result from PURGE requests.
  3305. #
  3306. #    htcp=forward-clr
  3307. #            Forward any HTCP CLR requests this proxy receives to the peer.
  3308. #
  3309. #
  3310. #    ==== PEER SELECTION METHODS ====
  3311. #
  3312. #    The default peer selection method is ICP, with the first responding peer
  3313. #    being used as source. These options can be used for better load balancing.
  3314. #
  3315. #
  3316. #    default        This is a parent cache which can be used as a "last-resort"
  3317. #            if a peer cannot be located by any of the peer-selection methods.
  3318. #            If specified more than once, only the first is used.
  3319. #
  3320. #    round-robin    Load-Balance parents which should be used in a round-robin
  3321. #            fashion in the absence of any ICP queries.
  3322. #            weight=N can be used to add bias.
  3323. #
  3324. #    weighted-round-robin
  3325. #            Load-Balance parents which should be used in a round-robin
  3326. #            fashion with the frequency of each parent being based on the
  3327. #            round trip time. Closer parents are used more often.
  3328. #            Usually used for background-ping parents.
  3329. #            weight=N can be used to add bias.
  3330. #
  3331. #    carp        Load-Balance parents which should be used as a CARP array.
  3332. #            The requests will be distributed among the parents based on the
  3333. #            CARP load balancing hash function based on their weight.
  3334. #
  3335. #    userhash    Load-balance parents based on the client proxy_auth or ident username.
  3336. #
  3337. #    sourcehash    Load-balance parents based on the client source IP.
  3338. #
  3339. #    multicast-siblings
  3340. #            To be used only for cache peers of type "multicast".
  3341. #            ALL members of this multicast group have "sibling"
  3342. #            relationship with it, not "parent".  This is to a multicast
  3343. #            group when the requested object would be fetched only from
  3344. #            a "parent" cache, anyway.  It's useful, e.g., when
  3345. #            configuring a pool of redundant Squid proxies, being
  3346. #            members of the same multicast group.
  3347. #
  3348. #
  3349. #    ==== PEER SELECTION OPTIONS ====
  3350. #
  3351. #    weight=N    use to affect the selection of a peer during any weighted
  3352. #            peer-selection mechanisms.
  3353. #            The weight must be an integer; default is 1,
  3354. #            larger weights are favored more.
  3355. #            This option does not affect parent selection if a peering
  3356. #            protocol is not in use.
  3357. #
  3358. #    basetime=N    Specify a base amount to be subtracted from round trip
  3359. #            times of parents.
  3360. #            It is subtracted before division by weight in calculating
  3361. #            which parent to fectch from. If the rtt is less than the
  3362. #            base time the rtt is set to a minimal value.
  3363. #
  3364. #    ttl=N        Specify a TTL to use when sending multicast ICP queries
  3365. #            to this address.
  3366. #            Only useful when sending to a multicast group.
  3367. #            Because we don't accept ICP replies from random
  3368. #            hosts, you must configure other group members as
  3369. #            peers with the 'multicast-responder' option.
  3370. #
  3371. #    no-delay    To prevent access to this neighbor from influencing the
  3372. #            delay pools.
  3373. #
  3374. #    digest-url=URL    Tell Squid to fetch the cache digest (if digests are
  3375. #            enabled) for this host from the specified URL rather
  3376. #            than the Squid default location.
  3377. #
  3378. #
  3379. #    ==== CARP OPTIONS ====
  3380. #
  3381. #    carp-key=key-specification
  3382. #            use a different key than the full URL to hash against the peer.
  3383. #            the key-specification is a comma-separated list of the keywords
  3384. #            scheme, host, port, path, params
  3385. #            Order is not important.
  3386. #
  3387. #    ==== ACCELERATOR / REVERSE-PROXY OPTIONS ====
  3388. #
  3389. #    originserver    Causes this parent to be contacted as an origin server.
  3390. #            Meant to be used in accelerator setups when the peer
  3391. #            is a web server.
  3392. #
  3393. #    forceddomain=name
  3394. #            Set the Host header of requests forwarded to this peer.
  3395. #            Useful in accelerator setups where the server (peer)
  3396. #            expects a certain domain name but clients may request
  3397. #            others. ie example.com or www.example.com
  3398. #
  3399. #    no-digest    Disable request of cache digests.
  3400. #
  3401. #    no-netdb-exchange
  3402. #            Disables requesting ICMP RTT database (NetDB).
  3403. #
  3404. #
  3405. #    ==== AUTHENTICATION OPTIONS ====
  3406. #
  3407. #    login=user:password
  3408. #            If this is a personal/workgroup proxy and your parent
  3409. #            requires proxy authentication.
  3410. #
  3411. #            Note: The string can include URL escapes (i.e. %20 for
  3412. #            spaces). This also means % must be written as %%.
  3413. #
  3414. #    login=PASSTHRU
  3415. #            Send login details received from client to this peer.
  3416. #            Both Proxy- and WWW-Authorization headers are passed
  3417. #            without alteration to the peer.
  3418. #            Authentication is not required by Squid for this to work.
  3419. #
  3420. #            Note: This will pass any form of authentication but
  3421. #            only Basic auth will work through a proxy unless the
  3422. #            connection-auth options are also used.
  3423. #
  3424. #    login=PASS    Send login details received from client to this peer.
  3425. #            Authentication is not required by this option.
  3426. #
  3427. #            If there are no client-provided authentication headers
  3428. #            to pass on, but username and password are available
  3429. #            from an external ACL user= and password= result tags
  3430. #            they may be sent instead.
  3431. #
  3432. #            Note: To combine this with proxy_auth both proxies must
  3433. #            share the same user database as HTTP only allows for
  3434. #            a single login (one for proxy, one for origin server).
  3435. #            Also be warned this will expose your users proxy
  3436. #            password to the peer. USE WITH CAUTION
  3437. #
  3438. #    login=*:password
  3439. #            Send the username to the upstream cache, but with a
  3440. #            fixed password. This is meant to be used when the peer
  3441. #            is in another administrative domain, but it is still
  3442. #            needed to identify each user.
  3443. #            The star can optionally be followed by some extra
  3444. #            information which is added to the username. This can
  3445. #            be used to identify this proxy to the peer, similar to
  3446. #            the login=username:password option above.
  3447. #
  3448. #    login=NEGOTIATE
  3449. #            If this is a personal/workgroup proxy and your parent
  3450. #            requires a secure proxy authentication.
  3451. #            The first principal from the default keytab or defined by
  3452. #            the environment variable KRB5_KTNAME will be used.
  3453. #
  3454. #            WARNING: The connection may transmit requests from multiple
  3455. #            clients. Negotiate often assumes end-to-end authentication
  3456. #            and a single-client. Which is not strictly true here.
  3457. #
  3458. #    login=NEGOTIATE:principal_name
  3459. #            If this is a personal/workgroup proxy and your parent
  3460. #            requires a secure proxy authentication.
  3461. #            The principal principal_name from the default keytab or
  3462. #            defined by the environment variable KRB5_KTNAME will be
  3463. #            used.
  3464. #
  3465. #            WARNING: The connection may transmit requests from multiple
  3466. #            clients. Negotiate often assumes end-to-end authentication
  3467. #            and a single-client. Which is not strictly true here.
  3468. #
  3469. #    connection-auth=on|off
  3470. #            Tell Squid that this peer does or not support Microsoft
  3471. #            connection oriented authentication, and any such
  3472. #            challenges received from there should be ignored.
  3473. #            Default is auto to automatically determine the status
  3474. #            of the peer.
  3475. #
  3476. #    auth-no-keytab
  3477. #            Do not use a keytab to authenticate to a peer when
  3478. #            login=NEGOTIATE is specified. Let the GSSAPI
  3479. #            implementation determine which already existing
  3480. #            credentials cache to use instead.
  3481. #
  3482. #
  3483. #    ==== SSL / HTTPS / TLS OPTIONS ====
  3484. #
  3485. #    tls        Encrypt connections to this peer with TLS.
  3486. #
  3487. #    sslcert=/path/to/ssl/certificate
  3488. #            A client X.509 certificate to use when connecting to
  3489. #            this peer.
  3490. #
  3491. #    sslkey=/path/to/ssl/key
  3492. #            The private key corresponding to sslcert above.
  3493. #
  3494. #            If sslkey= is not specified sslcert= is assumed to
  3495. #            reference a PEM file containing both the certificate
  3496. #            and private key.
  3497. #
  3498. #    Notes:
  3499. #
  3500. #    On Debian/Ubuntu systems a default snakeoil certificate is
  3501. #    available in /etc/ssl and users can set:
  3502. #
  3503. #        sslcert=/etc/ssl/certs/ssl-cert-snakeoil.pem
  3504. #
  3505. #    and
  3506. #
  3507. #        sslkey=/etc/ssl/private/ssl-cert-snakeoil.key
  3508. #
  3509. #    for testing.
  3510. #
  3511. #    sslcipher=...    The list of valid SSL ciphers to use when connecting
  3512. #            to this peer.
  3513. #
  3514. #    tls-min-version=1.N
  3515. #            The minimum TLS protocol version to permit. To control
  3516. #            SSLv3 use the tls-options= parameter.
  3517. #            Supported Values: 1.0 (default), 1.1, 1.2
  3518. #
  3519. #    tls-options=...    Specify various TLS implementation options.
  3520. #
  3521. #            OpenSSL options most important are:
  3522. #
  3523. #                NO_SSLv3    Disallow the use of SSLv3
  3524. #
  3525. #                SINGLE_DH_USE
  3526. #                      Always create a new key when using
  3527. #                      temporary/ephemeral DH key exchanges
  3528. #
  3529. #                NO_TICKET
  3530. #                      Disable use of RFC5077 session tickets.
  3531. #                      Some servers may have problems
  3532. #                      understanding the TLS extension due
  3533. #                      to ambiguous specification in RFC4507.
  3534. #
  3535. #                ALL       Enable various bug workarounds
  3536. #                      suggested as "harmless" by OpenSSL
  3537. #                      Be warned that this reduces SSL/TLS
  3538. #                      strength to some attacks.
  3539. #
  3540. #            See the OpenSSL SSL_CTX_set_options documentation for a
  3541. #            more complete list.
  3542. #
  3543. #            GnuTLS options most important are:
  3544. #
  3545. #                %NO_TICKETS
  3546. #                      Disable use of RFC5077 session tickets.
  3547. #                      Some servers may have problems
  3548. #                      understanding the TLS extension due
  3549. #                      to ambiguous specification in RFC4507.
  3550. #
  3551. #                See the GnuTLS Priority Strings documentation
  3552. #                for a more complete list.
  3553. #                http://www.gnutls.org/manual/gnutls.html#Priority-Strings
  3554. #
  3555. #    tls-cafile=    PEM file containing CA certificates to use when verifying
  3556. #            the peer certificate. May be repeated to load multiple files.
  3557. #
  3558. #    sslcapath=...    A directory containing additional CA certificates to
  3559. #            use when verifying the peer certificate.
  3560. #            Requires OpenSSL or LibreSSL.
  3561. #
  3562. #    sslcrlfile=...     A certificate revocation list file to use when
  3563. #            verifying the peer certificate.
  3564. #
  3565. #    sslflags=...    Specify various flags modifying the SSL implementation:
  3566. #
  3567. #            DONT_VERIFY_PEER
  3568. #                Accept certificates even if they fail to
  3569. #                verify.
  3570. #
  3571. #            DONT_VERIFY_DOMAIN
  3572. #                Don't verify the peer certificate
  3573. #                matches the server name
  3574. #
  3575. #    ssldomain=     The peer name as advertised in it's certificate.
  3576. #            Used for verifying the correctness of the received peer
  3577. #            certificate. If not specified the peer hostname will be
  3578. #            used.
  3579. #
  3580. #    front-end-https[=off|on|auto]
  3581. #            Enable the "Front-End-Https: On" header needed when
  3582. #            using Squid as a SSL frontend in front of Microsoft OWA.
  3583. #            See MS KB document Q307347 for details on this header.
  3584. #            If set to auto the header will only be added if the
  3585. #            request is forwarded as a https:// URL.
  3586. #
  3587. #    tls-default-ca[=off]
  3588. #            Whether to use the system Trusted CAs. Default is ON.
  3589. #
  3590. #    tls-no-npn    Do not use the TLS NPN extension to advertise HTTP/1.1.
  3591. #
  3592. #    ==== GENERAL OPTIONS ====
  3593. #
  3594. #    connect-timeout=N
  3595. #            A peer-specific connect timeout.
  3596. #            Also see the peer_connect_timeout directive.
  3597. #
  3598. #    connect-fail-limit=N
  3599. #            How many times connecting to a peer must fail before
  3600. #            it is marked as down. Standby connection failures
  3601. #            count towards this limit. Default is 10.
  3602. #
  3603. #    allow-miss    Disable Squid's use of only-if-cached when forwarding
  3604. #            requests to siblings. This is primarily useful when
  3605. #            icp_hit_stale is used by the sibling. Excessive use
  3606. #            of this option may result in forwarding loops. One way
  3607. #            to prevent peering loops when using this option, is to
  3608. #            deny cache peer usage on requests from a peer:
  3609. #            acl fromPeer ...
  3610. #            cache_peer_access peerName deny fromPeer
  3611. #
  3612. #    max-conn=N     Limit the number of concurrent connections the Squid
  3613. #            may open to this peer, including already opened idle
  3614. #            and standby connections. There is no peer-specific
  3615. #            connection limit by default.
  3616. #
  3617. #            A peer exceeding the limit is not used for new
  3618. #            requests unless a standby connection is available.
  3619. #
  3620. #            max-conn currently works poorly with idle persistent
  3621. #            connections: When a peer reaches its max-conn limit,
  3622. #            and there are idle persistent connections to the peer,
  3623. #            the peer may not be selected because the limiting code
  3624. #            does not know whether Squid can reuse those idle
  3625. #            connections.
  3626. #
  3627. #    standby=N    Maintain a pool of N "hot standby" connections to an
  3628. #            UP peer, available for requests when no idle
  3629. #            persistent connection is available (or safe) to use.
  3630. #            By default and with zero N, no such pool is maintained.
  3631. #            N must not exceed the max-conn limit (if any).
  3632. #
  3633. #            At start or after reconfiguration, Squid opens new TCP
  3634. #            standby connections until there are N connections
  3635. #            available and then replenishes the standby pool as
  3636. #            opened connections are used up for requests. A used
  3637. #            connection never goes back to the standby pool, but
  3638. #            may go to the regular idle persistent connection pool
  3639. #            shared by all peers and origin servers.
  3640. #
  3641. #            Squid never opens multiple new standby connections
  3642. #            concurrently.  This one-at-a-time approach minimizes
  3643. #            flooding-like effect on peers. Furthermore, just a few
  3644. #            standby connections should be sufficient in most cases
  3645. #            to supply most new requests with a ready-to-use
  3646. #            connection.
  3647. #
  3648. #            Standby connections obey server_idle_pconn_timeout.
  3649. #            For the feature to work as intended, the peer must be
  3650. #            configured to accept and keep them open longer than
  3651. #            the idle timeout at the connecting Squid, to minimize
  3652. #            race conditions typical to idle used persistent
  3653. #            connections. Default request_timeout and
  3654. #            server_idle_pconn_timeout values ensure such a
  3655. #            configuration.
  3656. #
  3657. #    name=xxx    Unique name for the peer.
  3658. #            Required if you have multiple peers on the same host
  3659. #            but different ports.
  3660. #            This name can be used in cache_peer_access and similar
  3661. #            directives to identify the peer.
  3662. #            Can be used by outgoing access controls through the
  3663. #            peername ACL type.
  3664. #
  3665. #    no-tproxy    Do not use the client-spoof TPROXY support when forwarding
  3666. #            requests to this peer. Use normal address selection instead.
  3667. #            This overrides the spoof_client_ip ACL.
  3668. #
  3669. #    proxy-only    objects fetched from the peer will not be stored locally.
  3670. #
  3671. #Default:
  3672. # none
  3673.  
  3674. #  TAG: cache_peer_access
  3675. #    Restricts usage of cache_peer proxies.
  3676. #
  3677. #    Usage:
  3678. #        cache_peer_access peer-name allow|deny [!]aclname ...
  3679. #
  3680. #    For the required peer-name parameter, use either the value of the
  3681. #    cache_peer name=value parameter or, if name=value is missing, the
  3682. #    cache_peer hostname parameter.
  3683. #
  3684. #    This directive narrows down the selection of peering candidates, but
  3685. #    does not determine the order in which the selected candidates are
  3686. #    contacted. That order is determined by the peer selection algorithms
  3687. #    (see PEER SELECTION sections in the cache_peer documentation).
  3688. #
  3689. #    If a deny rule matches, the corresponding peer will not be contacted
  3690. #    for the current transaction -- Squid will not send ICP queries and
  3691. #    will not forward HTTP requests to that peer. An allow match leaves
  3692. #    the corresponding peer in the selection. The first match for a given
  3693. #    peer wins for that peer.
  3694. #
  3695. #    The relative order of cache_peer_access directives for the same peer
  3696. #    matters. The relative order of any two cache_peer_access directives
  3697. #    for different peers does not matter. To ease interpretation, it is a
  3698. #    good idea to group cache_peer_access directives for the same peer
  3699. #    together.
  3700. #
  3701. #    A single cache_peer_access directive may be evaluated multiple times
  3702. #    for a given transaction because individual peer selection algorithms
  3703. #    may check it independently from each other. These redundant checks
  3704. #    may be optimized away in future Squid versions.
  3705. #
  3706. #    This clause only supports fast acl types.
  3707. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  3708. #
  3709. #Default:
  3710. # No peer usage restrictions.
  3711.  
  3712. #  TAG: neighbor_type_domain
  3713. #    Modify the cache_peer neighbor type when passing requests
  3714. #    about specific domains to the peer.
  3715. #
  3716. #    Usage:
  3717. #         neighbor_type_domain neighbor parent|sibling domain domain ...
  3718. #
  3719. #    For example:
  3720. #        cache_peer foo.example.com parent 3128 3130
  3721. #        neighbor_type_domain foo.example.com sibling .au .de
  3722. #
  3723. #    The above configuration treats all requests to foo.example.com as a
  3724. #    parent proxy unless the request is for a .au or .de ccTLD domain name.
  3725. #Default:
  3726. # The peer type from cache_peer directive is used for all requests to that peer.
  3727.  
  3728. #  TAG: dead_peer_timeout    (seconds)
  3729. #    This controls how long Squid waits to declare a peer cache
  3730. #    as "dead."  If there are no ICP replies received in this
  3731. #    amount of time, Squid will declare the peer dead and not
  3732. #    expect to receive any further ICP replies.  However, it
  3733. #    continues to send ICP queries, and will mark the peer as
  3734. #    alive upon receipt of the first subsequent ICP reply.
  3735. #
  3736. #    This timeout also affects when Squid expects to receive ICP
  3737. #    replies from peers.  If more than 'dead_peer' seconds have
  3738. #    passed since the last ICP reply was received, Squid will not
  3739. #    expect to receive an ICP reply on the next query.  Thus, if
  3740. #    your time between requests is greater than this timeout, you
  3741. #    will see a lot of requests sent DIRECT to origin servers
  3742. #    instead of to your parents.
  3743. #Default:
  3744. # dead_peer_timeout 10 seconds
  3745.  
  3746. #  TAG: forward_max_tries
  3747. #    Limits the number of attempts to forward the request.
  3748. #
  3749. #    For the purpose of this limit, Squid counts all high-level request
  3750. #    forwarding attempts, including any same-destination retries after
  3751. #    certain persistent connection failures and any attempts to use a
  3752. #    different peer. However, low-level connection reopening attempts
  3753. #    (enabled using connect_retries) are not counted.
  3754. #
  3755. #    See also: forward_timeout and connect_retries.
  3756. #Default:
  3757. # forward_max_tries 25
  3758.  
  3759. # MEMORY CACHE OPTIONS
  3760. # -----------------------------------------------------------------------------
  3761.  
  3762. #  TAG: cache_mem    (bytes)
  3763. #    NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
  3764. #    IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
  3765. #    USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
  3766. #    THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
  3767. #
  3768. #    'cache_mem' specifies the ideal amount of memory to be used
  3769. #    for:
  3770. #        * In-Transit objects
  3771. #        * Hot Objects
  3772. #        * Negative-Cached objects
  3773. #
  3774. #    Data for these objects are stored in 4 KB blocks.  This
  3775. #    parameter specifies the ideal upper limit on the total size of
  3776. #    4 KB blocks allocated.  In-Transit objects take the highest
  3777. #    priority.
  3778. #
  3779. #    In-transit objects have priority over the others.  When
  3780. #    additional space is needed for incoming data, negative-cached
  3781. #    and hot objects will be released.  In other words, the
  3782. #    negative-cached and hot objects will fill up any unused space
  3783. #    not needed for in-transit objects.
  3784. #
  3785. #    If circumstances require, this limit will be exceeded.
  3786. #    Specifically, if your incoming request rate requires more than
  3787. #    'cache_mem' of memory to hold in-transit objects, Squid will
  3788. #    exceed this limit to satisfy the new requests.  When the load
  3789. #    decreases, blocks will be freed until the high-water mark is
  3790. #    reached.  Thereafter, blocks will be used to store hot
  3791. #    objects.
  3792. #
  3793. #    If shared memory caching is enabled, Squid does not use the shared
  3794. #    cache space for in-transit objects, but they still consume as much
  3795. #    local memory as they need. For more details about the shared memory
  3796. #    cache, see memory_cache_shared.
  3797. #Default:
  3798. # cache_mem 256 MB
  3799.  
  3800. #  TAG: maximum_object_size_in_memory    (bytes)
  3801. #    Objects greater than this size will not be attempted to kept in
  3802. #    the memory cache. This should be set high enough to keep objects
  3803. #    accessed frequently in memory to improve performance whilst low
  3804. #    enough to keep larger objects from hoarding cache_mem.
  3805. #Default:
  3806. # maximum_object_size_in_memory 768 KB
  3807.  
  3808. #  TAG: memory_cache_shared    on|off
  3809. #    Controls whether the memory cache is shared among SMP workers.
  3810. #
  3811. #    The shared memory cache is meant to occupy cache_mem bytes and replace
  3812. #    the non-shared memory cache, although some entities may still be
  3813. #    cached locally by workers for now (e.g., internal and in-transit
  3814. #    objects may be served from a local memory cache even if shared memory
  3815. #    caching is enabled).
  3816. #
  3817. #    By default, the memory cache is shared if and only if all of the
  3818. #    following conditions are satisfied: Squid runs in SMP mode with
  3819. #    multiple workers, cache_mem is positive, and Squid environment
  3820. #    supports required IPC primitives (e.g., POSIX shared memory segments
  3821. #    and GCC-style atomic operations).
  3822. #
  3823. #    To avoid blocking locks, shared memory uses opportunistic algorithms
  3824. #    that do not guarantee that every cachable entity that could have been
  3825. #    shared among SMP workers will actually be shared.
  3826. #Default:
  3827. # "on" where supported if doing memory caching with multiple SMP workers.
  3828.  
  3829. #  TAG: memory_cache_mode disk
  3830. #    Controls which objects to keep in the memory cache (cache_mem)
  3831. #
  3832. #    always    Keep most recently fetched objects in memory (default)
  3833. #
  3834. #    disk    Only disk cache hits are kept in memory, which means
  3835. #        an object must first be cached on disk and then hit
  3836. #        a second time before cached in memory.
  3837. #
  3838. #    network    Only objects fetched from network is kept in memory
  3839. #Default:
  3840. # Keep the most recently fetched objects in memory
  3841.  
  3842. #  TAG: memory_replacement_policy
  3843. #    The memory replacement policy parameter determines which
  3844. #    objects are purged from memory when memory space is needed.
  3845. #
  3846. #    See cache_replacement_policy for details on algorithms.
  3847. #Default:
  3848. # memory_replacement_policy lru
  3849.  
  3850. # DISK CACHE OPTIONS
  3851. # -----------------------------------------------------------------------------
  3852.  
  3853. #  TAG: cache_replacement_policy
  3854. #    The cache replacement policy parameter determines which
  3855. #    objects are evicted (replaced) when disk space is needed.
  3856. #
  3857. #        lru       : Squid's original list based LRU policy
  3858. #        heap GDSF : Greedy-Dual Size Frequency
  3859. #        heap LFUDA: Least Frequently Used with Dynamic Aging
  3860. #        heap LRU  : LRU policy implemented using a heap
  3861. #
  3862. #    Applies to any cache_dir lines listed below this directive.
  3863. #
  3864. #    The LRU policies keeps recently referenced objects.
  3865. #
  3866. #    The heap GDSF policy optimizes object hit rate by keeping smaller
  3867. #    popular objects in cache so it has a better chance of getting a
  3868. #    hit.  It achieves a lower byte hit rate than LFUDA though since
  3869. #    it evicts larger (possibly popular) objects.
  3870. #
  3871. #    The heap LFUDA policy keeps popular objects in cache regardless of
  3872. #    their size and thus optimizes byte hit rate at the expense of
  3873. #    hit rate since one large, popular object will prevent many
  3874. #    smaller, slightly less popular objects from being cached.
  3875. #
  3876. #    Both policies utilize a dynamic aging mechanism that prevents
  3877. #    cache pollution that can otherwise occur with frequency-based
  3878. #    replacement policies.
  3879. #
  3880. #    NOTE: if using the LFUDA replacement policy you should increase
  3881. #    the value of maximum_object_size above its default of 4 MB to
  3882. #    to maximize the potential byte hit rate improvement of LFUDA.
  3883. #
  3884. #    For more information about the GDSF and LFUDA cache replacement
  3885. #    policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
  3886. #    and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
  3887. #Default:
  3888. # cache_replacement_policy lru
  3889.  
  3890. #  TAG: minimum_object_size    (bytes)
  3891. #    Objects smaller than this size will NOT be saved on disk.  The
  3892. #    value is specified in bytes, and the default is 0 KB, which
  3893. #    means all responses can be stored.
  3894. #Default:
  3895. # no limit
  3896.  
  3897. #  TAG: maximum_object_size    (bytes)
  3898. #    Set the default value for max-size parameter on any cache_dir.
  3899. #    The value is specified in bytes, and the default is 4 MB.
  3900. #
  3901. #    If you wish to get a high BYTES hit ratio, you should probably
  3902. #    increase this (one 32 MB object hit counts for 3200 10KB
  3903. #    hits).
  3904. #
  3905. #    If you wish to increase hit ratio more than you want to
  3906. #    save bandwidth you should leave this low.
  3907. #
  3908. #    NOTE: if using the LFUDA replacement policy you should increase
  3909. #    this value to maximize the byte hit rate improvement of LFUDA!
  3910. #    See cache_replacement_policy for a discussion of this policy.
  3911. #Default:
  3912. # maximum_object_size 4 MB
  3913.  
  3914. #  TAG: cache_dir
  3915. #    Format:
  3916. #        cache_dir Type Directory-Name Fs-specific-data [options]
  3917. #
  3918. #    You can specify multiple cache_dir lines to spread the
  3919. #    cache among different disk partitions.
  3920. #
  3921. #    Type specifies the kind of storage system to use. Only "ufs"
  3922. #    is built by default. To enable any of the other storage systems
  3923. #    see the --enable-storeio configure option.
  3924. #
  3925. #    'Directory' is a top-level directory where cache swap
  3926. #    files will be stored.  If you want to use an entire disk
  3927. #    for caching, this can be the mount-point directory.
  3928. #    The directory must exist and be writable by the Squid
  3929. #    process.  Squid will NOT create this directory for you.
  3930. #
  3931. #    In SMP configurations, cache_dir must not precede the workers option
  3932. #    and should use configuration macros or conditionals to give each
  3933. #    worker interested in disk caching a dedicated cache directory.
  3934. #
  3935. #
  3936. #    ====  The ufs store type  ====
  3937. #
  3938. #    "ufs" is the old well-known Squid storage format that has always
  3939. #    been there.
  3940. #
  3941. #    Usage:
  3942. #        cache_dir ufs Directory-Name Mbytes L1 L2 [options]
  3943. #
  3944. #    'Mbytes' is the amount of disk space (MB) to use under this
  3945. #    directory.  The default is 100 MB.  Change this to suit your
  3946. #    configuration.  Do NOT put the size of your disk drive here.
  3947. #    Instead, if you want Squid to use the entire disk drive,
  3948. #    subtract 20% and use that value.
  3949. #
  3950. #    'L1' is the number of first-level subdirectories which
  3951. #    will be created under the 'Directory'.  The default is 16.
  3952. #
  3953. #    'L2' is the number of second-level subdirectories which
  3954. #    will be created under each first-level directory.  The default
  3955. #    is 256.
  3956. #
  3957. #
  3958. #    ====  The aufs store type  ====
  3959. #
  3960. #    "aufs" uses the same storage format as "ufs", utilizing
  3961. #    POSIX-threads to avoid blocking the main Squid process on
  3962. #    disk-I/O. This was formerly known in Squid as async-io.
  3963. #
  3964. #    Usage:
  3965. #        cache_dir aufs Directory-Name Mbytes L1 L2 [options]
  3966. #
  3967. #    see argument descriptions under ufs above
  3968. #
  3969. #
  3970. #    ====  The diskd store type  ====
  3971. #
  3972. #    "diskd" uses the same storage format as "ufs", utilizing a
  3973. #    separate process to avoid blocking the main Squid process on
  3974. #    disk-I/O.
  3975. #
  3976. #    Usage:
  3977. #        cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
  3978. #
  3979. #    see argument descriptions under ufs above
  3980. #
  3981. #    Q1 specifies the number of unacknowledged I/O requests when Squid
  3982. #    stops opening new files. If this many messages are in the queues,
  3983. #    Squid won't open new files. Default is 64
  3984. #
  3985. #    Q2 specifies the number of unacknowledged messages when Squid
  3986. #    starts blocking.  If this many messages are in the queues,
  3987. #    Squid blocks until it receives some replies. Default is 72
  3988. #
  3989. #    When Q1 < Q2 (the default), the cache directory is optimized
  3990. #    for lower response time at the expense of a decrease in hit
  3991. #    ratio.  If Q1 > Q2, the cache directory is optimized for
  3992. #    higher hit ratio at the expense of an increase in response
  3993. #    time.
  3994. #
  3995. #
  3996. #    ====  The rock store type  ====
  3997. #
  3998. #    Usage:
  3999. #        cache_dir rock Directory-Name Mbytes [options]
  4000. #
  4001. #    The Rock Store type is a database-style storage. All cached
  4002. #    entries are stored in a "database" file, using fixed-size slots.
  4003. #    A single entry occupies one or more slots.
  4004. #
  4005. #    If possible, Squid using Rock Store creates a dedicated kid
  4006. #    process called "disker" to avoid blocking Squid worker(s) on disk
  4007. #    I/O. One disker kid is created for each rock cache_dir.  Diskers
  4008. #    are created only when Squid, running in daemon mode, has support
  4009. #    for the IpcIo disk I/O module.
  4010. #
  4011. #    swap-timeout=msec: Squid will not start writing a miss to or
  4012. #    reading a hit from disk if it estimates that the swap operation
  4013. #    will take more than the specified number of milliseconds. By
  4014. #    default and when set to zero, disables the disk I/O time limit
  4015. #    enforcement. Ignored when using blocking I/O module because
  4016. #    blocking synchronous I/O does not allow Squid to estimate the
  4017. #    expected swap wait time.
  4018. #
  4019. #    max-swap-rate=swaps/sec: Artificially limits disk access using
  4020. #    the specified I/O rate limit. Swap out requests that
  4021. #    would cause the average I/O rate to exceed the limit are
  4022. #    delayed. Individual swap in requests (i.e., hits or reads) are
  4023. #    not delayed, but they do contribute to measured swap rate and
  4024. #    since they are placed in the same FIFO queue as swap out
  4025. #    requests, they may wait longer if max-swap-rate is smaller.
  4026. #    This is necessary on file systems that buffer "too
  4027. #    many" writes and then start blocking Squid and other processes
  4028. #    while committing those writes to disk.  Usually used together
  4029. #    with swap-timeout to avoid excessive delays and queue overflows
  4030. #    when disk demand exceeds available disk "bandwidth". By default
  4031. #    and when set to zero, disables the disk I/O rate limit
  4032. #    enforcement. Currently supported by IpcIo module only.
  4033. #
  4034. #    slot-size=bytes: The size of a database "record" used for
  4035. #    storing cached responses. A cached response occupies at least
  4036. #    one slot and all database I/O is done using individual slots so
  4037. #    increasing this parameter leads to more disk space waste while
  4038. #    decreasing it leads to more disk I/O overheads. Should be a
  4039. #    multiple of your operating system I/O page size. Defaults to
  4040. #    16KBytes. A housekeeping header is stored with each slot and
  4041. #    smaller slot-sizes will be rejected. The header is smaller than
  4042. #    100 bytes.
  4043. #
  4044. #
  4045. #    ==== COMMON OPTIONS ====
  4046. #
  4047. #    no-store    no new objects should be stored to this cache_dir.
  4048. #
  4049. #    min-size=n    the minimum object size in bytes this cache_dir
  4050. #            will accept.  It's used to restrict a cache_dir
  4051. #            to only store large objects (e.g. AUFS) while
  4052. #            other stores are optimized for smaller objects
  4053. #            (e.g. Rock).
  4054. #            Defaults to 0.
  4055. #
  4056. #    max-size=n    the maximum object size in bytes this cache_dir
  4057. #            supports.
  4058. #            The value in maximum_object_size directive sets
  4059. #            the default unless more specific details are
  4060. #            available (ie a small store capacity).
  4061. #
  4062. #    Note: To make optimal use of the max-size limits you should order
  4063. #    the cache_dir lines with the smallest max-size value first.
  4064. #
  4065. #Default:
  4066. # No disk cache. Store cache ojects only in memory.
  4067. #
  4068. #  TAG: store_dir_select_algorithm
  4069. #    How Squid selects which cache_dir to use when the response
  4070. #    object will fit into more than one.
  4071. #
  4072. #    Regardless of which algorithm is used the cache_dir min-size
  4073. #    and max-size parameters are obeyed. As such they can affect
  4074. #    the selection algorithm by limiting the set of considered
  4075. #    cache_dir.
  4076. #
  4077. #    Algorithms:
  4078. #
  4079. #        least-load
  4080. #
  4081. #    This algorithm is suited to caches with similar cache_dir
  4082. #    sizes and disk speeds.
  4083. #
  4084. #    The disk with the least I/O pending is selected.
  4085. #    When there are multiple disks with the same I/O load ranking
  4086. #    the cache_dir with most available capacity is selected.
  4087. #
  4088. #    When a mix of cache_dir sizes are configured the faster disks
  4089. #    have a naturally lower I/O loading and larger disks have more
  4090. #    capacity. So space used to store objects and data throughput
  4091. #    may be very unbalanced towards larger disks.
  4092. #
  4093. #
  4094. #        round-robin
  4095. #
  4096. #    This algorithm is suited to caches with unequal cache_dir
  4097. #    disk sizes.
  4098. #
  4099. #    Each cache_dir is selected in a rotation. The next suitable
  4100. #    cache_dir is used.
  4101. #
  4102. #    Available cache_dir capacity is only considered in relation
  4103. #    to whether the object will fit and meets the min-size and
  4104. #    max-size parameters.
  4105. #
  4106. #    Disk I/O loading is only considered to prevent overload on slow
  4107. #    disks. This algorithm does not spread objects by size, so any
  4108. #    I/O loading per-disk may appear very unbalanced and volatile.
  4109. #
  4110. #    If several cache_dirs use similar min-size, max-size, or other
  4111. #    limits to to reject certain responses, then do not group such
  4112. #    cache_dir lines together, to avoid round-robin selection bias
  4113. #    towards the first cache_dir after the group. Instead, interleave
  4114. #    cache_dir lines from different groups. For example:
  4115. #
  4116. #        store_dir_select_algorithm round-robin
  4117. #        cache_dir rock /hdd1 ... min-size=100000
  4118. #        cache_dir rock /ssd1 ... max-size=99999
  4119. #        cache_dir rock /hdd2 ... min-size=100000
  4120. #        cache_dir rock /ssd2 ... max-size=99999
  4121. #        cache_dir rock /hdd3 ... min-size=100000
  4122. #        cache_dir rock /ssd3 ... max-size=99999
  4123. #Default:
  4124. # store_dir_select_algorithm least-load
  4125.  
  4126. #  TAG: max_open_disk_fds
  4127. #    To avoid having disk as the I/O bottleneck Squid can optionally
  4128. #    bypass the on-disk cache if more than this amount of disk file
  4129. #    descriptors are open.
  4130. #
  4131. #    A value of 0 indicates no limit.
  4132. #Default:
  4133. # no limit
  4134.  
  4135. #  TAG: cache_swap_low    (percent, 0-100)
  4136. #    The low-water mark for AUFS/UFS/diskd cache object eviction by
  4137. #    the cache_replacement_policy algorithm.
  4138. #
  4139. #    Removal begins when the swap (disk) usage of a cache_dir is
  4140. #    above this low-water mark and attempts to maintain utilization
  4141. #    near the low-water mark.
  4142. #
  4143. #    As swap utilization increases towards the high-water mark set
  4144. #    by cache_swap_high object eviction becomes more agressive.
  4145. #
  4146. #    The value difference in percentages between low- and high-water
  4147. #    marks represent an eviction rate of 300 objects per second and
  4148. #    the rate continues to scale in agressiveness by multiples of
  4149. #    this above the high-water mark.
  4150. #
  4151. #    Defaults are 90% and 95%. If you have a large cache, 5% could be
  4152. #    hundreds of MB. If this is the case you may wish to set these
  4153. #    numbers closer together.
  4154. #
  4155. #    See also cache_swap_high and cache_replacement_policy
  4156. #Default:
  4157. # cache_swap_low 90
  4158.  
  4159. #  TAG: cache_swap_high    (percent, 0-100)
  4160. #    The high-water mark for AUFS/UFS/diskd cache object eviction by
  4161. #    the cache_replacement_policy algorithm.
  4162. #
  4163. #    Removal begins when the swap (disk) usage of a cache_dir is
  4164. #    above the low-water mark set by cache_swap_low and attempts to
  4165. #    maintain utilization near the low-water mark.
  4166. #
  4167. #    As swap utilization increases towards this high-water mark object
  4168. #    eviction becomes more agressive.
  4169. #
  4170. #    The value difference in percentages between low- and high-water
  4171. #    marks represent an eviction rate of 300 objects per second and
  4172. #    the rate continues to scale in agressiveness by multiples of
  4173. #    this above the high-water mark.
  4174. #
  4175. #    Defaults are 90% and 95%. If you have a large cache, 5% could be
  4176. #    hundreds of MB. If this is the case you may wish to set these
  4177. #    numbers closer together.
  4178. #
  4179. #    See also cache_swap_low and cache_replacement_policy
  4180. #Default:
  4181. # cache_swap_high 95
  4182.  
  4183. # LOGFILE OPTIONS
  4184. # -----------------------------------------------------------------------------
  4185.  
  4186. #  TAG: logformat
  4187. #    Usage:
  4188. #
  4189. #    logformat <name> <format specification>
  4190. #
  4191. #    Defines an access log format.
  4192. #
  4193. #    The <format specification> is a string with embedded % format codes
  4194. #
  4195. #    % format codes all follow the same basic structure where all
  4196. #    components but the formatcode are optional and usually unnecessary,
  4197. #    especially when dealing with common codes.
  4198. #
  4199. #        % [encoding] [-] [[0]width] [{arg}] formatcode [{arg}]
  4200. #
  4201. #        encoding escapes or otherwise protects "special" characters:
  4202. #
  4203. #            "    Quoted string encoding where quote(") and
  4204. #                backslash(\) characters are \-escaped while
  4205. #                CR, LF, and TAB characters are encoded as \r,
  4206. #                \n, and \t two-character sequences.
  4207. #
  4208. #            [    Custom Squid encoding where percent(%), square
  4209. #                brackets([]), backslash(\) and characters with
  4210. #                codes outside of [32,126] range are %-encoded.
  4211. #                SP is not encoded. Used by log_mime_hdrs.
  4212. #
  4213. #            #    URL encoding (a.k.a. percent-encoding) where
  4214. #                all URL unsafe and control characters (per RFC
  4215. #                1738) are %-encoded.
  4216. #
  4217. #            /    Shell-like encoding where quote(") and
  4218. #                backslash(\) characters are \-escaped while CR
  4219. #                and LF characters are encoded as \r and \n
  4220. #                two-character sequences. Values containing SP
  4221. #                character(s) are surrounded by quotes(").
  4222. #
  4223. #            '    Raw/as-is encoding with no escaping/quoting.
  4224. #
  4225. #            Default encoding: When no explicit encoding is
  4226. #            specified, each %code determines its own encoding.
  4227. #            Most %codes use raw/as-is encoding, but some codes use
  4228. #            a so called "pass-through URL encoding" where all URL
  4229. #            unsafe and control characters (per RFC 1738) are
  4230. #            %-encoded, but the percent character(%) is left as is.
  4231. #
  4232. #        -    left aligned
  4233. #
  4234. #        width    minimum and/or maximum field width:
  4235. #                [width_min][.width_max]
  4236. #            When minimum starts with 0, the field is zero-padded.
  4237. #            String values exceeding maximum width are truncated.
  4238. #
  4239. #        {arg}    argument such as header name etc. This field may be
  4240. #            placed before or after the token, but not both at once.
  4241. #
  4242. #    Format codes:
  4243. #
  4244. #        %    a literal % character
  4245. #        sn    Unique sequence number per log line entry
  4246. #        err_code    The ID of an error response served by Squid or
  4247. #                a similar internal error identifier.
  4248. #        err_detail  Additional err_code-dependent error information.
  4249. #        note    The annotation specified by the argument. Also
  4250. #            logs the adaptation meta headers set by the
  4251. #            adaptation_meta configuration parameter.
  4252. #            If no argument given all annotations logged.
  4253. #            The argument may include a separator to use with
  4254. #            annotation values:
  4255. #                            name[:separator]
  4256. #            By default, multiple note values are separated with ","
  4257. #            and multiple notes are separated with "\r\n".
  4258. #            When logging named notes with %{name}note, the
  4259. #            explicitly configured separator is used between note
  4260. #            values. When logging all notes with %note, the
  4261. #            explicitly configured separator is used between
  4262. #            individual notes. There is currently no way to
  4263. #            specify both value and notes separators when logging
  4264. #            all notes with %note.
  4265. #        master_xaction  The master transaction identifier is an unsigned
  4266. #            integer. These IDs are guaranteed to monotonically
  4267. #            increase within a single worker process lifetime, with
  4268. #            higher values corresponding to transactions that were
  4269. #            accepted or initiated later. Due to current implementation
  4270. #            deficiencies, some IDs are skipped (i.e. never logged).
  4271. #            Concurrent workers and restarted workers use similar,
  4272. #            overlapping sequences of master transaction IDs.
  4273. #
  4274. #    Connection related format codes:
  4275. #
  4276. #        >a    Client source IP address
  4277. #        >A    Client FQDN
  4278. #        >p    Client source port
  4279. #        >eui    Client source EUI (MAC address, EUI-48 or EUI-64 identifier)
  4280. #        >la    Local IP address the client connected to
  4281. #        >lp    Local port number the client connected to
  4282. #        >qos    Client connection TOS/DSCP value set by Squid
  4283. #        >nfmark Client connection netfilter packet MARK set by Squid
  4284. #
  4285. #        la    Local listening IP address the client connection was connected to.
  4286. #        lp    Local listening port number the client connection was connected to.
  4287. #
  4288. #        <a    Server IP address of the last server or peer connection
  4289. #        <A    Server FQDN or peer name
  4290. #        <p    Server port number of the last server or peer connection
  4291. #        <la    Local IP address of the last server or peer connection
  4292. #        <lp     Local port number of the last server or peer connection
  4293. #        <qos    Server connection TOS/DSCP value set by Squid
  4294. #        <nfmark Server connection netfilter packet MARK set by Squid
  4295. #
  4296. #        >handshake Raw client handshake
  4297. #            Initial client bytes received by Squid on a newly
  4298. #            accepted TCP connection or inside a just established
  4299. #            CONNECT tunnel. Squid stops accumulating handshake
  4300. #            bytes as soon as the handshake parser succeeds or
  4301. #            fails (determining whether the client is using the
  4302. #            expected protocol).
  4303. #
  4304. #            For HTTP clients, the handshake is the request line.
  4305. #            For TLS clients, the handshake consists of all TLS
  4306. #            records up to and including the TLS record that
  4307. #            contains the last byte of the first ClientHello
  4308. #            message. For clients using an unsupported protocol,
  4309. #            this field contains the bytes received by Squid at the
  4310. #            time of the handshake parsing failure.
  4311. #
  4312. #            See the on_unsupported_protocol directive for more
  4313. #            information on Squid handshake traffic expectations.
  4314. #
  4315. #            Current support is limited to these contexts:
  4316. #            - http_port connections, but only when the
  4317. #              on_unsupported_protocol directive is in use.
  4318. #            - https_port connections (and CONNECT tunnels) that
  4319. #              are subject to the ssl_bump peek or stare action.
  4320. #
  4321. #            To protect binary handshake data, this field is always
  4322. #            base64-encoded (RFC 4648 Section 4). If logformat
  4323. #            field encoding is configured, that encoding is applied
  4324. #            on top of base64. Otherwise, the computed base64 value
  4325. #            is recorded as is.
  4326. #
  4327. #    Time related format codes:
  4328. #
  4329. #        ts    Seconds since epoch
  4330. #        tu    subsecond time (milliseconds)
  4331. #        tl    Local time. Optional strftime format argument
  4332. #                default %d/%b/%Y:%H:%M:%S %z
  4333. #        tg    GMT time. Optional strftime format argument
  4334. #                default %d/%b/%Y:%H:%M:%S %z
  4335. #        tr    Response time (milliseconds)
  4336. #        dt    Total time spent making DNS lookups (milliseconds)
  4337. #        tS    Approximate master transaction start time in
  4338. #            <full seconds since epoch>.<fractional seconds> format.
  4339. #            Currently, Squid considers the master transaction
  4340. #            started when a complete HTTP request header initiating
  4341. #            the transaction is received from the client. This is
  4342. #            the same value that Squid uses to calculate transaction
  4343. #            response time when logging %tr to access.log. Currently,
  4344. #            Squid uses millisecond resolution for %tS values,
  4345. #            similar to the default access.log "current time" field
  4346. #            (%ts.%03tu).
  4347. #
  4348. #    Access Control related format codes:
  4349. #
  4350. #        et    Tag returned by external acl
  4351. #        ea    Log string returned by external acl
  4352. #        un    User name (any available)
  4353. #        ul    User name from authentication
  4354. #        ue    User name from external acl helper
  4355. #        ui    User name from ident
  4356. #        un    A user name. Expands to the first available name
  4357. #            from the following list of information sources:
  4358. #            - authenticated user name, like %ul
  4359. #            - user name supplied by an external ACL, like %ue
  4360. #            - SSL client name, like %us
  4361. #            - ident user name, like %ui
  4362. #        credentials Client credentials. The exact meaning depends on
  4363. #            the authentication scheme: For Basic authentication,
  4364. #            it is the password; for Digest, the realm sent by the
  4365. #            client; for NTLM and Negotiate, the client challenge
  4366. #            or client credentials prefixed with "YR " or "KK ".
  4367. #
  4368. #    HTTP related format codes:
  4369. #
  4370. #        REQUEST
  4371. #
  4372. #        [http::]rm    Request method (GET/POST etc)
  4373. #        [http::]>rm    Request method from client
  4374. #        [http::]<rm    Request method sent to server or peer
  4375. #
  4376. #        [http::]ru    Request URL received (or computed) and sanitized
  4377. #
  4378. #                Logs request URI received from the client, a
  4379. #                request adaptation service, or a request
  4380. #                redirector (whichever was applied last).
  4381. #
  4382. #                Computed URLs are URIs of internally generated
  4383. #                requests and various "error:..." URIs.
  4384. #
  4385. #                Honors strip_query_terms and uri_whitespace.
  4386. #
  4387. #                This field is not encoded by default. Encoding
  4388. #                this field using variants of %-encoding will
  4389. #                clash with uri_whitespace modifications that
  4390. #                also use %-encoding.
  4391. #
  4392. #        [http::]>ru    Request URL received from the client (or computed)
  4393. #
  4394. #                Computed URLs are URIs of internally generated
  4395. #                requests and various "error:..." URIs.
  4396. #
  4397. #                Unlike %ru, this request URI is not affected
  4398. #                by request adaptation, URL rewriting services,
  4399. #                and strip_query_terms.
  4400. #
  4401. #                Honors uri_whitespace.
  4402. #
  4403. #                This field is using pass-through URL encoding
  4404. #                by default. Encoding this field using other
  4405. #                variants of %-encoding will clash with
  4406. #                uri_whitespace modifications that also use
  4407. #                %-encoding.
  4408. #
  4409. #        [http::]<ru    Request URL sent to server or peer
  4410. #        [http::]>rs    Request URL scheme from client
  4411. #        [http::]<rs    Request URL scheme sent to server or peer
  4412. #        [http::]>rd    Request URL domain from client
  4413. #        [http::]<rd    Request URL domain sent to server or peer
  4414. #        [http::]>rP    Request URL port from client
  4415. #        [http::]<rP    Request URL port sent to server or peer
  4416. #        [http::]rp    Request URL path excluding hostname
  4417. #        [http::]>rp    Request URL path excluding hostname from client
  4418. #        [http::]<rp    Request URL path excluding hostname sent to server or peer
  4419. #        [http::]rv    Request protocol version
  4420. #        [http::]>rv    Request protocol version from client
  4421. #        [http::]<rv    Request protocol version sent to server or peer
  4422. #
  4423. #        [http::]>h    Original received request header.
  4424. #                Usually differs from the request header sent by
  4425. #                Squid, although most fields are often preserved.
  4426. #                Accepts optional header field name/value filter
  4427. #                argument using name[:[separator]element] format.
  4428. #        [http::]>ha    Received request header after adaptation and
  4429. #                redirection (pre-cache REQMOD vectoring point).
  4430. #                Usually differs from the request header sent by
  4431. #                Squid, although most fields are often preserved.
  4432. #                Optional header name argument as for >h
  4433. #
  4434. #        RESPONSE
  4435. #
  4436. #        [http::]<Hs    HTTP status code received from the next hop
  4437. #        [http::]>Hs    HTTP status code sent to the client
  4438. #
  4439. #        [http::]<h    Reply header. Optional header name argument
  4440. #                as for >h
  4441. #
  4442. #        [http::]mt    MIME content type
  4443. #
  4444. #
  4445. #        SIZE COUNTERS
  4446. #
  4447. #        [http::]st    Total size of request + reply traffic with client
  4448. #        [http::]>st    Total size of request received from client.
  4449. #                Excluding chunked encoding bytes.
  4450. #        [http::]<st    Total size of reply sent to client (after adaptation)
  4451. #
  4452. #        [http::]>sh    Size of request headers received from client
  4453. #        [http::]<sh    Size of reply headers sent to client (after adaptation)
  4454. #
  4455. #        [http::]<sH    Reply high offset sent
  4456. #        [http::]<sS    Upstream object size
  4457. #
  4458. #        [http::]<bs    Number of HTTP-equivalent message body bytes
  4459. #                received from the next hop, excluding chunked
  4460. #                transfer encoding and control messages.
  4461. #                Generated FTP/Gopher listings are treated as
  4462. #                received bodies.
  4463. #
  4464. #        TIMING
  4465. #
  4466. #        [http::]<pt    Peer response time in milliseconds. The timer starts
  4467. #                when the last request byte is sent to the next hop
  4468. #                and stops when the last response byte is received.
  4469. #        [http::]<tt    Total time in milliseconds. The timer
  4470. #                starts with the first connect request (or write I/O)
  4471. #                sent to the first selected peer. The timer stops
  4472. #                with the last I/O with the last peer.
  4473. #
  4474. #    Squid handling related format codes:
  4475. #
  4476. #        Ss    Squid request status (TCP_MISS etc)
  4477. #        Sh    Squid hierarchy status (DEFAULT_PARENT etc)
  4478. #
  4479. #    SSL-related format codes:
  4480. #
  4481. #        ssl::bump_mode    SslBump decision for the transaction:
  4482. #
  4483. #                For CONNECT requests that initiated bumping of
  4484. #                a connection and for any request received on
  4485. #                an already bumped connection, Squid logs the
  4486. #                corresponding SslBump mode ("splice", "bump",
  4487. #                "peek", "stare", "terminate", "server-first"
  4488. #                or "client-first"). See the ssl_bump option
  4489. #                for more information about these modes.
  4490. #
  4491. #                A "none" token is logged for requests that
  4492. #                triggered "ssl_bump" ACL evaluation matching
  4493. #                a "none" rule.
  4494. #
  4495. #                In all other cases, a single dash ("-") is
  4496. #                logged.
  4497. #
  4498. #        ssl::>sni    SSL client SNI sent to Squid.
  4499. #
  4500. #        ssl::>cert_subject
  4501. #                The Subject field of the received client
  4502. #                SSL certificate or a dash ('-') if Squid has
  4503. #                received an invalid/malformed certificate or
  4504. #                no certificate at all. Consider encoding the
  4505. #                logged value because Subject often has spaces.
  4506. #
  4507. #        ssl::>cert_issuer
  4508. #                The Issuer field of the received client
  4509. #                SSL certificate or a dash ('-') if Squid has
  4510. #                received an invalid/malformed certificate or
  4511. #                no certificate at all. Consider encoding the
  4512. #                logged value because Issuer often has spaces.
  4513. #
  4514. #        ssl::<cert_subject
  4515. #                The Subject field of the received server
  4516. #                TLS certificate or a dash ('-') if this is
  4517. #                not available. Consider encoding the logged
  4518. #                value because Subject often has spaces.
  4519. #
  4520. #        ssl::<cert_issuer
  4521. #                The Issuer field of the received server
  4522. #                TLS certificate or a dash ('-') if this is
  4523. #                not available. Consider encoding the logged
  4524. #                value because Issuer often has spaces.
  4525. #
  4526. #        ssl::<cert
  4527. #                The received server x509 certificate in PEM
  4528. #                format, including BEGIN and END lines (or a
  4529. #                dash ('-') if the certificate is unavailable).
  4530. #
  4531. #                WARNING: Large certificates will exceed the
  4532. #                current 8KB access.log record limit, resulting
  4533. #                in truncated records. Such truncation usually
  4534. #                happens in the middle of a record field. The
  4535. #                limit applies to all access logging modules.
  4536. #
  4537. #                The logged certificate may have failed
  4538. #                validation and may not be trusted by Squid.
  4539. #                This field does not include any intermediate
  4540. #                certificates that may have been received from
  4541. #                the server or fetched during certificate
  4542. #                validation process.
  4543. #
  4544. #                Currently, Squid only collects server
  4545. #                certificates during step3 of SslBump
  4546. #                processing; connections that were not subject
  4547. #                to ssl_bump rules or that did not match a peek
  4548. #                or stare rule at step2 will not have the
  4549. #                server certificate information.
  4550. #
  4551. #                This field is using pass-through URL encoding
  4552. #                by default.
  4553. #
  4554. #        ssl::<cert_errors
  4555. #                The list of certificate validation errors
  4556. #                detected by Squid (including OpenSSL and
  4557. #                certificate validation helper components). The
  4558. #                errors are listed in the discovery order. By
  4559. #                default, the error codes are separated by ':'.
  4560. #                Accepts an optional separator argument.
  4561. #
  4562. #        %ssl::>negotiated_version The negotiated TLS version of the
  4563. #                client connection.
  4564. #
  4565. #        %ssl::<negotiated_version The negotiated TLS version of the
  4566. #                last server or peer connection.
  4567. #
  4568. #        %ssl::>received_hello_version The TLS version of the Hello
  4569. #                message received from TLS client.
  4570. #
  4571. #        %ssl::<received_hello_version The TLS version of the Hello
  4572. #                message received from TLS server.
  4573. #
  4574. #        %ssl::>received_supported_version The maximum TLS version
  4575. #                supported by the TLS client.
  4576. #
  4577. #        %ssl::<received_supported_version The maximum TLS version
  4578. #                supported by the TLS server.
  4579. #
  4580. #        %ssl::>negotiated_cipher The negotiated cipher of the
  4581. #                client connection.
  4582. #
  4583. #        %ssl::<negotiated_cipher The negotiated cipher of the
  4584. #                last server or peer connection.
  4585. #
  4586. #    If ICAP is enabled, the following code becomes available (as
  4587. #    well as ICAP log codes documented with the icap_log option):
  4588. #
  4589. #        icap::tt        Total ICAP processing time for the HTTP
  4590. #                transaction. The timer ticks when ICAP
  4591. #                ACLs are checked and when ICAP
  4592. #                transaction is in progress.
  4593. #
  4594. #    If adaptation is enabled the following codes become available:
  4595. #
  4596. #        adapt::<last_h    The header of the last ICAP response or
  4597. #                meta-information from the last eCAP
  4598. #                transaction related to the HTTP transaction.
  4599. #                Like <h, accepts an optional header name
  4600. #                argument.
  4601. #
  4602. #        adapt::sum_trs Summed adaptation transaction response
  4603. #                times recorded as a comma-separated list in
  4604. #                the order of transaction start time. Each time
  4605. #                value is recorded as an integer number,
  4606. #                representing response time of one or more
  4607. #                adaptation (ICAP or eCAP) transaction in
  4608. #                milliseconds.  When a failed transaction is
  4609. #                being retried or repeated, its time is not
  4610. #                logged individually but added to the
  4611. #                replacement (next) transaction. See also:
  4612. #                adapt::all_trs.
  4613. #
  4614. #        adapt::all_trs All adaptation transaction response times.
  4615. #                Same as adaptation_strs but response times of
  4616. #                individual transactions are never added
  4617. #                together. Instead, all transaction response
  4618. #                times are recorded individually.
  4619. #
  4620. #    You can prefix adapt::*_trs format codes with adaptation
  4621. #    service name in curly braces to record response time(s) specific
  4622. #    to that service. For example: %{my_service}adapt::sum_trs
  4623. #
  4624. #    Format codes related to the PROXY protocol:
  4625. #
  4626. #        proxy_protocol::>h PROXY protocol header, including optional TLVs.
  4627. #
  4628. #                Supports the same field and element reporting/extraction logic
  4629. #                as %http::>h. For configuration and reporting purposes, Squid
  4630. #                maps each PROXY TLV to an HTTP header field: the TLV type
  4631. #                (configured as a decimal integer) is the field name, and the
  4632. #                TLV value is the field value. All TLVs of "LOCAL" connections
  4633. #                (in PROXY protocol terminology) are currently skipped/ignored.
  4634. #
  4635. #                Squid also maps the following standard PROXY protocol header
  4636. #                blocks to pseudo HTTP headers (their names use PROXY
  4637. #                terminology and start with a colon, following HTTP tradition
  4638. #                for pseudo headers): :command, :version, :src_addr, :dst_addr,
  4639. #                :src_port, and :dst_port.
  4640. #
  4641. #                Without optional parameters, this logformat code logs
  4642. #                pseudo headers and TLVs.
  4643. #
  4644. #                This format code uses pass-through URL encoding by default.
  4645. #
  4646. #                Example:
  4647. #                    # relay custom PROXY TLV #224 to adaptation services
  4648. #                    adaptation_meta Client-Foo "%proxy_protocol::>h{224}
  4649. #
  4650. #                See also: %http::>h
  4651. #
  4652. #    The default formats available (which do not need re-defining) are:
  4653. #
  4654. #logformat squid      %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
  4655. #logformat common     %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh
  4656. #logformat combined   %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
  4657. #logformat referrer   %ts.%03tu %>a %{Referer}>h %ru
  4658. #logformat useragent  %>a [%tl] "%{User-Agent}>h"
  4659. #
  4660. #    NOTE: When the log_mime_hdrs directive is set to ON.
  4661. #        The squid, common and combined formats have a safely encoded copy
  4662. #        of the mime headers appended to each line within a pair of brackets.
  4663. #
  4664. #    NOTE: The common and combined formats are not quite true to the Apache definition.
  4665. #        The logs from Squid contain an extra status and hierarchy code appended.
  4666. #
  4667. #Default:
  4668. # The format definitions squid, common, combined, referrer, useragent are built in.
  4669.  
  4670. #  TAG: access_log
  4671. #    Configures whether and how Squid logs HTTP and ICP transactions.
  4672. #    If access logging is enabled, a single line is logged for every
  4673. #    matching HTTP or ICP request. The recommended directive formats are:
  4674. #
  4675. #    access_log <module>:<place> [option ...] [acl acl ...]
  4676. #    access_log none [acl acl ...]
  4677. #
  4678. #    The following directive format is accepted but may be deprecated:
  4679. #    access_log <module>:<place> [<logformat name> [acl acl ...]]
  4680. #
  4681. #        In most cases, the first ACL name must not contain the '=' character
  4682. #    and should not be equal to an existing logformat name. You can always
  4683. #    start with an 'all' ACL to work around those restrictions.
  4684. #
  4685. #    Will log to the specified module:place using the specified format (which
  4686. #    must be defined in a logformat directive) those entries which match
  4687. #    ALL the acl's specified (which must be defined in acl clauses).
  4688. #    If no acl is specified, all requests will be logged to this destination.
  4689. #
  4690. #    ===== Available options for the recommended directive format =====
  4691. #
  4692. #    logformat=name        Names log line format (either built-in or
  4693. #                defined by a logformat directive). Defaults
  4694. #                to 'squid'.
  4695. #
  4696. #    buffer-size=64KB    Defines approximate buffering limit for log
  4697. #                records (see buffered_logs).  Squid should not
  4698. #                keep more than the specified size and, hence,
  4699. #                should flush records before the buffer becomes
  4700. #                full to avoid overflows under normal
  4701. #                conditions (the exact flushing algorithm is
  4702. #                module-dependent though).  The on-error option
  4703. #                controls overflow handling.
  4704. #
  4705. #    on-error=die|drop    Defines action on unrecoverable errors. The
  4706. #                'drop' action ignores (i.e., does not log)
  4707. #                affected log records. The default 'die' action
  4708. #                kills the affected worker. The drop action
  4709. #                support has not been tested for modules other
  4710. #                than tcp.
  4711. #
  4712. #    rotate=N        Specifies the number of log file rotations to
  4713. #                make when you run 'squid -k rotate'. The default
  4714. #                is to obey the logfile_rotate directive. Setting
  4715. #                rotate=0 will disable the file name rotation,
  4716. #                but the log files are still closed and re-opened.
  4717. #                This will enable you to rename the logfiles
  4718. #                yourself just before sending the rotate signal.
  4719. #                Only supported by the stdio module.
  4720. #
  4721. #    ===== Modules Currently available =====
  4722. #
  4723. #    none    Do not log any requests matching these ACL.
  4724. #        Do not specify Place or logformat name.
  4725. #
  4726. #    stdio    Write each log line to disk immediately at the completion of
  4727. #        each request.
  4728. #        Place: the filename and path to be written.
  4729. #
  4730. #    daemon    Very similar to stdio. But instead of writing to disk the log
  4731. #        line is passed to a daemon helper for asychronous handling instead.
  4732. #        Place: varies depending on the daemon.
  4733. #
  4734. #        log_file_daemon Place: the file name and path to be written.
  4735. #
  4736. #    syslog    To log each request via syslog facility.
  4737. #        Place: The syslog facility and priority level for these entries.
  4738. #        Place Format:  facility.priority
  4739. #
  4740. #        where facility could be any of:
  4741. #            authpriv, daemon, local0 ... local7 or user.
  4742. #
  4743. #        And priority could be any of:
  4744. #            err, warning, notice, info, debug.
  4745. #
  4746. #    udp    To send each log line as text data to a UDP receiver.
  4747. #        Place: The destination host name or IP and port.
  4748. #        Place Format:   //host:port
  4749. #
  4750. #    tcp    To send each log line as text data to a TCP receiver.
  4751. #        Lines may be accumulated before sending (see buffered_logs).
  4752. #        Place: The destination host name or IP and port.
  4753. #        Place Format:   //host:port
  4754. #
  4755. #    Default:
  4756. #        access_log daemon:/var/log/squid/access.log squid
  4757. #Default:
  4758. # access_log daemon:/var/log/squid/access.log squid
  4759.  
  4760. #  TAG: icap_log
  4761. #    ICAP log files record ICAP transaction summaries, one line per
  4762. #    transaction.
  4763. #
  4764. #    The icap_log option format is:
  4765. #    icap_log <filepath> [<logformat name> [acl acl ...]]
  4766. #    icap_log none [acl acl ...]]
  4767. #
  4768. #    Please see access_log option documentation for details. The two
  4769. #    kinds of logs share the overall configuration approach and many
  4770. #    features.
  4771. #
  4772. #    ICAP processing of a single HTTP message or transaction may
  4773. #    require multiple ICAP transactions.  In such cases, multiple
  4774. #    ICAP transaction log lines will correspond to a single access
  4775. #    log line.
  4776. #
  4777. #    ICAP log supports many access.log logformat %codes. In ICAP context,
  4778. #    HTTP message-related %codes are applied to the HTTP message embedded
  4779. #    in an ICAP message. Logformat "%http::>..." codes are used for HTTP
  4780. #    messages embedded in ICAP requests while "%http::<..." codes are used
  4781. #    for HTTP messages embedded in ICAP responses. For example:
  4782. #
  4783. #        http::>h    To-be-adapted HTTP message headers sent by Squid to
  4784. #                the ICAP service. For REQMOD transactions, these are
  4785. #                HTTP request headers. For RESPMOD, these are HTTP
  4786. #                response headers, but Squid currently cannot log them
  4787. #                (i.e., %http::>h will expand to "-" for RESPMOD).
  4788. #
  4789. #        http::<h    Adapted HTTP message headers sent by the ICAP
  4790. #                service to Squid (i.e., HTTP request headers in regular
  4791. #                REQMOD; HTTP response headers in RESPMOD and during
  4792. #                request satisfaction in REQMOD).
  4793. #
  4794. #    ICAP OPTIONS transactions do not embed HTTP messages.
  4795. #
  4796. #    Several logformat codes below deal with ICAP message bodies. An ICAP
  4797. #    message body, if any, typically includes a complete HTTP message
  4798. #    (required HTTP headers plus optional HTTP message body). When
  4799. #    computing HTTP message body size for these logformat codes, Squid
  4800. #    either includes or excludes chunked encoding overheads; see
  4801. #    code-specific documentation for details.
  4802. #
  4803. #    For Secure ICAP services, all size-related information is currently
  4804. #    computed before/after TLS encryption/decryption, as if TLS was not
  4805. #    in use at all.
  4806. #
  4807. #    The following format codes are also available for ICAP logs:
  4808. #
  4809. #        icap::<A    ICAP server IP address. Similar to <A.
  4810. #
  4811. #        icap::<service_name    ICAP service name from the icap_service
  4812. #                option in Squid configuration file.
  4813. #
  4814. #        icap::ru    ICAP Request-URI. Similar to ru.
  4815. #
  4816. #        icap::rm    ICAP request method (REQMOD, RESPMOD, or
  4817. #                OPTIONS). Similar to existing rm.
  4818. #
  4819. #        icap::>st    The total size of the ICAP request sent to the ICAP
  4820. #                server (ICAP headers + ICAP body), including chunking
  4821. #                metadata (if any).
  4822. #
  4823. #        icap::<st    The total size of the ICAP response received from the
  4824. #                ICAP server (ICAP headers + ICAP body), including
  4825. #                chunking metadata (if any).
  4826. #
  4827. #        icap::<bs    The size of the ICAP response body received from the
  4828. #                ICAP server, excluding chunking metadata (if any).
  4829. #
  4830. #        icap::tr     Transaction response time (in
  4831. #                milliseconds).  The timer starts when
  4832. #                the ICAP transaction is created and
  4833. #                stops when the transaction is completed.
  4834. #                Similar to tr.
  4835. #
  4836. #        icap::tio    Transaction I/O time (in milliseconds). The
  4837. #                timer starts when the first ICAP request
  4838. #                byte is scheduled for sending. The timers
  4839. #                stops when the last byte of the ICAP response
  4840. #                is received.
  4841. #
  4842. #        icap::to     Transaction outcome: ICAP_ERR* for all
  4843. #                transaction errors, ICAP_OPT for OPTION
  4844. #                transactions, ICAP_ECHO for 204
  4845. #                responses, ICAP_MOD for message
  4846. #                modification, and ICAP_SAT for request
  4847. #                satisfaction. Similar to Ss.
  4848. #
  4849. #        icap::Hs    ICAP response status code. Similar to Hs.
  4850. #
  4851. #        icap::>h    ICAP request header(s). Similar to >h.
  4852. #
  4853. #        icap::<h    ICAP response header(s). Similar to <h.
  4854. #
  4855. #    The default ICAP log format, which can be used without an explicit
  4856. #    definition, is called icap_squid:
  4857. #
  4858. #logformat icap_squid %ts.%03tu %6icap::tr %>A %icap::to/%03icap::Hs %icap::<st %icap::rm %icap::ru %un -/%icap::<A -
  4859. #
  4860. #    See also: logformat and %adapt::<last_h
  4861. #Default:
  4862. # none
  4863.  
  4864. #  TAG: logfile_daemon
  4865. #    Specify the path to the logfile-writing daemon. This daemon is
  4866. #    used to write the access and store logs, if configured.
  4867. #
  4868. #    Squid sends a number of commands to the log daemon:
  4869. #      L<data>\n - logfile data
  4870. #      R\n - rotate file
  4871. #      T\n - truncate file
  4872. #      O\n - reopen file
  4873. #      F\n - flush file
  4874. #      r<n>\n - set rotate count to <n>
  4875. #      b<n>\n - 1 = buffer output, 0 = don't buffer output
  4876. #
  4877. #    No responses is expected.
  4878. #Default:
  4879. # logfile_daemon /usr/lib/squid/log_file_daemon
  4880.  
  4881. #  TAG: stats_collection    allow|deny acl acl...
  4882. #    This options allows you to control which requests gets accounted
  4883. #    in performance counters.
  4884. #
  4885. #    This clause only supports fast acl types.
  4886. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  4887. #Default:
  4888. # Allow logging for all transactions.
  4889.  
  4890. #  TAG: cache_store_log
  4891. #    Logs the activities of the storage manager.  Shows which
  4892. #    objects are ejected from the cache, and which objects are
  4893. #    saved and for how long.
  4894. #    There are not really utilities to analyze this data, so you can safely
  4895. #    disable it (the default).
  4896. #
  4897. #    Store log uses modular logging outputs. See access_log for the list
  4898. #    of modules supported.
  4899. #
  4900. #    Example:
  4901. #        cache_store_log stdio:/var/log/squid/store.log
  4902. #        cache_store_log daemon:/var/log/squid/store.log
  4903. #Default:
  4904. # none
  4905.  
  4906. #  TAG: cache_swap_state
  4907. #    Location for the cache "swap.state" file. This index file holds
  4908. #    the metadata of objects saved on disk.  It is used to rebuild
  4909. #    the cache during startup.  Normally this file resides in each
  4910. #    'cache_dir' directory, but you may specify an alternate
  4911. #    pathname here.  Note you must give a full filename, not just
  4912. #    a directory. Since this is the index for the whole object
  4913. #    list you CANNOT periodically rotate it!
  4914. #
  4915. #    If %s can be used in the file name it will be replaced with a
  4916. #    a representation of the cache_dir name where each / is replaced
  4917. #    with '.'. This is needed to allow adding/removing cache_dir
  4918. #    lines when cache_swap_log is being used.
  4919. #
  4920. #    If have more than one 'cache_dir', and %s is not used in the name
  4921. #    these swap logs will have names such as:
  4922. #
  4923. #        cache_swap_log.00
  4924. #        cache_swap_log.01
  4925. #        cache_swap_log.02
  4926. #
  4927. #    The numbered extension (which is added automatically)
  4928. #    corresponds to the order of the 'cache_dir' lines in this
  4929. #    configuration file.  If you change the order of the 'cache_dir'
  4930. #    lines in this file, these index files will NOT correspond to
  4931. #    the correct 'cache_dir' entry (unless you manually rename
  4932. #    them).  We recommend you do NOT use this option.  It is
  4933. #    better to keep these index files in each 'cache_dir' directory.
  4934. #Default:
  4935. # Store the journal inside its cache_dir
  4936.  
  4937. #  TAG: logfile_rotate
  4938. #    Specifies the default number of logfile rotations to make when you
  4939. #    type 'squid -k rotate'. The default is 10, which will rotate
  4940. #    with extensions 0 through 9. Setting logfile_rotate to 0 will
  4941. #    disable the file name rotation, but the logfiles are still closed
  4942. #    and re-opened. This will enable you to rename the logfiles
  4943. #    yourself just before sending the rotate signal.
  4944. #
  4945. #    Note, from Squid-3.1 this option is only a default for cache.log,
  4946. #    that log can be rotated separately by using debug_options.
  4947. #
  4948. #    Note, from Squid-4 this option is only a default for access.log
  4949. #    recorded by stdio: module. Those logs can be rotated separately by
  4950. #    using the rotate=N option on their access_log directive.
  4951. #
  4952. #    Note, the 'squid -k rotate' command normally sends a USR1
  4953. #    signal to the running squid process.  In certain situations
  4954. #    (e.g. on Linux with Async I/O), USR1 is used for other
  4955. #    purposes, so -k rotate uses another signal.  It is best to get
  4956. #    in the habit of using 'squid -k rotate' instead of 'kill -USR1
  4957. #    <pid>'.
  4958. #
  4959. #    Note, for Debian/Linux the default of logfile_rotate is
  4960. #    zero, since it includes external logfile-rotation methods.
  4961. #Default:
  4962. # logfile_rotate 0
  4963.  
  4964. #  TAG: mime_table
  4965. #    Path to Squid's icon configuration file.
  4966. #
  4967. #    You shouldn't need to change this, but the default file contains
  4968. #    examples and formatting information if you do.
  4969. #Default:
  4970. # mime_table /usr/share/squid/mime.conf
  4971.  
  4972. #  TAG: log_mime_hdrs    on|off
  4973. #    The Cache can record both the request and the response MIME
  4974. #    headers for each HTTP transaction.  The headers are encoded
  4975. #    safely and will appear as two bracketed fields at the end of
  4976. #    the access log (for either the native or httpd-emulated log
  4977. #    formats).  To enable this logging set log_mime_hdrs to 'on'.
  4978. #Default:
  4979. # log_mime_hdrs off
  4980.  
  4981. #  TAG: pid_filename
  4982. #    A filename to write the process-id to.  To disable, enter "none".
  4983. #Default:
  4984. # pid_filename /run/squid.pid
  4985.  
  4986. #  TAG: client_netmask
  4987. #    A netmask for client addresses in logfiles and cachemgr output.
  4988. #    Change this to protect the privacy of your cache clients.
  4989. #    A netmask of 255.255.255.0 will log all IP's in that range with
  4990. #    the last digit set to '0'.
  4991. #Default:
  4992. # Log full client IP address
  4993.  
  4994. #  TAG: strip_query_terms
  4995. #    By default, Squid strips query terms from requested URLs before
  4996. #    logging.  This protects your user's privacy and reduces log size.
  4997. #
  4998. #    When investigating HIT/MISS or other caching behaviour you
  4999. #    will need to disable this to see the full URL used by Squid.
  5000. #Default:
  5001. # strip_query_terms on
  5002.  
  5003. #  TAG: buffered_logs    on|off
  5004. #    Whether to write/send access_log records ASAP or accumulate them and
  5005. #    then write/send them in larger chunks. Buffering may improve
  5006. #    performance because it decreases the number of I/Os. However,
  5007. #    buffering increases the delay before log records become available to
  5008. #    the final recipient (e.g., a disk file or logging daemon) and,
  5009. #    hence, increases the risk of log records loss.
  5010. #
  5011. #    Note that even when buffered_logs are off, Squid may have to buffer
  5012. #    records if it cannot write/send them immediately due to pending I/Os
  5013. #    (e.g., the I/O writing the previous log record) or connectivity loss.
  5014. #
  5015. #    Currently honored by 'daemon' and 'tcp' access_log modules only.
  5016. #Default:
  5017. # buffered_logs off
  5018.  
  5019. #  TAG: netdb_filename
  5020. #    Where Squid stores it's netdb journal.
  5021. #    When enabled this journal preserves netdb state between restarts.
  5022. #
  5023. #    To disable, enter "none".
  5024. #Default:
  5025. # netdb_filename stdio:/var/spool/squid/netdb.state
  5026.  
  5027. # OPTIONS FOR TROUBLESHOOTING
  5028. # -----------------------------------------------------------------------------
  5029.  
  5030. #  TAG: cache_log
  5031. #    Squid administrative logging file.
  5032. #
  5033. #    This is where general information about Squid behavior goes. You can
  5034. #    increase the amount of data logged to this file and how often it is
  5035. #    rotated with "debug_options"
  5036. #Default:
  5037. # cache_log /var/log/squid/cache.log
  5038.  
  5039. #  TAG: debug_options
  5040. #    Logging options are set as section,level where each source file
  5041. #    is assigned a unique section.  Lower levels result in less
  5042. #    output,  Full debugging (level 9) can result in a very large
  5043. #    log file, so be careful.
  5044. #
  5045. #    The magic word "ALL" sets debugging levels for all sections.
  5046. #    The default is to run with "ALL,1" to record important warnings.
  5047. #
  5048. #    The rotate=N option can be used to keep more or less of these logs
  5049. #    than would otherwise be kept by logfile_rotate.
  5050. #    For most uses a single log should be enough to monitor current
  5051. #    events affecting Squid.
  5052. #Default:
  5053. # Log all critical and important messages.
  5054.  
  5055. #  TAG: coredump_dir
  5056. #    By default Squid leaves core files in the directory from where
  5057. #    it was started. If you set 'coredump_dir' to a directory
  5058. #    that exists, Squid will chdir() to that directory at startup
  5059. #    and coredump files will be left there.
  5060. #
  5061. #Default:
  5062. # Use the directory from where Squid was started.
  5063. #
  5064.  
  5065. # Leave coredumps in the first cache dir
  5066. coredump_dir /var/spool/squid
  5067.  
  5068. # OPTIONS FOR FTP GATEWAYING
  5069. # -----------------------------------------------------------------------------
  5070.  
  5071. #  TAG: ftp_user
  5072. #    If you want the anonymous login password to be more informative
  5073. #    (and enable the use of picky FTP servers), set this to something
  5074. #    reasonable for your domain, like wwwuser@somewhere.net
  5075. #
  5076. #    The reason why this is domainless by default is the
  5077. #    request can be made on the behalf of a user in any domain,
  5078. #    depending on how the cache is used.
  5079. #    Some FTP server also validate the email address is valid
  5080. #    (for example perl.com).
  5081. #Default:
  5082. # ftp_user Squid@
  5083.  
  5084. #  TAG: ftp_passive
  5085. #    If your firewall does not allow Squid to use passive
  5086. #    connections, turn off this option.
  5087. #
  5088. #    Use of ftp_epsv_all option requires this to be ON.
  5089. #Default:
  5090. # ftp_passive on
  5091.  
  5092. #  TAG: ftp_epsv_all
  5093. #    FTP Protocol extensions permit the use of a special "EPSV ALL" command.
  5094. #
  5095. #    NATs may be able to put the connection on a "fast path" through the
  5096. #    translator, as the EPRT command will never be used and therefore,
  5097. #    translation of the data portion of the segments will never be needed.
  5098. #
  5099. #    When a client only expects to do two-way FTP transfers this may be
  5100. #    useful.
  5101. #    If squid finds that it must do a three-way FTP transfer after issuing
  5102. #    an EPSV ALL command, the FTP session will fail.
  5103. #
  5104. #    If you have any doubts about this option do not use it.
  5105. #    Squid will nicely attempt all other connection methods.
  5106. #
  5107. #    Requires ftp_passive to be ON (default) for any effect.
  5108. #Default:
  5109. # ftp_epsv_all off
  5110.  
  5111. #  TAG: ftp_epsv
  5112. #    FTP Protocol extensions permit the use of a special "EPSV" command.
  5113. #
  5114. #    NATs may be able to put the connection on a "fast path" through the
  5115. #    translator using EPSV, as the EPRT command will never be used
  5116. #    and therefore, translation of the data portion of the segments
  5117. #    will never be needed.
  5118. #
  5119. #    EPSV is often required to interoperate with FTP servers on IPv6
  5120. #    networks. On the other hand, it may break some IPv4 servers.
  5121. #
  5122. #    By default, EPSV may try EPSV with any FTP server. To fine tune
  5123. #    that decision, you may restrict EPSV to certain clients or servers
  5124. #    using ACLs:
  5125. #
  5126. #        ftp_epsv allow|deny al1 acl2 ...
  5127. #
  5128. #    WARNING: Disabling EPSV may cause problems with external NAT and IPv6.
  5129. #
  5130. #    Only fast ACLs are supported.
  5131. #    Requires ftp_passive to be ON (default) for any effect.
  5132. #Default:
  5133. # none
  5134.  
  5135. #  TAG: ftp_eprt
  5136. #    FTP Protocol extensions permit the use of a special "EPRT" command.
  5137. #
  5138. #    This extension provides a protocol neutral alternative to the
  5139. #    IPv4-only PORT command. When supported it enables active FTP data
  5140. #    channels over IPv6 and efficient NAT handling.
  5141. #
  5142. #    Turning this OFF will prevent EPRT being attempted and will skip
  5143. #    straight to using PORT for IPv4 servers.
  5144. #
  5145. #    Some devices are known to not handle this extension correctly and
  5146. #    may result in crashes. Devices which suport EPRT enough to fail
  5147. #    cleanly will result in Squid attempting PORT anyway. This directive
  5148. #    should only be disabled when EPRT results in device failures.
  5149. #
  5150. #    WARNING: Doing so will convert Squid back to the old behavior with all
  5151. #    the related problems with external NAT devices/layers and IPv4-only FTP.
  5152. #Default:
  5153. # ftp_eprt on
  5154.  
  5155. #  TAG: ftp_sanitycheck
  5156. #    For security and data integrity reasons Squid by default performs
  5157. #    sanity checks of the addresses of FTP data connections ensure the
  5158. #    data connection is to the requested server. If you need to allow
  5159. #    FTP connections to servers using another IP address for the data
  5160. #    connection turn this off.
  5161. #Default:
  5162. # ftp_sanitycheck on
  5163.  
  5164. #  TAG: ftp_telnet_protocol
  5165. #    The FTP protocol is officially defined to use the telnet protocol
  5166. #    as transport channel for the control connection. However, many
  5167. #    implementations are broken and does not respect this aspect of
  5168. #    the FTP protocol.
  5169. #
  5170. #    If you have trouble accessing files with ASCII code 255 in the
  5171. #    path or similar problems involving this ASCII code you can
  5172. #    try setting this directive to off. If that helps, report to the
  5173. #    operator of the FTP server in question that their FTP server
  5174. #    is broken and does not follow the FTP standard.
  5175. #Default:
  5176. # ftp_telnet_protocol on
  5177.  
  5178. # OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
  5179. # -----------------------------------------------------------------------------
  5180.  
  5181. #  TAG: diskd_program
  5182. #    Specify the location of the diskd executable.
  5183. #    Note this is only useful if you have compiled in
  5184. #    diskd as one of the store io modules.
  5185. #Default:
  5186. # diskd_program /usr/lib/squid/diskd
  5187.  
  5188. #  TAG: unlinkd_program
  5189. #    Specify the location of the executable for file deletion process.
  5190. #Default:
  5191. # unlinkd_program /usr/lib/squid/unlinkd
  5192.  
  5193. #  TAG: pinger_program
  5194. #    Specify the location of the executable for the pinger process.
  5195. #Default:
  5196. # pinger_program /usr/lib/squid/pinger
  5197.  
  5198. #  TAG: pinger_enable
  5199. #    Control whether the pinger is active at run-time.
  5200. #    Enables turning ICMP pinger on and off with a simple
  5201. #    squid -k reconfigure.
  5202. #Default:
  5203. # pinger_enable on
  5204.  
  5205. # OPTIONS FOR URL REWRITING
  5206. # -----------------------------------------------------------------------------
  5207.  
  5208. #  TAG: url_rewrite_program
  5209. #    The name and command line parameters of an admin-provided executable
  5210. #    for redirecting clients or adjusting/replacing client request URLs.
  5211. #
  5212. #    This helper is consulted after the received request is cleared by
  5213. #    http_access and adapted using eICAP/ICAP services (if any). If the
  5214. #    helper does not redirect the client, Squid checks adapted_http_access
  5215. #    and may consult the cache or forward the request to the next hop.
  5216. #
  5217. #
  5218. #    For each request, the helper gets one line in the following format:
  5219. #
  5220. #      [channel-ID <SP>] request-URL [<SP> extras] <NL>
  5221. #
  5222. #    Use url_rewrite_extras to configure what Squid sends as 'extras'.
  5223. #
  5224. #
  5225. #    The helper must reply to each query using a single line:
  5226. #
  5227. #      [channel-ID <SP>] result [<SP> kv-pairs] <NL>
  5228. #
  5229. #    The result section must match exactly one of the following outcomes:
  5230. #
  5231. #      OK [status=30N] url="..."
  5232. #
  5233. #        Redirect the client to a URL supplied in the 'url' parameter.
  5234. #        Optional 'status' specifies the status code to send to the
  5235. #        client in Squid's HTTP redirect response. It must be one of
  5236. #        the standard HTTP redirect status codes: 301, 302, 303, 307,
  5237. #        or 308. When no specific status is requested, Squid uses 302.
  5238. #
  5239. #      OK rewrite-url="..."
  5240. #
  5241. #        Replace the current request URL with the one supplied in the
  5242. #        'rewrite-url' parameter. Squid fetches the resource specified
  5243. #        by the new URL and forwards the received response (or its
  5244. #        cached copy) to the client.
  5245. #
  5246. #        WARNING: Avoid rewriting URLs! When possible, redirect the
  5247. #        client using an "OK url=..." helper response instead.
  5248. #        Rewriting URLs may create inconsistent requests and/or break
  5249. #        synchronization between internal client and origin server
  5250. #        states, especially when URLs or other message parts contain
  5251. #        snippets of that state. For example, Squid does not adjust
  5252. #        Location headers and embedded URLs after the helper rewrites
  5253. #        the request URL.
  5254. #
  5255. #      OK
  5256. #        Keep the client request intact.
  5257. #
  5258. #      ERR
  5259. #        Keep the client request intact.
  5260. #
  5261. #      BH [message="..."]
  5262. #        A helper problem that should be reported to the Squid admin
  5263. #        via a level-1 cache.log message. The 'message' parameter is
  5264. #        reserved for specifying the log message.
  5265. #
  5266. #    In addition to the kv-pairs mentioned above, Squid also understands
  5267. #    the following optional kv-pairs in URL rewriter responses:
  5268. #
  5269. #      clt_conn_tag=TAG
  5270. #        Associates a TAG with the client TCP connection.
  5271. #
  5272. #        The clt_conn_tag=TAG pair is treated as a regular transaction
  5273. #        annotation for the current request and also annotates future
  5274. #        requests on the same client connection. A helper may update
  5275. #        the TAG during subsequent requests by returning a new kv-pair.
  5276. #
  5277. #
  5278. #    Helper messages contain the channel-ID part if and only if the
  5279. #    url_rewrite_children directive specifies positive concurrency. As a
  5280. #    channel-ID value, Squid sends a number between 0 and concurrency-1.
  5281. #    The helper must echo back the received channel-ID in its response.
  5282. #
  5283. #    By default, Squid does not use a URL rewriter.
  5284. #Default:
  5285. # none
  5286.  
  5287. #  TAG: url_rewrite_children
  5288. #    Specifies the maximum number of redirector processes that Squid may
  5289. #    spawn (numberofchildren) and several related options. Using too few of
  5290. #    these helper processes (a.k.a. "helpers") creates request queues.
  5291. #    Using too many helpers wastes your system resources.
  5292. #
  5293. #    Usage: numberofchildren [option]...
  5294. #
  5295. #    The startup= and idle= options allow some measure of skew in your
  5296. #    tuning.
  5297. #
  5298. #        startup=
  5299. #
  5300. #    Sets a minimum of how many processes are to be spawned when Squid
  5301. #    starts or reconfigures. When set to zero the first request will
  5302. #    cause spawning of the first child process to handle it.
  5303. #
  5304. #    Starting too few will cause an initial slowdown in traffic as Squid
  5305. #    attempts to simultaneously spawn enough processes to cope.
  5306. #
  5307. #        idle=
  5308. #
  5309. #    Sets a minimum of how many processes Squid is to try and keep available
  5310. #    at all times. When traffic begins to rise above what the existing
  5311. #    processes can handle this many more will be spawned up to the maximum
  5312. #    configured. A minimum setting of 1 is required.
  5313. #
  5314. #        concurrency=
  5315. #
  5316. #    The number of requests each redirector helper can handle in
  5317. #    parallel. Defaults to 0 which indicates the redirector
  5318. #    is a old-style single threaded redirector.
  5319. #
  5320. #    When this directive is set to a value >= 1 then the protocol
  5321. #    used to communicate with the helper is modified to include
  5322. #    an ID in front of the request/response. The ID from the request
  5323. #    must be echoed back with the response to that request.
  5324. #
  5325. #        queue-size=N
  5326. #
  5327. #    Sets the maximum number of queued requests. A request is queued when
  5328. #    no existing child can accept it due to concurrency limit and no new
  5329. #    child can be started due to numberofchildren limit. The default
  5330. #    maximum is zero if url_rewrite_bypass is enabled and
  5331. #    2*numberofchildren otherwise. If the queued requests exceed queue size
  5332. #    and redirector_bypass configuration option is set, then redirector is
  5333. #    bypassed. Otherwise, Squid is allowed to temporarily exceed the
  5334. #    configured maximum, marking the affected helper as "overloaded". If
  5335. #    the helper overload lasts more than 3 minutes, the action prescribed
  5336. #    by the on-persistent-overload option applies.
  5337. #
  5338. #        on-persistent-overload=action
  5339. #
  5340. #    Specifies Squid reaction to a new helper request arriving when the helper
  5341. #    has been overloaded for more that 3 minutes already. The number of queued
  5342. #    requests determines whether the helper is overloaded (see the queue-size
  5343. #    option).
  5344. #
  5345. #    Two actions are supported:
  5346. #
  5347. #      die    Squid worker quits. This is the default behavior.
  5348. #
  5349. #      ERR    Squid treats the helper request as if it was
  5350. #        immediately submitted, and the helper immediately
  5351. #        replied with an ERR response. This action has no effect
  5352. #        on the already queued and in-progress helper requests.
  5353. #Default:
  5354. # url_rewrite_children 20 startup=0 idle=1 concurrency=0
  5355.  
  5356. #  TAG: url_rewrite_host_header
  5357. #    To preserve same-origin security policies in browsers and
  5358. #    prevent Host: header forgery by redirectors Squid rewrites
  5359. #    any Host: header in redirected requests.
  5360. #
  5361. #    If you are running an accelerator this may not be a wanted
  5362. #    effect of a redirector. This directive enables you disable
  5363. #    Host: alteration in reverse-proxy traffic.
  5364. #
  5365. #    WARNING: Entries are cached on the result of the URL rewriting
  5366. #    process, so be careful if you have domain-virtual hosts.
  5367. #
  5368. #    WARNING: Squid and other software verifies the URL and Host
  5369. #    are matching, so be careful not to relay through other proxies
  5370. #    or inspecting firewalls with this disabled.
  5371. #Default:
  5372. # url_rewrite_host_header on
  5373.  
  5374. #  TAG: url_rewrite_access
  5375. #    If defined, this access list specifies which requests are
  5376. #    sent to the redirector processes.
  5377. #
  5378. #    This clause supports both fast and slow acl types.
  5379. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  5380. #Default:
  5381. # Allow, unless rules exist in squid.conf.
  5382.  
  5383. #  TAG: url_rewrite_bypass
  5384. #    When this is 'on', a request will not go through the
  5385. #    redirector if all the helpers are busy. If this is 'off' and the
  5386. #    redirector queue grows too large, the action is prescribed by the
  5387. #    on-persistent-overload option. You should only enable this if the
  5388. #    redirectors are not critical to your caching system. If you use
  5389. #    redirectors for access control, and you enable this option,
  5390. #    users may have access to pages they should not
  5391. #    be allowed to request.
  5392. #
  5393. #    Enabling this option sets the default url_rewrite_children queue-size
  5394. #    option value to 0.
  5395. #Default:
  5396. # url_rewrite_bypass off
  5397.  
  5398. #  TAG: url_rewrite_extras
  5399. #    Specifies a string to be append to request line format for the
  5400. #    rewriter helper. "Quoted" format values may contain spaces and
  5401. #    logformat %macros. In theory, any logformat %macro can be used.
  5402. #    In practice, a %macro expands as a dash (-) if the helper request is
  5403. #    sent before the required macro information is available to Squid.
  5404. #Default:
  5405. # url_rewrite_extras "%>a/%>A %un %>rm myip=%la myport=%lp"
  5406.  
  5407. #  TAG: url_rewrite_timeout
  5408. #    Squid times active requests to redirector. The timeout value and Squid
  5409. #    reaction to a timed out request are configurable using the following
  5410. #    format:
  5411. #
  5412. #    url_rewrite_timeout timeout time-units on_timeout=<action> [response=<quoted-response>]
  5413. #
  5414. #    supported timeout actions:
  5415. #        fail    Squid return a ERR_GATEWAY_FAILURE error page
  5416. #
  5417. #        bypass    Do not re-write the URL
  5418. #
  5419. #        retry    Send the lookup to the helper again
  5420. #
  5421. #        use_configured_response
  5422. #            Use the <quoted-response> as helper response
  5423. #Default:
  5424. # Squid waits for the helper response forever
  5425.  
  5426. # OPTIONS FOR STORE ID
  5427. # -----------------------------------------------------------------------------
  5428.  
  5429. #  TAG: store_id_program
  5430. #    Specify the location of the executable StoreID helper to use.
  5431. #    Since they can perform almost any function there isn't one included.
  5432. #
  5433. #    For each requested URL, the helper will receive one line with the format
  5434. #
  5435. #      [channel-ID <SP>] URL [<SP> extras]<NL>
  5436. #
  5437. #
  5438. #    After processing the request the helper must reply using the following format:
  5439. #
  5440. #      [channel-ID <SP>] result [<SP> kv-pairs]
  5441. #
  5442. #    The result code can be:
  5443. #
  5444. #      OK store-id="..."
  5445. #        Use the StoreID supplied in 'store-id='.
  5446. #
  5447. #      ERR
  5448. #        The default is to use HTTP request URL as the store ID.
  5449. #
  5450. #      BH
  5451. #        An internal error occurred in the helper, preventing
  5452. #        a result being identified.
  5453. #
  5454. #    In addition to the above kv-pairs Squid also understands the following
  5455. #    optional kv-pairs received from URL rewriters:
  5456. #      clt_conn_tag=TAG
  5457. #        Associates a TAG with the client TCP connection.
  5458. #        Please see url_rewrite_program related documentation for this
  5459. #        kv-pair
  5460. #
  5461. #    Helper programs should be prepared to receive and possibly ignore
  5462. #    additional whitespace-separated tokens on each input line.
  5463. #
  5464. #    When using the concurrency= option the protocol is changed by
  5465. #    introducing a query channel tag in front of the request/response.
  5466. #    The query channel tag is a number between 0 and concurrency-1.
  5467. #    This value must be echoed back unchanged to Squid as the first part
  5468. #    of the response relating to its request.
  5469. #
  5470. #    NOTE: when using StoreID refresh_pattern will apply to the StoreID
  5471. #          returned from the helper and not the URL.
  5472. #
  5473. #    WARNING: Wrong StoreID value returned by a careless helper may result
  5474. #             in the wrong cached response returned to the user.
  5475. #
  5476. #    By default, a StoreID helper is not used.
  5477. #Default:
  5478. # none
  5479.  
  5480. #  TAG: store_id_extras
  5481. #        Specifies a string to be append to request line format for the
  5482. #        StoreId helper. "Quoted" format values may contain spaces and
  5483. #        logformat %macros. In theory, any logformat %macro can be used.
  5484. #        In practice, a %macro expands as a dash (-) if the helper request is
  5485. #        sent before the required macro information is available to Squid.
  5486. #Default:
  5487. # store_id_extras "%>a/%>A %un %>rm myip=%la myport=%lp"
  5488.  
  5489. #  TAG: store_id_children
  5490. #    Specifies the maximum number of StoreID helper processes that Squid
  5491. #    may spawn (numberofchildren) and several related options. Using
  5492. #    too few of these helper processes (a.k.a. "helpers") creates request
  5493. #    queues. Using too many helpers wastes your system resources.
  5494. #
  5495. #    Usage: numberofchildren [option]...
  5496. #
  5497. #    The startup= and idle= options allow some measure of skew in your
  5498. #    tuning.
  5499. #
  5500. #        startup=
  5501. #
  5502. #    Sets a minimum of how many processes are to be spawned when Squid
  5503. #    starts or reconfigures. When set to zero the first request will
  5504. #    cause spawning of the first child process to handle it.
  5505. #
  5506. #    Starting too few will cause an initial slowdown in traffic as Squid
  5507. #    attempts to simultaneously spawn enough processes to cope.
  5508. #
  5509. #        idle=
  5510. #
  5511. #    Sets a minimum of how many processes Squid is to try and keep available
  5512. #    at all times. When traffic begins to rise above what the existing
  5513. #    processes can handle this many more will be spawned up to the maximum
  5514. #    configured. A minimum setting of 1 is required.
  5515. #
  5516. #        concurrency=
  5517. #
  5518. #    The number of requests each storeID helper can handle in
  5519. #    parallel. Defaults to 0 which indicates the helper
  5520. #    is a old-style single threaded program.
  5521. #
  5522. #    When this directive is set to a value >= 1 then the protocol
  5523. #    used to communicate with the helper is modified to include
  5524. #    an ID in front of the request/response. The ID from the request
  5525. #    must be echoed back with the response to that request.
  5526. #
  5527. #        queue-size=N
  5528. #
  5529. #    Sets the maximum number of queued requests to N. A request is queued
  5530. #    when no existing child can accept it due to concurrency limit and no
  5531. #    new child can be started due to numberofchildren limit. The default
  5532. #    maximum is 2*numberofchildren. If the queued requests exceed queue
  5533. #    size and redirector_bypass configuration option is set, then
  5534. #    redirector is bypassed. Otherwise, Squid is allowed to temporarily
  5535. #    exceed the configured maximum, marking the affected helper as
  5536. #    "overloaded". If the helper overload lasts more than 3 minutes, the
  5537. #    action prescribed by the on-persistent-overload option applies.
  5538. #
  5539. #        on-persistent-overload=action
  5540. #
  5541. #    Specifies Squid reaction to a new helper request arriving when the helper
  5542. #    has been overloaded for more that 3 minutes already. The number of queued
  5543. #    requests determines whether the helper is overloaded (see the queue-size
  5544. #    option).
  5545. #
  5546. #    Two actions are supported:
  5547. #
  5548. #      die    Squid worker quits. This is the default behavior.
  5549. #
  5550. #      ERR    Squid treats the helper request as if it was
  5551. #        immediately submitted, and the helper immediately
  5552. #        replied with an ERR response. This action has no effect
  5553. #        on the already queued and in-progress helper requests.
  5554. #Default:
  5555. # store_id_children 20 startup=0 idle=1 concurrency=0
  5556.  
  5557. #  TAG: store_id_access
  5558. #    If defined, this access list specifies which requests are
  5559. #    sent to the StoreID processes.  By default all requests
  5560. #    are sent.
  5561. #
  5562. #    This clause supports both fast and slow acl types.
  5563. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  5564. #Default:
  5565. # Allow, unless rules exist in squid.conf.
  5566.  
  5567. #  TAG: store_id_bypass
  5568. #    When this is 'on', a request will not go through the
  5569. #    helper if all helpers are busy. If this is 'off' and the helper
  5570. #    queue grows too large, the action is prescribed by the
  5571. #    on-persistent-overload option. You should only enable this if the
  5572. #    helpers are not critical to your caching system. If you use
  5573. #    helpers for critical caching components, and you enable this
  5574. #    option,    users may not get objects from cache.
  5575. #    This options sets default queue-size option of the store_id_children
  5576. #    to 0.
  5577. #Default:
  5578. # store_id_bypass on
  5579.  
  5580. # OPTIONS FOR TUNING THE CACHE
  5581. # -----------------------------------------------------------------------------
  5582.  
  5583. #  TAG: cache
  5584. #    Requests denied by this directive will not be served from the cache
  5585. #    and their responses will not be stored in the cache. This directive
  5586. #    has no effect on other transactions and on already cached responses.
  5587. #
  5588. #    This clause supports both fast and slow acl types.
  5589. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  5590. #
  5591. #    This and the two other similar caching directives listed below are
  5592. #    checked at different transaction processing stages, have different
  5593. #    access to response information, affect different cache operations,
  5594. #    and differ in slow ACLs support:
  5595. #
  5596. #    * cache: Checked before Squid makes a hit/miss determination.
  5597. #        No access to reply information!
  5598. #        Denies both serving a hit and storing a miss.
  5599. #        Supports both fast and slow ACLs.
  5600. #    * send_hit: Checked after a hit was detected.
  5601. #        Has access to reply (hit) information.
  5602. #        Denies serving a hit only.
  5603. #        Supports fast ACLs only.
  5604. #    * store_miss: Checked before storing a cachable miss.
  5605. #        Has access to reply (miss) information.
  5606. #        Denies storing a miss only.
  5607. #        Supports fast ACLs only.
  5608. #
  5609. #    If you are not sure which of the three directives to use, apply the
  5610. #    following decision logic:
  5611. #
  5612. #    * If your ACL(s) are of slow type _and_ need response info, redesign.
  5613. #      Squid does not support that particular combination at this time.
  5614. #        Otherwise:
  5615. #    * If your directive ACL(s) are of slow type, use "cache"; and/or
  5616. #    * if your directive ACL(s) need no response info, use "cache".
  5617. #        Otherwise:
  5618. #    * If you do not want the response cached, use store_miss; and/or
  5619. #    * if you do not want a hit on a cached response, use send_hit.
  5620. #Default:
  5621. # By default, this directive is unused and has no effect.
  5622.  
  5623. #  TAG: send_hit
  5624. #    Responses denied by this directive will not be served from the cache
  5625. #    (but may still be cached, see store_miss). This directive has no
  5626. #    effect on the responses it allows and on the cached objects.
  5627. #
  5628. #    Please see the "cache" directive for a summary of differences among
  5629. #    store_miss, send_hit, and cache directives.
  5630. #
  5631. #    Unlike the "cache" directive, send_hit only supports fast acl
  5632. #    types.  See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  5633. #
  5634. #    For example:
  5635. #
  5636. #        # apply custom Store ID mapping to some URLs
  5637. #        acl MapMe dstdomain .c.example.com
  5638. #        store_id_program ...
  5639. #        store_id_access allow MapMe
  5640. #
  5641. #        # but prevent caching of special responses
  5642. #        # such as 302 redirects that cause StoreID loops
  5643. #        acl Ordinary http_status 200-299
  5644. #        store_miss deny MapMe !Ordinary
  5645. #
  5646. #        # and do not serve any previously stored special responses
  5647. #        # from the cache (in case they were already cached before
  5648. #        # the above store_miss rule was in effect).
  5649. #        send_hit deny MapMe !Ordinary
  5650. #Default:
  5651. # By default, this directive is unused and has no effect.
  5652.  
  5653. #  TAG: store_miss
  5654. #    Responses denied by this directive will not be cached (but may still
  5655. #    be served from the cache, see send_hit). This directive has no
  5656. #    effect on the responses it allows and on the already cached responses.
  5657. #
  5658. #    Please see the "cache" directive for a summary of differences among
  5659. #    store_miss, send_hit, and cache directives. See the
  5660. #    send_hit directive for a usage example.
  5661. #
  5662. #    Unlike the "cache" directive, store_miss only supports fast acl
  5663. #    types.  See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  5664. #Default:
  5665. # By default, this directive is unused and has no effect.
  5666.  
  5667. #  TAG: max_stale    time-units
  5668. #    This option puts an upper limit on how stale content Squid
  5669. #    will serve from the cache if cache validation fails.
  5670. #    Can be overriden by the refresh_pattern max-stale option.
  5671. #Default:
  5672. # max_stale 1 week
  5673.  
  5674. #  TAG: refresh_pattern
  5675. #    usage: refresh_pattern [-i] regex min percent max [options]
  5676. #
  5677. #    By default, regular expressions are CASE-SENSITIVE.  To make
  5678. #    them case-insensitive, use the -i option.
  5679. #
  5680. #    'Min' is the time (in minutes) an object without an explicit
  5681. #    expiry time should be considered fresh. The recommended
  5682. #    value is 0, any higher values may cause dynamic applications
  5683. #    to be erroneously cached unless the application designer
  5684. #    has taken the appropriate actions.
  5685. #
  5686. #    'Percent' is a percentage of the objects age (time since last
  5687. #    modification age) an object without explicit expiry time
  5688. #    will be considered fresh.
  5689. #
  5690. #    'Max' is an upper limit on how long objects without an explicit
  5691. #    expiry time will be considered fresh. The value is also used
  5692. #    to form Cache-Control: max-age header for a request sent from
  5693. #    Squid to origin/parent.
  5694. #
  5695. #    options: override-expire
  5696. #         override-lastmod
  5697. #         reload-into-ims
  5698. #         ignore-reload
  5699. #         ignore-no-store
  5700. #         ignore-private
  5701. #         max-stale=NN
  5702. #         refresh-ims
  5703. #         store-stale
  5704. #
  5705. #        override-expire enforces min age even if the server
  5706. #        sent an explicit expiry time (e.g., with the
  5707. #        Expires: header or Cache-Control: max-age). Doing this
  5708. #        VIOLATES the HTTP standard.  Enabling this feature
  5709. #        could make you liable for problems which it causes.
  5710. #
  5711. #        Note: override-expire does not enforce staleness - it only extends
  5712. #        freshness / min. If the server returns a Expires time which
  5713. #        is longer than your max time, Squid will still consider
  5714. #        the object fresh for that period of time.
  5715. #
  5716. #        override-lastmod enforces min age even on objects
  5717. #        that were modified recently.
  5718. #
  5719. #        reload-into-ims changes a client no-cache or ``reload''
  5720. #        request for a cached entry into a conditional request using
  5721. #        If-Modified-Since and/or If-None-Match headers, provided the
  5722. #        cached entry has a Last-Modified and/or a strong ETag header.
  5723. #        Doing this VIOLATES the HTTP standard. Enabling this feature
  5724. #        could make you liable for problems which it causes.
  5725. #
  5726. #        ignore-reload ignores a client no-cache or ``reload''
  5727. #        header. Doing this VIOLATES the HTTP standard. Enabling
  5728. #        this feature could make you liable for problems which
  5729. #        it causes.
  5730. #
  5731. #        ignore-no-store ignores any ``Cache-control: no-store''
  5732. #        headers received from a server. Doing this VIOLATES
  5733. #        the HTTP standard. Enabling this feature could make you
  5734. #        liable for problems which it causes.
  5735. #
  5736. #        ignore-private ignores any ``Cache-control: private''
  5737. #        headers received from a server. Doing this VIOLATES
  5738. #        the HTTP standard. Enabling this feature could make you
  5739. #        liable for problems which it causes.
  5740. #
  5741. #        refresh-ims causes squid to contact the origin server
  5742. #        when a client issues an If-Modified-Since request. This
  5743. #        ensures that the client will receive an updated version
  5744. #        if one is available.
  5745. #
  5746. #        store-stale stores responses even if they don't have explicit
  5747. #        freshness or a validator (i.e., Last-Modified or an ETag)
  5748. #        present, or if they're already stale. By default, Squid will
  5749. #        not cache such responses because they usually can't be
  5750. #        reused. Note that such responses will be stale by default.
  5751. #
  5752. #        max-stale=NN provide a maximum staleness factor. Squid won't
  5753. #        serve objects more stale than this even if it failed to
  5754. #        validate the object. Default: use the max_stale global limit.
  5755. #
  5756. #    Basically a cached object is:
  5757. #
  5758. #        FRESH if expire > now, else STALE
  5759. #        STALE if age > max
  5760. #        FRESH if lm-factor < percent, else STALE
  5761. #        FRESH if age < min
  5762. #        else STALE
  5763. #
  5764. #    The refresh_pattern lines are checked in the order listed here.
  5765. #    The first entry which matches is used.  If none of the entries
  5766. #    match the default will be used.
  5767. #
  5768. #    Note, you must uncomment all the default lines if you want
  5769. #    to change one. The default setting is only active if none is
  5770. #    used.
  5771. #
  5772. #
  5773.  
  5774. #  TAG: quick_abort_min    (KB)
  5775. #Default:
  5776. # quick_abort_min 16 KB
  5777.  
  5778. #  TAG: quick_abort_max    (KB)
  5779. #Default:
  5780. # quick_abort_max 16 KB
  5781.  
  5782. #  TAG: quick_abort_pct    (percent)
  5783. #    The cache by default continues downloading aborted requests
  5784. #    which are almost completed (less than 16 KB remaining). This
  5785. #    may be undesirable on slow (e.g. SLIP) links and/or very busy
  5786. #    caches.  Impatient users may tie up file descriptors and
  5787. #    bandwidth by repeatedly requesting and immediately aborting
  5788. #    downloads.
  5789. #
  5790. #    When the user aborts a request, Squid will check the
  5791. #    quick_abort values to the amount of data transferred until
  5792. #    then.
  5793. #
  5794. #    If the transfer has less than 'quick_abort_min' KB remaining,
  5795. #    it will finish the retrieval.
  5796. #
  5797. #    If the transfer has more than 'quick_abort_max' KB remaining,
  5798. #    it will abort the retrieval.
  5799. #
  5800. #    If more than 'quick_abort_pct' of the transfer has completed,
  5801. #    it will finish the retrieval.
  5802. #
  5803. #    If you do not want any retrieval to continue after the client
  5804. #    has aborted, set both 'quick_abort_min' and 'quick_abort_max'
  5805. #    to '0 KB'.
  5806. #
  5807. #    If you want retrievals to always continue if they are being
  5808. #    cached set 'quick_abort_min' to '-1 KB'.
  5809. #Default:
  5810. # quick_abort_pct 95
  5811.  
  5812. #  TAG: read_ahead_gap    buffer-size
  5813. #    The amount of data the cache will buffer ahead of what has been
  5814. #    sent to the client when retrieving an object from another server.
  5815. #Default:
  5816. # read_ahead_gap 16 KB
  5817.  
  5818. #  TAG: negative_ttl    time-units
  5819. #    Set the Default Time-to-Live (TTL) for failed requests.
  5820. #    Certain types of failures (such as "connection refused" and
  5821. #    "404 Not Found") are able to be negatively-cached for a short time.
  5822. #    Modern web servers should provide Expires: header, however if they
  5823. #    do not this can provide a minimum TTL.
  5824. #    The default is not to cache errors with unknown expiry details.
  5825. #
  5826. #    Note that this is different from negative caching of DNS lookups.
  5827. #
  5828. #    WARNING: Doing this VIOLATES the HTTP standard.  Enabling
  5829. #    this feature could make you liable for problems which it
  5830. #    causes.
  5831. #Default:
  5832. # negative_ttl 0 seconds
  5833.  
  5834. #  TAG: positive_dns_ttl    time-units
  5835. #    Upper limit on how long Squid will cache positive DNS responses.
  5836. #    Default is 6 hours (360 minutes). This directive must be set
  5837. #    larger than negative_dns_ttl.
  5838. #Default:
  5839. # positive_dns_ttl 6 hours
  5840.  
  5841. #  TAG: negative_dns_ttl    time-units
  5842. #    Time-to-Live (TTL) for negative caching of failed DNS lookups.
  5843. #    This also sets the lower cache limit on positive lookups.
  5844. #    Minimum value is 1 second, and it is not recommendable to go
  5845. #    much below 10 seconds.
  5846. #Default:
  5847. # negative_dns_ttl 1 minutes
  5848.  
  5849. #  TAG: range_offset_limit    size [acl acl...]
  5850. #    usage: (size) [units] [[!]aclname]
  5851. #
  5852. #    Sets an upper limit on how far (number of bytes) into the file
  5853. #    a Range request    may be to cause Squid to prefetch the whole file.
  5854. #    If beyond this limit, Squid forwards the Range request as it is and
  5855. #    the result is NOT cached.
  5856. #
  5857. #    This is to stop a far ahead range request (lets say start at 17MB)
  5858. #    from making Squid fetch the whole object up to that point before
  5859. #    sending anything to the client.
  5860. #
  5861. #    Multiple range_offset_limit lines may be specified, and they will
  5862. #    be searched from top to bottom on each request until a match is found.
  5863. #    The first match found will be used.  If no line matches a request, the
  5864. #    default limit of 0 bytes will be used.
  5865. #
  5866. #    'size' is the limit specified as a number of units.
  5867. #
  5868. #    'units' specifies whether to use bytes, KB, MB, etc.
  5869. #    If no units are specified bytes are assumed.
  5870. #
  5871. #    A size of 0 causes Squid to never fetch more than the
  5872. #    client requested. (default)
  5873. #
  5874. #    A size of 'none' causes Squid to always fetch the object from the
  5875. #    beginning so it may cache the result. (2.0 style)
  5876. #
  5877. #    'aclname' is the name of a defined ACL.
  5878. #
  5879. #    NP: Using 'none' as the byte value here will override any quick_abort settings
  5880. #        that may otherwise apply to the range request. The range request will
  5881. #        be fully fetched from start to finish regardless of the client
  5882. #        actions. This affects bandwidth usage.
  5883. #Default:
  5884. # none
  5885.  
  5886. #  TAG: minimum_expiry_time    (seconds)
  5887. #    The minimum caching time according to (Expires - Date)
  5888. #    headers Squid honors if the object can't be revalidated.
  5889. #    The default is 60 seconds.
  5890. #
  5891. #    In reverse proxy environments it might be desirable to honor
  5892. #    shorter object lifetimes. It is most likely better to make
  5893. #    your server return a meaningful Last-Modified header however.
  5894. #
  5895. #    In ESI environments where page fragments often have short
  5896. #    lifetimes, this will often be best set to 0.
  5897. #Default:
  5898. # minimum_expiry_time 60 seconds
  5899.  
  5900. #  TAG: store_avg_object_size    (bytes)
  5901. #    Average object size, used to estimate number of objects your
  5902. #    cache can hold.  The default is 13 KB.
  5903. #
  5904. #    This is used to pre-seed the cache index memory allocation to
  5905. #    reduce expensive reallocate operations while handling clients
  5906. #    traffic. Too-large values may result in memory allocation during
  5907. #    peak traffic, too-small values will result in wasted memory.
  5908. #
  5909. #    Check the cache manager 'info' report metrics for the real
  5910. #    object sizes seen by your Squid before tuning this.
  5911. #Default:
  5912. # store_avg_object_size 13 KB
  5913.  
  5914. #  TAG: store_objects_per_bucket
  5915. #    Target number of objects per bucket in the store hash table.
  5916. #    Lowering this value increases the total number of buckets and
  5917. #    also the storage maintenance rate.  The default is 20.
  5918. #Default:
  5919. # store_objects_per_bucket 20
  5920.  
  5921. # HTTP OPTIONS
  5922. # -----------------------------------------------------------------------------
  5923.  
  5924. #  TAG: request_header_max_size    (KB)
  5925. #    This specifies the maximum size for HTTP headers in a request.
  5926. #    Request headers are usually relatively small (about 512 bytes).
  5927. #    Placing a limit on the request header size will catch certain
  5928. #    bugs (for example with persistent connections) and possibly
  5929. #    buffer-overflow or denial-of-service attacks.
  5930. #Default:
  5931. # request_header_max_size 64 KB
  5932.  
  5933. #  TAG: reply_header_max_size    (KB)
  5934. #    This specifies the maximum size for HTTP headers in a reply.
  5935. #    Reply headers are usually relatively small (about 512 bytes).
  5936. #    Placing a limit on the reply header size will catch certain
  5937. #    bugs (for example with persistent connections) and possibly
  5938. #    buffer-overflow or denial-of-service attacks.
  5939. #Default:
  5940. # reply_header_max_size 64 KB
  5941.  
  5942. #  TAG: request_body_max_size    (bytes)
  5943. #    This specifies the maximum size for an HTTP request body.
  5944. #    In other words, the maximum size of a PUT/POST request.
  5945. #    A user who attempts to send a request with a body larger
  5946. #    than this limit receives an "Invalid Request" error message.
  5947. #    If you set this parameter to a zero (the default), there will
  5948. #    be no limit imposed.
  5949. #
  5950. #    See also client_request_buffer_max_size for an alternative
  5951. #    limitation on client uploads which can be configured.
  5952. #Default:
  5953. # No limit.
  5954.  
  5955. #  TAG: client_request_buffer_max_size    (bytes)
  5956. #    This specifies the maximum buffer size of a client request.
  5957. #    It prevents squid eating too much memory when somebody uploads
  5958. #    a large file.
  5959. #Default:
  5960. # client_request_buffer_max_size 512 KB
  5961.  
  5962. #  TAG: broken_posts
  5963. #    A list of ACL elements which, if matched, causes Squid to send
  5964. #    an extra CRLF pair after the body of a PUT/POST request.
  5965. #
  5966. #    Some HTTP servers has broken implementations of PUT/POST,
  5967. #    and rely on an extra CRLF pair sent by some WWW clients.
  5968. #
  5969. #    Quote from RFC2616 section 4.1 on this matter:
  5970. #
  5971. #      Note: certain buggy HTTP/1.0 client implementations generate an
  5972. #      extra CRLF's after a POST request. To restate what is explicitly
  5973. #      forbidden by the BNF, an HTTP/1.1 client must not preface or follow
  5974. #      a request with an extra CRLF.
  5975. #
  5976. #    This clause only supports fast acl types.
  5977. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  5978. #
  5979. #Example:
  5980. # acl buggy_server url_regex ^http://....
  5981. # broken_posts allow buggy_server
  5982. #Default:
  5983. # Obey RFC 2616.
  5984.  
  5985. #  TAG: adaptation_uses_indirect_client    on|off
  5986. #    Controls whether the indirect client IP address (instead of the direct
  5987. #    client IP address) is passed to adaptation services.
  5988. #
  5989. #    See also: follow_x_forwarded_for adaptation_send_client_ip
  5990. #Default:
  5991. # adaptation_uses_indirect_client on
  5992.  
  5993. #  TAG: via    on|off
  5994. #    If set (default), Squid will include a Via header in requests and
  5995. #    replies as required by RFC2616.
  5996. #Default:
  5997. # via on
  5998.  
  5999. #  TAG: vary_ignore_expire    on|off
  6000. #    Many HTTP servers supporting Vary gives such objects
  6001. #    immediate expiry time with no cache-control header
  6002. #    when requested by a HTTP/1.0 client. This option
  6003. #    enables Squid to ignore such expiry times until
  6004. #    HTTP/1.1 is fully implemented.
  6005. #
  6006. #    WARNING: If turned on this may eventually cause some
  6007. #    varying objects not intended for caching to get cached.
  6008. #Default:
  6009. # vary_ignore_expire off
  6010.  
  6011. #  TAG: request_entities
  6012. #    Squid defaults to deny GET and HEAD requests with request entities,
  6013. #    as the meaning of such requests are undefined in the HTTP standard
  6014. #    even if not explicitly forbidden.
  6015. #
  6016. #    Set this directive to on if you have clients which insists
  6017. #    on sending request entities in GET or HEAD requests. But be warned
  6018. #    that there is server software (both proxies and web servers) which
  6019. #    can fail to properly process this kind of request which may make you
  6020. #    vulnerable to cache pollution attacks if enabled.
  6021. #Default:
  6022. # request_entities off
  6023.  
  6024. #  TAG: request_header_access
  6025. #    Usage: request_header_access header_name allow|deny [!]aclname ...
  6026. #
  6027. #    WARNING: Doing this VIOLATES the HTTP standard.  Enabling
  6028. #    this feature could make you liable for problems which it
  6029. #    causes.
  6030. #
  6031. #    This option replaces the old 'anonymize_headers' and the
  6032. #    older 'http_anonymizer' option with something that is much
  6033. #    more configurable. A list of ACLs for each header name allows
  6034. #    removal of specific header fields under specific conditions.
  6035. #
  6036. #    This option only applies to outgoing HTTP request headers (i.e.,
  6037. #    headers sent by Squid to the next HTTP hop such as a cache peer
  6038. #    or an origin server). The option has no effect during cache hit
  6039. #    detection. The equivalent adaptation vectoring point in ICAP
  6040. #    terminology is post-cache REQMOD.
  6041. #
  6042. #    The option is applied to individual outgoing request header
  6043. #    fields. For each request header field F, Squid uses the first
  6044. #    qualifying sets of request_header_access rules:
  6045. #
  6046. #        1. Rules with header_name equal to F's name.
  6047. #        2. Rules with header_name 'Other', provided F's name is not
  6048. #           on the hard-coded list of commonly used HTTP header names.
  6049. #        3. Rules with header_name 'All'.
  6050. #
  6051. #    Within that qualifying rule set, rule ACLs are checked as usual.
  6052. #    If ACLs of an "allow" rule match, the header field is allowed to
  6053. #    go through as is. If ACLs of a "deny" rule match, the header is
  6054. #    removed and request_header_replace is then checked to identify
  6055. #    if the removed header has a replacement. If no rules within the
  6056. #    set have matching ACLs, the header field is left as is.
  6057. #
  6058. #    For example, to achieve the same behavior as the old
  6059. #    'http_anonymizer standard' option, you should use:
  6060. #
  6061. #        request_header_access From deny all
  6062. #        request_header_access Referer deny all
  6063. #        request_header_access User-Agent deny all
  6064. #
  6065. #    Or, to reproduce the old 'http_anonymizer paranoid' feature
  6066. #    you should use:
  6067. #
  6068. #        request_header_access Authorization allow all
  6069. #        request_header_access Proxy-Authorization allow all
  6070. #        request_header_access Cache-Control allow all
  6071. #        request_header_access Content-Length allow all
  6072. #        request_header_access Content-Type allow all
  6073. #        request_header_access Date allow all
  6074. #        request_header_access Host allow all
  6075. #        request_header_access If-Modified-Since allow all
  6076. #        request_header_access Pragma allow all
  6077. #        request_header_access Accept allow all
  6078. #        request_header_access Accept-Charset allow all
  6079. #        request_header_access Accept-Encoding allow all
  6080. #        request_header_access Accept-Language allow all
  6081. #        request_header_access Connection allow all
  6082. #        request_header_access All deny all
  6083. #
  6084. #    HTTP reply headers are controlled with the reply_header_access directive.
  6085. #
  6086. #    By default, all headers are allowed (no anonymizing is performed).
  6087. #Default:
  6088. # No limits.
  6089.  
  6090. #  TAG: reply_header_access
  6091. #    Usage: reply_header_access header_name allow|deny [!]aclname ...
  6092. #
  6093. #    WARNING: Doing this VIOLATES the HTTP standard.  Enabling
  6094. #    this feature could make you liable for problems which it
  6095. #    causes.
  6096. #
  6097. #    This option only applies to reply headers, i.e., from the
  6098. #    server to the client.
  6099. #
  6100. #    This is the same as request_header_access, but in the other
  6101. #    direction. Please see request_header_access for detailed
  6102. #    documentation.
  6103. #
  6104. #    For example, to achieve the same behavior as the old
  6105. #    'http_anonymizer standard' option, you should use:
  6106. #
  6107. #        reply_header_access Server deny all
  6108. #        reply_header_access WWW-Authenticate deny all
  6109. #        reply_header_access Link deny all
  6110. #
  6111. #    Or, to reproduce the old 'http_anonymizer paranoid' feature
  6112. #    you should use:
  6113. #
  6114. #        reply_header_access Allow allow all
  6115. #        reply_header_access WWW-Authenticate allow all
  6116. #        reply_header_access Proxy-Authenticate allow all
  6117. #        reply_header_access Cache-Control allow all
  6118. #        reply_header_access Content-Encoding allow all
  6119. #        reply_header_access Content-Length allow all
  6120. #        reply_header_access Content-Type allow all
  6121. #        reply_header_access Date allow all
  6122. #        reply_header_access Expires allow all
  6123. #        reply_header_access Last-Modified allow all
  6124. #        reply_header_access Location allow all
  6125. #        reply_header_access Pragma allow all
  6126. #        reply_header_access Content-Language allow all
  6127. #        reply_header_access Retry-After allow all
  6128. #        reply_header_access Title allow all
  6129. #        reply_header_access Content-Disposition allow all
  6130. #        reply_header_access Connection allow all
  6131. #        reply_header_access All deny all
  6132. #
  6133. #    HTTP request headers are controlled with the request_header_access directive.
  6134. #
  6135. #    By default, all headers are allowed (no anonymizing is
  6136. #    performed).
  6137. #Default:
  6138. # No limits.
  6139.  
  6140. #  TAG: request_header_replace
  6141. #    Usage:   request_header_replace header_name message
  6142. #    Example: request_header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
  6143. #
  6144. #    This option allows you to change the contents of headers
  6145. #    denied with request_header_access above, by replacing them
  6146. #    with some fixed string.
  6147. #
  6148. #    This only applies to request headers, not reply headers.
  6149. #
  6150. #    By default, headers are removed if denied.
  6151. #Default:
  6152. # none
  6153.  
  6154. #  TAG: reply_header_replace
  6155. #        Usage:   reply_header_replace header_name message
  6156. #        Example: reply_header_replace Server Foo/1.0
  6157. #
  6158. #        This option allows you to change the contents of headers
  6159. #        denied with reply_header_access above, by replacing them
  6160. #        with some fixed string.
  6161. #
  6162. #        This only applies to reply headers, not request headers.
  6163. #
  6164. #        By default, headers are removed if denied.
  6165. #Default:
  6166. # none
  6167.  
  6168. #  TAG: request_header_add
  6169. #    Usage:   request_header_add field-name field-value [ acl ... ]
  6170. #    Example: request_header_add X-Client-CA "CA=%ssl::>cert_issuer" all
  6171. #
  6172. #    This option adds header fields to outgoing HTTP requests (i.e.,
  6173. #    request headers sent by Squid to the next HTTP hop such as a
  6174. #    cache peer or an origin server). The option has no effect during
  6175. #    cache hit detection. The equivalent adaptation vectoring point
  6176. #    in ICAP terminology is post-cache REQMOD.
  6177. #
  6178. #    Field-name is a token specifying an HTTP header name. If a
  6179. #    standard HTTP header name is used, Squid does not check whether
  6180. #    the new header conflicts with any existing headers or violates
  6181. #    HTTP rules. If the request to be modified already contains a
  6182. #    field with the same name, the old field is preserved but the
  6183. #    header field values are not merged.
  6184. #
  6185. #    Field-value is either a token or a quoted string. If quoted
  6186. #    string format is used, then the surrounding quotes are removed
  6187. #    while escape sequences and %macros are processed.
  6188. #
  6189. #    One or more Squid ACLs may be specified to restrict header
  6190. #    injection to matching requests. As always in squid.conf, all
  6191. #    ACLs in the ACL list must be satisfied for the insertion to
  6192. #    happen. The request_header_add supports fast ACLs only.
  6193. #
  6194. #    See also: reply_header_add.
  6195. #Default:
  6196. # none
  6197.  
  6198. #  TAG: reply_header_add
  6199. #    Usage:   reply_header_add field-name field-value [ acl ... ]
  6200. #    Example: reply_header_add X-Client-CA "CA=%ssl::>cert_issuer" all
  6201. #
  6202. #    This option adds header fields to outgoing HTTP responses (i.e., response
  6203. #    headers delivered by Squid to the client). This option has no effect on
  6204. #    cache hit detection. The equivalent adaptation vectoring point in
  6205. #    ICAP terminology is post-cache RESPMOD. This option does not apply to
  6206. #    successful CONNECT replies.
  6207. #
  6208. #    Field-name is a token specifying an HTTP header name. If a
  6209. #    standard HTTP header name is used, Squid does not check whether
  6210. #    the new header conflicts with any existing headers or violates
  6211. #    HTTP rules. If the response to be modified already contains a
  6212. #    field with the same name, the old field is preserved but the
  6213. #    header field values are not merged.
  6214. #
  6215. #    Field-value is either a token or a quoted string. If quoted
  6216. #    string format is used, then the surrounding quotes are removed
  6217. #    while escape sequences and %macros are processed.
  6218. #
  6219. #    One or more Squid ACLs may be specified to restrict header
  6220. #    injection to matching responses. As always in squid.conf, all
  6221. #    ACLs in the ACL list must be satisfied for the insertion to
  6222. #    happen. The reply_header_add option supports fast ACLs only.
  6223. #
  6224. #    See also: request_header_add.
  6225. #Default:
  6226. # none
  6227.  
  6228. #  TAG: note
  6229. #    This option used to log custom information about the master
  6230. #    transaction. For example, an admin may configure Squid to log
  6231. #    which "user group" the transaction belongs to, where "user group"
  6232. #    will be determined based on a set of ACLs and not [just]
  6233. #    authentication information.
  6234. #    Values of key/value pairs can be logged using %{key}note macros:
  6235. #
  6236. #        note key value acl ...
  6237. #        logformat myFormat ... %{key}note ...
  6238. #
  6239. #    This clause only supports fast acl types.
  6240. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  6241. #Default:
  6242. # none
  6243.  
  6244. #  TAG: relaxed_header_parser    on|off|warn
  6245. #    In the default "on" setting Squid accepts certain forms
  6246. #    of non-compliant HTTP messages where it is unambiguous
  6247. #    what the sending application intended even if the message
  6248. #    is not correctly formatted. The messages is then normalized
  6249. #    to the correct form when forwarded by Squid.
  6250. #
  6251. #    If set to "warn" then a warning will be emitted in cache.log
  6252. #    each time such HTTP error is encountered.
  6253. #
  6254. #    If set to "off" then such HTTP errors will cause the request
  6255. #    or response to be rejected.
  6256. #Default:
  6257. # relaxed_header_parser on
  6258.  
  6259. #  TAG: collapsed_forwarding    (on|off)
  6260. #       This option controls whether Squid is allowed to merge multiple
  6261. #       potentially cachable requests for the same URI before Squid knows
  6262. #       whether the response is going to be cachable.
  6263. #
  6264. #       When enabled, instead of forwarding each concurrent request for
  6265. #       the same URL, Squid just sends the first of them. The other, so
  6266. #       called "collapsed" requests, wait for the response to the first
  6267. #       request and, if it happens to be cachable, use that response.
  6268. #       Here, "concurrent requests" means "received after the first
  6269. #       request headers were parsed and before the corresponding response
  6270. #       headers were parsed".
  6271. #
  6272. #       This feature is disabled by default: enabling collapsed
  6273. #       forwarding needlessly delays forwarding requests that look
  6274. #       cachable (when they are collapsed) but then need to be forwarded
  6275. #       individually anyway because they end up being for uncachable
  6276. #       content. However, in some cases, such as acceleration of highly
  6277. #       cachable content with periodic or grouped expiration times, the
  6278. #       gains from collapsing [large volumes of simultaneous refresh
  6279. #       requests] outweigh losses from such delays.
  6280. #
  6281. #       Squid collapses two kinds of requests: regular client requests
  6282. #       received on one of the listening ports and internal "cache
  6283. #       revalidation" requests which are triggered by those regular
  6284. #       requests hitting a stale cached object. Revalidation collapsing
  6285. #       is currently disabled for Squid instances containing SMP-aware
  6286. #       disk or memory caches and for Vary-controlled cached objects.
  6287. #Default:
  6288. # collapsed_forwarding off
  6289.  
  6290. #  TAG: collapsed_forwarding_access
  6291. #    Use this directive to restrict collapsed forwarding to a subset of
  6292. #    eligible requests. The directive is checked for regular HTTP
  6293. #    requests, internal revalidation requests, and HTCP/ICP requests.
  6294. #
  6295. #        collapsed_forwarding_access allow|deny [!]aclname ...
  6296. #
  6297. #    This directive cannot force collapsing. It has no effect on
  6298. #    collapsing unless collapsed_forwarding is 'on', and all other
  6299. #    collapsing preconditions are satisfied.
  6300. #
  6301. #    * A denied request will not collapse, and future transactions will
  6302. #      not collapse on it (even if they are allowed to collapse).
  6303. #
  6304. #    * An allowed request may collapse, or future transactions may
  6305. #      collapse on it (provided they are allowed to collapse).
  6306. #
  6307. #    This directive is evaluated before receiving HTTP response headers
  6308. #    and without access to Squid-to-peer connection (if any).
  6309. #
  6310. #    Only fast ACLs are supported.
  6311. #
  6312. #    See also: collapsed_forwarding.
  6313. #Default:
  6314. # Requests may be collapsed if collapsed_forwarding is on.
  6315.  
  6316. #  TAG: shared_transient_entries_limit    (number of entries)
  6317. #    This directive limits the size of a table used for sharing current
  6318. #    transaction information among SMP workers. A table entry stores meta
  6319. #    information about a single cache entry being delivered to Squid
  6320. #    client(s) by one or more SMP workers. A single table entry consumes
  6321. #    less than 128 shared memory bytes.
  6322. #
  6323. #    The limit should be significantly larger than the number of
  6324. #    concurrent non-collapsed cachable responses leaving Squid. For a
  6325. #    cache that handles less than 5000 concurrent requests, the default
  6326. #    setting of 16384 should be plenty.
  6327. #
  6328. #    Using excessively large values wastes shared memory. Limiting the
  6329. #    table size too much results in hash collisions, leading to lower hit
  6330. #    ratio and missed SMP request collapsing opportunities: Transactions
  6331. #    left without a table entry cannot cache their responses and are
  6332. #    invisible to other concurrent requests for the same resource.
  6333. #
  6334. #    A zero limit is allowed but unsupported. A positive small limit
  6335. #    lowers hit ratio, but zero limit disables a lot of essential
  6336. #    synchronization among SMP workers, leading to HTTP violations (e.g.,
  6337. #    stale hit responses). It also disables shared collapsed forwarding:
  6338. #    A worker becomes unable to collapse its requests on transactions in
  6339. #    other workers, resulting in more trips to the origin server and more
  6340. #    cache thrashing.
  6341. #Default:
  6342. # shared_transient_entries_limit 16384
  6343.  
  6344. # TIMEOUTS
  6345. # -----------------------------------------------------------------------------
  6346.  
  6347. #  TAG: forward_timeout    time-units
  6348. #    This parameter specifies how long Squid should at most attempt in
  6349. #    finding a forwarding path for the request before giving up.
  6350. #Default:
  6351. # forward_timeout 4 minutes
  6352.  
  6353. #  TAG: connect_timeout    time-units
  6354. #    This parameter specifies how long to wait for the TCP connect to
  6355. #    the requested server or peer to complete before Squid should
  6356. #    attempt to find another path where to forward the request.
  6357. #Default:
  6358. # connect_timeout 1 minute
  6359.  
  6360. #  TAG: peer_connect_timeout    time-units
  6361. #    This parameter specifies how long to wait for a pending TCP
  6362. #    connection to a peer cache.  The default is 30 seconds.   You
  6363. #    may also set different timeout values for individual neighbors
  6364. #    with the 'connect-timeout' option on a 'cache_peer' line.
  6365. #Default:
  6366. # peer_connect_timeout 30 seconds
  6367.  
  6368. #  TAG: read_timeout    time-units
  6369. #    Applied on peer server connections.
  6370. #
  6371. #    After each successful read(), the timeout will be extended by this
  6372. #    amount.  If no data is read again after this amount of time,
  6373. #    the request is aborted and logged with ERR_READ_TIMEOUT.
  6374. #
  6375. #    The default is 15 minutes.
  6376. #Default:
  6377. # read_timeout 15 minutes
  6378.  
  6379. #  TAG: write_timeout    time-units
  6380. #    This timeout is tracked for all connections that have data
  6381. #    available for writing and are waiting for the socket to become
  6382. #    ready. After each successful write, the timeout is extended by
  6383. #    the configured amount. If Squid has data to write but the
  6384. #    connection is not ready for the configured duration, the
  6385. #    transaction associated with the connection is terminated. The
  6386. #    default is 15 minutes.
  6387. #Default:
  6388. # write_timeout 15 minutes
  6389.  
  6390. #  TAG: request_timeout
  6391. #    How long to wait for complete HTTP request headers after initial
  6392. #    connection establishment.
  6393. #Default:
  6394. # request_timeout 5 minutes
  6395.  
  6396. #  TAG: request_start_timeout
  6397. #    How long to wait for the first request byte after initial
  6398. #    connection establishment.
  6399. #Default:
  6400. # request_start_timeout 5 minutes
  6401.  
  6402. #  TAG: client_idle_pconn_timeout
  6403. #    How long to wait for the next HTTP request on a persistent
  6404. #    client connection after the previous request completes.
  6405. #Default:
  6406. # client_idle_pconn_timeout 2 minutes
  6407.  
  6408. #  TAG: ftp_client_idle_timeout
  6409. #    How long to wait for an FTP request on a connection to Squid ftp_port.
  6410. #    Many FTP clients do not deal with idle connection closures well,
  6411. #    necessitating a longer default timeout than client_idle_pconn_timeout
  6412. #    used for incoming HTTP requests.
  6413. #Default:
  6414. # ftp_client_idle_timeout 30 minutes
  6415.  
  6416. #  TAG: client_lifetime    time-units
  6417. #    The maximum amount of time a client (browser) is allowed to
  6418. #    remain connected to the cache process.  This protects the Cache
  6419. #    from having a lot of sockets (and hence file descriptors) tied up
  6420. #    in a CLOSE_WAIT state from remote clients that go away without
  6421. #    properly shutting down (either because of a network failure or
  6422. #    because of a poor client implementation).  The default is one
  6423. #    day, 1440 minutes.
  6424. #
  6425. #    NOTE:  The default value is intended to be much larger than any
  6426. #    client would ever need to be connected to your cache.  You
  6427. #    should probably change client_lifetime only as a last resort.
  6428. #    If you seem to have many client connections tying up
  6429. #    filedescriptors, we recommend first tuning the read_timeout,
  6430. #    request_timeout, persistent_request_timeout and quick_abort values.
  6431. #Default:
  6432. # client_lifetime 1 day
  6433.  
  6434. #  TAG: pconn_lifetime    time-units
  6435. #    Desired maximum lifetime of a persistent connection.
  6436. #    When set, Squid will close a now-idle persistent connection that
  6437. #    exceeded configured lifetime instead of moving the connection into
  6438. #    the idle connection pool (or equivalent). No effect on ongoing/active
  6439. #    transactions. Connection lifetime is the time period from the
  6440. #    connection acceptance or opening time until "now".
  6441. #
  6442. #    This limit is useful in environments with long-lived connections
  6443. #    where Squid configuration or environmental factors change during a
  6444. #    single connection lifetime. If unrestricted, some connections may
  6445. #    last for hours and even days, ignoring those changes that should
  6446. #    have affected their behavior or their existence.
  6447. #
  6448. #    Currently, a new lifetime value supplied via Squid reconfiguration
  6449. #    has no effect on already idle connections unless they become busy.
  6450. #
  6451. #    When set to '0' this limit is not used.
  6452. #Default:
  6453. # pconn_lifetime 0 seconds
  6454.  
  6455. #  TAG: half_closed_clients
  6456. #    Some clients may shutdown the sending side of their TCP
  6457. #    connections, while leaving their receiving sides open.    Sometimes,
  6458. #    Squid can not tell the difference between a half-closed and a
  6459. #    fully-closed TCP connection.
  6460. #
  6461. #    By default, Squid will immediately close client connections when
  6462. #    read(2) returns "no more data to read."
  6463. #
  6464. #    Change this option to 'on' and Squid will keep open connections
  6465. #    until a read(2) or write(2) on the socket returns an error.
  6466. #    This may show some benefits for reverse proxies. But if not
  6467. #    it is recommended to leave OFF.
  6468. #Default:
  6469. # half_closed_clients off
  6470.  
  6471. #  TAG: server_idle_pconn_timeout
  6472. #    Timeout for idle persistent connections to servers and other
  6473. #    proxies.
  6474. #Default:
  6475. # server_idle_pconn_timeout 1 minute
  6476.  
  6477. #  TAG: ident_timeout
  6478. #    Maximum time to wait for IDENT lookups to complete.
  6479. #
  6480. #    If this is too high, and you enabled IDENT lookups from untrusted
  6481. #    users, you might be susceptible to denial-of-service by having
  6482. #    many ident requests going at once.
  6483. #Default:
  6484. # ident_timeout 10 seconds
  6485.  
  6486. #  TAG: shutdown_lifetime    time-units
  6487. #    When SIGTERM or SIGHUP is received, the cache is put into
  6488. #    "shutdown pending" mode until all active sockets are closed.
  6489. #    This value is the lifetime to set for all open descriptors
  6490. #    during shutdown mode.  Any active clients after this many
  6491. #    seconds will receive a 'timeout' message.
  6492. #Default:
  6493. # shutdown_lifetime 30 seconds
  6494.  
  6495. # ADMINISTRATIVE PARAMETERS
  6496. # -----------------------------------------------------------------------------
  6497.  
  6498. #  TAG: cache_mgr
  6499. #    Email-address of local cache manager who will receive
  6500. #    mail if the cache dies.  The default is "webmaster".
  6501. #Default:
  6502. # cache_mgr webmaster
  6503.  
  6504. #  TAG: mail_from
  6505. #    From: email-address for mail sent when the cache dies.
  6506. #    The default is to use 'squid@unique_hostname'.
  6507. #
  6508. #    See also: unique_hostname directive.
  6509. #Default:
  6510. # none
  6511.  
  6512. #  TAG: mail_program
  6513. #    Email program used to send mail if the cache dies.
  6514. #    The default is "mail". The specified program must comply
  6515. #    with the standard Unix mail syntax:
  6516. #      mail-program recipient < mailfile
  6517. #
  6518. #    Optional command line options can be specified.
  6519. #Default:
  6520. # mail_program mail
  6521.  
  6522. #  TAG: cache_effective_user
  6523. #    If you start Squid as root, it will change its effective/real
  6524. #    UID/GID to the user specified below.  The default is to change
  6525. #    to UID of proxy.
  6526. #    see also; cache_effective_group
  6527. #Default:
  6528. # cache_effective_user proxy
  6529.  
  6530. #  TAG: cache_effective_group
  6531. #    Squid sets the GID to the effective user's default group ID
  6532. #    (taken from the password file) and supplementary group list
  6533. #    from the groups membership.
  6534. #
  6535. #    If you want Squid to run with a specific GID regardless of
  6536. #    the group memberships of the effective user then set this
  6537. #    to the group (or GID) you want Squid to run as. When set
  6538. #    all other group privileges of the effective user are ignored
  6539. #    and only this GID is effective. If Squid is not started as
  6540. #    root the user starting Squid MUST be member of the specified
  6541. #    group.
  6542. #
  6543. #    This option is not recommended by the Squid Team.
  6544. #    Our preference is for administrators to configure a secure
  6545. #    user account for squid with UID/GID matching system policies.
  6546. #Default:
  6547. # Use system group memberships of the cache_effective_user account
  6548.  
  6549. #  TAG: httpd_suppress_version_string    on|off
  6550. #    Suppress Squid version string info in HTTP headers and HTML error pages.
  6551. #Default:
  6552. # httpd_suppress_version_string off
  6553.  
  6554. #  TAG: visible_hostname
  6555. #    If you want to present a special hostname in error messages, etc,
  6556. #    define this.  Otherwise, the return value of gethostname()
  6557. #    will be used. If you have multiple caches in a cluster and
  6558. #    get errors about IP-forwarding you must set them to have individual
  6559. #    names with this setting.
  6560. #Default:
  6561. # visible_hostname debian-bullseye
  6562.  
  6563. #  TAG: unique_hostname
  6564. #    If you want to have multiple machines with the same
  6565. #    'visible_hostname' you must give each machine a different
  6566. #    'unique_hostname' so forwarding loops can be detected.
  6567. #Default:
  6568. # Copy the value from visible_hostname
  6569.  
  6570. #  TAG: hostname_aliases
  6571. #    A list of other DNS names your cache has.
  6572. #Default:
  6573. # none
  6574.  
  6575. #  TAG: umask
  6576. #    Minimum umask which should be enforced while the proxy
  6577. #    is running, in addition to the umask set at startup.
  6578. #
  6579. #    For a traditional octal representation of umasks, start
  6580. #        your value with 0.
  6581. #Default:
  6582. umask 022
  6583.  
  6584. # OPTIONS FOR THE CACHE REGISTRATION SERVICE
  6585. # -----------------------------------------------------------------------------
  6586. #
  6587. #    This section contains parameters for the (optional) cache
  6588. #    announcement service.  This service is provided to help
  6589. #    cache administrators locate one another in order to join or
  6590. #    create cache hierarchies.
  6591. #
  6592. #    An 'announcement' message is sent (via UDP) to the registration
  6593. #    service by Squid.  By default, the announcement message is NOT
  6594. #    SENT unless you enable it with 'announce_period' below.
  6595. #
  6596. #    The announcement message includes your hostname, plus the
  6597. #    following information from this configuration file:
  6598. #
  6599. #        http_port
  6600. #        icp_port
  6601. #        cache_mgr
  6602. #
  6603. #    All current information is processed regularly and made
  6604. #    available on the Web at http://www.ircache.net/Cache/Tracker/.
  6605.  
  6606. #  TAG: announce_period
  6607. #    This is how frequently to send cache announcements.
  6608. #
  6609. #    To enable announcing your cache, just set an announce period.
  6610. #
  6611. #    Example:
  6612. #        announce_period 1 day
  6613. #Default:
  6614. # Announcement messages disabled.
  6615.  
  6616. #  TAG: announce_host
  6617. #    Set the hostname where announce registration messages will be sent.
  6618. #
  6619. #    See also announce_port and announce_file
  6620. #Default:
  6621. # announce_host tracker.ircache.net
  6622.  
  6623. #  TAG: announce_file
  6624. #    The contents of this file will be included in the announce
  6625. #    registration messages.
  6626. #Default:
  6627. # none
  6628.  
  6629. #  TAG: announce_port
  6630. #    Set the port where announce registration messages will be sent.
  6631. #
  6632. #    See also announce_host and announce_file
  6633. #Default:
  6634. # announce_port 3131
  6635.  
  6636. # HTTPD-ACCELERATOR OPTIONS
  6637. # -----------------------------------------------------------------------------
  6638.  
  6639. #  TAG: httpd_accel_surrogate_id
  6640. #    Surrogates (http://www.esi.org/architecture_spec_1.0.html)
  6641. #    need an identification token to allow control targeting. Because
  6642. #    a farm of surrogates may all perform the same tasks, they may share
  6643. #    an identification token.
  6644. #
  6645. #    When the surrogate is a reverse-proxy, this ID is also
  6646. #    used as cdn-id for CDN-Loop detection (RFC 8586).
  6647. #Default:
  6648. # visible_hostname is used if no specific ID is set.
  6649.  
  6650. #  TAG: http_accel_surrogate_remote    on|off
  6651. #    Remote surrogates (such as those in a CDN) honour the header
  6652. #    "Surrogate-Control: no-store-remote".
  6653. #
  6654. #    Set this to on to have squid behave as a remote surrogate.
  6655. #Default:
  6656. # http_accel_surrogate_remote off
  6657.  
  6658. #  TAG: esi_parser    libxml2|expat
  6659. #    Selects the XML parsing library to use when interpreting responses with
  6660. #    Edge Side Includes.
  6661. #
  6662. #    To disable ESI handling completely, ./configure Squid with --disable-esi.
  6663. #Default:
  6664. # Selects libxml2 if available at ./configure time or libexpat otherwise.
  6665.  
  6666. # DELAY POOL PARAMETERS
  6667. # -----------------------------------------------------------------------------
  6668.  
  6669. #  TAG: delay_pools
  6670. #    This represents the number of delay pools to be used.  For example,
  6671. #    if you have one class 2 delay pool and one class 3 delays pool, you
  6672. #    have a total of 2 delay pools.
  6673. #
  6674. #    See also delay_parameters, delay_class, delay_access for pool
  6675. #    configuration details.
  6676. #Default:
  6677. # delay_pools 0
  6678.  
  6679. #  TAG: delay_class
  6680. #    This defines the class of each delay pool.  There must be exactly one
  6681. #    delay_class line for each delay pool.  For example, to define two
  6682. #    delay pools, one of class 2 and one of class 3, the settings above
  6683. #    and here would be:
  6684. #
  6685. #    Example:
  6686. #        delay_pools 4      # 4 delay pools
  6687. #        delay_class 1 2    # pool 1 is a class 2 pool
  6688. #        delay_class 2 3    # pool 2 is a class 3 pool
  6689. #        delay_class 3 4    # pool 3 is a class 4 pool
  6690. #        delay_class 4 5    # pool 4 is a class 5 pool
  6691. #
  6692. #    The delay pool classes are:
  6693. #
  6694. #        class 1        Everything is limited by a single aggregate
  6695. #                bucket.
  6696. #
  6697. #        class 2     Everything is limited by a single aggregate
  6698. #                bucket as well as an "individual" bucket chosen
  6699. #                from bits 25 through 32 of the IPv4 address.
  6700. #
  6701. #        class 3        Everything is limited by a single aggregate
  6702. #                bucket as well as a "network" bucket chosen
  6703. #                from bits 17 through 24 of the IP address and a
  6704. #                "individual" bucket chosen from bits 17 through
  6705. #                32 of the IPv4 address.
  6706. #
  6707. #        class 4        Everything in a class 3 delay pool, with an
  6708. #                additional limit on a per user basis. This
  6709. #                only takes effect if the username is established
  6710. #                in advance - by forcing authentication in your
  6711. #                http_access rules.
  6712. #
  6713. #        class 5        Requests are grouped according their tag (see
  6714. #                external_acl's tag= reply).
  6715. #
  6716. #
  6717. #    Each pool also requires a delay_parameters directive to configure the pool size
  6718. #    and speed limits used whenever the pool is applied to a request. Along with
  6719. #    a set of delay_access directives to determine when it is used.
  6720. #
  6721. #    NOTE: If an IP address is a.b.c.d
  6722. #        -> bits 25 through 32 are "d"
  6723. #        -> bits 17 through 24 are "c"
  6724. #        -> bits 17 through 32 are "c * 256 + d"
  6725. #
  6726. #    NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to
  6727. #        IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic.
  6728. #
  6729. #    This clause only supports fast acl types.
  6730. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  6731. #
  6732. #    See also delay_parameters and delay_access.
  6733. #Default:
  6734. # none
  6735.  
  6736. #  TAG: delay_access
  6737. #    This is used to determine which delay pool a request falls into.
  6738. #
  6739. #    delay_access is sorted per pool and the matching starts with pool 1,
  6740. #    then pool 2, ..., and finally pool N. The first delay pool where the
  6741. #    request is allowed is selected for the request. If it does not allow
  6742. #    the request to any pool then the request is not delayed (default).
  6743. #
  6744. #    For example, if you want some_big_clients in delay
  6745. #    pool 1 and lotsa_little_clients in delay pool 2:
  6746. #
  6747. #        delay_access 1 allow some_big_clients
  6748. #        delay_access 1 deny all
  6749. #        delay_access 2 allow lotsa_little_clients
  6750. #        delay_access 2 deny all
  6751. #        delay_access 3 allow authenticated_clients
  6752. #
  6753. #    See also delay_parameters and delay_class.
  6754. #
  6755. #Default:
  6756. # Deny using the pool, unless allow rules exist in squid.conf for the pool.
  6757.  
  6758. #  TAG: delay_parameters
  6759. #    This defines the parameters for a delay pool.  Each delay pool has
  6760. #    a number of "buckets" associated with it, as explained in the
  6761. #    description of delay_class.
  6762. #
  6763. #    For a class 1 delay pool, the syntax is:
  6764. #        delay_class pool 1
  6765. #        delay_parameters pool aggregate
  6766. #
  6767. #    For a class 2 delay pool:
  6768. #        delay_class pool 2
  6769. #        delay_parameters pool aggregate individual
  6770. #
  6771. #    For a class 3 delay pool:
  6772. #        delay_class pool 3
  6773. #        delay_parameters pool aggregate network individual
  6774. #
  6775. #    For a class 4 delay pool:
  6776. #        delay_class pool 4
  6777. #        delay_parameters pool aggregate network individual user
  6778. #
  6779. #    For a class 5 delay pool:
  6780. #        delay_class pool 5
  6781. #        delay_parameters pool tagrate
  6782. #
  6783. #    The option variables are:
  6784. #
  6785. #        pool        a pool number - ie, a number between 1 and the
  6786. #                number specified in delay_pools as used in
  6787. #                delay_class lines.
  6788. #
  6789. #        aggregate    the speed limit parameters for the aggregate bucket
  6790. #                (class 1, 2, 3).
  6791. #
  6792. #        individual    the speed limit parameters for the individual
  6793. #                buckets (class 2, 3).
  6794. #
  6795. #        network        the speed limit parameters for the network buckets
  6796. #                (class 3).
  6797. #
  6798. #        user        the speed limit parameters for the user buckets
  6799. #                (class 4).
  6800. #
  6801. #        tagrate        the speed limit parameters for the tag buckets
  6802. #                (class 5).
  6803. #
  6804. #    A pair of delay parameters is written restore/maximum, where restore is
  6805. #    the number of bytes (not bits - modem and network speeds are usually
  6806. #    quoted in bits) per second placed into the bucket, and maximum is the
  6807. #    maximum number of bytes which can be in the bucket at any time.
  6808. #
  6809. #    There must be one delay_parameters line for each delay pool.
  6810. #
  6811. #
  6812. #    For example, if delay pool number 1 is a class 2 delay pool as in the
  6813. #    above example, and is being used to strictly limit each host to 64Kbit/sec
  6814. #    (plus overheads), with no overall limit, the line is:
  6815. #
  6816. #        delay_parameters 1 none 8000/8000
  6817. #
  6818. #    Note that 8 x 8K Byte/sec -> 64K bit/sec.
  6819. #
  6820. #    Note that the word 'none' is used to represent no limit.
  6821. #
  6822. #
  6823. #    And, if delay pool number 2 is a class 3 delay pool as in the above
  6824. #    example, and you want to limit it to a total of 256Kbit/sec (strict limit)
  6825. #    with each 8-bit network permitted 64Kbit/sec (strict limit) and each
  6826. #    individual host permitted 4800bit/sec with a bucket maximum size of 64Kbits
  6827. #    to permit a decent web page to be downloaded at a decent speed
  6828. #    (if the network is not being limited due to overuse) but slow down
  6829. #    large downloads more significantly:
  6830. #
  6831. #        delay_parameters 2 32000/32000 8000/8000 600/8000
  6832. #
  6833. #    Note that 8 x  32K Byte/sec ->  256K bit/sec.
  6834. #          8 x   8K Byte/sec ->   64K bit/sec.
  6835. #          8 x 600  Byte/sec -> 4800  bit/sec.
  6836. #
  6837. #
  6838. #    Finally, for a class 4 delay pool as in the example - each user will
  6839. #    be limited to 128Kbits/sec no matter how many workstations they are logged into.:
  6840. #
  6841. #        delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
  6842. #
  6843. #
  6844. #    See also delay_class and delay_access.
  6845. #
  6846. #Default:
  6847. # none
  6848.  
  6849. #  TAG: delay_initial_bucket_level    (percent, 0-100)
  6850. #    The initial bucket percentage is used to determine how much is put
  6851. #    in each bucket when squid starts, is reconfigured, or first notices
  6852. #    a host accessing it (in class 2 and class 3, individual hosts and
  6853. #    networks only have buckets associated with them once they have been
  6854. #    "seen" by squid).
  6855. #Default:
  6856. # delay_initial_bucket_level 50
  6857.  
  6858. # CLIENT DELAY POOL PARAMETERS
  6859. # -----------------------------------------------------------------------------
  6860.  
  6861. #  TAG: client_delay_pools
  6862. #    This option specifies the number of client delay pools used. It must
  6863. #    preceed other client_delay_* options.
  6864. #
  6865. #    Example:
  6866. #        client_delay_pools 2
  6867. #
  6868. #    See also client_delay_parameters and client_delay_access.
  6869. #Default:
  6870. # client_delay_pools 0
  6871.  
  6872. #  TAG: client_delay_initial_bucket_level    (percent, 0-no_limit)
  6873. #    This option determines the initial bucket size as a percentage of
  6874. #    max_bucket_size from client_delay_parameters. Buckets are created
  6875. #    at the time of the "first" connection from the matching IP. Idle
  6876. #    buckets are periodically deleted up.
  6877. #
  6878. #    You can specify more than 100 percent but note that such "oversized"
  6879. #    buckets are not refilled until their size goes down to max_bucket_size
  6880. #    from client_delay_parameters.
  6881. #
  6882. #    Example:
  6883. #        client_delay_initial_bucket_level 50
  6884. #Default:
  6885. # client_delay_initial_bucket_level 50
  6886.  
  6887. #  TAG: client_delay_parameters
  6888. #
  6889. #    This option configures client-side bandwidth limits using the
  6890. #    following format:
  6891. #
  6892. #        client_delay_parameters pool speed_limit max_bucket_size
  6893. #
  6894. #    pool is an integer ID used for client_delay_access matching.
  6895. #
  6896. #    speed_limit is bytes added to the bucket per second.
  6897. #
  6898. #    max_bucket_size is the maximum size of a bucket, enforced after any
  6899. #    speed_limit additions.
  6900. #
  6901. #    Please see the delay_parameters option for more information and
  6902. #    examples.
  6903. #
  6904. #    Example:
  6905. #        client_delay_parameters 1 1024 2048
  6906. #        client_delay_parameters 2 51200 16384
  6907. #
  6908. #    See also client_delay_access.
  6909. #
  6910. #Default:
  6911. # none
  6912.  
  6913. #  TAG: client_delay_access
  6914. #    This option determines the client-side delay pool for the
  6915. #    request:
  6916. #
  6917. #        client_delay_access pool_ID allow|deny acl_name
  6918. #
  6919. #    All client_delay_access options are checked in their pool ID
  6920. #    order, starting with pool 1. The first checked pool with allowed
  6921. #    request is selected for the request. If no ACL matches or there
  6922. #    are no client_delay_access options, the request bandwidth is not
  6923. #    limited.
  6924. #
  6925. #    The ACL-selected pool is then used to find the
  6926. #    client_delay_parameters for the request. Client-side pools are
  6927. #    not used to aggregate clients. Clients are always aggregated
  6928. #    based on their source IP addresses (one bucket per source IP).
  6929. #
  6930. #    This clause only supports fast acl types.
  6931. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  6932. #    Additionally, only the client TCP connection details are available.
  6933. #    ACLs testing HTTP properties will not work.
  6934. #
  6935. #    Please see delay_access for more examples.
  6936. #
  6937. #    Example:
  6938. #        client_delay_access 1 allow low_rate_network
  6939. #        client_delay_access 2 allow vips_network
  6940. #
  6941. #
  6942. #    See also client_delay_parameters and client_delay_pools.
  6943. #Default:
  6944. # Deny use of the pool, unless allow rules exist in squid.conf for the pool.
  6945.  
  6946. #  TAG: response_delay_pool
  6947. #    This option configures client response bandwidth limits using the
  6948. #    following format:
  6949. #
  6950. #    response_delay_pool name [option=value] ...
  6951. #
  6952. #    name    the response delay pool name
  6953. #
  6954. #    available options:
  6955. #
  6956. #        individual-restore    The speed limit of an individual
  6957. #                    bucket(bytes/s). To be used in conjunction
  6958. #                    with 'individual-maximum'.
  6959. #
  6960. #        individual-maximum    The maximum number of bytes which can
  6961. #                    be placed into the individual bucket. To be used
  6962. #                    in conjunction with 'individual-restore'.
  6963. #
  6964. #        aggregate-restore    The speed limit for the aggregate
  6965. #                    bucket(bytes/s). To be used in conjunction with
  6966. #                    'aggregate-maximum'.
  6967. #
  6968. #        aggregate-maximum    The maximum number of bytes which can
  6969. #                       be placed into the aggregate bucket. To be used
  6970. #                    in conjunction with 'aggregate-restore'.
  6971. #
  6972. #        initial-bucket-level    The initial bucket size as a percentage
  6973. #                    of individual-maximum.
  6974. #
  6975. #    Individual and(or) aggregate bucket options may not be specified,
  6976. #       meaning no individual and(or) aggregate speed limitation.
  6977. #    See also response_delay_pool_access and delay_parameters for
  6978. #    terminology details.
  6979. #Default:
  6980. # none
  6981.  
  6982. #  TAG: response_delay_pool_access
  6983. #    Determines whether a specific named response delay pool is used
  6984. #    for the transaction. The syntax for this directive is:
  6985. #
  6986. #    response_delay_pool_access pool_name allow|deny acl_name
  6987. #
  6988. #    All response_delay_pool_access options are checked in the order
  6989. #    they appear in this configuration file. The first rule with a
  6990. #    matching ACL wins. If (and only if) an "allow" rule won, Squid
  6991. #    assigns the response to the corresponding named delay pool.
  6992. #Default:
  6993. # Deny use of the pool, unless allow rules exist in squid.conf for the pool.
  6994.  
  6995. # WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
  6996. # -----------------------------------------------------------------------------
  6997.  
  6998. #  TAG: wccp_router
  6999. #    Use this option to define your WCCP ``home'' router for
  7000. #    Squid.
  7001. #
  7002. #    wccp_router supports a single WCCP(v1) router
  7003. #
  7004. #    wccp2_router supports multiple WCCPv2 routers
  7005. #
  7006. #    only one of the two may be used at the same time and defines
  7007. #    which version of WCCP to use.
  7008. #Default:
  7009. # WCCP disabled.
  7010.  
  7011. #  TAG: wccp2_router
  7012. #    Use this option to define your WCCP ``home'' router for
  7013. #    Squid.
  7014. #
  7015. #    wccp_router supports a single WCCP(v1) router
  7016. #
  7017. #    wccp2_router supports multiple WCCPv2 routers
  7018. #
  7019. #    only one of the two may be used at the same time and defines
  7020. #    which version of WCCP to use.
  7021. #Default:
  7022. # WCCPv2 disabled.
  7023.  
  7024. #  TAG: wccp_version
  7025. #    This directive is only relevant if you need to set up WCCP(v1)
  7026. #    to some very old and end-of-life Cisco routers. In all other
  7027. #    setups it must be left unset or at the default setting.
  7028. #    It defines an internal version in the WCCP(v1) protocol,
  7029. #    with version 4 being the officially documented protocol.
  7030. #
  7031. #    According to some users, Cisco IOS 11.2 and earlier only
  7032. #    support WCCP version 3.  If you're using that or an earlier
  7033. #    version of IOS, you may need to change this value to 3, otherwise
  7034. #    do not specify this parameter.
  7035. #Default:
  7036. # wccp_version 4
  7037.  
  7038. #  TAG: wccp2_rebuild_wait
  7039. #    If this is enabled Squid will wait for the cache dir rebuild to finish
  7040. #    before sending the first wccp2 HereIAm packet
  7041. #Default:
  7042. # wccp2_rebuild_wait on
  7043.  
  7044. #  TAG: wccp2_forwarding_method
  7045. #    WCCP2 allows the setting of forwarding methods between the
  7046. #    router/switch and the cache.  Valid values are as follows:
  7047. #
  7048. #    gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
  7049. #    l2  - L2 redirect (forward the packet using Layer 2/MAC rewriting)
  7050. #
  7051. #    Currently (as of IOS 12.4) cisco routers only support GRE.
  7052. #    Cisco switches only support the L2 redirect assignment method.
  7053. #Default:
  7054. # wccp2_forwarding_method gre
  7055.  
  7056. #  TAG: wccp2_return_method
  7057. #    WCCP2 allows the setting of return methods between the
  7058. #    router/switch and the cache for packets that the cache
  7059. #    decides not to handle.  Valid values are as follows:
  7060. #
  7061. #    gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
  7062. #    l2  - L2 redirect (forward the packet using Layer 2/MAC rewriting)
  7063. #
  7064. #    Currently (as of IOS 12.4) cisco routers only support GRE.
  7065. #    Cisco switches only support the L2 redirect assignment.
  7066. #
  7067. #    If the "ip wccp redirect exclude in" command has been
  7068. #    enabled on the cache interface, then it is still safe for
  7069. #    the proxy server to use a l2 redirect method even if this
  7070. #    option is set to GRE.
  7071. #Default:
  7072. # wccp2_return_method gre
  7073.  
  7074. #  TAG: wccp2_assignment_method
  7075. #    WCCP2 allows the setting of methods to assign the WCCP hash
  7076. #    Valid values are as follows:
  7077. #
  7078. #    hash - Hash assignment
  7079. #    mask - Mask assignment
  7080. #
  7081. #    As a general rule, cisco routers support the hash assignment method
  7082. #    and cisco switches support the mask assignment method.
  7083. #Default:
  7084. # wccp2_assignment_method hash
  7085.  
  7086. #  TAG: wccp2_service
  7087. #    WCCP2 allows for multiple traffic services. There are two
  7088. #    types: "standard" and "dynamic". The standard type defines
  7089. #    one service id - http (id 0). The dynamic service ids can be from
  7090. #    51 to 255 inclusive.  In order to use a dynamic service id
  7091. #    one must define the type of traffic to be redirected; this is done
  7092. #    using the wccp2_service_info option.
  7093. #
  7094. #    The "standard" type does not require a wccp2_service_info option,
  7095. #    just specifying the service id will suffice.
  7096. #
  7097. #    MD5 service authentication can be enabled by adding
  7098. #    "password=<password>" to the end of this service declaration.
  7099. #
  7100. #    Examples:
  7101. #
  7102. #    wccp2_service standard 0    # for the 'web-cache' standard service
  7103. #    wccp2_service dynamic 80    # a dynamic service type which will be
  7104. #                    # fleshed out with subsequent options.
  7105. #    wccp2_service standard 0 password=foo
  7106. #Default:
  7107. # Use the 'web-cache' standard service.
  7108.  
  7109. #  TAG: wccp2_service_info
  7110. #    Dynamic WCCPv2 services require further information to define the
  7111. #    traffic you wish to have diverted.
  7112. #
  7113. #    The format is:
  7114. #
  7115. #    wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
  7116. #        priority=<priority> ports=<port>,<port>..
  7117. #
  7118. #    The relevant WCCPv2 flags:
  7119. #    + src_ip_hash, dst_ip_hash
  7120. #    + source_port_hash, dst_port_hash
  7121. #    + src_ip_alt_hash, dst_ip_alt_hash
  7122. #    + src_port_alt_hash, dst_port_alt_hash
  7123. #    + ports_source
  7124. #
  7125. #    The port list can be one to eight entries.
  7126. #
  7127. #    Example:
  7128. #
  7129. #    wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
  7130. #        priority=240 ports=80
  7131. #
  7132. #    Note: the service id must have been defined by a previous
  7133. #    'wccp2_service dynamic <id>' entry.
  7134. #Default:
  7135. # none
  7136.  
  7137. #  TAG: wccp2_weight
  7138. #    Each cache server gets assigned a set of the destination
  7139. #    hash proportional to their weight.
  7140. #Default:
  7141. # wccp2_weight 10000
  7142.  
  7143. #  TAG: wccp_address
  7144. #    Use this option if you require WCCP(v1) to use a specific
  7145. #    interface address.
  7146. #
  7147. #    The default behavior is to not bind to any specific address.
  7148. #Default:
  7149. # Address selected by the operating system.
  7150.  
  7151. #  TAG: wccp2_address
  7152. #    Use this option if you require WCCPv2 to use a specific
  7153. #    interface address.
  7154. #
  7155. #    The default behavior is to not bind to any specific address.
  7156. #Default:
  7157. # Address selected by the operating system.
  7158.  
  7159. # PERSISTENT CONNECTION HANDLING
  7160. # -----------------------------------------------------------------------------
  7161. #
  7162. # Also see "pconn_timeout" in the TIMEOUTS section
  7163.  
  7164. #  TAG: client_persistent_connections
  7165. #    Persistent connection support for clients.
  7166. #    Squid uses persistent connections (when allowed). You can use
  7167. #    this option to disable persistent connections with clients.
  7168. #Default:
  7169. # client_persistent_connections on
  7170.  
  7171. #  TAG: server_persistent_connections
  7172. #    Persistent connection support for servers.
  7173. #    Squid uses persistent connections (when allowed). You can use
  7174. #    this option to disable persistent connections with servers.
  7175. #Default:
  7176. # server_persistent_connections on
  7177.  
  7178. #  TAG: persistent_connection_after_error
  7179. #    With this directive the use of persistent connections after
  7180. #    HTTP errors can be disabled. Useful if you have clients
  7181. #    who fail to handle errors on persistent connections proper.
  7182. #Default:
  7183. # persistent_connection_after_error on
  7184.  
  7185. #  TAG: detect_broken_pconn
  7186. #    Some servers have been found to incorrectly signal the use
  7187. #    of HTTP/1.0 persistent connections even on replies not
  7188. #    compatible, causing significant delays. This server problem
  7189. #    has mostly been seen on redirects.
  7190. #
  7191. #    By enabling this directive Squid attempts to detect such
  7192. #    broken replies and automatically assume the reply is finished
  7193. #    after 10 seconds timeout.
  7194. #Default:
  7195. # detect_broken_pconn off
  7196.  
  7197. # CACHE DIGEST OPTIONS
  7198. # -----------------------------------------------------------------------------
  7199.  
  7200. #  TAG: digest_generation
  7201. #    This controls whether the server will generate a Cache Digest
  7202. #    of its contents.  By default, Cache Digest generation is
  7203. #    enabled if Squid is compiled with --enable-cache-digests defined.
  7204. #Default:
  7205. # digest_generation on
  7206.  
  7207. #  TAG: digest_bits_per_entry
  7208. #    This is the number of bits of the server's Cache Digest which
  7209. #    will be associated with the Digest entry for a given HTTP
  7210. #    Method and URL (public key) combination.  The default is 5.
  7211. #Default:
  7212. # digest_bits_per_entry 5
  7213.  
  7214. #  TAG: digest_rebuild_period    (seconds)
  7215. #    This is the wait time between Cache Digest rebuilds.
  7216. #Default:
  7217. # digest_rebuild_period 1 hour
  7218.  
  7219. #  TAG: digest_rewrite_period    (seconds)
  7220. #    This is the wait time between Cache Digest writes to
  7221. #    disk.
  7222. #Default:
  7223. # digest_rewrite_period 1 hour
  7224.  
  7225. #  TAG: digest_swapout_chunk_size    (bytes)
  7226. #    This is the number of bytes of the Cache Digest to write to
  7227. #    disk at a time.  It defaults to 4096 bytes (4KB), the Squid
  7228. #    default swap page.
  7229. #Default:
  7230. # digest_swapout_chunk_size 4096 bytes
  7231.  
  7232. #  TAG: digest_rebuild_chunk_percentage    (percent, 0-100)
  7233. #    This is the percentage of the Cache Digest to be scanned at a
  7234. #    time.  By default it is set to 10% of the Cache Digest.
  7235. #Default:
  7236. # digest_rebuild_chunk_percentage 10
  7237.  
  7238. # SNMP OPTIONS
  7239. # -----------------------------------------------------------------------------
  7240.  
  7241. #  TAG: snmp_port
  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)
  7246. #
  7247. #    Example:
  7248. #        snmp_port 3401
  7249. #Default:
  7250. # SNMP disabled.
  7251.  
  7252. #  TAG: snmp_access
  7253. #    Allowing or denying access to the SNMP port.
  7254. #
  7255. #    All access to the agent is denied by default.
  7256. #    usage:
  7257. #
  7258. #    snmp_access allow|deny [!]aclname ...
  7259. #
  7260. #    This clause only supports fast acl types.
  7261. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  7262. #
  7263. #Example:
  7264. # snmp_access allow snmppublic localhost
  7265. # snmp_access deny all
  7266. #Default:
  7267. # Deny, unless rules exist in squid.conf.
  7268.  
  7269. #  TAG: snmp_incoming_address
  7270. #    Just like 'udp_incoming_address', but for the SNMP port.
  7271. #
  7272. #    snmp_incoming_address    is used for the SNMP socket receiving
  7273. #                messages from SNMP agents.
  7274. #
  7275. #    The default snmp_incoming_address is to listen on all
  7276. #    available network interfaces.
  7277. #Default:
  7278. # Accept SNMP packets from all machine interfaces.
  7279.  
  7280. #  TAG: snmp_outgoing_address
  7281. #    Just like 'udp_outgoing_address', but for the SNMP port.
  7282. #
  7283. #    snmp_outgoing_address    is used for SNMP packets returned to SNMP
  7284. #                agents.
  7285. #
  7286. #    If snmp_outgoing_address is not set it will use the same socket
  7287. #    as snmp_incoming_address. Only change this if you want to have
  7288. #    SNMP replies sent using another address than where this Squid
  7289. #    listens for SNMP queries.
  7290. #
  7291. #    NOTE, snmp_incoming_address and snmp_outgoing_address can not have
  7292. #    the same value since they both use the same port.
  7293. #Default:
  7294. # Use snmp_incoming_address or an address selected by the operating system.
  7295.  
  7296. # ICP OPTIONS
  7297. # -----------------------------------------------------------------------------
  7298.  
  7299. #  TAG: icp_port
  7300. #    The port number where Squid sends and receives ICP queries to
  7301. #    and from neighbor caches.  The standard UDP port for ICP is 3130.
  7302. #
  7303. #    Example:
  7304. #        icp_port 3130
  7305. #Default:
  7306. # ICP disabled.
  7307.  
  7308. #  TAG: htcp_port
  7309. #    The port number where Squid sends and receives HTCP queries to
  7310. #    and from neighbor caches.  To turn it on you want to set it to
  7311. #    4827.
  7312. #
  7313. #    Example:
  7314. #        htcp_port 4827
  7315. #Default:
  7316. # HTCP disabled.
  7317.  
  7318. #  TAG: log_icp_queries    on|off
  7319. #    If set, ICP queries are logged to access.log. You may wish
  7320. #    do disable this if your ICP load is VERY high to speed things
  7321. #    up or to simplify log analysis.
  7322. #Default:
  7323. # log_icp_queries on
  7324.  
  7325. #  TAG: udp_incoming_address
  7326. #    udp_incoming_address    is used for UDP packets received from other
  7327. #                caches.
  7328. #
  7329. #    The default behavior is to not bind to any specific address.
  7330. #
  7331. #    Only change this if you want to have all UDP queries received on
  7332. #    a specific interface/address.
  7333. #
  7334. #    NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS
  7335. #    modules. Altering it will affect all of them in the same manner.
  7336. #
  7337. #    see also; udp_outgoing_address
  7338. #
  7339. #    NOTE, udp_incoming_address and udp_outgoing_address can not
  7340. #    have the same value since they both use the same port.
  7341. #Default:
  7342. # Accept packets from all machine interfaces.
  7343.  
  7344. #  TAG: udp_outgoing_address
  7345. #    udp_outgoing_address    is used for UDP packets sent out to other
  7346. #                caches.
  7347. #
  7348. #    The default behavior is to not bind to any specific address.
  7349. #
  7350. #    Instead it will use the same socket as udp_incoming_address.
  7351. #    Only change this if you want to have UDP queries sent using another
  7352. #    address than where this Squid listens for UDP queries from other
  7353. #    caches.
  7354. #
  7355. #    NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS
  7356. #    modules. Altering it will affect all of them in the same manner.
  7357. #
  7358. #    see also; udp_incoming_address
  7359. #
  7360. #    NOTE, udp_incoming_address and udp_outgoing_address can not
  7361. #    have the same value since they both use the same port.
  7362. #Default:
  7363. # Use udp_incoming_address or an address selected by the operating system.
  7364.  
  7365. #  TAG: icp_hit_stale    on|off
  7366. #    If you want to return ICP_HIT for stale cache objects, set this
  7367. #    option to 'on'.  If you have sibling relationships with caches
  7368. #    in other administrative domains, this should be 'off'.  If you only
  7369. #    have sibling relationships with caches under your control,
  7370. #    it is probably okay to set this to 'on'.
  7371. #    If set to 'on', your siblings should use the option "allow-miss"
  7372. #    on their cache_peer lines for connecting to you.
  7373. #Default:
  7374. # icp_hit_stale off
  7375.  
  7376. #  TAG: minimum_direct_hops
  7377. #    If using the ICMP pinging stuff, do direct fetches for sites
  7378. #    which are no more than this many hops away.
  7379. #Default:
  7380. # minimum_direct_hops 4
  7381.  
  7382. #  TAG: minimum_direct_rtt    (msec)
  7383. #    If using the ICMP pinging stuff, do direct fetches for sites
  7384. #    which are no more than this many rtt milliseconds away.
  7385. #Default:
  7386. # minimum_direct_rtt 400
  7387.  
  7388. #  TAG: netdb_low
  7389. #    The low water mark for the ICMP measurement database.
  7390. #
  7391. #    Note: high watermark controlled by netdb_high directive.
  7392. #
  7393. #    These watermarks are counts, not percents.  The defaults are
  7394. #    (low) 900 and (high) 1000.  When the high water mark is
  7395. #    reached, database entries will be deleted until the low
  7396. #    mark is reached.
  7397. #Default:
  7398. # netdb_low 900
  7399.  
  7400. #  TAG: netdb_high
  7401. #    The high water mark for the ICMP measurement database.
  7402. #
  7403. #    Note: low watermark controlled by netdb_low directive.
  7404. #
  7405. #    These watermarks are counts, not percents.  The defaults are
  7406. #    (low) 900 and (high) 1000.  When the high water mark is
  7407. #    reached, database entries will be deleted until the low
  7408. #    mark is reached.
  7409. #Default:
  7410. # netdb_high 1000
  7411.  
  7412. #  TAG: netdb_ping_period
  7413. #    The minimum period for measuring a site.  There will be at
  7414. #    least this much delay between successive pings to the same
  7415. #    network.  The default is five minutes.
  7416. #Default:
  7417. # netdb_ping_period 5 minutes
  7418.  
  7419. #  TAG: query_icmp    on|off
  7420. #    If you want to ask your peers to include ICMP data in their ICP
  7421. #    replies, enable this option.
  7422. #
  7423. #    If your peer has configured Squid (during compilation) with
  7424. #    '--enable-icmp' that peer will send ICMP pings to origin server
  7425. #    sites of the URLs it receives.  If you enable this option the
  7426. #    ICP replies from that peer will include the ICMP data (if available).
  7427. #    Then, when choosing a parent cache, Squid will choose the parent with
  7428. #    the minimal RTT to the origin server.  When this happens, the
  7429. #    hierarchy field of the access.log will be
  7430. #    "CLOSEST_PARENT_MISS".  This option is off by default.
  7431. #Default:
  7432. # query_icmp off
  7433.  
  7434. #  TAG: test_reachability    on|off
  7435. #    When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
  7436. #    instead of ICP_MISS if the target host is NOT in the ICMP
  7437. #    database, or has a zero RTT.
  7438. #Default:
  7439. # test_reachability off
  7440.  
  7441. #  TAG: icp_query_timeout    (msec)
  7442. #    Normally Squid will automatically determine an optimal ICP
  7443. #    query timeout value based on the round-trip-time of recent ICP
  7444. #    queries.  If you want to override the value determined by
  7445. #    Squid, set this 'icp_query_timeout' to a non-zero value.  This
  7446. #    value is specified in MILLISECONDS, so, to use a 2-second
  7447. #    timeout (the old default), you would write:
  7448. #
  7449. #        icp_query_timeout 2000
  7450. #Default:
  7451. # Dynamic detection.
  7452.  
  7453. #  TAG: maximum_icp_query_timeout    (msec)
  7454. #    Normally the ICP query timeout is determined dynamically.  But
  7455. #    sometimes it can lead to very large values (say 5 seconds).
  7456. #    Use this option to put an upper limit on the dynamic timeout
  7457. #    value.  Do NOT use this option to always use a fixed (instead
  7458. #    of a dynamic) timeout value. To set a fixed timeout see the
  7459. #    'icp_query_timeout' directive.
  7460. #Default:
  7461. # maximum_icp_query_timeout 2000
  7462.  
  7463. #  TAG: minimum_icp_query_timeout    (msec)
  7464. #    Normally the ICP query timeout is determined dynamically.  But
  7465. #    sometimes it can lead to very small timeouts, even lower than
  7466. #    the normal latency variance on your link due to traffic.
  7467. #    Use this option to put an lower limit on the dynamic timeout
  7468. #    value.  Do NOT use this option to always use a fixed (instead
  7469. #    of a dynamic) timeout value. To set a fixed timeout see the
  7470. #    'icp_query_timeout' directive.
  7471. #Default:
  7472. # minimum_icp_query_timeout 5
  7473.  
  7474. #  TAG: background_ping_rate    time-units
  7475. #    Controls how often the ICP pings are sent to siblings that
  7476. #    have background-ping set.
  7477. #Default:
  7478. # background_ping_rate 10 seconds
  7479.  
  7480. # MULTICAST ICP OPTIONS
  7481. # -----------------------------------------------------------------------------
  7482.  
  7483. #  TAG: mcast_groups
  7484. #    This tag specifies a list of multicast groups which your server
  7485. #    should join to receive multicasted ICP queries.
  7486. #
  7487. #    NOTE!  Be very careful what you put here!  Be sure you
  7488. #    understand the difference between an ICP _query_ and an ICP
  7489. #    _reply_.  This option is to be set only if you want to RECEIVE
  7490. #    multicast queries.  Do NOT set this option to SEND multicast
  7491. #    ICP (use cache_peer for that).  ICP replies are always sent via
  7492. #    unicast, so this option does not affect whether or not you will
  7493. #    receive replies from multicast group members.
  7494. #
  7495. #    You must be very careful to NOT use a multicast address which
  7496. #    is already in use by another group of caches.
  7497. #
  7498. #    If you are unsure about multicast, please read the Multicast
  7499. #    chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
  7500. #
  7501. #    Usage: mcast_groups 239.128.16.128 224.0.1.20
  7502. #
  7503. #    By default, Squid doesn't listen on any multicast groups.
  7504. #Default:
  7505. # none
  7506.  
  7507. #  TAG: mcast_miss_addr
  7508. # Note: This option is only available if Squid is rebuilt with the
  7509. #       -DMULTICAST_MISS_STREAM define
  7510. #
  7511. #    If you enable this option, every "cache miss" URL will
  7512. #    be sent out on the specified multicast address.
  7513. #
  7514. #    Do not enable this option unless you are are absolutely
  7515. #    certain you understand what you are doing.
  7516. #Default:
  7517. # disabled.
  7518.  
  7519. #  TAG: mcast_miss_ttl
  7520. # Note: This option is only available if Squid is rebuilt with the
  7521. #       -DMULTICAST_MISS_STREAM define
  7522. #
  7523. #    This is the time-to-live value for packets multicasted
  7524. #    when multicasting off cache miss URLs is enabled.  By
  7525. #    default this is set to 'site scope', i.e. 16.
  7526. #Default:
  7527. # mcast_miss_ttl 16
  7528.  
  7529. #  TAG: mcast_miss_port
  7530. # Note: This option is only available if Squid is rebuilt with the
  7531. #       -DMULTICAST_MISS_STREAM define
  7532. #
  7533. #    This is the port number to be used in conjunction with
  7534. #    'mcast_miss_addr'.
  7535. #Default:
  7536. # mcast_miss_port 3135
  7537.  
  7538. #  TAG: mcast_miss_encode_key
  7539. # Note: This option is only available if Squid is rebuilt with the
  7540. #       -DMULTICAST_MISS_STREAM define
  7541. #
  7542. #    The URLs that are sent in the multicast miss stream are
  7543. #    encrypted.  This is the encryption key.
  7544. #Default:
  7545. # mcast_miss_encode_key XXXXXXXXXXXXXXXX
  7546.  
  7547. #  TAG: mcast_icp_query_timeout    (msec)
  7548. #    For multicast peers, Squid regularly sends out ICP "probes" to
  7549. #    count how many other peers are listening on the given multicast
  7550. #    address.  This value specifies how long Squid should wait to
  7551. #    count all the replies.  The default is 2000 msec, or 2
  7552. #    seconds.
  7553. #Default:
  7554. # mcast_icp_query_timeout 2000
  7555.  
  7556. # INTERNAL ICON OPTIONS
  7557. # -----------------------------------------------------------------------------
  7558.  
  7559. #  TAG: icon_directory
  7560. #    Where the icons are stored. These are normally kept in
  7561. #    /usr/share/squid/icons
  7562. #Default:
  7563. # icon_directory /usr/share/squid/icons
  7564.  
  7565. #  TAG: global_internal_static
  7566. #    This directive controls is Squid should intercept all requests for
  7567. #    /squid-internal-static/ no matter which host the URL is requesting
  7568. #    (default on setting), or if nothing special should be done for
  7569. #    such URLs (off setting). The purpose of this directive is to make
  7570. #    icons etc work better in complex cache hierarchies where it may
  7571. #    not always be possible for all corners in the cache mesh to reach
  7572. #    the server generating a directory listing.
  7573. #Default:
  7574. # global_internal_static on
  7575.  
  7576. #  TAG: short_icon_urls
  7577. #    If this is enabled Squid will use short URLs for icons.
  7578. #    If disabled it will revert to the old behavior of including
  7579. #    it's own name and port in the URL.
  7580. #
  7581. #    If you run a complex cache hierarchy with a mix of Squid and
  7582. #    other proxies you may need to disable this directive.
  7583. #Default:
  7584. # short_icon_urls on
  7585.  
  7586. # ERROR PAGE OPTIONS
  7587. # -----------------------------------------------------------------------------
  7588.  
  7589. #  TAG: error_directory
  7590. #    If you wish to create your own versions of the default
  7591. #    error files to customize them to suit your company copy
  7592. #    the error/template files to another directory and point
  7593. #    this tag at them.
  7594. #
  7595. #    WARNING: This option will disable multi-language support
  7596. #             on error pages if used.
  7597. #
  7598. #    The squid developers are interested in making squid available in
  7599. #    a wide variety of languages. If you are making translations for a
  7600. #    language that Squid does not currently provide please consider
  7601. #    contributing your translation back to the project.
  7602. #    http://wiki.squid-cache.org/Translations
  7603. #
  7604. #    The squid developers working on translations are happy to supply drop-in
  7605. #    translated error files in exchange for any new language contributions.
  7606. #Default:
  7607. # Send error pages in the clients preferred language
  7608.  
  7609. #  TAG: error_default_language
  7610. #    Set the default language which squid will send error pages in
  7611. #    if no existing translation matches the clients language
  7612. #    preferences.
  7613. #
  7614. #    If unset (default) generic English will be used.
  7615. #
  7616. #    The squid developers are interested in making squid available in
  7617. #    a wide variety of languages. If you are interested in making
  7618. #    translations for any language see the squid wiki for details.
  7619. #    http://wiki.squid-cache.org/Translations
  7620. #Default:
  7621. # Generate English language pages.
  7622.  
  7623. #  TAG: error_log_languages
  7624. #    Log to cache.log what languages users are attempting to
  7625. #    auto-negotiate for translations.
  7626. #
  7627. #    Successful negotiations are not logged. Only failures
  7628. #    have meaning to indicate that Squid may need an upgrade
  7629. #    of its error page translations.
  7630. #Default:
  7631. # error_log_languages on
  7632.  
  7633. #  TAG: err_page_stylesheet
  7634. #    CSS Stylesheet to pattern the display of Squid default error pages.
  7635. #
  7636. #    For information on CSS see http://www.w3.org/Style/CSS/
  7637. #Default:
  7638. # err_page_stylesheet /etc/squid/errorpage.css
  7639.  
  7640. #  TAG: err_html_text
  7641. #    HTML text to include in error messages.  Make this a "mailto"
  7642. #    URL to your admin address, or maybe just a link to your
  7643. #    organizations Web page.
  7644. #
  7645. #    To include this in your error messages, you must rewrite
  7646. #    the error template files (found in the "errors" directory).
  7647. #    Wherever you want the 'err_html_text' line to appear,
  7648. #    insert a %L tag in the error template file.
  7649. #Default:
  7650. # none
  7651.  
  7652. #  TAG: email_err_data    on|off
  7653. #    If enabled, information about the occurred error will be
  7654. #    included in the mailto links of the ERR pages (if %W is set)
  7655. #    so that the email body contains the data.
  7656. #    Syntax is <A HREF="mailto:%w%W">%w</A>
  7657. #Default:
  7658. # email_err_data on
  7659.  
  7660. #  TAG: deny_info
  7661. #    Usage:   deny_info err_page_name acl
  7662. #    or       deny_info http://... acl
  7663. #    or       deny_info TCP_RESET acl
  7664. #
  7665. #    This can be used to return a ERR_ page for requests which
  7666. #    do not pass the 'http_access' rules.  Squid remembers the last
  7667. #    acl it evaluated in http_access, and if a 'deny_info' line exists
  7668. #    for that ACL Squid returns a corresponding error page.
  7669. #
  7670. #    The acl is typically the last acl on the http_access deny line which
  7671. #    denied access. The exceptions to this rule are:
  7672. #    - When Squid needs to request authentication credentials. It's then
  7673. #      the first authentication related acl encountered
  7674. #    - When none of the http_access lines matches. It's then the last
  7675. #      acl processed on the last http_access line.
  7676. #    - When the decision to deny access was made by an adaptation service,
  7677. #      the acl name is the corresponding eCAP or ICAP service_name.
  7678. #
  7679. #    NP: If providing your own custom error pages with error_directory
  7680. #        you may also specify them by your custom file name:
  7681. #        Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
  7682. #
  7683. #    By defaut Squid will send "403 Forbidden". A different 4xx or 5xx
  7684. #    may be specified by prefixing the file name with the code and a colon.
  7685. #    e.g. 404:ERR_CUSTOM_ACCESS_DENIED
  7686. #
  7687. #    Alternatively you can tell Squid to reset the TCP connection
  7688. #    by specifying TCP_RESET.
  7689. #
  7690. #    Or you can specify an error URL or URL pattern. The browsers will
  7691. #    get redirected to the specified URL after formatting tags have
  7692. #    been replaced. Redirect will be done with 302 or 307 according to
  7693. #    HTTP/1.1 specs. A different 3xx code may be specified by prefixing
  7694. #    the URL. e.g. 303:http://example.com/
  7695. #
  7696. #    URL FORMAT TAGS:
  7697. #        %a    - username (if available. Password NOT included)
  7698. #        %A    - Local listening IP address the client connection was connected to
  7699. #        %B    - FTP path URL
  7700. #        %e    - Error number
  7701. #        %E    - Error description
  7702. #        %h    - Squid hostname
  7703. #        %H    - Request domain name
  7704. #        %i    - Client IP Address
  7705. #        %M    - Request Method
  7706. #        %O    - Unescaped message result from external ACL helper
  7707. #        %o    - Message result from external ACL helper
  7708. #        %p    - Request Port number
  7709. #        %P    - Request Protocol name
  7710. #        %R    - Request URL path
  7711. #        %T    - Timestamp in RFC 1123 format
  7712. #        %U    - Full canonical URL from client
  7713. #              (HTTPS URLs terminate with *)
  7714. #        %u    - Full canonical URL from client
  7715. #        %w    - Admin email from squid.conf
  7716. #        %x    - Error name
  7717. #        %%    - Literal percent (%) code
  7718. #
  7719. #Default:
  7720. # none
  7721.  
  7722. # OPTIONS INFLUENCING REQUEST FORWARDING
  7723. # -----------------------------------------------------------------------------
  7724.  
  7725. #  TAG: nonhierarchical_direct
  7726. #    By default, Squid will send any non-hierarchical requests
  7727. #    (not cacheable request type) direct to origin servers.
  7728. #
  7729. #    When this is set to "off", Squid will prefer to send these
  7730. #    requests to parents.
  7731. #
  7732. #    Note that in most configurations, by turning this off you will only
  7733. #    add latency to these request without any improvement in global hit
  7734. #    ratio.
  7735. #
  7736. #    This option only sets a preference. If the parent is unavailable a
  7737. #    direct connection to the origin server may still be attempted. To
  7738. #    completely prevent direct connections use never_direct.
  7739. #Default:
  7740. # nonhierarchical_direct on
  7741.  
  7742. #  TAG: prefer_direct
  7743. #    Normally Squid tries to use parents for most requests. If you for some
  7744. #    reason like it to first try going direct and only use a parent if
  7745. #    going direct fails set this to on.
  7746. #
  7747. #    By combining nonhierarchical_direct off and prefer_direct on you
  7748. #    can set up Squid to use a parent as a backup path if going direct
  7749. #    fails.
  7750. #
  7751. #    Note: If you want Squid to use parents for all requests see
  7752. #    the never_direct directive. prefer_direct only modifies how Squid
  7753. #    acts on cacheable requests.
  7754. #Default:
  7755. # prefer_direct off
  7756.  
  7757. #  TAG: cache_miss_revalidate    on|off
  7758. #    RFC 7232 defines a conditional request mechanism to prevent
  7759. #    response objects being unnecessarily transferred over the network.
  7760. #    If that mechanism is used by the client and a cache MISS occurs
  7761. #    it can prevent new cache entries being created.
  7762. #
  7763. #    This option determines whether Squid on cache MISS will pass the
  7764. #    client revalidation request to the server or tries to fetch new
  7765. #    content for caching. It can be useful while the cache is mostly
  7766. #    empty to more quickly have the cache populated by generating
  7767. #    non-conditional GETs.
  7768. #
  7769. #    When set to 'on' (default), Squid will pass all client If-* headers
  7770. #    to the server. This permits server responses without a cacheable
  7771. #    payload to be delivered and on MISS no new cache entry is created.
  7772. #
  7773. #    When set to 'off' and if the request is cacheable, Squid will
  7774. #    remove the clients If-Modified-Since and If-None-Match headers from
  7775. #    the request sent to the server. This requests a 200 status response
  7776. #    from the server to create a new cache entry with.
  7777. #Default:
  7778. # cache_miss_revalidate on
  7779.  
  7780. #  TAG: always_direct
  7781. #    Usage: always_direct allow|deny [!]aclname ...
  7782. #
  7783. #    Here you can use ACL elements to specify requests which should
  7784. #    ALWAYS be forwarded by Squid to the origin servers without using
  7785. #    any peers.  For example, to always directly forward requests for
  7786. #    local servers ignoring any parents or siblings you may have use
  7787. #    something like:
  7788. #
  7789. #        acl local-servers dstdomain my.domain.net
  7790. #        always_direct allow local-servers
  7791. #
  7792. #    To always forward FTP requests directly, use
  7793. #
  7794. #        acl FTP proto FTP
  7795. #        always_direct allow FTP
  7796. #
  7797. #    NOTE: There is a similar, but opposite option named
  7798. #    'never_direct'.  You need to be aware that "always_direct deny
  7799. #    foo" is NOT the same thing as "never_direct allow foo".  You
  7800. #    may need to use a deny rule to exclude a more-specific case of
  7801. #    some other rule.  Example:
  7802. #
  7803. #        acl local-external dstdomain external.foo.net
  7804. #        acl local-servers dstdomain  .foo.net
  7805. #        always_direct deny local-external
  7806. #        always_direct allow local-servers
  7807. #
  7808. #    NOTE: If your goal is to make the client forward the request
  7809. #    directly to the origin server bypassing Squid then this needs
  7810. #    to be done in the client configuration. Squid configuration
  7811. #    can only tell Squid how Squid should fetch the object.
  7812. #
  7813. #    NOTE: This directive is not related to caching. The replies
  7814. #    is cached as usual even if you use always_direct. To not cache
  7815. #    the replies see the 'cache' directive.
  7816. #
  7817. #    This clause supports both fast and slow acl types.
  7818. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  7819. #Default:
  7820. # Prevent any cache_peer being used for this request.
  7821.  
  7822. #  TAG: never_direct
  7823. #    Usage: never_direct allow|deny [!]aclname ...
  7824. #
  7825. #    never_direct is the opposite of always_direct.  Please read
  7826. #    the description for always_direct if you have not already.
  7827. #
  7828. #    With 'never_direct' you can use ACL elements to specify
  7829. #    requests which should NEVER be forwarded directly to origin
  7830. #    servers.  For example, to force the use of a proxy for all
  7831. #    requests, except those in your local domain use something like:
  7832. #
  7833. #        acl local-servers dstdomain .foo.net
  7834. #        never_direct deny local-servers
  7835. #        never_direct allow all
  7836. #
  7837. #    or if Squid is inside a firewall and there are local intranet
  7838. #    servers inside the firewall use something like:
  7839. #
  7840. #        acl local-intranet dstdomain .foo.net
  7841. #        acl local-external dstdomain external.foo.net
  7842. #        always_direct deny local-external
  7843. #        always_direct allow local-intranet
  7844. #        never_direct allow all
  7845. #
  7846. #    This clause supports both fast and slow acl types.
  7847. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  7848. #Default:
  7849. # Allow DNS results to be used for this request.
  7850.  
  7851. # ADVANCED NETWORKING OPTIONS
  7852. # -----------------------------------------------------------------------------
  7853.  
  7854. #  TAG: incoming_udp_average
  7855. #    Heavy voodoo here.  I can't even believe you are reading this.
  7856. #    Are you crazy?  Don't even think about adjusting these unless
  7857. #    you understand the algorithms in comm_select.c first!
  7858. #Default:
  7859. # incoming_udp_average 6
  7860.  
  7861. #  TAG: incoming_tcp_average
  7862. #    Heavy voodoo here.  I can't even believe you are reading this.
  7863. #    Are you crazy?  Don't even think about adjusting these unless
  7864. #    you understand the algorithms in comm_select.c first!
  7865. #Default:
  7866. # incoming_tcp_average 4
  7867.  
  7868. #  TAG: incoming_dns_average
  7869. #    Heavy voodoo here.  I can't even believe you are reading this.
  7870. #    Are you crazy?  Don't even think about adjusting these unless
  7871. #    you understand the algorithms in comm_select.c first!
  7872. #Default:
  7873. # incoming_dns_average 4
  7874.  
  7875. #  TAG: min_udp_poll_cnt
  7876. #    Heavy voodoo here.  I can't even believe you are reading this.
  7877. #    Are you crazy?  Don't even think about adjusting these unless
  7878. #    you understand the algorithms in comm_select.c first!
  7879. #Default:
  7880. # min_udp_poll_cnt 8
  7881.  
  7882. #  TAG: min_dns_poll_cnt
  7883. #    Heavy voodoo here.  I can't even believe you are reading this.
  7884. #    Are you crazy?  Don't even think about adjusting these unless
  7885. #    you understand the algorithms in comm_select.c first!
  7886. #Default:
  7887. # min_dns_poll_cnt 8
  7888.  
  7889. #  TAG: min_tcp_poll_cnt
  7890. #    Heavy voodoo here.  I can't even believe you are reading this.
  7891. #    Are you crazy?  Don't even think about adjusting these unless
  7892. #    you understand the algorithms in comm_select.c first!
  7893. #Default:
  7894. # min_tcp_poll_cnt 8
  7895.  
  7896. #  TAG: accept_filter
  7897. #    FreeBSD:
  7898. #
  7899. #    The name of an accept(2) filter to install on Squid's
  7900. #    listen socket(s).  This feature is perhaps specific to
  7901. #    FreeBSD and requires support in the kernel.
  7902. #
  7903. #    The 'httpready' filter delays delivering new connections
  7904. #    to Squid until a full HTTP request has been received.
  7905. #    See the accf_http(9) man page for details.
  7906. #
  7907. #    The 'dataready' filter delays delivering new connections
  7908. #    to Squid until there is some data to process.
  7909. #    See the accf_dataready(9) man page for details.
  7910. #
  7911. #    Linux:
  7912. #
  7913. #    The 'data' filter delays delivering of new connections
  7914. #    to Squid until there is some data to process by TCP_ACCEPT_DEFER.
  7915. #    You may optionally specify a number of seconds to wait by
  7916. #    'data=N' where N is the number of seconds. Defaults to 30
  7917. #    if not specified.  See the tcp(7) man page for details.
  7918. #EXAMPLE:
  7919. ## FreeBSD
  7920. #accept_filter httpready
  7921. ## Linux
  7922. #accept_filter data
  7923. #Default:
  7924. # none
  7925.  
  7926. #  TAG: client_ip_max_connections
  7927. #    Set an absolute limit on the number of connections a single
  7928. #    client IP can use. Any more than this and Squid will begin to drop
  7929. #    new connections from the client until it closes some links.
  7930. #
  7931. #    Note that this is a global limit. It affects all HTTP, HTCP, Gopher and FTP
  7932. #    connections from the client. For finer control use the ACL access controls.
  7933. #
  7934. #    Requires client_db to be enabled (the default).
  7935. #
  7936. #    WARNING: This may noticably slow down traffic received via external proxies
  7937. #    or NAT devices and cause them to rebound error messages back to their clients.
  7938. #Default:
  7939. # No limit.
  7940.  
  7941. #  TAG: tcp_recv_bufsize    (bytes)
  7942. #    Size of receive buffer to set for TCP sockets.  Probably just
  7943. #    as easy to change your kernel's default.
  7944. #    Omit from squid.conf to use the default buffer size.
  7945. #Default:
  7946. # Use operating system TCP defaults.
  7947.  
  7948. # ICAP OPTIONS
  7949. # -----------------------------------------------------------------------------
  7950.  
  7951. #  TAG: icap_enable    on|off
  7952. #    If you want to enable the ICAP module support, set this to on.
  7953. #Default:
  7954. # icap_enable off
  7955.  
  7956. #  TAG: icap_connect_timeout
  7957. #    This parameter specifies how long to wait for the TCP connect to
  7958. #    the requested ICAP server to complete before giving up and either
  7959. #    terminating the HTTP transaction or bypassing the failure.
  7960. #
  7961. #    The default for optional services is peer_connect_timeout.
  7962. #    The default for essential services is connect_timeout.
  7963. #    If this option is explicitly set, its value applies to all services.
  7964. #Default:
  7965. # none
  7966.  
  7967. #  TAG: icap_io_timeout    time-units
  7968. #    This parameter specifies how long to wait for an I/O activity on
  7969. #    an established, active ICAP connection before giving up and
  7970. #    either terminating the HTTP transaction or bypassing the
  7971. #    failure.
  7972. #Default:
  7973. # Use read_timeout.
  7974.  
  7975. #  TAG: icap_service_failure_limit    limit [in memory-depth time-units]
  7976. #    The limit specifies the number of failures that Squid tolerates
  7977. #    when establishing a new TCP connection with an ICAP service. If
  7978. #    the number of failures exceeds the limit, the ICAP service is
  7979. #    not used for new ICAP requests until it is time to refresh its
  7980. #    OPTIONS.
  7981. #
  7982. #    A negative value disables the limit. Without the limit, an ICAP
  7983. #    service will not be considered down due to connectivity failures
  7984. #    between ICAP OPTIONS requests.
  7985. #
  7986. #    Squid forgets ICAP service failures older than the specified
  7987. #    value of memory-depth. The memory fading algorithm
  7988. #    is approximate because Squid does not remember individual
  7989. #    errors but groups them instead, splitting the option
  7990. #    value into ten time slots of equal length.
  7991. #
  7992. #    When memory-depth is 0 and by default this option has no
  7993. #    effect on service failure expiration.
  7994. #
  7995. #    Squid always forgets failures when updating service settings
  7996. #    using an ICAP OPTIONS transaction, regardless of this option
  7997. #    setting.
  7998. #
  7999. #    For example,
  8000. #        # suspend service usage after 10 failures in 5 seconds:
  8001. #        icap_service_failure_limit 10 in 5 seconds
  8002. #Default:
  8003. # icap_service_failure_limit 10
  8004.  
  8005. #  TAG: icap_service_revival_delay
  8006. #    The delay specifies the number of seconds to wait after an ICAP
  8007. #    OPTIONS request failure before requesting the options again. The
  8008. #    failed ICAP service is considered "down" until fresh OPTIONS are
  8009. #    fetched.
  8010. #
  8011. #    The actual delay cannot be smaller than the hardcoded minimum
  8012. #    delay of 30 seconds.
  8013. #Default:
  8014. # icap_service_revival_delay 180
  8015.  
  8016. #  TAG: icap_preview_enable    on|off
  8017. #    The ICAP Preview feature allows the ICAP server to handle the
  8018. #    HTTP message by looking only at the beginning of the message body
  8019. #    or even without receiving the body at all. In some environments,
  8020. #    previews greatly speedup ICAP processing.
  8021. #
  8022. #    During an ICAP OPTIONS transaction, the server may tell    Squid what
  8023. #    HTTP messages should be previewed and how big the preview should be.
  8024. #    Squid will not use Preview if the server did not request one.
  8025. #
  8026. #    To disable ICAP Preview for all ICAP services, regardless of
  8027. #    individual ICAP server OPTIONS responses, set this option to "off".
  8028. #Example:
  8029. #icap_preview_enable off
  8030. #Default:
  8031. # icap_preview_enable on
  8032.  
  8033. #  TAG: icap_preview_size
  8034. #    The default size of preview data to be sent to the ICAP server.
  8035. #    This value might be overwritten on a per server basis by OPTIONS requests.
  8036. #Default:
  8037. # No preview sent.
  8038.  
  8039. #  TAG: icap_206_enable    on|off
  8040. #    206 (Partial Content) responses is an ICAP extension that allows the
  8041. #    ICAP agents to optionally combine adapted and original HTTP message
  8042. #    content. The decision to combine is postponed until the end of the
  8043. #    ICAP response. Squid supports Partial Content extension by default.
  8044. #
  8045. #    Activation of the Partial Content extension is negotiated with each
  8046. #    ICAP service during OPTIONS exchange. Most ICAP servers should handle
  8047. #    negotation correctly even if they do not support the extension, but
  8048. #    some might fail. To disable Partial Content support for all ICAP
  8049. #    services and to avoid any negotiation, set this option to "off".
  8050. #
  8051. #    Example:
  8052. #        icap_206_enable off
  8053. #Default:
  8054. # icap_206_enable on
  8055.  
  8056. #  TAG: icap_default_options_ttl
  8057. #    The default TTL value for ICAP OPTIONS responses that don't have
  8058. #    an Options-TTL header.
  8059. #Default:
  8060. # icap_default_options_ttl 60
  8061.  
  8062. #  TAG: icap_persistent_connections    on|off
  8063. #    Whether or not Squid should use persistent connections to
  8064. #    an ICAP server.
  8065. #Default:
  8066. # icap_persistent_connections on
  8067.  
  8068. #  TAG: adaptation_send_client_ip    on|off
  8069. #    If enabled, Squid shares HTTP client IP information with adaptation
  8070. #    services. For ICAP, Squid adds the X-Client-IP header to ICAP requests.
  8071. #    For eCAP, Squid sets the libecap::metaClientIp transaction option.
  8072. #
  8073. #    See also: adaptation_uses_indirect_client
  8074. #Default:
  8075. # adaptation_send_client_ip off
  8076.  
  8077. #  TAG: adaptation_send_username    on|off
  8078. #    This sends authenticated HTTP client username (if available) to
  8079. #    the adaptation service.
  8080. #
  8081. #    For ICAP, the username value is encoded based on the
  8082. #    icap_client_username_encode option and is sent using the header
  8083. #    specified by the icap_client_username_header option.
  8084. #Default:
  8085. # adaptation_send_username off
  8086.  
  8087. #  TAG: icap_client_username_header
  8088. #    ICAP request header name to use for adaptation_send_username.
  8089. #Default:
  8090. # icap_client_username_header X-Client-Username
  8091.  
  8092. #  TAG: icap_client_username_encode    on|off
  8093. #    Whether to base64 encode the authenticated client username.
  8094. #Default:
  8095. # icap_client_username_encode off
  8096.  
  8097. #  TAG: icap_service
  8098. #    Defines a single ICAP service using the following format:
  8099. #
  8100. #    icap_service id vectoring_point uri [option ...]
  8101. #
  8102. #    id: ID
  8103. #        an opaque identifier or name which is used to direct traffic to
  8104. #        this specific service. Must be unique among all adaptation
  8105. #        services in squid.conf.
  8106. #
  8107. #    vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
  8108. #        This specifies at which point of transaction processing the
  8109. #        ICAP service should be activated. *_postcache vectoring points
  8110. #        are not yet supported.
  8111. #
  8112. #    uri: icap://servername:port/servicepath
  8113. #        ICAP server and service location.
  8114. #         icaps://servername:port/servicepath
  8115. #        The "icap:" URI scheme is used for traditional ICAP server and
  8116. #        service location (default port is 1344, connections are not
  8117. #        encrypted). The "icaps:" URI scheme is for Secure ICAP
  8118. #        services that use SSL/TLS-encrypted ICAP connections (by
  8119. #        default, on port 11344).
  8120. #
  8121. #    ICAP does not allow a single service to handle both REQMOD and RESPMOD
  8122. #    transactions. Squid does not enforce that requirement. You can specify
  8123. #    services with the same service_url and different vectoring_points. You
  8124. #    can even specify multiple identical services as long as their
  8125. #    service_names differ.
  8126. #
  8127. #    To activate a service, use the adaptation_access directive. To group
  8128. #    services, use adaptation_service_chain and adaptation_service_set.
  8129. #
  8130. #    Service options are separated by white space. ICAP services support
  8131. #    the following name=value options:
  8132. #
  8133. #    bypass=on|off|1|0
  8134. #        If set to 'on' or '1', the ICAP service is treated as
  8135. #        optional. If the service cannot be reached or malfunctions,
  8136. #        Squid will try to ignore any errors and process the message as
  8137. #        if the service was not enabled. No all ICAP errors can be
  8138. #        bypassed.  If set to 0, the ICAP service is treated as
  8139. #        essential and all ICAP errors will result in an error page
  8140. #        returned to the HTTP client.
  8141. #
  8142. #        Bypass is off by default: services are treated as essential.
  8143. #
  8144. #    routing=on|off|1|0
  8145. #        If set to 'on' or '1', the ICAP service is allowed to
  8146. #        dynamically change the current message adaptation plan by
  8147. #        returning a chain of services to be used next. The services
  8148. #        are specified using the X-Next-Services ICAP response header
  8149. #        value, formatted as a comma-separated list of service names.
  8150. #        Each named service should be configured in squid.conf. Other
  8151. #        services are ignored. An empty X-Next-Services value results
  8152. #        in an empty plan which ends the current adaptation.
  8153. #
  8154. #        Dynamic adaptation plan may cross or cover multiple supported
  8155. #        vectoring points in their natural processing order.
  8156. #
  8157. #        Routing is not allowed by default: the ICAP X-Next-Services
  8158. #        response header is ignored.
  8159. #
  8160. #    ipv6=on|off
  8161. #        Only has effect on split-stack systems. The default on those systems
  8162. #        is to use IPv4-only connections. When set to 'on' this option will
  8163. #        make Squid use IPv6-only connections to contact this ICAP service.
  8164. #
  8165. #    on-overload=block|bypass|wait|force
  8166. #        If the service Max-Connections limit has been reached, do
  8167. #        one of the following for each new ICAP transaction:
  8168. #          * block:  send an HTTP error response to the client
  8169. #          * bypass: ignore the "over-connected" ICAP service
  8170. #          * wait:   wait (in a FIFO queue) for an ICAP connection slot
  8171. #          * force:  proceed, ignoring the Max-Connections limit
  8172. #
  8173. #        In SMP mode with N workers, each worker assumes the service
  8174. #        connection limit is Max-Connections/N, even though not all
  8175. #        workers may use a given service.
  8176. #
  8177. #        The default value is "bypass" if service is bypassable,
  8178. #        otherwise it is set to "wait".
  8179. #
  8180. #
  8181. #    max-conn=number
  8182. #        Use the given number as the Max-Connections limit, regardless
  8183. #        of the Max-Connections value given by the service, if any.
  8184. #
  8185. #    connection-encryption=on|off
  8186. #        Determines the ICAP service effect on the connections_encrypted
  8187. #        ACL.
  8188. #
  8189. #        The default is "on" for Secure ICAP services (i.e., those
  8190. #        with the icaps:// service URIs scheme) and "off" for plain ICAP
  8191. #        services.
  8192. #
  8193. #        Does not affect ICAP connections (e.g., does not turn Secure
  8194. #        ICAP on or off).
  8195. #
  8196. #    ==== ICAPS / TLS OPTIONS ====
  8197. #
  8198. #    These options are used for Secure ICAP (icaps://....) services only.
  8199. #
  8200. #    tls-cert=/path/to/ssl/certificate
  8201. #            A client X.509 certificate to use when connecting to
  8202. #            this ICAP server.
  8203. #
  8204. #    tls-key=/path/to/ssl/key
  8205. #            The private key corresponding to the previous
  8206. #            tls-cert= option.
  8207. #
  8208. #            If tls-key= is not specified tls-cert= is assumed to
  8209. #            reference a PEM file containing both the certificate
  8210. #            and private key.
  8211. #
  8212. #    tls-cipher=...    The list of valid TLS/SSL ciphers to use when connecting
  8213. #            to this icap server.
  8214. #
  8215. #    tls-min-version=1.N
  8216. #            The minimum TLS protocol version to permit. To control
  8217. #            SSLv3 use the tls-options= parameter.
  8218. #            Supported Values: 1.0 (default), 1.1, 1.2
  8219. #
  8220. #    tls-options=...    Specify various OpenSSL library options:
  8221. #
  8222. #                NO_SSLv3    Disallow the use of SSLv3
  8223. #
  8224. #                SINGLE_DH_USE
  8225. #                      Always create a new key when using
  8226. #                      temporary/ephemeral DH key exchanges
  8227. #
  8228. #                ALL       Enable various bug workarounds
  8229. #                      suggested as "harmless" by OpenSSL
  8230. #                      Be warned that this reduces SSL/TLS
  8231. #                      strength to some attacks.
  8232. #
  8233. #            See the OpenSSL SSL_CTX_set_options documentation for a
  8234. #            more complete list. Options relevant only to SSLv2 are
  8235. #            not supported.
  8236. #
  8237. #    tls-cafile=    PEM file containing CA certificates to use when verifying
  8238. #            the icap server certificate.
  8239. #            Use to specify intermediate CA certificate(s) if not sent
  8240. #            by the server. Or the full CA chain for the server when
  8241. #            using the tls-default-ca=off flag.
  8242. #            May be repeated to load multiple files.
  8243. #
  8244. #    tls-capath=...    A directory containing additional CA certificates to
  8245. #            use when verifying the icap server certificate.
  8246. #            Requires OpenSSL or LibreSSL.
  8247. #
  8248. #    tls-crlfile=...    A certificate revocation list file to use when
  8249. #            verifying the icap server certificate.
  8250. #
  8251. #    tls-flags=...    Specify various flags modifying the Squid TLS implementation:
  8252. #
  8253. #            DONT_VERIFY_PEER
  8254. #                Accept certificates even if they fail to
  8255. #                verify.
  8256. #            DONT_VERIFY_DOMAIN
  8257. #                Don't verify the icap server certificate
  8258. #                matches the server name
  8259. #
  8260. #    tls-default-ca[=off]
  8261. #            Whether to use the system Trusted CAs. Default is ON.
  8262. #
  8263. #    tls-domain=    The icap server name as advertised in it's certificate.
  8264. #            Used for verifying the correctness of the received icap
  8265. #            server certificate. If not specified the icap server
  8266. #            hostname extracted from ICAP URI will be used.
  8267. #
  8268. #    Older icap_service format without optional named parameters is
  8269. #    deprecated but supported for backward compatibility.
  8270. #
  8271. #Example:
  8272. #icap_service svcBlocker reqmod_precache icap://icap1.mydomain.net:1344/reqmod bypass=0
  8273. #icap_service svcLogger reqmod_precache icaps://icap2.mydomain.net:11344/reqmod routing=on
  8274. #Default:
  8275. # none
  8276.  
  8277. #  TAG: icap_class
  8278. #    This deprecated option was documented to define an ICAP service
  8279. #    chain, even though it actually defined a set of similar, redundant
  8280. #    services, and the chains were not supported.
  8281. #
  8282. #    To define a set of redundant services, please use the
  8283. #    adaptation_service_set directive. For service chains, use
  8284. #    adaptation_service_chain.
  8285. #Default:
  8286. # none
  8287.  
  8288. #  TAG: icap_access
  8289. #    This option is deprecated. Please use adaptation_access, which
  8290. #    has the same ICAP functionality, but comes with better
  8291. #    documentation, and eCAP support.
  8292. #Default:
  8293. # none
  8294.  
  8295. # eCAP OPTIONS
  8296. # -----------------------------------------------------------------------------
  8297.  
  8298. #  TAG: ecap_enable    on|off
  8299. #    Controls whether eCAP support is enabled.
  8300. #Default:
  8301. # ecap_enable off
  8302.  
  8303. #  TAG: ecap_service
  8304. #    Defines a single eCAP service
  8305. #
  8306. #    ecap_service id vectoring_point uri [option ...]
  8307. #
  8308. #        id: ID
  8309. #        an opaque identifier or name which is used to direct traffic to
  8310. #        this specific service. Must be unique among all adaptation
  8311. #        services in squid.conf.
  8312. #
  8313. #    vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
  8314. #        This specifies at which point of transaction processing the
  8315. #        eCAP service should be activated. *_postcache vectoring points
  8316. #        are not yet supported.
  8317. #
  8318. #    uri: ecap://vendor/service_name?custom&cgi=style&parameters=optional
  8319. #        Squid uses the eCAP service URI to match this configuration
  8320. #        line with one of the dynamically loaded services. Each loaded
  8321. #        eCAP service must have a unique URI. Obtain the right URI from
  8322. #        the service provider.
  8323. #
  8324. #    To activate a service, use the adaptation_access directive. To group
  8325. #    services, use adaptation_service_chain and adaptation_service_set.
  8326. #
  8327. #    Service options are separated by white space. eCAP services support
  8328. #    the following name=value options:
  8329. #
  8330. #    bypass=on|off|1|0
  8331. #        If set to 'on' or '1', the eCAP service is treated as optional.
  8332. #        If the service cannot be reached or malfunctions, Squid will try
  8333. #        to ignore any errors and process the message as if the service
  8334. #        was not enabled. No all eCAP errors can be bypassed.
  8335. #        If set to 'off' or '0', the eCAP service is treated as essential
  8336. #        and all eCAP errors will result in an error page returned to the
  8337. #        HTTP client.
  8338. #
  8339. #                Bypass is off by default: services are treated as essential.
  8340. #
  8341. #    routing=on|off|1|0
  8342. #        If set to 'on' or '1', the eCAP service is allowed to
  8343. #        dynamically change the current message adaptation plan by
  8344. #        returning a chain of services to be used next.
  8345. #
  8346. #        Dynamic adaptation plan may cross or cover multiple supported
  8347. #        vectoring points in their natural processing order.
  8348. #
  8349. #        Routing is not allowed by default.
  8350. #
  8351. #    connection-encryption=on|off
  8352. #        Determines the eCAP service effect on the connections_encrypted
  8353. #        ACL.
  8354. #
  8355. #        Defaults to "on", which does not taint the master transaction
  8356. #        w.r.t. that ACL.
  8357. #
  8358. #        Does not affect eCAP API calls.
  8359. #
  8360. #    Older ecap_service format without optional named parameters is
  8361. #    deprecated but supported for backward compatibility.
  8362. #
  8363. #
  8364. #Example:
  8365. #ecap_service s1 reqmod_precache ecap://filters.R.us/leakDetector?on_error=block bypass=off
  8366. #ecap_service s2 respmod_precache ecap://filters.R.us/virusFilter config=/etc/vf.cfg bypass=on
  8367. #Default:
  8368. # none
  8369.  
  8370. #  TAG: loadable_modules
  8371. #    Instructs Squid to load the specified dynamic module(s) or activate
  8372. #    preloaded module(s).
  8373. #Example:
  8374. #loadable_modules /usr/lib/MinimalAdapter.so
  8375. #Default:
  8376. # none
  8377.  
  8378. # MESSAGE ADAPTATION OPTIONS
  8379. # -----------------------------------------------------------------------------
  8380.  
  8381. #  TAG: adaptation_service_set
  8382. #
  8383. #    Configures an ordered set of similar, redundant services. This is
  8384. #    useful when hot standby or backup adaptation servers are available.
  8385. #
  8386. #        adaptation_service_set set_name service_name1 service_name2 ...
  8387. #
  8388. #     The named services are used in the set declaration order. The first
  8389. #    applicable adaptation service from the set is used first. The next
  8390. #    applicable service is tried if and only if the transaction with the
  8391. #    previous service fails and the message waiting to be adapted is still
  8392. #    intact.
  8393. #
  8394. #    When adaptation starts, broken services are ignored as if they were
  8395. #    not a part of the set. A broken service is a down optional service.
  8396. #
  8397. #    The services in a set must be attached to the same vectoring point
  8398. #    (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
  8399. #
  8400. #    If all services in a set are optional then adaptation failures are
  8401. #    bypassable. If all services in the set are essential, then a
  8402. #    transaction failure with one service may still be retried using
  8403. #    another service from the set, but when all services fail, the master
  8404. #    transaction fails as well.
  8405. #
  8406. #    A set may contain a mix of optional and essential services, but that
  8407. #    is likely to lead to surprising results because broken services become
  8408. #    ignored (see above), making previously bypassable failures fatal.
  8409. #    Technically, it is the bypassability of the last failed service that
  8410. #    matters.
  8411. #
  8412. #    See also: adaptation_access adaptation_service_chain
  8413. #
  8414. #Example:
  8415. #adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup
  8416. #adaptation service_set svcLogger loggerLocal loggerRemote
  8417. #Default:
  8418. # none
  8419.  
  8420. #  TAG: adaptation_service_chain
  8421. #
  8422. #    Configures a list of complementary services that will be applied
  8423. #    one-by-one, forming an adaptation chain or pipeline. This is useful
  8424. #    when Squid must perform different adaptations on the same message.
  8425. #
  8426. #        adaptation_service_chain chain_name service_name1 svc_name2 ...
  8427. #
  8428. #     The named services are used in the chain declaration order. The first
  8429. #    applicable adaptation service from the chain is used first. The next
  8430. #    applicable service is applied to the successful adaptation results of
  8431. #    the previous service in the chain.
  8432. #
  8433. #    When adaptation starts, broken services are ignored as if they were
  8434. #    not a part of the chain. A broken service is a down optional service.
  8435. #
  8436. #    Request satisfaction terminates the adaptation chain because Squid
  8437. #    does not currently allow declaration of RESPMOD services at the
  8438. #    "reqmod_precache" vectoring point (see icap_service or ecap_service).
  8439. #
  8440. #    The services in a chain must be attached to the same vectoring point
  8441. #    (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
  8442. #
  8443. #    A chain may contain a mix of optional and essential services. If an
  8444. #    essential adaptation fails (or the failure cannot be bypassed for
  8445. #    other reasons), the master transaction fails. Otherwise, the failure
  8446. #    is bypassed as if the failed adaptation service was not in the chain.
  8447. #
  8448. #    See also: adaptation_access adaptation_service_set
  8449. #
  8450. #Example:
  8451. #adaptation_service_chain svcRequest requestLogger urlFilter leakDetector
  8452. #Default:
  8453. # none
  8454.  
  8455. #  TAG: adaptation_access
  8456. #    Sends an HTTP transaction to an ICAP or eCAP adaptation    service.
  8457. #
  8458. #    adaptation_access service_name allow|deny [!]aclname...
  8459. #    adaptation_access set_name     allow|deny [!]aclname...
  8460. #
  8461. #    At each supported vectoring point, the adaptation_access
  8462. #    statements are processed in the order they appear in this
  8463. #    configuration file. Statements pointing to the following services
  8464. #    are ignored (i.e., skipped without checking their ACL):
  8465. #
  8466. #        - services serving different vectoring points
  8467. #        - "broken-but-bypassable" services
  8468. #        - "up" services configured to ignore such transactions
  8469. #              (e.g., based on the ICAP Transfer-Ignore header).
  8470. #
  8471. #        When a set_name is used, all services in the set are checked
  8472. #    using the same rules, to find the first applicable one. See
  8473. #    adaptation_service_set for details.
  8474. #
  8475. #    If an access list is checked and there is a match, the
  8476. #    processing stops: For an "allow" rule, the corresponding
  8477. #    adaptation service is used for the transaction. For a "deny"
  8478. #    rule, no adaptation service is activated.
  8479. #
  8480. #    It is currently not possible to apply more than one adaptation
  8481. #    service at the same vectoring point to the same HTTP transaction.
  8482. #
  8483. #        See also: icap_service and ecap_service
  8484. #
  8485. #Example:
  8486. #adaptation_access service_1 allow all
  8487. #Default:
  8488. # Allow, unless rules exist in squid.conf.
  8489.  
  8490. #  TAG: adaptation_service_iteration_limit
  8491. #    Limits the number of iterations allowed when applying adaptation
  8492. #    services to a message. If your longest adaptation set or chain
  8493. #    may have more than 16 services, increase the limit beyond its
  8494. #    default value of 16. If detecting infinite iteration loops sooner
  8495. #    is critical, make the iteration limit match the actual number
  8496. #    of services in your longest adaptation set or chain.
  8497. #
  8498. #    Infinite adaptation loops are most likely with routing services.
  8499. #
  8500. #    See also: icap_service routing=1
  8501. #Default:
  8502. # adaptation_service_iteration_limit 16
  8503.  
  8504. #  TAG: adaptation_masterx_shared_names
  8505. #    For each master transaction (i.e., the HTTP request and response
  8506. #    sequence, including all related ICAP and eCAP exchanges), Squid
  8507. #    maintains a table of metadata. The table entries are (name, value)
  8508. #    pairs shared among eCAP and ICAP exchanges. The table is destroyed
  8509. #    with the master transaction.
  8510. #
  8511. #    This option specifies the table entry names that Squid must accept
  8512. #    from and forward to the adaptation transactions.
  8513. #
  8514. #    An ICAP REQMOD or RESPMOD transaction may set an entry in the
  8515. #    shared table by returning an ICAP header field with a name
  8516. #    specified in adaptation_masterx_shared_names.
  8517. #
  8518. #    An eCAP REQMOD or RESPMOD transaction may set an entry in the
  8519. #    shared table by implementing the libecap::visitEachOption() API
  8520. #    to provide an option with a name specified in
  8521. #    adaptation_masterx_shared_names.
  8522. #
  8523. #    Squid will store and forward the set entry to subsequent adaptation
  8524. #    transactions within the same master transaction scope.
  8525. #
  8526. #    Only one shared entry name is supported at this time.
  8527. #
  8528. #Example:
  8529. ## share authentication information among ICAP services
  8530. #adaptation_masterx_shared_names X-Subscriber-ID
  8531. #Default:
  8532. # none
  8533.  
  8534. #  TAG: adaptation_meta
  8535. #    This option allows Squid administrator to add custom ICAP request
  8536. #    headers or eCAP options to Squid ICAP requests or eCAP transactions.
  8537. #    Use it to pass custom authentication tokens and other
  8538. #    transaction-state related meta information to an ICAP/eCAP service.
  8539. #
  8540. #    The addition of a meta header is ACL-driven:
  8541. #        adaptation_meta name value [!]aclname ...
  8542. #
  8543. #    Processing for a given header name stops after the first ACL list match.
  8544. #    Thus, it is impossible to add two headers with the same name. If no ACL
  8545. #    lists match for a given header name, no such header is added. For
  8546. #    example:
  8547. #
  8548. #        # do not debug transactions except for those that need debugging
  8549. #        adaptation_meta X-Debug 1 needs_debugging
  8550. #
  8551. #        # log all transactions except for those that must remain secret
  8552. #        adaptation_meta X-Log 1 !keep_secret
  8553. #
  8554. #        # mark transactions from users in the "G 1" group
  8555. #        adaptation_meta X-Authenticated-Groups "G 1" authed_as_G1
  8556. #
  8557. #    The "value" parameter may be a regular squid.conf token or a "double
  8558. #    quoted string". Within the quoted string, use backslash (\) to escape
  8559. #    any character, which is currently only useful for escaping backslashes
  8560. #    and double quotes. For example,
  8561. #        "this string has one backslash (\\) and two \"quotes\""
  8562. #
  8563. #    Used adaptation_meta header values may be logged via %note
  8564. #    logformat code. If multiple adaptation_meta headers with the same name
  8565. #    are used during master transaction lifetime, the header values are
  8566. #    logged in the order they were used and duplicate values are ignored
  8567. #    (only the first repeated value will be logged).
  8568. #Default:
  8569. # none
  8570.  
  8571. #  TAG: icap_retry
  8572. #    This ACL determines which retriable ICAP transactions are
  8573. #    retried. Transactions that received a complete ICAP response
  8574. #    and did not have to consume or produce HTTP bodies to receive
  8575. #    that response are usually retriable.
  8576. #
  8577. #    icap_retry allow|deny [!]aclname ...
  8578. #
  8579. #    Squid automatically retries some ICAP I/O timeouts and errors
  8580. #    due to persistent connection race conditions.
  8581. #
  8582. #    See also: icap_retry_limit
  8583. #Default:
  8584. # icap_retry deny all
  8585.  
  8586. #  TAG: icap_retry_limit
  8587. #    Limits the number of retries allowed.
  8588. #
  8589. #    Communication errors due to persistent connection race
  8590. #    conditions are unavoidable, automatically retried, and do not
  8591. #    count against this limit.
  8592. #
  8593. #    See also: icap_retry
  8594. #Default:
  8595. # No retries are allowed.
  8596.  
  8597. # DNS OPTIONS
  8598. # -----------------------------------------------------------------------------
  8599.  
  8600. #  TAG: check_hostnames
  8601. #    For security and stability reasons Squid can check
  8602. #    hostnames for Internet standard RFC compliance. If you want
  8603. #    Squid to perform these checks turn this directive on.
  8604. #Default:
  8605. # check_hostnames off
  8606.  
  8607. #  TAG: allow_underscore
  8608. #    Underscore characters is not strictly allowed in Internet hostnames
  8609. #    but nevertheless used by many sites. Set this to off if you want
  8610. #    Squid to be strict about the standard.
  8611. #    This check is performed only when check_hostnames is set to on.
  8612. #Default:
  8613. # allow_underscore on
  8614.  
  8615. #  TAG: dns_retransmit_interval
  8616. #    Initial retransmit interval for DNS queries. The interval is
  8617. #    doubled each time all configured DNS servers have been tried.
  8618. #Default:
  8619. # dns_retransmit_interval 5 seconds
  8620.  
  8621. #  TAG: dns_timeout
  8622. #    DNS Query timeout. If no response is received to a DNS query
  8623. #    within this time all DNS servers for the queried domain
  8624. #    are assumed to be unavailable.
  8625. #Default:
  8626. # dns_timeout 30 seconds
  8627.  
  8628. #  TAG: dns_packet_max
  8629. #    Maximum number of bytes packet size to advertise via EDNS.
  8630. #    Set to "none" to disable EDNS large packet support.
  8631. #
  8632. #    For legacy reasons DNS UDP replies will default to 512 bytes which
  8633. #    is too small for many responses. EDNS provides a means for Squid to
  8634. #    negotiate receiving larger responses back immediately without having
  8635. #    to failover with repeat requests. Responses larger than this limit
  8636. #    will retain the old behaviour of failover to TCP DNS.
  8637. #
  8638. #    Squid has no real fixed limit internally, but allowing packet sizes
  8639. #    over 1500 bytes requires network jumbogram support and is usually not
  8640. #    necessary.
  8641. #
  8642. #    WARNING: The RFC also indicates that some older resolvers will reply
  8643. #    with failure of the whole request if the extension is added. Some
  8644. #    resolvers have already been identified which will reply with mangled
  8645. #    EDNS response on occasion. Usually in response to many-KB jumbogram
  8646. #    sizes being advertised by Squid.
  8647. #    Squid will currently treat these both as an unable-to-resolve domain
  8648. #    even if it would be resolvable without EDNS.
  8649. #Default:
  8650. # EDNS disabled
  8651.  
  8652. #  TAG: dns_defnames    on|off
  8653. #    Normally the RES_DEFNAMES resolver option is disabled
  8654. #    (see res_init(3)).  This prevents caches in a hierarchy
  8655. #    from interpreting single-component hostnames locally.  To allow
  8656. #    Squid to handle single-component names, enable this option.
  8657. #Default:
  8658. # Search for single-label domain names is disabled.
  8659.  
  8660. #  TAG: dns_multicast_local    on|off
  8661. #    When set to on, Squid sends multicast DNS lookups on the local
  8662. #    network for domains ending in .local and .arpa.
  8663. #    This enables local servers and devices to be contacted in an
  8664. #    ad-hoc or zero-configuration network environment.
  8665. #Default:
  8666. # Search for .local and .arpa names is disabled.
  8667.  
  8668. #  TAG: dns_nameservers
  8669. #    Use this if you want to specify a list of DNS name servers
  8670. #    (IP addresses) to use instead of those given in your
  8671. #    /etc/resolv.conf file.
  8672. #
  8673. #    On Windows platforms, if no value is specified here or in
  8674. #    the /etc/resolv.conf file, the list of DNS name servers are
  8675. #    taken from the Windows registry, both static and dynamic DHCP
  8676. #    configurations are supported.
  8677. #
  8678. #    Example: dns_nameservers 10.0.0.1 192.172.0.4
  8679. #Default:
  8680. # Use operating system definitions
  8681.  
  8682. #  TAG: hosts_file
  8683. #    Location of the host-local IP name-address associations
  8684. #    database. Most Operating Systems have such a file on different
  8685. #    default locations:
  8686. #    - Un*X & Linux:    /etc/hosts
  8687. #    - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
  8688. #               (%SystemRoot% value install default is c:\winnt)
  8689. #    - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
  8690. #               (%SystemRoot% value install default is c:\windows)
  8691. #    - Windows 9x/Me:   %windir%\hosts
  8692. #               (%windir% value is usually c:\windows)
  8693. #    - Cygwin:       /etc/hosts
  8694. #
  8695. #    The file contains newline-separated definitions, in the
  8696. #    form ip_address_in_dotted_form name [name ...] names are
  8697. #    whitespace-separated. Lines beginning with an hash (#)
  8698. #    character are comments.
  8699. #
  8700. #    The file is checked at startup and upon configuration.
  8701. #    If set to 'none', it won't be checked.
  8702. #    If append_domain is used, that domain will be added to
  8703. #    domain-local (i.e. not containing any dot character) host
  8704. #    definitions.
  8705. #Default:
  8706. # hosts_file /etc/hosts
  8707.  
  8708. #  TAG: append_domain
  8709. #    Appends local domain name to hostnames without any dots in
  8710. #    them.  append_domain must begin with a period.
  8711. #
  8712. #    Be warned there are now Internet names with no dots in
  8713. #    them using only top-domain names, so setting this may
  8714. #    cause some Internet sites to become unavailable.
  8715. #
  8716. #Example:
  8717. # append_domain .yourdomain.com
  8718. #Default:
  8719. # Use operating system definitions
  8720.  
  8721. #  TAG: ignore_unknown_nameservers
  8722. #    By default Squid checks that DNS responses are received
  8723. #    from the same IP addresses they are sent to.  If they
  8724. #    don't match, Squid ignores the response and writes a warning
  8725. #    message to cache.log.  You can allow responses from unknown
  8726. #    nameservers by setting this option to 'off'.
  8727. #Default:
  8728. # ignore_unknown_nameservers on
  8729.  
  8730. #  TAG: ipcache_size    (number of entries)
  8731. #    Maximum number of DNS IP cache entries.
  8732. #Default:
  8733. # ipcache_size 1024
  8734.  
  8735. #  TAG: ipcache_low    (percent)
  8736. #Default:
  8737. # ipcache_low 90
  8738.  
  8739. #  TAG: ipcache_high    (percent)
  8740. #    The size, low-, and high-water marks for the IP cache.
  8741. #Default:
  8742. # ipcache_high 95
  8743.  
  8744. #  TAG: fqdncache_size    (number of entries)
  8745. #    Maximum number of FQDN cache entries.
  8746. #Default:
  8747. # fqdncache_size 1024
  8748.  
  8749. # MISCELLANEOUS
  8750. # -----------------------------------------------------------------------------
  8751.  
  8752. #  TAG: configuration_includes_quoted_values    on|off
  8753. #    If set, Squid will recognize each "quoted string" after a configuration
  8754. #    directive as a single parameter. The quotes are stripped before the
  8755. #    parameter value is interpreted or used.
  8756. #    See "Values with spaces, quotes, and other special characters"
  8757. #    section for more details.
  8758. #Default:
  8759. # configuration_includes_quoted_values off
  8760.  
  8761. #  TAG: memory_pools    on|off
  8762. #    If set, Squid will keep pools of allocated (but unused) memory
  8763. #    available for future use.  If memory is a premium on your
  8764. #    system and you believe your malloc library outperforms Squid
  8765. #    routines, disable this.
  8766. #Default:
  8767. # memory_pools on
  8768.  
  8769. #  TAG: memory_pools_limit    (bytes)
  8770. #    Used only with memory_pools on:
  8771. #    memory_pools_limit 50 MB
  8772. #
  8773. #    If set to a non-zero value, Squid will keep at most the specified
  8774. #    limit of allocated (but unused) memory in memory pools. All free()
  8775. #    requests that exceed this limit will be handled by your malloc
  8776. #    library. Squid does not pre-allocate any memory, just safe-keeps
  8777. #    objects that otherwise would be free()d. Thus, it is safe to set
  8778. #    memory_pools_limit to a reasonably high value even if your
  8779. #    configuration will use less memory.
  8780. #
  8781. #    If set to none, Squid will keep all memory it can. That is, there
  8782. #    will be no limit on the total amount of memory used for safe-keeping.
  8783. #
  8784. #    To disable memory allocation optimization, do not set
  8785. #    memory_pools_limit to 0 or none. Set memory_pools to "off" instead.
  8786. #
  8787. #    An overhead for maintaining memory pools is not taken into account
  8788. #    when the limit is checked. This overhead is close to four bytes per
  8789. #    object kept. However, pools may actually _save_ memory because of
  8790. #    reduced memory thrashing in your malloc library.
  8791. #Default:
  8792. # memory_pools_limit 5 MB
  8793.  
  8794. #  TAG: forwarded_for    on|off|transparent|truncate|delete
  8795. #    If set to "on", Squid will append your client's IP address
  8796. #    in the HTTP requests it forwards. By default it looks like:
  8797. #
  8798. #        X-Forwarded-For: 192.1.2.3
  8799. #
  8800. #    If set to "off", it will appear as
  8801. #
  8802. #        X-Forwarded-For: unknown
  8803. #
  8804. #    If set to "transparent", Squid will not alter the
  8805. #    X-Forwarded-For header in any way.
  8806. #
  8807. #    If set to "delete", Squid will delete the entire
  8808. #    X-Forwarded-For header.
  8809. #
  8810. #    If set to "truncate", Squid will remove all existing
  8811. #    X-Forwarded-For entries, and place the client IP as the sole entry.
  8812. #Default:
  8813. # forwarded_for on
  8814.  
  8815. #  TAG: cachemgr_passwd
  8816. #    Specify passwords for cachemgr operations.
  8817. #
  8818. #    Usage: cachemgr_passwd password action action ...
  8819. #
  8820. #    Some valid actions are (see cache manager menu for a full list):
  8821. #        5min
  8822. #        60min
  8823. #        asndb
  8824. #        authenticator
  8825. #        cbdata
  8826. #        client_list
  8827. #        comm_incoming
  8828. #        config *
  8829. #        counters
  8830. #        delay
  8831. #        digest_stats
  8832. #        dns
  8833. #        events
  8834. #        filedescriptors
  8835. #        fqdncache
  8836. #        histograms
  8837. #        http_headers
  8838. #        info
  8839. #        io
  8840. #        ipcache
  8841. #        mem
  8842. #        menu
  8843. #        netdb
  8844. #        non_peers
  8845. #        objects
  8846. #        offline_toggle *
  8847. #        pconn
  8848. #        peer_select
  8849. #        reconfigure *
  8850. #        redirector
  8851. #        refresh
  8852. #        server_list
  8853. #        shutdown *
  8854. #        store_digest
  8855. #        storedir
  8856. #        utilization
  8857. #        via_headers
  8858. #        vm_objects
  8859. #
  8860. #    * Indicates actions which will not be performed without a
  8861. #      valid password, others can be performed if not listed here.
  8862. #
  8863. #    To disable an action, set the password to "disable".
  8864. #    To allow performing an action without a password, set the
  8865. #    password to "none".
  8866. #
  8867. #    Use the keyword "all" to set the same password for all actions.
  8868. #
  8869. #Example:
  8870. # cachemgr_passwd secret shutdown
  8871. # cachemgr_passwd lesssssssecret info stats/objects
  8872. # cachemgr_passwd disable all
  8873. #Default:
  8874. # No password. Actions which require password are denied.
  8875.  
  8876. #  TAG: client_db    on|off
  8877. #    If you want to disable collecting per-client statistics,
  8878. #    turn off client_db here.
  8879. #Default:
  8880. # client_db on
  8881.  
  8882. #  TAG: refresh_all_ims    on|off
  8883. #    When you enable this option, squid will always check
  8884. #    the origin server for an update when a client sends an
  8885. #    If-Modified-Since request.  Many browsers use IMS
  8886. #    requests when the user requests a reload, and this
  8887. #    ensures those clients receive the latest version.
  8888. #
  8889. #    By default (off), squid may return a Not Modified response
  8890. #    based on the age of the cached version.
  8891. #Default:
  8892. # refresh_all_ims off
  8893.  
  8894. #  TAG: reload_into_ims    on|off
  8895. #    When you enable this option, client no-cache or ``reload''
  8896. #    requests will be changed to If-Modified-Since requests.
  8897. #    Doing this VIOLATES the HTTP standard.  Enabling this
  8898. #    feature could make you liable for problems which it
  8899. #    causes.
  8900. #
  8901. #    see also refresh_pattern for a more selective approach.
  8902. #Default:
  8903. # reload_into_ims off
  8904.  
  8905. #  TAG: connect_retries
  8906. #    Limits the number of reopening attempts when establishing a single
  8907. #    TCP connection. All these attempts must still complete before the
  8908. #    applicable connection opening timeout expires.
  8909. #
  8910. #    By default and when connect_retries is set to zero, Squid does not
  8911. #    retry failed connection opening attempts.
  8912. #
  8913. #    The (not recommended) maximum is 10 tries. An attempt to configure a
  8914. #    higher value results in the value of 10 being used (with a warning).
  8915. #
  8916. #    Squid may open connections to retry various high-level forwarding
  8917. #    failures. For an outside observer, that activity may look like a
  8918. #    low-level connection reopening attempt, but those high-level retries
  8919. #    are governed by forward_max_tries instead.
  8920. #
  8921. #    See also: connect_timeout, forward_timeout, icap_connect_timeout,
  8922. #    ident_timeout, and forward_max_tries.
  8923. #Default:
  8924. # Do not retry failed connections.
  8925.  
  8926. #  TAG: retry_on_error
  8927. #    If set to ON Squid will automatically retry requests when
  8928. #    receiving an error response with status 403 (Forbidden),
  8929. #    500 (Internal Error), 501 or 503 (Service not available).
  8930. #    Status 502 and 504 (Gateway errors) are always retried.
  8931. #
  8932. #    This is mainly useful if you are in a complex cache hierarchy to
  8933. #    work around access control errors.
  8934. #
  8935. #    NOTE: This retry will attempt to find another working destination.
  8936. #    Which is different from the server which just failed.
  8937. #Default:
  8938. # retry_on_error off
  8939.  
  8940. #  TAG: as_whois_server
  8941. #    WHOIS server to query for AS numbers.  NOTE: AS numbers are
  8942. #    queried only when Squid starts up, not for every request.
  8943. #Default:
  8944. # as_whois_server whois.ra.net
  8945.  
  8946. #  TAG: offline_mode
  8947. #    Enable this option and Squid will never try to validate cached
  8948. #    objects.
  8949. #Default:
  8950. # offline_mode off
  8951.  
  8952. #  TAG: uri_whitespace
  8953. #    What to do with requests that have whitespace characters in the
  8954. #    URI.  Options:
  8955. #
  8956. #    strip:  The whitespace characters are stripped out of the URL.
  8957. #        This is the behavior recommended by RFC2396 and RFC3986
  8958. #        for tolerant handling of generic URI.
  8959. #        NOTE: This is one difference between generic URI and HTTP URLs.
  8960. #
  8961. #    deny:   The request is denied.  The user receives an "Invalid
  8962. #        Request" message.
  8963. #        This is the behaviour recommended by RFC2616 for safe
  8964. #        handling of HTTP request URL.
  8965. #
  8966. #    allow:  The request is allowed and the URI is not changed.  The
  8967. #        whitespace characters remain in the URI.  Note the
  8968. #        whitespace is passed to redirector processes if they
  8969. #        are in use.
  8970. #        Note this may be considered a violation of RFC2616
  8971. #        request parsing where whitespace is prohibited in the
  8972. #        URL field.
  8973. #
  8974. #    encode:    The request is allowed and the whitespace characters are
  8975. #        encoded according to RFC1738.
  8976. #
  8977. #    chop:    The request is allowed and the URI is chopped at the
  8978. #        first whitespace.
  8979. #
  8980. #
  8981. #    NOTE the current Squid implementation of encode and chop violates
  8982. #    RFC2616 by not using a 301 redirect after altering the URL.
  8983. #Default:
  8984. # uri_whitespace strip
  8985.  
  8986. #  TAG: chroot
  8987. #    Specifies a directory where Squid should do a chroot() while
  8988. #    initializing.  This also causes Squid to fully drop root
  8989. #    privileges after initializing.  This means, for example, if you
  8990. #    use a HTTP port less than 1024 and try to reconfigure, you may
  8991. #    get an error saying that Squid can not open the port.
  8992. #Default:
  8993. # none
  8994.  
  8995. #  TAG: pipeline_prefetch
  8996. #    HTTP clients may send a pipeline of 1+N requests to Squid using a
  8997. #    single connection, without waiting for Squid to respond to the first
  8998. #    of those requests. This option limits the number of concurrent
  8999. #    requests Squid will try to handle in parallel. If set to N, Squid
  9000. #    will try to receive and process up to 1+N requests on the same
  9001. #    connection concurrently.
  9002. #
  9003. #    Defaults to 0 (off) for bandwidth management and access logging
  9004. #    reasons.
  9005. #
  9006. #    NOTE: pipelining requires persistent connections to clients.
  9007. #
  9008. #    WARNING: pipelining breaks NTLM and Negotiate/Kerberos authentication.
  9009. #Default:
  9010. # Do not pre-parse pipelined requests.
  9011.  
  9012. #  TAG: high_response_time_warning    (msec)
  9013. #    If the one-minute median response time exceeds this value,
  9014. #    Squid prints a WARNING with debug level 0 to get the
  9015. #    administrators attention.  The value is in milliseconds.
  9016. #Default:
  9017. # disabled.
  9018.  
  9019. #  TAG: high_page_fault_warning
  9020. #    If the one-minute average page fault rate exceeds this
  9021. #    value, Squid prints a WARNING with debug level 0 to get
  9022. #    the administrators attention.  The value is in page faults
  9023. #    per second.
  9024. #Default:
  9025. # disabled.
  9026.  
  9027. #  TAG: high_memory_warning
  9028. # Note: This option is only available if Squid is rebuilt with the
  9029. #       GNU Malloc with mstats()
  9030. #
  9031. #    If the memory usage (as determined by gnumalloc, if available and used)
  9032. #    exceeds    this amount, Squid prints a WARNING with debug level 0 to get
  9033. #    the administrators attention.
  9034. #Default:
  9035. # disabled.
  9036.  
  9037. #  TAG: sleep_after_fork    (microseconds)
  9038. #    When this is set to a non-zero value, the main Squid process
  9039. #    sleeps the specified number of microseconds after a fork()
  9040. #    system call. This sleep may help the situation where your
  9041. #    system reports fork() failures due to lack of (virtual)
  9042. #    memory. Note, however, if you have a lot of child
  9043. #    processes, these sleep delays will add up and your
  9044. #    Squid will not service requests for some amount of time
  9045. #    until all the child processes have been started.
  9046. #    On Windows value less then 1000 (1 milliseconds) are
  9047. #    rounded to 1000.
  9048. #Default:
  9049. # sleep_after_fork 0
  9050.  
  9051. #  TAG: windows_ipaddrchangemonitor    on|off
  9052. # Note: This option is only available if Squid is rebuilt with the
  9053. #       MS Windows
  9054. #
  9055. #    On Windows Squid by default will monitor IP address changes and will
  9056. #    reconfigure itself after any detected event. This is very useful for
  9057. #    proxies connected to internet with dial-up interfaces.
  9058. #    In some cases (a Proxy server acting as VPN gateway is one) it could be
  9059. #    desiderable to disable this behaviour setting this to 'off'.
  9060. #    Note: after changing this, Squid service must be restarted.
  9061. #Default:
  9062. # windows_ipaddrchangemonitor on
  9063.  
  9064. #  TAG: eui_lookup
  9065. #    Whether to lookup the EUI or MAC address of a connected client.
  9066. #Default:
  9067. # eui_lookup on
  9068.  
  9069. #  TAG: max_filedescriptors
  9070. #    Set the maximum number of filedescriptors, either below the
  9071. #    operating system default or up to the hard limit.
  9072. #
  9073. #    Remove from squid.conf to inherit the current ulimit soft
  9074. #    limit setting.
  9075. #
  9076. #    Note: Changing this requires a restart of Squid. Also
  9077. #    not all I/O types supports large values (eg on Windows).
  9078. #Default:
  9079. # Use operating system soft limit set by ulimit.
  9080.  
  9081. #  TAG: force_request_body_continuation
  9082. #    This option controls how Squid handles data upload requests from HTTP
  9083. #    and FTP agents that require a "Please Continue" control message response
  9084. #    to actually send the request body to Squid. It is mostly useful in
  9085. #    adaptation environments.
  9086. #
  9087. #    When Squid receives an HTTP request with an "Expect: 100-continue"
  9088. #    header or an FTP upload command (e.g., STOR), Squid normally sends the
  9089. #    request headers or FTP command information to an adaptation service (or
  9090. #    peer) and waits for a response. Most adaptation services (and some
  9091. #    broken peers) may not respond to Squid at that stage because they may
  9092. #    decide to wait for the HTTP request body or FTP data transfer. However,
  9093. #    that request body or data transfer may never come because Squid has not
  9094. #    responded with the HTTP 100 or FTP 150 (Please Continue) control message
  9095. #    to the request sender yet!
  9096. #
  9097. #    An allow match tells Squid to respond with the HTTP 100 or FTP 150
  9098. #    (Please Continue) control message on its own, before forwarding the
  9099. #    request to an adaptation service or peer. Such a response usually forces
  9100. #    the request sender to proceed with sending the body. A deny match tells
  9101. #    Squid to delay that control response until the origin server confirms
  9102. #    that the request body is needed. Delaying is the default behavior.
  9103. #Default:
  9104. # Deny, unless rules exist in squid.conf.
  9105.  
  9106. #  TAG: http_upgrade_request_protocols
  9107. #    Controls client-initiated and server-confirmed switching from HTTP to
  9108. #    another protocol (or to several protocols) using HTTP Upgrade mechanism
  9109. #    defined in RFC 7230 Section 6.7. Squid itself does not understand the
  9110. #    protocols being upgraded to and participates in the upgraded
  9111. #    communication only as a dumb TCP proxy. Admins should not allow
  9112. #    upgrading to protocols that require a more meaningful proxy
  9113. #    participation.
  9114. #
  9115. #    Usage: http_upgrade_request_protocols <protocol> allow|deny [!]acl ...
  9116. #
  9117. #    The required "protocol" parameter is either an all-caps word OTHER or an
  9118. #    explicit protocol name (e.g. "WebSocket") optionally followed by a slash
  9119. #    and a version token (e.g. "HTTP/3"). Explicit protocol names and
  9120. #    versions are case sensitive.
  9121. #
  9122. #    When an HTTP client sends an Upgrade request header, Squid iterates over
  9123. #    the client-offered protocols and, for each protocol P (with an optional
  9124. #    version V), evaluates the first non-empty set of
  9125. #    http_upgrade_request_protocols rules (if any) from the following list:
  9126. #
  9127. #        * All rules with an explicit protocol name equal to P.
  9128. #        * All rules that use OTHER instead of a protocol name.
  9129. #
  9130. #    In other words, rules using OTHER are considered for protocol P if and
  9131. #    only if there are no rules mentioning P by name.
  9132. #
  9133. #    If both of the above sets are empty, then Squid removes protocol P from
  9134. #    the Upgrade offer.
  9135. #
  9136. #    If the client sent a versioned protocol offer P/X, then explicit rules
  9137. #    referring to the same-name but different-version protocol P/Y are
  9138. #    declared inapplicable. Inapplicable rules are not evaluated (i.e. are
  9139. #    ignored). However, inapplicable rules still belong to the first set of
  9140. #    rules for P.
  9141. #
  9142. #    Within the applicable rule subset, individual rules are evaluated in
  9143. #    their configuration order. If all ACLs of an applicable "allow" rule
  9144. #    match, then the protocol offered by the client is forwarded to the next
  9145. #    hop as is. If all ACLs of an applicable "deny" rule match, then the
  9146. #    offer is dropped. If no applicable rules have matching ACLs, then the
  9147. #    offer is also dropped. The first matching rule also ends rules
  9148. #    evaluation for the offered protocol.
  9149. #
  9150. #    If all client-offered protocols are removed, then Squid forwards the
  9151. #    client request without the Upgrade header. Squid never sends an empty
  9152. #    Upgrade request header.
  9153. #
  9154. #    An Upgrade request header with a value violating HTTP syntax is dropped
  9155. #    and ignored without an attempt to use extractable individual protocol
  9156. #    offers.
  9157. #
  9158. #    Upon receiving an HTTP 101 (Switching Protocols) control message, Squid
  9159. #    checks that the server listed at least one protocol name and sent a
  9160. #    Connection:upgrade response header. Squid does not understand individual
  9161. #    protocol naming and versioning concepts enough to implement stricter
  9162. #    checks, but an admin can restrict HTTP 101 (Switching Protocols)
  9163. #    responses further using http_reply_access. Responses denied by
  9164. #    http_reply_access rules and responses flagged by the internal Upgrade
  9165. #    checks result in HTTP 502 (Bad Gateway) ERR_INVALID_RESP errors and
  9166. #    Squid-to-server connection closures.
  9167. #
  9168. #    If Squid sends an Upgrade request header, and the next hop (e.g., the
  9169. #    origin server) responds with an acceptable HTTP 101 (Switching
  9170. #    Protocols), then Squid forwards that message to the client and becomes
  9171. #    a TCP tunnel.
  9172. #
  9173. #    The presence of an Upgrade request header alone does not preclude cache
  9174. #    lookups. In other words, an Upgrade request might be satisfied from the
  9175. #    cache, using regular HTTP caching rules.
  9176. #
  9177. #    This clause only supports fast acl types.
  9178. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  9179. #
  9180. #    Each of the following groups of configuration lines represents a
  9181. #    separate configuration example:
  9182. #
  9183. #    # never upgrade to protocol Foo; all others are OK
  9184. #    http_upgrade_request_protocols Foo deny all
  9185. #    http_upgrade_request_protocols OTHER allow all
  9186. #
  9187. #    # only allow upgrades to protocol Bar (except for its first version)
  9188. #    http_upgrade_request_protocols Bar/1 deny all
  9189. #    http_upgrade_request_protocols Bar allow all
  9190. #    http_upgrade_request_protocols OTHER deny all # this rule is optional
  9191. #
  9192. #    # only allow upgrades to protocol Baz, and only if Baz is the only offer
  9193. #    acl UpgradeHeaderHasMultipleOffers ...
  9194. #    http_upgrade_request_protocols Baz deny UpgradeHeaderHasMultipleOffers
  9195. #    http_upgrade_request_protocols Baz allow all
  9196. #Default:
  9197. # Upgrade header dropped, effectively blocking an upgrade attempt.
  9198.  
  9199. #  TAG: server_pconn_for_nonretriable
  9200. #    This option provides fine-grained control over persistent connection
  9201. #    reuse when forwarding HTTP requests that Squid cannot retry. It is useful
  9202. #    in environments where opening new connections is very expensive
  9203. #    (e.g., all connections are secured with TLS with complex client and server
  9204. #    certificate validation) and race conditions associated with persistent
  9205. #    connections are very rare and/or only cause minor problems.
  9206. #
  9207. #    HTTP prohibits retrying unsafe and non-idempotent requests (e.g., POST).
  9208. #    Squid limitations also prohibit retrying all requests with bodies (e.g., PUT).
  9209. #    By default, when forwarding such "risky" requests, Squid opens a new
  9210. #    connection to the server or cache_peer, even if there is an idle persistent
  9211. #    connection available. When Squid is configured to risk sending a non-retriable
  9212. #    request on a previously used persistent connection, and the server closes
  9213. #    the connection before seeing that risky request, the user gets an error response
  9214. #    from Squid. In most cases, that error response will be HTTP 502 (Bad Gateway)
  9215. #    with ERR_ZERO_SIZE_OBJECT or ERR_WRITE_ERROR (peer connection reset) error detail.
  9216. #
  9217. #    If an allow rule matches, Squid reuses an available idle persistent connection
  9218. #    (if any) for the request that Squid cannot retry. If a deny rule matches, then
  9219. #    Squid opens a new connection for the request that Squid cannot retry.
  9220. #
  9221. #    This option does not affect requests that Squid can retry. They will reuse idle
  9222. #    persistent connections (if any).
  9223. #
  9224. #    This clause only supports fast acl types.
  9225. #    See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  9226. #
  9227. #    Example:
  9228. #        acl SpeedIsWorthTheRisk method POST
  9229. #        server_pconn_for_nonretriable allow SpeedIsWorthTheRisk
  9230. #Default:
  9231. # Open new connections for forwarding requests Squid cannot retry safely.
  9232.  
  9233. #  TAG: happy_eyeballs_connect_timeout    (msec)
  9234. #    This Happy Eyeballs (RFC 8305) tuning directive specifies the minimum
  9235. #    delay between opening a primary to-server connection and opening a
  9236. #    spare to-server connection for the same master transaction. This delay
  9237. #    is similar to the Connection Attempt Delay in RFC 8305, but it is only
  9238. #    applied to the first spare connection attempt. Subsequent spare
  9239. #    connection attempts use happy_eyeballs_connect_gap, and primary
  9240. #    connection attempts are not artificially delayed at all.
  9241. #
  9242. #    Terminology: The "primary" and "spare" designations are determined by
  9243. #    the order of DNS answers received by Squid: If Squid DNS AAAA query
  9244. #    was answered first, then primary connections are connections to IPv6
  9245. #    peer addresses (while spare connections use IPv4 addresses).
  9246. #    Similarly, if Squid DNS A query was answered first, then primary
  9247. #    connections are connections to IPv4 peer addresses (while spare
  9248. #    connections use IPv6 addresses).
  9249. #
  9250. #    Shorter happy_eyeballs_connect_timeout values reduce master
  9251. #    transaction response time, potentially improving user-perceived
  9252. #    response times (i.e., making user eyeballs happier). Longer delays
  9253. #    reduce both concurrent connection level and server bombardment with
  9254. #    connection requests, potentially improving overall Squid performance
  9255. #    and reducing the chance of being blocked by servers for opening too
  9256. #    many unused connections.
  9257. #
  9258. #    RFC 8305 prohibits happy_eyeballs_connect_timeout values smaller than
  9259. #    10 (milliseconds) to "avoid congestion collapse in the presence of
  9260. #    high packet-loss rates".
  9261. #
  9262. #    The following Happy Eyeballs directives place additional connection
  9263. #    opening restrictions: happy_eyeballs_connect_gap and
  9264. #    happy_eyeballs_connect_limit.
  9265. #Default:
  9266. # happy_eyeballs_connect_timeout 250
  9267.  
  9268. #  TAG: happy_eyeballs_connect_gap    (msec)
  9269. #    This Happy Eyeballs (RFC 8305) tuning directive specifies the
  9270. #    minimum delay between opening spare to-server connections (to any
  9271. #    server; i.e. across all concurrent master transactions in a Squid
  9272. #    instance). Each SMP worker currently multiplies the configured gap
  9273. #    by the total number of workers so that the combined spare connection
  9274. #    opening rate of a Squid instance obeys the configured limit. The
  9275. #    workers do not coordinate connection openings yet; a micro burst
  9276. #    of spare connection openings may violate the configured gap.
  9277. #
  9278. #    This directive has similar trade-offs as
  9279. #    happy_eyeballs_connect_timeout, but its focus is on limiting traffic
  9280. #    amplification effects for Squid as a whole, while
  9281. #    happy_eyeballs_connect_timeout works on an individual master
  9282. #    transaction level.
  9283. #
  9284. #    The following Happy Eyeballs directives place additional connection
  9285. #    opening restrictions: happy_eyeballs_connect_timeout and
  9286. #    happy_eyeballs_connect_limit. See the former for related terminology.
  9287. #Default:
  9288. # no artificial delays between spare attempts
  9289.  
  9290. #  TAG: happy_eyeballs_connect_limit
  9291. #    This Happy Eyeballs (RFC 8305) tuning directive specifies the
  9292. #    maximum number of spare to-server connections (to any server; i.e.
  9293. #    across all concurrent master transactions in a Squid instance).
  9294. #    Each SMP worker gets an equal share of the total limit. However,
  9295. #    the workers do not share the actual connection counts yet, so one
  9296. #    (busier) worker cannot "borrow" spare connection slots from another
  9297. #    (less loaded) worker.
  9298. #
  9299. #    Setting this limit to zero disables concurrent use of primary and
  9300. #    spare TCP connections: Spare connection attempts are made only after
  9301. #    all primary attempts fail. However, Squid would still use the
  9302. #    DNS-related optimizations of the Happy Eyeballs approach.
  9303. #
  9304. #    This directive has similar trade-offs as happy_eyeballs_connect_gap,
  9305. #    but its focus is on limiting Squid overheads, while
  9306. #    happy_eyeballs_connect_gap focuses on the origin server and peer
  9307. #    overheads.
  9308. #
  9309. #    The following Happy Eyeballs directives place additional connection
  9310. #    opening restrictions: happy_eyeballs_connect_timeout and
  9311. #    happy_eyeballs_connect_gap. See the former for related terminology.
  9312. #Default:
  9313. # no artificial limit on the number of concurrent spare attempts
  9314. EOF
  9315.  
  9316. # CREATE WHITELIST
  9317. if [ ! -f "${SQUID_WHITELIST}" ]; then touch "${SQUID_WHITELIST}"; fi
  9318. cat > "${SQUID_WHITELIST}" <<'EOF' && echo -e "The whitelist was created successfully!" || echo -e "The whitelist failed to create."
  9319. <replace with your own list>
  9320. site.com
  9321. www.site.com
  9322. EOF
  9323.  
  9324. # CREATE BLACKLIST
  9325. if [ -f "${SQUID_BLACKLIST}" ]; then touch "${SQUID_BLACKLIST}" ;fi
  9326. cat > "${SQUID_BLACKLIST}" <<'EOF' && echo -e "The blacklist was created successfully!\\n" || echo -e "The blacklist failed to create.\\n"
  9327. <replace with your own list>
  9328. .bytedance.com
  9329. .tiktok.com
  9330. .xyz
  9331. EOF
  9332.  
  9333. # RUN HTPASSWD TO CREATE PASSWORD FOR USE
  9334. if [ ! -f "${SQUID_PASSWD}" ]; then
  9335.     htpasswd -c "${SQUID_PASSWD}" squid && echo -e "\\nThe squid passwd file was created successfully!" || echo -e "\\nThe squid passwd file failed to create."
  9336.     echo
  9337.     cat "${SQUID_PASSWD}"
  9338.     echo
  9339. fi
  9340.  
  9341. # FIREWALLD SETTINGS
  9342. echo '[1] Add firewalld rules'
  9343. echo -e "[2] Skip\\n"
  9344. read -p 'Enter a number: ' uChoice
  9345. echo
  9346. if [[ "${uChoice}" == "1" ]]; then
  9347.     firewall-cmd --permanent --add-service={"${SVC01}","${SVC02}","${SVC03}","${SVC04}","${SVC05}"}
  9348.     firewall-cmd --add-zone=squid-custom
  9349.     firewall-cmd --permanent --zone=squid-custom --add-interface=lo
  9350.     firewall-cmd --permanent --zone=squid-custom --add-port={"${PORT_SQUID}","${PORT_PIHOLE}"}
  9351.     firewall-cmd --set-default-zone=squid-custom
  9352.     firewall-cmd --reload
  9353.     echo
  9354.     read -t 10 -p 'Sleeping for 10 seconds. Press enter to skip ahead.'
  9355.     clear
  9356. else
  9357.     clear
  9358. fi
  9359.  
  9360. # RESTART SQUID VIA SYSTEMCTL
  9361. '/etc/init.d/squid' restart && echo -e "\\nSquid restarted successfully!\\n" || echo -e "\\nSquid failed to restart!\\n"
  9362.  
Add Comment
Please, Sign In to add comment