本地透明代理与ipfw和鱿鱼

我想使用本地透明代理有一个地方input密码到办公室代理。 基本上,发送到端口80的所有TCP数据包除了发送到特定子网的TCP数据包都应该被转发到本地Squid。

Squid在常规模式下工作正常,但是当我将其切换为透明并在浏览器中禁用代理时,浏览器无法连接到远程主机。 ipfw工作,通过添加deny ip from any to any规则的deny ip from any to any检查。 debugging很难,因为它是Mac OS的日志所在。

乌贼

  $ squid -v Squid Cache: Version 3.2.9 configure options: '--disable-debug' '--disable-dependency-tracking' '--prefix=/usr/local/Cellar/squid/3.2.9' '--localstatedir=/usr/local/var' '--enable-ssl' '--enable-ssl-crtd' '--disable-eui' '--enable-ipfw-transparent' 'CC=cc' 'CXX=c++' 'PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.8' 

规则

  $ sudo ipfw list 00100 fwd 127.0.0.1,3128 tcp from me to any dst-port 80 65535 allow ip from any to any 

来自squid.conf相关部分

 http_access allow localhost manager http_access deny manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access allow localnet http_access allow localhost http_access deny all http_port 3128 transparent cache_peer proxy.office.com parent 8080 0 login=user:password never_direct allow all