Can Squid help me work around broken web clients?
July 12, 2010 2:00 AM Subscribe
Can I configure Squid to pass preset authentication credentials to an upstream proxy for a given set of websites without asking the client for them?
I'm a part-time school netadmin, and a Squid n00b.
The school can only get web access via an upstream Squid proxy I don't control, though I can create user accounts whose credentials it will accept.
There are various apps I'd like to deploy that require web access to their mother ships. All have some method for specifying a proxy server, but several (notably from Microsoft - grrr!) don't have any provision for presetting or prompting for proxy authorization credentials.
If I deploy a local Squid on my side of the firewall, I believe there's a way to tell it that the upstream Squid is its parent. What I'd also like to do is configure my local Squid with appropriate credentials to pass upstream whenever a client makes a non-authenticated request for one of several specified sites.
In other words: I'd like the local Squid to translate non-authenticated requests from clients to authenticated requests to its parent, but only on certain selected web sites.
Can this be done? If so, how?
posted by flabdablet to computers & internet (7 answers total)
what I'd try is making a bunch of aliases in your proxy's /etc/hosts file that all point to your parent cache in addition to its real dns name... say dumbapp1-cache.example.com and dumbapp2-cache.example.com in addition to cache.example.com... then configure dumbapp1-cache.example.com and dumbapp2-cache.example.com as additional cache_peer entries with the login=user:password option, even though they're all the same actual parent, and use cache_peer_domain to restrict which of the virtual parents (with what hardwired proxy-auth credentials) is used for which client requests...
actually, that allows anyone to make requests to these motherships, so you might be better using cache_peer_access to restrict the free credentials based on both source and destination...
hmmm... not sure I *like* this suggestion, but I reckon it'll work...
posted by russm at 6:01 AM on July 12, 2010