Guest User

Untitled

a guest
Jun 26th, 2012
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 199.62 KB | None | 0 0
  1. # WELCOME TO SQUID 3.1.6
  2. # ----------------------------
  3. #
  4. # This is the default Squid configuration file. You may wish
  5. # to look at the Squid home page (http://www.squid-cache.org/)
  6. # for the FAQ and other documentation.
  7. #
  8. # The default Squid config file shows what the defaults for
  9. # various options happen to be. If you don't need to change the
  10. # default, you shouldn't uncomment the line. Doing so may cause
  11. # run-time problems. In some cases "none" refers to no default
  12. # setting at all, while in other cases it refers to a valid
  13. # option - the comments for that keyword indicate if this is the
  14. # case.
  15. #
  16.  
  17. # Configuration options can be included using the "include" directive.
  18. # Include takes a list of files to include. Quoting and wildcards is
  19. # supported.
  20. #
  21. # For example,
  22. #
  23. # include /path/to/included/file/squid.acl.config
  24. #
  25. # Includes can be nested up to a hard-coded depth of 16 levels.
  26. # This arbitrary restriction is to prevent recursive include references
  27. # from causing Squid entering an infinite loop whilst trying to load
  28. # configuration files.
  29.  
  30. # OPTIONS FOR AUTHENTICATION
  31. # -----------------------------------------------------------------------------
  32.  
  33. # TAG: auth_param
  34. # This is used to define parameters for the various authentication
  35. # schemes supported by Squid.
  36. #
  37. # format: auth_param scheme parameter [setting]
  38. #
  39. # The order in which authentication schemes are presented to the client is
  40. # dependent on the order the scheme first appears in config file. IE
  41. # has a bug (it's not RFC 2617 compliant) in that it will use the basic
  42. # scheme if basic is the first entry presented, even if more secure
  43. # schemes are presented. For now use the order in the recommended
  44. # settings section below. If other browsers have difficulties (don't
  45. # recognize the schemes offered even if you are using basic) either
  46. # put basic first, or disable the other schemes (by commenting out their
  47. # program entry).
  48. #
  49. # Once an authentication scheme is fully configured, it can only be
  50. # shutdown by shutting squid down and restarting. Changes can be made on
  51. # the fly and activated with a reconfigure. I.E. You can change to a
  52. # different helper, but not unconfigure the helper completely.
  53. #
  54. # Please note that while this directive defines how Squid processes
  55. # authentication it does not automatically activate authentication.
  56. # To use authentication you must in addition make use of ACLs based
  57. # on login name in http_access (proxy_auth, proxy_auth_regex or
  58. # external with %LOGIN used in the format tag). The browser will be
  59. # challenged for authentication on the first such acl encountered
  60. # in http_access processing and will also be re-challenged for new
  61. # login credentials if the request is being denied by a proxy_auth
  62. # type acl.
  63. #
  64. # WARNING: authentication can't be used in a transparently intercepting
  65. # proxy as the client then thinks it is talking to an origin server and
  66. # not the proxy. This is a limitation of bending the TCP/IP protocol to
  67. # transparently intercepting port 80, not a limitation in Squid.
  68. # Ports flagged 'transparent', 'intercept', or 'tproxy' have
  69. # authentication disabled.
  70. #
  71. # === Parameters for the basic scheme follow. ===
  72. #
  73. # "program" cmdline
  74. # Specify the command for the external authenticator. Such a program
  75. # reads a line containing "username password" and replies "OK" or
  76. # "ERR" in an endless loop. "ERR" responses may optionally be followed
  77. # by a error description available as %m in the returned error page.
  78. # If you use an authenticator, make sure you have 1 acl of type
  79. # proxy_auth.
  80. #
  81. # By default, the basic authentication scheme is not used unless a
  82. # program is specified.
  83. #
  84. # If you want to use the traditional NCSA proxy authentication, set
  85. # this line to something like
  86. #
  87. # auth_param basic program /usr/lib/squid3/ncsa_auth /usr/etc/passwd
  88. #
  89. # "utf8" on|off
  90. # HTTP uses iso-latin-1 as characterset, while some authentication
  91. # backends such as LDAP expects UTF-8. If this is set to on Squid will
  92. # translate the HTTP iso-latin-1 charset to UTF-8 before sending the
  93. # username & password to the helper.
  94. #
  95. # "children" numberofchildren
  96. # The number of authenticator processes to spawn. If you start too few
  97. # Squid will have to wait for them to process a backlog of credential
  98. # verifications, slowing it down. When password verifications are
  99. # done via a (slow) network you are likely to need lots of
  100. # authenticator processes.
  101. # auth_param basic children 5
  102. #
  103. # "concurrency" concurrency
  104. # The number of concurrent requests the helper can process.
  105. # The default of 0 is used for helpers who only supports
  106. # one request at a time. Setting this changes the protocol used to
  107. # include a channel number first on the request/response line, allowing
  108. # multiple requests to be sent to the same helper in parallell without
  109. # wating for the response.
  110. # Must not be set unless it's known the helper supports this.
  111. # auth_param basic concurrency 0
  112. #
  113. # "realm" realmstring
  114. # Specifies the realm name which is to be reported to the
  115. # client for the basic proxy authentication scheme (part of
  116. # the text the user will see when prompted their username and
  117. # password). There is no default.
  118. # auth_param basic realm Squid proxy-caching web server
  119. #
  120. # "credentialsttl" timetolive
  121. # Specifies how long squid assumes an externally validated
  122. # username:password pair is valid for - in other words how
  123. # often the helper program is called for that user. Set this
  124. # low to force revalidation with short lived passwords. Note
  125. # setting this high does not impact your susceptibility
  126. # to replay attacks unless you are using an one-time password
  127. # system (such as SecureID). If you are using such a system,
  128. # you will be vulnerable to replay attacks unless you also
  129. # use the max_user_ip ACL in an http_access rule.
  130. #
  131. # "casesensitive" on|off
  132. # Specifies if usernames are case sensitive. Most user databases are
  133. # case insensitive allowing the same username to be spelled using both
  134. # lower and upper case letters, but some are case sensitive. This
  135. # makes a big difference for user_max_ip ACL processing and similar.
  136. # auth_param basic casesensitive off
  137. #
  138. # === Parameters for the digest scheme follow ===
  139. #
  140. # "program" cmdline
  141. # Specify the command for the external authenticator. Such
  142. # a program reads a line containing "username":"realm" and
  143. # replies with the appropriate H(A1) value hex encoded or
  144. # ERR if the user (or his H(A1) hash) does not exists.
  145. # See rfc 2616 for the definition of H(A1).
  146. # "ERR" responses may optionally be followed by a error description
  147. # available as %m in the returned error page.
  148. #
  149. # By default, the digest authentication scheme is not used unless a
  150. # program is specified.
  151. #
  152. # If you want to use a digest authenticator, set this line to
  153. # something like
  154. #
  155. # auth_param digest program /usr/lib/squid3/digest_pw_auth /usr/etc/digpass
  156. #
  157. # "utf8" on|off
  158. # HTTP uses iso-latin-1 as characterset, while some authentication
  159. # backends such as LDAP expects UTF-8. If this is set to on Squid will
  160. # translate the HTTP iso-latin-1 charset to UTF-8 before sending the
  161. # username & password to the helper.
  162. #
  163. # "children" numberofchildren
  164. # The number of authenticator processes to spawn (no default).
  165. # If you start too few Squid will have to wait for them to
  166. # process a backlog of H(A1) calculations, slowing it down.
  167. # When the H(A1) calculations are done via a (slow) network
  168. # you are likely to need lots of authenticator processes.
  169. # auth_param digest children 5
  170. #
  171. # "realm" realmstring
  172. # Specifies the realm name which is to be reported to the
  173. # client for the digest proxy authentication scheme (part of
  174. # the text the user will see when prompted their username and
  175. # password). There is no default.
  176. # auth_param digest realm Squid proxy-caching web server
  177. #
  178. # "nonce_garbage_interval" timeinterval
  179. # Specifies the interval that nonces that have been issued
  180. # to client_agent's are checked for validity.
  181. #
  182. # "nonce_max_duration" timeinterval
  183. # Specifies the maximum length of time a given nonce will be
  184. # valid for.
  185. #
  186. # "nonce_max_count" number
  187. # Specifies the maximum number of times a given nonce can be
  188. # used.
  189. #
  190. # "nonce_strictness" on|off
  191. # Determines if squid requires strict increment-by-1 behavior
  192. # for nonce counts, or just incrementing (off - for use when
  193. # useragents generate nonce counts that occasionally miss 1
  194. # (ie, 1,2,4,6)). Default off.
  195. #
  196. # "check_nonce_count" on|off
  197. # This directive if set to off can disable the nonce count check
  198. # completely to work around buggy digest qop implementations in
  199. # certain mainstream browser versions. Default on to check the
  200. # nonce count to protect from authentication replay attacks.
  201. #
  202. # "post_workaround" on|off
  203. # This is a workaround to certain buggy browsers who sends
  204. # an incorrect request digest in POST requests when reusing
  205. # the same nonce as acquired earlier on a GET request.
  206. #
  207. # === NTLM scheme options follow ===
  208. #
  209. # "program" cmdline
  210. # Specify the command for the external NTLM authenticator.
  211. # Such a program reads exchanged NTLMSSP packets with
  212. # the browser via Squid until authentication is completed.
  213. # If you use an NTLM authenticator, make sure you have 1 acl
  214. # of type proxy_auth. By default, the NTLM authenticator_program
  215. # is not used.
  216. #
  217. # auth_param ntlm program /usr/lib/squid3/ntlm_auth
  218. #
  219. # "children" numberofchildren
  220. # The number of authenticator processes to spawn (no default).
  221. # If you start too few Squid will have to wait for them to
  222. # process a backlog of credential verifications, slowing it
  223. # down. When credential verifications are done via a (slow)
  224. # network you are likely to need lots of authenticator
  225. # processes.
  226. #
  227. # auth_param ntlm children 5
  228. #
  229. # "keep_alive" on|off
  230. # If you experience problems with PUT/POST requests when using the
  231. # Negotiate authentication scheme then you can try setting this to
  232. # off. This will cause Squid to forcibly close the connection on
  233. # the initial requests where the browser asks which schemes are
  234. # supported by the proxy.
  235. #
  236. # auth_param ntlm keep_alive on
  237. #
  238. # === Options for configuring the NEGOTIATE auth-scheme follow ===
  239. #
  240. # "program" cmdline
  241. # Specify the command for the external Negotiate authenticator.
  242. # This protocol is used in Microsoft Active-Directory enabled setups with
  243. # the Microsoft Internet Explorer or Mozilla Firefox browsers.
  244. # Its main purpose is to exchange credentials with the Squid proxy
  245. # using the Kerberos mechanisms.
  246. # If you use a Negotiate authenticator, make sure you have at least
  247. # one acl of type proxy_auth active. By default, the negotiate
  248. # authenticator_program is not used.
  249. # The only supported program for this role is the ntlm_auth
  250. # program distributed as part of Samba, version 4 or later.
  251. #
  252. # auth_param negotiate program /usr/lib/squid3/ntlm_auth --helper-protocol=gss-spnego
  253. #
  254. # "children" numberofchildren
  255. # The number of authenticator processes to spawn (no default).
  256. # If you start too few Squid will have to wait for them to
  257. # process a backlog of credential verifications, slowing it
  258. # down. When crendential verifications are done via a (slow)
  259. # network you are likely to need lots of authenticator
  260. # processes.
  261. # auth_param negotiate children 5
  262. #
  263. # "keep_alive" on|off
  264. # If you experience problems with PUT/POST requests when using the
  265. # Negotiate authentication scheme then you can try setting this to
  266. # off. This will cause Squid to forcibly close the connection on
  267. # the initial requests where the browser asks which schemes are
  268. # supported by the proxy.
  269. #
  270. # auth_param negotiate keep_alive on
  271. #
  272. #
  273. # Examples:
  274. #
  275. ##Recommended minimum configuration per scheme:
  276. ##auth_param negotiate program <uncomment and complete this line to activate>
  277. ##auth_param negotiate children 5
  278. ##auth_param negotiate keep_alive on
  279. ##
  280. ##auth_param ntlm program <uncomment and complete this line to activate>
  281. ##auth_param ntlm children 5
  282. ##auth_param ntlm keep_alive on
  283. ##
  284. ##auth_param digest program <uncomment and complete this line>
  285. ##auth_param digest children 5
  286. ##auth_param digest realm Squid proxy-caching web server
  287. ##auth_param digest nonce_garbage_interval 5 minutes
  288. ##auth_param digest nonce_max_duration 30 minutes
  289. ##auth_param digest nonce_max_count 50
  290. ##
  291. ##auth_param basic program <uncomment and complete this line>
  292. ##auth_param basic children 5
  293. ##auth_param basic realm Squid proxy-caching web server
  294. ##auth_param basic credentialsttl 2 hours
  295. #Default:
  296. # none
  297.  
  298. # TAG: authenticate_cache_garbage_interval
  299. # The time period between garbage collection across the username cache.
  300. # This is a tradeoff between memory utilization (long intervals - say
  301. # 2 days) and CPU (short intervals - say 1 minute). Only change if you
  302. # have good reason to.
  303. #Default:
  304. # authenticate_cache_garbage_interval 1 hour
  305.  
  306. # TAG: authenticate_ttl
  307. # The time a user & their credentials stay in the logged in
  308. # user cache since their last request. When the garbage
  309. # interval passes, all user credentials that have passed their
  310. # TTL are removed from memory.
  311. #Default:
  312. # authenticate_ttl 1 hour
  313.  
  314. # TAG: authenticate_ip_ttl
  315. # If you use proxy authentication and the 'max_user_ip' ACL,
  316. # this directive controls how long Squid remembers the IP
  317. # addresses associated with each user. Use a small value
  318. # (e.g., 60 seconds) if your users might change addresses
  319. # quickly, as is the case with dialups. You might be safe
  320. # using a larger value (e.g., 2 hours) in a corporate LAN
  321. # environment with relatively static address assignments.
  322. #Default:
  323. # authenticate_ip_ttl 0 seconds
  324.  
  325. # ACCESS CONTROLS
  326. # -----------------------------------------------------------------------------
  327.  
  328. # TAG: external_acl_type
  329. # This option defines external acl classes using a helper program
  330. # to look up the status
  331. #
  332. # external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..]
  333. #
  334. # Options:
  335. #
  336. # ttl=n TTL in seconds for cached results (defaults to 3600
  337. # for 1 hour)
  338. # negative_ttl=n
  339. # TTL for cached negative lookups (default same
  340. # as ttl)
  341. # children=n Number of acl helper processes spawn to service
  342. # external acl lookups of this type. (default 5)
  343. # concurrency=n concurrency level per process. Only used with helpers
  344. # capable of processing more than one query at a time.
  345. # cache=n result cache size, 0 is unbounded (default)
  346. # grace=n Percentage remaining of TTL where a refresh of a
  347. # cached entry should be initiated without needing to
  348. # wait for a new reply. (default 0 for no grace period)
  349. # protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers
  350. # ipv4 / ipv6 IP-mode used to communicate to this helper.
  351. # For compatability with older configurations and helpers
  352. # the default is currently 'ipv4'.
  353. #
  354. # FORMAT specifications
  355. #
  356. # %LOGIN Authenticated user login name
  357. # %EXT_USER Username from external acl
  358. # %IDENT Ident user name
  359. # %SRC Client IP
  360. # %SRCPORT Client source port
  361. # %URI Requested URI
  362. # %DST Requested host
  363. # %PROTO Requested protocol
  364. # %PORT Requested port
  365. # %PATH Requested URL path
  366. # %METHOD Request method
  367. # %MYADDR Squid interface address
  368. # %MYPORT Squid http_port number
  369. # %PATH Requested URL-path (including query-string if any)
  370. # %USER_CERT SSL User certificate in PEM format
  371. # %USER_CERTCHAIN SSL User certificate chain in PEM format
  372. # %USER_CERT_xx SSL User certificate subject attribute xx
  373. # %USER_CA_xx SSL User certificate issuer attribute xx
  374. #
  375. # %>{Header} HTTP request header "Header"
  376. # %>{Hdr:member}
  377. # HTTP request header "Hdr" list member "member"
  378. # %>{Hdr:;member}
  379. # HTTP request header list member using ; as
  380. # list separator. ; can be any non-alphanumeric
  381. # character.
  382. #
  383. # %<{Header} HTTP reply header "Header"
  384. # %<{Hdr:member}
  385. # HTTP reply header "Hdr" list member "member"
  386. # %<{Hdr:;member}
  387. # HTTP reply header list member using ; as
  388. # list separator. ; can be any non-alphanumeric
  389. # character.
  390. #
  391. # In addition to the above, any string specified in the referencing
  392. # acl will also be included in the helper request line, after the
  393. # specified formats (see the "acl external" directive)
  394. #
  395. # The helper receives lines per the above format specification,
  396. # and returns lines starting with OK or ERR indicating the validity
  397. # of the request and optionally followed by additional keywords with
  398. # more details.
  399. #
  400. # General result syntax:
  401. #
  402. # OK/ERR keyword=value ...
  403. #
  404. # Defined keywords:
  405. #
  406. # user= The users name (login)
  407. # password= The users password (for login= cache_peer option)
  408. # message= Message describing the reason. Available as %o
  409. # in error pages
  410. # tag= Apply a tag to a request (for both ERR and OK results)
  411. # Only sets a tag, does not alter existing tags.
  412. # log= String to be logged in access.log. Available as
  413. # %ea in logformat specifications
  414. #
  415. # If protocol=3.0 (the default) then URL escaping is used to protect
  416. # each value in both requests and responses.
  417. #
  418. # If using protocol=2.5 then all values need to be enclosed in quotes
  419. # if they may contain whitespace, or the whitespace escaped using \.
  420. # And quotes or \ characters within the keyword value must be \ escaped.
  421. #
  422. # When using the concurrency= option the protocol is changed by
  423. # introducing a query channel tag infront of the request/response.
  424. # The query channel tag is a number between 0 and concurrency-1.
  425. #Default:
  426. # none
  427.  
  428. # TAG: acl
  429. # Defining an Access List
  430. #
  431. # Every access list definition must begin with an aclname and acltype,
  432. # followed by either type-specific arguments or a quoted filename that
  433. # they are read from.
  434. #
  435. # acl aclname acltype argument ...
  436. # acl aclname acltype "file" ...
  437. #
  438. # When using "file", the file should contain one item per line.
  439. #
  440. # By default, regular expressions are CASE-SENSITIVE. To make
  441. # them case-insensitive, use the -i option.
  442. #
  443. # Some acl types require suspending the current request in order
  444. # to access some external data source.
  445. # Those which do are marked with the tag [slow], those which
  446. # don't are marked as [fast].
  447. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl
  448. # for further information
  449. #
  450. # ***** ACL TYPES AVAILABLE *****
  451. #
  452. # acl aclname src ip-address/netmask ... # clients IP address [fast]
  453. # acl aclname src addr1-addr2/netmask ... # range of addresses [fast]
  454. # acl aclname dst ip-address/netmask ... # URL host's IP address [slow]
  455. # acl aclname myip ip-address/netmask ... # local socket IP address [fast]
  456. #
  457. # acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation)
  458. # # The arp ACL requires the special configure option --enable-arp-acl.
  459. # # Furthermore, the ARP ACL code is not portable to all operating systems.
  460. # # It works on Linux, Solaris, Windows, FreeBSD, and some
  461. # # other *BSD variants.
  462. # # [fast]
  463. # #
  464. # # NOTE: Squid can only determine the MAC address for clients that are on
  465. # # the same subnet. If the client is on a different subnet,
  466. # # then Squid cannot find out its MAC address.
  467. #
  468. # acl aclname srcdomain .foo.com ...
  469. # # reverse lookup, from client IP [slow]
  470. # acl aclname dstdomain .foo.com ...
  471. # # Destination server from URL [fast]
  472. # acl aclname srcdom_regex [-i] \.foo\.com ...
  473. # # regex matching client name [slow]
  474. # acl aclname dstdom_regex [-i] \.foo\.com ...
  475. # # regex matching server [fast]
  476. # #
  477. # # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
  478. # # based URL is used and no match is found. The name "none" is used
  479. # # if the reverse lookup fails.
  480. #
  481. # acl aclname src_as number ...
  482. # acl aclname dst_as number ...
  483. # # [fast]
  484. # # Except for access control, AS numbers can be used for
  485. # # routing of requests to specific caches. Here's an
  486. # # example for routing all requests for AS#1241 and only
  487. # # those to mycache.mydomain.net:
  488. # # acl asexample dst_as 1241
  489. # # cache_peer_access mycache.mydomain.net allow asexample
  490. # # cache_peer_access mycache_mydomain.net deny all
  491. #
  492. # acl aclname peername myPeer ...
  493. # # [fast]
  494. # # match against a named cache_peer entry
  495. # # set unique name= on cache_peer lines for reliable use.
  496. #
  497. # acl aclname time [day-abbrevs] [h1:m1-h2:m2]
  498. # # [fast]
  499. # # day-abbrevs:
  500. # # S - Sunday
  501. # # M - Monday
  502. # # T - Tuesday
  503. # # W - Wednesday
  504. # # H - Thursday
  505. # # F - Friday
  506. # # A - Saturday
  507. # # h1:m1 must be less than h2:m2
  508. #
  509. # acl aclname url_regex [-i] ^http:// ...
  510. # # regex matching on whole URL [fast]
  511. # acl aclname urlpath_regex [-i] \.gif$ ...
  512. # # regex matching on URL path [fast]
  513. #
  514. # acl aclname port 80 70 21 0-1024... # destination TCP port [fast]
  515. # # ranges are alloed
  516. # acl aclname myport 3128 ... # local socket TCP port [fast]
  517. # acl aclname myportname 3128 ... # http(s)_port name [fast]
  518. #
  519. # acl aclname proto HTTP FTP ... # request protocol [fast]
  520. #
  521. # acl aclname method GET POST ... # HTTP request method [fast]
  522. #
  523. # acl aclname http_status 200 301 500- 400-403 ...
  524. # # status code in reply [fast]
  525. #
  526. # acl aclname browser [-i] regexp ...
  527. # # pattern match on User-Agent header (see also req_header below) [fast]
  528. #
  529. # acl aclname referer_regex [-i] regexp ...
  530. # # pattern match on Referer header [fast]
  531. # # Referer is highly unreliable, so use with care
  532. #
  533. # acl aclname ident username ...
  534. # acl aclname ident_regex [-i] pattern ...
  535. # # string match on ident output [slow]
  536. # # use REQUIRED to accept any non-null ident.
  537. #
  538. # acl aclname proxy_auth [-i] username ...
  539. # acl aclname proxy_auth_regex [-i] pattern ...
  540. # # perform http authentication challenge to the client and match against
  541. # # supplied credentials [slow]
  542. # #
  543. # # takes a list of allowed usernames.
  544. # # use REQUIRED to accept any valid username.
  545. # #
  546. # # Will use proxy authentication in forward-proxy scenarios, and plain
  547. # # http authenticaiton in reverse-proxy scenarios
  548. # #
  549. # # NOTE: when a Proxy-Authentication header is sent but it is not
  550. # # needed during ACL checking the username is NOT logged
  551. # # in access.log.
  552. # #
  553. # # NOTE: proxy_auth requires a EXTERNAL authentication program
  554. # # to check username/password combinations (see
  555. # # auth_param directive).
  556. # #
  557. # # NOTE: proxy_auth can't be used in a transparent/intercepting proxy
  558. # # as the browser needs to be configured for using a proxy in order
  559. # # to respond to proxy authentication.
  560. #
  561. # acl aclname snmp_community string ...
  562. # # A community string to limit access to your SNMP Agent [fast]
  563. # # Example:
  564. # #
  565. # # acl snmppublic snmp_community public
  566. #
  567. # acl aclname maxconn number
  568. # # This will be matched when the client's IP address has
  569. # # more than <number> HTTP connections established. [fast]
  570. #
  571. # acl aclname max_user_ip [-s] number
  572. # # This will be matched when the user attempts to log in from more
  573. # # than <number> different ip addresses. The authenticate_ip_ttl
  574. # # parameter controls the timeout on the ip entries. [fast]
  575. # # If -s is specified the limit is strict, denying browsing
  576. # # from any further IP addresses until the ttl has expired. Without
  577. # # -s Squid will just annoy the user by "randomly" denying requests.
  578. # # (the counter is reset each time the limit is reached and a
  579. # # request is denied)
  580. # # NOTE: in acceleration mode or where there is mesh of child proxies,
  581. # # clients may appear to come from multiple addresses if they are
  582. # # going through proxy farms, so a limit of 1 may cause user problems.
  583. #
  584. # acl aclname req_mime_type [-i] mime-type ...
  585. # # regex match against the mime type of the request generated
  586. # # by the client. Can be used to detect file upload or some
  587. # # types HTTP tunneling requests [fast]
  588. # # NOTE: This does NOT match the reply. You cannot use this
  589. # # to match the returned file type.
  590. #
  591. # acl aclname req_header header-name [-i] any\.regex\.here
  592. # # regex match against any of the known request headers. May be
  593. # # thought of as a superset of "browser", "referer" and "mime-type"
  594. # # ACL [fast]
  595. #
  596. # acl aclname rep_mime_type [-i] mime-type ...
  597. # # regex match against the mime type of the reply received by
  598. # # squid. Can be used to detect file download or some
  599. # # types HTTP tunneling requests. [fast]
  600. # # NOTE: This has no effect in http_access rules. It only has
  601. # # effect in rules that affect the reply data stream such as
  602. # # http_reply_access.
  603. #
  604. # acl aclname rep_header header-name [-i] any\.regex\.here
  605. # # regex match against any of the known reply headers. May be
  606. # # thought of as a superset of "browser", "referer" and "mime-type"
  607. # # ACLs [fast]
  608. #
  609. # acl aclname external class_name [arguments...]
  610. # # external ACL lookup via a helper class defined by the
  611. # # external_acl_type directive [slow]
  612. #
  613. # acl aclname user_cert attribute values...
  614. # # match against attributes in a user SSL certificate
  615. # # attribute is one of DN/C/O/CN/L/ST [fast]
  616. #
  617. # acl aclname ca_cert attribute values...
  618. # # match against attributes a users issuing CA SSL certificate
  619. # # attribute is one of DN/C/O/CN/L/ST [fast]
  620. #
  621. # acl aclname ext_user username ...
  622. # acl aclname ext_user_regex [-i] pattern ...
  623. # # string match on username returned by external acl helper [slow]
  624. # # use REQUIRED to accept any non-null user name.
  625. #
  626. # acl aclname tag tagvalue ...
  627. # # string match on tag returned by external acl helper [slow]
  628. #
  629. # Examples:
  630. # acl macaddress arp 09:00:2b:23:45:67
  631. # acl myexample dst_as 1241
  632. # acl password proxy_auth REQUIRED
  633. # acl fileupload req_mime_type -i ^multipart/form-data$
  634. # acl javascript rep_mime_type -i ^application/x-javascript$
  635. #
  636. #Default:
  637. # acl all src all
  638. #
  639. #
  640. # Recommended minimum configuration:
  641. #
  642. acl manager proto cache_object
  643. acl localhost src 127.0.0.1/32 ::1
  644. acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
  645.  
  646. # Example rule allowing access from your local networks.
  647. # Adapt to list your (internal) IP networks from where browsing
  648. # should be allowed
  649. #acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
  650. #acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
  651. #acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
  652. #acl localnet src fc00::/7 # RFC 4193 local private network range
  653. #acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
  654.  
  655. acl SSL_ports port 443
  656. acl Safe_ports port 80 # http
  657. acl Safe_ports port 21 # ftp
  658. acl Safe_ports port 443 # https
  659. acl Safe_ports port 70 # gopher
  660. acl Safe_ports port 210 # wais
  661. acl Safe_ports port 1025-65535 # unregistered ports
  662. acl Safe_ports port 280 # http-mgmt
  663. acl Safe_ports port 488 # gss-http
  664. acl Safe_ports port 591 # filemaker
  665. acl Safe_ports port 777 # multiling http
  666. acl CONNECT method CONNECT
  667.  
  668. # TAG: follow_x_forwarded_for
  669. # Allowing or Denying the X-Forwarded-For header to be followed to
  670. # find the original source of a request.
  671. #
  672. # Requests may pass through a chain of several other proxies
  673. # before reaching us. The X-Forwarded-For header will contain a
  674. # comma-separated list of the IP addresses in the chain, with the
  675. # rightmost address being the most recent.
  676. #
  677. # If a request reaches us from a source that is allowed by this
  678. # configuration item, then we consult the X-Forwarded-For header
  679. # to see where that host received the request from. If the
  680. # X-Forwarded-For header contains multiple addresses, we continue
  681. # backtracking until we reach an address for which we are not allowed
  682. # to follow the X-Forwarded-For header, or until we reach the first
  683. # address in the list. For the purpose of ACL used in the
  684. # follow_x_forwarded_for directive the src ACL type always matches
  685. # the address we are testing and srcdomain matches its rDNS.
  686. #
  687. # The end result of this process is an IP address that we will
  688. # refer to as the indirect client address. This address may
  689. # be treated as the client address for access control, ICAP, delay
  690. # pools and logging, depending on the acl_uses_indirect_client,
  691. # icap_uses_indirect_client, delay_pool_uses_indirect_client and
  692. # log_uses_indirect_client options.
  693. #
  694. # This clause only supports fast acl types.
  695. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  696. #
  697. # SECURITY CONSIDERATIONS:
  698. #
  699. # Any host for which we follow the X-Forwarded-For header
  700. # can place incorrect information in the header, and Squid
  701. # will use the incorrect information as if it were the
  702. # source address of the request. This may enable remote
  703. # hosts to bypass any access control restrictions that are
  704. # based on the client's source addresses.
  705. #
  706. # For example:
  707. #
  708. # acl localhost src 127.0.0.1
  709. # acl my_other_proxy srcdomain .proxy.example.com
  710. # follow_x_forwarded_for allow localhost
  711. # follow_x_forwarded_for allow my_other_proxy
  712. #Default:
  713. # follow_x_forwarded_for deny all
  714.  
  715. # TAG: acl_uses_indirect_client on|off
  716. # Controls whether the indirect client address
  717. # (see follow_x_forwarded_for) is used instead of the
  718. # direct client address in acl matching.
  719. #Default:
  720. # acl_uses_indirect_client on
  721.  
  722. # TAG: delay_pool_uses_indirect_client on|off
  723. # Controls whether the indirect client address
  724. # (see follow_x_forwarded_for) is used instead of the
  725. # direct client address in delay pools.
  726. #Default:
  727. # delay_pool_uses_indirect_client on
  728.  
  729. # TAG: log_uses_indirect_client on|off
  730. # Controls whether the indirect client address
  731. # (see follow_x_forwarded_for) is used instead of the
  732. # direct client address in the access log.
  733. #Default:
  734. # log_uses_indirect_client on
  735.  
  736. # TAG: http_access
  737. # Allowing or Denying access based on defined access lists
  738. #
  739. # Access to the HTTP port:
  740. # http_access allow|deny [!]aclname ...
  741. #
  742. # NOTE on default values:
  743. #
  744. # If there are no "access" lines present, the default is to deny
  745. # the request.
  746. #
  747. # If none of the "access" lines cause a match, the default is the
  748. # opposite of the last line in the list. If the last line was
  749. # deny, the default is allow. Conversely, if the last line
  750. # is allow, the default will be deny. For these reasons, it is a
  751. # good idea to have an "deny all" entry at the end of your access
  752. # lists to avoid potential confusion.
  753. #
  754. # This clause supports both fast and slow acl types.
  755. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  756. #
  757. #Default:
  758. http_access allow all
  759. #
  760.  
  761. #
  762. # Recommended minimum Access Permission configuration:
  763. #
  764. # Only allow cachemgr access from localhost
  765. #http_access allow manager localhost
  766. #http_access deny manager
  767.  
  768. # Deny requests to certain unsafe ports
  769. #http_access deny !Safe_ports
  770.  
  771. # Deny CONNECT to other than secure SSL ports
  772. #http_access deny CONNECT !SSL_ports
  773.  
  774. # We strongly recommend the following be uncommented to protect innocent
  775. # web applications running on the proxy server who think the only
  776. # one who can access services on "localhost" is a local user
  777. #http_access deny to_localhost
  778.  
  779. #
  780. # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
  781. #
  782.  
  783. # Example rule allowing access from your local networks.
  784. # Adapt localnet in the ACL section to list your (internal) IP networks
  785. # from where browsing should be allowed
  786. #http_access allow localnet
  787. http_access allow localhost
  788.  
  789. # And finally deny all other access to this proxy
  790. #http_access deny all
  791.  
  792. # TAG: adapted_http_access
  793. # Allowing or Denying access based on defined access lists
  794. #
  795. # Essentially identical to http_access, but runs after redirectors
  796. # and ICAP/eCAP adaptation. Allowing access control based on their
  797. # output.
  798. #
  799. # If not set then only http_access is used.
  800. #Default:
  801. # none
  802.  
  803. # TAG: http_reply_access
  804. # Allow replies to client requests. This is complementary to http_access.
  805. #
  806. # http_reply_access allow|deny [!] aclname ...
  807. #
  808. # NOTE: if there are no access lines present, the default is to allow
  809. # all replies
  810. #
  811. # If none of the access lines cause a match the opposite of the
  812. # last line will apply. Thus it is good practice to end the rules
  813. # with an "allow all" or "deny all" entry.
  814. #
  815. # This clause supports both fast and slow acl types.
  816. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  817. #Default:
  818. # none
  819.  
  820. # TAG: icp_access
  821. # Allowing or Denying access to the ICP port based on defined
  822. # access lists
  823. #
  824. # icp_access allow|deny [!]aclname ...
  825. #
  826. # See http_access for details
  827. #
  828. # This clause only supports fast acl types.
  829. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  830. #
  831. ## Allow ICP queries from local networks only
  832. ##icp_access allow localnet
  833. ##icp_access deny all
  834. #Default:
  835. # icp_access deny all
  836.  
  837. # TAG: htcp_access
  838. # Allowing or Denying access to the HTCP port based on defined
  839. # access lists
  840. #
  841. # htcp_access allow|deny [!]aclname ...
  842. #
  843. # See http_access for details
  844. #
  845. # NOTE: The default if no htcp_access lines are present is to
  846. # deny all traffic. This default may cause problems with peers
  847. # using the htcp or htcp-oldsquid options.
  848. #
  849. # This clause only supports fast acl types.
  850. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  851. #
  852. ## Allow HTCP queries from local networks only
  853. ##htcp_access allow localnet
  854. ##htcp_access deny all
  855. #Default:
  856. # htcp_access deny all
  857.  
  858. # TAG: htcp_clr_access
  859. # Allowing or Denying access to purge content using HTCP based
  860. # on defined access lists
  861. #
  862. # htcp_clr_access allow|deny [!]aclname ...
  863. #
  864. # See http_access for details
  865. #
  866. # This clause only supports fast acl types.
  867. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  868. #
  869. ## Allow HTCP CLR requests from trusted peers
  870. #acl htcp_clr_peer src 172.16.1.2
  871. #htcp_clr_access allow htcp_clr_peer
  872. #Default:
  873. # htcp_clr_access deny all
  874.  
  875. # TAG: miss_access
  876. # Use to force your neighbors to use you as a sibling instead of
  877. # a parent. For example:
  878. #
  879. # acl localclients src 172.16.0.0/16
  880. # miss_access allow localclients
  881. # miss_access deny !localclients
  882. #
  883. # This means only your local clients are allowed to fetch
  884. # MISSES and all other clients can only fetch HITS.
  885. #
  886. # By default, allow all clients who passed the http_access rules
  887. # to fetch MISSES from us.
  888. #
  889. # This clause only supports fast acl types.
  890. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  891. #Default:
  892. # miss_access allow all
  893.  
  894. # TAG: ident_lookup_access
  895. # A list of ACL elements which, if matched, cause an ident
  896. # (RFC 931) lookup to be performed for this request. For
  897. # example, you might choose to always perform ident lookups
  898. # for your main multi-user Unix boxes, but not for your Macs
  899. # and PCs. By default, ident lookups are not performed for
  900. # any requests.
  901. #
  902. # To enable ident lookups for specific client addresses, you
  903. # can follow this example:
  904. #
  905. # acl ident_aware_hosts src 198.168.1.0/24
  906. # ident_lookup_access allow ident_aware_hosts
  907. # ident_lookup_access deny all
  908. #
  909. # Only src type ACL checks are fully supported. A srcdomain
  910. # ACL might work at times, but it will not always provide
  911. # the correct result.
  912. #
  913. # This clause only supports fast acl types.
  914. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  915. #Default:
  916. # ident_lookup_access deny all
  917.  
  918. # TAG: reply_body_max_size size [acl acl...]
  919. # This option specifies the maximum size of a reply body. It can be
  920. # used to prevent users from downloading very large files, such as
  921. # MP3's and movies. When the reply headers are received, the
  922. # reply_body_max_size lines are processed, and the first line where
  923. # all (if any) listed ACLs are true is used as the maximum body size
  924. # for this reply.
  925. #
  926. # This size is checked twice. First when we get the reply headers,
  927. # we check the content-length value. If the content length value exists
  928. # and is larger than the allowed size, the request is denied and the
  929. # user receives an error message that says "the request or reply
  930. # is too large." If there is no content-length, and the reply
  931. # size exceeds this limit, the client's connection is just closed
  932. # and they will receive a partial reply.
  933. #
  934. # WARNING: downstream caches probably can not detect a partial reply
  935. # if there is no content-length header, so they will cache
  936. # partial responses and give them out as hits. You should NOT
  937. # use this option if you have downstream caches.
  938. #
  939. # WARNING: A maximum size smaller than the size of squid's error messages
  940. # will cause an infinite loop and crash squid. Ensure that the smallest
  941. # non-zero value you use is greater that the maximum header size plus
  942. # the size of your largest error page.
  943. #
  944. # If you set this parameter none (the default), there will be
  945. # no limit imposed.
  946. #
  947. # Configuration Format is:
  948. # reply_body_max_size SIZE UNITS [acl ...]
  949. # ie.
  950. # reply_body_max_size 10 MB
  951. #
  952. #Default:
  953. # none
  954.  
  955. # NETWORK OPTIONS
  956. # -----------------------------------------------------------------------------
  957.  
  958. # TAG: http_port
  959. # Usage: port [options]
  960. # hostname:port [options]
  961. # 1.2.3.4:port [options]
  962. #
  963. # The socket addresses where Squid will listen for HTTP client
  964. # requests. You may specify multiple socket addresses.
  965. # There are three forms: port alone, hostname with port, and
  966. # IP address with port. If you specify a hostname or IP
  967. # address, Squid binds the socket to that specific
  968. # address. This replaces the old 'tcp_incoming_address'
  969. # option. Most likely, you do not need to bind to a specific
  970. # address, so you can use the port number alone.
  971. #
  972. # If you are running Squid in accelerator mode, you
  973. # probably want to listen on port 80 also, or instead.
  974. #
  975. # The -a command line option may be used to specify additional
  976. # port(s) where Squid listens for proxy request. Such ports will
  977. # be plain proxy ports with no options.
  978. #
  979. # You may specify multiple socket addresses on multiple lines.
  980. #
  981. # Options:
  982. #
  983. # intercept Support for IP-Layer interception of
  984. # outgoing requests without browser settings.
  985. # NP: disables authentication and IPv6 on the port.
  986. #
  987. # tproxy Support Linux TPROXY for spoofing outgoing
  988. # connections using the client IP address.
  989. # NP: disables authentication and maybe IPv6 on the port.
  990. #
  991. # accel Accelerator mode. Also needs at least one of
  992. # vhost / vport / defaultsite.
  993. #
  994. # allow-direct Allow direct forwarding in accelerator mode. Normally
  995. # accelerated requests are denied direct forwarding as if
  996. # never_direct was used.
  997. #
  998. # defaultsite=domainname
  999. # What to use for the Host: header if it is not present
  1000. # in a request. Determines what site (not origin server)
  1001. # accelerators should consider the default.
  1002. # Implies accel.
  1003. #
  1004. # vhost Accelerator mode using Host header for virtual
  1005. # domain support. Implies accel.
  1006. #
  1007. # vport Accelerator with IP based virtual host support.
  1008. # Implies accel.
  1009. #
  1010. # vport=NN As above, but uses specified port number rather
  1011. # than the http_port number. Implies accel.
  1012. #
  1013. # protocol= Protocol to reconstruct accelerated requests with.
  1014. # Defaults to http.
  1015. #
  1016. # ignore-cc Ignore request Cache-Control headers.
  1017. #
  1018. # Warning: This option violates HTTP specifications if
  1019. # used in non-accelerator setups.
  1020. #
  1021. # connection-auth[=on|off]
  1022. # use connection-auth=off to tell Squid to prevent
  1023. # forwarding Microsoft connection oriented authentication
  1024. # (NTLM, Negotiate and Kerberos)
  1025. #
  1026. # disable-pmtu-discovery=
  1027. # Control Path-MTU discovery usage:
  1028. # off lets OS decide on what to do (default).
  1029. # transparent disable PMTU discovery when transparent
  1030. # support is enabled.
  1031. # always disable always PMTU discovery.
  1032. #
  1033. # In many setups of transparently intercepting proxies
  1034. # Path-MTU discovery can not work on traffic towards the
  1035. # clients. This is the case when the intercepting device
  1036. # does not fully track connections and fails to forward
  1037. # ICMP must fragment messages to the cache server. If you
  1038. # have such setup and experience that certain clients
  1039. # sporadically hang or never complete requests set
  1040. # disable-pmtu-discovery option to 'transparent'.
  1041. #
  1042. # sslBump Intercept each CONNECT request matching ssl_bump ACL,
  1043. # establish secure connection with the client and with
  1044. # the server, decrypt HTTP messages as they pass through
  1045. # Squid, and treat them as unencrypted HTTP messages,
  1046. # becoming the man-in-the-middle.
  1047. #
  1048. # When this option is enabled, additional options become
  1049. # available to specify SSL-related properties of the
  1050. # client-side connection: cert, key, version, cipher,
  1051. # options, clientca, cafile, capath, crlfile, dhparams,
  1052. # sslflags, and sslcontext. See the https_port directive
  1053. # for more information on these options.
  1054. #
  1055. # The ssl_bump option is required to fully enable
  1056. # the SslBump feature.
  1057. #
  1058. # name= Specifies a internal name for the port. Defaults to
  1059. # the port specification (port or addr:port)
  1060. #
  1061. # tcpkeepalive[=idle,interval,timeout]
  1062. # Enable TCP keepalive probes of idle connections.
  1063. # In seconds; idle is the initial time before TCP starts
  1064. # probing the connection, interval how often to probe, and
  1065. # timeout the time before giving up.
  1066. #
  1067. # If you run Squid on a dual-homed machine with an internal
  1068. # and an external interface we recommend you to specify the
  1069. # internal address:port in http_port. This way Squid will only be
  1070. # visible on the internal address.
  1071. #
  1072. #
  1073.  
  1074. # Squid normally listens to port 3128
  1075. http_port 3128 transparent
  1076.  
  1077. # TAG: https_port
  1078. # Note: This option is only available if Squid is rebuilt with the
  1079. # --enable-ssl option
  1080. #
  1081. # Usage: [ip:]port cert=certificate.pem [key=key.pem] [options...]
  1082. #
  1083. # The socket address where Squid will listen for HTTPS client
  1084. # requests.
  1085. #
  1086. # This is really only useful for situations where you are running
  1087. # squid in accelerator mode and you want to do the SSL work at the
  1088. # accelerator level.
  1089. #
  1090. # You may specify multiple socket addresses on multiple lines,
  1091. # each with their own SSL certificate and/or options.
  1092. #
  1093. # Options:
  1094. #
  1095. # accel Accelerator mode. Also needs at least one of
  1096. # defaultsite or vhost.
  1097. #
  1098. # defaultsite= The name of the https site presented on
  1099. # this port. Implies accel.
  1100. #
  1101. # vhost Accelerator mode using Host header for virtual
  1102. # domain support. Requires a wildcard certificate
  1103. # or other certificate valid for more than one domain.
  1104. # Implies accel.
  1105. #
  1106. # protocol= Protocol to reconstruct accelerated requests with.
  1107. # Defaults to https.
  1108. #
  1109. # cert= Path to SSL certificate (PEM format).
  1110. #
  1111. # key= Path to SSL private key file (PEM format)
  1112. # if not specified, the certificate file is
  1113. # assumed to be a combined certificate and
  1114. # key file.
  1115. #
  1116. # version= The version of SSL/TLS supported
  1117. # 1 automatic (default)
  1118. # 2 SSLv2 only
  1119. # 3 SSLv3 only
  1120. # 4 TLSv1 only
  1121. #
  1122. # cipher= Colon separated list of supported ciphers.
  1123. #
  1124. # options= Various SSL engine options. The most important
  1125. # being:
  1126. # NO_SSLv2 Disallow the use of SSLv2
  1127. # NO_SSLv3 Disallow the use of SSLv3
  1128. # NO_TLSv1 Disallow the use of TLSv1
  1129. # SINGLE_DH_USE Always create a new key when using
  1130. # temporary/ephemeral DH key exchanges
  1131. # See src/ssl_support.c or OpenSSL SSL_CTX_set_options
  1132. # documentation for a complete list of options.
  1133. #
  1134. # clientca= File containing the list of CAs to use when
  1135. # requesting a client certificate.
  1136. #
  1137. # cafile= File containing additional CA certificates to
  1138. # use when verifying client certificates. If unset
  1139. # clientca will be used.
  1140. #
  1141. # capath= Directory containing additional CA certificates
  1142. # and CRL lists to use when verifying client certificates.
  1143. #
  1144. # crlfile= File of additional CRL lists to use when verifying
  1145. # the client certificate, in addition to CRLs stored in
  1146. # the capath. Implies VERIFY_CRL flag below.
  1147. #
  1148. # dhparams= File containing DH parameters for temporary/ephemeral
  1149. # DH key exchanges.
  1150. #
  1151. # sslflags= Various flags modifying the use of SSL:
  1152. # DELAYED_AUTH
  1153. # Don't request client certificates
  1154. # immediately, but wait until acl processing
  1155. # requires a certificate (not yet implemented).
  1156. # NO_DEFAULT_CA
  1157. # Don't use the default CA lists built in
  1158. # to OpenSSL.
  1159. # NO_SESSION_REUSE
  1160. # Don't allow for session reuse. Each connection
  1161. # will result in a new SSL session.
  1162. # VERIFY_CRL
  1163. # Verify CRL lists when accepting client
  1164. # certificates.
  1165. # VERIFY_CRL_ALL
  1166. # Verify CRL lists for all certificates in the
  1167. # client certificate chain.
  1168. #
  1169. # sslcontext= SSL session ID context identifier.
  1170. #
  1171. # vport Accelerator with IP based virtual host support.
  1172. #
  1173. # vport=NN As above, but uses specified port number rather
  1174. # than the https_port number. Implies accel.
  1175. #
  1176. # name= Specifies a internal name for the port. Defaults to
  1177. # the port specification (port or addr:port)
  1178. #
  1179. #Default:
  1180. # none
  1181.  
  1182. # TAG: tcp_outgoing_tos
  1183. # Allows you to select a TOS/Diffserv value to mark outgoing
  1184. # connections with, based on the username or source address
  1185. # making the request.
  1186. #
  1187. # tcp_outgoing_tos ds-field [!]aclname ...
  1188. #
  1189. # Example where normal_service_net uses the TOS value 0x00
  1190. # and good_service_net uses 0x20
  1191. #
  1192. # acl normal_service_net src 10.0.0.0/255.255.255.0
  1193. # acl good_service_net src 10.0.1.0/255.255.255.0
  1194. # tcp_outgoing_tos 0x00 normal_service_net
  1195. # tcp_outgoing_tos 0x20 good_service_net
  1196. #
  1197. # TOS/DSCP values really only have local significance - so you should
  1198. # know what you're specifying. For more information, see RFC2474,
  1199. # RFC2475, and RFC3260.
  1200. #
  1201. # The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
  1202. # "default" to use whatever default your host has. Note that in
  1203. # practice often only values 0 - 63 is usable as the two highest bits
  1204. # have been redefined for use by ECN (RFC3168).
  1205. #
  1206. # Processing proceeds in the order specified, and stops at first fully
  1207. # matching line.
  1208. #
  1209. # Note: The use of this directive using client dependent ACLs is
  1210. # incompatible with the use of server side persistent connections. To
  1211. # ensure correct results it is best to set server_persisten_connections
  1212. # to off when using this directive in such configurations.
  1213. #Default:
  1214. # none
  1215.  
  1216. # TAG: clientside_tos
  1217. # Allows you to select a TOS/Diffserv value to mark client-side
  1218. # connections with, based on the username or source address
  1219. # making the request.
  1220. #Default:
  1221. # none
  1222.  
  1223. # TAG: qos_flows
  1224. # Note: This option is only available if Squid is rebuilt with the
  1225. # --enable-zph-qos option
  1226. #
  1227. # Allows you to select a TOS/DSCP value to mark outgoing
  1228. # connections with, based on where the reply was sourced.
  1229. #
  1230. # TOS values really only have local significance - so you should
  1231. # know what you're specifying. For more information, see RFC2474,
  1232. # RFC2475, and RFC3260.
  1233. #
  1234. # The TOS/DSCP byte must be exactly that - octet value 0x00-0xFF.
  1235. # Note that in practice often only values up to 0x3F are usable
  1236. # as the two highest bits have been redefined for use by ECN
  1237. # (RFC3168).
  1238. #
  1239. # This setting is configured by setting the source TOS values:
  1240. #
  1241. # local-hit=0xFF Value to mark local cache hits.
  1242. #
  1243. # sibling-hit=0xFF Value to mark hits from sibling peers.
  1244. #
  1245. # parent-hit=0xFF Value to mark hits from parent peers.
  1246. #
  1247. #
  1248. # NOTE: 'miss' preserve feature is only possible on Linux at this time.
  1249. #
  1250. # For the following to work correctly, you will need to patch your
  1251. # linux kernel with the TOS preserving ZPH patch.
  1252. # The kernel patch can be downloaded from http://zph.bratcheda.org
  1253. #
  1254. # disable-preserve-miss
  1255. # By default, the existing TOS value of the response coming
  1256. # from the remote server will be retained and masked with
  1257. # miss-mark. This option disables that feature.
  1258. #
  1259. # miss-mask=0xFF
  1260. # Allows you to mask certain bits in the TOS received from the
  1261. # remote server, before copying the value to the TOS sent
  1262. # towards clients.
  1263. # Default: 0xFF (TOS from server is not changed).
  1264. #
  1265. #Default:
  1266. # none
  1267.  
  1268. # TAG: tcp_outgoing_address
  1269. # Allows you to map requests to different outgoing IP addresses
  1270. # based on the username or source address of the user making
  1271. # the request.
  1272. #
  1273. # tcp_outgoing_address ipaddr [[!]aclname] ...
  1274. #
  1275. # Example where requests from 10.0.0.0/24 will be forwarded
  1276. # with source address 10.1.0.1, 10.0.2.0/24 forwarded with
  1277. # source address 10.1.0.2 and the rest will be forwarded with
  1278. # source address 10.1.0.3.
  1279. #
  1280. # acl normal_service_net src 10.0.0.0/24
  1281. # acl good_service_net src 10.0.2.0/24
  1282. # tcp_outgoing_address 10.1.0.1 normal_service_net
  1283. # tcp_outgoing_address 10.1.0.2 good_service_net
  1284. # tcp_outgoing_address 10.1.0.3
  1285. #
  1286. # Processing proceeds in the order specified, and stops at first fully
  1287. # matching line.
  1288. #
  1289. # Note: The use of this directive using client dependent ACLs is
  1290. # incompatible with the use of server side persistent connections. To
  1291. # ensure correct results it is best to set server_persistent_connections
  1292. # to off when using this directive in such configurations.
  1293. #
  1294. #
  1295. # IPv6 Magic:
  1296. #
  1297. # Squid is built with a capability of bridging the IPv4 and IPv6
  1298. # internets.
  1299. # tcp_outgoing_address as exampled above breaks this bridging by forcing
  1300. # all outbound traffic through a certain IPv4 which may be on the wrong
  1301. # side of the IPv4/IPv6 boundary.
  1302. #
  1303. # To operate with tcp_outgoing_address and keep the bridging benefits
  1304. # an additional ACL needs to be used which ensures the IPv6-bound traffic
  1305. # is never forced or permitted out the IPv4 interface.
  1306. #
  1307. # acl to_ipv6 dst ipv6
  1308. # tcp_outgoing_address 2002::c001 good_service_net to_ipv6
  1309. # tcp_outgoing_address 10.1.0.2 good_service_net !to_ipv6
  1310. #
  1311. # tcp_outgoing_address 2002::beef normal_service_net to_ipv6
  1312. # tcp_outgoing_address 10.1.0.1 normal_service_net !to_ipv6
  1313. #
  1314. # tcp_outgoing_address 2002::1 to_ipv6
  1315. # tcp_outgoing_address 10.1.0.3 !to_ipv6
  1316. #
  1317. # WARNING:
  1318. # 'dst ipv6' bases its selection assuming DIRECT access.
  1319. # If peers are used the peername ACL are needed to select outgoing
  1320. # address which can link to the peer.
  1321. #
  1322. # 'dst ipv6' is a slow ACL. It will only work here if 'dst' is used
  1323. # previously in the http_access rules to locate the destination IP.
  1324. # Some more magic may be needed for that:
  1325. # http_access allow to_ipv6 !all
  1326. # (meaning, allow if to IPv6 but not from anywhere ;)
  1327. #
  1328. #Default:
  1329. # none
  1330.  
  1331. # SSL OPTIONS
  1332. # -----------------------------------------------------------------------------
  1333.  
  1334. # TAG: ssl_unclean_shutdown
  1335. # Note: This option is only available if Squid is rebuilt with the
  1336. # --enable-ssl option
  1337. #
  1338. # Some browsers (especially MSIE) bugs out on SSL shutdown
  1339. # messages.
  1340. #Default:
  1341. # ssl_unclean_shutdown off
  1342.  
  1343. # TAG: ssl_engine
  1344. # Note: This option is only available if Squid is rebuilt with the
  1345. # --enable-ssl option
  1346. #
  1347. # The OpenSSL engine to use. You will need to set this if you
  1348. # would like to use hardware SSL acceleration for example.
  1349. #Default:
  1350. # none
  1351.  
  1352. # TAG: sslproxy_client_certificate
  1353. # Note: This option is only available if Squid is rebuilt with the
  1354. # --enable-ssl option
  1355. #
  1356. # Client SSL Certificate to use when proxying https:// URLs
  1357. #Default:
  1358. # none
  1359.  
  1360. # TAG: sslproxy_client_key
  1361. # Note: This option is only available if Squid is rebuilt with the
  1362. # --enable-ssl option
  1363. #
  1364. # Client SSL Key to use when proxying https:// URLs
  1365. #Default:
  1366. # none
  1367.  
  1368. # TAG: sslproxy_version
  1369. # Note: This option is only available if Squid is rebuilt with the
  1370. # --enable-ssl option
  1371. #
  1372. # SSL version level to use when proxying https:// URLs
  1373. #Default:
  1374. # sslproxy_version 1
  1375.  
  1376. # TAG: sslproxy_options
  1377. # Note: This option is only available if Squid is rebuilt with the
  1378. # --enable-ssl option
  1379. #
  1380. # SSL engine options to use when proxying https:// URLs
  1381. #
  1382. # The most important being:
  1383. #
  1384. # NO_SSLv2 Disallow the use of SSLv2
  1385. # NO_SSLv3 Disallow the use of SSLv3
  1386. # NO_TLSv1 Disallow the use of TLSv1
  1387. # SINGLE_DH_USE
  1388. # Always create a new key when using
  1389. # temporary/ephemeral DH key exchanges
  1390. #
  1391. # These options vary depending on your SSL engine.
  1392. # See the OpenSSL SSL_CTX_set_options documentation for a
  1393. # complete list of possible options.
  1394. #Default:
  1395. # none
  1396.  
  1397. # TAG: sslproxy_cipher
  1398. # Note: This option is only available if Squid is rebuilt with the
  1399. # --enable-ssl option
  1400. #
  1401. # SSL cipher list to use when proxying https:// URLs
  1402. #
  1403. # Colon separated list of supported ciphers.
  1404. #Default:
  1405. # none
  1406.  
  1407. # TAG: sslproxy_cafile
  1408. # Note: This option is only available if Squid is rebuilt with the
  1409. # --enable-ssl option
  1410. #
  1411. # file containing CA certificates to use when verifying server
  1412. # certificates while proxying https:// URLs
  1413. #Default:
  1414. # none
  1415.  
  1416. # TAG: sslproxy_capath
  1417. # Note: This option is only available if Squid is rebuilt with the
  1418. # --enable-ssl option
  1419. #
  1420. # directory containing CA certificates to use when verifying
  1421. # server certificates while proxying https:// URLs
  1422. #Default:
  1423. # none
  1424.  
  1425. # TAG: ssl_bump
  1426. # Note: This option is only available if Squid is rebuilt with the
  1427. # --enable-ssl option
  1428. #
  1429. # This ACL controls which CONNECT requests to an http_port
  1430. # marked with an sslBump flag are actually "bumped". Please
  1431. # see the sslBump flag of an http_port option for more details
  1432. # about decoding proxied SSL connections.
  1433. #
  1434. # By default, no requests are bumped.
  1435. #
  1436. # See also: http_port sslBump
  1437. #
  1438. # This clause only supports fast acl types.
  1439. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  1440. #
  1441. #
  1442. # # Example: Bump all requests except those originating from localhost and
  1443. # # those going to webax.com or example.com sites.
  1444. #
  1445. # acl localhost src 127.0.0.1/32
  1446. # acl broken_sites dstdomain .webax.com
  1447. # acl broken_sites dstdomain .example.com
  1448. # ssl_bump deny localhost
  1449. # ssl_bump deny broken_sites
  1450. # ssl_bump allow all
  1451. #Default:
  1452. # none
  1453.  
  1454. # TAG: sslproxy_flags
  1455. # Note: This option is only available if Squid is rebuilt with the
  1456. # --enable-ssl option
  1457. #
  1458. # Various flags modifying the use of SSL while proxying https:// URLs:
  1459. # DONT_VERIFY_PEER Accept certificates that fail verification.
  1460. # For refined control, see sslproxy_cert_error.
  1461. # NO_DEFAULT_CA Don't use the default CA list built in
  1462. # to OpenSSL.
  1463. #Default:
  1464. # none
  1465.  
  1466. # TAG: sslproxy_cert_error
  1467. # Note: This option is only available if Squid is rebuilt with the
  1468. # --enable-ssl option
  1469. #
  1470. # Use this ACL to bypass server certificate validation errors.
  1471. #
  1472. # For example, the following lines will bypass all validation errors
  1473. # when talking to servers located at 172.16.0.0/16. All other
  1474. # validation errors will result in ERR_SECURE_CONNECT_FAIL error.
  1475. #
  1476. # acl BrokenServersAtTrustedIP dst 172.16.0.0/16
  1477. # sslproxy_cert_error allow BrokenServersAtTrustedIP
  1478. # sslproxy_cert_error deny all
  1479. #
  1480. # This clause only supports fast acl types.
  1481. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  1482. # Using slow acl types may result in server crashes
  1483. #
  1484. # Without this option, all server certificate validation errors
  1485. # terminate the transaction. Bypassing validation errors is dangerous
  1486. # because an error usually implies that the server cannot be trusted and
  1487. # the connection may be insecure.
  1488. #
  1489. # See also: sslproxy_flags and DONT_VERIFY_PEER.
  1490. #
  1491. # Default setting: sslproxy_cert_error deny all
  1492. #Default:
  1493. # none
  1494.  
  1495. # TAG: sslpassword_program
  1496. # Note: This option is only available if Squid is rebuilt with the
  1497. # --enable-ssl option
  1498. #
  1499. # Specify a program used for entering SSL key passphrases
  1500. # when using encrypted SSL certificate keys. If not specified
  1501. # keys must either be unencrypted, or Squid started with the -N
  1502. # option to allow it to query interactively for the passphrase.
  1503. #Default:
  1504. # none
  1505.  
  1506. # OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
  1507. # -----------------------------------------------------------------------------
  1508.  
  1509. # TAG: cache_peer
  1510. # To specify other caches in a hierarchy, use the format:
  1511. #
  1512. # cache_peer hostname type http-port icp-port [options]
  1513. #
  1514. # For example,
  1515. #
  1516. # # proxy icp
  1517. # # hostname type port port options
  1518. # # -------------------- -------- ----- ----- -----------
  1519. # cache_peer parent.foo.net parent 3128 3130 default
  1520. # cache_peer sib1.foo.net sibling 3128 3130 proxy-only
  1521. # cache_peer sib2.foo.net sibling 3128 3130 proxy-only
  1522. # cache_peer example.com parent 80 0 no-query default
  1523. # cache_peer cdn.example.com sibling 3128 0
  1524. #
  1525. # type: either 'parent', 'sibling', or 'multicast'.
  1526. #
  1527. # proxy-port: The port number where the peer accept HTTP requests.
  1528. # For other Squid proxies this is usually 3128
  1529. # For web servers this is usually 80
  1530. #
  1531. # icp-port: Used for querying neighbor caches about objects.
  1532. # Set to 0 if the peer does not support ICP or HTCP.
  1533. # See ICP and HTCP options below for additional details.
  1534. #
  1535. #
  1536. # ==== ICP OPTIONS ====
  1537. #
  1538. # You MUST also set icp_port and icp_access explicitly when using these options.
  1539. # The defaults will prevent peer traffic using ICP.
  1540. #
  1541. #
  1542. # no-query Disable ICP queries to this neighbor.
  1543. #
  1544. # multicast-responder
  1545. # Indicates the named peer is a member of a multicast group.
  1546. # ICP queries will not be sent directly to the peer, but ICP
  1547. # replies will be accepted from it.
  1548. #
  1549. # closest-only Indicates that, for ICP_OP_MISS replies, we'll only forward
  1550. # CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes.
  1551. #
  1552. # background-ping
  1553. # To only send ICP queries to this neighbor infrequently.
  1554. # This is used to keep the neighbor round trip time updated
  1555. # and is usually used in conjunction with weighted-round-robin.
  1556. #
  1557. #
  1558. # ==== HTCP OPTIONS ====
  1559. #
  1560. # You MUST also set htcp_port and htcp_access explicitly when using these options.
  1561. # The defaults will prevent peer traffic using HTCP.
  1562. #
  1563. #
  1564. # htcp Send HTCP, instead of ICP, queries to the neighbor.
  1565. # You probably also want to set the "icp-port" to 4827
  1566. # instead of 3130.
  1567. #
  1568. # htcp-oldsquid Send HTCP to old Squid versions.
  1569. #
  1570. # htcp-no-clr Send HTCP to the neighbor but without
  1571. # sending any CLR requests. This cannot be used with
  1572. # htcp-only-clr.
  1573. #
  1574. # htcp-only-clr Send HTCP to the neighbor but ONLY CLR requests.
  1575. # This cannot be used with htcp-no-clr.
  1576. #
  1577. # htcp-no-purge-clr
  1578. # Send HTCP to the neighbor including CLRs but only when
  1579. # they do not result from PURGE requests.
  1580. #
  1581. # htcp-forward-clr
  1582. # Forward any HTCP CLR requests this proxy receives to the peer.
  1583. #
  1584. #
  1585. # ==== PEER SELECTION METHODS ====
  1586. #
  1587. # The default peer selection method is ICP, with the first responding peer
  1588. # being used as source. These options can be used for better load balancing.
  1589. #
  1590. #
  1591. # default This is a parent cache which can be used as a "last-resort"
  1592. # if a peer cannot be located by any of the peer-selection methods.
  1593. # If specified more than once, only the first is used.
  1594. #
  1595. # round-robin Load-Balance parents which should be used in a round-robin
  1596. # fashion in the absence of any ICP queries.
  1597. # weight=N can be used to add bias.
  1598. #
  1599. # weighted-round-robin
  1600. # Load-Balance parents which should be used in a round-robin
  1601. # fashion with the frequency of each parent being based on the
  1602. # round trip time. Closer parents are used more often.
  1603. # Usually used for background-ping parents.
  1604. # weight=N can be used to add bias.
  1605. #
  1606. # carp Load-Balance parents which should be used as a CARP array.
  1607. # The requests will be distributed among the parents based on the
  1608. # CARP load balancing hash function based on their weight.
  1609. #
  1610. # userhash Load-balance parents based on the client proxy_auth or ident username.
  1611. #
  1612. # sourcehash Load-balance parents based on the client source IP.
  1613. #
  1614. # multicast-siblings
  1615. # To be used only for cache peers of type "multicast".
  1616. # ALL members of this multicast group have "sibling"
  1617. # relationship with it, not "parent". This is to a mulicast
  1618. # group when the requested object would be fetched only from
  1619. # a "parent" cache, anyway. It's useful, e.g., when
  1620. # configuring a pool of redundant Squid proxies, being
  1621. # members of the same multicast group.
  1622. #
  1623. #
  1624. # ==== PEER SELECTION OPTIONS ====
  1625. #
  1626. # weight=N use to affect the selection of a peer during any weighted
  1627. # peer-selection mechanisms.
  1628. # The weight must be an integer; default is 1,
  1629. # larger weights are favored more.
  1630. # This option does not affect parent selection if a peering
  1631. # protocol is not in use.
  1632. #
  1633. # basetime=N Specify a base amount to be subtracted from round trip
  1634. # times of parents.
  1635. # It is subtracted before division by weight in calculating
  1636. # which parent to fectch from. If the rtt is less than the
  1637. # base time the rtt is set to a minimal value.
  1638. #
  1639. # ttl=N Specify a IP multicast TTL to use when sending an ICP
  1640. # queries to this address.
  1641. # Only useful when sending to a multicast group.
  1642. # Because we don't accept ICP replies from random
  1643. # hosts, you must configure other group members as
  1644. # peers with the 'multicast-responder' option.
  1645. #
  1646. # no-delay To prevent access to this neighbor from influencing the
  1647. # delay pools.
  1648. #
  1649. # digest-url=URL Tell Squid to fetch the cache digest (if digests are
  1650. # enabled) for this host from the specified URL rather
  1651. # than the Squid default location.
  1652. #
  1653. #
  1654. # ==== ACCELERATOR / REVERSE-PROXY OPTIONS ====
  1655. #
  1656. # originserver Causes this parent to be contacted as an origin server.
  1657. # Meant to be used in accelerator setups when the peer
  1658. # is a web server.
  1659. #
  1660. # forceddomain=name
  1661. # Set the Host header of requests forwarded to this peer.
  1662. # Useful in accelerator setups where the server (peer)
  1663. # expects a certain domain name but clients may request
  1664. # others. ie example.com or www.example.com
  1665. #
  1666. # no-digest Disable request of cache digests.
  1667. #
  1668. # no-netdb-exchange
  1669. # Disables requesting ICMP RTT database (NetDB).
  1670. #
  1671. #
  1672. # ==== AUTHENTICATION OPTIONS ====
  1673. #
  1674. # login=user:password
  1675. # If this is a personal/workgroup proxy and your parent
  1676. # requires proxy authentication.
  1677. #
  1678. # Note: The string can include URL escapes (i.e. %20 for
  1679. # spaces). This also means % must be written as %%.
  1680. #
  1681. # login=PROXYPASS
  1682. # Send login details received from client to this peer.
  1683. # Authentication is not required, nor changed.
  1684. #
  1685. # Note: This will pass any form of authentication but
  1686. # only Basic auth will work through a proxy unless the
  1687. # connection-auth options are also used.
  1688. #
  1689. # login=PASS Send login details received from client to this peer.
  1690. # Authentication is not required by this option.
  1691. # If there are no client-provided authentication headers
  1692. # to pass on, but username and password are available
  1693. # from either proxy login or an external ACL user= and
  1694. # password= result tags they may be sent instead.
  1695. #
  1696. # Note: To combine this with proxy_auth both proxies must
  1697. # share the same user database as HTTP only allows for
  1698. # a single login (one for proxy, one for origin server).
  1699. # Also be warned this will expose your users proxy
  1700. # password to the peer. USE WITH CAUTION
  1701. #
  1702. # login=*:password
  1703. # Send the username to the upstream cache, but with a
  1704. # fixed password. This is meant to be used when the peer
  1705. # is in another administrative domain, but it is still
  1706. # needed to identify each user.
  1707. # The star can optionally be followed by some extra
  1708. # information which is added to the username. This can
  1709. # be used to identify this proxy to the peer, similar to
  1710. # the login=username:password option above.
  1711. #
  1712. # connection-auth=on|off
  1713. # Tell Squid that this peer does or not support Microsoft
  1714. # connection oriented authentication, and any such
  1715. # challenges received from there should be ignored.
  1716. # Default is auto to automatically determine the status
  1717. # of the peer.
  1718. #
  1719. #
  1720. # ==== SSL / HTTPS / TLS OPTIONS ====
  1721. #
  1722. # ssl Encrypt connections to this peer with SSL/TLS.
  1723. #
  1724. # sslcert=/path/to/ssl/certificate
  1725. # A client SSL certificate to use when connecting to
  1726. # this peer.
  1727. #
  1728. # sslkey=/path/to/ssl/key
  1729. # The private SSL key corresponding to sslcert above.
  1730. # If 'sslkey' is not specified 'sslcert' is assumed to
  1731. # reference a combined file containing both the
  1732. # certificate and the key.
  1733. #
  1734. # sslversion=1|2|3|4
  1735. # The SSL version to use when connecting to this peer
  1736. # 1 = automatic (default)
  1737. # 2 = SSL v2 only
  1738. # 3 = SSL v3 only
  1739. # 4 = TLS v1 only
  1740. #
  1741. # sslcipher=... The list of valid SSL ciphers to use when connecting
  1742. # to this peer.
  1743. #
  1744. # ssloptions=... Specify various SSL engine options:
  1745. # NO_SSLv2 Disallow the use of SSLv2
  1746. # NO_SSLv3 Disallow the use of SSLv3
  1747. # NO_TLSv1 Disallow the use of TLSv1
  1748. # See src/ssl_support.c or the OpenSSL documentation for
  1749. # a more complete list.
  1750. #
  1751. # sslcafile=... A file containing additional CA certificates to use
  1752. # when verifying the peer certificate.
  1753. #
  1754. # sslcapath=... A directory containing additional CA certificates to
  1755. # use when verifying the peer certificate.
  1756. #
  1757. # sslcrlfile=... A certificate revocation list file to use when
  1758. # verifying the peer certificate.
  1759. #
  1760. # sslflags=... Specify various flags modifying the SSL implementation:
  1761. #
  1762. # DONT_VERIFY_PEER
  1763. # Accept certificates even if they fail to
  1764. # verify.
  1765. # NO_DEFAULT_CA
  1766. # Don't use the default CA list built in
  1767. # to OpenSSL.
  1768. # DONT_VERIFY_DOMAIN
  1769. # Don't verify the peer certificate
  1770. # matches the server name
  1771. #
  1772. # ssldomain= The peer name as advertised in it's certificate.
  1773. # Used for verifying the correctness of the received peer
  1774. # certificate. If not specified the peer hostname will be
  1775. # used.
  1776. #
  1777. # front-end-https
  1778. # Enable the "Front-End-Https: On" header needed when
  1779. # using Squid as a SSL frontend in front of Microsoft OWA.
  1780. # See MS KB document Q307347 for details on this header.
  1781. # If set to auto the header will only be added if the
  1782. # request is forwarded as a https:// URL.
  1783. #
  1784. #
  1785. # ==== GENERAL OPTIONS ====
  1786. #
  1787. # connect-timeout=N
  1788. # A peer-specific connect timeout.
  1789. # Also see the peer_connect_timeout directive.
  1790. #
  1791. # connect-fail-limit=N
  1792. # How many times connecting to a peer must fail before
  1793. # it is marked as down. Default is 10.
  1794. #
  1795. # allow-miss Disable Squid's use of only-if-cached when forwarding
  1796. # requests to siblings. This is primarily useful when
  1797. # icp_hit_stale is used by the sibling. To extensive use
  1798. # of this option may result in forwarding loops, and you
  1799. # should avoid having two-way peerings with this option.
  1800. # For example to deny peer usage on requests from peer
  1801. # by denying cache_peer_access if the source is a peer.
  1802. #
  1803. # max-conn=N Limit the amount of connections Squid may open to this
  1804. # peer. see also
  1805. #
  1806. # name=xxx Unique name for the peer.
  1807. # Required if you have multiple peers on the same host
  1808. # but different ports.
  1809. # This name can be used in cache_peer_access and similar
  1810. # directives to dentify the peer.
  1811. # Can be used by outgoing access controls through the
  1812. # peername ACL type.
  1813. #
  1814. # no-tproxy Do not use the client-spoof TPROXY support when forwarding
  1815. # requests to this peer. Use normal address selection instead.
  1816. #
  1817. # proxy-only objects fetched from the peer will not be stored locally.
  1818. #
  1819. #Default:
  1820. # none
  1821.  
  1822. # TAG: cache_peer_domain
  1823. # Use to limit the domains for which a neighbor cache will be
  1824. # queried. Usage:
  1825. #
  1826. # cache_peer_domain cache-host domain [domain ...]
  1827. # cache_peer_domain cache-host !domain
  1828. #
  1829. # For example, specifying
  1830. #
  1831. # cache_peer_domain parent.foo.net .edu
  1832. #
  1833. # has the effect such that UDP query packets are sent to
  1834. # 'bigserver' only when the requested object exists on a
  1835. # server in the .edu domain. Prefixing the domainname
  1836. # with '!' means the cache will be queried for objects
  1837. # NOT in that domain.
  1838. #
  1839. # NOTE: * Any number of domains may be given for a cache-host,
  1840. # either on the same or separate lines.
  1841. # * When multiple domains are given for a particular
  1842. # cache-host, the first matched domain is applied.
  1843. # * Cache hosts with no domain restrictions are queried
  1844. # for all requests.
  1845. # * There are no defaults.
  1846. # * There is also a 'cache_peer_access' tag in the ACL
  1847. # section.
  1848. #Default:
  1849. # none
  1850.  
  1851. # TAG: cache_peer_access
  1852. # Similar to 'cache_peer_domain' but provides more flexibility by
  1853. # using ACL elements.
  1854. #
  1855. # cache_peer_access cache-host allow|deny [!]aclname ...
  1856. #
  1857. # The syntax is identical to 'http_access' and the other lists of
  1858. # ACL elements. See the comments for 'http_access' below, or
  1859. # the Squid FAQ (http://wiki.squid-cache.org/SquidFaq/SquidAcl).
  1860. #Default:
  1861. # none
  1862.  
  1863. # TAG: neighbor_type_domain
  1864. # usage: neighbor_type_domain neighbor parent|sibling domain domain ...
  1865. #
  1866. # Modifying the neighbor type for specific domains is now
  1867. # possible. You can treat some domains differently than the the
  1868. # default neighbor type specified on the 'cache_peer' line.
  1869. # Normally it should only be necessary to list domains which
  1870. # should be treated differently because the default neighbor type
  1871. # applies for hostnames which do not match domains listed here.
  1872. #
  1873. #EXAMPLE:
  1874. # cache_peer cache.foo.org parent 3128 3130
  1875. # neighbor_type_domain cache.foo.org sibling .com .net
  1876. # neighbor_type_domain cache.foo.org sibling .au .de
  1877. #Default:
  1878. # none
  1879.  
  1880. # TAG: dead_peer_timeout (seconds)
  1881. # This controls how long Squid waits to declare a peer cache
  1882. # as "dead." If there are no ICP replies received in this
  1883. # amount of time, Squid will declare the peer dead and not
  1884. # expect to receive any further ICP replies. However, it
  1885. # continues to send ICP queries, and will mark the peer as
  1886. # alive upon receipt of the first subsequent ICP reply.
  1887. #
  1888. # This timeout also affects when Squid expects to receive ICP
  1889. # replies from peers. If more than 'dead_peer' seconds have
  1890. # passed since the last ICP reply was received, Squid will not
  1891. # expect to receive an ICP reply on the next query. Thus, if
  1892. # your time between requests is greater than this timeout, you
  1893. # will see a lot of requests sent DIRECT to origin servers
  1894. # instead of to your parents.
  1895. #Default:
  1896. # dead_peer_timeout 10 seconds
  1897.  
  1898. # TAG: forward_max_tries
  1899. # Controls how many different forward paths Squid will try
  1900. # before giving up. See also forward_timeout.
  1901. #Default:
  1902. # forward_max_tries 10
  1903.  
  1904. # TAG: hierarchy_stoplist
  1905. # A list of words which, if found in a URL, cause the object to
  1906. # be handled directly by this cache. In other words, use this
  1907. # to not query neighbor caches for certain objects. You may
  1908. # list this option multiple times.
  1909. # Note: never_direct overrides this option.
  1910. #
  1911.  
  1912. # We recommend you to use at least the following line.
  1913. hierarchy_stoplist cgi-bin ?
  1914.  
  1915. # MEMORY CACHE OPTIONS
  1916. # -----------------------------------------------------------------------------
  1917.  
  1918. # TAG: cache_mem (bytes)
  1919. # NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
  1920. # IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
  1921. # USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
  1922. # THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
  1923. #
  1924. # 'cache_mem' specifies the ideal amount of memory to be used
  1925. # for:
  1926. # * In-Transit objects
  1927. # * Hot Objects
  1928. # * Negative-Cached objects
  1929. #
  1930. # Data for these objects are stored in 4 KB blocks. This
  1931. # parameter specifies the ideal upper limit on the total size of
  1932. # 4 KB blocks allocated. In-Transit objects take the highest
  1933. # priority.
  1934. #
  1935. # In-transit objects have priority over the others. When
  1936. # additional space is needed for incoming data, negative-cached
  1937. # and hot objects will be released. In other words, the
  1938. # negative-cached and hot objects will fill up any unused space
  1939. # not needed for in-transit objects.
  1940. #
  1941. # If circumstances require, this limit will be exceeded.
  1942. # Specifically, if your incoming request rate requires more than
  1943. # 'cache_mem' of memory to hold in-transit objects, Squid will
  1944. # exceed this limit to satisfy the new requests. When the load
  1945. # decreases, blocks will be freed until the high-water mark is
  1946. # reached. Thereafter, blocks will be used to store hot
  1947. # objects.
  1948. #Default:
  1949. # cache_mem 256 MB
  1950.  
  1951. # TAG: maximum_object_size_in_memory (bytes)
  1952. # Objects greater than this size will not be attempted to kept in
  1953. # the memory cache. This should be set high enough to keep objects
  1954. # accessed frequently in memory to improve performance whilst low
  1955. # enough to keep larger objects from hoarding cache_mem.
  1956. #Default:
  1957. # maximum_object_size_in_memory 512 KB
  1958.  
  1959. # TAG: memory_replacement_policy
  1960. # The memory replacement policy parameter determines which
  1961. # objects are purged from memory when memory space is needed.
  1962. #
  1963. # See cache_replacement_policy for details.
  1964. #Default:
  1965. # memory_replacement_policy lru
  1966.  
  1967. # DISK CACHE OPTIONS
  1968. # -----------------------------------------------------------------------------
  1969.  
  1970. # TAG: cache_replacement_policy
  1971. # The cache replacement policy parameter determines which
  1972. # objects are evicted (replaced) when disk space is needed.
  1973. #
  1974. # lru : Squid's original list based LRU policy
  1975. # heap GDSF : Greedy-Dual Size Frequency
  1976. # heap LFUDA: Least Frequently Used with Dynamic Aging
  1977. # heap LRU : LRU policy implemented using a heap
  1978. #
  1979. # Applies to any cache_dir lines listed below this.
  1980. #
  1981. # The LRU policies keeps recently referenced objects.
  1982. #
  1983. # The heap GDSF policy optimizes object hit rate by keeping smaller
  1984. # popular objects in cache so it has a better chance of getting a
  1985. # hit. It achieves a lower byte hit rate than LFUDA though since
  1986. # it evicts larger (possibly popular) objects.
  1987. #
  1988. # The heap LFUDA policy keeps popular objects in cache regardless of
  1989. # their size and thus optimizes byte hit rate at the expense of
  1990. # hit rate since one large, popular object will prevent many
  1991. # smaller, slightly less popular objects from being cached.
  1992. #
  1993. # Both policies utilize a dynamic aging mechanism that prevents
  1994. # cache pollution that can otherwise occur with frequency-based
  1995. # replacement policies.
  1996. #
  1997. # NOTE: if using the LFUDA replacement policy you should increase
  1998. # the value of maximum_object_size above its default of 4096 KB to
  1999. # to maximize the potential byte hit rate improvement of LFUDA.
  2000. #
  2001. # For more information about the GDSF and LFUDA cache replacement
  2002. # policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
  2003. # and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
  2004. #Default:
  2005. # cache_replacement_policy lru
  2006.  
  2007. # TAG: cache_dir
  2008. # Usage:
  2009. #
  2010. # cache_dir Type Directory-Name Fs-specific-data [options]
  2011. #
  2012. # You can specify multiple cache_dir lines to spread the
  2013. # cache among different disk partitions.
  2014. #
  2015. # Type specifies the kind of storage system to use. Only "ufs"
  2016. # is built by default. To enable any of the other storage systems
  2017. # see the --enable-storeio configure option.
  2018. #
  2019. # 'Directory' is a top-level directory where cache swap
  2020. # files will be stored. If you want to use an entire disk
  2021. # for caching, this can be the mount-point directory.
  2022. # The directory must exist and be writable by the Squid
  2023. # process. Squid will NOT create this directory for you.
  2024. #
  2025. # The ufs store type:
  2026. #
  2027. # "ufs" is the old well-known Squid storage format that has always
  2028. # been there.
  2029. #
  2030. # cache_dir ufs Directory-Name Mbytes L1 L2 [options]
  2031. #
  2032. # 'Mbytes' is the amount of disk space (MB) to use under this
  2033. # directory. The default is 100 MB. Change this to suit your
  2034. # configuration. Do NOT put the size of your disk drive here.
  2035. # Instead, if you want Squid to use the entire disk drive,
  2036. # subtract 20% and use that value.
  2037. #
  2038. # 'Level-1' is the number of first-level subdirectories which
  2039. # will be created under the 'Directory'. The default is 16.
  2040. #
  2041. # 'Level-2' is the number of second-level subdirectories which
  2042. # will be created under each first-level directory. The default
  2043. # is 256.
  2044. #
  2045. # The aufs store type:
  2046. #
  2047. # "aufs" uses the same storage format as "ufs", utilizing
  2048. # POSIX-threads to avoid blocking the main Squid process on
  2049. # disk-I/O. This was formerly known in Squid as async-io.
  2050. #
  2051. # cache_dir aufs Directory-Name Mbytes L1 L2 [options]
  2052. #
  2053. # see argument descriptions under ufs above
  2054. #
  2055. # The diskd store type:
  2056. #
  2057. # "diskd" uses the same storage format as "ufs", utilizing a
  2058. # separate process to avoid blocking the main Squid process on
  2059. # disk-I/O.
  2060. #
  2061. # cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
  2062. #
  2063. # see argument descriptions under ufs above
  2064. #
  2065. # Q1 specifies the number of unacknowledged I/O requests when Squid
  2066. # stops opening new files. If this many messages are in the queues,
  2067. # Squid won't open new files. Default is 64
  2068. #
  2069. # Q2 specifies the number of unacknowledged messages when Squid
  2070. # starts blocking. If this many messages are in the queues,
  2071. # Squid blocks until it receives some replies. Default is 72
  2072. #
  2073. # When Q1 < Q2 (the default), the cache directory is optimized
  2074. # for lower response time at the expense of a decrease in hit
  2075. # ratio. If Q1 > Q2, the cache directory is optimized for
  2076. # higher hit ratio at the expense of an increase in response
  2077. # time.
  2078. #
  2079. # The coss store type:
  2080. #
  2081. # NP: COSS filesystem in Squid-3 has been deemed too unstable for
  2082. # production use and has thus been removed from this release.
  2083. # We hope that it can be made usable again soon.
  2084. #
  2085. # block-size=n defines the "block size" for COSS cache_dir's.
  2086. # Squid uses file numbers as block numbers. Since file numbers
  2087. # are limited to 24 bits, the block size determines the maximum
  2088. # size of the COSS partition. The default is 512 bytes, which
  2089. # leads to a maximum cache_dir size of 512<<24, or 8 GB. Note
  2090. # you should not change the coss block size after Squid
  2091. # has written some objects to the cache_dir.
  2092. #
  2093. # The coss file store has changed from 2.5. Now it uses a file
  2094. # called 'stripe' in the directory names in the config - and
  2095. # this will be created by squid -z.
  2096. #
  2097. # Common options:
  2098. #
  2099. # no-store, no new objects should be stored to this cache_dir
  2100. #
  2101. # max-size=n, refers to the max object size this storedir supports.
  2102. # It is used to initially choose the storedir to dump the object.
  2103. # Note: To make optimal use of the max-size limits you should order
  2104. # the cache_dir lines with the smallest max-size value first and the
  2105. # ones with no max-size specification last.
  2106. #
  2107. # Note for coss, max-size must be less than COSS_MEMBUF_SZ,
  2108. # which can be changed with the --with-coss-membuf-size=N configure
  2109. # option.
  2110. #
  2111.  
  2112. # Uncomment and adjust the following to add a disk cache directory.
  2113. #cache_dir ufs /var/spool/squid3 100 16 256
  2114.  
  2115. # TAG: store_dir_select_algorithm
  2116. # Set this to 'round-robin' as an alternative.
  2117. #Default:
  2118. # store_dir_select_algorithm least-load
  2119.  
  2120. # TAG: max_open_disk_fds
  2121. # To avoid having disk as the I/O bottleneck Squid can optionally
  2122. # bypass the on-disk cache if more than this amount of disk file
  2123. # descriptors are open.
  2124. #
  2125. # A value of 0 indicates no limit.
  2126. #Default:
  2127. # max_open_disk_fds 0
  2128.  
  2129. # TAG: minimum_object_size (bytes)
  2130. # Objects smaller than this size will NOT be saved on disk. The
  2131. # value is specified in kilobytes, and the default is 0 KB, which
  2132. # means there is no minimum.
  2133. #Default:
  2134. # minimum_object_size 0 KB
  2135.  
  2136. # TAG: maximum_object_size (bytes)
  2137. # Objects larger than this size will NOT be saved on disk. The
  2138. # value is specified in kilobytes, and the default is 4MB. If
  2139. # you wish to get a high BYTES hit ratio, you should probably
  2140. # increase this (one 32 MB object hit counts for 3200 10KB
  2141. # hits). If you wish to increase speed more than your want to
  2142. # save bandwidth you should leave this low.
  2143. #
  2144. # NOTE: if using the LFUDA replacement policy you should increase
  2145. # this value to maximize the byte hit rate improvement of LFUDA!
  2146. # See replacement_policy below for a discussion of this policy.
  2147. #Default:
  2148. # maximum_object_size 4096 KB
  2149.  
  2150. # TAG: cache_swap_low (percent, 0-100)
  2151. # TAG: cache_swap_high (percent, 0-100)
  2152. #
  2153. # The low- and high-water marks for cache object replacement.
  2154. # Replacement begins when the swap (disk) usage is above the
  2155. # low-water mark and attempts to maintain utilization near the
  2156. # low-water mark. As swap utilization gets close to high-water
  2157. # mark object eviction becomes more aggressive. If utilization is
  2158. # close to the low-water mark less replacement is done each time.
  2159. #
  2160. # Defaults are 90% and 95%. If you have a large cache, 5% could be
  2161. # hundreds of MB. If this is the case you may wish to set these
  2162. # numbers closer together.
  2163. #Default:
  2164. # cache_swap_low 90
  2165. # cache_swap_high 95
  2166.  
  2167. # LOGFILE OPTIONS
  2168. # -----------------------------------------------------------------------------
  2169.  
  2170. # TAG: logformat
  2171. # Usage:
  2172. #
  2173. # logformat <name> <format specification>
  2174. #
  2175. # Defines an access log format.
  2176. #
  2177. # The <format specification> is a string with embedded % format codes
  2178. #
  2179. # % format codes all follow the same basic structure where all but
  2180. # the formatcode is optional. Output strings are automatically escaped
  2181. # as required according to their context and the output format
  2182. # modifiers are usually not needed, but can be specified if an explicit
  2183. # output format is desired.
  2184. #
  2185. # % ["|[|'|#] [-] [[0]width] [{argument}] formatcode
  2186. #
  2187. # " output in quoted string format
  2188. # [ output in squid text log format as used by log_mime_hdrs
  2189. # # output in URL quoted format
  2190. # ' output as-is
  2191. #
  2192. # - left aligned
  2193. # width field width. If starting with 0 the
  2194. # output is zero padded
  2195. # {arg} argument such as header name etc
  2196. #
  2197. # Format codes:
  2198. #
  2199. # % a literal % character
  2200. # >a Client source IP address
  2201. # >A Client FQDN
  2202. # >p Client source port
  2203. # <A Server IP address or peer name
  2204. # la Local IP address (http_port)
  2205. # lp Local port number (http_port)
  2206. # ts Seconds since epoch
  2207. # tu subsecond time (milliseconds)
  2208. # tl Local time. Optional strftime format argument
  2209. # default %d/%b/%Y:%H:%M:%S %z
  2210. # tg GMT time. Optional strftime format argument
  2211. # default %d/%b/%Y:%H:%M:%S %z
  2212. # tr Response time (milliseconds)
  2213. # dt Total time spent making DNS lookups (milliseconds)
  2214. #
  2215. # HTTP cache related format codes:
  2216. #
  2217. # [http::]>h Original request header. Optional header name argument
  2218. # on the format header[:[separator]element]
  2219. # [http::]>ha The HTTP request headers after adaptation and redirection.
  2220. # Optional header name argument as for >h
  2221. # [http::]<h Reply header. Optional header name argument
  2222. # as for >h
  2223. # [http::]un User name
  2224. # [http::]ul User name from authentication
  2225. # [http::]ui User name from ident
  2226. # [http::]us User name from SSL
  2227. # [http::]ue User name from external acl helper
  2228. # [http::]>Hs HTTP status code sent to the client
  2229. # [http::]<Hs HTTP status code received from the next hop
  2230. # [http::]Ss Squid request status (TCP_MISS etc)
  2231. # [http::]Sh Squid hierarchy status (DEFAULT_PARENT etc)
  2232. # [http::]mt MIME content type
  2233. # [http::]rm Request method (GET/POST etc)
  2234. # [http::]ru Request URL
  2235. # [http::]rp Request URL-Path excluding hostname
  2236. # [http::]rv Request protocol version
  2237. # [http::]et Tag returned by external acl
  2238. # [http::]ea Log string returned by external acl
  2239. # [http::]<st Sent reply size including HTTP headers
  2240. # [http::]>st Received request size including HTTP headers. In the
  2241. # case of chunked requests the chunked encoding metadata
  2242. # are not included
  2243. # [http::]>sh Received HTTP request headers size
  2244. # [http::]<sh Sent HTTP reply headers size
  2245. # [http::]st Request+Reply size including HTTP headers
  2246. # [http::]<sH Reply high offset sent
  2247. # [http::]<sS Upstream object size
  2248. # [http::]<pt Peer response time in milliseconds. The timer starts
  2249. # when the last request byte is sent to the next hop
  2250. # and stops when the last response byte is received.
  2251. # [http::]<tt Total server-side time in milliseconds. The timer
  2252. # starts with the first connect request (or write I/O)
  2253. # sent to the first selected peer. The timer stops
  2254. # with the last I/O with the last peer.
  2255. #
  2256. # If ICAP is enabled, the following two codes become available (as
  2257. # well as ICAP log codes documented with the icap_log option):
  2258. #
  2259. # icap::tt Total ICAP processing time for the HTTP
  2260. # transaction. The timer ticks when ICAP
  2261. # ACLs are checked and when ICAP
  2262. # transaction is in progress.
  2263. #
  2264. # icap::<last_h The header of the last ICAP response
  2265. # related to the HTTP transaction. Like
  2266. # <h, accepts an optional header name
  2267. # argument. Will not change semantics
  2268. # when multiple ICAP transactions per HTTP
  2269. # transaction are supported.
  2270. #
  2271. # If adaptation is enabled the following two codes become available:
  2272. #
  2273. # adapt::sum_trs Summed adaptation transaction response
  2274. # times recorded as a comma-separated list in
  2275. # the order of transaction start time. Each time
  2276. # value is recorded as an integer number,
  2277. # representing response time of one or more
  2278. # adaptation (ICAP or eCAP) transaction in
  2279. # milliseconds. When a failed transaction is
  2280. # being retried or repeated, its time is not
  2281. # logged individually but added to the
  2282. # replacement (next) transaction. See also:
  2283. # adapt::all_trs.
  2284. #
  2285. # adapt::all_trs All adaptation transaction response times.
  2286. # Same as adaptation_strs but response times of
  2287. # individual transactions are never added
  2288. # together. Instead, all transaction response
  2289. # times are recorded individually.
  2290. #
  2291. # You can prefix adapt::*_trs format codes with adaptation
  2292. # service name in curly braces to record response time(s) specific
  2293. # to that service. For example: %{my_service}adapt::sum_trs
  2294. #
  2295. # The default formats available (which do not need re-defining) are:
  2296. #
  2297. #logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %un %Sh/%<A %mt
  2298. #logformat squidmime %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %un %Sh/%<A %mt [%>h] [%<h]
  2299. #logformat common %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh
  2300. #logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
  2301. #Default:
  2302. # none
  2303.  
  2304. # TAG: access_log
  2305. # These files log client request activities. Has a line every HTTP or
  2306. # ICP request. The format is:
  2307. # access_log <filepath> [<logformat name> [acl acl ...]]
  2308. # access_log none [acl acl ...]]
  2309. #
  2310. # Will log to the specified file using the specified format (which
  2311. # must be defined in a logformat directive) those entries which match
  2312. # ALL the acl's specified (which must be defined in acl clauses).
  2313. # If no acl is specified, all requests will be logged to this file.
  2314. #
  2315. # To disable logging of a request use the filepath "none", in which case
  2316. # a logformat name should not be specified.
  2317. #
  2318. # To log the request via syslog specify a filepath of "syslog":
  2319. #
  2320. # access_log syslog[:facility.priority] [format [acl1 [acl2 ....]]]
  2321. # where facility could be any of:
  2322. # authpriv, daemon, local0 .. local7 or user.
  2323. #
  2324. # And priority could be any of:
  2325. # err, warning, notice, info, debug.
  2326. #
  2327. # Default:
  2328. # access_log /var/log/squid3/access.log squid
  2329. #Default:
  2330. # access_log /var/log/squid3/access.log squid
  2331.  
  2332. # TAG: icap_log
  2333. # ICAP log files record ICAP transaction summaries, one line per
  2334. # transaction.
  2335. #
  2336. # The icap_log option format is:
  2337. # icap_log <filepath> [<logformat name> [acl acl ...]]
  2338. # icap_log none [acl acl ...]]
  2339. #
  2340. # Please see access_log option documentation for details. The two
  2341. # kinds of logs share the overall configuration approach and many
  2342. # features.
  2343. #
  2344. # ICAP processing of a single HTTP message or transaction may
  2345. # require multiple ICAP transactions. In such cases, multiple
  2346. # ICAP transaction log lines will correspond to a single access
  2347. # log line.
  2348. #
  2349. # ICAP log uses logformat codes that make sense for an ICAP
  2350. # transaction. Header-related codes are applied to the HTTP header
  2351. # embedded in an ICAP server response, with the following caveats:
  2352. # For REQMOD, there is no HTTP response header unless the ICAP
  2353. # server performed request satisfaction. For RESPMOD, the HTTP
  2354. # request header is the header sent to the ICAP server. For
  2355. # OPTIONS, there are no HTTP headers.
  2356. #
  2357. # The following format codes are also available for ICAP logs:
  2358. #
  2359. # icap::<A ICAP server IP address. Similar to <A.
  2360. #
  2361. # icap::<service_name ICAP service name from the icap_service
  2362. # option in Squid configuration file.
  2363. #
  2364. # icap::ru ICAP Request-URI. Similar to ru.
  2365. #
  2366. # icap::rm ICAP request method (REQMOD, RESPMOD, or
  2367. # OPTIONS). Similar to existing rm.
  2368. #
  2369. # icap::>st Bytes sent to the ICAP server (TCP payload
  2370. # only; i.e., what Squid writes to the socket).
  2371. #
  2372. # icap::<st Bytes received from the ICAP server (TCP
  2373. # payload only; i.e., what Squid reads from
  2374. # the socket).
  2375. #
  2376. # icap::tr Transaction response time (in
  2377. # milliseconds). The timer starts when
  2378. # the ICAP transaction is created and
  2379. # stops when the transaction is completed.
  2380. # Similar to tr.
  2381. #
  2382. # icap::tio Transaction I/O time (in milliseconds). The
  2383. # timer starts when the first ICAP request
  2384. # byte is scheduled for sending. The timers
  2385. # stops when the last byte of the ICAP response
  2386. # is received.
  2387. #
  2388. # icap::to Transaction outcome: ICAP_ERR* for all
  2389. # transaction errors, ICAP_OPT for OPTION
  2390. # transactions, ICAP_ECHO for 204
  2391. # responses, ICAP_MOD for message
  2392. # modification, and ICAP_SAT for request
  2393. # satisfaction. Similar to Ss.
  2394. #
  2395. # icap::Hs ICAP response status code. Similar to Hs.
  2396. #
  2397. # icap::>h ICAP request header(s). Similar to >h.
  2398. #
  2399. # icap::<h ICAP response header(s). Similar to <h.
  2400. #
  2401. # The default ICAP log format, which can be used without an explicit
  2402. # definition, is called icap_squid:
  2403. #
  2404. #logformat icap_squid %ts.%03tu %6icap::tr %>a %icap::to/%03icap::Hs %icap::<size %icap::rm %icap::ru% %un -/%icap::<A -
  2405. #
  2406. # See also: logformat, log_icap, and %icap::<last_h
  2407. #Default:
  2408. # none
  2409.  
  2410. # TAG: log_access allow|deny acl acl...
  2411. # This options allows you to control which requests gets logged
  2412. # to access.log (see access_log directive). Requests denied for
  2413. # logging will also not be accounted for in performance counters.
  2414. #
  2415. # This clause only supports fast acl types.
  2416. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  2417. #Default:
  2418. # none
  2419.  
  2420. # TAG: log_icap
  2421. # This options allows you to control which requests get logged
  2422. # to icap.log. See the icap_log directive for ICAP log details.
  2423. #Default:
  2424. # none
  2425.  
  2426. # TAG: cache_store_log
  2427. # Logs the activities of the storage manager. Shows which
  2428. # objects are ejected from the cache, and which objects are
  2429. # saved and for how long. To disable, enter "none" or remove the line.
  2430. # There are not really utilities to analyze this data, so you can safely
  2431. # disable it.
  2432. #
  2433. # Example:
  2434. # cache_store_log /var/log/squid3/store.log
  2435. #Default:
  2436. # none
  2437.  
  2438. # TAG: cache_swap_state
  2439. # Location for the cache "swap.state" file. This index file holds
  2440. # the metadata of objects saved on disk. It is used to rebuild
  2441. # the cache during startup. Normally this file resides in each
  2442. # 'cache_dir' directory, but you may specify an alternate
  2443. # pathname here. Note you must give a full filename, not just
  2444. # a directory. Since this is the index for the whole object
  2445. # list you CANNOT periodically rotate it!
  2446. #
  2447. # If %s can be used in the file name it will be replaced with a
  2448. # a representation of the cache_dir name where each / is replaced
  2449. # with '.'. This is needed to allow adding/removing cache_dir
  2450. # lines when cache_swap_log is being used.
  2451. #
  2452. # If have more than one 'cache_dir', and %s is not used in the name
  2453. # these swap logs will have names such as:
  2454. #
  2455. # cache_swap_log.00
  2456. # cache_swap_log.01
  2457. # cache_swap_log.02
  2458. #
  2459. # The numbered extension (which is added automatically)
  2460. # corresponds to the order of the 'cache_dir' lines in this
  2461. # configuration file. If you change the order of the 'cache_dir'
  2462. # lines in this file, these index files will NOT correspond to
  2463. # the correct 'cache_dir' entry (unless you manually rename
  2464. # them). We recommend you do NOT use this option. It is
  2465. # better to keep these index files in each 'cache_dir' directory.
  2466. #Default:
  2467. # none
  2468.  
  2469. # TAG: logfile_rotate
  2470. # Specifies the number of logfile rotations to make when you
  2471. # type 'squid -k rotate'. The default is 10, which will rotate
  2472. # with extensions 0 through 9. Setting logfile_rotate to 0 will
  2473. # disable the file name rotation, but the logfiles are still closed
  2474. # and re-opened. This will enable you to rename the logfiles
  2475. # yourself just before sending the rotate signal.
  2476. #
  2477. # Note, the 'squid -k rotate' command normally sends a USR1
  2478. # signal to the running squid process. In certain situations
  2479. # (e.g. on Linux with Async I/O), USR1 is used for other
  2480. # purposes, so -k rotate uses another signal. It is best to get
  2481. # in the habit of using 'squid -k rotate' instead of 'kill -USR1
  2482. # <pid>'.
  2483. #
  2484. # Note, from Squid-3.1 this option has no effect on the cache.log,
  2485. # that log can be rotated separately by using debug_options
  2486. #
  2487. # Note2, for Debian/Linux the default of logfile_rotate is
  2488. # zero, since it includes external logfile-rotation methods.
  2489. #Default:
  2490. # logfile_rotate 0
  2491.  
  2492. # TAG: emulate_httpd_log on|off
  2493. # The Cache can emulate the log file format which many 'httpd'
  2494. # programs use. To disable/enable this emulation, set
  2495. # emulate_httpd_log to 'off' or 'on'. The default
  2496. # is to use the native log format since it includes useful
  2497. # information Squid-specific log analyzers use.
  2498. #Default:
  2499. # emulate_httpd_log off
  2500.  
  2501. # TAG: log_ip_on_direct on|off
  2502. # Log the destination IP address in the hierarchy log tag when going
  2503. # direct. Earlier Squid versions logged the hostname here. If you
  2504. # prefer the old way set this to off.
  2505. #Default:
  2506. # log_ip_on_direct on
  2507.  
  2508. # TAG: mime_table
  2509. # Pathname to Squid's MIME table. You shouldn't need to change
  2510. # this, but the default file contains examples and formatting
  2511. # information if you do.
  2512. #Default:
  2513. # mime_table /usr/share/squid3/mime.conf
  2514.  
  2515. # TAG: log_mime_hdrs on|off
  2516. # The Cache can record both the request and the response MIME
  2517. # headers for each HTTP transaction. The headers are encoded
  2518. # safely and will appear as two bracketed fields at the end of
  2519. # the access log (for either the native or httpd-emulated log
  2520. # formats). To enable this logging set log_mime_hdrs to 'on'.
  2521. #Default:
  2522. # log_mime_hdrs off
  2523.  
  2524. # TAG: useragent_log
  2525. # Note: This option is only available if Squid is rebuilt with the
  2526. # --enable-useragent-log option
  2527. #
  2528. # Squid will write the User-Agent field from HTTP requests
  2529. # to the filename specified here. By default useragent_log
  2530. # is disabled.
  2531. #Default:
  2532. # none
  2533.  
  2534. # TAG: referer_log
  2535. # Note: This option is only available if Squid is rebuilt with the
  2536. # --enable-referer-log option
  2537. #
  2538. # Squid will write the Referer field from HTTP requests to the
  2539. # filename specified here. By default referer_log is disabled.
  2540. # Note that "referer" is actually a misspelling of "referrer"
  2541. # however the misspelt version has been accepted into the HTTP RFCs
  2542. # and we accept both.
  2543. #Default:
  2544. # none
  2545.  
  2546. # TAG: pid_filename
  2547. # A filename to write the process-id to. To disable, enter "none".
  2548. #Default:
  2549. # pid_filename /var/run/squid3.pid
  2550.  
  2551. # TAG: log_fqdn on|off
  2552. # Turn this on if you wish to log fully qualified domain names
  2553. # in the access.log. To do this Squid does a DNS lookup of all
  2554. # IP's connecting to it. This can (in some situations) increase
  2555. # latency, which makes your cache seem slower for interactive
  2556. # browsing.
  2557. #Default:
  2558. # log_fqdn off
  2559.  
  2560. # TAG: client_netmask
  2561. # A netmask for client addresses in logfiles and cachemgr output.
  2562. # Change this to protect the privacy of your cache clients.
  2563. # A netmask of 255.255.255.0 will log all IP's in that range with
  2564. # the last digit set to '0'.
  2565. #Default:
  2566. # client_netmask no_addr
  2567.  
  2568. # TAG: forward_log
  2569. # Note: This option is only available if Squid is rebuilt with the
  2570. # -DWIP_FWD_LOG define
  2571. #
  2572. # Logs the server-side requests.
  2573. #
  2574. # This is currently work in progress.
  2575. #Default:
  2576. # none
  2577.  
  2578. # TAG: strip_query_terms
  2579. # By default, Squid strips query terms from requested URLs before
  2580. # logging. This protects your user's privacy.
  2581. #Default:
  2582. # strip_query_terms on
  2583.  
  2584. # TAG: buffered_logs on|off
  2585. # cache.log log file is written with stdio functions, and as such
  2586. # it can be buffered or unbuffered. By default it will be unbuffered.
  2587. # Buffering it can speed up the writing slightly (though you are
  2588. # unlikely to need to worry unless you run with tons of debugging
  2589. # enabled in which case performance will suffer badly anyway..).
  2590. #Default:
  2591. # buffered_logs off
  2592.  
  2593. # TAG: netdb_filename
  2594. # Note: This option is only available if Squid is rebuilt with the
  2595. # --enable-icmp option
  2596. #
  2597. # A filename where Squid stores it's netdb state between restarts.
  2598. # To disable, enter "none".
  2599. #Default:
  2600. # netdb_filename /var/log/squid3/netdb.state
  2601.  
  2602. # OPTIONS FOR TROUBLESHOOTING
  2603. # -----------------------------------------------------------------------------
  2604.  
  2605. # TAG: cache_log
  2606. # Cache logging file. This is where general information about
  2607. # your cache's behavior goes. You can increase the amount of data
  2608. # logged to this file and how often its rotated with "debug_options"
  2609. #Default:
  2610. # cache_log /var/log/squid3/cache.log
  2611.  
  2612. # TAG: debug_options
  2613. # Logging options are set as section,level where each source file
  2614. # is assigned a unique section. Lower levels result in less
  2615. # output, Full debugging (level 9) can result in a very large
  2616. # log file, so be careful.
  2617. #
  2618. # The magic word "ALL" sets debugging levels for all sections.
  2619. # We recommend normally running with "ALL,1".
  2620. #
  2621. # The rotate=N option can be used to keep more or less of these logs
  2622. # than would otherwise be kept by logfile_rotate.
  2623. # For most uses a single log should be enough to monitor current
  2624. # events affecting Squid.
  2625. #Default:
  2626. # debug_options ALL,1
  2627.  
  2628. # TAG: coredump_dir
  2629. # By default Squid leaves core files in the directory from where
  2630. # it was started. If you set 'coredump_dir' to a directory
  2631. # that exists, Squid will chdir() to that directory at startup
  2632. # and coredump files will be left there.
  2633. #
  2634. #Default:
  2635. # coredump_dir none
  2636. #
  2637.  
  2638. # Leave coredumps in the first cache dir
  2639. coredump_dir /var/spool/squid3
  2640.  
  2641. # OPTIONS FOR FTP GATEWAYING
  2642. # -----------------------------------------------------------------------------
  2643.  
  2644. # TAG: ftp_user
  2645. # If you want the anonymous login password to be more informative
  2646. # (and enable the use of picky ftp servers), set this to something
  2647. # reasonable for your domain, like [email protected]
  2648. #
  2649. # The reason why this is domainless by default is the
  2650. # request can be made on the behalf of a user in any domain,
  2651. # depending on how the cache is used.
  2652. # Some ftp server also validate the email address is valid
  2653. # (for example perl.com).
  2654. #Default:
  2655. # ftp_user Squid@
  2656.  
  2657. # TAG: ftp_list_width
  2658. # Sets the width of ftp listings. This should be set to fit in
  2659. # the width of a standard browser. Setting this too small
  2660. # can cut off long filenames when browsing ftp sites.
  2661. #Default:
  2662. # ftp_list_width 32
  2663.  
  2664. # TAG: ftp_passive
  2665. # If your firewall does not allow Squid to use passive
  2666. # connections, turn off this option.
  2667. #
  2668. # Use of ftp_epsv_all option requires this to be ON.
  2669. #Default:
  2670. # ftp_passive on
  2671.  
  2672. # TAG: ftp_epsv_all
  2673. # FTP Protocol extensions permit the use of a special "EPSV ALL" command.
  2674. #
  2675. # NATs may be able to put the connection on a "fast path" through the
  2676. # translator, as the EPRT command will never be used and therefore,
  2677. # translation of the data portion of the segments will never be needed.
  2678. #
  2679. # When a client only expects to do two-way FTP transfers this may be
  2680. # useful.
  2681. # If squid finds that it must do a three-way FTP transfer after issuing
  2682. # an EPSV ALL command, the FTP session will fail.
  2683. #
  2684. # If you have any doubts about this option do not use it.
  2685. # Squid will nicely attempt all other connection methods.
  2686. #
  2687. # Requires ftp_passive to be ON (default) for any effect.
  2688. #Default:
  2689. # ftp_epsv_all off
  2690.  
  2691. # TAG: ftp_epsv
  2692. # FTP Protocol extensions permit the use of a special "EPSV" command.
  2693. #
  2694. # NATs may be able to put the connection on a "fast path" through the
  2695. # translator using EPSV, as the EPRT command will never be used
  2696. # and therefore, translation of the data portion of the segments
  2697. # will never be needed.
  2698. #
  2699. # Turning this OFF will prevent EPSV being attempted.
  2700. # WARNING: Doing so will convert Squid back to the old behavior with all
  2701. # the related problems with external NAT devices/layers.
  2702. #
  2703. # Requires ftp_passive to be ON (default) for any effect.
  2704. #Default:
  2705. # ftp_epsv on
  2706.  
  2707. # TAG: ftp_sanitycheck
  2708. # For security and data integrity reasons Squid by default performs
  2709. # sanity checks of the addresses of FTP data connections ensure the
  2710. # data connection is to the requested server. If you need to allow
  2711. # FTP connections to servers using another IP address for the data
  2712. # connection turn this off.
  2713. #Default:
  2714. # ftp_sanitycheck on
  2715.  
  2716. # TAG: ftp_telnet_protocol
  2717. # The FTP protocol is officially defined to use the telnet protocol
  2718. # as transport channel for the control connection. However, many
  2719. # implementations are broken and does not respect this aspect of
  2720. # the FTP protocol.
  2721. #
  2722. # If you have trouble accessing files with ASCII code 255 in the
  2723. # path or similar problems involving this ASCII code you can
  2724. # try setting this directive to off. If that helps, report to the
  2725. # operator of the FTP server in question that their FTP server
  2726. # is broken and does not follow the FTP standard.
  2727. #Default:
  2728. # ftp_telnet_protocol on
  2729.  
  2730. # OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
  2731. # -----------------------------------------------------------------------------
  2732.  
  2733. # TAG: diskd_program
  2734. # Specify the location of the diskd executable.
  2735. # Note this is only useful if you have compiled in
  2736. # diskd as one of the store io modules.
  2737. #Default:
  2738. # diskd_program /usr/lib/squid3/diskd
  2739.  
  2740. # TAG: unlinkd_program
  2741. # Specify the location of the executable for file deletion process.
  2742. #Default:
  2743. # unlinkd_program /usr/lib/squid3/unlinkd
  2744.  
  2745. # TAG: pinger_program
  2746. # Note: This option is only available if Squid is rebuilt with the
  2747. # --enable-icmp option
  2748. #
  2749. # Specify the location of the executable for the pinger process.
  2750. #Default:
  2751. # pinger_program /usr/lib/squid3/pinger
  2752.  
  2753. # TAG: pinger_enable
  2754. # Note: This option is only available if Squid is rebuilt with the
  2755. # --enable-icmp option
  2756. #
  2757. # Control whether the pinger is active at run-time.
  2758. # Enables turning ICMP pinger on and off with a simple
  2759. # squid -k reconfigure.
  2760. #Default:
  2761. # pinger_enable off
  2762.  
  2763. # OPTIONS FOR URL REWRITING
  2764. # -----------------------------------------------------------------------------
  2765.  
  2766. # TAG: url_rewrite_program
  2767. # Specify the location of the executable for the URL rewriter.
  2768. # Since they can perform almost any function there isn't one included.
  2769. #
  2770. # For each requested URL rewriter will receive on line with the format
  2771. #
  2772. # URL <SP> client_ip "/" fqdn <SP> user <SP> method [<SP> kvpairs]<NL>
  2773. #
  2774. # In the future, the rewriter interface will be extended with
  2775. # key=value pairs ("kvpairs" shown above). Rewriter programs
  2776. # should be prepared to receive and possibly ignore additional
  2777. # whitespace-separated tokens on each input line.
  2778. #
  2779. # And the rewriter may return a rewritten URL. The other components of
  2780. # the request line does not need to be returned (ignored if they are).
  2781. #
  2782. # The rewriter can also indicate that a client-side redirect should
  2783. # be performed to the new URL. This is done by prefixing the returned
  2784. # URL with "301:" (moved permanently) or 302: (moved temporarily).
  2785. #
  2786. # By default, a URL rewriter is not used.
  2787. #Default:
  2788. # none
  2789.  
  2790. # TAG: url_rewrite_children
  2791. # The number of redirector processes to spawn. If you start
  2792. # too few Squid will have to wait for them to process a backlog of
  2793. # URLs, slowing it down. If you start too many they will use RAM
  2794. # and other system resources.
  2795. #Default:
  2796. # url_rewrite_children 5
  2797.  
  2798. # TAG: url_rewrite_concurrency
  2799. # The number of requests each redirector helper can handle in
  2800. # parallel. Defaults to 0 which indicates the redirector
  2801. # is a old-style single threaded redirector.
  2802. #
  2803. # When this directive is set to a value >= 1 then the protocol
  2804. # used to communicate with the helper is modified to include
  2805. # a request ID in front of the request/response. The request
  2806. # ID from the request must be echoed back with the response
  2807. # to that request.
  2808. #Default:
  2809. # url_rewrite_concurrency 0
  2810.  
  2811. # TAG: url_rewrite_host_header
  2812. # By default Squid rewrites any Host: header in redirected
  2813. # requests. If you are running an accelerator this may
  2814. # not be a wanted effect of a redirector.
  2815. #
  2816. # WARNING: Entries are cached on the result of the URL rewriting
  2817. # process, so be careful if you have domain-virtual hosts.
  2818. #Default:
  2819. # url_rewrite_host_header on
  2820.  
  2821. # TAG: url_rewrite_access
  2822. # If defined, this access list specifies which requests are
  2823. # sent to the redirector processes. By default all requests
  2824. # are sent.
  2825. #
  2826. # This clause supports both fast and slow acl types.
  2827. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  2828. #Default:
  2829. # none
  2830.  
  2831. # TAG: url_rewrite_bypass
  2832. # When this is 'on', a request will not go through the
  2833. # redirector if all redirectors are busy. If this is 'off'
  2834. # and the redirector queue grows too large, Squid will exit
  2835. # with a FATAL error and ask you to increase the number of
  2836. # redirectors. You should only enable this if the redirectors
  2837. # are not critical to your caching system. If you use
  2838. # redirectors for access control, and you enable this option,
  2839. # users may have access to pages they should not
  2840. # be allowed to request.
  2841. #Default:
  2842. # url_rewrite_bypass off
  2843.  
  2844. # OPTIONS FOR TUNING THE CACHE
  2845. # -----------------------------------------------------------------------------
  2846.  
  2847. # TAG: cache
  2848. # A list of ACL elements which, if matched and denied, cause the request to
  2849. # not be satisfied from the cache and the reply to not be cached.
  2850. # In other words, use this to force certain objects to never be cached.
  2851. #
  2852. # You must use the words 'allow' or 'deny' to indicate whether items
  2853. # matching the ACL should be allowed or denied into the cache.
  2854. #
  2855. # Default is to allow all to be cached.
  2856. #
  2857. # This clause supports both fast and slow acl types.
  2858. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  2859. #Default:
  2860. # none
  2861.  
  2862. # TAG: refresh_pattern
  2863. # usage: refresh_pattern [-i] regex min percent max [options]
  2864. #
  2865. # By default, regular expressions are CASE-SENSITIVE. To make
  2866. # them case-insensitive, use the -i option.
  2867. #
  2868. # 'Min' is the time (in minutes) an object without an explicit
  2869. # expiry time should be considered fresh. The recommended
  2870. # value is 0, any higher values may cause dynamic applications
  2871. # to be erroneously cached unless the application designer
  2872. # has taken the appropriate actions.
  2873. #
  2874. # 'Percent' is a percentage of the objects age (time since last
  2875. # modification age) an object without explicit expiry time
  2876. # will be considered fresh.
  2877. #
  2878. # 'Max' is an upper limit on how long objects without an explicit
  2879. # expiry time will be considered fresh.
  2880. #
  2881. # options: override-expire
  2882. # override-lastmod
  2883. # reload-into-ims
  2884. # ignore-reload
  2885. # ignore-no-cache
  2886. # ignore-no-store
  2887. # ignore-must-revalidate
  2888. # ignore-private
  2889. # ignore-auth
  2890. # refresh-ims
  2891. #
  2892. # override-expire enforces min age even if the server
  2893. # sent an explicit expiry time (e.g., with the
  2894. # Expires: header or Cache-Control: max-age). Doing this
  2895. # VIOLATES the HTTP standard. Enabling this feature
  2896. # could make you liable for problems which it causes.
  2897. #
  2898. # Note: override-expire does not enforce staleness - it only extends
  2899. # freshness / min. If the server returns a Expires time which
  2900. # is longer than your max time, Squid will still consider
  2901. # the object fresh for that period of time.
  2902. #
  2903. # override-lastmod enforces min age even on objects
  2904. # that were modified recently.
  2905. #
  2906. # reload-into-ims changes client no-cache or ``reload''
  2907. # to If-Modified-Since requests. Doing this VIOLATES the
  2908. # HTTP standard. Enabling this feature could make you
  2909. # liable for problems which it causes.
  2910. #
  2911. # ignore-reload ignores a client no-cache or ``reload''
  2912. # header. Doing this VIOLATES the HTTP standard. Enabling
  2913. # this feature could make you liable for problems which
  2914. # it causes.
  2915. #
  2916. # ignore-no-cache ignores any ``Pragma: no-cache'' and
  2917. # ``Cache-control: no-cache'' headers received from a server.
  2918. # The HTTP RFC never allows the use of this (Pragma) header
  2919. # from a server, only a client, though plenty of servers
  2920. # send it anyway.
  2921. #
  2922. # ignore-no-store ignores any ``Cache-control: no-store''
  2923. # headers received from a server. Doing this VIOLATES
  2924. # the HTTP standard. Enabling this feature could make you
  2925. # liable for problems which it causes.
  2926. #
  2927. # ignore-must-revalidate ignores any ``Cache-Control: must-revalidate``
  2928. # headers received from a server. Doing this VIOLATES
  2929. # the HTTP standard. Enabling this feature could make you
  2930. # liable for problems which it causes.
  2931. #
  2932. # ignore-private ignores any ``Cache-control: private''
  2933. # headers received from a server. Doing this VIOLATES
  2934. # the HTTP standard. Enabling this feature could make you
  2935. # liable for problems which it causes.
  2936. #
  2937. # ignore-auth caches responses to requests with authorization,
  2938. # as if the originserver had sent ``Cache-control: public''
  2939. # in the response header. Doing this VIOLATES the HTTP standard.
  2940. # Enabling this feature could make you liable for problems which
  2941. # it causes.
  2942. #
  2943. # refresh-ims causes squid to contact the origin server
  2944. # when a client issues an If-Modified-Since request. This
  2945. # ensures that the client will receive an updated version
  2946. # if one is available.
  2947. #
  2948. # Basically a cached object is:
  2949. #
  2950. # FRESH if expires < now, else STALE
  2951. # STALE if age > max
  2952. # FRESH if lm-factor < percent, else STALE
  2953. # FRESH if age < min
  2954. # else STALE
  2955. #
  2956. # The refresh_pattern lines are checked in the order listed here.
  2957. # The first entry which matches is used. If none of the entries
  2958. # match the default will be used.
  2959. #
  2960. # Note, you must uncomment all the default lines if you want
  2961. # to change one. The default setting is only active if none is
  2962. # used.
  2963. #
  2964. #
  2965.  
  2966. # Add any of your own refresh_pattern entries above these.
  2967. refresh_pattern ^ftp: 1440 20% 10080
  2968. refresh_pattern ^gopher: 1440 0% 1440
  2969. refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
  2970. refresh_pattern . 0 20% 4320
  2971.  
  2972. # TAG: quick_abort_min (KB)
  2973. # TAG: quick_abort_max (KB)
  2974. # TAG: quick_abort_pct (percent)
  2975. # The cache by default continues downloading aborted requests
  2976. # which are almost completed (less than 16 KB remaining). This
  2977. # may be undesirable on slow (e.g. SLIP) links and/or very busy
  2978. # caches. Impatient users may tie up file descriptors and
  2979. # bandwidth by repeatedly requesting and immediately aborting
  2980. # downloads.
  2981. #
  2982. # When the user aborts a request, Squid will check the
  2983. # quick_abort values to the amount of data transfered until
  2984. # then.
  2985. #
  2986. # If the transfer has less than 'quick_abort_min' KB remaining,
  2987. # it will finish the retrieval.
  2988. #
  2989. # If the transfer has more than 'quick_abort_max' KB remaining,
  2990. # it will abort the retrieval.
  2991. #
  2992. # If more than 'quick_abort_pct' of the transfer has completed,
  2993. # it will finish the retrieval.
  2994. #
  2995. # If you do not want any retrieval to continue after the client
  2996. # has aborted, set both 'quick_abort_min' and 'quick_abort_max'
  2997. # to '0 KB'.
  2998. #
  2999. # If you want retrievals to always continue if they are being
  3000. # cached set 'quick_abort_min' to '-1 KB'.
  3001. #Default:
  3002. # quick_abort_min 16 KB
  3003. # quick_abort_max 16 KB
  3004. # quick_abort_pct 95
  3005.  
  3006. # TAG: read_ahead_gap buffer-size
  3007. # The amount of data the cache will buffer ahead of what has been
  3008. # sent to the client when retrieving an object from another server.
  3009. #Default:
  3010. # read_ahead_gap 16 KB
  3011.  
  3012. # TAG: negative_ttl time-units
  3013. # Set the Default Time-to-Live (TTL) for failed requests.
  3014. # Certain types of failures (such as "connection refused" and
  3015. # "404 Not Found") are able to be negatively-cached for a short time.
  3016. # Modern web servers should provide Expires: header, however if they
  3017. # do not this can provide a minimum TTL.
  3018. # The default is not to cache errors with unknown expiry details.
  3019. #
  3020. # Note that this is different from negative caching of DNS lookups.
  3021. #
  3022. # WARNING: Doing this VIOLATES the HTTP standard. Enabling
  3023. # this feature could make you liable for problems which it
  3024. # causes.
  3025. #Default:
  3026. # negative_ttl 0 seconds
  3027.  
  3028. # TAG: positive_dns_ttl time-units
  3029. # Upper limit on how long Squid will cache positive DNS responses.
  3030. # Default is 6 hours (360 minutes). This directive must be set
  3031. # larger than negative_dns_ttl.
  3032. #Default:
  3033. # positive_dns_ttl 6 hours
  3034.  
  3035. # TAG: negative_dns_ttl time-units
  3036. # Time-to-Live (TTL) for negative caching of failed DNS lookups.
  3037. # This also sets the lower cache limit on positive lookups.
  3038. # Minimum value is 1 second, and it is not recommendable to go
  3039. # much below 10 seconds.
  3040. #Default:
  3041. # negative_dns_ttl 1 minutes
  3042.  
  3043. # TAG: range_offset_limit (bytes)
  3044. # Sets a upper limit on how far into the the file a Range request
  3045. # may be to cause Squid to prefetch the whole file. If beyond this
  3046. # limit Squid forwards the Range request as it is and the result
  3047. # is NOT cached.
  3048. #
  3049. # This is to stop a far ahead range request (lets say start at 17MB)
  3050. # from making Squid fetch the whole object up to that point before
  3051. # sending anything to the client.
  3052. #
  3053. # A value of 0 causes Squid to never fetch more than the
  3054. # client requested. (default)
  3055. #
  3056. # A value of -1 causes Squid to always fetch the object from the
  3057. # beginning so it may cache the result. (2.0 style)
  3058. #
  3059. # NP: Using -1 here will override any quick_abort settings that may
  3060. # otherwise apply to the range request. The range request will
  3061. # be fully fetched from start to finish regardless of the client
  3062. # actions. This affects bandwidth usage.
  3063. #Default:
  3064. # range_offset_limit 0 KB
  3065.  
  3066. # TAG: minimum_expiry_time (seconds)
  3067. # The minimum caching time according to (Expires - Date)
  3068. # Headers Squid honors if the object can't be revalidated
  3069. # defaults to 60 seconds. In reverse proxy environments it
  3070. # might be desirable to honor shorter object lifetimes. It
  3071. # is most likely better to make your server return a
  3072. # meaningful Last-Modified header however. In ESI environments
  3073. # where page fragments often have short lifetimes, this will
  3074. # often be best set to 0.
  3075. #Default:
  3076. # minimum_expiry_time 60 seconds
  3077.  
  3078. # TAG: store_avg_object_size (kbytes)
  3079. # Average object size, used to estimate number of objects your
  3080. # cache can hold. The default is 13 KB.
  3081. #Default:
  3082. # store_avg_object_size 13 KB
  3083.  
  3084. # TAG: store_objects_per_bucket
  3085. # Target number of objects per bucket in the store hash table.
  3086. # Lowering this value increases the total number of buckets and
  3087. # also the storage maintenance rate. The default is 20.
  3088. #Default:
  3089. # store_objects_per_bucket 20
  3090.  
  3091. # HTTP OPTIONS
  3092. # -----------------------------------------------------------------------------
  3093.  
  3094. # TAG: request_header_max_size (KB)
  3095. # This specifies the maximum size for HTTP headers in a request.
  3096. # Request headers are usually relatively small (about 512 bytes).
  3097. # Placing a limit on the request header size will catch certain
  3098. # bugs (for example with persistent connections) and possibly
  3099. # buffer-overflow or denial-of-service attacks.
  3100. #Default:
  3101. # request_header_max_size 64 KB
  3102.  
  3103. # TAG: reply_header_max_size (KB)
  3104. # This specifies the maximum size for HTTP headers in a reply.
  3105. # Reply headers are usually relatively small (about 512 bytes).
  3106. # Placing a limit on the reply header size will catch certain
  3107. # bugs (for example with persistent connections) and possibly
  3108. # buffer-overflow or denial-of-service attacks.
  3109. #Default:
  3110. # reply_header_max_size 64 KB
  3111.  
  3112. # TAG: request_body_max_size (bytes)
  3113. # This specifies the maximum size for an HTTP request body.
  3114. # In other words, the maximum size of a PUT/POST request.
  3115. # A user who attempts to send a request with a body larger
  3116. # than this limit receives an "Invalid Request" error message.
  3117. # If you set this parameter to a zero (the default), there will
  3118. # be no limit imposed.
  3119. #Default:
  3120. # request_body_max_size 0 KB
  3121.  
  3122. # TAG: chunked_request_body_max_size (bytes)
  3123. # A broken or confused HTTP/1.1 client may send a chunked HTTP
  3124. # request to Squid. Squid does not have full support for that
  3125. # feature yet. To cope with such requests, Squid buffers the
  3126. # entire request and then dechunks request body to create a
  3127. # plain HTTP/1.0 request with a known content length. The plain
  3128. # request is then used by the rest of Squid code as usual.
  3129. #
  3130. # The option value specifies the maximum size of the buffer used
  3131. # to hold the request before the conversion. If the chunked
  3132. # request size exceeds the specified limit, the conversion
  3133. # fails, and the client receives an "unsupported request" error,
  3134. # as if dechunking was disabled.
  3135. #
  3136. # Dechunking is enabled by default. To disable conversion of
  3137. # chunked requests, set the maximum to zero.
  3138. #
  3139. # Request dechunking feature and this option in particular are a
  3140. # temporary hack. When chunking requests and responses are fully
  3141. # supported, there will be no need to buffer a chunked request.
  3142. #Default:
  3143. # chunked_request_body_max_size 64 KB
  3144.  
  3145. # TAG: broken_posts
  3146. # A list of ACL elements which, if matched, causes Squid to send
  3147. # an extra CRLF pair after the body of a PUT/POST request.
  3148. #
  3149. # Some HTTP servers has broken implementations of PUT/POST,
  3150. # and rely on an extra CRLF pair sent by some WWW clients.
  3151. #
  3152. # Quote from RFC2616 section 4.1 on this matter:
  3153. #
  3154. # Note: certain buggy HTTP/1.0 client implementations generate an
  3155. # extra CRLF's after a POST request. To restate what is explicitly
  3156. # forbidden by the BNF, an HTTP/1.1 client must not preface or follow
  3157. # a request with an extra CRLF.
  3158. #
  3159. # This clause only supports fast acl types.
  3160. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  3161. #
  3162. #Example:
  3163. # acl buggy_server url_regex ^http://....
  3164. # broken_posts allow buggy_server
  3165. #Default:
  3166. # none
  3167.  
  3168. # TAG: icap_uses_indirect_client on|off
  3169. # Controls whether the indirect client address
  3170. # (see follow_x_forwarded_for) instead of the
  3171. # direct client address is passed to an ICAP
  3172. # server as "X-Client-IP".
  3173. #Default:
  3174. # icap_uses_indirect_client on
  3175.  
  3176. # TAG: via on|off
  3177. # If set (default), Squid will include a Via header in requests and
  3178. # replies as required by RFC2616.
  3179. #Default:
  3180. # via on
  3181.  
  3182. # TAG: ie_refresh on|off
  3183. # Microsoft Internet Explorer up until version 5.5 Service
  3184. # Pack 1 has an issue with transparent proxies, wherein it
  3185. # is impossible to force a refresh. Turning this on provides
  3186. # a partial fix to the problem, by causing all IMS-REFRESH
  3187. # requests from older IE versions to check the origin server
  3188. # for fresh content. This reduces hit ratio by some amount
  3189. # (~10% in my experience), but allows users to actually get
  3190. # fresh content when they want it. Note because Squid
  3191. # cannot tell if the user is using 5.5 or 5.5SP1, the behavior
  3192. # of 5.5 is unchanged from old versions of Squid (i.e. a
  3193. # forced refresh is impossible). Newer versions of IE will,
  3194. # hopefully, continue to have the new behavior and will be
  3195. # handled based on that assumption. This option defaults to
  3196. # the old Squid behavior, which is better for hit ratios but
  3197. # worse for clients using IE, if they need to be able to
  3198. # force fresh content.
  3199. #Default:
  3200. # ie_refresh off
  3201.  
  3202. # TAG: vary_ignore_expire on|off
  3203. # Many HTTP servers supporting Vary gives such objects
  3204. # immediate expiry time with no cache-control header
  3205. # when requested by a HTTP/1.0 client. This option
  3206. # enables Squid to ignore such expiry times until
  3207. # HTTP/1.1 is fully implemented.
  3208. #
  3209. # WARNING: If turned on this may eventually cause some
  3210. # varying objects not intended for caching to get cached.
  3211. #Default:
  3212. # vary_ignore_expire off
  3213.  
  3214. # TAG: request_entities
  3215. # Squid defaults to deny GET and HEAD requests with request entities,
  3216. # as the meaning of such requests are undefined in the HTTP standard
  3217. # even if not explicitly forbidden.
  3218. #
  3219. # Set this directive to on if you have clients which insists
  3220. # on sending request entities in GET or HEAD requests. But be warned
  3221. # that there is server software (both proxies and web servers) which
  3222. # can fail to properly process this kind of request which may make you
  3223. # vulnerable to cache pollution attacks if enabled.
  3224. #Default:
  3225. # request_entities off
  3226.  
  3227. # TAG: request_header_access
  3228. # Usage: request_header_access header_name allow|deny [!]aclname ...
  3229. #
  3230. # WARNING: Doing this VIOLATES the HTTP standard. Enabling
  3231. # this feature could make you liable for problems which it
  3232. # causes.
  3233. #
  3234. # This option replaces the old 'anonymize_headers' and the
  3235. # older 'http_anonymizer' option with something that is much
  3236. # more configurable. This new method creates a list of ACLs
  3237. # for each header, allowing you very fine-tuned header
  3238. # mangling.
  3239. #
  3240. # This option only applies to request headers, i.e., from the
  3241. # client to the server.
  3242. #
  3243. # You can only specify known headers for the header name.
  3244. # Other headers are reclassified as 'Other'. You can also
  3245. # refer to all the headers with 'All'.
  3246. #
  3247. # For example, to achieve the same behavior as the old
  3248. # 'http_anonymizer standard' option, you should use:
  3249. #
  3250. # request_header_access From deny all
  3251. # request_header_access Referer deny all
  3252. # request_header_access Server deny all
  3253. # request_header_access User-Agent deny all
  3254. # request_header_access WWW-Authenticate deny all
  3255. # request_header_access Link deny all
  3256. #
  3257. # Or, to reproduce the old 'http_anonymizer paranoid' feature
  3258. # you should use:
  3259. #
  3260. # request_header_access Allow allow all
  3261. # request_header_access Authorization allow all
  3262. # request_header_access WWW-Authenticate allow all
  3263. # request_header_access Proxy-Authorization allow all
  3264. # request_header_access Proxy-Authenticate allow all
  3265. # request_header_access Cache-Control allow all
  3266. # request_header_access Content-Encoding allow all
  3267. # request_header_access Content-Length allow all
  3268. # request_header_access Content-Type allow all
  3269. # request_header_access Date allow all
  3270. # request_header_access Expires allow all
  3271. # request_header_access Host allow all
  3272. # request_header_access If-Modified-Since allow all
  3273. # request_header_access Last-Modified allow all
  3274. # request_header_access Location allow all
  3275. # request_header_access Pragma allow all
  3276. # request_header_access Accept allow all
  3277. # request_header_access Accept-Charset allow all
  3278. # request_header_access Accept-Encoding allow all
  3279. # request_header_access Accept-Language allow all
  3280. # request_header_access Content-Language allow all
  3281. # request_header_access Mime-Version allow all
  3282. # request_header_access Retry-After allow all
  3283. # request_header_access Title allow all
  3284. # request_header_access Connection allow all
  3285. # request_header_access Proxy-Connection allow all
  3286. # request_header_access All deny all
  3287. #
  3288. # although many of those are HTTP reply headers, and so should be
  3289. # controlled with the reply_header_access directive.
  3290. #
  3291. # By default, all headers are allowed (no anonymizing is
  3292. # performed).
  3293. #Default:
  3294. # none
  3295.  
  3296. # TAG: reply_header_access
  3297. # Usage: reply_header_access header_name allow|deny [!]aclname ...
  3298. #
  3299. # WARNING: Doing this VIOLATES the HTTP standard. Enabling
  3300. # this feature could make you liable for problems which it
  3301. # causes.
  3302. #
  3303. # This option only applies to reply headers, i.e., from the
  3304. # server to the client.
  3305. #
  3306. # This is the same as request_header_access, but in the other
  3307. # direction.
  3308. #
  3309. # This option replaces the old 'anonymize_headers' and the
  3310. # older 'http_anonymizer' option with something that is much
  3311. # more configurable. This new method creates a list of ACLs
  3312. # for each header, allowing you very fine-tuned header
  3313. # mangling.
  3314. #
  3315. # You can only specify known headers for the header name.
  3316. # Other headers are reclassified as 'Other'. You can also
  3317. # refer to all the headers with 'All'.
  3318. #
  3319. # For example, to achieve the same behavior as the old
  3320. # 'http_anonymizer standard' option, you should use:
  3321. #
  3322. # reply_header_access From deny all
  3323. # reply_header_access Referer deny all
  3324. # reply_header_access Server deny all
  3325. # reply_header_access User-Agent deny all
  3326. # reply_header_access WWW-Authenticate deny all
  3327. # reply_header_access Link deny all
  3328. #
  3329. # Or, to reproduce the old 'http_anonymizer paranoid' feature
  3330. # you should use:
  3331. #
  3332. # reply_header_access Allow allow all
  3333. # reply_header_access Authorization allow all
  3334. # reply_header_access WWW-Authenticate allow all
  3335. # reply_header_access Proxy-Authorization allow all
  3336. # reply_header_access Proxy-Authenticate allow all
  3337. # reply_header_access Cache-Control allow all
  3338. # reply_header_access Content-Encoding allow all
  3339. # reply_header_access Content-Length allow all
  3340. # reply_header_access Content-Type allow all
  3341. # reply_header_access Date allow all
  3342. # reply_header_access Expires allow all
  3343. # reply_header_access Host allow all
  3344. # reply_header_access If-Modified-Since allow all
  3345. # reply_header_access Last-Modified allow all
  3346. # reply_header_access Location allow all
  3347. # reply_header_access Pragma allow all
  3348. # reply_header_access Accept allow all
  3349. # reply_header_access Accept-Charset allow all
  3350. # reply_header_access Accept-Encoding allow all
  3351. # reply_header_access Accept-Language allow all
  3352. # reply_header_access Content-Language allow all
  3353. # reply_header_access Mime-Version allow all
  3354. # reply_header_access Retry-After allow all
  3355. # reply_header_access Title allow all
  3356. # reply_header_access Connection allow all
  3357. # reply_header_access Proxy-Connection allow all
  3358. # reply_header_access All deny all
  3359. #
  3360. # although the HTTP request headers won't be usefully controlled
  3361. # by this directive -- see request_header_access for details.
  3362. #
  3363. # By default, all headers are allowed (no anonymizing is
  3364. # performed).
  3365. #Default:
  3366. # none
  3367.  
  3368. # TAG: header_replace
  3369. # Usage: header_replace header_name message
  3370. # Example: header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
  3371. #
  3372. # This option allows you to change the contents of headers
  3373. # denied with header_access above, by replacing them with
  3374. # some fixed string. This replaces the old fake_user_agent
  3375. # option.
  3376. #
  3377. # This only applies to request headers, not reply headers.
  3378. #
  3379. # By default, headers are removed if denied.
  3380. #Default:
  3381. # none
  3382.  
  3383. # TAG: relaxed_header_parser on|off|warn
  3384. # In the default "on" setting Squid accepts certain forms
  3385. # of non-compliant HTTP messages where it is unambiguous
  3386. # what the sending application intended even if the message
  3387. # is not correctly formatted. The messages is then normalized
  3388. # to the correct form when forwarded by Squid.
  3389. #
  3390. # If set to "warn" then a warning will be emitted in cache.log
  3391. # each time such HTTP error is encountered.
  3392. #
  3393. # If set to "off" then such HTTP errors will cause the request
  3394. # or response to be rejected.
  3395. #Default:
  3396. # relaxed_header_parser on
  3397.  
  3398. # TAG: ignore_expect_100 on|off
  3399. # This option makes Squid ignore any Expect: 100-continue header present
  3400. # in the request. RFC 2616 requires that Squid being unable to satisfy
  3401. # the response expectation MUST return a 417 error.
  3402. #
  3403. # Note: Enabling this is a HTTP protocol violation, but some clients may
  3404. # not handle it well..
  3405. #Default:
  3406. # ignore_expect_100 off
  3407.  
  3408. # TIMEOUTS
  3409. # -----------------------------------------------------------------------------
  3410.  
  3411. # TAG: forward_timeout time-units
  3412. # This parameter specifies how long Squid should at most attempt in
  3413. # finding a forwarding path for the request before giving up.
  3414. #Default:
  3415. # forward_timeout 4 minutes
  3416.  
  3417. # TAG: connect_timeout time-units
  3418. # This parameter specifies how long to wait for the TCP connect to
  3419. # the requested server or peer to complete before Squid should
  3420. # attempt to find another path where to forward the request.
  3421. #Default:
  3422. # connect_timeout 1 minute
  3423.  
  3424. # TAG: peer_connect_timeout time-units
  3425. # This parameter specifies how long to wait for a pending TCP
  3426. # connection to a peer cache. The default is 30 seconds. You
  3427. # may also set different timeout values for individual neighbors
  3428. # with the 'connect-timeout' option on a 'cache_peer' line.
  3429. #Default:
  3430. # peer_connect_timeout 30 seconds
  3431.  
  3432. # TAG: read_timeout time-units
  3433. # The read_timeout is applied on server-side connections. After
  3434. # each successful read(), the timeout will be extended by this
  3435. # amount. If no data is read again after this amount of time,
  3436. # the request is aborted and logged with ERR_READ_TIMEOUT. The
  3437. # default is 15 minutes.
  3438. #Default:
  3439. # read_timeout 15 minutes
  3440.  
  3441. # TAG: request_timeout
  3442. # How long to wait for an HTTP request after initial
  3443. # connection establishment.
  3444. #Default:
  3445. # request_timeout 5 minutes
  3446.  
  3447. # TAG: persistent_request_timeout
  3448. # How long to wait for the next HTTP request on a persistent
  3449. # connection after the previous request completes.
  3450. #Default:
  3451. # persistent_request_timeout 2 minutes
  3452.  
  3453. # TAG: client_lifetime time-units
  3454. # The maximum amount of time a client (browser) is allowed to
  3455. # remain connected to the cache process. This protects the Cache
  3456. # from having a lot of sockets (and hence file descriptors) tied up
  3457. # in a CLOSE_WAIT state from remote clients that go away without
  3458. # properly shutting down (either because of a network failure or
  3459. # because of a poor client implementation). The default is one
  3460. # day, 1440 minutes.
  3461. #
  3462. # NOTE: The default value is intended to be much larger than any
  3463. # client would ever need to be connected to your cache. You
  3464. # should probably change client_lifetime only as a last resort.
  3465. # If you seem to have many client connections tying up
  3466. # filedescriptors, we recommend first tuning the read_timeout,
  3467. # request_timeout, persistent_request_timeout and quick_abort values.
  3468. #Default:
  3469. # client_lifetime 1 day
  3470.  
  3471. # TAG: half_closed_clients
  3472. # Some clients may shutdown the sending side of their TCP
  3473. # connections, while leaving their receiving sides open. Sometimes,
  3474. # Squid can not tell the difference between a half-closed and a
  3475. # fully-closed TCP connection.
  3476. #
  3477. # By default, Squid will immediately close client connections when
  3478. # read(2) returns "no more data to read."
  3479. #
  3480. # Change this option to 'on' and Squid will keep open connections
  3481. # until a read(2) or write(2) on the socket returns an error.
  3482. # This may show some benefits for reverse proxies. But if not
  3483. # it is recommended to leave OFF.
  3484. #Default:
  3485. # half_closed_clients off
  3486.  
  3487. # TAG: pconn_timeout
  3488. # Timeout for idle persistent connections to servers and other
  3489. # proxies.
  3490. #Default:
  3491. # pconn_timeout 1 minute
  3492.  
  3493. # TAG: ident_timeout
  3494. # Maximum time to wait for IDENT lookups to complete.
  3495. #
  3496. # If this is too high, and you enabled IDENT lookups from untrusted
  3497. # users, you might be susceptible to denial-of-service by having
  3498. # many ident requests going at once.
  3499. #Default:
  3500. # ident_timeout 10 seconds
  3501.  
  3502. # TAG: shutdown_lifetime time-units
  3503. # When SIGTERM or SIGHUP is received, the cache is put into
  3504. # "shutdown pending" mode until all active sockets are closed.
  3505. # This value is the lifetime to set for all open descriptors
  3506. # during shutdown mode. Any active clients after this many
  3507. # seconds will receive a 'timeout' message.
  3508. #Default:
  3509. # shutdown_lifetime 30 seconds
  3510.  
  3511. # ADMINISTRATIVE PARAMETERS
  3512. # -----------------------------------------------------------------------------
  3513.  
  3514. # TAG: cache_mgr
  3515. # Email-address of local cache manager who will receive
  3516. # mail if the cache dies. The default is "webmaster."
  3517. #Default:
  3518. # cache_mgr webmaster
  3519.  
  3520. # TAG: mail_from
  3521. # From: email-address for mail sent when the cache dies.
  3522. # The default is to use 'appname@unique_hostname'.
  3523. # Default appname value is "squid", can be changed into
  3524. # src/globals.h before building squid.
  3525. #Default:
  3526. # none
  3527.  
  3528. # TAG: mail_program
  3529. # Email program used to send mail if the cache dies.
  3530. # The default is "mail". The specified program must comply
  3531. # with the standard Unix mail syntax:
  3532. # mail-program recipient < mailfile
  3533. #
  3534. # Optional command line options can be specified.
  3535. #Default:
  3536. # mail_program mail
  3537.  
  3538. # TAG: cache_effective_user
  3539. # If you start Squid as root, it will change its effective/real
  3540. # UID/GID to the user specified below. The default is to change
  3541. # to UID of proxy.
  3542. # see also; cache_effective_group
  3543. #Default:
  3544. # cache_effective_user proxy
  3545.  
  3546. # TAG: cache_effective_group
  3547. # Squid sets the GID to the effective user's default group ID
  3548. # (taken from the password file) and supplementary group list
  3549. # from the groups membership.
  3550. #
  3551. # If you want Squid to run with a specific GID regardless of
  3552. # the group memberships of the effective user then set this
  3553. # to the group (or GID) you want Squid to run as. When set
  3554. # all other group privileges of the effective user are ignored
  3555. # and only this GID is effective. If Squid is not started as
  3556. # root the user starting Squid MUST be member of the specified
  3557. # group.
  3558. #
  3559. # This option is not recommended by the Squid Team.
  3560. # Our preference is for administrators to configure a secure
  3561. # user account for squid with UID/GID matching system policies.
  3562. #Default:
  3563. # none
  3564.  
  3565. # TAG: httpd_suppress_version_string on|off
  3566. # Suppress Squid version string info in HTTP headers and HTML error pages.
  3567. #Default:
  3568. # httpd_suppress_version_string off
  3569.  
  3570. # TAG: visible_hostname
  3571. # If you want to present a special hostname in error messages, etc,
  3572. # define this. Otherwise, the return value of gethostname()
  3573. # will be used. If you have multiple caches in a cluster and
  3574. # get errors about IP-forwarding you must set them to have individual
  3575. # names with this setting.
  3576. #Default:
  3577. # visible_hostname localhost
  3578.  
  3579. # TAG: unique_hostname
  3580. # If you want to have multiple machines with the same
  3581. # 'visible_hostname' you must give each machine a different
  3582. # 'unique_hostname' so forwarding loops can be detected.
  3583. #Default:
  3584. # none
  3585.  
  3586. # TAG: hostname_aliases
  3587. # A list of other DNS names your cache has.
  3588. #Default:
  3589. # none
  3590.  
  3591. # TAG: umask
  3592. # Minimum umask which should be enforced while the proxy
  3593. # is running, in addition to the umask set at startup.
  3594. #
  3595. # For a traditional octal representation of umasks, start
  3596. # your value with 0.
  3597. #Default:
  3598. # umask 027
  3599.  
  3600. # OPTIONS FOR THE CACHE REGISTRATION SERVICE
  3601. # -----------------------------------------------------------------------------
  3602. #
  3603. # This section contains parameters for the (optional) cache
  3604. # announcement service. This service is provided to help
  3605. # cache administrators locate one another in order to join or
  3606. # create cache hierarchies.
  3607. #
  3608. # An 'announcement' message is sent (via UDP) to the registration
  3609. # service by Squid. By default, the announcement message is NOT
  3610. # SENT unless you enable it with 'announce_period' below.
  3611. #
  3612. # The announcement message includes your hostname, plus the
  3613. # following information from this configuration file:
  3614. #
  3615. # http_port
  3616. # icp_port
  3617. # cache_mgr
  3618. #
  3619. # All current information is processed regularly and made
  3620. # available on the Web at http://www.ircache.net/Cache/Tracker/.
  3621.  
  3622. # TAG: announce_period
  3623. # This is how frequently to send cache announcements. The
  3624. # default is `0' which disables sending the announcement
  3625. # messages.
  3626. #
  3627. # To enable announcing your cache, just set an announce period.
  3628. #
  3629. # Example:
  3630. # announce_period 1 day
  3631. #Default:
  3632. # announce_period 0
  3633.  
  3634. # TAG: announce_host
  3635. # TAG: announce_file
  3636. # TAG: announce_port
  3637. # announce_host and announce_port set the hostname and port
  3638. # number where the registration message will be sent.
  3639. #
  3640. # Hostname will default to 'tracker.ircache.net' and port will
  3641. # default default to 3131. If the 'filename' argument is given,
  3642. # the contents of that file will be included in the announce
  3643. # message.
  3644. #Default:
  3645. # announce_host tracker.ircache.net
  3646. # announce_port 3131
  3647.  
  3648. # HTTPD-ACCELERATOR OPTIONS
  3649. # -----------------------------------------------------------------------------
  3650.  
  3651. # TAG: httpd_accel_surrogate_id
  3652. # Surrogates (http://www.esi.org/architecture_spec_1.0.html)
  3653. # need an identification token to allow control targeting. Because
  3654. # a farm of surrogates may all perform the same tasks, they may share
  3655. # an identification token.
  3656. #Default:
  3657. # httpd_accel_surrogate_id unset-id
  3658.  
  3659. # TAG: http_accel_surrogate_remote on|off
  3660. # Remote surrogates (such as those in a CDN) honour Surrogate-Control: no-store-remote.
  3661. # Set this to on to have squid behave as a remote surrogate.
  3662. #Default:
  3663. # http_accel_surrogate_remote off
  3664.  
  3665. # TAG: esi_parser libxml2|expat|custom
  3666. # ESI markup is not strictly XML compatible. The custom ESI parser
  3667. # will give higher performance, but cannot handle non ASCII character
  3668. # encodings.
  3669. #Default:
  3670. # esi_parser custom
  3671.  
  3672. # DELAY POOL PARAMETERS
  3673. # -----------------------------------------------------------------------------
  3674.  
  3675. # TAG: delay_pools
  3676. # This represents the number of delay pools to be used. For example,
  3677. # if you have one class 2 delay pool and one class 3 delays pool, you
  3678. # have a total of 2 delay pools.
  3679. #Default:
  3680. # delay_pools 0
  3681.  
  3682. # TAG: delay_class
  3683. # This defines the class of each delay pool. There must be exactly one
  3684. # delay_class line for each delay pool. For example, to define two
  3685. # delay pools, one of class 2 and one of class 3, the settings above
  3686. # and here would be:
  3687. #
  3688. # Example:
  3689. # delay_pools 4 # 4 delay pools
  3690. # delay_class 1 2 # pool 1 is a class 2 pool
  3691. # delay_class 2 3 # pool 2 is a class 3 pool
  3692. # delay_class 3 4 # pool 3 is a class 4 pool
  3693. # delay_class 4 5 # pool 4 is a class 5 pool
  3694. #
  3695. # The delay pool classes are:
  3696. #
  3697. # class 1 Everything is limited by a single aggregate
  3698. # bucket.
  3699. #
  3700. # class 2 Everything is limited by a single aggregate
  3701. # bucket as well as an "individual" bucket chosen
  3702. # from bits 25 through 32 of the IPv4 address.
  3703. #
  3704. # class 3 Everything is limited by a single aggregate
  3705. # bucket as well as a "network" bucket chosen
  3706. # from bits 17 through 24 of the IP address and a
  3707. # "individual" bucket chosen from bits 17 through
  3708. # 32 of the IPv4 address.
  3709. #
  3710. # class 4 Everything in a class 3 delay pool, with an
  3711. # additional limit on a per user basis. This
  3712. # only takes effect if the username is established
  3713. # in advance - by forcing authentication in your
  3714. # http_access rules.
  3715. #
  3716. # class 5 Requests are grouped according their tag (see
  3717. # external_acl's tag= reply).
  3718. #
  3719. # NOTE: If an IP address is a.b.c.d
  3720. # -> bits 25 through 32 are "d"
  3721. # -> bits 17 through 24 are "c"
  3722. # -> bits 17 through 32 are "c * 256 + d"
  3723. #
  3724. # NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to
  3725. # IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic.
  3726. #Default:
  3727. # none
  3728.  
  3729. # TAG: delay_access
  3730. # This is used to determine which delay pool a request falls into.
  3731. #
  3732. # delay_access is sorted per pool and the matching starts with pool 1,
  3733. # then pool 2, ..., and finally pool N. The first delay pool where the
  3734. # request is allowed is selected for the request. If it does not allow
  3735. # the request to any pool then the request is not delayed (default).
  3736. #
  3737. # For example, if you want some_big_clients in delay
  3738. # pool 1 and lotsa_little_clients in delay pool 2:
  3739. #
  3740. #Example:
  3741. # delay_access 1 allow some_big_clients
  3742. # delay_access 1 deny all
  3743. # delay_access 2 allow lotsa_little_clients
  3744. # delay_access 2 deny all
  3745. # delay_access 3 allow authenticated_clients
  3746. #Default:
  3747. # none
  3748.  
  3749. # TAG: delay_parameters
  3750. # This defines the parameters for a delay pool. Each delay pool has
  3751. # a number of "buckets" associated with it, as explained in the
  3752. # description of delay_class. For a class 1 delay pool, the syntax is:
  3753. #
  3754. #delay_parameters pool aggregate
  3755. #
  3756. # For a class 2 delay pool:
  3757. #
  3758. #delay_parameters pool aggregate individual
  3759. #
  3760. # For a class 3 delay pool:
  3761. #
  3762. #delay_parameters pool aggregate network individual
  3763. #
  3764. # For a class 4 delay pool:
  3765. #
  3766. #delay_parameters pool aggregate network individual user
  3767. #
  3768. # For a class 5 delay pool:
  3769. #
  3770. #delay_parameters pool tag
  3771. #
  3772. # The variables here are:
  3773. #
  3774. # pool a pool number - ie, a number between 1 and the
  3775. # number specified in delay_pools as used in
  3776. # delay_class lines.
  3777. #
  3778. # aggregate the "delay parameters" for the aggregate bucket
  3779. # (class 1, 2, 3).
  3780. #
  3781. # individual the "delay parameters" for the individual
  3782. # buckets (class 2, 3).
  3783. #
  3784. # network the "delay parameters" for the network buckets
  3785. # (class 3).
  3786. #
  3787. # user the delay parameters for the user buckets
  3788. # (class 4).
  3789. #
  3790. # tag the delay parameters for the tag buckets
  3791. # (class 5).
  3792. #
  3793. # A pair of delay parameters is written restore/maximum, where restore is
  3794. # the number of bytes (not bits - modem and network speeds are usually
  3795. # quoted in bits) per second placed into the bucket, and maximum is the
  3796. # maximum number of bytes which can be in the bucket at any time.
  3797. #
  3798. # For example, if delay pool number 1 is a class 2 delay pool as in the
  3799. # above example, and is being used to strictly limit each host to 64kbps
  3800. # (plus overheads), with no overall limit, the line is:
  3801. #
  3802. #delay_parameters 1 -1/-1 8000/8000
  3803. #
  3804. # Note that the figure -1 is used to represent "unlimited".
  3805. #
  3806. # And, if delay pool number 2 is a class 3 delay pool as in the above
  3807. # example, and you want to limit it to a total of 256kbps (strict limit)
  3808. # with each 8-bit network permitted 64kbps (strict limit) and each
  3809. # individual host permitted 4800bps with a bucket maximum size of 64kb
  3810. # to permit a decent web page to be downloaded at a decent speed
  3811. # (if the network is not being limited due to overuse) but slow down
  3812. # large downloads more significantly:
  3813. #
  3814. #delay_parameters 2 32000/32000 8000/8000 600/8000
  3815. #
  3816. # There must be one delay_parameters line for each delay pool.
  3817. #
  3818. # Finally, for a class 4 delay pool as in the example - each user will
  3819. # be limited to 128Kb no matter how many workstations they are logged into.:
  3820. #
  3821. #delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
  3822. #Default:
  3823. # none
  3824.  
  3825. # TAG: delay_initial_bucket_level (percent, 0-100)
  3826. # The initial bucket percentage is used to determine how much is put
  3827. # in each bucket when squid starts, is reconfigured, or first notices
  3828. # a host accessing it (in class 2 and class 3, individual hosts and
  3829. # networks only have buckets associated with them once they have been
  3830. # "seen" by squid).
  3831. #Default:
  3832. # delay_initial_bucket_level 50
  3833.  
  3834. # WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
  3835. # -----------------------------------------------------------------------------
  3836.  
  3837. # TAG: wccp_router
  3838. # Use this option to define your WCCP ``home'' router for
  3839. # Squid.
  3840. #
  3841. # wccp_router supports a single WCCP(v1) router
  3842. #
  3843. # wccp2_router supports multiple WCCPv2 routers
  3844. #
  3845. # only one of the two may be used at the same time and defines
  3846. # which version of WCCP to use.
  3847. #Default:
  3848. # wccp_router any_addr
  3849.  
  3850. # TAG: wccp2_router
  3851. # Use this option to define your WCCP ``home'' router for
  3852. # Squid.
  3853. #
  3854. # wccp_router supports a single WCCP(v1) router
  3855. #
  3856. # wccp2_router supports multiple WCCPv2 routers
  3857. #
  3858. # only one of the two may be used at the same time and defines
  3859. # which version of WCCP to use.
  3860. #Default:
  3861. # none
  3862.  
  3863. # TAG: wccp_version
  3864. # This directive is only relevant if you need to set up WCCP(v1)
  3865. # to some very old and end-of-life Cisco routers. In all other
  3866. # setups it must be left unset or at the default setting.
  3867. # It defines an internal version in the WCCP(v1) protocol,
  3868. # with version 4 being the officially documented protocol.
  3869. #
  3870. # According to some users, Cisco IOS 11.2 and earlier only
  3871. # support WCCP version 3. If you're using that or an earlier
  3872. # version of IOS, you may need to change this value to 3, otherwise
  3873. # do not specify this parameter.
  3874. #Default:
  3875. # wccp_version 4
  3876.  
  3877. # TAG: wccp2_rebuild_wait
  3878. # If this is enabled Squid will wait for the cache dir rebuild to finish
  3879. # before sending the first wccp2 HereIAm packet
  3880. #Default:
  3881. # wccp2_rebuild_wait on
  3882.  
  3883. # TAG: wccp2_forwarding_method
  3884. # WCCP2 allows the setting of forwarding methods between the
  3885. # router/switch and the cache. Valid values are as follows:
  3886. #
  3887. # gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
  3888. # l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
  3889. #
  3890. # Currently (as of IOS 12.4) cisco routers only support GRE.
  3891. # Cisco switches only support the L2 redirect assignment method.
  3892. #Default:
  3893. # wccp2_forwarding_method gre
  3894.  
  3895. # TAG: wccp2_return_method
  3896. # WCCP2 allows the setting of return methods between the
  3897. # router/switch and the cache for packets that the cache
  3898. # decides not to handle. Valid values are as follows:
  3899. #
  3900. # gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
  3901. # l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
  3902. #
  3903. # Currently (as of IOS 12.4) cisco routers only support GRE.
  3904. # Cisco switches only support the L2 redirect assignment.
  3905. #
  3906. # If the "ip wccp redirect exclude in" command has been
  3907. # enabled on the cache interface, then it is still safe for
  3908. # the proxy server to use a l2 redirect method even if this
  3909. # option is set to GRE.
  3910. #Default:
  3911. # wccp2_return_method gre
  3912.  
  3913. # TAG: wccp2_assignment_method
  3914. # WCCP2 allows the setting of methods to assign the WCCP hash
  3915. # Valid values are as follows:
  3916. #
  3917. # hash - Hash assignment
  3918. # mask - Mask assignment
  3919. #
  3920. # As a general rule, cisco routers support the hash assignment method
  3921. # and cisco switches support the mask assignment method.
  3922. #Default:
  3923. # wccp2_assignment_method hash
  3924.  
  3925. # TAG: wccp2_service
  3926. # WCCP2 allows for multiple traffic services. There are two
  3927. # types: "standard" and "dynamic". The standard type defines
  3928. # one service id - http (id 0). The dynamic service ids can be from
  3929. # 51 to 255 inclusive. In order to use a dynamic service id
  3930. # one must define the type of traffic to be redirected; this is done
  3931. # using the wccp2_service_info option.
  3932. #
  3933. # The "standard" type does not require a wccp2_service_info option,
  3934. # just specifying the service id will suffice.
  3935. #
  3936. # MD5 service authentication can be enabled by adding
  3937. # "password=<password>" to the end of this service declaration.
  3938. #
  3939. # Examples:
  3940. #
  3941. # wccp2_service standard 0 # for the 'web-cache' standard service
  3942. # wccp2_service dynamic 80 # a dynamic service type which will be
  3943. # # fleshed out with subsequent options.
  3944. # wccp2_service standard 0 password=foo
  3945. #Default:
  3946. # wccp2_service standard 0
  3947.  
  3948. # TAG: wccp2_service_info
  3949. # Dynamic WCCPv2 services require further information to define the
  3950. # traffic you wish to have diverted.
  3951. #
  3952. # The format is:
  3953. #
  3954. # wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
  3955. # priority=<priority> ports=<port>,<port>..
  3956. #
  3957. # The relevant WCCPv2 flags:
  3958. # + src_ip_hash, dst_ip_hash
  3959. # + source_port_hash, dst_port_hash
  3960. # + src_ip_alt_hash, dst_ip_alt_hash
  3961. # + src_port_alt_hash, dst_port_alt_hash
  3962. # + ports_source
  3963. #
  3964. # The port list can be one to eight entries.
  3965. #
  3966. # Example:
  3967. #
  3968. # wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
  3969. # priority=240 ports=80
  3970. #
  3971. # Note: the service id must have been defined by a previous
  3972. # 'wccp2_service dynamic <id>' entry.
  3973. #Default:
  3974. # none
  3975.  
  3976. # TAG: wccp2_weight
  3977. # Each cache server gets assigned a set of the destination
  3978. # hash proportional to their weight.
  3979. #Default:
  3980. # wccp2_weight 10000
  3981.  
  3982. # TAG: wccp_address
  3983. # TAG: wccp2_address
  3984. # Use this option if you require WCCP to use a specific
  3985. # interface address.
  3986. #
  3987. # The default behavior is to not bind to any specific address.
  3988. #Default:
  3989. # wccp_address 0.0.0.0
  3990. # wccp2_address 0.0.0.0
  3991.  
  3992. # PERSISTENT CONNECTION HANDLING
  3993. # -----------------------------------------------------------------------------
  3994. #
  3995. # Also see "pconn_timeout" in the TIMEOUTS section
  3996.  
  3997. # TAG: client_persistent_connections
  3998. # TAG: server_persistent_connections
  3999. # Persistent connection support for clients and servers. By
  4000. # default, Squid uses persistent connections (when allowed)
  4001. # with its clients and servers. You can use these options to
  4002. # disable persistent connections with clients and/or servers.
  4003. #Default:
  4004. # client_persistent_connections on
  4005. # server_persistent_connections on
  4006.  
  4007. # TAG: persistent_connection_after_error
  4008. # With this directive the use of persistent connections after
  4009. # HTTP errors can be disabled. Useful if you have clients
  4010. # who fail to handle errors on persistent connections proper.
  4011. #Default:
  4012. # persistent_connection_after_error on
  4013.  
  4014. # TAG: detect_broken_pconn
  4015. # Some servers have been found to incorrectly signal the use
  4016. # of HTTP/1.0 persistent connections even on replies not
  4017. # compatible, causing significant delays. This server problem
  4018. # has mostly been seen on redirects.
  4019. #
  4020. # By enabling this directive Squid attempts to detect such
  4021. # broken replies and automatically assume the reply is finished
  4022. # after 10 seconds timeout.
  4023. #Default:
  4024. # detect_broken_pconn off
  4025.  
  4026. # CACHE DIGEST OPTIONS
  4027. # -----------------------------------------------------------------------------
  4028.  
  4029. # TAG: digest_generation
  4030. # This controls whether the server will generate a Cache Digest
  4031. # of its contents. By default, Cache Digest generation is
  4032. # enabled if Squid is compiled with --enable-cache-digests defined.
  4033. #Default:
  4034. # digest_generation on
  4035.  
  4036. # TAG: digest_bits_per_entry
  4037. # This is the number of bits of the server's Cache Digest which
  4038. # will be associated with the Digest entry for a given HTTP
  4039. # Method and URL (public key) combination. The default is 5.
  4040. #Default:
  4041. # digest_bits_per_entry 5
  4042.  
  4043. # TAG: digest_rebuild_period (seconds)
  4044. # This is the wait time between Cache Digest rebuilds.
  4045. #Default:
  4046. # digest_rebuild_period 1 hour
  4047.  
  4048. # TAG: digest_rewrite_period (seconds)
  4049. # This is the wait time between Cache Digest writes to
  4050. # disk.
  4051. #Default:
  4052. # digest_rewrite_period 1 hour
  4053.  
  4054. # TAG: digest_swapout_chunk_size (bytes)
  4055. # This is the number of bytes of the Cache Digest to write to
  4056. # disk at a time. It defaults to 4096 bytes (4KB), the Squid
  4057. # default swap page.
  4058. #Default:
  4059. # digest_swapout_chunk_size 4096 bytes
  4060.  
  4061. # TAG: digest_rebuild_chunk_percentage (percent, 0-100)
  4062. # This is the percentage of the Cache Digest to be scanned at a
  4063. # time. By default it is set to 10% of the Cache Digest.
  4064. #Default:
  4065. # digest_rebuild_chunk_percentage 10
  4066.  
  4067. # SNMP OPTIONS
  4068. # -----------------------------------------------------------------------------
  4069.  
  4070. # TAG: snmp_port
  4071. # The port number where Squid listens for SNMP requests. To enable
  4072. # SNMP support set this to a suitable port number. Port number
  4073. # 3401 is often used for the Squid SNMP agent. By default it's
  4074. # set to "0" (disabled)
  4075. #
  4076. # Example:
  4077. # snmp_port 3401
  4078. #Default:
  4079. # snmp_port 0
  4080.  
  4081. # TAG: snmp_access
  4082. # Allowing or denying access to the SNMP port.
  4083. #
  4084. # All access to the agent is denied by default.
  4085. # usage:
  4086. #
  4087. # snmp_access allow|deny [!]aclname ...
  4088. #
  4089. # This clause only supports fast acl types.
  4090. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  4091. #Example:
  4092. # snmp_access allow snmppublic localhost
  4093. # snmp_access deny all
  4094. #Default:
  4095. # snmp_access deny all
  4096.  
  4097. # TAG: snmp_incoming_address
  4098. # TAG: snmp_outgoing_address
  4099. # Just like 'udp_incoming_address', but for the SNMP port.
  4100. #
  4101. # snmp_incoming_address is used for the SNMP socket receiving
  4102. # messages from SNMP agents.
  4103. # snmp_outgoing_address is used for SNMP packets returned to SNMP
  4104. # agents.
  4105. #
  4106. # The default snmp_incoming_address is to listen on all
  4107. # available network interfaces.
  4108. #
  4109. # If snmp_outgoing_address is not set it will use the same socket
  4110. # as snmp_incoming_address. Only change this if you want to have
  4111. # SNMP replies sent using another address than where this Squid
  4112. # listens for SNMP queries.
  4113. #
  4114. # NOTE, snmp_incoming_address and snmp_outgoing_address can not have
  4115. # the same value since they both use port 3401.
  4116. #Default:
  4117. # snmp_incoming_address any_addr
  4118. # snmp_outgoing_address no_addr
  4119.  
  4120. # ICP OPTIONS
  4121. # -----------------------------------------------------------------------------
  4122.  
  4123. # TAG: icp_port
  4124. # The port number where Squid sends and receives ICP queries to
  4125. # and from neighbor caches. The standard UDP port for ICP is 3130.
  4126. # Default is disabled (0).
  4127. #
  4128. # Example:
  4129. # icp_port 3130
  4130. #Default:
  4131. # icp_port 0
  4132.  
  4133. # TAG: htcp_port
  4134. # The port number where Squid sends and receives HTCP queries to
  4135. # and from neighbor caches. To turn it on you want to set it to
  4136. # 4827. By default it is set to "0" (disabled).
  4137. #
  4138. # Example:
  4139. # htcp_port 4827
  4140. #Default:
  4141. # htcp_port 0
  4142.  
  4143. # TAG: log_icp_queries on|off
  4144. # If set, ICP queries are logged to access.log. You may wish
  4145. # do disable this if your ICP load is VERY high to speed things
  4146. # up or to simplify log analysis.
  4147. #Default:
  4148. # log_icp_queries on
  4149.  
  4150. # TAG: udp_incoming_address
  4151. # udp_incoming_address is used for UDP packets received from other
  4152. # caches.
  4153. #
  4154. # The default behavior is to not bind to any specific address.
  4155. #
  4156. # Only change this if you want to have all UDP queries received on
  4157. # a specific interface/address.
  4158. #
  4159. # NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS
  4160. # modules. Altering it will affect all of them in the same manner.
  4161. #
  4162. # see also; udp_outgoing_address
  4163. #
  4164. # NOTE, udp_incoming_address and udp_outgoing_address can not
  4165. # have the same value since they both use the same port.
  4166. #Default:
  4167. # udp_incoming_address any_addr
  4168.  
  4169. # TAG: udp_outgoing_address
  4170. # udp_outgoing_address is used for UDP packets sent out to other
  4171. # caches.
  4172. #
  4173. # The default behavior is to not bind to any specific address.
  4174. #
  4175. # Instead it will use the same socket as udp_incoming_address.
  4176. # Only change this if you want to have UDP queries sent using another
  4177. # address than where this Squid listens for UDP queries from other
  4178. # caches.
  4179. #
  4180. # NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS
  4181. # modules. Altering it will affect all of them in the same manner.
  4182. #
  4183. # see also; udp_incoming_address
  4184. #
  4185. # NOTE, udp_incoming_address and udp_outgoing_address can not
  4186. # have the same value since they both use the same port.
  4187. #Default:
  4188. # udp_outgoing_address no_addr
  4189.  
  4190. # TAG: icp_hit_stale on|off
  4191. # If you want to return ICP_HIT for stale cache objects, set this
  4192. # option to 'on'. If you have sibling relationships with caches
  4193. # in other administrative domains, this should be 'off'. If you only
  4194. # have sibling relationships with caches under your control,
  4195. # it is probably okay to set this to 'on'.
  4196. # If set to 'on', your siblings should use the option "allow-miss"
  4197. # on their cache_peer lines for connecting to you.
  4198. #Default:
  4199. # icp_hit_stale off
  4200.  
  4201. # TAG: minimum_direct_hops
  4202. # If using the ICMP pinging stuff, do direct fetches for sites
  4203. # which are no more than this many hops away.
  4204. #Default:
  4205. # minimum_direct_hops 4
  4206.  
  4207. # TAG: minimum_direct_rtt
  4208. # If using the ICMP pinging stuff, do direct fetches for sites
  4209. # which are no more than this many rtt milliseconds away.
  4210. #Default:
  4211. # minimum_direct_rtt 400
  4212.  
  4213. # TAG: netdb_low
  4214. # TAG: netdb_high
  4215. # The low and high water marks for the ICMP measurement
  4216. # database. These are counts, not percents. The defaults are
  4217. # 900 and 1000. When the high water mark is reached, database
  4218. # entries will be deleted until the low mark is reached.
  4219. #Default:
  4220. # netdb_low 900
  4221. # netdb_high 1000
  4222.  
  4223. # TAG: netdb_ping_period
  4224. # The minimum period for measuring a site. There will be at
  4225. # least this much delay between successive pings to the same
  4226. # network. The default is five minutes.
  4227. #Default:
  4228. # netdb_ping_period 5 minutes
  4229.  
  4230. # TAG: query_icmp on|off
  4231. # If you want to ask your peers to include ICMP data in their ICP
  4232. # replies, enable this option.
  4233. #
  4234. # If your peer has configured Squid (during compilation) with
  4235. # '--enable-icmp' that peer will send ICMP pings to origin server
  4236. # sites of the URLs it receives. If you enable this option the
  4237. # ICP replies from that peer will include the ICMP data (if available).
  4238. # Then, when choosing a parent cache, Squid will choose the parent with
  4239. # the minimal RTT to the origin server. When this happens, the
  4240. # hierarchy field of the access.log will be
  4241. # "CLOSEST_PARENT_MISS". This option is off by default.
  4242. #Default:
  4243. # query_icmp off
  4244.  
  4245. # TAG: test_reachability on|off
  4246. # When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
  4247. # instead of ICP_MISS if the target host is NOT in the ICMP
  4248. # database, or has a zero RTT.
  4249. #Default:
  4250. # test_reachability off
  4251.  
  4252. # TAG: icp_query_timeout (msec)
  4253. # Normally Squid will automatically determine an optimal ICP
  4254. # query timeout value based on the round-trip-time of recent ICP
  4255. # queries. If you want to override the value determined by
  4256. # Squid, set this 'icp_query_timeout' to a non-zero value. This
  4257. # value is specified in MILLISECONDS, so, to use a 2-second
  4258. # timeout (the old default), you would write:
  4259. #
  4260. # icp_query_timeout 2000
  4261. #Default:
  4262. # icp_query_timeout 0
  4263.  
  4264. # TAG: maximum_icp_query_timeout (msec)
  4265. # Normally the ICP query timeout is determined dynamically. But
  4266. # sometimes it can lead to very large values (say 5 seconds).
  4267. # Use this option to put an upper limit on the dynamic timeout
  4268. # value. Do NOT use this option to always use a fixed (instead
  4269. # of a dynamic) timeout value. To set a fixed timeout see the
  4270. # 'icp_query_timeout' directive.
  4271. #Default:
  4272. # maximum_icp_query_timeout 2000
  4273.  
  4274. # TAG: minimum_icp_query_timeout (msec)
  4275. # Normally the ICP query timeout is determined dynamically. But
  4276. # sometimes it can lead to very small timeouts, even lower than
  4277. # the normal latency variance on your link due to traffic.
  4278. # Use this option to put an lower limit on the dynamic timeout
  4279. # value. Do NOT use this option to always use a fixed (instead
  4280. # of a dynamic) timeout value. To set a fixed timeout see the
  4281. # 'icp_query_timeout' directive.
  4282. #Default:
  4283. # minimum_icp_query_timeout 5
  4284.  
  4285. # TAG: background_ping_rate time-units
  4286. # Controls how often the ICP pings are sent to siblings that
  4287. # have background-ping set.
  4288. #Default:
  4289. # background_ping_rate 10 seconds
  4290.  
  4291. # MULTICAST ICP OPTIONS
  4292. # -----------------------------------------------------------------------------
  4293.  
  4294. # TAG: mcast_groups
  4295. # This tag specifies a list of multicast groups which your server
  4296. # should join to receive multicasted ICP queries.
  4297. #
  4298. # NOTE! Be very careful what you put here! Be sure you
  4299. # understand the difference between an ICP _query_ and an ICP
  4300. # _reply_. This option is to be set only if you want to RECEIVE
  4301. # multicast queries. Do NOT set this option to SEND multicast
  4302. # ICP (use cache_peer for that). ICP replies are always sent via
  4303. # unicast, so this option does not affect whether or not you will
  4304. # receive replies from multicast group members.
  4305. #
  4306. # You must be very careful to NOT use a multicast address which
  4307. # is already in use by another group of caches.
  4308. #
  4309. # If you are unsure about multicast, please read the Multicast
  4310. # chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
  4311. #
  4312. # Usage: mcast_groups 239.128.16.128 224.0.1.20
  4313. #
  4314. # By default, Squid doesn't listen on any multicast groups.
  4315. #Default:
  4316. # none
  4317.  
  4318. # TAG: mcast_miss_addr
  4319. # Note: This option is only available if Squid is rebuilt with the
  4320. # -DMULTICAST_MISS_STREAM define
  4321. #
  4322. # If you enable this option, every "cache miss" URL will
  4323. # be sent out on the specified multicast address.
  4324. #
  4325. # Do not enable this option unless you are are absolutely
  4326. # certain you understand what you are doing.
  4327. #Default:
  4328. # mcast_miss_addr no_addr
  4329.  
  4330. # TAG: mcast_miss_ttl
  4331. # Note: This option is only available if Squid is rebuilt with the
  4332. # -DMULTICAST_MISS_STREAM define
  4333. #
  4334. # This is the time-to-live value for packets multicasted
  4335. # when multicasting off cache miss URLs is enabled. By
  4336. # default this is set to 'site scope', i.e. 16.
  4337. #Default:
  4338. # mcast_miss_ttl 16
  4339.  
  4340. # TAG: mcast_miss_port
  4341. # Note: This option is only available if Squid is rebuilt with the
  4342. # -DMULTICAST_MISS_STREAM define
  4343. #
  4344. # This is the port number to be used in conjunction with
  4345. # 'mcast_miss_addr'.
  4346. #Default:
  4347. # mcast_miss_port 3135
  4348.  
  4349. # TAG: mcast_miss_encode_key
  4350. # Note: This option is only available if Squid is rebuilt with the
  4351. # -DMULTICAST_MISS_STREAM define
  4352. #
  4353. # The URLs that are sent in the multicast miss stream are
  4354. # encrypted. This is the encryption key.
  4355. #Default:
  4356. # mcast_miss_encode_key XXXXXXXXXXXXXXXX
  4357.  
  4358. # TAG: mcast_icp_query_timeout (msec)
  4359. # For multicast peers, Squid regularly sends out ICP "probes" to
  4360. # count how many other peers are listening on the given multicast
  4361. # address. This value specifies how long Squid should wait to
  4362. # count all the replies. The default is 2000 msec, or 2
  4363. # seconds.
  4364. #Default:
  4365. # mcast_icp_query_timeout 2000
  4366.  
  4367. # INTERNAL ICON OPTIONS
  4368. # -----------------------------------------------------------------------------
  4369.  
  4370. # TAG: icon_directory
  4371. # Where the icons are stored. These are normally kept in
  4372. # /usr/share/squid3/icons
  4373. #Default:
  4374. # icon_directory /usr/share/squid3/icons
  4375.  
  4376. # TAG: global_internal_static
  4377. # This directive controls is Squid should intercept all requests for
  4378. # /squid-internal-static/ no matter which host the URL is requesting
  4379. # (default on setting), or if nothing special should be done for
  4380. # such URLs (off setting). The purpose of this directive is to make
  4381. # icons etc work better in complex cache hierarchies where it may
  4382. # not always be possible for all corners in the cache mesh to reach
  4383. # the server generating a directory listing.
  4384. #Default:
  4385. # global_internal_static on
  4386.  
  4387. # TAG: short_icon_urls
  4388. # If this is enabled Squid will use short URLs for icons.
  4389. # If disabled it will revert to the old behavior of including
  4390. # it's own name and port in the URL.
  4391. #
  4392. # If you run a complex cache hierarchy with a mix of Squid and
  4393. # other proxies you may need to disable this directive.
  4394. #Default:
  4395. # short_icon_urls on
  4396.  
  4397. # ERROR PAGE OPTIONS
  4398. # -----------------------------------------------------------------------------
  4399.  
  4400. # TAG: error_directory
  4401. # If you wish to create your own versions of the default
  4402. # error files to customize them to suit your company copy
  4403. # the error/template files to another directory and point
  4404. # this tag at them.
  4405. #
  4406. # WARNING: This option will disable multi-language support
  4407. # on error pages if used.
  4408. #
  4409. # The squid developers are interested in making squid available in
  4410. # a wide variety of languages. If you are making translations for a
  4411. # language that Squid does not currently provide please consider
  4412. # contributing your translation back to the project.
  4413. # http://wiki.squid-cache.org/Translations
  4414. #
  4415. # The squid developers working on translations are happy to supply drop-in
  4416. # translated error files in exchange for any new language contributions.
  4417. #Default:
  4418. # none
  4419.  
  4420. # TAG: error_default_language
  4421. # Set the default language which squid will send error pages in
  4422. # if no existing translation matches the clients language
  4423. # preferences.
  4424. #
  4425. # If unset (default) generic English will be used.
  4426. #
  4427. # The squid developers are interested in making squid available in
  4428. # a wide variety of languages. If you are interested in making
  4429. # translations for any language see the squid wiki for details.
  4430. # http://wiki.squid-cache.org/Translations
  4431. #Default:
  4432. # none
  4433.  
  4434. # TAG: error_log_languages
  4435. # Log to cache.log what languages users are attempting to
  4436. # auto-negotiate for translations.
  4437. #
  4438. # Successful negotiations are not logged. Only failures
  4439. # have meaning to indicate that Squid may need an upgrade
  4440. # of its error page translations.
  4441. #Default:
  4442. # error_log_languages on
  4443.  
  4444. # TAG: err_page_stylesheet
  4445. # CSS Stylesheet to pattern the display of Squid default error pages.
  4446. #
  4447. # For information on CSS see http://www.w3.org/Style/CSS/
  4448. #Default:
  4449. # err_page_stylesheet /etc/squid3/errorpage.css
  4450.  
  4451. # TAG: err_html_text
  4452. # HTML text to include in error messages. Make this a "mailto"
  4453. # URL to your admin address, or maybe just a link to your
  4454. # organizations Web page.
  4455. #
  4456. # To include this in your error messages, you must rewrite
  4457. # the error template files (found in the "errors" directory).
  4458. # Wherever you want the 'err_html_text' line to appear,
  4459. # insert a %L tag in the error template file.
  4460. #Default:
  4461. # none
  4462.  
  4463. # TAG: email_err_data on|off
  4464. # If enabled, information about the occurred error will be
  4465. # included in the mailto links of the ERR pages (if %W is set)
  4466. # so that the email body contains the data.
  4467. # Syntax is <A HREF="mailto:%w%W">%w</A>
  4468. #Default:
  4469. # email_err_data on
  4470.  
  4471. # TAG: deny_info
  4472. # Usage: deny_info err_page_name acl
  4473. # or deny_info http://... acl
  4474. # or deny_info TCP_RESET acl
  4475. #
  4476. # This can be used to return a ERR_ page for requests which
  4477. # do not pass the 'http_access' rules. Squid remembers the last
  4478. # acl it evaluated in http_access, and if a 'deny_info' line exists
  4479. # for that ACL Squid returns a corresponding error page.
  4480. #
  4481. # The acl is typically the last acl on the http_access deny line which
  4482. # denied access. The exceptions to this rule are:
  4483. # - When Squid needs to request authentication credentials. It's then
  4484. # the first authentication related acl encountered
  4485. # - When none of the http_access lines matches. It's then the last
  4486. # acl processed on the last http_access line.
  4487. #
  4488. # NP: If providing your own custom error pages with error_directory
  4489. # you may also specify them by your custom file name:
  4490. # Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
  4491. #
  4492. # Alternatively you can specify an error URL. The browsers will
  4493. # get redirected (302) to the specified URL. %s in the redirection
  4494. # URL will be replaced by the requested URL.
  4495. #
  4496. # Alternatively you can tell Squid to reset the TCP connection
  4497. # by specifying TCP_RESET.
  4498. #Default:
  4499. # none
  4500.  
  4501. # OPTIONS INFLUENCING REQUEST FORWARDING
  4502. # -----------------------------------------------------------------------------
  4503.  
  4504. # TAG: nonhierarchical_direct
  4505. # By default, Squid will send any non-hierarchical requests
  4506. # (matching hierarchy_stoplist or not cacheable request type) direct
  4507. # to origin servers.
  4508. #
  4509. # If you set this to off, Squid will prefer to send these
  4510. # requests to parents.
  4511. #
  4512. # Note that in most configurations, by turning this off you will only
  4513. # add latency to these request without any improvement in global hit
  4514. # ratio.
  4515. #
  4516. # If you are inside an firewall see never_direct instead of
  4517. # this directive.
  4518. #Default:
  4519. # nonhierarchical_direct on
  4520.  
  4521. # TAG: prefer_direct
  4522. # Normally Squid tries to use parents for most requests. If you for some
  4523. # reason like it to first try going direct and only use a parent if
  4524. # going direct fails set this to on.
  4525. #
  4526. # By combining nonhierarchical_direct off and prefer_direct on you
  4527. # can set up Squid to use a parent as a backup path if going direct
  4528. # fails.
  4529. #
  4530. # Note: If you want Squid to use parents for all requests see
  4531. # the never_direct directive. prefer_direct only modifies how Squid
  4532. # acts on cacheable requests.
  4533. #Default:
  4534. # prefer_direct off
  4535.  
  4536. # TAG: always_direct
  4537. # Usage: always_direct allow|deny [!]aclname ...
  4538. #
  4539. # Here you can use ACL elements to specify requests which should
  4540. # ALWAYS be forwarded by Squid to the origin servers without using
  4541. # any peers. For example, to always directly forward requests for
  4542. # local servers ignoring any parents or siblings you may have use
  4543. # something like:
  4544. #
  4545. # acl local-servers dstdomain my.domain.net
  4546. # always_direct allow local-servers
  4547. #
  4548. # To always forward FTP requests directly, use
  4549. #
  4550. # acl FTP proto FTP
  4551. # always_direct allow FTP
  4552. #
  4553. # NOTE: There is a similar, but opposite option named
  4554. # 'never_direct'. You need to be aware that "always_direct deny
  4555. # foo" is NOT the same thing as "never_direct allow foo". You
  4556. # may need to use a deny rule to exclude a more-specific case of
  4557. # some other rule. Example:
  4558. #
  4559. # acl local-external dstdomain external.foo.net
  4560. # acl local-servers dstdomain .foo.net
  4561. # always_direct deny local-external
  4562. # always_direct allow local-servers
  4563. #
  4564. # NOTE: If your goal is to make the client forward the request
  4565. # directly to the origin server bypassing Squid then this needs
  4566. # to be done in the client configuration. Squid configuration
  4567. # can only tell Squid how Squid should fetch the object.
  4568. #
  4569. # NOTE: This directive is not related to caching. The replies
  4570. # is cached as usual even if you use always_direct. To not cache
  4571. # the replies see the 'cache' directive.
  4572. #
  4573. # This clause supports both fast and slow acl types.
  4574. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  4575. #Default:
  4576. # none
  4577.  
  4578. # TAG: never_direct
  4579. # Usage: never_direct allow|deny [!]aclname ...
  4580. #
  4581. # never_direct is the opposite of always_direct. Please read
  4582. # the description for always_direct if you have not already.
  4583. #
  4584. # With 'never_direct' you can use ACL elements to specify
  4585. # requests which should NEVER be forwarded directly to origin
  4586. # servers. For example, to force the use of a proxy for all
  4587. # requests, except those in your local domain use something like:
  4588. #
  4589. # acl local-servers dstdomain .foo.net
  4590. # never_direct deny local-servers
  4591. # never_direct allow all
  4592. #
  4593. # or if Squid is inside a firewall and there are local intranet
  4594. # servers inside the firewall use something like:
  4595. #
  4596. # acl local-intranet dstdomain .foo.net
  4597. # acl local-external dstdomain external.foo.net
  4598. # always_direct deny local-external
  4599. # always_direct allow local-intranet
  4600. # never_direct allow all
  4601. #
  4602. # This clause supports both fast and slow acl types.
  4603. # See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
  4604. #Default:
  4605. # none
  4606.  
  4607. # ADVANCED NETWORKING OPTIONS
  4608. # -----------------------------------------------------------------------------
  4609.  
  4610. # TAG: incoming_icp_average
  4611. # TAG: incoming_http_average
  4612. # TAG: incoming_dns_average
  4613. # TAG: min_icp_poll_cnt
  4614. # TAG: min_dns_poll_cnt
  4615. # TAG: min_http_poll_cnt
  4616. # Heavy voodoo here. I can't even believe you are reading this.
  4617. # Are you crazy? Don't even think about adjusting these unless
  4618. # you understand the algorithms in comm_select.c first!
  4619. #Default:
  4620. # incoming_icp_average 6
  4621. # incoming_http_average 4
  4622. # incoming_dns_average 4
  4623. # min_icp_poll_cnt 8
  4624. # min_dns_poll_cnt 8
  4625. # min_http_poll_cnt 8
  4626.  
  4627. # TAG: accept_filter
  4628. # FreeBSD:
  4629. #
  4630. # The name of an accept(2) filter to install on Squid's
  4631. # listen socket(s). This feature is perhaps specific to
  4632. # FreeBSD and requires support in the kernel.
  4633. #
  4634. # The 'httpready' filter delays delivering new connections
  4635. # to Squid until a full HTTP request has been received.
  4636. # See the accf_http(9) man page for details.
  4637. #
  4638. # The 'dataready' filter delays delivering new connections
  4639. # to Squid until there is some data to process.
  4640. # See the accf_dataready(9) man page for details.
  4641. #
  4642. # Linux:
  4643. #
  4644. # The 'data' filter delays delivering of new connections
  4645. # to Squid until there is some data to process by TCP_ACCEPT_DEFER.
  4646. # You may optionally specify a number of seconds to wait by
  4647. # 'data=N' where N is the number of seconds. Defaults to 30
  4648. # if not specified. See the tcp(7) man page for details.
  4649. #EXAMPLE:
  4650. ## FreeBSD
  4651. #accept_filter httpready
  4652. ## Linux
  4653. #accept_filter data
  4654. #Default:
  4655. # none
  4656.  
  4657. # TAG: client_ip_max_connections
  4658. # Set an absolute limit on the number of connections a single
  4659. # client IP can use. Any more than this and Squid will begin to drop
  4660. # new connections from the client until it closes some links.
  4661. #
  4662. # Note that this is a global limit. It affects all HTTP, HTCP, Gopher and FTP
  4663. # connections from the client. For finer control use the ACL access controls.
  4664. #
  4665. # Requires client_db to be enabled (the default).
  4666. #
  4667. # WARNING: This may noticably slow down traffic received via external proxies
  4668. # or NAT devices and cause them to rebound error messages back to their clients.
  4669. #Default:
  4670. # client_ip_max_connections -1
  4671.  
  4672. # TAG: tcp_recv_bufsize (bytes)
  4673. # Size of receive buffer to set for TCP sockets. Probably just
  4674. # as easy to change your kernel's default. Set to zero to use
  4675. # the default buffer size.
  4676. #Default:
  4677. # tcp_recv_bufsize 0 bytes
  4678.  
  4679. # ICAP OPTIONS
  4680. # -----------------------------------------------------------------------------
  4681.  
  4682. # TAG: icap_enable on|off
  4683. # If you want to enable the ICAP module support, set this to on.
  4684. #Default:
  4685. # icap_enable off
  4686.  
  4687. # TAG: icap_connect_timeout
  4688. # This parameter specifies how long to wait for the TCP connect to
  4689. # the requested ICAP server to complete before giving up and either
  4690. # terminating the HTTP transaction or bypassing the failure.
  4691. #
  4692. # The default for optional services is peer_connect_timeout.
  4693. # The default for essential services is connect_timeout.
  4694. # If this option is explicitly set, its value applies to all services.
  4695. #Default:
  4696. # none
  4697.  
  4698. # TAG: icap_io_timeout time-units
  4699. # This parameter specifies how long to wait for an I/O activity on
  4700. # an established, active ICAP connection before giving up and
  4701. # either terminating the HTTP transaction or bypassing the
  4702. # failure.
  4703. #
  4704. # The default is read_timeout.
  4705. #Default:
  4706. # none
  4707.  
  4708. # TAG: icap_service_failure_limit
  4709. # The limit specifies the number of failures that Squid tolerates
  4710. # when establishing a new TCP connection with an ICAP service. If
  4711. # the number of failures exceeds the limit, the ICAP service is
  4712. # not used for new ICAP requests until it is time to refresh its
  4713. # OPTIONS. The per-service failure counter is reset to zero each
  4714. # time Squid fetches new service OPTIONS.
  4715. #
  4716. # A negative value disables the limit. Without the limit, an ICAP
  4717. # service will not be considered down due to connectivity failures
  4718. # between ICAP OPTIONS requests.
  4719. #Default:
  4720. # icap_service_failure_limit 10
  4721.  
  4722. # TAG: icap_service_revival_delay
  4723. # The delay specifies the number of seconds to wait after an ICAP
  4724. # OPTIONS request failure before requesting the options again. The
  4725. # failed ICAP service is considered "down" until fresh OPTIONS are
  4726. # fetched.
  4727. #
  4728. # The actual delay cannot be smaller than the hardcoded minimum
  4729. # delay of 30 seconds.
  4730. #Default:
  4731. # icap_service_revival_delay 180
  4732.  
  4733. # TAG: icap_preview_enable on|off
  4734. # The ICAP Preview feature allows the ICAP server to handle the
  4735. # HTTP message by looking only at the beginning of the message body
  4736. # or even without receiving the body at all. In some environments,
  4737. # previews greatly speedup ICAP processing.
  4738. #
  4739. # During an ICAP OPTIONS transaction, the server may tell Squid what
  4740. # HTTP messages should be previewed and how big the preview should be.
  4741. # Squid will not use Preview if the server did not request one.
  4742. #
  4743. # To disable ICAP Preview for all ICAP services, regardless of
  4744. # individual ICAP server OPTIONS responses, set this option to "off".
  4745. #Example:
  4746. #icap_preview_enable off
  4747. #Default:
  4748. # icap_preview_enable on
  4749.  
  4750. # TAG: icap_preview_size
  4751. # The default size of preview data to be sent to the ICAP server.
  4752. # -1 means no preview. This value might be overwritten on a per server
  4753. # basis by OPTIONS requests.
  4754. #Default:
  4755. # icap_preview_size -1
  4756.  
  4757. # TAG: icap_default_options_ttl
  4758. # The default TTL value for ICAP OPTIONS responses that don't have
  4759. # an Options-TTL header.
  4760. #Default:
  4761. # icap_default_options_ttl 60
  4762.  
  4763. # TAG: icap_persistent_connections on|off
  4764. # Whether or not Squid should use persistent connections to
  4765. # an ICAP server.
  4766. #Default:
  4767. # icap_persistent_connections on
  4768.  
  4769. # TAG: icap_send_client_ip on|off
  4770. # This adds the header "X-Client-IP" to ICAP requests.
  4771. #Default:
  4772. # icap_send_client_ip off
  4773.  
  4774. # TAG: icap_send_client_username on|off
  4775. # This sends authenticated HTTP client username (if available) to
  4776. # the ICAP service. The username value is encoded based on the
  4777. # icap_client_username_encode option and is sent using the header
  4778. # specified by the icap_client_username_header option.
  4779. #Default:
  4780. # icap_send_client_username off
  4781.  
  4782. # TAG: icap_client_username_header
  4783. # ICAP request header name to use for send_client_username.
  4784. #Default:
  4785. # icap_client_username_header X-Client-Username
  4786.  
  4787. # TAG: icap_client_username_encode on|off
  4788. # Whether to base64 encode the authenticated client username.
  4789. #Default:
  4790. # icap_client_username_encode off
  4791.  
  4792. # TAG: icap_service
  4793. # Defines a single ICAP service using the following format:
  4794. #
  4795. # icap_service service_name vectoring_point [options] service_url
  4796. #
  4797. # service_name: ID
  4798. # an opaque identifier which must be unique in squid.conf
  4799. #
  4800. # vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
  4801. # This specifies at which point of transaction processing the
  4802. # ICAP service should be activated. *_postcache vectoring points
  4803. # are not yet supported.
  4804. #
  4805. # service_url: icap://servername:port/servicepath
  4806. # ICAP server and service location.
  4807. #
  4808. # ICAP does not allow a single service to handle both REQMOD and RESPMOD
  4809. # transactions. Squid does not enforce that requirement. You can specify
  4810. # services with the same service_url and different vectoring_points. You
  4811. # can even specify multiple identical services as long as their
  4812. # service_names differ.
  4813. #
  4814. #
  4815. # Service options are separated by white space. ICAP services support
  4816. # the following name=value options:
  4817. #
  4818. # bypass=on|off|1|0
  4819. # If set to 'on' or '1', the ICAP service is treated as
  4820. # optional. If the service cannot be reached or malfunctions,
  4821. # Squid will try to ignore any errors and process the message as
  4822. # if the service was not enabled. No all ICAP errors can be
  4823. # bypassed. If set to 0, the ICAP service is treated as
  4824. # essential and all ICAP errors will result in an error page
  4825. # returned to the HTTP client.
  4826. #
  4827. # Bypass is off by default: services are treated as essential.
  4828. #
  4829. # routing=on|off|1|0
  4830. # If set to 'on' or '1', the ICAP service is allowed to
  4831. # dynamically change the current message adaptation plan by
  4832. # returning a chain of services to be used next. The services
  4833. # are specified using the X-Next-Services ICAP response header
  4834. # value, formatted as a comma-separated list of service names.
  4835. # Each named service should be configured in squid.conf and
  4836. # should have the same method and vectoring point as the current
  4837. # ICAP transaction. Services violating these rules are ignored.
  4838. # An empty X-Next-Services value results in an empty plan which
  4839. # ends the current adaptation.
  4840. #
  4841. # Routing is not allowed by default: the ICAP X-Next-Services
  4842. # response header is ignored.
  4843. #
  4844. # Older icap_service format without optional named parameters is
  4845. # deprecated but supported for backward compatibility.
  4846. #
  4847. #Example:
  4848. #icap_service svcBlocker reqmod_precache bypass=0 icap://icap1.mydomain.net:1344/reqmod
  4849. #icap_service svcLogger reqmod_precache routing=on icap://icap2.mydomain.net:1344/respmod
  4850. #Default:
  4851. # none
  4852.  
  4853. # TAG: icap_class
  4854. # This deprecated option was documented to define an ICAP service
  4855. # chain, even though it actually defined a set of similar, redundant
  4856. # services, and the chains were not supported.
  4857. #
  4858. # To define a set of redundant services, please use the
  4859. # adaptation_service_set directive. For service chains, use
  4860. # adaptation_service_chain.
  4861. #Default:
  4862. # none
  4863.  
  4864. # TAG: icap_access
  4865. # This option is deprecated. Please use adaptation_access, which
  4866. # has the same ICAP functionality, but comes with better
  4867. # documentation, and eCAP support.
  4868. #Default:
  4869. # none
  4870.  
  4871. # eCAP OPTIONS
  4872. # -----------------------------------------------------------------------------
  4873.  
  4874. # TAG: ecap_enable on|off
  4875. # Note: This option is only available if Squid is rebuilt with the
  4876. # --enable-ecap option
  4877. #
  4878. # Controls whether eCAP support is enabled.
  4879. #Default:
  4880. # ecap_enable off
  4881.  
  4882. # TAG: ecap_service
  4883. # Note: This option is only available if Squid is rebuilt with the
  4884. # --enable-ecap option
  4885. #
  4886. # Defines a single eCAP service
  4887. #
  4888. # ecap_service servicename vectoring_point bypass service_url
  4889. #
  4890. # vectoring_point = reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
  4891. # This specifies at which point of transaction processing the
  4892. # eCAP service should be activated. *_postcache vectoring points
  4893. # are not yet supported.
  4894. # bypass = 1|0
  4895. # If set to 1, the eCAP service is treated as optional. If the
  4896. # service cannot be reached or malfunctions, Squid will try to
  4897. # ignore any errors and process the message as if the service
  4898. # was not enabled. No all eCAP errors can be bypassed.
  4899. # If set to 0, the eCAP service is treated as essential and all
  4900. # eCAP errors will result in an error page returned to the
  4901. # HTTP client.
  4902. # service_url = ecap://vendor/service_name?custom&cgi=style&parameters=optional
  4903. #
  4904. #Example:
  4905. #ecap_service service_1 reqmod_precache 0 ecap://filters-R-us/leakDetector?on_error=block
  4906. #ecap_service service_2 respmod_precache 1 icap://filters-R-us/virusFilter?config=/etc/vf.cfg
  4907. #Default:
  4908. # none
  4909.  
  4910. # TAG: loadable_modules
  4911. # Instructs Squid to load the specified dynamic module(s) or activate
  4912. # preloaded module(s).
  4913. #Example:
  4914. #loadable_modules /usr/lib/MinimalAdapter.so
  4915. #Default:
  4916. # none
  4917.  
  4918. # MESSAGE ADAPTATION OPTIONS
  4919. # -----------------------------------------------------------------------------
  4920.  
  4921. # TAG: adaptation_service_set
  4922. #
  4923. # Configures an ordered set of similar, redundant services. This is
  4924. # useful when hot standby or backup adaptation servers are available.
  4925. #
  4926. # adaptation_service_set set_name service_name1 service_name2 ...
  4927. #
  4928. # The named services are used in the set declaration order. The first
  4929. # applicable adaptation service from the set is used first. The next
  4930. # applicable service is tried if and only if the transaction with the
  4931. # previous service fails and the message waiting to be adapted is still
  4932. # intact.
  4933. #
  4934. # When adaptation starts, broken services are ignored as if they were
  4935. # not a part of the set. A broken service is a down optional service.
  4936. #
  4937. # The services in a set must be attached to the same vectoring point
  4938. # (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
  4939. #
  4940. # If all services in a set are optional then adaptation failures are
  4941. # bypassable. If all services in the set are essential, then a
  4942. # transaction failure with one service may still be retried using
  4943. # another service from the set, but when all services fail, the master
  4944. # transaction fails as well.
  4945. #
  4946. # A set may contain a mix of optional and essential services, but that
  4947. # is likely to lead to surprising results because broken services become
  4948. # ignored (see above), making previously bypassable failures fatal.
  4949. # Technically, it is the bypassability of the last failed service that
  4950. # matters.
  4951. #
  4952. # See also: adaptation_access adaptation_service_chain
  4953. #
  4954. #Example:
  4955. #adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup
  4956. #adaptation service_set svcLogger loggerLocal loggerRemote
  4957. #Default:
  4958. # none
  4959.  
  4960. # TAG: adaptation_service_chain
  4961. #
  4962. # Configures a list of complementary services that will be applied
  4963. # one-by-one, forming an adaptation chain or pipeline. This is useful
  4964. # when Squid must perform different adaptations on the same message.
  4965. #
  4966. # adaptation_service_chain chain_name service_name1 svc_name2 ...
  4967. #
  4968. # The named services are used in the chain declaration order. The first
  4969. # applicable adaptation service from the chain is used first. The next
  4970. # applicable service is applied to the successful adaptation results of
  4971. # the previous service in the chain.
  4972. #
  4973. # When adaptation starts, broken services are ignored as if they were
  4974. # not a part of the chain. A broken service is a down optional service.
  4975. #
  4976. # Request satisfaction terminates the adaptation chain because Squid
  4977. # does not currently allow declaration of RESPMOD services at the
  4978. # "reqmod_precache" vectoring point (see icap_service or ecap_service).
  4979. #
  4980. # The services in a chain must be attached to the same vectoring point
  4981. # (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
  4982. #
  4983. # A chain may contain a mix of optional and essential services. If an
  4984. # essential adaptation fails (or the failure cannot be bypassed for
  4985. # other reasons), the master transaction fails. Otherwise, the failure
  4986. # is bypassed as if the failed adaptation service was not in the chain.
  4987. #
  4988. # See also: adaptation_access adaptation_service_set
  4989. #
  4990. #Example:
  4991. #adaptation_service_chain svcRequest requestLogger urlFilter leakDetector
  4992. #Default:
  4993. # none
  4994.  
  4995. # TAG: adaptation_access
  4996. # Sends an HTTP transaction to an ICAP or eCAP adaptation service.
  4997. #
  4998. # adaptation_access service_name allow|deny [!]aclname...
  4999. # adaptation_access set_name allow|deny [!]aclname...
  5000. #
  5001. # At each supported vectoring point, the adaptation_access
  5002. # statements are processed in the order they appear in this
  5003. # configuration file. Statements pointing to the following services
  5004. # are ignored (i.e., skipped without checking their ACL):
  5005. #
  5006. # - services serving different vectoring points
  5007. # - "broken-but-bypassable" services
  5008. # - "up" services configured to ignore such transactions
  5009. # (e.g., based on the ICAP Transfer-Ignore header).
  5010. #
  5011. # When a set_name is used, all services in the set are checked
  5012. # using the same rules, to find the first applicable one. See
  5013. # adaptation_service_set for details.
  5014. #
  5015. # If an access list is checked and there is a match, the
  5016. # processing stops: For an "allow" rule, the corresponding
  5017. # adaptation service is used for the transaction. For a "deny"
  5018. # rule, no adaptation service is activated.
  5019. #
  5020. # It is currently not possible to apply more than one adaptation
  5021. # service at the same vectoring point to the same HTTP transaction.
  5022. #
  5023. # See also: icap_service and ecap_service
  5024. #
  5025. #Example:
  5026. #adaptation_access service_1 allow all
  5027. #Default:
  5028. # none
  5029.  
  5030. # TAG: adaptation_service_iteration_limit
  5031. # Limits the number of iterations allowed when applying adaptation
  5032. # services to a message. If your longest adaptation set or chain
  5033. # may have more than 16 services, increase the limit beyond its
  5034. # default value of 16. If detecting infinite iteration loops sooner
  5035. # is critical, make the iteration limit match the actual number
  5036. # of services in your longest adaptation set or chain.
  5037. #
  5038. # Infinite adaptation loops are most likely with routing services.
  5039. #
  5040. # See also: icap_service routing=1
  5041. #Default:
  5042. # adaptation_service_iteration_limit 16
  5043.  
  5044. # TAG: adaptation_masterx_shared_names
  5045. # For each master transaction (i.e., the HTTP request and response
  5046. # sequence, including all related ICAP and eCAP exchanges), Squid
  5047. # maintains a table of metadata. The table entries are (name, value)
  5048. # pairs shared among eCAP and ICAP exchanges. The table is destroyed
  5049. # with the master transaction.
  5050. #
  5051. # This option specifies the table entry names that Squid must accept
  5052. # from and forward to the adaptation transactions.
  5053. #
  5054. # An ICAP REQMOD or RESPMOD transaction may set an entry in the
  5055. # shared table by returning an ICAP header field with a name
  5056. # specified in adaptation_masterx_shared_names. Squid will store
  5057. # and forward that ICAP header field to subsequent ICAP
  5058. # transactions within the same master transaction scope.
  5059. #
  5060. # Only one shared entry name is supported at this time.
  5061. #
  5062. #Example:
  5063. ## share authentication information among ICAP services
  5064. #adaptation_masterx_shared_names X-Subscriber-ID
  5065. #Default:
  5066. # none
  5067.  
  5068. # TAG: icap_retry
  5069. # This ACL determines which retriable ICAP transactions are
  5070. # retried. Transactions that received a complete ICAP response
  5071. # and did not have to consume or produce HTTP bodies to receive
  5072. # that response are usually retriable.
  5073. #
  5074. # icap_retry allow|deny [!]aclname ...
  5075. #
  5076. # Squid automatically retries some ICAP I/O timeouts and errors
  5077. # due to persistent connection race conditions.
  5078. #
  5079. # See also: icap_retry_limit
  5080. #Default:
  5081. # icap_retry deny all
  5082.  
  5083. # TAG: icap_retry_limit
  5084. # Limits the number of retries allowed. When set to zero (default),
  5085. # no retries are allowed.
  5086. #
  5087. # Communication errors due to persistent connection race
  5088. # conditions are unavoidable, automatically retried, and do not
  5089. # count against this limit.
  5090. #
  5091. # See also: icap_retry
  5092. #Default:
  5093. # icap_retry_limit 0
  5094.  
  5095. # DNS OPTIONS
  5096. # -----------------------------------------------------------------------------
  5097.  
  5098. # TAG: check_hostnames
  5099. # For security and stability reasons Squid can check
  5100. # hostnames for Internet standard RFC compliance. If you want
  5101. # Squid to perform these checks turn this directive on.
  5102. #Default:
  5103. # check_hostnames off
  5104.  
  5105. # TAG: allow_underscore
  5106. # Underscore characters is not strictly allowed in Internet hostnames
  5107. # but nevertheless used by many sites. Set this to off if you want
  5108. # Squid to be strict about the standard.
  5109. # This check is performed only when check_hostnames is set to on.
  5110. #Default:
  5111. # allow_underscore on
  5112.  
  5113. # TAG: cache_dns_program
  5114. # Note: This option is only available if Squid is rebuilt with the
  5115. # --disable-internal-dns option
  5116. #
  5117. # Specify the location of the executable for dnslookup process.
  5118. #Default:
  5119. # cache_dns_program /usr/lib/squid3/dnsserver
  5120.  
  5121. # TAG: dns_children
  5122. # Note: This option is only available if Squid is rebuilt with the
  5123. # --disable-internal-dns option
  5124. #
  5125. # The number of processes spawn to service DNS name lookups.
  5126. # For heavily loaded caches on large servers, you should
  5127. # probably increase this value to at least 10. The maximum
  5128. # is 32. The default is 5.
  5129. #
  5130. # You must have at least one dnsserver process.
  5131. #Default:
  5132. # dns_children 5
  5133.  
  5134. # TAG: dns_retransmit_interval
  5135. # Initial retransmit interval for DNS queries. The interval is
  5136. # doubled each time all configured DNS servers have been tried.
  5137. #
  5138. #Default:
  5139. # dns_retransmit_interval 5 seconds
  5140.  
  5141. # TAG: dns_timeout
  5142. # DNS Query timeout. If no response is received to a DNS query
  5143. # within this time all DNS servers for the queried domain
  5144. # are assumed to be unavailable.
  5145. #Default:
  5146. # dns_timeout 2 minutes
  5147.  
  5148. # TAG: dns_defnames on|off
  5149. # Normally the RES_DEFNAMES resolver option is disabled
  5150. # (see res_init(3)). This prevents caches in a hierarchy
  5151. # from interpreting single-component hostnames locally. To allow
  5152. # Squid to handle single-component names, enable this option.
  5153. #Default:
  5154. # dns_defnames off
  5155.  
  5156. # TAG: dns_nameservers
  5157. # Use this if you want to specify a list of DNS name servers
  5158. # (IP addresses) to use instead of those given in your
  5159. # /etc/resolv.conf file.
  5160. # On Windows platforms, if no value is specified here or in
  5161. # the /etc/resolv.conf file, the list of DNS name servers are
  5162. # taken from the Windows registry, both static and dynamic DHCP
  5163. # configurations are supported.
  5164. #
  5165. # Example: dns_nameservers 10.0.0.1 192.172.0.4
  5166. #Default:
  5167. # none
  5168.  
  5169. # TAG: hosts_file
  5170. # Location of the host-local IP name-address associations
  5171. # database. Most Operating Systems have such a file on different
  5172. # default locations:
  5173. # - Un*X & Linux: /etc/hosts
  5174. # - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
  5175. # (%SystemRoot% value install default is c:\winnt)
  5176. # - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
  5177. # (%SystemRoot% value install default is c:\windows)
  5178. # - Windows 9x/Me: %windir%\hosts
  5179. # (%windir% value is usually c:\windows)
  5180. # - Cygwin: /etc/hosts
  5181. #
  5182. # The file contains newline-separated definitions, in the
  5183. # form ip_address_in_dotted_form name [name ...] names are
  5184. # whitespace-separated. Lines beginning with an hash (#)
  5185. # character are comments.
  5186. #
  5187. # The file is checked at startup and upon configuration.
  5188. # If set to 'none', it won't be checked.
  5189. # If append_domain is used, that domain will be added to
  5190. # domain-local (i.e. not containing any dot character) host
  5191. # definitions.
  5192. #Default:
  5193. # hosts_file /etc/hosts
  5194.  
  5195. # TAG: append_domain
  5196. # Appends local domain name to hostnames without any dots in
  5197. # them. append_domain must begin with a period.
  5198. #
  5199. # Be warned there are now Internet names with no dots in
  5200. # them using only top-domain names, so setting this may
  5201. # cause some Internet sites to become unavailable.
  5202. #
  5203. #Example:
  5204. # append_domain .yourdomain.com
  5205. #Default:
  5206. # none
  5207.  
  5208. # TAG: ignore_unknown_nameservers
  5209. # By default Squid checks that DNS responses are received
  5210. # from the same IP addresses they are sent to. If they
  5211. # don't match, Squid ignores the response and writes a warning
  5212. # message to cache.log. You can allow responses from unknown
  5213. # nameservers by setting this option to 'off'.
  5214. #Default:
  5215. # ignore_unknown_nameservers on
  5216.  
  5217. # TAG: dns_v4_fallback
  5218. # Standard practice with DNS is to lookup either A or AAAA records
  5219. # and use the results if it succeeds. Only looking up the other if
  5220. # the first attempt fails or otherwise produces no results.
  5221. #
  5222. # That policy however will cause squid to produce error pages for some
  5223. # servers that advertise AAAA but are unreachable over IPv6.
  5224. #
  5225. # If this is ON squid will always lookup both AAAA and A, using both.
  5226. # If this is OFF squid will lookup AAAA and only try A if none found.
  5227. #
  5228. # WARNING: There are some possibly unwanted side-effects with this on:
  5229. # *) Doubles the load placed by squid on the DNS network.
  5230. # *) May negatively impact connection delay times.
  5231. #Default:
  5232. # dns_v4_fallback on
  5233.  
  5234. # TAG: ipcache_size (number of entries)
  5235. # TAG: ipcache_low (percent)
  5236. # TAG: ipcache_high (percent)
  5237. # The size, low-, and high-water marks for the IP cache.
  5238. #Default:
  5239. # ipcache_size 1024
  5240. # ipcache_low 90
  5241. # ipcache_high 95
  5242.  
  5243. # TAG: fqdncache_size (number of entries)
  5244. # Maximum number of FQDN cache entries.
  5245. #Default:
  5246. # fqdncache_size 1024
  5247.  
  5248. # MISCELLANEOUS
  5249. # -----------------------------------------------------------------------------
  5250.  
  5251. # TAG: memory_pools on|off
  5252. # If set, Squid will keep pools of allocated (but unused) memory
  5253. # available for future use. If memory is a premium on your
  5254. # system and you believe your malloc library outperforms Squid
  5255. # routines, disable this.
  5256. #Default:
  5257. # memory_pools on
  5258.  
  5259. # TAG: memory_pools_limit (bytes)
  5260. # Used only with memory_pools on:
  5261. # memory_pools_limit 50 MB
  5262. #
  5263. # If set to a non-zero value, Squid will keep at most the specified
  5264. # limit of allocated (but unused) memory in memory pools. All free()
  5265. # requests that exceed this limit will be handled by your malloc
  5266. # library. Squid does not pre-allocate any memory, just safe-keeps
  5267. # objects that otherwise would be free()d. Thus, it is safe to set
  5268. # memory_pools_limit to a reasonably high value even if your
  5269. # configuration will use less memory.
  5270. #
  5271. # If set to none, Squid will keep all memory it can. That is, there
  5272. # will be no limit on the total amount of memory used for safe-keeping.
  5273. #
  5274. # To disable memory allocation optimization, do not set
  5275. # memory_pools_limit to 0 or none. Set memory_pools to "off" instead.
  5276. #
  5277. # An overhead for maintaining memory pools is not taken into account
  5278. # when the limit is checked. This overhead is close to four bytes per
  5279. # object kept. However, pools may actually _save_ memory because of
  5280. # reduced memory thrashing in your malloc library.
  5281. #Default:
  5282. # memory_pools_limit 5 MB
  5283.  
  5284. # TAG: forwarded_for on|off|transparent|truncate|delete
  5285. # If set to "on", Squid will append your client's IP address
  5286. # in the HTTP requests it forwards. By default it looks like:
  5287. #
  5288. # X-Forwarded-For: 192.1.2.3
  5289. #
  5290. # If set to "off", it will appear as
  5291. #
  5292. # X-Forwarded-For: unknown
  5293. #
  5294. # If set to "transparent", Squid will not alter the
  5295. # X-Forwarded-For header in any way.
  5296. #
  5297. # If set to "delete", Squid will delete the entire
  5298. # X-Forwarded-For header.
  5299. #
  5300. # If set to "truncate", Squid will remove all existing
  5301. # X-Forwarded-For entries, and place itself as the sole entry.
  5302. #Default:
  5303. # forwarded_for on
  5304.  
  5305. # TAG: cachemgr_passwd
  5306. # Specify passwords for cachemgr operations.
  5307. #
  5308. # Usage: cachemgr_passwd password action action ...
  5309. #
  5310. # Some valid actions are (see cache manager menu for a full list):
  5311. # 5min
  5312. # 60min
  5313. # asndb
  5314. # authenticator
  5315. # cbdata
  5316. # client_list
  5317. # comm_incoming
  5318. # config *
  5319. # counters
  5320. # delay
  5321. # digest_stats
  5322. # dns
  5323. # events
  5324. # filedescriptors
  5325. # fqdncache
  5326. # histograms
  5327. # http_headers
  5328. # info
  5329. # io
  5330. # ipcache
  5331. # mem
  5332. # menu
  5333. # netdb
  5334. # non_peers
  5335. # objects
  5336. # offline_toggle *
  5337. # pconn
  5338. # peer_select
  5339. # reconfigure *
  5340. # redirector
  5341. # refresh
  5342. # server_list
  5343. # shutdown *
  5344. # store_digest
  5345. # storedir
  5346. # utilization
  5347. # via_headers
  5348. # vm_objects
  5349. #
  5350. # * Indicates actions which will not be performed without a
  5351. # valid password, others can be performed if not listed here.
  5352. #
  5353. # To disable an action, set the password to "disable".
  5354. # To allow performing an action without a password, set the
  5355. # password to "none".
  5356. #
  5357. # Use the keyword "all" to set the same password for all actions.
  5358. #
  5359. #Example:
  5360. # cachemgr_passwd secret shutdown
  5361. # cachemgr_passwd lesssssssecret info stats/objects
  5362. # cachemgr_passwd disable all
  5363. #Default:
  5364. # none
  5365.  
  5366. # TAG: client_db on|off
  5367. # If you want to disable collecting per-client statistics,
  5368. # turn off client_db here.
  5369. #Default:
  5370. # client_db on
  5371.  
  5372. # TAG: refresh_all_ims on|off
  5373. # When you enable this option, squid will always check
  5374. # the origin server for an update when a client sends an
  5375. # If-Modified-Since request. Many browsers use IMS
  5376. # requests when the user requests a reload, and this
  5377. # ensures those clients receive the latest version.
  5378. #
  5379. # By default (off), squid may return a Not Modified response
  5380. # based on the age of the cached version.
  5381. #Default:
  5382. # refresh_all_ims off
  5383.  
  5384. # TAG: reload_into_ims on|off
  5385. # When you enable this option, client no-cache or ``reload''
  5386. # requests will be changed to If-Modified-Since requests.
  5387. # Doing this VIOLATES the HTTP standard. Enabling this
  5388. # feature could make you liable for problems which it
  5389. # causes.
  5390. #
  5391. # see also refresh_pattern for a more selective approach.
  5392. #Default:
  5393. # reload_into_ims off
  5394.  
  5395. # TAG: maximum_single_addr_tries
  5396. # This sets the maximum number of connection attempts for a
  5397. # host that only has one address (for multiple-address hosts,
  5398. # each address is tried once).
  5399. #
  5400. # The default value is one attempt, the (not recommended)
  5401. # maximum is 255 tries. A warning message will be generated
  5402. # if it is set to a value greater than ten.
  5403. #
  5404. # Note: This is in addition to the request re-forwarding which
  5405. # takes place if Squid fails to get a satisfying response.
  5406. #Default:
  5407. # maximum_single_addr_tries 1
  5408.  
  5409. # TAG: retry_on_error
  5410. # If set to on Squid will automatically retry requests when
  5411. # receiving an error response. This is mainly useful if you
  5412. # are in a complex cache hierarchy to work around access
  5413. # control errors.
  5414. #Default:
  5415. # retry_on_error off
  5416.  
  5417. # TAG: as_whois_server
  5418. # WHOIS server to query for AS numbers. NOTE: AS numbers are
  5419. # queried only when Squid starts up, not for every request.
  5420. #Default:
  5421. # as_whois_server whois.ra.net
  5422. # as_whois_server whois.ra.net
  5423.  
  5424. # TAG: offline_mode
  5425. # Enable this option and Squid will never try to validate cached
  5426. # objects.
  5427. #Default:
  5428. # offline_mode off
  5429.  
  5430. # TAG: uri_whitespace
  5431. # What to do with requests that have whitespace characters in the
  5432. # URI. Options:
  5433. #
  5434. # strip: The whitespace characters are stripped out of the URL.
  5435. # This is the behavior recommended by RFC2396.
  5436. # deny: The request is denied. The user receives an "Invalid
  5437. # Request" message.
  5438. # allow: The request is allowed and the URI is not changed. The
  5439. # whitespace characters remain in the URI. Note the
  5440. # whitespace is passed to redirector processes if they
  5441. # are in use.
  5442. # encode: The request is allowed and the whitespace characters are
  5443. # encoded according to RFC1738. This could be considered
  5444. # a violation of the HTTP/1.1
  5445. # RFC because proxies are not allowed to rewrite URI's.
  5446. # chop: The request is allowed and the URI is chopped at the
  5447. # first whitespace. This might also be considered a
  5448. # violation.
  5449. #Default:
  5450. # uri_whitespace strip
  5451.  
  5452. # TAG: chroot
  5453. # Specifies a directory where Squid should do a chroot() while
  5454. # initializing. This also causes Squid to fully drop root
  5455. # privileges after initializing. This means, for example, if you
  5456. # use a HTTP port less than 1024 and try to reconfigure, you may
  5457. # get an error saying that Squid can not open the port.
  5458. #Default:
  5459. # none
  5460.  
  5461. # TAG: balance_on_multiple_ip
  5462. # Modern IP resolvers in squid sort lookup results by preferred access.
  5463. # By default squid will use these IP in order and only rotates to
  5464. # the next listed when the most preffered fails.
  5465. #
  5466. # Some load balancing servers based on round robin DNS have been
  5467. # found not to preserve user session state across requests
  5468. # to different IP addresses.
  5469. #
  5470. # Enabling this directive Squid rotates IP's per request.
  5471. #Default:
  5472. # balance_on_multiple_ip off
  5473.  
  5474. # TAG: pipeline_prefetch
  5475. # To boost the performance of pipelined requests to closer
  5476. # match that of a non-proxied environment Squid can try to fetch
  5477. # up to two requests in parallel from a pipeline.
  5478. #
  5479. # Defaults to off for bandwidth management and access logging
  5480. # reasons.
  5481. #Default:
  5482. # pipeline_prefetch off
  5483.  
  5484. # TAG: high_response_time_warning (msec)
  5485. # If the one-minute median response time exceeds this value,
  5486. # Squid prints a WARNING with debug level 0 to get the
  5487. # administrators attention. The value is in milliseconds.
  5488. #Default:
  5489. # high_response_time_warning 0
  5490.  
  5491. # TAG: high_page_fault_warning
  5492. # If the one-minute average page fault rate exceeds this
  5493. # value, Squid prints a WARNING with debug level 0 to get
  5494. # the administrators attention. The value is in page faults
  5495. # per second.
  5496. #Default:
  5497. # high_page_fault_warning 0
  5498.  
  5499. # TAG: high_memory_warning
  5500. # If the memory usage (as determined by mallinfo) exceeds
  5501. # this amount, Squid prints a WARNING with debug level 0 to get
  5502. # the administrators attention.
  5503. #Default:
  5504. # high_memory_warning 0 KB
  5505.  
  5506. # TAG: sleep_after_fork (microseconds)
  5507. # When this is set to a non-zero value, the main Squid process
  5508. # sleeps the specified number of microseconds after a fork()
  5509. # system call. This sleep may help the situation where your
  5510. # system reports fork() failures due to lack of (virtual)
  5511. # memory. Note, however, if you have a lot of child
  5512. # processes, these sleep delays will add up and your
  5513. # Squid will not service requests for some amount of time
  5514. # until all the child processes have been started.
  5515. # On Windows value less then 1000 (1 milliseconds) are
  5516. # rounded to 1000.
  5517. #Default:
  5518. # sleep_after_fork 0
  5519.  
  5520. # TAG: windows_ipaddrchangemonitor on|off
  5521. # On Windows Squid by default will monitor IP address changes and will
  5522. # reconfigure itself after any detected event. This is very useful for
  5523. # proxies connected to internet with dial-up interfaces.
  5524. # In some cases (a Proxy server acting as VPN gateway is one) it could be
  5525. # desiderable to disable this behaviour setting this to 'off'.
  5526. # Note: after changing this, Squid service must be restarted.
  5527. #Default:
  5528. # windows_ipaddrchangemonitor on
  5529.  
  5530. # TAG: max_filedescriptors
  5531. # The maximum number of filedescriptors supported.
  5532. #
  5533. # The default "0" means Squid inherits the current ulimit setting.
  5534. #
  5535. # Note: Changing this requires a restart of Squid. Also
  5536. # not all comm loops supports large values.
  5537. #Default:
  5538. # max_filedescriptors 0
  5539.  
  5540. acl lan src 192.168.1.1 192.168.2.0/24
  5541. http_access allow localhost
  5542. http_access allow lan
Add Comment
Please, Sign In to add comment