鱿鱼作为透明代理只打开https网站不正常http

我安装并configuration了squid proxy作为透明代理服务器。 当我尝试使用Firefox的代理服务器工作正常,我可以访问端口HTTPS和HTTP。 但是当我transparnet,我可以访问https网站只有像https://google.com不是http://google.com

这是我的squid.conf的样子:

 acl our_networks src 192.168.20.0/24 http_access allow our_networks #Recommended minimum configuration: acl all src all acl manager proto cache_object acl localhost src 127.0.0.1/32 acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 # # Example rule allowing access from your local networks. # Adapt to list your (internal) IP networks from where browsing # should be allowed acl localnet src 10.0.0.0/8 # RFC1918 possible internal network acl localnet src 172.16.0.0/12 # RFC1918 possible internal network acl localnet src 192.168.0.0/16 # RFC1918 possible internal network # acl SSL_ports port 443 # https acl SSL_ports port 563 # snews acl SSL_ports port 873 # rsync 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 Safe_ports port 631 # cups acl Safe_ports port 873 # rsync acl Safe_ports port 901 # SWAT acl purge method PURGE acl CONNECT method CONNECT http_port 3128 transparent icp_port 0 

这里是我的IPtableconfiguration

 $IPTABLES -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.20.21:3128 #$IPTABLES -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128 

我在这里错过了什么? 我运行squid 2.7 stable 9

谢谢,

你错过了SSL的基本理解:)

SSL连接的透明代理是不可能的,因为您的代理将无法提供正确的证书,从而导致所有浏览器显示有关每个https网站的证书警告。

除此之外,你的代理configuration也是相当不安全的(它允许192.168.20.0/24的任何人连接到任何地方的任何端口),你忘了redirect端口443(尽pipe如我所说,它只会导致客户端上的错误) 。