Re: Automatic Proxy Config scripts

From: Penisoara Adrian <ady@dont-contact.us>
Date: Wed, 7 May 1997 18:22:15 +0300 (EEST)

Hi !

On Wed, 7 May 1997, Oskar Pearson wrote:

> Penisoara Adrian writes:
>
> > ----------------------------------------------------------
[snapped]
> >
> > // 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.
 Hmm, I don't think that this "actually" resolves the problem !
 What it is done here is to verify if the host _string_ contains something
like "localhost." in it or it is "127.0.0.1" ! There aren't done any DNS
lookups !
If I'm not mistaking, your situation is like this:
 -someone tries an URL like 'http://warez.foo.net'
 -the host 'warez.foo.net' is registered in DNS with '127.0.0.1' (tech.
speaking, an 'warez IN A 127.0.0.1' record in the 'foo.net' SOA zone).

Well, if this is your situation, the script will *not* work. The URL would
be treated as any ordinary exterior address, it will be fetched through
the proxy; one workaround it would be to use the isInNet() function who
actually does an DNS lookup:
-------
 if(isInNet(host,"127.0.0.1","255.255.0.0"))
  return "DIRECT".
-------

If I am wrong please do correct me !

>
> :)
>

RGDS,
Ady (@warp.starnets.ro)
Received on Wed May 07 1997 - 08:26:21 MDT

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