gpt4 book ai didi

proxy - 鱿鱼 dstdom_regex 不工作

转载 作者:行者123 更新时间:2023-12-04 19:31:32 28 4
gpt4 key购买 nike

我想在 squid 3.2.3 中拒绝所有以 iso 开头的 URL
所以,我放入了 squid.conf:

  acl torrent_sites dstdom_regex -i iso
acl music_sites dstdom_regex -i music

和我的 http 控件,如:
  http_access allow localhost
http_access allow localnetp1
http_access deny torrent_sites localnetp1
http_access deny music_sites
http_access deny ftp_request
http_access deny localnetp1 norm_conn
http_access deny all

但是我可以进入isohunt.com页面,为什么?

最佳答案

我正在使用稍微不同的方法。我正在使用标准的 squid.conf 文件,但更改了 #acl localnet src 192.168.0.0/16到我的网络 IE:“192.168.1.0”。然后在 conf 文件中搜索读取的部分,

#deny_info TCP_RESET ads".  

只是 以上 TCP_RESET 行,添加以下内容。
acl torrent dstdom_regex "/path/torrent_sites.txt"
http_access deny torrent
acl music dstdom_regex "/path/music_sites.txt"
http_access deny music

现在创建 2 个文本文件( /path/torrent_sites.txt/path/music_sites.txt ),其中包含以下格式的 URL。
(^|\.)isohunt\.com$
(^|\.)thepiratebay\.org$
(^|\.)torrentz\.com$

等等
sudo /etc/init.d/squid3 restart

或者你想重新启动它,一切都应该很好!

黑名单可以在这里找到: squid ACL examples & blacklist to download

关于proxy - 鱿鱼 dstdom_regex 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13690011/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com