📄 release-notes-1.0.txt
字号:
disk. In addition, the -z option will not cause 'rm -rf [0-9][0-9]' to beexecuted unless the -U option is also given. When swap files are not removed during restart there internal countersfor disk space taken will not match the actual disk space used. If youhave a large cache or plenty of extra disk space, this should not be aproblem. However, if space is an issue, you may want to use the -Uoption at the cost of a slower restart.Changes to debugging==============================================================================Squid has a flexible debugging scheme. You can enable more debuggingfor certain functions and less for others. For example if you neededto figure out why your access controls were behaving strangely, you could enable debugging for section 28 at level 9. Currently, eachsection corresponds to separate source code file: main.c: Section 1 cache_cf.c: Section 3 errorpage.c: Section 4 comm.c: Section 5 disk.c: Section 6 fdstat.c: Section 7 filemap.c: Section 8 ftp.c: Section 9 gopher.c: Section 10 http.c: Section 11 icp.c: Section 12 icp_lib.c: Section 13 ipcache.c: Section 14 neighbors.c: Section 15 objcache.c: Section 16 proto.c: Section 17 stat.c: Section 18 stmem.c: Section 19 store.c: Section 20 tools.c: Section 21 ttl.c: Section 22 url.c: Section 23 wais.c: Section 24 mime.c: Section 25 connect.c: Section 26 send-announce.c: Section 27 acl.c: Section 28Debugging levels are set in the configuration file with the 'debug_options'line. For example: debug_options ALL,1 28,9 22,5New Access Control scheme==============================================================================The old IP-based access controls have been replaced with a much moreflexible scheme. First you must define a set of access control lists. There are N types of lists: 'src' client IP address 'dst' server IP address** 'method' method of the request (eg, GET, POST) 'proto' protocol of the request (eg HTTP, WAIS) 'domain' domain of the URL request (eg .foo.org) 'port' port number of the URL request (eg 80, 21) 'time' time-of-day and day-of-week format: [SMTWHFA] [hh:mm-hh:mm] 'pattern' regular expression matching on the URL-pathAfter the access lists have been defined, you can then combine themin way to allow or deny access. For example, your cache might be configured to accept requests from both inside and outside of your organization. In that case you'dprobably want to allow internal clients to access anything, but limitoutside access to only sites within your organization. It could bedone like this: acl ourclients src 128.138.0.0/255.255.0.0 198.117.213.0/24 acl ourservers domain .whatsamattu.edu http_access deny !ourclients !ourservers http_access allow ourclientsIf you wanted to limit FTP requests to off-peak hours, you could use: acl daytime time MTWHF 08:00-17:00 acl FTP proto FTP http_access deny FTP daytimeAny of the access list types can accept multiple values on the same line, except for 'time'. Multiple values of an 'acl'definition are treated with OR logic. Multiple ACLs ofan 'http_access' are treated with AND logic. That is, all ACLs much match for the 'allow' or 'deny' take effect.The order of the 'http_access' lines are important. When a linematches any following lines are not considered at all.'icp_access' is the same as 'http_access' but it applies to the ICPport. However, it is not yet fully implemented. It is only able to check'src' and 'method' ACLs.**Note, the 'dst' ACL type has been added for version 1.0.beta12. Inthat version it is implemented in a "lazy" manner. If the URL hostnameis not already in the IP cache, the ACL checks will not match it, butthey will start a DNS lookup so that it will likely be present forfuture ACL checks. This means some users may occasionally get oddballresults. For example, a page may fail the first time, but succeed onthe second try, or vice-versa.Changes to cache shutdown==============================================================================Squid attempts to implement a "nice shutdown" upon receipt of a SIGTERMsignal. Rather than simply breaking all current connections, it waitsa configurable number of seconds for active requests to complete. Thedefault 'shutdown_lifetime' value is 30 seconds.As soon as the SIGTERM is received, the incoming HTTP socket is closedso that no further requests will be accepted. Using SIGHUP to reconfigure the cache==============================================================================Sending the squid process a HUP signal will prompt it to re-read itsconfiguration file. Before it can be reconfigured, it must make surethat all active connections are closed. For this purpose squidpretends to do a shutdown as described above; ie, it will wait up to30 seconds for active requests to complete before re-reading theconfiguration file.ftpget server==============================================================================The ftpget program has been modified to act as a server for FTPrequest. You may now notice that an "ftpget -S" process is alwayspresent while the cache is running. The benefit of using an ftpgetserver is that the cache process (which may be very large) no longerneeds to fork itself for FTP requests.Assigning weights to cache neighbors==============================================================================Squid allows you to assign weights to parent caches. The weights are used to calculate the ``first miss parent.'' The weight is specified inthe 'options' field of the 'cache_host' line. For example: cache_host big.foo.org parent 3128 3130 weight=5The weight must be a non-zero integer. It is used as a divisor tocalculate a weighted round-trip-time (RTT). Higher weights will causea parent to have a ``better'' RTT.Weights are only involved when all parent caches return MISS. Squid stillfetches an object from the first parent or neighbor to reply with a HIT,regardless of any weight values.Converting 'cache/log' from cached-1.4.pl3==============================================================================Squid uses a slightly different format for the 'cache/log' file. In particular, the words 'FILE:' and 'URL:' have been removed from eachline. To save your on-disk cache, you will need to convert this logfile before starting Squid. To do that use a simple awk command: mv log log.old awk '{print $2,$4,$5,$6,$7}' < log.old > logNotes on stoplists vs ttl_pattern==============================================================================You can use the stoplists ('http_stop', etc) in the configuration fileto prevent objects from being cached. Using a 'ttl_pattern' with theTTL to zero will also prevent objects from being saved.The 'http_stop' (etc) have a dual purpose: to prevent objects frombeing cached, and to prevent some requests from being queried atneighbor caches. There is now a separate 'hierarchy_stoplist' whichcan be used to prevent the hierarchy queries, but still allow objectsto be cached. For example, if your parent cache does now allow FTPrequests, then your hierarchy_stoplist should contain: hierarchy_stoplist ftp://SIGUSR1 now rotates log files==============================================================================In order to be more consistent with other daemon programs, SIGHUP isused to reconfigure the running process. This means that we needed tochange the signal used to rotate the log files. We now use SIGUSR1 torotate the logs.``no-query'' option for cache_host lines==============================================================================Some cache configurations behind firewalls may require ICP to be usedfor caches behind the firewall, but not to caches on the other side(because the firewall blocks UDP traffic). To achieve this, use theno-query option: cache_host outside.my.org parent 3128 3130 no-query cache_host inside.my.org neighbor 3128 3130
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -