Re: Proxy.Pac

From: Bill Wichers <billw@dont-contact.us>
Date: Mon, 15 Sep 1997 15:47:28 -0400 (EDT)

I use the following:

function FindProxyForURL(url, host) {
  // Only proxy for http, ftp, and gopher
  if ((url.substring(0, 5) != "http:") &&
      (url.substring(0, 4) != "ftp:") &&
      (url.substring(0, 7) != "gopher:")) {
    return "DIRECT";
  }

  // Local to the Waveform NAP
  if (shExpMatch(host, "199.179.7.*") ||
      shExpMatch(host, "*waveform.net")) {
    return "DIRECT";
  }

  // Remote
  return "PROXY proxy.waveform.net:3128; PROXY unix0.waveform.net:3128;
DIRECT";
}

Netscape has a page that explains the use of the proxy.pac and it's
javascript functions, but I don't know the URL offhand.

        -Bill

On Sat, 13 Sep 1997, Daryl Lim wrote:

> Could someone help me , I want to setup a Auto-Proxy file . For Netscape
> Browsers
>
> I have two Squid cache's one as a primary & one as a backup . Another a last
> resort before DIRECT access. Called Proxy1 & Proxy2 & Proxy 3
>
> All proxy's will cache http,ftp & gopher data
> I would like the file to return the use Proxy1 for , but
> if the first proxy is down I would like it to return to use Proxy2 . If Proxy 2
> is down then return Proxy 3 . If all else fails do a DIRECT access .
>
> Could someone show me a quick example or a site where this is documented & easy
> to understand . Or would a CGI be required to check if the proxy's 1 then 2
> then 3 are up . Then return a DIRECT .
>
> Thanks In Advance,
> Daryl,
>
> | email : dlim@ihug.co.nz (Use This First)
> -=>Daryl Lim<=- -| email : daryl@genesis.pakuranga.school.nz
> | WWW : http://homepages.ihug.co.nz/~dlim/
>
>
Received on Mon Sep 15 1997 - 12:53:47 MDT

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