Squid Web Cache Wiki

Squid Web Cache 文档

🔗 Squid 出站 IP 轮换

这一部分介绍 Squid 的一些奇怪(有时也很有用)的配置。有经验的管理员通常会发现,为了达到这些目的而费尽心思并没有什么实际的好处,但人们似乎偶尔会提出这样的需求……

🔗 目录

在此处写一些介绍。

🔗 真实负载均衡

当 Squid 面临多个出站链接并需要在它们之间进行负载均衡时,这可能会有一些用处。然而,值得注意的是,正确配置这些链接的路由表将带来更大的好处,并且也能将非 Squid 流量包含在负载均衡中。

acl download method GET HEAD
acl upload method POST PUT

# IP used by link for downloads
tcp_outgoing_address 192.0.2.1 download

# IP used by link for uploads
tcp_outgoing_address 192.0.2.2 upload

🔗 奇怪的“隐私”

我猜想,一些请求者可能听说过一段时间前出现的 IPv6 “隐私地址” RFC,并希望通过 Squid 为 IPv4 也实现类似的功能。

注意事项

🔗 示例:根据一天中的时间轮换三个 IP

acl morning time 06:00-11:59
acl afternoon time 12:00-18:00
acl night time 18:00-06:00

# IP used in the morning
tcp_outgoing_address 192.0.2.1 morning

# IP used in the afternoon
tcp_outgoing_address 192.0.2.2 afternoon

# IP used in the night
tcp_outgoing_address 192.0.2.3 night

⚠️ Disclaimer: Any example presented here is provided "as-is" with no support
or guarantee of suitability. If you have any further questions about
these examples please email the squid-users mailing list.

类别: ConfigExample

导航:站点搜索站点页面分类🔼 向上