I have a basic squid configuration that connects to the Internet directly, I need a way to use a parent peer depending on the URL.
So for example:
- I configure it to use a local proxy that links it to local machines for any URL with .local TLD
- If a user requests http://www.google.com/ it goes directly to google.com port 80
- If a user requests http://server1.local/ it goes to a machine on the LAN called server1 using the local proxy.
This is a simplified example that could be solved by DNS, but I'm doing something a little more complicated.
I tried googling for results on this but most of the results are irrelevant. Thanks.
From the squid FAQ.
The cache_peer_domain directive allows you to specify that certain caches siblings or parents for certain domains:
The configuration above indicates that the cache will use pb.cache.nlanr.net and it.cache.nlanr.net for domains uk, de, fr, no, se and it, sd.cache.nlanr.net for domains mx, za, mu and zm, and cache1.nzgate.net.nz for domains au, aq, fj, and nz.
Comments about cache_peer_domain from the example squid configuration file.