0

We've hired a lot of proxies from different providers which are used by our apps. This list gets changed sometimes (once in 2-3 months). To make our life easier we want to configure an aggregating proxy which have to use the hired proxies and balance requests.

The questions are:

  • is this possible to use Squid for this? Any other solutions if no?
  • provide the config sample please
1
  • 1
    It should be possible, just use several cache_peer, combined with cache_peer_access to create some acls to control which peer to use for based on criteria. I have no examples though.
    – Zoredache
    Jun 25, 2012 at 18:06

1 Answer 1

4

Yes, you can use squid for this purpose. Have a look at the cache_peer directive. You can even make squid load-balance between multiple parent proxies:

cache_peer parent1.foo.net parent 3128 0 round-robin no-query
cache_peer parent2.foo.com parent 3128 0 round-robin no-query
...

3128 in this example is the port of the parent proxy to connect to. 0 would be the ICP port but I assume you don't have that kind of close relationship with the proxy parents so it can be set to 0.

See the online documentation, especially the section about cache_peer for more information.

2
  • And what if my proxies require base http authentication? Jun 25, 2012 at 22:19
  • Check the documentation of the cache_peer directive. There is an entire section of authentication options via the "login" option. You can specify a username/password combination, you can choose to passthrough the credentials given by the browser, etc. etc. Something like "cache_peer parent1.foo.net parent 3128 0 round-robin no-query login=username:password" should work fine.
    – mghocke
    Jun 26, 2012 at 15:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .