用户工具

站点工具


linux:squid

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

后一修订版
前一修订版
linux:squid [2018/01/22 11:43] – 创建 memorylinux:squid [2023/12/03 10:24] (当前版本) – 外部编辑 127.0.0.1
行 28: 行 28:
 http_access allow auth_users http_access allow auth_users
 </code> </code>
 +
 +And reload squid:
 +
 +  systemctl reload squid
 +
 +===== Specify domain throught proxy =====
 +
 +Squid 实现代理分流
 +
 +<code>
 +acl proxyrule dstdomain [example1.org] [example2.org]
 +cache_peer [proxy:ip] parent [proxy:port] 0 round-robin proxy-only no-query name=px
 +cache_peer_access px allow proxyrule
 +never_direct allow proxyrule
 +</code>
 +
 +''never_direct allow proxyrule'' 需要打个重点标记,加了后就 **能解决某些请求不经过 cache_peer 的问题** 。
 +
 +===== Reference =====
 +
 +  * [[https://hostpresto.com/community/tutorials/how-to-install-and-configure-squid-proxy-on-centos-7/|How to Install and Configure Squid Proxy on CentOS 7]]
 +  * [[https://wiki.squid-cache.org/SquidFaq/SquidAcl|Access Controls in Squid]]
linux/squid.1516592609.txt.gz · 最后更改: 2023/12/03 10:24 (外部编辑)