Re: Can I set up Squid to use automatic proxying?

From: Kendall Lister <kendall@dont-contact.us>
Date: Mon, 10 Jan 2000 09:09:26 +1100 (EST)

On Sun, 9 Jan 2000, Stan Brown wrote:

> I would like to set up Squid so that all my users can simply be
> pointed to it for all queries (http). Squid should then do something
> like Netscapes "automatic Proxying" That is for external references it
> should call the corporate SOCKS proxy, for intranet queries, is hould
> go direct.

To start with, see below for a solution that might only take five minutes
to implement. However, you can tell Squid itself how to fetch different
requests by setting up ACLs to match them:

acl intranet dstdomain intranet.com.au
always_direct allow intranet.com.au

If you have then defined your SOCKS proxy as a parent for Squid, local
pages will be fetched directly and external pages will go to it. This can
be done based on IPs as well as domains - check the FAQ for details.

> I Know I can do this on a per browser bassis, but I would prefer the
> brosers to just be configured to call Squid for all queries.

You may be able to solve this very easily by auto-configuring your
browsers' proxy settings using a proxy.pac something like:

function FindProxyForURL(url, host) {
        if (isPlainHostName(host) || dnsDomainIs(host, "intranet.com.au"))
{
                return "DIRECT";
        }
        else if (url.substring(0, 5) == "http:" || url.substring(0, 4) == "ftp:" || url.substring(0, 6) == "https:" ) {
                return "PROXY proxy.intranet.com.au:3128; DIRECT";
        }
        else {
                return "DIRECT";
        }
}

> One reasn for this is I plan on implementing something like Junkbuster
> at some point in time, and it seeems like this would make that easier.

Unless I've missed the point completely, either solution will allow the
integration of Junkbuster.

--
 Kendall Lister, Systems Operator for Charon I.S. - kendall@charon.net.au
  Charon Information Services - Friendly, Cheap Melbourne ISP: 9589 7781
Received on Sun Jan 09 2000 - 15:14:21 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:50:17 MST