📄 cf.data.pre
字号:
Specify the command for the external authenticator. Such a program reads a line containing "username password" and replies "OK" or "ERR" in an endless loop. If you use an authenticator, make sure you have 1 acl of type proxy_auth. By default, the authenticator_program is not used. If you want to use the traditional proxy authentication, jump over to the ../auth_modules/NCSA directory and type: % make % make install Then, set this line to something like authenticate_program @DEFAULT_PREFIX@/bin/ncsa_auth @DEFAULT_PREFIX@/etc/passwdauthenticate_program noneDOC_ENDNAME: authenticate_childrenTYPE: intDEFAULT: 5LOC: Config.authenticateChildrenDOC_START The number of authenticator processes to spawn (default 5). If you start too few Squid will have to wait for them to process a backlog of usercode/password verifications, slowing it down. When password verifications are done via a (slow) network you are likely to need lots of authenticator processes.authenticate_children 5DOC_ENDNAME: authenticate_ttlTYPE: intDEFAULT: 3600LOC: Config.authenticateTTLDOC_START The time a checked username/password combination remains cached (default 3600). If a wrong password is given for a cached user, the user gets removed from the username/password cache forcing a revalidation.authenticate_ttl 3600DOC_ENDCOMMENT_START OPTIONS FOR TUNING THE CACHE -----------------------------------------------------------------------------COMMENT_ENDNAME: wais_relay_hostTYPE: stringDEFAULT: noneLOC: Config.Wais.relayHostDOC_NONENAME: wais_relay_portTYPE: ushortDEFAULT: 0LOC: Config.Wais.relayPortDOC_START Relay WAIS request to host (1st arg) at port (2 arg).wais_relay_host localhostwais_relay_port 8000DOC_ENDNAME: request_sizeCOMMENT: (KB)TYPE: b_size_tDEFAULT: 100 KBLOC: Config.maxRequestSizeDOC_START Maximum allowed request size in kilobytes. If people are using POST to upload files, then set this to the largest acceptable filesize plus a few extra kbytes.request_size 100 KBDOC_ENDNAME: refresh_patternTYPE: refreshpatternLOC: Config.RefreshDEFAULT: noneDOC_START usage: refresh_pattern [-i] regex min percent max [options] By default, regular expressions are CASE-SENSITIVE. To make them case-insensitive, use the -i option. min and max are specified in MINUTES. percent is an integer number. options: override-expire override-lastmod reload-into-ims ignore-reload override-expire enforces min age even if the server sent a Expires: header. Doing this VIOLATES the HTTP standard. Enabling this feature could make you liable for problems which it causes. override-lastmod enforces min age even on objects that was modified recently. reload-into-ims changes client no-cache or ``reload'' to If-Modified-Since requests. Doing this VIOLATES the HTTP standard. Enabling this feature could make you liable for problems which it causes. ignore-reload ignores a client no-cache or ``reload'' header. Doing this VIOLATES the HTTP standard. Enabling this feature could make you liable for problems which it causes. Please see the file doc/Release-Notes-1.1.txt for a full description of Squid's refresh algorithm. Basically a cached object is: (the order is changed from 1.1.X) FRESH if expires < now, else STALE STALE if age > max FRESH if lm-factor < percent, else STALE FRESH if age < min else STALE The refresh_pattern lines are checked in the order listed here. The first entry which matches is used. If none of the entries match, then the default will be used.Default:refresh_pattern ^ftp: 1440 20% 10080refresh_pattern ^gopher: 1440 0% 1440refresh_pattern . 0 20% 4320DOC_ENDNAME: reference_ageTYPE: time_tLOC: Config.referenceAgeDEFAULT: 1 yearDOC_START As a part of normal operation, Squid performs Least Recently Used removal of cached objects. The LRU age for removal is computed dynamically, based on the amount of disk space in use. The dynamic value can be seen in the Cache Manager 'info' output. The 'reference_age' parameter defines the maximum LRU age. For example, setting reference_age to '1 week' will cause objects to be removed if they have not been accessed for a week or more. The default value is one month. Specify a number here, followed by units of time. For example: 1 week 3.5 days 4 months 2.2 hoursreference_age 1 monthDOC_ENDNAME: quick_abort_minCOMMENT: (KB)TYPE: kb_size_tDEFAULT: 16 KBLOC: Config.quickAbort.minDOC_NONENAME: quick_abort_maxCOMMENT: (KB)TYPE: kb_size_tDEFAULT: 16 kbLOC: Config.quickAbort.maxDOC_NONENAME: quick_abort_pctCOMMENT: (percent)TYPE: intDEFAULT: 95LOC: Config.quickAbort.pctDOC_START The cache can be configured to continue downloading aborted requests. This may be undesirable on slow (e.g. SLIP) links and/or very busy caches. Impatient users may tie up file descriptors and bandwidth by repeatedly requesting and immediately aborting downloads. When the user aborts a request, Squid will check the quick_abort values to the amount of data transfered until then. If the transfer has less than 'quick_abort_min' KB remaining, it will finish the retrieval. Setting 'quick_abort_min' to -1 will disable the quick_abort feature. If the transfer has more than 'quick_abort_max' KB remaining, it will abort the retrieval. If more than 'quick_abort_pct' of the transfer has completed, it will finish the retrieval.quick_abort_min 16 KBquick_abort_max 16 KBquick_abort_pct 95DOC_ENDNAME: negative_ttlCOMMENT: time-unitsTYPE: time_tLOC: Config.negativeTtlDEFAULT: 5 minutesDOC_START Time-to-Live (TTL) for failed requests. Certain types of failures (such as "connection refused" and "404 Not Found") are negatively-cached for a configurable amount of time. The default is 5 minutes. Note that this is different from negative caching of DNS lookups.negative_ttl 5 minutesDOC_ENDNAME: positive_dns_ttlCOMMENT: time-unitsTYPE: time_tLOC: Config.positiveDnsTtlDEFAULT: 6 hoursDOC_START Time-to-Live (TTL) for positive caching of successful DNS lookups. Default is 6 hours (360 minutes). If you want to minimize the use of Squid's ipcache, set this to 1, not 0.positive_dns_ttl 6 hoursDOC_ENDNAME: negative_dns_ttlCOMMENT: time-unitsTYPE: time_tLOC: Config.negativeDnsTtlDEFAULT: 5 minutesDOC_START Time-to-Live (TTL) for negative caching of failed DNS lookups.negative_dns_ttl 5 minutesDOC_ENDNAME: range_offset_limitCOMMENT: (bytes)TYPE: b_size_tLOC: Config.rangeOffsetLimitDEFAULT: 0 KBDOC_START Sets a upper limit on how far into the the file a Range request may be to cause Squid to prefetch the whole file. If beyond this limit then Squid forwards the Range request as it is and the result is NOT cached. This is to stop a far ahead range request (lets say start at 17MB) from making Squid fetch the whole object up to that point before sending anything to the client. A value of -1 causes Squid to always fetch the object from the beginning so that it may cache the result. (2.0 style) A value of 0 causes Squid to never fetch more than the client client requested. (default)range_offset_limit 0 KBDOC_ENDCOMMENT_START TIMEOUTS -----------------------------------------------------------------------------COMMENT_ENDNAME: connect_timeoutCOMMENT: time-unitsTYPE: time_tLOC: Config.Timeout.connectDEFAULT: 2 minutesDOC_START Some systems (notably Linux) can not be relied upon to properly time out connect(2) requests. Therefore the Squid process enforces its own timeout on server connections. This parameter specifies how long to wait for the connect to complete. The default is two minutes (120 seconds).connect_timeout 120 secondsDOC_ENDNAME: siteselect_timeoutCOMMENT: time-unitsTYPE: time_tLOC: Config.Timeout.siteSelectDEFAULT: 4 secondsDOC_START For URN to multiple URL's URL selectionsiteselect_timeout 4 secondsDOC_ENDNAME: read_timeoutCOMMENT: time-unitsTYPE: time_tLOC: Config.Timeout.readDEFAULT: 15 minutesDOC_START The read_timeout is applied on server-side connections. After each successful read(), the timeout will be extended by this amount. If no data is read again after this amount of time, the request is aborted and logged with ERR_READ_TIMEOUT. The default is 15 minutes.read_timeout 15 minutesDOC_ENDNAME: request_timeoutTYPE: time_tLOC: Config.Timeout.requestDEFAULT: 30 secondsDOC_START How long to wait for an HTTP request after connection establishment. For persistent connections, wait this long after the previous request completes.request_timeout 30 secondsDOC_ENDNAME: client_lifetimeCOMMENT: time-unitsTYPE: time_tLOC: Config.Timeout.lifetimeDEFAULT: 1 dayDOC_START The maximum amount of time that a client (browser) is allowed to remain connected to the cache process. This protects the Cache from having alot of sockets (and hence file descriptors) tied up in a CLOSE_WAIT state from remote clients that go away without properly shutting down (either because of a network failure or because of a poor client implementation). The default is one day, 1440 minutes. NOTE: The default value is intended to be much larger than any client would ever need to be connected to your cache. You should probably change client_lifetime only as a last resort. If you seem to have many client connections tying up filedescriptors, we recommend first tuning the read_timeout, request_timeout, pconn_timeout and quick_abort values.client_lifetime 1 dayDOC_ENDNAME: half_closed_clientsTYPE: onoffLOC: Config.onoff.half_closed_clientsDEFAULT: onDOC_START Some clients may shutdown the sending side of their TCP connections, while leaving their receiving sides open. Sometimes, Squid can not tell the difference between a half-closed and a fully-closed TCP connection. By default, half-closed client connections are kept open until a read(2) or write(2) on the socket returns an error. Change this option to 'off' and Squid will immediately close client connections when read(2) returns "no more data to read."half_closed_clients onDOC_ENDNAME: pconn_timeoutTYPE: time_tLOC: Config.Timeout.pconnDEFAULT: 120 secondsDOC_START Timeout for idle persistent connections to servers and other proxies.pconn_timeout 120 secondsDOC_ENDNAME: ident_timeoutTYPE: time_tIFDEF: USE_IDENTLOC: Config.Timeout.identDEFAULT: 10 secondsDOC_START Maximum time to wait for IDENT requests. If this is too high, and you enabled 'ident_lookup', then you might be susceptible to denial-of-service by having many ident requests going at once. This option may be disabled by using --disable-ident with the configure script.ident_timeout 10 secondsDOC_ENDNAME: shutdown_lifetimeCOMMENT: time-unitsTYPE: time_tLOC: Config.shutdownLifetimeDEFAULT: 30 secondsDOC_START When SIGTERM or SIGHUP is received, the cache is put into "shutdown pending" mode until all active sockets are closed. This value is the lifetime to set for all open descriptors during shutdown mode. Any active clients after this many seconds will receive a 'timeout' message.shutdown_lifetime 30 secondsDOC_ENDCOMMENT_START ACCESS CONTROLS -----------------------------------------------------------------------------COMMENT_ENDNAME: aclTYPE: aclLOC: Config.aclListDEFAULT: noneDOC_START Defining an Access List acl aclname acltype string1 ... acl aclname acltype "file" ... when using "file", the file should contain one item per line acltype is one of src dst srcdomain dstdomain url_pattern urlpath_pattern time port proto method browser user By default, regular expressions are CASE-SENSITIVE. To make them case-insensitive, use the -i option. acl aclname src ip-address/netmask ... (clients IP address) acl aclname src addr1-addr2/netmask ... (range of addresses) acl aclname dst ip-address/netmask ... (URL host's IP address) acl aclname myip ip-address/netmask ... (local socket IP address) acl aclname srcdomain foo.com ... # reverse lookup, client IP acl aclname dstdomain foo.com ... # Destination server from URL acl aclname srcdom_regex [-i] xxx ... # regex matching client name acl aclname dstdom_regex [-i] xxx ... # regex matching server # For dstdomain and dstdom_regex a reverse lookup is tried if a IP # based URL is used. The name "none" is used if the reverse lookup # fails. acl aclname time [day-abbrevs] [h1:m1-h2:m2] day-abbrevs: S - Sunday M - Monday T - Tuesday W - Wednesday H - Thursday F - Friday A - Saturday h1:m1 must be less than h2:m2 acl aclname url_regex [-i] ^http:// ... # regex matching on whole URL acl aclname urlpath_regex [-i] \.gif$ ... # regex matching on URL path acl aclname port 80 70 21 ... acl aclname port 0-1024 ... # ranges allowed acl aclname proto HTTP FTP ... acl aclname method GET POST ... acl aclname browser [-i] regexp # pattern match on User-Agent header acl aclname ident username ... # string match on ident output.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -