使用非透明代理过滤HTTPSurl

我已经build立了Squid v.3.1 + Squidguard,通过proxy.pac文件在每个浏览器上configuration代理。 现在,如果一个用户访问被HTTP阻塞的站点(例如http://www.facebook.com ),Urlfilter就会工作,用户被redirect到阻止页面,但是如果他去https(例如http:// www.facebook.com)他没有被封锁。 我必须configuration什么来阻止HTTPSurl?

这是我的squid.conf:

acl manager proto cache_object acl localhost src 127.0.0.1/32 ::1 acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl Safe_ports port 70 # gopher acl Safe_ports port 210 # wais acl Safe_ports port 1025-65535 # unregistered ports acl Safe_ports port 280 # http-mgmt acl Safe_ports port 488 # gss-http acl Safe_ports port 591 # filemaker acl Safe_ports port 777 # multiling http acl CONNECT method CONNECT http_access allow manager localhost http_access deny manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access allow localhost http_access allow all http_port 3128 url_rewrite_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf 

先谢谢你。

我得到HTTPS块的工作,通过这样修改proxy.pac:

 function FindProxyForURL(url,host) { if (shExpMatch(url,"http:*") || shExpMatch(url,"https:*")) return "PROXY ipProxy:3128"; else return "DIRECT"; } 

现在,如果用户转到https://www.facebook.com,该网站未加载(并且其他非阻止的https网站通常可以访问),但是他没有被redirect到“阻止的网站”错误页面,只是浏览器给出一个错误:

  • Firefox和IE提供了一个通用的“无法加载页面”的错误页面
  • Chrome提供了错误111(net :: ERR_TUNNEL_CONNECTION_FAILED)错误

有没有办法redirect到来自HTTPS阻止url的错误页面用户?