Re: Automatic Proxy Config scripts

From: Oskar Pearson <[email protected]>
Date: Wed, 7 May 1997 09:42:44 +0200

Penisoara Adrian writes:

> ----------------------------------------------------------
> // Automatic Proxy Configuration File
> // Last update: 19970506
> // Location: http://proxy.warp.starnets.ro/cfg/proxy.pac
>
> function FindProxyForURL(url,host)
> {
> // Proxy server status (e.g. working[0] / down[1])
> proxydown=0;
Only problem here is the lag since netscape will only load this once
(I think) at startup and when someone hits 'reload'

> // Is the proxy server down ?
> if(proxydown)
> return "DIRECT";
good idea though...

> // Is it one of the supported protocols ?
> if( (url.substring(0,5)!="http:") &&
> (url.substring(0,4)!="ftp:") &&
> (url.substring(0,7)!="gopher:") )
> return "DIRECT";
>
> // Is it a plain hostname ?
> if(isPlainHostName(host))
> return "DIRECT";
>
> // Is it the 'localhost' alias ?
> if( shExpMatch(host,"localhost.*") ||
> shExpMatch(host,"127.0.0.1") )
> return "DIRECT";
ooh ooh - nice. We have a problem where some of these so-called "warez" sites
have 127.0.0.1 addresses, and when someone tries to go there they get our
cache web page, and then flame us because we are sensoring the internet.

:)
Received on Wed May 07 1997 - 00:43:51 MDT

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