This thread might come in handy:
Originally Posted by Ignatius
I'd love to report that the above was produced after a careful study of the IPTables documentation, and came from my deep understanding of all things routing and filtering related, but as it happens I seem to remember spending a weekend cutting-and-pasting stuff cobbled together from assorted Google searches until it worked...
Edit: the above is now 3 years old, glennda's idea might well now work if support for filtering HTTPS has been added to Squid.
Thank you both for your input. As far as I know, Squid doesn't work with https. I'll check out the thread from 2007. I figured that I'd have to have some iptables rules to check the destination ports. If they're 25, 110 or 443, send the traffic straight to the real DG (172.19.0.1) but, if the destination port is 80, send the traffic to port 3128 of the same box (I have the Squid and iptables on the same box).
If this logic is correct, I might need some help with the iptables syntax!