Squid 4.1 中重疊 dstdomains 條目的異常行為

Squid 4.1 中重疊 dstdomains 條目的異常行為

文件,如果使用 dstdomain 且清單中存在重疊條目,Squid 應產生警告訊息。例如我的/etc/squid/squid.conf

acl dst_domains dstdomain "/etc/squid/dst_domains.txt"
http_access allow localnet dst_domains

並且/etc/squid/dst_domains.txt包含重疊,如下所示:

.googlecloud.com
.updates.googlecloud.com
test.updates.googlecloud.com

確實會導致警告訊息/var/log/squid/cache.log

2023/09/08 19:31:21 kid1| WARNING: '.updates.googlecloud.com' is a subdomain of '.googlecloud.com'
2023/09/08 19:31:21 kid1| WARNING: You should remove '.updates.googlecloud.com' from the ACL named 'dst_domains'
2023/09/08 19:31:21 kid1| WARNING: 'test.updates.googlecloud.com' is a subdomain of '.googlecloud.com'
2023/09/08 19:31:21 kid1| WARNING: You should remove 'test.updates.googlecloud.com' from the ACL named 'dst_domains'

但這裡有一個類似的重疊:

us-docker.pkg.dev
.pkg.dev

相反,它會觸發錯誤並導致魷魚終止:

2023/09/08 19:47:47 kid1| ERROR: 'us-docker.pkg.dev' is a subdomain of '.pkg.dev'
2023/09/08 19:47:47 kid1| ERROR: You need to remove 'us-docker.pkg.dev' from the ACL named 'dst_domains'
2023/09/08 19:47:47 kid1| storeDirWriteCleanLogs: Starting...
2023/09/08 19:47:47 kid1|   Finished.  Wrote 0 entries.
2023/09/08 19:47:47 kid1|   Took 0.03 seconds (  0.00 entries/sec).
2023/09/08 19:47:47 kid1| FATAL: Bungled /etc/squid/squid.conf line 57: acl dst_domains dstdomain "/etc/squid/dst_domains.txt"
2023/09/08 19:47:47 kid1| Squid Cache (Version 4.13): Terminated abnormally.

誰能解釋這種行為?確實似乎與一般觸發器警告有更具體的重疊,但具體後面是產生觸發器錯誤。

答案1

找到我的回答;所以是的,這是預期的(但不受歡迎的)行為:

相關內容