Advertisement
Guest User

Untitled

a guest
Oct 9th, 2014
534
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 144.63 KB | None | 0 0
  1. auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic
  2. auth_param basic children 100
  3. auth_param basic realm Squid proxy-caching web server
  4. auth_param basic credentialsttl 2 hours
  5. auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp
  6. auth_param ntlm children 100
  7. auth_param ntlm keep_alive on
  8. # TAG: acl
  9. acl _sams_default src "/etc/squid/default.sams"
  10. acl _sams_default_time time MTWHFAS 00:00-24:00
  11. acl all src all
  12. acl manager proto cache_object
  13. acl localhost src 127.0.0.1/32
  14. acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
  15. acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
  16. acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
  17. acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
  18.  
  19. acl SSL_ports port 443 # https
  20. acl SSL_ports port 563 # snews
  21. acl SSL_ports port 873 # rsync
  22. acl Safe_ports port 80 # http
  23. acl Safe_ports port 21 # ftp
  24. acl Safe_ports port 443 # https
  25. acl Safe_ports port 70 # gopher
  26. acl Safe_ports port 210 # wais
  27. acl Safe_ports port 1025-65535 # unregistered ports
  28. acl Safe_ports port 280 # http-mgmt
  29. acl Safe_ports port 488 # gss-http
  30. acl Safe_ports port 591 # filemaker
  31. acl Safe_ports port 777 # multiling http
  32. acl Safe_ports port 631 # cups
  33. acl Safe_ports port 873 # rsync
  34. acl Safe_ports port 901 # SWAT
  35. acl purge method PURGE
  36. acl CONNECT method CONNECT
  37.  
  38.  
  39. http_access allow _sams_default _sams_default_time
  40. http_access allow manager localhost
  41. http_access deny manager
  42.  
  43. http_access allow purge localhost
  44. http_access deny purge
  45.  
  46. http_access deny !Safe_ports
  47.  
  48. http_access deny CONNECT !SSL_ports
  49. http_access deny all
  50.  
  51. # TAG: http_access2
  52. # Allowing or Denying access based on defined access lists
  53. #
  54. # Identical to http_access, but runs after redirectors. If not set
  55. # then only http_access is used.
  56. #
  57. #Default:
  58. # none
  59.  
  60. # TAG: http_reply_access
  61. # Allow replies to client requests. This is complementary to http_access.
  62. #
  63. # http_reply_access allow|deny [!] aclname ...
  64. #
  65. # NOTE: if there are no access lines present, the default is to allow
  66. # all replies
  67. #
  68. # If none of the access lines cause a match the opposite of the
  69. # last line will apply. Thus it is good practice to end the rules
  70. # with an "allow all" or "deny all" entry.
  71. #
  72. #Default:
  73. # http_reply_access allow all
  74.  
  75. # TAG: icp_access
  76. # Allowing or Denying access to the ICP port based on defined
  77. # access lists
  78. #
  79. # icp_access allow|deny [!]aclname ...
  80. #
  81. # See http_access for details
  82. #
  83. #Default:
  84. # icp_access deny all
  85. #
  86. #Allow ICP queries from local networks only
  87. icp_access allow localnet
  88. icp_access deny all
  89.  
  90. # TAG: htcp_access
  91. # Allowing or Denying access to the HTCP port based on defined
  92. # access lists
  93. #
  94. # htcp_access allow|deny [!]aclname ...
  95. #
  96. # See http_access for details
  97. #
  98. # NOTE: The default if no htcp_access lines are present is to
  99. # deny all traffic. This default may cause problems with peers
  100. # using the htcp or htcp-oldsquid options.
  101. #
  102. #Default:
  103. # htcp_access deny all
  104. #
  105. #Allow HTCP queries from local networks only
  106. # htcp_access allow localnet
  107. # htcp_access deny all
  108.  
  109. # TAG: htcp_clr_access
  110. # Allowing or Denying access to purge content using HTCP based
  111. # on defined access lists
  112. #
  113. # htcp_clr_access allow|deny [!]aclname ...
  114. #
  115. # See http_access for details
  116. #
  117. ##Allow HTCP CLR requests from trusted peers
  118. #acl htcp_clr_peer src 172.16.1.2
  119. #htcp_clr_access allow htcp_clr_peer
  120. #
  121. #Default:
  122. # htcp_clr_access deny all
  123.  
  124. # TAG: miss_access
  125. # Use to force your neighbors to use you as a sibling instead of
  126. # a parent. For example:
  127. #
  128. # acl localclients src 172.16.0.0/16
  129. # miss_access allow localclients
  130. # miss_access deny !localclients
  131. #
  132. # This means only your local clients are allowed to fetch
  133. # MISSES and all other clients can only fetch HITS.
  134. #
  135. # By default, allow all clients who passed the http_access rules
  136. # to fetch MISSES from us.
  137. #
  138. #Default setting:
  139. # miss_access allow all
  140.  
  141. # TAG: ident_lookup_access
  142. # A list of ACL elements which, if matched, cause an ident
  143. # (RFC931) lookup to be performed for this request. For
  144. # example, you might choose to always perform ident lookups
  145. # for your main multi-user Unix boxes, but not for your Macs
  146. # and PCs. By default, ident lookups are not performed for
  147. # any requests.
  148. #
  149. # To enable ident lookups for specific client addresses, you
  150. # can follow this example:
  151. #
  152. # acl ident_aware_hosts src 198.168.1.0/255.255.255.0
  153. # ident_lookup_access allow ident_aware_hosts
  154. # ident_lookup_access deny all
  155. #
  156. # Only src type ACL checks are fully supported. A src_domain
  157. # ACL might work at times, but it will not always provide
  158. # the correct result.
  159. #
  160. #Default:
  161. # ident_lookup_access deny all
  162.  
  163. # TAG: reply_body_max_size bytes deny acl acl...
  164. # This option specifies the maximum size of a reply body in bytes.
  165. # It can be used to prevent users from downloading very large files,
  166. # such as MP3's and movies. When the reply headers are received,
  167. # the reply_body_max_size lines are processed, and the first line with
  168. # a result of "deny" is used as the maximum body size for this reply.
  169. # This size is checked twice. First when we get the reply headers,
  170. # we check the content-length value. If the content length value exists
  171. # and is larger than the allowed size, the request is denied and the
  172. # user receives an error message that says "the request or reply
  173. # is too large." If there is no content-length, and the reply
  174. # size exceeds this limit, the client's connection is just closed
  175. # and they will receive a partial reply.
  176. #
  177. # WARNING: downstream caches probably can not detect a partial reply
  178. # if there is no content-length header, so they will cache
  179. # partial responses and give them out as hits. You should NOT
  180. # use this option if you have downstream caches.
  181. #
  182. # If you set this parameter to zero (the default), there will be
  183. # no limit imposed.
  184. #
  185. #Default:
  186. # reply_body_max_size 0 allow all
  187.  
  188. # TAG: authenticate_ip_shortcircuit_access
  189. # Access list determining when shortcicuiting the authentication process
  190. # based on source IP cached credentials is acceptable. Use this to deny
  191. # using the ip auth cache on requests from child proxies or other source
  192. # ip's having multiple users.
  193. #
  194. # See also authenticate_ip_shortcircuit_ttl directive
  195. #
  196. #Default:
  197. # none
  198.  
  199.  
  200. # OPTIONS FOR X-Forwarded-For
  201. # -----------------------------------------------------------------------------
  202.  
  203. # TAG: follow_x_forwarded_for
  204. # Allowing or Denying the X-Forwarded-For header to be followed to
  205. # find the original source of a request.
  206. #
  207. # Requests may pass through a chain of several other proxies
  208. # before reaching us. The X-Forwarded-For header will contain a
  209. # comma-separated list of the IP addresses in the chain, with the
  210. # rightmost address being the most recent.
  211. #
  212. # If a request reaches us from a source that is allowed by this
  213. # configuration item, then we consult the X-Forwarded-For header
  214. # to see where that host received the request from. If the
  215. # X-Forwarded-For header contains multiple addresses, and if
  216. # acl_uses_indirect_client is on, then we continue backtracking
  217. # until we reach an address for which we are not allowed to
  218. # follow the X-Forwarded-For header, or until we reach the first
  219. # address in the list. (If acl_uses_indirect_client is off, then
  220. # it's impossible to backtrack through more than one level of
  221. # X-Forwarded-For addresses.)
  222. #
  223. # The end result of this process is an IP address that we will
  224. # refer to as the indirect client address. This address may
  225. # be treated as the client address for access control, delay
  226. # pools and logging, depending on the acl_uses_indirect_client,
  227. # delay_pool_uses_indirect_client and log_uses_indirect_client
  228. # options.
  229. #
  230. # SECURITY CONSIDERATIONS:
  231. #
  232. # Any host for which we follow the X-Forwarded-For header
  233. # can place incorrect information in the header, and Squid
  234. # will use the incorrect information as if it were the
  235. # source address of the request. This may enable remote
  236. # hosts to bypass any access control restrictions that are
  237. # based on the client's source addresses.
  238. #
  239. # For example:
  240. #
  241. # acl localhost src 127.0.0.1
  242. # acl my_other_proxy srcdomain .proxy.example.com
  243. # follow_x_forwarded_for allow localhost
  244. # follow_x_forwarded_for allow my_other_proxy
  245. #
  246. #Default:
  247. # follow_x_forwarded_for deny all
  248.  
  249. # TAG: acl_uses_indirect_client on|off
  250. # Controls whether the indirect client address
  251. # (see follow_x_forwarded_for) is used instead of the
  252. # direct client address in acl matching.
  253. #
  254. #Default:
  255. # acl_uses_indirect_client on
  256.  
  257. # TAG: delay_pool_uses_indirect_client on|off
  258. # Controls whether the indirect client address
  259. # (see follow_x_forwarded_for) is used instead of the
  260. # direct client address in delay pools.
  261. #
  262. #Default:
  263. # delay_pool_uses_indirect_client on
  264.  
  265. # TAG: log_uses_indirect_client on|off
  266. # Controls whether the indirect client address
  267. # (see follow_x_forwarded_for) is used instead of the
  268. # direct client address in the access log.
  269. #
  270. #Default:
  271. # log_uses_indirect_client on
  272.  
  273.  
  274. # SSL OPTIONS
  275. # -----------------------------------------------------------------------------
  276.  
  277. # TAG: ssl_unclean_shutdown
  278. # Note: This option is only available if Squid is rebuilt with the
  279. # --enable-ssl option
  280. #
  281. # Some browsers (especially MSIE) bugs out on SSL shutdown
  282. # messages.
  283. #
  284. #Default:
  285. # ssl_unclean_shutdown off
  286.  
  287. # TAG: ssl_engine
  288. # Note: This option is only available if Squid is rebuilt with the
  289. # --enable-ssl option
  290. #
  291. # The OpenSSL engine to use. You will need to set this if you
  292. # would like to use hardware SSL acceleration for example.
  293. #
  294. #Default:
  295. # none
  296.  
  297. # TAG: sslproxy_client_certificate
  298. # Note: This option is only available if Squid is rebuilt with the
  299. # --enable-ssl option
  300. #
  301. # Client SSL Certificate to use when proxying https:// URLs
  302. #
  303. #Default:
  304. # none
  305.  
  306. # TAG: sslproxy_client_key
  307. # Note: This option is only available if Squid is rebuilt with the
  308. # --enable-ssl option
  309. #
  310. # Client SSL Key to use when proxying https:// URLs
  311. #
  312. #Default:
  313. # none
  314.  
  315. # TAG: sslproxy_version
  316. # Note: This option is only available if Squid is rebuilt with the
  317. # --enable-ssl option
  318. #
  319. # SSL version level to use when proxying https:// URLs
  320. #
  321. #Default:
  322. # sslproxy_version 1
  323.  
  324. # TAG: sslproxy_options
  325. # Note: This option is only available if Squid is rebuilt with the
  326. # --enable-ssl option
  327. #
  328. # SSL engine options to use when proxying https:// URLs
  329. #
  330. #Default:
  331. # none
  332.  
  333. # TAG: sslproxy_cipher
  334. # Note: This option is only available if Squid is rebuilt with the
  335. # --enable-ssl option
  336. #
  337. # SSL cipher list to use when proxying https:// URLs
  338. #
  339. #Default:
  340. # none
  341.  
  342. # TAG: sslproxy_cafile
  343. # Note: This option is only available if Squid is rebuilt with the
  344. # --enable-ssl option
  345. #
  346. # file containing CA certificates to use when verifying server
  347. # certificates while proxying https:// URLs
  348. #
  349. #Default:
  350. # none
  351.  
  352. # TAG: sslproxy_capath
  353. # Note: This option is only available if Squid is rebuilt with the
  354. # --enable-ssl option
  355. #
  356. # directory containing CA certificates to use when verifying
  357. # server certificates while proxying https:// URLs
  358. #
  359. #Default:
  360. # none
  361.  
  362. # TAG: sslproxy_flags
  363. # Note: This option is only available if Squid is rebuilt with the
  364. # --enable-ssl option
  365. #
  366. # Various flags modifying the use of SSL while proxying https:// URLs:
  367. # DONT_VERIFY_PEER Accept certificates even if they fail to
  368. # verify.
  369. # NO_DEFAULT_CA Don't use the default CA list built in
  370. # to OpenSSL.
  371. #
  372. #Default:
  373. # none
  374.  
  375. # TAG: sslpassword_program
  376. # Note: This option is only available if Squid is rebuilt with the
  377. # --enable-ssl option
  378. #
  379. # Specify a program used for entering SSL key passphrases
  380. # when using encrypted SSL certificate keys. If not specified
  381. # keys must either be unencrypted, or Squid started with the -N
  382. # option to allow it to query interactively for the passphrase.
  383. #
  384. #Default:
  385. # none
  386.  
  387.  
  388. # NETWORK OPTIONS
  389. # -----------------------------------------------------------------------------
  390.  
  391. # TAG: http_port
  392. # Usage: port [options]
  393. # hostname:port [options]
  394. # 1.2.3.4:port [options]
  395. #
  396. # The socket addresses where Squid will listen for HTTP client
  397. # requests. You may specify multiple socket addresses.
  398. # There are three forms: port alone, hostname with port, and
  399. # IP address with port. If you specify a hostname or IP
  400. # address, Squid binds the socket to that specific
  401. # address. This replaces the old 'tcp_incoming_address'
  402. # option. Most likely, you do not need to bind to a specific
  403. # address, so you can use the port number alone.
  404. #
  405. # If you are running Squid in accelerator mode, you
  406. # probably want to listen on port 80 also, or instead.
  407. #
  408. # The -I command line option will override the *first* port
  409. # specified here.
  410. #
  411. # You may specify multiple socket addresses on multiple lines.
  412. #
  413. # Options:
  414. #
  415. # transparent Support for transparent interception of
  416. # outgoing requests without browser settings.
  417. #
  418. # tproxy Support Linux TPROXY for spoofing outgoing
  419. # connections using the client IP address.
  420. #
  421. # accel Accelerator mode. See also the related vhost,
  422. # vport and defaultsite directives.
  423. #
  424. # defaultsite=domainname
  425. # What to use for the Host: header if it is not present
  426. # in a request. Determines what site (not origin server)
  427. # accelerators should consider the default.
  428. # Defaults to visible_hostname:port if not set
  429. # May be combined with vport=NN to override the port number.
  430. # Implies accel.
  431. #
  432. # vhost Accelerator mode using Host header for virtual
  433. # domain support. Implies accel.
  434. #
  435. # vport Accelerator with IP based virtual host support.
  436. # Implies accel.
  437. #
  438. # vport=NN As above, but uses specified port number rather
  439. # than the http_port number. Implies accel.
  440. #
  441. # allow-direct Allow direct forwarding in accelerator mode. Normally
  442. # accelerated requests is denied direct forwarding as it
  443. # never_direct was used.
  444. #
  445. # urlgroup= Default urlgroup to mark requests with (see
  446. # also acl urlgroup and url_rewrite_program)
  447. #
  448. # protocol= Protocol to reconstruct accelerated requests with.
  449. # Defaults to http.
  450. #
  451. # no-connection-auth
  452. # Prevent forwarding of Microsoft connection oriented
  453. # authentication (NTLM, Negotiate and Kerberos)
  454. #
  455. # act-as-origin
  456. # Act is if this Squid is the origin server.
  457. # This currently means generate own Date: and
  458. # Expires: headers. Implies accel.
  459. #
  460. # http11 Enables HTTP/1.1 support to clients. The HTTP/1.1
  461. # support is still incomplete with an internal HTTP/1.0
  462. # hop, but should work with most clients. The main
  463. # HTTP/1.1 features missing due to this is forwarding
  464. # of requests using chunked transfer encoding (results
  465. # in 411) and forwarding of 1xx responses (silently
  466. # dropped)
  467. #
  468. # name= Specifies a internal name for the port. Defaults to
  469. # the port specification (port or addr:port)
  470. #
  471. # tcpkeepalive[=idle,interval,timeout]
  472. # Enable TCP keepalive probes of idle connections
  473. # idle is the initial time before TCP starts probing
  474. # the connection, interval how often to probe, and
  475. # timeout the time before giving up.
  476. #
  477. # If you run Squid on a dual-homed machine with an internal
  478. # and an external interface we recommend you to specify the
  479. # internal address:port in http_port. This way Squid will only be
  480. # visible on the internal address.
  481. #
  482. # Squid normally listens to port 3128
  483. http_port 10.148.51.106:3128 transparent
  484.  
  485. # TAG: https_port
  486. # Note: This option is only available if Squid is rebuilt with the
  487. # --enable-ssl option
  488. #
  489. # Usage: [ip:]port cert=certificate.pem [key=key.pem] [options...]
  490. #
  491. # The socket address where Squid will listen for HTTPS client
  492. # requests.
  493. #
  494. # This is really only useful for situations where you are running
  495. # squid in accelerator mode and you want to do the SSL work at the
  496. # accelerator level.
  497. #
  498. # You may specify multiple socket addresses on multiple lines,
  499. # each with their own SSL certificate and/or options.
  500. #
  501. # Options:
  502. #
  503. # In addition to the options specified for http_port the folling
  504. # SSL related options is supported:
  505. #
  506. # cert= Path to SSL certificate (PEM format).
  507. #
  508. # key= Path to SSL private key file (PEM format)
  509. # if not specified, the certificate file is
  510. # assumed to be a combined certificate and
  511. # key file.
  512. #
  513. # version= The version of SSL/TLS supported
  514. # 1 automatic (default)
  515. # 2 SSLv2 only
  516. # 3 SSLv3 only
  517. # 4 TLSv1 only
  518. #
  519. # cipher= Colon separated list of supported ciphers.
  520. #
  521. # options= Various SSL engine options. The most important
  522. # being:
  523. # NO_SSLv2 Disallow the use of SSLv2
  524. # NO_SSLv3 Disallow the use of SSLv3
  525. # NO_TLSv1 Disallow the use of TLSv1
  526. # SINGLE_DH_USE Always create a new key when using
  527. # temporary/ephemeral DH key exchanges
  528. # See src/ssl_support.c or OpenSSL SSL_CTX_set_options
  529. # documentation for a complete list of options.
  530. #
  531. # clientca= File containing the list of CAs to use when
  532. # requesting a client certificate.
  533. #
  534. # cafile= File containing additional CA certificates to
  535. # use when verifying client certificates. If unset
  536. # clientca will be used.
  537. #
  538. # capath= Directory containing additional CA certificates
  539. # and CRL lists to use when verifying client certificates.
  540. #
  541. # crlfile= File of additional CRL lists to use when verifying
  542. # the client certificate, in addition to CRLs stored in
  543. # the capath. Implies VERIFY_CRL flag below.
  544. #
  545. # dhparams= File containing DH parameters for temporary/ephemeral
  546. # DH key exchanges.
  547. #
  548. # sslflags= Various flags modifying the use of SSL:
  549. # DELAYED_AUTH
  550. # Don't request client certificates
  551. # immediately, but wait until acl processing
  552. # requires a certificate (not yet implemented).
  553. # NO_DEFAULT_CA
  554. # Don't use the default CA lists built in
  555. # to OpenSSL.
  556. # NO_SESSION_REUSE
  557. # Don't allow for session reuse. Each connection
  558. # will result in a new SSL session.
  559. # VERIFY_CRL
  560. # Verify CRL lists when accepting client
  561. # certificates.
  562. # VERIFY_CRL_ALL
  563. # Verify CRL lists for all certificates in the
  564. # client certificate chain.
  565. #
  566. # sslcontext= SSL session ID context identifier.
  567. #
  568. #
  569. #Default:
  570. # none
  571.  
  572. # TAG: tcp_outgoing_tos
  573. # Allows you to select a TOS/Diffserv value to mark outgoing
  574. # connections with, based on the username or source address
  575. # making the request.
  576. #
  577. # tcp_outgoing_tos ds-field [!]aclname ...
  578. #
  579. # Example where normal_service_net uses the TOS value 0x00
  580. # and good_service_net uses 0x20
  581. #
  582. # acl normal_service_net src 10.0.0.0/255.255.255.0
  583. # acl good_service_net src 10.0.1.0/255.255.255.0
  584. # tcp_outgoing_tos 0x00 normal_service_net
  585. # tcp_outgoing_tos 0x20 good_service_net
  586. #
  587. # TOS/DSCP values really only have local significance - so you should
  588. # know what you're specifying. For more information, see RFC2474 and
  589. # RFC3260.
  590. #
  591. # The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
  592. # "default" to use whatever default your host has. Note that in
  593. # practice often only values 0 - 63 is usable as the two highest bits
  594. # have been redefined for use by ECN (RFC3168).
  595. #
  596. # Processing proceeds in the order specified, and stops at first fully
  597. # matching line.
  598. #
  599. # Note: The use of this directive using client dependent ACLs is
  600. # incompatible with the use of server side persistent connections. To
  601. # ensure correct results it is best to set server_persisten_connections
  602. # to off when using this directive in such configurations.
  603. #
  604. #Default:
  605. # none
  606.  
  607. # TAG: tcp_outgoing_address
  608. # Allows you to map requests to different outgoing IP addresses
  609. # based on the username or source address of the user making
  610. # the request.
  611. #
  612. # tcp_outgoing_address ipaddr [[!]aclname] ...
  613. #
  614. # Example where requests from 10.0.0.0/24 will be forwarded
  615. # with source address 10.1.0.1, 10.0.2.0/24 forwarded with
  616. # source address 10.1.0.2 and the rest will be forwarded with
  617. # source address 10.1.0.3.
  618. #
  619. # acl normal_service_net src 10.0.0.0/24
  620. # acl good_service_net src 10.0.1.0/24 10.0.2.0/24
  621. # tcp_outgoing_address 10.1.0.1 normal_service_net
  622. # tcp_outgoing_address 10.1.0.2 good_service_net
  623. # tcp_outgoing_address 10.1.0.3
  624. #
  625. # Processing proceeds in the order specified, and stops at first fully
  626. # matching line.
  627. #
  628. # Note: The use of this directive using client dependent ACLs is
  629. # incompatible with the use of server side persistent connections. To
  630. # ensure correct results it is best to set server_persistent_connections
  631. # to off when using this directive in such configurations.
  632. #
  633. #Default:
  634. # none
  635.  
  636. # TAG: zph_mode
  637. # This option enables packet level marking of HIT/MISS responses,
  638. # either using IP TOS or socket priority.
  639. # off Feature disabled
  640. # tos Set the IP TOS/Diffserv field
  641. # priority Set the socket priority (may get mapped to TOS by OS,
  642. # otherwise only usable in local rulesets)
  643. # option Embed the mark in an IP option field. See also
  644. # zph_option.
  645. #
  646. # See also tcp_outgoing_tos for details/requirements about TOS usage.
  647. #
  648. #Default:
  649. # zph_mode off
  650.  
  651. # TAG: zph_local
  652. # Allows you to select a TOS/Diffserv/Priority value to mark local hits.
  653. # Default: 0 (disabled).
  654. #
  655. #Default:
  656. # zph_local 0
  657.  
  658. # TAG: zph_sibling
  659. # Allows you to select a TOS/Diffserv/Priority value to mark sibling hits.
  660. # Default: 0 (disabled).
  661. #
  662. #Default:
  663. # zph_sibling 0
  664.  
  665. # TAG: zph_parent
  666. # Allows you to select a TOS/Diffserv/Priority value to mark parent hits.
  667. # Default: 0 (disabled).
  668. #
  669. #Default:
  670. # zph_parent 0
  671.  
  672. # TAG: zph_option
  673. # The IP option to use when zph_mode is set to "option". Defaults to
  674. # 136 which is officially registered as "SATNET Stream ID".
  675. #
  676. #Default:
  677. # zph_option 136
  678.  
  679.  
  680. # OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
  681. # -----------------------------------------------------------------------------
  682.  
  683. # TAG: cache_peer
  684. # To specify other caches in a hierarchy, use the format:
  685. #
  686. # cache_peer hostname type http-port icp-port [options]
  687. #
  688. # For example,
  689. #
  690. # # proxy icp
  691. # # hostname type port port options
  692. # # -------------------- -------- ----- ----- -----------
  693. # cache_peer parent.foo.net parent 3128 3130 proxy-only default
  694. # cache_peer sib1.foo.net sibling 3128 3130 proxy-only
  695. # cache_peer sib2.foo.net sibling 3128 3130 proxy-only
  696. #
  697. # type: either 'parent', 'sibling', or 'multicast'.
  698. #
  699. # proxy-port: The port number where the cache listens for proxy
  700. # requests.
  701. #
  702. # icp-port: Used for querying neighbor caches about
  703. # objects. To have a non-ICP neighbor
  704. # specify '7' for the ICP port and make sure the
  705. # neighbor machine has the UDP echo port
  706. # enabled in its /etc/inetd.conf file.
  707. # NOTE: Also requires icp_port option enabled to send/receive
  708. # requests via this method.
  709. #
  710. # options: proxy-only
  711. # weight=n
  712. # ttl=n
  713. # no-query
  714. # default
  715. # round-robin
  716. # carp
  717. # multicast-responder
  718. # multicast-siblings
  719. # closest-only
  720. # no-digest
  721. # no-netdb-exchange
  722. # no-delay
  723. # login=user:password | PASS | *:password
  724. # connect-timeout=nn
  725. # digest-url=url
  726. # allow-miss
  727. # max-conn=n
  728. # htcp
  729. # htcp-oldsquid
  730. # originserver
  731. # userhash
  732. # sourcehash
  733. # name=xxx
  734. # monitorurl=url
  735. # monitorsize=sizespec
  736. # monitorinterval=seconds
  737. # monitortimeout=seconds
  738. # forceddomain=name
  739. # ssl
  740. # sslcert=/path/to/ssl/certificate
  741. # sslkey=/path/to/ssl/key
  742. # sslversion=1|2|3|4
  743. # sslcipher=...
  744. # ssloptions=...
  745. # front-end-https[=on|auto]
  746. # connection-auth[=on|off|auto]
  747. # idle=n
  748. # http11
  749. #
  750. # use 'proxy-only' to specify objects fetched
  751. # from this cache should not be saved locally.
  752. #
  753. # use 'weight=n' to affect the selection of a peer
  754. # during any weighted peer-selection mechanisms.
  755. # The weight must be an integer; default is 1,
  756. # larger weights are favored more.
  757. # This option does not affect parent selection if a peering
  758. # protocol is not in use.
  759. #
  760. # use 'ttl=n' to specify a IP multicast TTL to use
  761. # when sending an ICP queries to this address.
  762. # Only useful when sending to a multicast group.
  763. # Because we don't accept ICP replies from random
  764. # hosts, you must configure other group members as
  765. # peers with the 'multicast-responder' option below.
  766. #
  767. # use 'no-query' to NOT send ICP queries to this
  768. # neighbor.
  769. #
  770. # use 'default' if this is a parent cache which can
  771. # be used as a "last-resort" if a peer cannot be located
  772. # by any of the peer-selection mechanisms.
  773. # If specified more than once, only the first is used.
  774. #
  775. # use 'round-robin' to define a set of parents which
  776. # should be used in a round-robin fashion in the
  777. # absence of any ICP queries.
  778. #
  779. # use 'carp' to define a set of parents which should
  780. # be used as a CARP array. The requests will be
  781. # distributed among the parents based on the CARP load
  782. # balancing hash function based on their weight.
  783. #
  784. # 'multicast-responder' indicates the named peer
  785. # is a member of a multicast group. ICP queries will
  786. # not be sent directly to the peer, but ICP replies
  787. # will be accepted from it.
  788. #
  789. # the 'multicast-siblings' option is meant to be used
  790. # only for cache peers of type "multicast". It instructs
  791. # Squid that ALL members of this multicast group have
  792. # "sibling" relationship with it, not "parent". This is
  793. # an optimization that avoids useless multicast queries
  794. # to a multicast group when the requested object would
  795. # be fetched only from a "parent" cache, anyway. It's
  796. # useful, e.g., when configuring a pool of redundant
  797. # Squid proxies, being members of the same
  798. # multicast group.
  799. #
  800. # 'closest-only' indicates that, for ICP_OP_MISS
  801. # replies, we'll only forward CLOSEST_PARENT_MISSes
  802. # and never FIRST_PARENT_MISSes.
  803. #
  804. # use 'no-digest' to NOT request cache digests from
  805. # this neighbor.
  806. #
  807. # 'no-netdb-exchange' disables requesting ICMP
  808. # RTT database (NetDB) from the neighbor.
  809. #
  810. # use 'no-delay' to prevent access to this neighbor
  811. # from influencing the delay pools.
  812. #
  813. # use 'login=user:password' if this is a personal/workgroup
  814. # proxy and your parent requires proxy authentication.
  815. # Note: The string can include URL escapes (i.e. %20 for
  816. # spaces). This also means % must be written as %%.
  817. #
  818. # use 'login=PASS' if users must authenticate against
  819. # the upstream proxy or in the case of a reverse proxy
  820. # configuration, the origin web server. This will pass
  821. # the users credentials as they are to the peer.
  822. # Note: To combine this with local authentication the Basic
  823. # authentication scheme must be used, and both servers must
  824. # share the same user database as HTTP only allows for
  825. # a single login (one for proxy, one for origin server).
  826. # Also be warned this will expose your users proxy
  827. # password to the peer. USE WITH CAUTION
  828. #
  829. # use 'login=*:password' to pass the username to the
  830. # upstream cache, but with a fixed password. This is meant
  831. # to be used when the peer is in another administrative
  832. # domain, but it is still needed to identify each user.
  833. # The star can optionally be followed by some extra
  834. # information which is added to the username. This can
  835. # be used to identify this proxy to the peer, similar to
  836. # the login=username:password option above.
  837. #
  838. # use 'connect-timeout=nn' to specify a peer
  839. # specific connect timeout (also see the
  840. # peer_connect_timeout directive)
  841. #
  842. # use 'digest-url=url' to tell Squid to fetch the cache
  843. # digest (if digests are enabled) for this host from
  844. # the specified URL rather than the Squid default
  845. # location.
  846. #
  847. # use 'allow-miss' to disable Squid's use of only-if-cached
  848. # when forwarding requests to siblings. This is primarily
  849. # useful when icp_hit_stale is used by the sibling. To
  850. # extensive use of this option may result in forwarding
  851. # loops, and you should avoid having two-way peerings
  852. # with this option. (for example to deny peer usage on
  853. # requests from peer by denying cache_peer_access if the
  854. # source is a peer)
  855. #
  856. # use 'max-conn=n' to limit the amount of connections Squid
  857. # may open to this peer.
  858. #
  859. # use 'htcp' to send HTCP, instead of ICP, queries
  860. # to the neighbor. You probably also want to
  861. # set the "icp port" to 4827 instead of 3130.
  862. # You must also allow this Squid htcp_access and
  863. # http_access in the peer Squid configuration.
  864. #
  865. # use 'htcp-oldsquid' to send HTCP to old Squid versions
  866. # You must also allow this Squid htcp_access and
  867. # http_access in the peer Squid configuration.
  868. #
  869. # 'originserver' causes this parent peer to be contacted as
  870. # a origin server. Meant to be used in accelerator setups.
  871. #
  872. # use 'userhash' to load-balance amongst a set of parents
  873. # based on the client proxy_auth or ident username.
  874. #
  875. # use 'sourcehash' to load-balance amongst a set of parents
  876. # based on the client source ip.
  877. #
  878. # use 'name=xxx' if you have multiple peers on the same
  879. # host but different ports. This name can be used to
  880. # differentiate the peers in cache_peer_access and similar
  881. # directives.
  882. #
  883. # use 'monitorurl=url' to have periodically request a given
  884. # URL from the peer, and only consider the peer as alive
  885. # if this monitoring is successful (default none)
  886. #
  887. # use 'monitorsize=min[-max]' to limit the size range of
  888. # 'monitorurl' replies considered valid. Defaults to 0 to
  889. # accept any size replies as valid.
  890. #
  891. # use 'monitorinterval=seconds' to change frequency of
  892. # how often the peer is monitored with 'monitorurl'
  893. # (default 300 for a 5 minute interval). If set to 0
  894. # then monitoring is disabled even if a URL is defined.
  895. #
  896. # use 'monitortimeout=seconds' to change the timeout of
  897. # 'monitorurl'. Defaults to 'monitorinterval'.
  898. #
  899. # use 'forceddomain=name' to forcibly set the Host header
  900. # of requests forwarded to this peer. Useful in accelerator
  901. # setups where the server (peer) expects a certain domain
  902. # name and using redirectors to feed this domain name
  903. # is not feasible.
  904. #
  905. # use 'ssl' to indicate connections to this peer should
  906. # be SSL/TLS encrypted.
  907. #
  908. # use 'sslcert=/path/to/ssl/certificate' to specify a client
  909. # SSL certificate to use when connecting to this peer.
  910. #
  911. # use 'sslkey=/path/to/ssl/key' to specify the private SSL
  912. # key corresponding to sslcert above. If 'sslkey' is not
  913. # specified 'sslcert' is assumed to reference a
  914. # combined file containing both the certificate and the key.
  915. #
  916. # use sslversion=1|2|3|4 to specify the SSL version to use
  917. # when connecting to this peer
  918. # 1 = automatic (default)
  919. # 2 = SSL v2 only
  920. # 3 = SSL v3 only
  921. # 4 = TLS v1 only
  922. #
  923. # use sslcipher=... to specify the list of valid SSL ciphers
  924. # to use when connecting to this peer.
  925. #
  926. # use ssloptions=... to specify various SSL engine options:
  927. # NO_SSLv2 Disallow the use of SSLv2
  928. # NO_SSLv3 Disallow the use of SSLv3
  929. # NO_TLSv1 Disallow the use of TLSv1
  930. # See src/ssl_support.c or the OpenSSL documentation for
  931. # a more complete list.
  932. #
  933. # use sslcafile=... to specify a file containing
  934. # additional CA certificates to use when verifying the
  935. # peer certificate.
  936. #
  937. # use sslcapath=... to specify a directory containing
  938. # additional CA certificates to use when verifying the
  939. # peer certificate.
  940. #
  941. # use sslcrlfile=... to specify a certificate revocation
  942. # list file to use when verifying the peer certificate.
  943. #
  944. # use sslflags=... to specify various flags modifying the
  945. # SSL implementation:
  946. # DONT_VERIFY_PEER
  947. # Accept certificates even if they fail to
  948. # verify.
  949. # NO_DEFAULT_CA
  950. # Don't use the default CA list built in
  951. # to OpenSSL.
  952. #
  953. # use ssldomain= to specify the peer name as advertised
  954. # in it's certificate. Used for verifying the correctness
  955. # of the received peer certificate. If not specified the
  956. # peer hostname will be used.
  957. #
  958. # use front-end-https to enable the "Front-End-Https: On"
  959. # header needed when using Squid as a SSL frontend in front
  960. # of Microsoft OWA. See MS KB document Q307347 for details
  961. # on this header. If set to auto the header will
  962. # only be added if the request is forwarded as a https://
  963. # URL.
  964. #
  965. # use connection-auth=off to tell Squid that this peer does
  966. # not support Microsoft connection oriented authentication,
  967. # and any such challenges received from there should be
  968. # ignored. Default is auto to automatically determine the
  969. # status of the peer.
  970. #
  971. # use idle=n to specify a minimum number of idle connections
  972. # that should be kept open to this peer.
  973. #
  974. # use http11 to send requests using HTTP/1.1 to this peer.
  975. # Note: The HTTP/1.1 support is still incomplete, with an
  976. # internal HTTP/1.0 hop. As result 1xx responses will not
  977. # be forwarded.
  978. #
  979. #Default:
  980. # none
  981.  
  982. # TAG: cache_peer_domain
  983. # Use to limit the domains for which a neighbor cache will be
  984. # queried. Usage:
  985. #
  986. # cache_peer_domain cache-host domain [domain ...]
  987. # cache_peer_domain cache-host !domain
  988. #
  989. # For example, specifying
  990. #
  991. # cache_peer_domain parent.foo.net .edu
  992. #
  993. # has the effect such that UDP query packets are sent to
  994. # 'bigserver' only when the requested object exists on a
  995. # server in the .edu domain. Prefixing the domain name
  996. # with '!' means the cache will be queried for objects
  997. # NOT in that domain.
  998. #
  999. # NOTE: * Any number of domains may be given for a cache-host,
  1000. # either on the same or separate lines.
  1001. # * When multiple domains are given for a particular
  1002. # cache-host, the first matched domain is applied.
  1003. # * Cache hosts with no domain restrictions are queried
  1004. # for all requests.
  1005. # * There are no defaults.
  1006. # * There is also a 'cache_peer_access' tag in the ACL
  1007. # section.
  1008. #
  1009. #Default:
  1010. # none
  1011.  
  1012. # TAG: cache_peer_access
  1013. # Similar to 'cache_peer_domain' but provides more flexibility by
  1014. # using ACL elements.
  1015. #
  1016. # cache_peer_access cache-host allow|deny [!]aclname ...
  1017. #
  1018. # The syntax is identical to 'http_access' and the other lists of
  1019. # ACL elements. See the comments for 'http_access' below, or
  1020. # the Squid FAQ (http://www.squid-cache.org/FAQ/FAQ-10.html).
  1021. #
  1022. #Default:
  1023. # none
  1024.  
  1025. # TAG: neighbor_type_domain
  1026. # usage: neighbor_type_domain neighbor parent|sibling domain domain ...
  1027. #
  1028. # Modifying the neighbor type for specific domains is now
  1029. # possible. You can treat some domains differently than the the
  1030. # default neighbor type specified on the 'cache_peer' line.
  1031. # Normally it should only be necessary to list domains which
  1032. # should be treated differently because the default neighbor type
  1033. # applies for hostnames which do not match domains listed here.
  1034. #
  1035. #EXAMPLE:
  1036. # cache_peer cache.foo.org parent 3128 3130
  1037. # neighbor_type_domain cache.foo.org sibling .com .net
  1038. # neighbor_type_domain cache.foo.org sibling .au .de
  1039. #
  1040. #Default:
  1041. # none
  1042.  
  1043. # TAG: dead_peer_timeout (seconds)
  1044. # This controls how long Squid waits to declare a peer cache
  1045. # as "dead." If there are no ICP replies received in this
  1046. # amount of time, Squid will declare the peer dead and not
  1047. # expect to receive any further ICP replies. However, it
  1048. # continues to send ICP queries, and will mark the peer as
  1049. # alive upon receipt of the first subsequent ICP reply.
  1050. #
  1051. # This timeout also affects when Squid expects to receive ICP
  1052. # replies from peers. If more than 'dead_peer' seconds have
  1053. # passed since the last ICP reply was received, Squid will not
  1054. # expect to receive an ICP reply on the next query. Thus, if
  1055. # your time between requests is greater than this timeout, you
  1056. # will see a lot of requests sent DIRECT to origin servers
  1057. # instead of to your parents.
  1058. #
  1059. #Default:
  1060. # dead_peer_timeout 10 seconds
  1061.  
  1062. # TAG: hierarchy_stoplist
  1063. # A list of words which, if found in a URL, cause the object to
  1064. # be handled directly by this cache. In other words, use this
  1065. # to not query neighbor caches for certain objects. You may
  1066. # list this option multiple times. Note: never_direct overrides
  1067. # this option.
  1068. #We recommend you to use at least the following line.
  1069. hierarchy_stoplist cgi-bin ?
  1070.  
  1071.  
  1072. # MEMORY CACHE OPTIONS
  1073. # -----------------------------------------------------------------------------
  1074.  
  1075. # TAG: cache_mem (bytes)
  1076. # NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
  1077. # IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
  1078. # USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
  1079. # THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
  1080. #
  1081. # 'cache_mem' specifies the ideal amount of memory to be used
  1082. # for:
  1083. # * In-Transit objects
  1084. # * Hot Objects
  1085. # * Negative-Cached objects
  1086. #
  1087. # Data for these objects are stored in 4 KB blocks. This
  1088. # parameter specifies the ideal upper limit on the total size of
  1089. # 4 KB blocks allocated. In-Transit objects take the highest
  1090. # priority.
  1091. #
  1092. # In-transit objects have priority over the others. When
  1093. # additional space is needed for incoming data, negative-cached
  1094. # and hot objects will be released. In other words, the
  1095. # negative-cached and hot objects will fill up any unused space
  1096. # not needed for in-transit objects.
  1097. #
  1098. # If circumstances require, this limit will be exceeded.
  1099. # Specifically, if your incoming request rate requires more than
  1100. # 'cache_mem' of memory to hold in-transit objects, Squid will
  1101. # exceed this limit to satisfy the new requests. When the load
  1102. # decreases, blocks will be freed until the high-water mark is
  1103. # reached. Thereafter, blocks will be used to store hot
  1104. # objects.
  1105. #
  1106. #Default:
  1107. cache_mem 256 MB
  1108.  
  1109. # TAG: maximum_object_size_in_memory (bytes)
  1110. # Objects greater than this size will not be attempted to kept in
  1111. # the memory cache. This should be set high enough to keep objects
  1112. # accessed frequently in memory to improve performance whilst low
  1113. # enough to keep larger objects from hoarding cache_mem.
  1114. #
  1115. #Default:
  1116. maximum_object_size_in_memory 512 KB
  1117.  
  1118. # TAG: memory_replacement_policy
  1119. # The memory replacement policy parameter determines which
  1120. # objects are purged from memory when memory space is needed.
  1121. #
  1122. # See cache_replacement_policy for details.
  1123. #
  1124. #Default:
  1125. # memory_replacement_policy lru
  1126.  
  1127.  
  1128. # DISK CACHE OPTIONS
  1129. # -----------------------------------------------------------------------------
  1130.  
  1131. # TAG: cache_replacement_policy
  1132. # The cache replacement policy parameter determines which
  1133. # objects are evicted (replaced) when disk space is needed.
  1134. #
  1135. # lru : Squid's original list based LRU policy
  1136. # heap GDSF : Greedy-Dual Size Frequency
  1137. # heap LFUDA: Least Frequently Used with Dynamic Aging
  1138. # heap LRU : LRU policy implemented using a heap
  1139. #
  1140. # Applies to any cache_dir lines listed below this.
  1141. #
  1142. # The LRU policies keeps recently referenced objects.
  1143. #
  1144. # The heap GDSF policy optimizes object hit rate by keeping smaller
  1145. # popular objects in cache so it has a better chance of getting a
  1146. # hit. It achieves a lower byte hit rate than LFUDA though since
  1147. # it evicts larger (possibly popular) objects.
  1148. #
  1149. # The heap LFUDA policy keeps popular objects in cache regardless of
  1150. # their size and thus optimizes byte hit rate at the expense of
  1151. # hit rate since one large, popular object will prevent many
  1152. # smaller, slightly less popular objects from being cached.
  1153. #
  1154. # Both policies utilize a dynamic aging mechanism that prevents
  1155. # cache pollution that can otherwise occur with frequency-based
  1156. # replacement policies.
  1157. #
  1158. # NOTE: if using the LFUDA replacement policy you should increase
  1159. # the value of maximum_object_size above its default of 4096 KB to
  1160. # to maximize the potential byte hit rate improvement of LFUDA.
  1161. #
  1162. # For more information about the GDSF and LFUDA cache replacement
  1163. # policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
  1164. # and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
  1165. #
  1166. #Default:
  1167. # cache_replacement_policy lru
  1168.  
  1169. # TAG: cache_dir
  1170. # Usage:
  1171. #
  1172. # cache_dir Type Directory-Name Fs-specific-data [options]
  1173. #
  1174. # You can specify multiple cache_dir lines to spread the
  1175. # cache among different disk partitions.
  1176. #
  1177. # Type specifies the kind of storage system to use. Only "ufs"
  1178. # is built by default. To enable any of the other storage systems
  1179. # see the --enable-storeio configure option.
  1180. #
  1181. # 'Directory' is a top-level directory where cache swap
  1182. # files will be stored. If you want to use an entire disk
  1183. # for caching, this can be the mount-point directory.
  1184. # The directory must exist and be writable by the Squid
  1185. # process. Squid will NOT create this directory for you.
  1186. # Only using COSS, a raw disk device or a stripe file can
  1187. # be specified, but the configuration of the "cache_swap_log"
  1188. # tag is mandatory.
  1189. #
  1190. # The ufs store type:
  1191. #
  1192. # "ufs" is the old well-known Squid storage format that has always
  1193. # been there.
  1194. #
  1195. # cache_dir ufs Directory-Name Mbytes L1 L2 [options]
  1196. #
  1197. # 'Mbytes' is the amount of disk space (MB) to use under this
  1198. # directory. The default is 100 MB. Change this to suit your
  1199. # configuration. Do NOT put the size of your disk drive here.
  1200. # Instead, if you want Squid to use the entire disk drive,
  1201. # subtract 20% and use that value.
  1202. #
  1203. # 'Level-1' is the number of first-level subdirectories which
  1204. # will be created under the 'Directory'. The default is 16.
  1205. #
  1206. # 'Level-2' is the number of second-level subdirectories which
  1207. # will be created under each first-level directory. The default
  1208. # is 256.
  1209. #
  1210. # The aufs store type:
  1211. #
  1212. # "aufs" uses the same storage format as "ufs", utilizing
  1213. # POSIX-threads to avoid blocking the main Squid process on
  1214. # disk-I/O. This was formerly known in Squid as async-io.
  1215. #
  1216. # cache_dir aufs Directory-Name Mbytes L1 L2 [options]
  1217. #
  1218. # see argument descriptions under ufs above
  1219. #
  1220. # The diskd store type:
  1221. #
  1222. # "diskd" uses the same storage format as "ufs", utilizing a
  1223. # separate process to avoid blocking the main Squid process on
  1224. # disk-I/O.
  1225. #
  1226. # cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
  1227. #
  1228. # see argument descriptions under ufs above
  1229. #
  1230. # Q1 specifies the number of unacknowledged I/O requests when Squid
  1231. # stops opening new files. If this many messages are in the queues,
  1232. # Squid won't open new files. Default is 64
  1233. #
  1234. # Q2 specifies the number of unacknowledged messages when Squid
  1235. # starts blocking. If this many messages are in the queues,
  1236. # Squid blocks until it receives some replies. Default is 72
  1237. #
  1238. # When Q1 < Q2 (the default), the cache directory is optimized
  1239. # for lower response time at the expense of a decrease in hit
  1240. # ratio. If Q1 > Q2, the cache directory is optimized for
  1241. # higher hit ratio at the expense of an increase in response
  1242. # time.
  1243. #
  1244. # The coss store type:
  1245. #
  1246. # block-size=n defines the "block size" for COSS cache_dir's.
  1247. # Squid uses file numbers as block numbers. Since file numbers
  1248. # are limited to 24 bits, the block size determines the maximum
  1249. # size of the COSS partition. The default is 512 bytes, which
  1250. # leads to a maximum cache_dir size of 512<<24, or 8 GB. Note
  1251. # you should not change the COSS block size after Squid
  1252. # has written some objects to the cache_dir.
  1253. #
  1254. # overwrite-percent=n defines the percentage of disk that COSS
  1255. # must write to before a given object will be moved to the
  1256. # current stripe. A value of "n" closer to 100 will cause COSS
  1257. # to waste less disk space by having multiple copies of an object
  1258. # on disk, but will increase the chances of overwriting a popular
  1259. # object as COSS overwrites stripes. A value of "n" close to 0
  1260. # will cause COSS to keep all current objects in the current COSS
  1261. # stripe at the expense of the hit rate. The default value of 50
  1262. # will allow any given object to be stored on disk a maximum of
  1263. # 2 times.
  1264. #
  1265. # max-stripe-waste=n defines the maximum amount of space that COSS
  1266. # will waste in a given stripe (in bytes). When COSS writes data
  1267. # to disk, it will potentially waste up to "max-size" worth of disk
  1268. # space for each 1MB of data written. If "max-size" is set to a
  1269. # large value (ie >256k), this could potentially result in large
  1270. # amounts of wasted disk space. Setting this value to a lower value
  1271. # (ie 64k or 32k) will result in a COSS disk refusing to cache
  1272. # larger objects until the COSS stripe has been filled to within
  1273. # "max-stripe-waste" of the maximum size (1MB).
  1274. #
  1275. # membufs=n defines the number of "memory-only" stripes that COSS
  1276. # will use. When an cache hit is performed on a COSS stripe before
  1277. # COSS has reached the overwrite-percent value for that object,
  1278. # COSS will use a series of memory buffers to hold the object in
  1279. # while the data is sent to the client. This will define the maximum
  1280. # number of memory-only buffers that COSS will use. The default value
  1281. # is 10, which will use a maximum of 10MB of memory for buffers.
  1282. #
  1283. # maxfullbufs=n defines the maximum number of stripes a COSS partition
  1284. # will have in memory waiting to be freed (either because the disk is
  1285. # under load and the stripe is unwritten, or because clients are still
  1286. # transferring data from objects using the memory). In order to try
  1287. # and maintain a good hit rate under load, COSS will reserve the last
  1288. # 2 full stripes for object hits. (ie a COSS cache_dir will reject
  1289. # new objects when the number of full stripes is 2 less than maxfullbufs)
  1290. #
  1291. # The null store type:
  1292. #
  1293. # no options are allowed or required
  1294. #
  1295. # Common options:
  1296. #
  1297. # no-store, no new objects should be stored to this cache_dir
  1298. #
  1299. # min-size=n, refers to the min object size this storedir will accept.
  1300. # It's used to restrict a storedir to only store large objects
  1301. # (e.g. aufs) while other storedirs are optimized for smaller objects
  1302. # (e.g. COSS). Defaults to 0.
  1303. #
  1304. # max-size=n, refers to the max object size this storedir supports.
  1305. # It is used to initially choose the storedir to dump the object.
  1306. # Note: To make optimal use of the max-size limits you should order
  1307. # the cache_dir lines with the smallest max-size value first and the
  1308. # ones with no max-size specification last.
  1309. #
  1310. # Note that for coss, max-size must be less than COSS_MEMBUF_SZ
  1311. # (hard coded at 1 MB).
  1312. #
  1313. #Default:
  1314. # cache_dir ufs /var/spool/squid 5000 32 256
  1315.  
  1316. # TAG: store_dir_select_algorithm
  1317. # Set this to 'round-robin' as an alternative.
  1318. #
  1319. #Default:
  1320. # store_dir_select_algorithm least-load
  1321.  
  1322. # TAG: max_open_disk_fds
  1323. # To avoid having disk as the I/O bottleneck Squid can optionally
  1324. # bypass the on-disk cache if more than this amount of disk file
  1325. # descriptors are open.
  1326. #
  1327. # A value of 0 indicates no limit.
  1328. #
  1329. #Default:
  1330. # max_open_disk_fds 0
  1331.  
  1332. # TAG: minimum_object_size (bytes)
  1333. # Objects smaller than this size will NOT be saved on disk. The
  1334. # value is specified in kilobytes, and the default is 0 KB, which
  1335. # means there is no minimum.
  1336. #
  1337. #Default:
  1338. # minimum_object_size 0 KB
  1339.  
  1340. # TAG: maximum_object_size (bytes)
  1341. # Objects larger than this size will NOT be saved on disk. The
  1342. # value is specified in kilobytes, and the default is 4MB. If
  1343. # you wish to get a high BYTES hit ratio, you should probably
  1344. # increase this (one 32 MB object hit counts for 3200 10KB
  1345. # hits). If you wish to increase speed more than your want to
  1346. # save bandwidth you should leave this low.
  1347. #
  1348. # NOTE: if using the LFUDA replacement policy you should increase
  1349. # this value to maximize the byte hit rate improvement of LFUDA!
  1350. # See replacement_policy below for a discussion of this policy.
  1351. #
  1352. # NOTE 2: In Debian the default is raised to 20MB allowing cache
  1353. # of Packages files in debian repositories. This makes squid a
  1354. # proper proxy for APT.
  1355. #
  1356. #Default:
  1357. maximum_object_size 120480 KB
  1358.  
  1359. # TAG: cache_swap_low (percent, 0-100)
  1360. # TAG: cache_swap_high (percent, 0-100)
  1361. #
  1362. # The low- and high-water marks for cache object replacement.
  1363. # Replacement begins when the swap (disk) usage is above the
  1364. # low-water mark and attempts to maintain utilization near the
  1365. # low-water mark. As swap utilization gets close to high-water
  1366. # mark object eviction becomes more aggressive. If utilization is
  1367. # close to the low-water mark less replacement is done each time.
  1368. #
  1369. # Defaults are 90% and 95%. If you have a large cache, 5% could be
  1370. # hundreds of MB. If this is the case you may wish to set these
  1371. # numbers closer together.
  1372. #
  1373. #Default:
  1374. cache_swap_low 90
  1375. cache_swap_high 95
  1376.  
  1377. # TAG: update_headers on|off
  1378. # By default Squid updates stored HTTP headers when receiving
  1379. # a 304 response. Set this to off if you want to disable this
  1380. # for disk I/O performance reasons. Disabling this VIOLATES the
  1381. # HTTP standard, and could make you liable for problems which it
  1382. # causes.
  1383. #
  1384. #Default:
  1385. # update_headers on
  1386.  
  1387.  
  1388. # LOGFILE OPTIONS
  1389. # -----------------------------------------------------------------------------
  1390.  
  1391. # TAG: logformat
  1392. # Usage:
  1393. #
  1394. # logformat <name> <format specification>
  1395. #
  1396. # Defines an access log format.
  1397. #
  1398. # The <format specification> is a string with embedded % format codes
  1399. #
  1400. # % format codes all follow the same basic structure where all but
  1401. # the formatcode is optional. Output strings are automatically escaped
  1402. # as required according to their context and the output format
  1403. # modifiers are usually not needed, but can be specified if an explicit
  1404. # output format is desired.
  1405. #
  1406. # % ["|[|'|#] [-] [[0]width] [{argument}] formatcode
  1407. #
  1408. # " output in quoted string format
  1409. # [ output in squid text log format as used by log_mime_hdrs
  1410. # # output in URL quoted format
  1411. # ' output as-is
  1412. #
  1413. # - left aligned
  1414. # width field width. If starting with 0 the
  1415. # output is zero padded
  1416. # {arg} argument such as header name etc
  1417. #
  1418. # Format codes:
  1419. #
  1420. # >a Client source IP address
  1421. # >A Client FQDN
  1422. # >p Client source port
  1423. # <A Server IP address or peer name
  1424. # la Local IP address (http_port)
  1425. # lp Local port number (http_port)
  1426. # oa Our outgoing IP address (tcp_outgoing_address)
  1427. # ts Seconds since epoch
  1428. # tu subsecond time (milliseconds)
  1429. # tl Local time. Optional strftime format argument
  1430. # default %d/%b/%Y:%H:%M:%S %z
  1431. # tg GMT time. Optional strftime format argument
  1432. # default %d/%b/%Y:%H:%M:%S %z
  1433. # tr Response time (milliseconds)
  1434. # >h Request header. Optional header name argument
  1435. # on the format header[:[separator]element]
  1436. # <h Reply header. Optional header name argument
  1437. # as for >h
  1438. # un User name
  1439. # ul User name from authentication
  1440. # ui User name from ident
  1441. # us User name from SSL
  1442. # ue User name from external acl helper
  1443. # Hs HTTP status code
  1444. # Ss Squid request status (TCP_MISS etc)
  1445. # Sh Squid hierarchy status (DEFAULT_PARENT etc)
  1446. # mt MIME content type
  1447. # rm Request method (GET/POST etc)
  1448. # ru Request URL
  1449. # rp Request URL-Path excluding hostname
  1450. # rv Request protocol version
  1451. # ea Log string returned by external acl
  1452. # <st Reply size including HTTP headers
  1453. # >st Request size including HTTP headers
  1454. # st Request+Reply size including HTTP headers
  1455. # sn Unique sequence number per log line entry
  1456. # % a literal % character
  1457. #
  1458. # The default formats available (which do not need re-defining) are:
  1459. #
  1460. #logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
  1461. #logformat squidmime %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt [%>h] [%<h]
  1462. #logformat common %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st %Ss:%Sh
  1463. #logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
  1464. #
  1465. #Default:
  1466. # none
  1467.  
  1468. # TAG: access_log
  1469. # These files log client request activities. Has a line every HTTP or
  1470. # ICP request. The format is:
  1471. # access_log <filepath> [<logformat name> [acl acl ...]]
  1472. # access_log none [acl acl ...]]
  1473. #
  1474. # Will log to the specified file using the specified format (which
  1475. # must be defined in a logformat directive) those entries which match
  1476. # ALL the acl's specified (which must be defined in acl clauses).
  1477. # If no acl is specified, all requests will be logged to this file.
  1478. #
  1479. # To disable logging of a request use the filepath "none", in which case
  1480. # a logformat name should not be specified.
  1481. #
  1482. # To log the request via syslog specify a filepath of "syslog":
  1483. #
  1484. # access_log syslog[:facility.priority] [format [acl1 [acl2 ....]]]
  1485. # where facility could be any of:
  1486. # authpriv, daemon, local0 .. local7 or user.
  1487. #
  1488. # And priority could be any of:
  1489. # err, warning, notice, info, debug.
  1490. access_log /var/log/squid/access.log squid
  1491.  
  1492. # TAG: log_access allow|deny acl acl...
  1493. # This options allows you to control which requests gets logged
  1494. # to access.log (see access_log directive). Requests denied for
  1495. # logging will also not be accounted for in performance counters.
  1496. #
  1497. #Default:
  1498. # none
  1499.  
  1500. # TAG: logfile_daemon
  1501. # Specify the path to the logfile-writing daemon. This daemon is
  1502. # used to write the access and store logs, if configured.
  1503. #
  1504. #Default:
  1505. # logfile_daemon /usr/lib/squid/logfile-daemon
  1506.  
  1507. # TAG: cache_log
  1508. # Cache logging file. This is where general information about
  1509. # your cache's behavior goes. You can increase the amount of data
  1510. # logged to this file with the "debug_options" tag below.
  1511. #
  1512. #Default:
  1513. # cache_log /var/log/squid/cache.log
  1514.  
  1515. # TAG: cache_store_log
  1516. # Logs the activities of the storage manager. Shows which
  1517. # objects are ejected from the cache, and which objects are
  1518. # saved and for how long. To disable, enter "none". There are
  1519. # not really utilities to analyze this data, so you can safely
  1520. # disable it.
  1521. #
  1522. #Default:
  1523. # cache_store_log /var/log/squid/store.log
  1524.  
  1525. # TAG: cache_swap_state
  1526. # Location for the cache "swap.state" file. This index file holds
  1527. # the metadata of objects saved on disk. It is used to rebuild
  1528. # the cache during startup. Normally this file resides in each
  1529. # 'cache_dir' directory, but you may specify an alternate
  1530. # pathname here. Note you must give a full filename, not just
  1531. # a directory. Since this is the index for the whole object
  1532. # list you CANNOT periodically rotate it!
  1533. #
  1534. # If %s can be used in the file name it will be replaced with a
  1535. # a representation of the cache_dir name where each / is replaced
  1536. # with '.'. This is needed to allow adding/removing cache_dir
  1537. # lines when cache_swap_log is being used.
  1538. #
  1539. # If have more than one 'cache_dir', and %s is not used in the name
  1540. # these swap logs will have names such as:
  1541. #
  1542. # cache_swap_log.00
  1543. # cache_swap_log.01
  1544. # cache_swap_log.02
  1545. #
  1546. # The numbered extension (which is added automatically)
  1547. # corresponds to the order of the 'cache_dir' lines in this
  1548. # configuration file. If you change the order of the 'cache_dir'
  1549. # lines in this file, these index files will NOT correspond to
  1550. # the correct 'cache_dir' entry (unless you manually rename
  1551. # them). We recommend you do NOT use this option. It is
  1552. # better to keep these index files in each 'cache_dir' directory.
  1553. #
  1554. #Default:
  1555. # none
  1556.  
  1557. # TAG: logfile_rotate
  1558. # Specifies the number of logfile rotations to make when you
  1559. # type 'squid -k rotate'. The default is 10, which will rotate
  1560. # with extensions 0 through 9. Setting logfile_rotate to 0 will
  1561. # disable the file name rotation, but the logfiles are still closed
  1562. # and re-opened. This will enable you to rename the logfiles
  1563. # yourself just before sending the rotate signal.
  1564. #
  1565. # Note, the 'squid -k rotate' command normally sends a USR1
  1566. # signal to the running squid process. In certain situations
  1567. # (e.g. on Linux with Async I/O), USR1 is used for other
  1568. # purposes, so -k rotate uses another signal. It is best to get
  1569. # in the habit of using 'squid -k rotate' instead of 'kill -USR1
  1570. # <pid>'.
  1571. #
  1572. # Note2, for Debian/Linux the default of logfile_rotate is
  1573. # zero, since it includes external logfile-rotation methods.
  1574. #
  1575. #Default:
  1576. logfile_rotate 5
  1577.  
  1578. # TAG: emulate_httpd_log on|off
  1579. # The Cache can emulate the log file format which many 'httpd'
  1580. # programs use. To disable/enable this emulation, set
  1581. # emulate_httpd_log to 'off' or 'on'. The default
  1582. # is to use the native log format since it includes useful
  1583. # information Squid-specific log analyzers use.
  1584. #
  1585. #Default:
  1586. # emulate_httpd_log off
  1587.  
  1588. # TAG: log_ip_on_direct on|off
  1589. # Log the destination IP address in the hierarchy log tag when going
  1590. # direct. Earlier Squid versions logged the hostname here. If you
  1591. # prefer the old way set this to off.
  1592. #
  1593. #Default:
  1594. # log_ip_on_direct on
  1595.  
  1596. # TAG: mime_table
  1597. # Pathname to Squid's MIME table. You shouldn't need to change
  1598. # this, but the default file contains examples and formatting
  1599. # information if you do.
  1600. #
  1601. #Default:
  1602. # mime_table /usr/share/squid/mime.conf
  1603.  
  1604. # TAG: log_mime_hdrs on|off
  1605. # The Cache can record both the request and the response MIME
  1606. # headers for each HTTP transaction. The headers are encoded
  1607. # safely and will appear as two bracketed fields at the end of
  1608. # the access log (for either the native or httpd-emulated log
  1609. # formats). To enable this logging set log_mime_hdrs to 'on'.
  1610. #
  1611. #Default:
  1612. # log_mime_hdrs off
  1613.  
  1614. # TAG: useragent_log
  1615. # Squid will write the User-Agent field from HTTP requests
  1616. # to the filename specified here. By default useragent_log
  1617. # is disabled.
  1618. #
  1619. #Default:
  1620. # none
  1621.  
  1622. # TAG: referer_log
  1623. # Squid will write the Referer field from HTTP requests to the
  1624. # filename specified here. By default referer_log is disabled.
  1625. # Note that "referer" is actually a misspelling of "referrer"
  1626. # however the misspelt version has been accepted into the HTTP RFCs
  1627. # and we accept both.
  1628. #
  1629. #Default:
  1630. # none
  1631.  
  1632. # TAG: pid_filename
  1633. # A filename to write the process-id to. To disable, enter "none".
  1634. #
  1635. #Default:
  1636. # pid_filename /var/run/squid.pid
  1637.  
  1638. # TAG: debug_options
  1639. # Logging options are set as section,level where each source file
  1640. # is assigned a unique section. Lower levels result in less
  1641. # output, Full debugging (level 9) can result in a very large
  1642. # log file, so be careful. The magic word "ALL" sets debugging
  1643. # levels for all sections. We recommend normally running with
  1644. # "ALL,1".
  1645. #
  1646. #Default:
  1647. # debug_options ALL,1
  1648.  
  1649. # TAG: log_fqdn on|off
  1650. # Turn this on if you wish to log fully qualified domain names
  1651. # in the access.log. To do this Squid does a DNS lookup of all
  1652. # IP's connecting to it. This can (in some situations) increase
  1653. # latency, which makes your cache seem slower for interactive
  1654. # browsing.
  1655. #
  1656. #Default:
  1657. # log_fqdn off
  1658.  
  1659. # TAG: client_netmask
  1660. # A netmask for client addresses in logfiles and cachemgr output.
  1661. # Change this to protect the privacy of your cache clients.
  1662. # A netmask of 255.255.255.0 will log all IP's in that range with
  1663. # the last digit set to '0'.
  1664. #
  1665. #Default:
  1666. # client_netmask 255.255.255.255
  1667.  
  1668. # TAG: forward_log
  1669. # Note: This option is only available if Squid is rebuilt with the
  1670. # --enable-forward-log option
  1671. #
  1672. # Logs the server-side requests.
  1673. #
  1674. # This is currently work in progress.
  1675. #
  1676. #Default:
  1677. # none
  1678.  
  1679. # TAG: strip_query_terms
  1680. # By default, Squid strips query terms from requested URLs before
  1681. # logging. This protects your user's privacy.
  1682. #
  1683. #Default:
  1684. # strip_query_terms on
  1685.  
  1686. # TAG: buffered_logs on|off
  1687. # cache.log log file is written with stdio functions, and as such
  1688. # it can be buffered or unbuffered. By default it will be unbuffered.
  1689. # Buffering it can speed up the writing slightly (though you are
  1690. # unlikely to need to worry unless you run with tons of debugging
  1691. # enabled in which case performance will suffer badly anyway..).
  1692. #
  1693. #Default:
  1694. # buffered_logs off
  1695.  
  1696. # TAG: netdb_filename
  1697. # A filename where Squid stores it's netdb state between restarts.
  1698. # To disable, enter "none".
  1699. #
  1700. #Default:
  1701. # netdb_filename /var/spool/squid/logs/netdb.state
  1702.  
  1703.  
  1704. # OPTIONS FOR FTP GATEWAYING
  1705. # -----------------------------------------------------------------------------
  1706.  
  1707. # TAG: ftp_user
  1708. # If you want the anonymous login password to be more informative
  1709. # (and enable the use of picky ftp servers), set this to something
  1710. # reasonable for your domain, like wwwuser@somewhere.net
  1711. #
  1712. # The reason why this is domainless by default is the
  1713. # request can be made on the behalf of a user in any domain,
  1714. # depending on how the cache is used.
  1715. # Some ftp server also validate the email address is valid
  1716. # (for example perl.com).
  1717. #
  1718. #Default:
  1719. # ftp_user Squid@
  1720.  
  1721. # TAG: ftp_list_width
  1722. # Sets the width of ftp listings. This should be set to fit in
  1723. # the width of a standard browser. Setting this too small
  1724. # can cut off long filenames when browsing ftp sites.
  1725. #
  1726. #Default:
  1727. # ftp_list_width 32
  1728.  
  1729. # TAG: ftp_passive
  1730. # If your firewall does not allow Squid to use passive
  1731. # connections, turn off this option.
  1732. #
  1733. #Default:
  1734. # ftp_passive on
  1735.  
  1736. # TAG: ftp_sanitycheck
  1737. # For security and data integrity reasons Squid by default performs
  1738. # sanity checks of the addresses of FTP data connections ensure the
  1739. # data connection is to the requested server. If you need to allow
  1740. # FTP connections to servers using another IP address for the data
  1741. # connection turn this off.
  1742. #
  1743. #Default:
  1744. # ftp_sanitycheck on
  1745.  
  1746. # TAG: ftp_telnet_protocol
  1747. # The FTP protocol is officially defined to use the telnet protocol
  1748. # as transport channel for the control connection. However, many
  1749. # implementations are broken and does not respect this aspect of
  1750. # the FTP protocol.
  1751. #
  1752. # If you have trouble accessing files with ASCII code 255 in the
  1753. # path or similar problems involving this ASCII code you can
  1754. # try setting this directive to off. If that helps, report to the
  1755. # operator of the FTP server in question that their FTP server
  1756. # is broken and does not follow the FTP standard.
  1757. #
  1758. #Default:
  1759. # ftp_telnet_protocol on
  1760.  
  1761.  
  1762. # OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
  1763. # -----------------------------------------------------------------------------
  1764.  
  1765. # TAG: diskd_program
  1766. # Specify the location of the diskd executable.
  1767. # Note this is only useful if you have compiled in
  1768. # diskd as one of the store io modules.
  1769. #
  1770. #Default:
  1771. # diskd_program /usr/lib/squid/diskd-daemon
  1772.  
  1773. # TAG: unlinkd_program
  1774. # Specify the location of the executable for file deletion process.
  1775. #
  1776. #Default:
  1777. # unlinkd_program /usr/lib/squid/unlinkd
  1778.  
  1779. # TAG: pinger_program
  1780. # Note: This option is only available if Squid is rebuilt with the
  1781. # --enable-icmp option
  1782. #
  1783. # Specify the location of the executable for the pinger process.
  1784. #
  1785. #Default:
  1786. # pinger_program /usr/lib/squid/pinger
  1787.  
  1788.  
  1789. # OPTIONS FOR URL REWRITING
  1790. # -----------------------------------------------------------------------------
  1791.  
  1792. # TAG: storeurl_rewrite_program
  1793. # Specify the location of the executable for the Store URL rewriter.
  1794. # The Store URL rewriter allows URLs to be "normalised" ; mapping
  1795. # multiple URLs to a single URL representation for cache operations.
  1796. #
  1797. # For example, if you request an object at:
  1798. #
  1799. # http://srv1.example.com/image.gif
  1800. #
  1801. # and a subsequent request for:
  1802. #
  1803. # http://srv2.example.com/image.gif
  1804. #
  1805. # then Squid will treat these both as different URLs and cache them
  1806. # seperately.
  1807. #
  1808. # This is almost the normal case, but an increasing number of sites
  1809. # distribute the same content between multiple frontend hosts.
  1810. # The Store URL rewriter allows you to rewrite these URLs to one URL
  1811. # to use for cache operations, but not -fetches-. Fetches are still
  1812. # made from the original site, but stored with the store URL rewritten
  1813. # URL as the store key.
  1814. #
  1815. # For each requested URL rewriter will receive on line with the format
  1816. #
  1817. # URL <SP> client_ip "/" fqdn <SP> user <SP> method <SP> urlgroup
  1818. # [<SP> kvpairs] <NL>
  1819. #
  1820. # In the future, the rewriter interface will be extended with
  1821. # key=value pairs ("kvpairs" shown above). Rewriter programs
  1822. # should be prepared to receive and possibly ignore additional
  1823. # whitespace-separated tokens on each input line.
  1824. #
  1825. # And the rewriter may return a rewritten URL. The other components of
  1826. # the request line does not need to be returned (ignored if they are).
  1827. #
  1828. # By default, a Store URL rewriter is not used.
  1829. #
  1830. # Please note - the normal URL rewriter rewrites Squid's _destination_
  1831. # URL - ie, what it fetches. The Store URL rewriter rewrites Squid's
  1832. # _store_ URL - ie, what it uses to store and retrieve objects.
  1833. #
  1834. #Default:
  1835. # none
  1836.  
  1837. # TAG: storeurl_rewrite_children
  1838. #
  1839. #
  1840. #Default:
  1841. # storeurl_rewrite_children 5
  1842.  
  1843. # TAG: storeurl_rewrite_concurrency
  1844. #
  1845. #
  1846. #Default:
  1847. # storeurl_rewrite_concurrency 0
  1848.  
  1849. # TAG: url_rewrite_program
  1850. # Specify the location of the executable for the URL rewriter.
  1851. # Since they can perform almost any function there isn't one included.
  1852. #
  1853. # For each requested URL rewriter will receive on line with the format
  1854. #
  1855. # URL <SP> client_ip "/" fqdn <SP> user <SP> method <SP> urlgroup
  1856. # [<SP> kvpairs] <NL>
  1857. #
  1858. # In the future, the rewriter interface will be extended with
  1859. # key=value pairs ("kvpairs" shown above). Rewriter programs
  1860. # should be prepared to receive and possibly ignore additional
  1861. # whitespace-separated tokens on each input line.
  1862. #
  1863. # And the rewriter may return a rewritten URL. The other components of
  1864. # the request line does not need to be returned (ignored if they are).
  1865. #
  1866. # The rewriter can also indicate that a client-side redirect should
  1867. # be performed to the new URL. This is done by prefixing the returned
  1868. # URL with "301:" (moved permanently) or 302: (moved temporarily).
  1869. #
  1870. # It can also return a "urlgroup" that can subsequently be matched
  1871. # in cache_peer_access and similar ACL driven rules. An urlgroup is
  1872. # returned by prefixing the returned URL with "!urlgroup!".
  1873. #
  1874. # By default, a URL rewriter is not used.
  1875. #
  1876. #Default:
  1877. url_rewrite_program /usr/bin/samsredir
  1878.  
  1879. # TAG: url_rewrite_children
  1880. # The number of redirector processes to spawn. If you start
  1881. # too few Squid will have to wait for them to process a backlog of
  1882. # URLs, slowing it down. If you start too many they will use RAM
  1883. # and other system resources.
  1884. #
  1885. #Default:
  1886. url_rewrite_children 5
  1887.  
  1888. # TAG: url_rewrite_concurrency
  1889. # The number of requests each redirector helper can handle in
  1890. # parallel. Defaults to 0 which indicates the redirector
  1891. # is a old-style single threaded redirector.
  1892. #
  1893. # When this directive is set to a value >= 1 then the protocol
  1894. # used to communicate with the helper is modified to include
  1895. # a request ID in front of the request/response. The request
  1896. # ID from the request must be echoed back with the response
  1897. # to that request.
  1898. #
  1899. #Default:
  1900. # url_rewrite_concurrency 0
  1901.  
  1902. # TAG: url_rewrite_host_header
  1903. # By default Squid rewrites any Host: header in redirected
  1904. # requests. If you are running an accelerator this may
  1905. # not be a wanted effect of a redirector.
  1906. #
  1907. # WARNING: Entries are cached on the result of the URL rewriting
  1908. # process, so be careful if you have domain-virtual hosts.
  1909. #
  1910. #Default:
  1911. # url_rewrite_host_header on
  1912.  
  1913. # TAG: url_rewrite_access
  1914. # If defined, this access list specifies which requests are
  1915. # sent to the redirector processes. By default all requests
  1916. # are sent.
  1917. #
  1918. #Default:
  1919. # none
  1920.  
  1921. # TAG: storeurl_access
  1922. #
  1923. #
  1924. #Default:
  1925. # none
  1926.  
  1927. # TAG: redirector_bypass
  1928. # When this is 'on', a request will not go through the
  1929. # redirector if all redirectors are busy. If this is 'off'
  1930. # and the redirector queue grows too large, Squid will exit
  1931. # with a FATAL error and ask you to increase the number of
  1932. # redirectors. You should only enable this if the redirectors
  1933. # are not critical to your caching system. If you use
  1934. # redirectors for access control, and you enable this option,
  1935. # users may have access to pages they should not
  1936. # be allowed to request.
  1937. #
  1938. #Default:
  1939. # redirector_bypass off
  1940.  
  1941. # TAG: location_rewrite_program
  1942. # Specify the location of the executable for the Location rewriter,
  1943. # used to rewrite server generated redirects. Usually used in
  1944. # conjunction with a url_rewrite_program
  1945. #
  1946. # For each Location header received the location rewriter will receive
  1947. # one line with the format:
  1948. #
  1949. # location URL <SP> requested URL <SP> urlgroup <NL>
  1950. #
  1951. # And the rewriter may return a rewritten Location URL or a blank line.
  1952. # The other components of the request line does not need to be returned
  1953. # (ignored if they are).
  1954. #
  1955. # By default, a Location rewriter is not used.
  1956. #
  1957. #Default:
  1958. # none
  1959.  
  1960. # TAG: location_rewrite_children
  1961. # The number of location rewriting processes to spawn. If you start
  1962. # too few Squid will have to wait for them to process a backlog of
  1963. # URLs, slowing it down. If you start too many they will use RAM
  1964. # and other system resources.
  1965. #
  1966. #Default:
  1967. # location_rewrite_children 5
  1968.  
  1969. # TAG: location_rewrite_concurrency
  1970. # The number of requests each Location rewriter helper can handle in
  1971. # parallel. Defaults to 0 which indicates that the helper
  1972. # is a old-style singlethreaded helper.
  1973. #
  1974. #Default:
  1975. # location_rewrite_concurrency 0
  1976.  
  1977. # TAG: location_rewrite_access
  1978. # If defined, this access list specifies which requests are
  1979. # sent to the location rewriting processes. By default all Location
  1980. # headers are sent.
  1981. #
  1982. #Default:
  1983. # none
  1984.  
  1985.  
  1986. # OPTIONS FOR TUNING THE CACHE
  1987. # -----------------------------------------------------------------------------
  1988.  
  1989. # TAG: cache
  1990. # A list of ACL elements which, if matched, cause the request to
  1991. # not be satisfied from the cache and the reply to not be cached.
  1992. # In other words, use this to force certain objects to never be cached.
  1993. #
  1994. # You must use the word 'DENY' to indicate the ACL names which should
  1995. # NOT be cached.
  1996. #
  1997. # Default is to allow all to be cached.
  1998. #
  1999. #Default:
  2000. # none
  2001.  
  2002. # TAG: max_stale time-units
  2003. # This option puts an upper limit on how stale content Squid
  2004. # will serve from the cache if cache validation fails.
  2005. #
  2006. #Default:
  2007. # max_stale 1 week
  2008.  
  2009. # TAG: refresh_pattern
  2010. # usage: refresh_pattern [-i] regex min percent max [options]
  2011. #
  2012. # By default, regular expressions are CASE-SENSITIVE. To make
  2013. # them case-insensitive, use the -i option.
  2014. #
  2015. # 'Min' is the time (in minutes) an object without an explicit
  2016. # expiry time should be considered fresh. The recommended
  2017. # value is 0, any higher values may cause dynamic applications
  2018. # to be erroneously cached unless the application designer
  2019. # has taken the appropriate actions.
  2020. #
  2021. # 'Percent' is a percentage of the objects age (time since last
  2022. # modification age) an object without explicit expiry time
  2023. # will be considered fresh.
  2024. #
  2025. # 'Max' is an upper limit on how long objects without an explicit
  2026. # expiry time will be considered fresh.
  2027. #
  2028. # options: override-expire
  2029. # override-lastmod
  2030. # reload-into-ims
  2031. # ignore-reload
  2032. # ignore-no-cache
  2033. # ignore-private
  2034. # ignore-auth
  2035. # stale-while-revalidate=NN
  2036. # ignore-stale-while-revalidate
  2037. # max-stale=NN
  2038. # negative-ttl=NN
  2039. #
  2040. # override-expire enforces min age even if the server
  2041. # sent an explicit expiry time (e.g., with the
  2042. # Expires: header or Cache-Control: max-age). Doing this
  2043. # VIOLATES the HTTP standard. Enabling this feature
  2044. # could make you liable for problems which it causes.
  2045. #
  2046. # Note: this does not enforce staleness - it only extends
  2047. # freshness / min. If the server returns a Expires time which
  2048. # is longer than your max time, Squid will still consider
  2049. # the object fresh for that period of time.
  2050. #
  2051. # override-lastmod enforces min age even on objects
  2052. # that were modified recently.
  2053. #
  2054. # reload-into-ims changes client no-cache or ``reload''
  2055. # to If-Modified-Since requests. Doing this VIOLATES the
  2056. # HTTP standard. Enabling this feature could make you
  2057. # liable for problems which it causes.
  2058. #
  2059. # ignore-reload ignores a client no-cache or ``reload''
  2060. # header. Doing this VIOLATES the HTTP standard. Enabling
  2061. # this feature could make you liable for problems which
  2062. # it causes.
  2063. #
  2064. # ignore-no-cache ignores any ``Pragma: no-cache'' and
  2065. # ``Cache-control: no-cache'' headers received from a server.
  2066. # The HTTP RFC never allows the use of this (Pragma) header
  2067. # from a server, only a client, though plenty of servers
  2068. # send it anyway.
  2069. #
  2070. # ignore-private ignores any ``Cache-control: private''
  2071. # headers received from a server. Doing this VIOLATES
  2072. # the HTTP standard. Enabling this feature could make you
  2073. # liable for problems which it causes.
  2074. #
  2075. # ignore-auth caches responses to requests with authorization,
  2076. # as if the originserver had sent ``Cache-control: public''
  2077. # in the response header. Doing this VIOLATES the HTTP standard.
  2078. # Enabling this feature could make you liable for problems which
  2079. # it causes.
  2080. #
  2081. # stale-while-revalidate=NN makes Squid perform an asyncronous
  2082. # cache validation if the object isn't more stale than NN.
  2083. # Doing this VIOLATES the HTTP standard. Enabling this
  2084. # feature could make you liable for problems which it
  2085. # causes.
  2086. #
  2087. # ignore-stale-while-revalidate makes Squid ignore any 'Cache-Control:
  2088. # stale-while-revalidate=NN' headers received from a server. Can be
  2089. # combined with stale-while-revalidate=NN to override the server provided
  2090. # value.
  2091. #
  2092. # max-stale=NN provided a maximum staleness factor. Squid won't
  2093. # serve objects more stale than this even if it failed to
  2094. # validate the object.
  2095. #
  2096. # negative-ttl=NN overrides the global negative_ttl parameter
  2097. # selectively for URLs matching this pattern (in seconds).
  2098. #
  2099. # Basically a cached object is:
  2100. #
  2101. # FRESH if expires < now, else STALE
  2102. # STALE if age > max
  2103. # FRESH if lm-factor < percent, else STALE
  2104. # FRESH if age < min
  2105. # else STALE
  2106. #
  2107. # The refresh_pattern lines are checked in the order listed here.
  2108. # The first entry which matches is used. If none of the entries
  2109. # match the default will be used.
  2110. #
  2111. # Note, you must uncomment all the default lines if you want
  2112. # to change one. The default setting is only active if none is
  2113. # used.
  2114. #
  2115. #Suggested default:
  2116. refresh_pattern ^ftp: 1440 20% 10080
  2117. refresh_pattern ^gopher: 1440 0% 1440
  2118. refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
  2119. refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
  2120. refresh_pattern . 0 20% 4320
  2121.  
  2122. # TAG: quick_abort_min (KB)
  2123. # TAG: quick_abort_max (KB)
  2124. # TAG: quick_abort_pct (percent)
  2125. # The cache by default continues downloading aborted requests
  2126. # which are almost completed (less than 16 KB remaining). This
  2127. # may be undesirable on slow (e.g. SLIP) links and/or very busy
  2128. # caches. Impatient users may tie up file descriptors and
  2129. # bandwidth by repeatedly requesting and immediately aborting
  2130. # downloads.
  2131. #
  2132. # When the user aborts a request, Squid will check the
  2133. # quick_abort values to the amount of data transfered until
  2134. # then.
  2135. #
  2136. # If the transfer has less than 'quick_abort_min' KB remaining,
  2137. # it will finish the retrieval.
  2138. #
  2139. # If the transfer has more than 'quick_abort_max' KB remaining,
  2140. # it will abort the retrieval.
  2141. #
  2142. # If more than 'quick_abort_pct' of the transfer has completed,
  2143. # it will finish the retrieval.
  2144. #
  2145. # If you do not want any retrieval to continue after the client
  2146. # has aborted, set both 'quick_abort_min' and 'quick_abort_max'
  2147. # to '0 KB'.
  2148. #
  2149. # If you want retrievals to always continue if they are being
  2150. # cached set 'quick_abort_min' to '-1 KB'.
  2151. #
  2152. #Default:
  2153. # quick_abort_min 16 KB
  2154. # quick_abort_max 16 KB
  2155. # quick_abort_pct 95
  2156.  
  2157. # TAG: read_ahead_gap buffer-size
  2158. # The amount of data the cache will buffer ahead of what has been
  2159. # sent to the client when retrieving an object from another server.
  2160. #
  2161. #Default:
  2162. # read_ahead_gap 16 KB
  2163.  
  2164. # TAG: negative_ttl time-units
  2165. # Time-to-Live (TTL) for failed requests. Certain types of
  2166. # failures (such as "connection refused" and "404 Not Found") are
  2167. # negatively-cached for a configurable amount of time. The
  2168. # default is 5 minutes. Note that this is different from
  2169. # negative caching of DNS lookups.
  2170. #
  2171. #Default:
  2172. # negative_ttl 5 minutes
  2173.  
  2174. # TAG: positive_dns_ttl time-units
  2175. # Upper limit on how long Squid will cache positive DNS responses.
  2176. # Default is 6 hours (360 minutes). This directive must be set
  2177. # larger than negative_dns_ttl.
  2178. #
  2179. #Default:
  2180. # positive_dns_ttl 6 hours
  2181.  
  2182. # TAG: negative_dns_ttl time-units
  2183. # Time-to-Live (TTL) for negative caching of failed DNS lookups.
  2184. # This also sets the lower cache limit on positive lookups.
  2185. # Minimum value is 1 second, and it is not recommendable to go
  2186. # much below 10 seconds.
  2187. #
  2188. #Default:
  2189. # negative_dns_ttl 1 minute
  2190.  
  2191. # TAG: range_offset_limit (bytes)
  2192. # Sets a upper limit on how far into the the file a Range request
  2193. # may be to cause Squid to prefetch the whole file. If beyond this
  2194. # limit Squid forwards the Range request as it is and the result
  2195. # is NOT cached.
  2196. #
  2197. # This is to stop a far ahead range request (lets say start at 17MB)
  2198. # from making Squid fetch the whole object up to that point before
  2199. # sending anything to the client.
  2200. #
  2201. # A value of -1 causes Squid to always fetch the object from the
  2202. # beginning so it may cache the result. (2.0 style)
  2203. #
  2204. # A value of 0 causes Squid to never fetch more than the
  2205. # client requested. (default)
  2206. #
  2207. #Default:
  2208. # range_offset_limit 0 KB
  2209.  
  2210. # TAG: minimum_expiry_time (seconds)
  2211. # The minimum caching time according to (Expires - Date)
  2212. # Headers Squid honors if the object can't be revalidated
  2213. # defaults to 60 seconds. In reverse proxy enorinments it
  2214. # might be desirable to honor shorter object lifetimes. It
  2215. # is most likely better to make your server return a
  2216. # meaningful Last-Modified header however.
  2217. #
  2218. #Default:
  2219. # minimum_expiry_time 60 seconds
  2220.  
  2221. # TAG: store_avg_object_size (kbytes)
  2222. # Average object size, used to estimate number of objects your
  2223. # cache can hold. The default is 13 KB.
  2224. #
  2225. #Default:
  2226. # store_avg_object_size 13 KB
  2227.  
  2228. # TAG: store_objects_per_bucket
  2229. # Target number of objects per bucket in the store hash table.
  2230. # Lowering this value increases the total number of buckets and
  2231. # also the storage maintenance rate. The default is 20.
  2232. #
  2233. #Default:
  2234. # store_objects_per_bucket 20
  2235.  
  2236.  
  2237. # HTTP OPTIONS
  2238. # -----------------------------------------------------------------------------
  2239.  
  2240. # TAG: request_header_max_size (KB)
  2241. # This specifies the maximum size for HTTP headers in a request.
  2242. # Request headers are usually relatively small (about 512 bytes).
  2243. # Placing a limit on the request header size will catch certain
  2244. # bugs (for example with persistent connections) and possibly
  2245. # buffer-overflow or denial-of-service attacks.
  2246. #
  2247. #Default:
  2248. # request_header_max_size 20 KB
  2249.  
  2250. # TAG: reply_header_max_size (KB)
  2251. # This specifies the maximum size for HTTP headers in a reply.
  2252. # Reply headers are usually relatively small (about 512 bytes).
  2253. # Placing a limit on the reply header size will catch certain
  2254. # bugs (for example with persistent connections) and possibly
  2255. # buffer-overflow or denial-of-service attacks.
  2256. #
  2257. #Default:
  2258. # reply_header_max_size 20 KB
  2259.  
  2260. # TAG: request_body_max_size (KB)
  2261. # This specifies the maximum size for an HTTP request body.
  2262. # In other words, the maximum size of a PUT/POST request.
  2263. # A user who attempts to send a request with a body larger
  2264. # than this limit receives an "Invalid Request" error message.
  2265. # If you set this parameter to a zero (the default), there will
  2266. # be no limit imposed.
  2267. #
  2268. #Default:
  2269. # request_body_max_size 0 KB
  2270.  
  2271. # TAG: broken_posts
  2272. # A list of ACL elements which, if matched, causes Squid to send
  2273. # an extra CRLF pair after the body of a PUT/POST request.
  2274. #
  2275. # Some HTTP servers has broken implementations of PUT/POST,
  2276. # and rely on an extra CRLF pair sent by some WWW clients.
  2277. #
  2278. # Quote from RFC2616 section 4.1 on this matter:
  2279. #
  2280. # Note: certain buggy HTTP/1.0 client implementations generate an
  2281. # extra CRLF's after a POST request. To restate what is explicitly
  2282. # forbidden by the BNF, an HTTP/1.1 client must not preface or follow
  2283. # a request with an extra CRLF.
  2284. #
  2285. #Example:
  2286. # acl buggy_server url_regex ^http://....
  2287. # broken_posts allow buggy_server
  2288. #
  2289. #Default:
  2290. # none
  2291.  
  2292. # TAG: upgrade_http0.9
  2293. # This access list controls when HTTP/0.9 responses is upgraded
  2294. # to our current HTTP version. The default is to always upgrade.
  2295. #
  2296. # Some applications expect to be able to respond with non-HTTP
  2297. # responses and clients gets confused if the response is upgraded.
  2298. # For example SHOUTcast servers used for mp3 streaming.
  2299. #
  2300. # To enable some flexibility in detection of such applications
  2301. # the first line of the response is available in the internal header
  2302. # X-HTTP09-First-Line for use in the rep_header acl.
  2303. #
  2304. # Don't upgrade ShoutCast responses to HTTP
  2305. acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
  2306. upgrade_http0.9 deny shoutcast
  2307.  
  2308. # TAG: via on|off
  2309. # If set (default), Squid will include a Via header in requests and
  2310. # replies as required by RFC2616.
  2311. #
  2312. #Default:
  2313. # via on
  2314.  
  2315. # TAG: cache_vary
  2316. # When 'cache_vary' is set to off, response that have a
  2317. # Vary header will not be stored in the cache.
  2318. #
  2319. #Default:
  2320. # cache_vary on
  2321.  
  2322. # TAG: broken_vary_encoding
  2323. # Many servers have broken support for on-the-fly Content-Encoding,
  2324. # returning the same ETag on both plain and gzip:ed variants.
  2325. # Vary replies matching this access list will have the cache split
  2326. # on the Accept-Encoding header of the request and not trusting the
  2327. # ETag to be unique.
  2328. #
  2329. # Apache mod_gzip and mod_deflate known to be broken so don't trust
  2330. # Apache to signal ETag correctly on such responses
  2331. acl apache rep_header Server ^Apache
  2332. broken_vary_encoding allow apache
  2333.  
  2334. # TAG: collapsed_forwarding (on|off)
  2335. # This option enables multiple requests for the same URI to be
  2336. # processed as one request. Normally disabled to avoid increased
  2337. # latency on dynamic content, but there can be benefit from enabling
  2338. # this in accelerator setups where the web servers are the bottleneck
  2339. # and reliable and returns mostly cacheable information.
  2340. #
  2341. #Default:
  2342. # collapsed_forwarding off
  2343.  
  2344. # TAG: refresh_stale_hit (time)
  2345. # This option changes the refresh algorithm to allow concurrent
  2346. # requests while an object is being refreshed to be processed as
  2347. # cache hits if the object expired less than X seconds ago. Default
  2348. # is 0 to disable this feature. This option is mostly interesting
  2349. # in accelerator setups where a few objects is accessed very
  2350. # frequently.
  2351. #
  2352. #Default:
  2353. # refresh_stale_hit 0 seconds
  2354.  
  2355. # TAG: ie_refresh on|off
  2356. # Microsoft Internet Explorer up until version 5.5 Service
  2357. # Pack 1 has an issue with transparent proxies, wherein it
  2358. # is impossible to force a refresh. Turning this on provides
  2359. # a partial fix to the problem, by causing all IMS-REFRESH
  2360. # requests from older IE versions to check the origin server
  2361. # for fresh content. This reduces hit ratio by some amount
  2362. # (~10% in my experience), but allows users to actually get
  2363. # fresh content when they want it. Note because Squid
  2364. # cannot tell if the user is using 5.5 or 5.5SP1, the behavior
  2365. # of 5.5 is unchanged from old versions of Squid (i.e. a
  2366. # forced refresh is impossible). Newer versions of IE will,
  2367. # hopefully, continue to have the new behavior and will be
  2368. # handled based on that assumption. This option defaults to
  2369. # the old Squid behavior, which is better for hit ratios but
  2370. # worse for clients using IE, if they need to be able to
  2371. # force fresh content.
  2372. #
  2373. #Default:
  2374. # ie_refresh off
  2375.  
  2376. # TAG: vary_ignore_expire on|off
  2377. # Many HTTP servers supporting Vary gives such objects
  2378. # immediate expiry time with no cache-control header
  2379. # when requested by a HTTP/1.0 client. This option
  2380. # enables Squid to ignore such expiry times until
  2381. # HTTP/1.1 is fully implemented.
  2382. # WARNING: This may eventually cause some varying
  2383. # objects not intended for caching to get cached.
  2384. #
  2385. #Default:
  2386. # vary_ignore_expire off
  2387.  
  2388. # TAG: extension_methods
  2389. # Squid only knows about standardized HTTP request methods.
  2390. # You can add up to 20 additional "extension" methods here.
  2391. extension_methods REPORT MERGE MKACTIVITY CHECKOUT
  2392.  
  2393. # TAG: request_entities
  2394. # Squid defaults to deny GET and HEAD requests with request entities,
  2395. # as the meaning of such requests are undefined in the HTTP standard
  2396. # even if not explicitly forbidden.
  2397. #
  2398. # Set this directive to on if you have clients which insists
  2399. # on sending request entities in GET or HEAD requests. But be warned
  2400. # that there is server software (both proxies and web servers) which
  2401. # can fail to properly process this kind of request which may make you
  2402. # vulnerable to cache pollution attacks if enabled.
  2403. #
  2404. #Default:
  2405. # request_entities off
  2406.  
  2407. # TAG: header_access
  2408. # Usage: header_access header_name allow|deny [!]aclname ...
  2409. #
  2410. # WARNING: Doing this VIOLATES the HTTP standard. Enabling
  2411. # this feature could make you liable for problems which it
  2412. # causes.
  2413. #
  2414. # This option replaces the old 'anonymize_headers' and the
  2415. # older 'http_anonymizer' option with something that is much
  2416. # more configurable. This new method creates a list of ACLs
  2417. # for each header, allowing you very fine-tuned header
  2418. # mangling.
  2419. #
  2420. # You can only specify known headers for the header name.
  2421. # Other headers are reclassified as 'Other'. You can also
  2422. # refer to all the headers with 'All'.
  2423. #
  2424. # For example, to achieve the same behavior as the old
  2425. # 'http_anonymizer standard' option, you should use:
  2426. #
  2427. # header_access From deny all
  2428. # header_access Referer deny all
  2429. # header_access Server deny all
  2430. # header_access User-Agent deny all
  2431. # header_access WWW-Authenticate deny all
  2432. # header_access Link deny all
  2433. #
  2434. # Or, to reproduce the old 'http_anonymizer paranoid' feature
  2435. # you should use:
  2436. #
  2437. # header_access Allow allow all
  2438. # header_access Authorization allow all
  2439. # header_access WWW-Authenticate allow all
  2440. # header_access Proxy-Authorization allow all
  2441. # header_access Proxy-Authenticate allow all
  2442. # header_access Cache-Control allow all
  2443. # header_access Content-Encoding allow all
  2444. # header_access Content-Length allow all
  2445. # header_access Content-Type allow all
  2446. # header_access Date allow all
  2447. # header_access Expires allow all
  2448. # header_access Host allow all
  2449. # header_access If-Modified-Since allow all
  2450. # header_access Last-Modified allow all
  2451. # header_access Location allow all
  2452. # header_access Pragma allow all
  2453. # header_access Accept allow all
  2454. # header_access Accept-Charset allow all
  2455. # header_access Accept-Encoding allow all
  2456. # header_access Accept-Language allow all
  2457. # header_access Content-Language allow all
  2458. # header_access Mime-Version allow all
  2459. # header_access Retry-After allow all
  2460. # header_access Title allow all
  2461. # header_access Connection allow all
  2462. # header_access Proxy-Connection allow all
  2463. # header_access All deny all
  2464. #
  2465. # By default, all headers are allowed (no anonymizing is
  2466. # performed).
  2467. #
  2468. #Default:
  2469. # none
  2470.  
  2471. # TAG: header_replace
  2472. # Usage: header_replace header_name message
  2473. # Example: header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
  2474. #
  2475. # This option allows you to change the contents of headers
  2476. # denied with header_access above, by replacing them with
  2477. # some fixed string. This replaces the old fake_user_agent
  2478. # option.
  2479. #
  2480. # By default, headers are removed if denied.
  2481. #
  2482. #Default:
  2483. # none
  2484.  
  2485. # TAG: relaxed_header_parser on|off|warn
  2486. # In the default "on" setting Squid accepts certain forms
  2487. # of non-compliant HTTP messages where it is unambiguous
  2488. # what the sending application intended even if the message
  2489. # is not correctly formatted. The messages is then normalized
  2490. # to the correct form when forwarded by Squid.
  2491. #
  2492. # If set to "warn" then a warning will be emitted in cache.log
  2493. # each time such HTTP error is encountered.
  2494. #
  2495. # If set to "off" then such HTTP errors will cause the request
  2496. # or response to be rejected.
  2497. #
  2498. #Default:
  2499. # relaxed_header_parser on
  2500.  
  2501. # TAG: server_http11 on|off
  2502. # This option enables the use ot HTTP/1.1 on outgoing "direct" requests.
  2503. # See also the http11 cache_peer option.
  2504. # Note: The HTTP/1.1 support is still incomplete, with an
  2505. # internal HTTP/1.0 hop. As result 1xx responses will not
  2506. # be forwarded.
  2507. #
  2508. #Default:
  2509. # server_http11 off
  2510.  
  2511. # TAG: ignore_expect_100 on|off
  2512. # This option makes Squid ignore any Expect: 100-continue header present
  2513. # in the request.
  2514. # Note: Enabling this is a HTTP protocol violation, but some client may
  2515. # not handle it well..
  2516. #
  2517. #Default:
  2518. # ignore_expect_100 off
  2519.  
  2520. # TAG: external_refresh_check
  2521. # This option defines an external helper for determining whether to
  2522. # refresh a stale response. It will be called when Squid receives a
  2523. # request for a cached response that is stale; the helper can either
  2524. # confirm that the response is stale with a STALE response, or
  2525. # extend the freshness of the response (thereby avoiding a refresh
  2526. # check) with a FRESH response, along with a freshness=nnn keyword.
  2527. #
  2528. # external_refresh_check [options] FORMAT.. /path/to/helper [helper_args]
  2529. #
  2530. # If present, helper_args will be passed to the helper on the command
  2531. # line verbatim.
  2532. #
  2533. # Options:
  2534. #
  2535. # children=n Number of processes to spawn to service external
  2536. # refresh checks (default 5).
  2537. # concurrency=n Concurrency level per process. Only used with
  2538. # helpers capable of processing more than one query
  2539. # at a time.
  2540. #
  2541. # When using the concurrency option, the protocol is changed by introducing
  2542. # a query channel tag infront of the request/response. The query channel
  2543. # tag is a number between 0 and concurrency-1.
  2544. #
  2545. # FORMAT specifications:
  2546. #
  2547. # %CACHE_URI The URI of the cached response
  2548. # %RES{Header} HTTP response header value
  2549. # %AGE The age of the cached response
  2550. #
  2551. # The request sent to the helper consists of the data in the format
  2552. # specification in the order specified.
  2553. #
  2554. # The helper receives lines per the above format specification, and
  2555. # returns lines starting with OK or ERR indicating the validity of
  2556. # the request and optionally followed by additional keywords with
  2557. # more details. URL escaping is used to protect each value in both
  2558. # requests and responses.
  2559. #
  2560. # General result syntax:
  2561. #
  2562. # FRESH / STALE keyword=value ...
  2563. #
  2564. # Defined keywords:
  2565. #
  2566. # freshness=nnn The number of seconds to extend the freshness of
  2567. # the response by.
  2568. # log=string String to be logged in access.log. Available as
  2569. # %ef in logformat specifications.
  2570. # res{Header}=value
  2571. # Value to update response headers with. If already
  2572. # present, the supplied value completely replaces
  2573. # the cached value.
  2574. #
  2575. # In the event of a helper-related error (e.g., overload), Squid
  2576. # will always default to STALE.
  2577. #
  2578. #Default:
  2579. # none
  2580.  
  2581.  
  2582. # TIMEOUTS
  2583. # -----------------------------------------------------------------------------
  2584.  
  2585. # TAG: forward_timeout time-units
  2586. # This parameter specifies how long Squid should at most attempt in
  2587. # finding a forwarding path for the request before giving up.
  2588. #
  2589. #Default:
  2590. # forward_timeout 4 minutes
  2591.  
  2592. # TAG: connect_timeout time-units
  2593. # This parameter specifies how long to wait for the TCP connect to
  2594. # the requested server or peer to complete before Squid should
  2595. # attempt to find another path where to forward the request.
  2596. #
  2597. #Default:
  2598. # connect_timeout 1 minute
  2599.  
  2600. # TAG: peer_connect_timeout time-units
  2601. # This parameter specifies how long to wait for a pending TCP
  2602. # connection to a peer cache. The default is 30 seconds. You
  2603. # may also set different timeout values for individual neighbors
  2604. # with the 'connect-timeout' option on a 'cache_peer' line.
  2605. #
  2606. #Default:
  2607. # peer_connect_timeout 30 seconds
  2608.  
  2609. # TAG: read_timeout time-units
  2610. # The read_timeout is applied on server-side connections. After
  2611. # each successful read(), the timeout will be extended by this
  2612. # amount. If no data is read again after this amount of time,
  2613. # the request is aborted and logged with ERR_READ_TIMEOUT. The
  2614. # default is 15 minutes.
  2615. #
  2616. #Default:
  2617. # read_timeout 15 minutes
  2618.  
  2619. # TAG: request_timeout
  2620. # How long to wait for an HTTP request after initial
  2621. # connection establishment.
  2622. #
  2623. #Default:
  2624. # request_timeout 5 minutes
  2625.  
  2626. # TAG: persistent_request_timeout
  2627. # How long to wait for the next HTTP request on a persistent
  2628. # connection after the previous request completes.
  2629. #
  2630. #Default:
  2631. # persistent_request_timeout 2 minutes
  2632.  
  2633. # TAG: client_lifetime time-units
  2634. # The maximum amount of time a client (browser) is allowed to
  2635. # remain connected to the cache process. This protects the Cache
  2636. # from having a lot of sockets (and hence file descriptors) tied up
  2637. # in a CLOSE_WAIT state from remote clients that go away without
  2638. # properly shutting down (either because of a network failure or
  2639. # because of a poor client implementation). The default is one
  2640. # day, 1440 minutes.
  2641. #
  2642. # NOTE: The default value is intended to be much larger than any
  2643. # client would ever need to be connected to your cache. You
  2644. # should probably change client_lifetime only as a last resort.
  2645. # If you seem to have many client connections tying up
  2646. # filedescriptors, we recommend first tuning the read_timeout,
  2647. # request_timeout, persistent_request_timeout and quick_abort values.
  2648. #
  2649. #Default:
  2650. # client_lifetime 1 day
  2651.  
  2652. # TAG: half_closed_clients
  2653. # Some clients may shutdown the sending side of their TCP
  2654. # connections, while leaving their receiving sides open. Sometimes,
  2655. # Squid can not tell the difference between a half-closed and a
  2656. # fully-closed TCP connection. By default, half-closed client
  2657. # connections are kept open until a read(2) or write(2) on the
  2658. # socket returns an error. Change this option to 'off' and Squid
  2659. # will immediately close client connections when read(2) returns
  2660. # "no more data to read."
  2661. #
  2662. #Default:
  2663. # half_closed_clients on
  2664.  
  2665. # TAG: pconn_timeout
  2666. # Timeout for idle persistent connections to servers and other
  2667. # proxies.
  2668. #
  2669. #Default:
  2670. # pconn_timeout 1 minute
  2671.  
  2672. # TAG: ident_timeout
  2673. # Maximum time to wait for IDENT lookups to complete.
  2674. #
  2675. # If this is too high, and you enabled IDENT lookups from untrusted
  2676. # users, you might be susceptible to denial-of-service by having
  2677. # many ident requests going at once.
  2678. #
  2679. #Default:
  2680. # ident_timeout 10 seconds
  2681.  
  2682. # TAG: shutdown_lifetime time-units
  2683. # When SIGTERM or SIGHUP is received, the cache is put into
  2684. # "shutdown pending" mode until all active sockets are closed.
  2685. # This value is the lifetime to set for all open descriptors
  2686. # during shutdown mode. Any active clients after this many
  2687. # seconds will receive a 'timeout' message.
  2688. #
  2689. #Default:
  2690. # shutdown_lifetime 30 seconds
  2691.  
  2692.  
  2693. # ADMINISTRATIVE PARAMETERS
  2694. # -----------------------------------------------------------------------------
  2695.  
  2696. # TAG: cache_mgr
  2697. # Email-address of local cache manager who will receive
  2698. # mail if the cache dies. The default is "webmaster".
  2699. #
  2700. #Default:
  2701. # cache_mgr webmaster
  2702.  
  2703. # TAG: mail_from
  2704. # From: email-address for mail sent when the cache dies.
  2705. # The default is to use 'appname@unique_hostname'.
  2706. # Default appname value is "squid", can be changed into
  2707. # src/globals.h before building squid.
  2708. #
  2709. #Default:
  2710. # none
  2711.  
  2712. # TAG: mail_program
  2713. # Email program used to send mail if the cache dies.
  2714. # The default is "mail". The specified program must comply
  2715. # with the standard Unix mail syntax:
  2716. # mail-program recipient < mailfile
  2717. #
  2718. # Optional command line options can be specified.
  2719. #
  2720. #Default:
  2721. # mail_program mail
  2722.  
  2723. # TAG: cache_effective_user
  2724. # If you start Squid as root, it will change its effective/real
  2725. # UID/GID to the user specified below. The default is to change
  2726. # to UID to proxy. If you define cache_effective_user, but not
  2727. # cache_effective_group, Squid sets the GID to the effective
  2728. # user's default group ID (taken from the password file) and
  2729. # supplementary group list from the from groups membership of
  2730. # cache_effective_user.
  2731. #
  2732. #Default:
  2733. # cache_effective_user proxy
  2734.  
  2735. # TAG: cache_effective_group
  2736. # If you want Squid to run with a specific GID regardless of
  2737. # the group memberships of the effective user then set this
  2738. # to the group (or GID) you want Squid to run as. When set
  2739. # all other group privileges of the effective user is ignored
  2740. # and only this GID is effective. If Squid is not started as
  2741. # root the user starting Squid must be member of the specified
  2742. # group.
  2743. #
  2744. #Default:
  2745. # none
  2746.  
  2747. # TAG: httpd_suppress_version_string on|off
  2748. # Suppress Squid version string info in HTTP headers and HTML error pages.
  2749. #
  2750. #Default:
  2751. # httpd_suppress_version_string off
  2752.  
  2753. # TAG: visible_hostname
  2754. # If you want to present a special hostname in error messages, etc,
  2755. # define this. Otherwise, the return value of gethostname()
  2756. # will be used. If you have multiple caches in a cluster and
  2757. # get errors about IP-forwarding you must set them to have individual
  2758. # names with this setting.
  2759. #
  2760. #Default:
  2761. visible_hostname gw-new
  2762.  
  2763. # TAG: unique_hostname
  2764. # If you want to have multiple machines with the same
  2765. # 'visible_hostname' you must give each machine a different
  2766. # 'unique_hostname' so forwarding loops can be detected.
  2767. #
  2768. #Default:
  2769. # none
  2770.  
  2771. # TAG: hostname_aliases
  2772. # A list of other DNS names your cache has.
  2773. #
  2774. #Default:
  2775. # none
  2776.  
  2777. # TAG: umask
  2778. # Minimum umask which should be enforced while the proxy
  2779. # is running, in addition to the umask set at startup.
  2780. #
  2781. # Note: Should start with a 0 to indicate the normal octal
  2782. # representation of umasks
  2783. #
  2784. #Default:
  2785. # umask 027
  2786.  
  2787.  
  2788. # OPTIONS FOR THE CACHE REGISTRATION SERVICE
  2789. # -----------------------------------------------------------------------------
  2790. #
  2791. # This section contains parameters for the (optional) cache
  2792. # announcement service. This service is provided to help
  2793. # cache administrators locate one another in order to join or
  2794. # create cache hierarchies.
  2795. #
  2796. # An 'announcement' message is sent (via UDP) to the registration
  2797. # service by Squid. By default, the announcement message is NOT
  2798. # SENT unless you enable it with 'announce_period' below.
  2799. #
  2800. # The announcement message includes your hostname, plus the
  2801. # following information from this configuration file:
  2802. #
  2803. # http_port
  2804. # icp_port
  2805. # cache_mgr
  2806. #
  2807. # All current information is processed regularly and made
  2808. # available on the Web at http://www.ircache.net/Cache/Tracker/.
  2809.  
  2810. # TAG: announce_period
  2811. # This is how frequently to send cache announcements. The
  2812. # default is `0' which disables sending the announcement
  2813. # messages.
  2814. #
  2815. # To enable announcing your cache, just uncomment the line
  2816. # below.
  2817. #
  2818. #Default:
  2819. # announce_period 0
  2820. #
  2821. #To enable announcing your cache, just uncomment the line below.
  2822. #announce_period 1 day
  2823.  
  2824. # TAG: announce_host
  2825. # TAG: announce_file
  2826. # TAG: announce_port
  2827. # announce_host and announce_port set the hostname and port
  2828. # number where the registration message will be sent.
  2829. #
  2830. # Hostname will default to 'tracker.ircache.net' and port will
  2831. # default default to 3131. If the 'filename' argument is given,
  2832. # the contents of that file will be included in the announce
  2833. # message.
  2834. #
  2835. #Default:
  2836. # announce_host tracker.ircache.net
  2837. # announce_port 3131
  2838.  
  2839.  
  2840. # HTTPD-ACCELERATOR OPTIONS
  2841. # -----------------------------------------------------------------------------
  2842.  
  2843. # TAG: httpd_accel_no_pmtu_disc on|off
  2844. # In many setups of transparently intercepting proxies Path-MTU
  2845. # discovery can not work on traffic towards the clients. This is
  2846. # the case when the intercepting device does not fully track
  2847. # connections and fails to forward ICMP must fragment messages
  2848. # to the cache server.
  2849. #
  2850. # If you have such setup and experience that certain clients
  2851. # sporadically hang or never complete requests set this to on.
  2852. #
  2853. #Default:
  2854. # httpd_accel_no_pmtu_disc off
  2855.  
  2856.  
  2857. # DELAY POOL PARAMETERS
  2858. # -----------------------------------------------------------------------------
  2859.  
  2860. # TAG: delay_pools
  2861. # This represents the number of delay pools to be used. For example,
  2862. # if you have one class 2 delay pool and one class 3 delays pool, you
  2863. # have a total of 2 delay pools.
  2864. #
  2865. #Default:
  2866. # delay_pools 0
  2867.  
  2868. # TAG: delay_class
  2869. delay_pools 1
  2870. delay_class 1 2
  2871. delay_access 1 allow _sams_default
  2872. delay_access 1 deny all
  2873. delay_parameters 1 64000/64000 64000/64000
  2874. # This defines the class of each delay pool. There must be exactly one
  2875. # delay_class line for each delay pool. For example, to define two
  2876. # delay pools, one of class 2 and one of class 3, the settings above
  2877. # and here would be:
  2878. #
  2879. #Example:
  2880. # delay_pools 2 # 2 delay pools
  2881. # delay_class 1 2 # pool 1 is a class 2 pool
  2882. # delay_class 2 3 # pool 2 is a class 3 pool
  2883. #
  2884. # The delay pool classes are:
  2885. #
  2886. # class 1 Everything is limited by a single aggregate
  2887. # bucket.
  2888. #
  2889. # class 2 Everything is limited by a single aggregate
  2890. # bucket as well as an "individual" bucket chosen
  2891. # from bits 25 through 32 of the IP address.
  2892. #
  2893. # class 3 Everything is limited by a single aggregate
  2894. # bucket as well as a "network" bucket chosen
  2895. # from bits 17 through 24 of the IP address and a
  2896. # "individual" bucket chosen from bits 17 through
  2897. # 32 of the IP address.
  2898. #
  2899. # NOTE: If an IP address is a.b.c.d
  2900. # -> bits 25 through 32 are "d"
  2901. # -> bits 17 through 24 are "c"
  2902. # -> bits 17 through 32 are "c * 256 + d"
  2903. #
  2904. #Default:
  2905. # none
  2906.  
  2907. # TAG: delay_access
  2908. # This is used to determine which delay pool a request falls into.
  2909. #
  2910. # delay_access is sorted per pool and the matching starts with pool 1,
  2911. # then pool 2, ..., and finally pool N. The first delay pool where the
  2912. # request is allowed is selected for the request. If it does not allow
  2913. # the request to any pool then the request is not delayed (default).
  2914. #
  2915. # For example, if you want some_big_clients in delay
  2916. # pool 1 and lotsa_little_clients in delay pool 2:
  2917. #
  2918. #Example:
  2919. # delay_access 1 allow some_big_clients
  2920. # delay_access 1 deny all
  2921. # delay_access 2 allow lotsa_little_clients
  2922. # delay_access 2 deny all
  2923. #
  2924. #Default:
  2925. # none
  2926.  
  2927. # TAG: delay_parameters
  2928. # This defines the parameters for a delay pool. Each delay pool has
  2929. # a number of "buckets" associated with it, as explained in the
  2930. # description of delay_class. For a class 1 delay pool, the syntax is:
  2931. #
  2932. #delay_parameters pool aggregate
  2933. #
  2934. # For a class 2 delay pool:
  2935. #
  2936. #delay_parameters pool aggregate individual
  2937. #
  2938. # For a class 3 delay pool:
  2939. #
  2940. #delay_parameters pool aggregate network individual
  2941. #
  2942. # The variables here are:
  2943. #
  2944. # pool a pool number - ie, a number between 1 and the
  2945. # number specified in delay_pools as used in
  2946. # delay_class lines.
  2947. #
  2948. # aggregate the "delay parameters" for the aggregate bucket
  2949. # (class 1, 2, 3).
  2950. #
  2951. # individual the "delay parameters" for the individual
  2952. # buckets (class 2, 3).
  2953. #
  2954. # network the "delay parameters" for the network buckets
  2955. # (class 3).
  2956. #
  2957. # A pair of delay parameters is written restore/maximum, where restore is
  2958. # the number of bytes (not bits - modem and network speeds are usually
  2959. # quoted in bits) per second placed into the bucket, and maximum is the
  2960. # maximum number of bytes which can be in the bucket at any time.
  2961. #
  2962. # For example, if delay pool number 1 is a class 2 delay pool as in the
  2963. # above example, and is being used to strictly limit each host to 64kbps
  2964. # (plus overheads), with no overall limit, the line is:
  2965. #
  2966. #delay_parameters 1 -1/-1 8000/8000
  2967. #
  2968. # Note that the figure -1 is used to represent "unlimited".
  2969. #
  2970. # And, if delay pool number 2 is a class 3 delay pool as in the above
  2971. # example, and you want to limit it to a total of 256kbps (strict limit)
  2972. # with each 8-bit network permitted 64kbps (strict limit) and each
  2973. # individual host permitted 4800bps with a bucket maximum size of 64kb
  2974. # to permit a decent web page to be downloaded at a decent speed
  2975. # (if the network is not being limited due to overuse) but slow down
  2976. # large downloads more significantly:
  2977. #
  2978. #delay_parameters 2 32000/32000 8000/8000 600/8000
  2979. #
  2980. # There must be one delay_parameters line for each delay pool.
  2981. #
  2982. #Default:
  2983. # none
  2984.  
  2985. # TAG: delay_initial_bucket_level (percent, 0-100)
  2986. # The initial bucket percentage is used to determine how much is put
  2987. # in each bucket when squid starts, is reconfigured, or first notices
  2988. # a host accessing it (in class 2 and class 3, individual hosts and
  2989. # networks only have buckets associated with them once they have been
  2990. # "seen" by squid).
  2991. #
  2992. #Default:
  2993. # delay_initial_bucket_level 50
  2994.  
  2995.  
  2996. # WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
  2997. # -----------------------------------------------------------------------------
  2998.  
  2999. # TAG: wccp_router
  3000. # TAG: wccp2_router
  3001. # Use this option to define your WCCP ``home'' router for
  3002. # Squid.
  3003. #
  3004. # wccp_router supports a single WCCP(v1) router
  3005. #
  3006. # wccp2_router supports multiple WCCPv2 routers
  3007. #
  3008. # only one of the two may be used at the same time and defines
  3009. # which version of WCCP to use.
  3010. #
  3011. #Default:
  3012. # wccp_router 0.0.0.0
  3013.  
  3014. # TAG: wccp_version
  3015. # This directive is only relevant if you need to set up WCCP(v1)
  3016. # to some very old and end-of-life Cisco routers. In all other
  3017. # setups it must be left unset or at the default setting.
  3018. # It defines an internal version in the WCCP(v1) protocol,
  3019. # with version 4 being the officially documented protocol.
  3020. #
  3021. # According to some users, Cisco IOS 11.2 and earlier only
  3022. # support WCCP version 3. If you're using that or an earlier
  3023. # version of IOS, you may need to change this value to 3, otherwise
  3024. # do not specify this parameter.
  3025. #
  3026. #Default:
  3027. # wccp_version 4
  3028.  
  3029. # TAG: wccp2_rebuild_wait
  3030. # If this is enabled Squid will wait for the cache dir rebuild to finish
  3031. # before sending the first wccp2 HereIAm packet
  3032. #
  3033. #Default:
  3034. # wccp2_rebuild_wait on
  3035.  
  3036. # TAG: wccp2_forwarding_method
  3037. # WCCP2 allows the setting of forwarding methods between the
  3038. # router/switch and the cache. Valid values are as follows:
  3039. #
  3040. # 1 - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
  3041. # 2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
  3042. #
  3043. # Currently (as of IOS 12.4) cisco routers only support GRE.
  3044. # Cisco switches only support the L2 redirect assignment method.
  3045. #
  3046. #Default:
  3047. # wccp2_forwarding_method 1
  3048.  
  3049. # TAG: wccp2_return_method
  3050. # WCCP2 allows the setting of return methods between the
  3051. # router/switch and the cache for packets that the cache
  3052. # decides not to handle. Valid values are as follows:
  3053. #
  3054. # 1 - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
  3055. # 2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
  3056. #
  3057. # Currently (as of IOS 12.4) cisco routers only support GRE.
  3058. # Cisco switches only support the L2 redirect assignment.
  3059. #
  3060. # If the "ip wccp redirect exclude in" command has been
  3061. # enabled on the cache interface, then it is still safe for
  3062. # the proxy server to use a l2 redirect method even if this
  3063. # option is set to GRE.
  3064. #
  3065. #Default:
  3066. # wccp2_return_method 1
  3067.  
  3068. # TAG: wccp2_assignment_method
  3069. # WCCP2 allows the setting of methods to assign the WCCP hash
  3070. # Valid values are as follows:
  3071. #
  3072. # 1 - Hash assignment
  3073. # 2 - Mask assignment
  3074. #
  3075. # As a general rule, cisco routers support the hash assignment method
  3076. # and cisco switches support the mask assignment method.
  3077. #
  3078. #Default:
  3079. # wccp2_assignment_method 1
  3080.  
  3081. # TAG: wccp2_service
  3082. # WCCP2 allows for multiple traffic services. There are two
  3083. # types: "standard" and "dynamic". The standard type defines
  3084. # one service id - http (id 0). The dynamic service ids can be from
  3085. # 51 to 255 inclusive. In order to use a dynamic service id
  3086. # one must define the type of traffic to be redirected; this is done
  3087. # using the wccp2_service_info option.
  3088. #
  3089. # The "standard" type does not require a wccp2_service_info option,
  3090. # just specifying the service id will suffice.
  3091. #
  3092. # MD5 service authentication can be enabled by adding
  3093. # "password=<password>" to the end of this service declaration.
  3094. #
  3095. # Examples:
  3096. #
  3097. # wccp2_service standard 0 # for the 'web-cache' standard service
  3098. # wccp2_service dynamic 80 # a dynamic service type which will be
  3099. # # fleshed out with subsequent options.
  3100. # wccp2_service standard 0 password=foo
  3101. #
  3102. #
  3103. #Default:
  3104. # wccp2_service standard 0
  3105.  
  3106. # TAG: wccp2_service_info
  3107. # Dynamic WCCPv2 services require further information to define the
  3108. # traffic you wish to have diverted.
  3109. #
  3110. # The format is:
  3111. #
  3112. # wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
  3113. # priority=<priority> ports=<port>,<port>..
  3114. #
  3115. # The relevant WCCPv2 flags:
  3116. # + src_ip_hash, dst_ip_hash
  3117. # + source_port_hash, dst_port_hash
  3118. # + src_ip_alt_hash, dst_ip_alt_hash
  3119. # + src_port_alt_hash, dst_port_alt_hash
  3120. # + ports_source
  3121. #
  3122. # The port list can be one to eight entries.
  3123. #
  3124. # Example:
  3125. #
  3126. # wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
  3127. # priority=240 ports=80
  3128. #
  3129. # Note: the service id must have been defined by a previous
  3130. # 'wccp2_service dynamic <id>' entry.
  3131. #
  3132. #Default:
  3133. # none
  3134.  
  3135. # TAG: wccp2_weight
  3136. # Each cache server gets assigned a set of the destination
  3137. # hash proportional to their weight.
  3138. #
  3139. #Default:
  3140. # wccp2_weight 10000
  3141.  
  3142. # TAG: wccp_address
  3143. # TAG: wccp2_address
  3144. # Use this option if you require WCCP to use a specific
  3145. # interface address.
  3146. #
  3147. # The default behavior is to not bind to any specific address.
  3148. #
  3149. #Default:
  3150. # wccp_address 0.0.0.0
  3151. # wccp2_address 0.0.0.0
  3152.  
  3153.  
  3154. # PERSISTENT CONNECTION HANDLING
  3155. # -----------------------------------------------------------------------------
  3156. #
  3157. # Also see "pconn_timeout" in the TIMEOUTS section
  3158.  
  3159. # TAG: client_persistent_connections
  3160. # TAG: server_persistent_connections
  3161. # Persistent connection support for clients and servers. By
  3162. # default, Squid uses persistent connections (when allowed)
  3163. # with its clients and servers. You can use these options to
  3164. # disable persistent connections with clients and/or servers.
  3165. #
  3166. #Default:
  3167. # client_persistent_connections on
  3168. # server_persistent_connections on
  3169.  
  3170. # TAG: persistent_connection_after_error
  3171. # With this directive the use of persistent connections after
  3172. # HTTP errors can be disabled. Useful if you have clients
  3173. # who fail to handle errors on persistent connections proper.
  3174. #
  3175. #Default:
  3176. # persistent_connection_after_error off
  3177.  
  3178. # TAG: detect_broken_pconn
  3179. # Some servers have been found to incorrectly signal the use
  3180. # of HTTP/1.0 persistent connections even on replies not
  3181. # compatible, causing significant delays. This server problem
  3182. # has mostly been seen on redirects.
  3183. #
  3184. # By enabling this directive Squid attempts to detect such
  3185. # broken replies and automatically assume the reply is finished
  3186. # after 10 seconds timeout.
  3187. #
  3188. #Default:
  3189. # detect_broken_pconn off
  3190.  
  3191.  
  3192. # CACHE DIGEST OPTIONS
  3193. # -----------------------------------------------------------------------------
  3194.  
  3195. # TAG: digest_generation
  3196. # This controls whether the server will generate a Cache Digest
  3197. # of its contents.
  3198. #
  3199. #Default:
  3200. # digest_generation on
  3201.  
  3202. # TAG: digest_bits_per_entry
  3203. # This is the number of bits of the server's Cache Digest which
  3204. # will be associated with the Digest entry for a given HTTP
  3205. # Method and URL (public key) combination. The default is 5.
  3206. #
  3207. #Default:
  3208. # digest_bits_per_entry 5
  3209.  
  3210. # TAG: digest_rebuild_period (seconds)
  3211. # This is the wait time between Cache Digest rebuilds.
  3212. #
  3213. #Default:
  3214. # digest_rebuild_period 1 hour
  3215.  
  3216. # TAG: digest_rewrite_period (seconds)
  3217. # This is the wait time between Cache Digest writes to disk.
  3218. #
  3219. #Default:
  3220. # digest_rewrite_period 1 hour
  3221.  
  3222. # TAG: digest_swapout_chunk_size (bytes)
  3223. # This is the number of bytes of the Cache Digest to write to
  3224. # disk at a time. It defaults to 4096 bytes (4KB), the Squid
  3225. # default swap page.
  3226. #
  3227. #Default:
  3228. # digest_swapout_chunk_size 4096 bytes
  3229.  
  3230. # TAG: digest_rebuild_chunk_percentage (percent, 0-100)
  3231. # This is the percentage of the Cache Digest to be scanned at a
  3232. # time. By default it is set to 10% of the Cache Digest.
  3233. #
  3234. #Default:
  3235. # digest_rebuild_chunk_percentage 10
  3236.  
  3237.  
  3238. # SNMP OPTIONS
  3239. # -----------------------------------------------------------------------------
  3240.  
  3241. # TAG: snmp_port
  3242. # Squid can now serve statistics and status information via SNMP.
  3243. # By default it listens to port 3401 on the machine. If you don't
  3244. # wish to use SNMP, set this to "0".
  3245. #
  3246. # Note: on Debian/Linux, the default is zero - you need to
  3247. # set it to 3401 to enable it.
  3248. #
  3249. #Default:
  3250. # snmp_port 0
  3251.  
  3252. # TAG: snmp_access
  3253. # Allowing or denying access to the SNMP port.
  3254. #
  3255. # All access to the agent is denied by default.
  3256. # usage:
  3257. #
  3258. # snmp_access allow|deny [!]aclname ...
  3259. #
  3260. #Example:
  3261. # snmp_access allow snmppublic localhost
  3262. # snmp_access deny all
  3263. #
  3264. #Default:
  3265. # snmp_access deny all
  3266.  
  3267. # TAG: snmp_incoming_address
  3268. # TAG: snmp_outgoing_address
  3269. # Just like 'udp_incoming_address' above, but for the SNMP port.
  3270. #
  3271. # snmp_incoming_address is used for the SNMP socket receiving
  3272. # messages from SNMP agents.
  3273. # snmp_outgoing_address is used for SNMP packets returned to SNMP
  3274. # agents.
  3275. #
  3276. # The default snmp_incoming_address (0.0.0.0) is to listen on all
  3277. # available network interfaces.
  3278. #
  3279. # If snmp_outgoing_address is set to 255.255.255.255 (the default)
  3280. # it will use the same socket as snmp_incoming_address. Only
  3281. # change this if you want to have SNMP replies sent using another
  3282. # address than where this Squid listens for SNMP queries.
  3283. #
  3284. # NOTE, snmp_incoming_address and snmp_outgoing_address can not have
  3285. # the same value since they both use port 3401.
  3286. #
  3287. #Default:
  3288. # snmp_incoming_address 0.0.0.0
  3289. # snmp_outgoing_address 255.255.255.255
  3290.  
  3291.  
  3292. # ICP OPTIONS
  3293. # -----------------------------------------------------------------------------
  3294.  
  3295. # TAG: icp_port
  3296. # The port number where Squid sends and receives ICP queries to
  3297. # and from neighbor caches. Default is 3130. To disable use
  3298. # "0". May be overridden with -u on the command line.
  3299. #
  3300. #Default:
  3301. icp_port 0
  3302.  
  3303. # TAG: htcp_port
  3304. # The port number where Squid sends and receives HTCP queries to
  3305. # and from neighbor caches. To turn it on you want to set it 4827.
  3306. # By default it is set to "0" (disabled).
  3307. #
  3308. #Default:
  3309. # htcp_port 0
  3310.  
  3311. # TAG: log_icp_queries on|off
  3312. # If set, ICP queries are logged to access.log. You may wish
  3313. # do disable this if your ICP load is VERY high to speed things
  3314. # up or to simplify log analysis.
  3315. #
  3316. #Default:
  3317. # log_icp_queries on
  3318.  
  3319. # TAG: udp_incoming_address
  3320. # udp_incoming_address is used for UDP packets received from other
  3321. # caches.
  3322. #
  3323. # The default behavior is to not bind to any specific address.
  3324. #
  3325. # Only change this if you want to have all UDP queries received on
  3326. # a specific interface/address.
  3327. #
  3328. # NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS
  3329. # modules. Altering it will affect all of them in the same manner.
  3330. #
  3331. # see also; udp_outgoing_address
  3332. #
  3333. # NOTE, udp_incoming_address and udp_outgoing_address can not
  3334. # have the same value since they both use the same port.
  3335. #
  3336. #Default:
  3337. # udp_incoming_address 0.0.0.0
  3338.  
  3339. # TAG: udp_outgoing_address
  3340. # udp_outgoing_address is used for UDP packets sent out to other
  3341. # caches.
  3342. #
  3343. # The default behavior is to not bind to any specific address.
  3344. #
  3345. # Instead it will use the same socket as udp_incoming_address.
  3346. # Only change this if you want to have UDP queries sent using another
  3347. # address than where this Squid listens for UDP queries from other
  3348. # caches.
  3349. #
  3350. # NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS
  3351. # modules. Altering it will affect all of them in the same manner.
  3352. #
  3353. # see also; udp_incoming_address
  3354. #
  3355. # NOTE, udp_incoming_address and udp_outgoing_address can not
  3356. # have the same value since they both use the same port.
  3357. #
  3358. #Default:
  3359. # udp_outgoing_address 255.255.255.255
  3360.  
  3361. # TAG: icp_hit_stale on|off
  3362. # If you want to return ICP_HIT for stale cache objects, set this
  3363. # option to 'on'. If you have sibling relationships with caches
  3364. # in other administrative domains, this should be 'off'. If you only
  3365. # have sibling relationships with caches under your control,
  3366. # it is probably okay to set this to 'on'.
  3367. # If set to 'on', your siblings should use the option "allow-miss"
  3368. # on their cache_peer lines for connecting to you.
  3369. #
  3370. #Default:
  3371. # icp_hit_stale off
  3372.  
  3373. # TAG: minimum_direct_hops
  3374. # If using the ICMP pinging stuff, do direct fetches for sites
  3375. # which are no more than this many hops away.
  3376. #
  3377. #Default:
  3378. # minimum_direct_hops 4
  3379.  
  3380. # TAG: minimum_direct_rtt
  3381. # If using the ICMP pinging stuff, do direct fetches for sites
  3382. # which are no more than this many rtt milliseconds away.
  3383. #
  3384. #Default:
  3385. # minimum_direct_rtt 400
  3386.  
  3387. # TAG: netdb_low
  3388. # TAG: netdb_high
  3389. # The low and high water marks for the ICMP measurement
  3390. # database. These are counts, not percents. The defaults are
  3391. # 900 and 1000. When the high water mark is reached, database
  3392. # entries will be deleted until the low mark is reached.
  3393. #
  3394. #Default:
  3395. # netdb_low 900
  3396. # netdb_high 1000
  3397.  
  3398. # TAG: netdb_ping_period
  3399. # The minimum period for measuring a site. There will be at
  3400. # least this much delay between successive pings to the same
  3401. # network. The default is five minutes.
  3402. #
  3403. #Default:
  3404. # netdb_ping_period 5 minutes
  3405.  
  3406. # TAG: query_icmp on|off
  3407. # If you want to ask your peers to include ICMP data in their ICP
  3408. # replies, enable this option.
  3409. #
  3410. # If your peer has configured Squid (during compilation) with
  3411. # '--enable-icmp' that peer will send ICMP pings to origin server
  3412. # sites of the URLs it receives. If you enable this option the
  3413. # ICP replies from that peer will include the ICMP data (if available).
  3414. # Then, when choosing a parent cache, Squid will choose the parent with
  3415. # the minimal RTT to the origin server. When this happens, the
  3416. # hierarchy field of the access.log will be
  3417. # "CLOSEST_PARENT_MISS". This option is off by default.
  3418. #
  3419. #Default:
  3420. # query_icmp off
  3421.  
  3422. # TAG: test_reachability on|off
  3423. # When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
  3424. # instead of ICP_MISS if the target host is NOT in the ICMP
  3425. # database, or has a zero RTT.
  3426. #
  3427. #Default:
  3428. # test_reachability off
  3429.  
  3430. # TAG: icp_query_timeout (msec)
  3431. # Normally Squid will automatically determine an optimal ICP
  3432. # query timeout value based on the round-trip-time of recent ICP
  3433. # queries. If you want to override the value determined by
  3434. # Squid, set this 'icp_query_timeout' to a non-zero value. This
  3435. # value is specified in MILLISECONDS, so, to use a 2-second
  3436. # timeout (the old default), you would write:
  3437. #
  3438. # icp_query_timeout 2000
  3439. #
  3440. #Default:
  3441. # icp_query_timeout 0
  3442.  
  3443. # TAG: maximum_icp_query_timeout (msec)
  3444. # Normally the ICP query timeout is determined dynamically. But
  3445. # sometimes it can lead to very large values (say 5 seconds).
  3446. # Use this option to put an upper limit on the dynamic timeout
  3447. # value. Do NOT use this option to always use a fixed (instead
  3448. # of a dynamic) timeout value. To set a fixed timeout see the
  3449. # 'icp_query_timeout' directive.
  3450. #
  3451. #Default:
  3452. # maximum_icp_query_timeout 2000
  3453.  
  3454. # TAG: minimum_icp_query_timeout (msec)
  3455. # Normally the ICP query timeout is determined dynamically. But
  3456. # sometimes it can lead to very small timeouts, even lower than
  3457. # the normal latency variance on your link due to traffic.
  3458. # Use this option to put an lower limit on the dynamic timeout
  3459. # value. Do NOT use this option to always use a fixed (instead
  3460. # of a dynamic) timeout value. To set a fixed timeout see the
  3461. # 'icp_query_timeout' directive.
  3462. #
  3463. #Default:
  3464. # minimum_icp_query_timeout 5
  3465.  
  3466.  
  3467. # MULTICAST ICP OPTIONS
  3468. # -----------------------------------------------------------------------------
  3469.  
  3470. # TAG: mcast_groups
  3471. # This tag specifies a list of multicast groups which your server
  3472. # should join to receive multicasted ICP queries.
  3473. #
  3474. # NOTE! Be very careful what you put here! Be sure you
  3475. # understand the difference between an ICP _query_ and an ICP
  3476. # _reply_. This option is to be set only if you want to RECEIVE
  3477. # multicast queries. Do NOT set this option to SEND multicast
  3478. # ICP (use cache_peer for that). ICP replies are always sent via
  3479. # unicast, so this option does not affect whether or not you will
  3480. # receive replies from multicast group members.
  3481. #
  3482. # You must be very careful to NOT use a multicast address which
  3483. # is already in use by another group of caches.
  3484. #
  3485. # If you are unsure about multicast, please read the Multicast
  3486. # chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
  3487. #
  3488. # Usage: mcast_groups 239.128.16.128 224.0.1.20
  3489. #
  3490. # By default, Squid doesn't listen on any multicast groups.
  3491. #
  3492. #Default:
  3493. # none
  3494.  
  3495. # TAG: mcast_miss_addr
  3496. # Note: This option is only available if Squid is rebuilt with the
  3497. # --enable-multicast-miss option
  3498. #
  3499. # If you enable this option, every "cache miss" URL will
  3500. # be sent out on the specified multicast address.
  3501. #
  3502. # Do not enable this option unless you are are absolutely
  3503. # certain you understand what you are doing.
  3504. #
  3505. #Default:
  3506. # mcast_miss_addr 255.255.255.255
  3507.  
  3508. # TAG: mcast_miss_ttl
  3509. # Note: This option is only available if Squid is rebuilt with the
  3510. # --enable-multicast-miss option
  3511. #
  3512. # This is the time-to-live value for packets multicasted
  3513. # when multicasting off cache miss URLs is enabled. By
  3514. # default this is set to 'site scope', i.e. 16.
  3515. #
  3516. #Default:
  3517. # mcast_miss_ttl 16
  3518.  
  3519. # TAG: mcast_miss_port
  3520. # Note: This option is only available if Squid is rebuilt with the
  3521. # --enable-multicast-miss option
  3522. #
  3523. # This is the port number to be used in conjunction with
  3524. # 'mcast_miss_addr'.
  3525. #
  3526. #Default:
  3527. # mcast_miss_port 3135
  3528.  
  3529. # TAG: mcast_miss_encode_key
  3530. # Note: This option is only available if Squid is rebuilt with the
  3531. # --enable-multicast-miss option
  3532. #
  3533. # The URLs that are sent in the multicast miss stream are
  3534. # encrypted. This is the encryption key.
  3535. #
  3536. #Default:
  3537. # mcast_miss_encode_key XXXXXXXXXXXXXXXX
  3538.  
  3539. # TAG: mcast_icp_query_timeout (msec)
  3540. # For multicast peers, Squid regularly sends out ICP "probes" to
  3541. # count how many other peers are listening on the given multicast
  3542. # address. This value specifies how long Squid should wait to
  3543. # count all the replies. The default is 2000 msec, or 2
  3544. # seconds.
  3545. #
  3546. #Default:
  3547. # mcast_icp_query_timeout 2000
  3548.  
  3549.  
  3550. # INTERNAL ICON OPTIONS
  3551. # -----------------------------------------------------------------------------
  3552.  
  3553. # TAG: icon_directory
  3554. # Where the icons are stored. These are normally kept in
  3555. # /usr/share/squid/icons
  3556. #
  3557. #Default:
  3558. # icon_directory /usr/share/squid/icons
  3559.  
  3560. # TAG: global_internal_static
  3561. # This directive controls is Squid should intercept all requests for
  3562. # /squid-internal-static/ no matter which host the URL is requesting
  3563. # (default on setting), or if nothing special should be done for
  3564. # such URLs (off setting). The purpose of this directive is to make
  3565. # icons etc work better in complex cache hierarchies where it may
  3566. # not always be possible for all corners in the cache mesh to reach
  3567. # the server generating a directory listing.
  3568. #
  3569. #Default:
  3570. # global_internal_static on
  3571.  
  3572. # TAG: short_icon_urls
  3573. # If this is enabled Squid will use short URLs for icons.
  3574. #
  3575. # If off the URLs for icons will always be absolute URLs
  3576. # including the proxy name and port.
  3577. #
  3578. #Default:
  3579. # short_icon_urls off
  3580.  
  3581.  
  3582. # ERROR PAGE OPTIONS
  3583. # -----------------------------------------------------------------------------
  3584.  
  3585. # TAG: error_directory
  3586. # If you wish to create your own versions of the default
  3587. # (English) error files, either to customize them to suit your
  3588. # language or company copy the template English files to another
  3589. # directory and point this tag at them.
  3590. #
  3591. # The squid developers are interested in making squid available in
  3592. # a wide variety of languages. If you are making translations for a
  3593. # langauge that Squid does not currently provide please consider
  3594. # contributing your translation back to the project.
  3595. #
  3596. #Default:
  3597. # error_directory /usr/share/squid/errors/en
  3598.  
  3599. # TAG: error_map
  3600. # Map errors to custom messages
  3601. #
  3602. # error_map message_url http_status ...
  3603. #
  3604. # http_status ... is a list of HTTP status codes or Squid error
  3605. # messages.
  3606. #
  3607. # Use in accelerators to substitute the error messages returned
  3608. # by servers with other custom errors.
  3609. #
  3610. # error_map http://your.server/error/404.shtml 404
  3611. #
  3612. # Requests for error messages is a GET request for the configured
  3613. # URL with the following special headers
  3614. #
  3615. # X-Error-Status: The received HTTP status code (i.e. 404)
  3616. # X-Request-URI: The requested URI where the error occurred
  3617. #
  3618. # In Addition the following headers are forwarded from the client
  3619. # request:
  3620. #
  3621. # User-Agent, Cookie, X-Forwarded-For, Via, Authorization,
  3622. # Accept, Referer
  3623. #
  3624. # And the following headers from the server reply:
  3625. #
  3626. # Server, Via, Location, Content-Location
  3627. #
  3628. # The reply returned to the client will carry the original HTTP
  3629. # headers from the real error message, but with the reply body
  3630. # of the configured error message.
  3631. #
  3632. #
  3633. #Default:
  3634. # none
  3635.  
  3636. # TAG: err_html_text
  3637. # HTML text to include in error messages. Make this a "mailto"
  3638. # URL to your admin address, or maybe just a link to your
  3639. # organizations Web page.
  3640. #
  3641. # To include this in your error messages, you must rewrite
  3642. # the error template files (found in the "errors" directory).
  3643. # Wherever you want the 'err_html_text' line to appear,
  3644. # insert a %L tag in the error template file.
  3645. #
  3646. #Default:
  3647. # none
  3648.  
  3649. # TAG: deny_info
  3650. # Usage: deny_info err_page_name acl
  3651. # or deny_info http://... acl
  3652. # Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
  3653. #
  3654. # This can be used to return a ERR_ page for requests which
  3655. # do not pass the 'http_access' rules. Squid remembers the last
  3656. # acl it evaluated in http_access, and if a 'deny_info' line exists
  3657. # for that ACL Squid returns a corresponding error page.
  3658. #
  3659. # The acl is typically the last acl on the http_access deny line which
  3660. # denied access. The exceptions to this rule are:
  3661. # - When Squid needs to request authentication credentials. It's then
  3662. # the first authentication related acl encountered
  3663. # - When none of the http_access lines matches. It's then the last
  3664. # acl processed on the last http_access line.
  3665. #
  3666. # You may use ERR_ pages that come with Squid or create your own pages
  3667. # and put them into the configured errors/ directory.
  3668. #
  3669. # Alternatively you can specify an error URL. The browsers will
  3670. # get redirected (302) to the specified URL. %s in the redirection
  3671. # URL will be replaced by the requested URL.
  3672. #
  3673. # Alternatively you can tell Squid to reset the TCP connection
  3674. # by specifying TCP_RESET.
  3675. #
  3676. #Default:
  3677. # none
  3678.  
  3679.  
  3680. # OPTIONS INFLUENCING REQUEST FORWARDING
  3681. # -----------------------------------------------------------------------------
  3682.  
  3683. # TAG: nonhierarchical_direct
  3684. # By default, Squid will send any non-hierarchical requests
  3685. # (matching hierarchy_stoplist or not cacheable request type) direct
  3686. # to origin servers.
  3687. #
  3688. # If you set this to off, Squid will prefer to send these
  3689. # requests to parents.
  3690. #
  3691. # Note that in most configurations, by turning this off you will only
  3692. # add latency to these request without any improvement in global hit
  3693. # ratio.
  3694. #
  3695. # If you are inside an firewall see never_direct instead of
  3696. # this directive.
  3697. #
  3698. #Default:
  3699. # nonhierarchical_direct on
  3700.  
  3701. # TAG: prefer_direct
  3702. # Normally Squid tries to use parents for most requests. If you for some
  3703. # reason like it to first try going direct and only use a parent if
  3704. # going direct fails set this to on.
  3705. #
  3706. # By combining nonhierarchical_direct off and prefer_direct on you
  3707. # can set up Squid to use a parent as a backup path if going direct
  3708. # fails.
  3709. #
  3710. # Note: If you want Squid to use parents for all requests see
  3711. # the never_direct directive. prefer_direct only modifies how Squid
  3712. # acts on cacheable requests.
  3713. #
  3714. #Default:
  3715. # prefer_direct off
  3716.  
  3717. # TAG: ignore_ims_on_miss on|off
  3718. # This options makes Squid ignore If-Modified-Since on
  3719. # cache misses. This is useful while the cache is
  3720. # mostly empty to more quickly have the cache populated.
  3721. #
  3722. #Default:
  3723. # ignore_ims_on_miss off
  3724.  
  3725. # TAG: always_direct
  3726. # Usage: always_direct allow|deny [!]aclname ...
  3727. #
  3728. # Here you can use ACL elements to specify requests which should
  3729. # ALWAYS be forwarded by Squid to the origin servers without using
  3730. # any peers. For example, to always directly forward requests for
  3731. # local servers ignoring any parents or siblings you may have use
  3732. # something like:
  3733. #
  3734. # acl local-servers dstdomain my.domain.net
  3735. # always_direct allow local-servers
  3736. #
  3737. # To always forward FTP requests directly, use
  3738. #
  3739. # acl FTP proto FTP
  3740. # always_direct allow FTP
  3741. #
  3742. # NOTE: There is a similar, but opposite option named
  3743. # 'never_direct'. You need to be aware that "always_direct deny
  3744. # foo" is NOT the same thing as "never_direct allow foo". You
  3745. # may need to use a deny rule to exclude a more-specific case of
  3746. # some other rule. Example:
  3747. #
  3748. # acl local-external dstdomain external.foo.net
  3749. # acl local-servers dstdomain .foo.net
  3750. # always_direct deny local-external
  3751. # always_direct allow local-servers
  3752. #
  3753. # NOTE: If your goal is to make the client forward the request
  3754. # directly to the origin server bypassing Squid then this needs
  3755. # to be done in the client configuration. Squid configuration
  3756. # can only tell Squid how Squid should fetch the object.
  3757. #
  3758. # NOTE: This directive is not related to caching. The replies
  3759. # is cached as usual even if you use always_direct. To not cache
  3760. # the replies see no_cache.
  3761. #
  3762. # This option replaces some v1.1 options such as local_domain
  3763. # and local_ip.
  3764. #
  3765. #Default:
  3766. # none
  3767.  
  3768. # TAG: never_direct
  3769. # Usage: never_direct allow|deny [!]aclname ...
  3770. #
  3771. # never_direct is the opposite of always_direct. Please read
  3772. # the description for always_direct if you have not already.
  3773. #
  3774. # With 'never_direct' you can use ACL elements to specify
  3775. # requests which should NEVER be forwarded directly to origin
  3776. # servers. For example, to force the use of a proxy for all
  3777. # requests, except those in your local domain use something like:
  3778. #
  3779. # acl local-servers dstdomain .foo.net
  3780. # acl all src 0.0.0.0/0.0.0.0
  3781. # never_direct deny local-servers
  3782. # never_direct allow all
  3783. #
  3784. # or if Squid is inside a firewall and there are local intranet
  3785. # servers inside the firewall use something like:
  3786. #
  3787. # acl local-intranet dstdomain .foo.net
  3788. # acl local-external dstdomain external.foo.net
  3789. # always_direct deny local-external
  3790. # always_direct allow local-intranet
  3791. # never_direct allow all
  3792. #
  3793. # This option replaces some v1.1 options such as inside_firewall
  3794. # and firewall_ip.
  3795. #
  3796. #Default:
  3797. # none
  3798.  
  3799.  
  3800. # ADVANCED NETWORKING OPTIONS
  3801. # -----------------------------------------------------------------------------
  3802.  
  3803. # TAG: max_filedescriptors
  3804. # The maximum number of filedescriptors supported.
  3805. #
  3806. # The default "0" means Squid inherits the current ulimit setting.
  3807. #
  3808. # Note: Changing this requires a restart of Squid. Also
  3809. # not all comm loops supports values larger than --with-maxfd.
  3810. #
  3811. #Default:
  3812. # max_filedescriptors 0
  3813.  
  3814. # TAG: accept_filter
  3815. # FreeBSD:
  3816. #
  3817. # The name of an accept(2) filter to install on Squid's
  3818. # listen socket(s). This feature is perhaps specific to
  3819. # FreeBSD and requires support in the kernel.
  3820. #
  3821. # The 'httpready' filter delays delivering new connections
  3822. # to Squid until a full HTTP request has been received.
  3823. # See the accf_http(9) man page for details.
  3824. #
  3825. # The 'dataready' filter delays delivering new connections
  3826. # to Squid until there is some data to process.
  3827. # See the accf_dataready(9) man page for details.
  3828. #
  3829. # Linux:
  3830. #
  3831. # The 'data' filter delays delivering of new connections
  3832. # to Squid until there is some data to process by TCP_ACCEPT_DEFER.
  3833. # You may optionally specify a number of seconds to wait by
  3834. # 'data=N' where N is the number of seconds. Defaults to 30
  3835. # if not specified. See the tcp(7) man page for details.
  3836. #EXAMPLE:
  3837. ## FreeBSD
  3838. #accept_filter httpready
  3839. ## Linux
  3840. #accept_filter data
  3841. #
  3842. #Default:
  3843. # none
  3844.  
  3845. # TAG: tcp_recv_bufsize (bytes)
  3846. # Size of receive buffer to set for TCP sockets. Probably just
  3847. # as easy to change your kernel's default. Set to zero to use
  3848. # the default buffer size.
  3849. #
  3850. #Default:
  3851. # tcp_recv_bufsize 0 bytes
  3852.  
  3853. # TAG: incoming_rate
  3854. # This directive controls how aggressive Squid should accept new
  3855. # connections compared to processing existing connections.
  3856. # The lower number the more frequent Squid will look for new
  3857. # incoming requests.
  3858. #
  3859. #Default:
  3860. # incoming_rate 30
  3861.  
  3862.  
  3863. # DNS OPTIONS
  3864. # -----------------------------------------------------------------------------
  3865.  
  3866. # TAG: check_hostnames
  3867. # For security and stability reasons Squid by default checks
  3868. # hostnames for Internet standard RFC compliance. If you do not want
  3869. # Squid to perform these checks then turn this directive off.
  3870. #
  3871. #Default:
  3872. # check_hostnames on
  3873.  
  3874. # TAG: allow_underscore
  3875. # Underscore characters is not strictly allowed in Internet hostnames
  3876. # but nevertheless used by many sites. Set this to off if you want
  3877. # Squid to be strict about the standard.
  3878. # This check is performed only when check_hostnames is set to on.
  3879. #
  3880. #Default:
  3881. # allow_underscore on
  3882.  
  3883. # TAG: cache_dns_program
  3884. # Note: This option is only available if Squid is rebuilt with the
  3885. # --disable-internal-dns option
  3886. #
  3887. # Specify the location of the executable for dnslookup process.
  3888. #
  3889. #Default:
  3890. # cache_dns_program /usr/lib/squid/dnsserver
  3891.  
  3892. # TAG: dns_children
  3893. # Note: This option is only available if Squid is rebuilt with the
  3894. # --disable-internal-dns option
  3895. #
  3896. # The number of processes spawn to service DNS name lookups.
  3897. # For heavily loaded caches on large servers, you should
  3898. # probably increase this value to at least 10. The maximum
  3899. # is 32. The default is 5.
  3900. #
  3901. # You must have at least one dnsserver process.
  3902. #
  3903. #Default:
  3904. # dns_children 5
  3905.  
  3906. # TAG: dns_retransmit_interval
  3907. # Initial retransmit interval for DNS queries. The interval is
  3908. # doubled each time all configured DNS servers have been tried.
  3909. #
  3910. #
  3911. #Default:
  3912. # dns_retransmit_interval 5 seconds
  3913.  
  3914. # TAG: dns_timeout
  3915. # DNS Query timeout. If no response is received to a DNS query
  3916. # within this time all DNS servers for the queried domain
  3917. # are assumed to be unavailable.
  3918. #
  3919. #Default:
  3920. # dns_timeout 2 minutes
  3921.  
  3922. # TAG: dns_defnames on|off
  3923. # Normally the RES_DEFNAMES resolver option is disabled
  3924. # (see res_init(3)). This prevents caches in a hierarchy
  3925. # from interpreting single-component hostnames locally. To allow
  3926. # Squid to handle single-component names, enable this option.
  3927. #
  3928. #Default:
  3929. # dns_defnames off
  3930.  
  3931. # TAG: dns_nameservers
  3932. # Use this if you want to specify a list of DNS name servers
  3933. # (IP addresses) to use instead of those given in your
  3934. # /etc/resolv.conf file.
  3935. # On Windows platforms, if no value is specified here or in
  3936. # the /etc/resolv.conf file, the list of DNS name servers are
  3937. # taken from the Windows registry, both static and dynamic DHCP
  3938. # configurations are supported.
  3939. #
  3940. # Example: dns_nameservers 10.0.0.1 192.172.0.4
  3941. #
  3942. #Default:
  3943. # none
  3944.  
  3945. # TAG: hosts_file
  3946. # Location of the host-local IP name-address associations
  3947. # database. Most Operating Systems have such a file on different
  3948. # default locations:
  3949. # - Un*X & Linux: /etc/hosts
  3950. # - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
  3951. # (%SystemRoot% value install default is c:\winnt)
  3952. # - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
  3953. # (%SystemRoot% value install default is c:\windows)
  3954. # - Windows 9x/Me: %windir%\hosts
  3955. # (%windir% value is usually c:\windows)
  3956. # - Cygwin: /etc/hosts
  3957. #
  3958. # The file contains newline-separated definitions, in the
  3959. # form ip_address_in_dotted_form name [name ...] names are
  3960. # whitespace-separated. Lines beginning with an hash (#)
  3961. # character are comments.
  3962. #
  3963. # The file is checked at startup and upon configuration.
  3964. # If set to 'none', it won't be checked.
  3965. # If append_domain is used, that domain will be added to
  3966. # domain-local (i.e. not containing any dot character) host
  3967. # definitions.
  3968. #
  3969. #Default:
  3970. # hosts_file /etc/hosts
  3971. #
  3972. hosts_file /etc/hosts
  3973.  
  3974. # TAG: dns_testnames
  3975. # The DNS tests exit as soon as the first site is successfully looked up
  3976. #
  3977. # This test can be disabled with the -D command line option.
  3978. #
  3979. #Default:
  3980. # dns_testnames netscape.com internic.net nlanr.net microsoft.com
  3981.  
  3982. # TAG: append_domain
  3983. # Appends local domain name to hostnames without any dots in
  3984. # them. append_domain must begin with a period.
  3985. #
  3986. # Be warned there are now Internet names with no dots in
  3987. # them using only top-domain names, so setting this may
  3988. # cause some Internet sites to become unavailable.
  3989. #
  3990. #Example:
  3991. # append_domain .yourdomain.com
  3992. #
  3993. #Default:
  3994. # none
  3995.  
  3996. # TAG: ignore_unknown_nameservers
  3997. # By default Squid checks that DNS responses are received
  3998. # from the same IP addresses they are sent to. If they
  3999. # don't match, Squid ignores the response and writes a warning
  4000. # message to cache.log. You can allow responses from unknown
  4001. # nameservers by setting this option to 'off'.
  4002. #
  4003. #Default:
  4004. # ignore_unknown_nameservers on
  4005.  
  4006. # TAG: ipcache_size (number of entries)
  4007. # TAG: ipcache_low (percent)
  4008. # TAG: ipcache_high (percent)
  4009. # The size, low-, and high-water marks for the IP cache.
  4010. #
  4011. #Default:
  4012. # ipcache_size 1024
  4013. # ipcache_low 90
  4014. # ipcache_high 95
  4015.  
  4016. # TAG: fqdncache_size (number of entries)
  4017. # Maximum number of FQDN cache entries.
  4018. #
  4019. #Default:
  4020. # fqdncache_size 1024
  4021.  
  4022.  
  4023. # MISCELLANEOUS
  4024. # -----------------------------------------------------------------------------
  4025.  
  4026. # TAG: memory_pools on|off
  4027. # If set, Squid will keep pools of allocated (but unused) memory
  4028. # available for future use. If memory is a premium on your
  4029. # system and you believe your malloc library outperforms Squid
  4030. # routines, disable this.
  4031. #
  4032. #Default:
  4033. # memory_pools on
  4034.  
  4035. # TAG: memory_pools_limit (bytes)
  4036. # Used only with memory_pools on:
  4037. # memory_pools_limit 50 MB
  4038. #
  4039. # If set to a non-zero value, Squid will keep at most the specified
  4040. # limit of allocated (but unused) memory in memory pools. All free()
  4041. # requests that exceed this limit will be handled by your malloc
  4042. # library. Squid does not pre-allocate any memory, just safe-keeps
  4043. # objects that otherwise would be free()d. Thus, it is safe to set
  4044. # memory_pools_limit to a reasonably high value even if your
  4045. # configuration will use less memory.
  4046. #
  4047. # If set to zero, Squid will keep all memory it can. That is, there
  4048. # will be no limit on the total amount of memory used for safe-keeping.
  4049. #
  4050. # To disable memory allocation optimization, do not set
  4051. # memory_pools_limit to 0. Set memory_pools to "off" instead.
  4052. #
  4053. # An overhead for maintaining memory pools is not taken into account
  4054. # when the limit is checked. This overhead is close to four bytes per
  4055. # object kept. However, pools may actually _save_ memory because of
  4056. # reduced memory thrashing in your malloc library.
  4057. #
  4058. #Default:
  4059. # memory_pools_limit 5 MB
  4060.  
  4061. # TAG: forwarded_for on|off
  4062. # If set, Squid will include your system's IP address or name
  4063. # in the HTTP requests it forwards. By default it looks like
  4064. # this:
  4065. #
  4066. # X-Forwarded-For: 192.1.2.3
  4067. #
  4068. # If you disable this, it will appear as
  4069. #
  4070. # X-Forwarded-For: unknown
  4071. #
  4072. #Default:
  4073. # forwarded_for on
  4074.  
  4075. # TAG: cachemgr_passwd
  4076. # Specify passwords for cachemgr operations.
  4077. #
  4078. # Usage: cachemgr_passwd password action action ...
  4079. #
  4080. # Some valid actions are (see cache manager menu for a full list):
  4081. # 5min
  4082. # 60min
  4083. # asndb
  4084. # authenticator
  4085. # cbdata
  4086. # client_list
  4087. # comm_incoming
  4088. # config *
  4089. # counters
  4090. # delay
  4091. # digest_stats
  4092. # dns
  4093. # events
  4094. # filedescriptors
  4095. # fqdncache
  4096. # histograms
  4097. # http_headers
  4098. # info
  4099. # io
  4100. # ipcache
  4101. # mem
  4102. # menu
  4103. # netdb
  4104. # non_peers
  4105. # objects
  4106. # offline_toggle *
  4107. # pconn
  4108. # peer_select
  4109. # reconfigure *
  4110. # redirector
  4111. # refresh
  4112. # server_list
  4113. # shutdown *
  4114. # store_digest
  4115. # storedir
  4116. # utilization
  4117. # via_headers
  4118. # vm_objects
  4119. #
  4120. # * Indicates actions which will not be performed without a
  4121. # valid password, others can be performed if not listed here.
  4122. #
  4123. # To disable an action, set the password to "disable".
  4124. # To allow performing an action without a password, set the
  4125. # password to "none".
  4126. #
  4127. # Use the keyword "all" to set the same password for all actions.
  4128. #
  4129. #Example:
  4130. # cachemgr_passwd secret shutdown
  4131. # cachemgr_passwd lesssssssecret info stats/objects
  4132. # cachemgr_passwd disable all
  4133. #
  4134. #Default:
  4135. # none
  4136.  
  4137. # TAG: client_db on|off
  4138. # If you want to disable collecting per-client statistics,
  4139. # turn off client_db here.
  4140. #
  4141. #Default:
  4142. # client_db on
  4143.  
  4144. # TAG: reload_into_ims on|off
  4145. # When you enable this option, client no-cache or ``reload''
  4146. # requests will be changed to If-Modified-Since requests.
  4147. # Doing this VIOLATES the HTTP standard. Enabling this
  4148. # feature could make you liable for problems which it
  4149. # causes.
  4150. #
  4151. # see also refresh_pattern for a more selective approach.
  4152. #
  4153. #Default:
  4154. # reload_into_ims off
  4155.  
  4156. # TAG: maximum_single_addr_tries
  4157. # This sets the maximum number of connection attempts for a
  4158. # host that only has one address (for multiple-address hosts,
  4159. # each address is tried once).
  4160. #
  4161. # The default value is one attempt, the (not recommended)
  4162. # maximum is 255 tries. A warning message will be generated
  4163. # if it is set to a value greater than ten.
  4164. #
  4165. # Note: This is in addition to the request re-forwarding which
  4166. # takes place if Squid fails to get a satisfying response.
  4167. #
  4168. #Default:
  4169. # maximum_single_addr_tries 1
  4170.  
  4171. # TAG: retry_on_error
  4172. # If set to on Squid will automatically retry requests when
  4173. # receiving an error response. This is mainly useful if you
  4174. # are in a complex cache hierarchy to work around access
  4175. # control errors.
  4176. #
  4177. #Default:
  4178. # retry_on_error off
  4179.  
  4180. # TAG: as_whois_server
  4181. # WHOIS server to query for AS numbers. NOTE: AS numbers are
  4182. # queried only when Squid starts up, not for every request.
  4183. #
  4184. #Default:
  4185. # as_whois_server whois.ra.net
  4186. # as_whois_server whois.ra.net
  4187.  
  4188. # TAG: offline_mode
  4189. # Enable this option and Squid will never try to validate cached
  4190. # objects.
  4191. #
  4192. #Default:
  4193. # offline_mode off
  4194.  
  4195. # TAG: uri_whitespace
  4196. # What to do with requests that have whitespace characters in the
  4197. # URI. Options:
  4198. #
  4199. # strip: The whitespace characters are stripped out of the URL.
  4200. # This is the behavior recommended by RFC2396.
  4201. # deny: The request is denied. The user receives an "Invalid
  4202. # Request" message.
  4203. # allow: The request is allowed and the URI is not changed. The
  4204. # whitespace characters remain in the URI. Note the
  4205. # whitespace is passed to redirector processes if they
  4206. # are in use.
  4207. # encode: The request is allowed and the whitespace characters are
  4208. # encoded according to RFC1738. This could be considered
  4209. # a violation of the HTTP/1.1
  4210. # RFC because proxies are not allowed to rewrite URI's.
  4211. # chop: The request is allowed and the URI is chopped at the
  4212. # first whitespace. This might also be considered a
  4213. # violation.
  4214. #
  4215. #Default:
  4216. # uri_whitespace strip
  4217.  
  4218. # TAG: coredump_dir
  4219. # By default Squid leaves core files in the directory from where
  4220. # it was started. If you set 'coredump_dir' to a directory
  4221. # that exists, Squid will chdir() to that directory at startup
  4222. # and coredump files will be left there.
  4223. #
  4224. #Default:
  4225. # coredump_dir none
  4226. #
  4227. # Leave coredumps in the first cache dir
  4228. coredump_dir /var/spool/squid
  4229.  
  4230. # TAG: chroot
  4231. # Use this to have Squid do a chroot() while initializing. This
  4232. # also causes Squid to fully drop root privileges after
  4233. # initializing. This means, for example, if you use a HTTP
  4234. # port less than 1024 and try to reconfigure, you will may get an
  4235. # error saying that Squid can not open the port.
  4236. #
  4237. #Default:
  4238. # none
  4239.  
  4240. # TAG: balance_on_multiple_ip
  4241. # Some load balancing servers based on round robin DNS have been
  4242. # found not to preserve user session state across requests
  4243. # to different IP addresses.
  4244. #
  4245. # By default Squid rotates IP's per request. By disabling
  4246. # this directive only connection failure triggers rotation.
  4247. #
  4248. #Default:
  4249. # balance_on_multiple_ip on
  4250.  
  4251. # TAG: pipeline_prefetch
  4252. # To boost the performance of pipelined requests to closer
  4253. # match that of a non-proxied environment Squid can try to fetch
  4254. # up to two requests in parallel from a pipeline.
  4255. #
  4256. # Defaults to off for bandwidth management and access logging
  4257. # reasons.
  4258. #
  4259. #Default:
  4260. # pipeline_prefetch off
  4261.  
  4262. # TAG: high_response_time_warning (msec)
  4263. # If the one-minute median response time exceeds this value,
  4264. # Squid prints a WARNING with debug level 0 to get the
  4265. # administrators attention. The value is in milliseconds.
  4266. #
  4267. #Default:
  4268. # high_response_time_warning 0
  4269.  
  4270. # TAG: high_page_fault_warning
  4271. # If the one-minute average page fault rate exceeds this
  4272. # value, Squid prints a WARNING with debug level 0 to get
  4273. # the administrators attention. The value is in page faults
  4274. # per second.
  4275. #
  4276. #Default:
  4277. # high_page_fault_warning 0
  4278.  
  4279. # TAG: high_memory_warning
  4280. # If the memory usage (as determined by mallinfo) exceeds
  4281. # this amount, Squid prints a WARNING with debug level 0 to get
  4282. # the administrators attention.
  4283. #
  4284. #Default:
  4285. # high_memory_warning 0 KB
  4286.  
  4287. # TAG: sleep_after_fork (microseconds)
  4288. # When this is set to a non-zero value, the main Squid process
  4289. # sleeps the specified number of microseconds after a fork()
  4290. # system call. This sleep may help the situation where your
  4291. # system reports fork() failures due to lack of (virtual)
  4292. # memory. Note, however, if you have a lot of child
  4293. # processes, these sleep delays will add up and your
  4294. # Squid will not service requests for some amount of time
  4295. # until all the child processes have been started.
  4296. # On Windows value less then 1000 (1 milliseconds) are
  4297. # rounded to 1000.
  4298. #
  4299. #Default:
  4300. # sleep_after_fork 0
  4301.  
  4302. # TAG: zero_buffers on|off
  4303. # Squid by default will zero all buffers before using or reusing them.
  4304. # Setting this to 'off' will result in fixed-sized temporary buffers
  4305. # not being zero'ed. This may give a performance boost on certain
  4306. # platforms but it may result in undefined behaviour at the present
  4307. # time.
  4308. #
  4309. #Default:
  4310. # zero_buffers on
  4311.  
  4312. # TAG: windows_ipaddrchangemonitor on|off
  4313. # On Windows Squid by default will monitor IP address changes and will
  4314. # reconfigure itself after any detected event. This is very useful for
  4315. # proxies connected to internet with dial-up interfaces.
  4316. # In some cases (a Proxy server acting as VPN gateway is one) it could be
  4317. # desiderable to disable this behaviour setting this to 'off'.
  4318. # Note: after changing this, Squid service must be restarted.
  4319. #
  4320. #Default:
  4321. # windows_ipaddrchangemonitor on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement