http_access访问控制列表:
#http_access deny deny_url
http_access deny all
# TAG: http_access
# Allowing or Denying access based on defined access lists
添加访问控制:
在/etc/squid3下创建控制文件guests:
guests里输入允许使用代理的ip。
在squid.conf中配置:
# log_uses_indirect_client on
以下是禁止访问的网站
acl deny_url url_regex -i \.jd\.com 360buy taobao tmall amazon dangdang yihaodian vipshop jumei vancl suning youku tudou iqiyi ku6 \.qq\.com tv\.sohu v\.ifeng v\.163
http_access deny deny_url
#acl deny_url url_regex -i 172\.16 172\.26 172\.24 172\.31 10\.92 10\.128 gitweb opengrok
#http_access deny deny_url
acl guests src "/etc/squid3/guests"
http_access allow guests
http_access deny all
# TAG: http_access
# Allowing or Denying access based on defined access lists
最后:sudo /usr/sbin/squid3 restart 启动即可