This is an old revision of the document!
# cat corpX.un
wpad A 192.168.X.1 proxy A 192.168.X.1
# cat /WWWDIR/wpad.dat
function FindProxyForURL(url,host) { if (shExpMatch(host, "*.rbc.ru")) return "HTTPS proxy.corpX.un:8080"; else if (shExpMatch(host, "*.eurosport.ru")) return "PROXY proxy.corpX.un:3128"; else return "DIRECT"; }
gate# cat squid.conf
... http_port 3128 transparent ...
gate# squid -k check gate# squid -k reconfigure
[gate:~] # cat /etc/pf.conf
... rdr proto tcp from 192.168.100+X/24 to any port 80 -> 127.0.0.1 port 3128 ...
[gate:~] # /etc/rc.d/pf reload
root@gate:~# iptables -t nat -A PREROUTING -p tcp -s 192.168.100+X.0/24 --dport 80 -j REDIRECT --to-port 3128
gate# tail -f access.log