🔗 Squid 4
| Aug 2021 | Squid-4 系列随着 Squid-5 系列的发布而已弃用 |
| Jul 2018 | 发布用于生产环境 |
🔗 版本 4 的基本新特性
- Major UI changes
- RFC 6176 合规性 (移除 SSLv2 支持)
- 安全的 ICAP 服务连接
- 添加 url_lfs_rewrite:一个基于本地文件存在的 URL 重写器
- on_unsupported_protocol 指令,允许非 HTTP 旁路
- 移除 refresh_pattern 的 ignore-auth 和 ignore-must-revalidate 选项
- 移除 cache_peer_domain 指令
- basic_msnt_multi_domain_auth:已被 basic_smb_lm_auth 取代
- 更新 external_acl_type 指令,使其格式参数可以接受 logformat 代码
- 移除 ESI 自定义解析器
- 对部分 TLS 功能的实验性 GnuTLS 支持
- Minor UI changes
- 亚毫秒级事务日志记录
- ext_kerberos_ldap_group_acl -n 选项,用于禁用自动 SASL/GSSAPI
- negotiate_kerberos_auth 输出 group= kv-对,用于 note ACL
- security_file_certgen 助手支持内存模式
- 对 HTTP 消息中的 Expect:100-continue 的自适应支持
- 添加 url_rewrite_timeout 指令
- 更新 localnet ACL 默认定义,以符合 RFC 6890
- 持久连接超时 request_start_timeout 和 pconn_lifetime
- cachemgr 报告中每条规则的 refresh_pattern 匹配统计信息
- 可配置的助手队列大小,具有一致的默认值和更好的溢出处理
- Developer Interest changes
- 需要支持 C++11 的编译器
- 新的助手并发 channel-ID 分配算法
- 简化 MEMPROXY_CLASS_* 宏
- 简化 CBDATA API 并重命名 CBDATA_CLASS
- HTTP 解析器结构重构
- Base64 加密 API 替换
- 在 squid 二进制文件上启用长 (–foo) 命令行参数
- 为单元测试实现了选择性的 debugs() 输出
- 改进的 SMP 支持
该系列旨在利用 C++11 特性来提高性能。https://squid.org.cn/Versions/v4/RELEASENOTES.html#ss5.1 中列出了 Squid-2.7 中一些遗留的功能作为回归。
成为 Squid-4 源代码的软件包可在 https://squid.org.cn/Versions/v4/ 获取
🔗 Security Advisories
See our Advisories list.
🔗 Open Bugs
- Major or higher bugs currently affecting this version.
- 针对任何旧版本的 Bug,如果发现在 4.x 中已修复,则可以关闭
- 从旧版本继承的 Bug 不一定是稳定版本上的阻塞项。
- Bugs new in this version
🔗 Squid-4 默认配置
http_port 3128
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)
acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN)
acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines
acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN)
acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN)
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
http_access allow localnet
http_access allow localhost
http_access deny all
coredump_dir /squid/var/cache/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320