Advertisement
Guest User

squid.conf

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