
Feb 28, '03 10:02:00AM • Contributed by: houchin
If you only have a proxy for HTTP (not HTTPS), you can use Authoxy to automatically add your proxy authentication info into any HTTP requests. You set that up as your proxy, and it adds the login info and forwards the request to the real proxy. However, Authoxy doesn't support HTTPS yet, and there are problems with most of the browsers if one of your proxy servers requires authentication and one doesn't.
Enter the Squid proxy server. Squid can be configured to just forward requests for both HTTP and HTTPS, and to add your login info. However, it's not obvious how to configure it to do so.
![]() Panther proven! |
It took a lot of searching to find the right info, but here's the squid.conf you need to get this working. Replace the stuff in angle brackets with your local configuration info:
http_port <the port you want squid to listen on>
cache_peer <your current proxy server> parent <your current proxy port> 0
no-query default proxy-only login=<user>:<pass>
*** THE ABOVE TWO LINES SHOULD BE ONE LINE! ***
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl all src 0.0.0.0/0.0.0.0
http_access allow all
never_direct allow all
icp_access deny all
cache_effective_user squid
cache_effective_group wheel
You can install squid with fink, but if you want to use HTTPS, it has to be specially compiled. I installed it from source, and had to use "--enable-ssl" as a parameter to the configure script. You also need to make a "squid" user. I'll leave it to other hints to tell you how to do this. After you compile it and install it, run % sudo chown -R squid.wheel /usr/local/squidYou then have to run it once with special parameters to create your caches:
% sudo /usr/local/squid/sbin/squid -zThen you can run it (either manually or with a startup item) by just using:
% sudo /usr/local/squid/sbin/squidIn your network preferences, just set your HTTP and HTTPS proxies to localhost, and the ports to the values you entered in squid.conf.
[robg adds: I have not tested this one...]