RE: proxy.pac

From: Michael Finken <finken@dont-contact.us>
Date: Tue, 19 Aug 1997 17:27:20 +0200 (MET DST)

On 19-Aug-97 Simon Haighton-Williams wrote:
> Dear list,
> I need some help with writing a proxy.pac that sets the correct
> proxy based on the DNS name of the client. For example a client dials
> into modem 20 in location foo - they get the DNS name
> rack20-foo.somecompany.co.uk I want them to use the cache
> webcache-foo.somecompany.co.uk.
> Regards,
> Simon

It could work like this:

function FindProxyURL(url,host)
{
    if (shExpMatch(host,"rack20-*.somecompany.co.uk") {
        return "PROXY webcache-whatever.somecompany.co.uk";
    }

    .... other patterns ....

    return "DIRECT";
}

The proxy autoconfiguration file is normal JavaScript code. You can check
the Netscape Website for help about JavaScript.

Michael

--
Michael Finken                                NENTEC Netzwerktechnologie GmbH
Tel.:  +49 721 9495-0                         76227 Karlsruhe/Germany
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Programming is like sex -- one mistake and you have to support it for the
                           rest of your life.
Received on Tue Aug 19 1997 - 08:30:14 MDT

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