是否可以通过错误页面自定义 squid 来暂时允许黑名单网站?
类似于下面的 Webwasher 功能,它可以检测黑名单网站,显示一个带有绿色按钮的错误页面,用户可以单击该按钮以获得 30 分钟的时间来访问该网站。
谢谢。
translation:
Access to the desired site requires your confirmation.
Your selected internet site "http://www.amazon.com/" belongs to the category (Online shopping at).
If access is business-related or held outside of working hours, please confirm this by clicking on the "confirmation"
If the page longer than 30 minutes is selected, this message appears again.
Thank you for your understanding.
答案1
我只有一个按钮可以向 IT 部门报告错误。如果用户愚蠢到按下 pr0n 按钮,他们就会被抓住。我想你可以使用相同的变量来填充本地 php/perl 函数,该函数会修改 acl,重新加载配置并等待 cron 将其切换回来。
<br />If this is an error, please click the button below.
<br /><br />
<form method="post" action="http://proxy/catch.php">
<input type="hidden" name="url" value="%U" />
<input type="submit" value="Please click here to report this as an error" /></form>
<br />
在 /etc/squid/errors/ERR_ACCESS_DENIED
使用deny_info ERR_ACCESS_DENIED blacklistedacl