Re: [squid-users] Resolution query

From: Kevin <kkadow@dont-contact.us>
Date: Mon, 14 Feb 2005 06:23:19 -0600

On Mon, 14 Feb 2005 10:39:06 -0000, Ian Large <ian.large@salvesen.com> wrote:
> All of our clients use IE and currently are configured not to use a proxy
> for local addresses but for routing purposes it would be beneficial to pass
> all http traffic through the proxy. I've been doing some tests and I cannot
> get sites like http://intranet (the default home page) to work. I just get
> the "Unable to determine IP address from host name for intranet" page come
> up.

Another workaround would be to configure the client browsers to use a
Proxy Auto-Config (proxy.pac) URL to determine in each client which URLs
go direct, which go to the local proxy, and which go to the home office.

Specifically, the "isPlainHostName()" option will help with your issue.

Pseudocode follows:

function FindProxyForURL(url, host)
       {
       if(isPlainHostName(host) || dnsDomainIs(host,".salvesen.com")) {
         return("DIRECT");
       }
       // Put the domains that should use the local proxy here:
       if(dnsDomainIs(host, ".netscape.com") ||
          dnsDomainIs(host, ".yahoo.com") ) {
              return("PROXY localsquid:3128; PROXY parentsquid:3128");
        }
       // Go direct for Intranet URLs.
       if(shExpMatch(host, "10.0.*") || shExpMatchhost, "192.168.*") ||
          shExpMatch(host,"127.0.0.1") ) {
         return("DIRECT");
       }
     return("PROXY parentsquid:3128");
     }

The original Netscape documentation for proxy.pac is located at
http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html,
squid specific: http://www.squid-cache.org/Doc/FAQ/FAQ-5.html .

Functionally proxy.pac client code is implemented in _most_ GUI
browsers, and Microsoft offers an additional feature called proxy
auto-discovery (wpad) to avoid manually configuring each workstation.

Kevin Kadow
Received on Mon Feb 14 2005 - 05:23:27 MST

This archive was generated by hypermail pre-2.1.9 : Tue Mar 01 2005 - 12:00:02 MST