Re: [squid-users] RE:Localhost & Wpad

From: Quoixte <quoixte@dont-contact.us>
Date: Thu, 14 Jun 2001 15:02:23 +0100

Ok, I sorted out my problem using isPlainHostName in my wpad script, which
doesn't affect performance(I don't think).
My configuration is as follows
Two proxy servers and one dns server.
One proxy doubles as a webserver which serves up the wpad.script.
I have an entry in my dns - wpad.mycompany.com which points to this
machine.( I tried to get it working via dhcp but that is another story)
My wpad script (wpad.dat) is as follows
{
// For localhosts
         if (isPlainHostName(host))
      return "DIRECT";
// For Addresses in Location A
 if (isInNet(myIpAddress, "10.50.0.0", "255.255.0.0")) {
                return "PROXY 10.50.1.50:3128; DIRECT";
// For everybody else
         } else {
                return "PROXY 10.40.0.0:3128; DIRECT";
}
}
For more info on wpad scripting
http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html
http://squid-docs.sourceforge.net/latest/html/x1298.htm

hope this helps
Jim.

----- Original Message -----
From: "Chemolli Francesco (USI)" <ChemolliF@GruppoCredit.it>
To: "'Quoixte'" <quoixte@yahoo.com>
Sent: Thursday, June 14, 2001 2:10 PM
Subject: RE: [squid-users] RE:Localhost

> > thanks for your replies, maybe some more details are called for.
> > The users reference localhost in their code which should
> > point to webservers
> > running
> > locally on their machines.
> > I could add address exceptions in their browser but since I
> > am using wpad
> > it kinda defeats the purpose. I could also put a couple of
> > lines into the
> > wpad script
> > which would force the users to connect directly (to 127..0.0.1or
> > localhost)but as far as I know this isn't recommended.
> > Surely squid is smart enough to recognise the fact that when it get a
> > request for localhost it doesn't mean return it's own web pages ie
> > A user types in 127.0.0.1/cgi-bin/cachemgr.cgi it returns the
> > cache manager
> > interface......
>
> There's not much to do about that, except maybe you
> writing a custom redirector to do this.
> BTW: can you explain me how to properly do wpad?
> I'd like to set it up at my site, but I haven't managed how to yet.
>
>
> Thanks
>
> --
> /kinkie


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Received on Thu Jun 14 2001 - 08:02:10 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:00:45 MST