Some time ago a client of mine was running squid on a system with multiple interfaces and ips. He wanted a setup where squid would use the same ip on which it received the connection to create the connection to the destination server for fetching the content.
Let's say we have 3 ips 1.1.1.1, 1.1.1.2 and squid listens on both interfaces. Now if a client would connect to the proxy server on ip 1.1.1.1 and request google.com, squid will use 1.1.1.1 to make the connection to google. If the client will connect to 1.1.1.2 squid will use 1.1.1.2 to connect to the destination server.
Continue reading squid outgoing ip patch