[squid-users] Guidance needed. Issues with WPAD and Firefox

Erick Perez - Quadrian Enterprises eperez at quadrianweb.com
Thu Oct 3 08:35:22 UTC 2019


On Thu, Oct 3, 2019, 2:07 AM Erick Perez - Quadrian Enterprises <
eperez at quadrianweb.com> wrote:

> On Thu, Oct 3, 2019 at 12:45 AM Amos Jeffries <squid3 at treenet.co.nz>
> wrote:
> >
> > On 3/10/19 5:55 pm, Erick Perez - Quadrian Enterprises wrote:
> > > On Wed, Oct 2, 2019 at 10:47 PM Erick Perez - Quadrian Enterprises
> wrote:
> > >>
> > >> Hi, maybe somebody here experienced the same issues while working with
> > >> WPAD files.
> > >>
> > >> I have a working Centos 7.6/SQUID v4.8 that works as expected.
> > >> It works as long as I manually configure the proxy in the network
> > >> settings of each workstation (windows) firefox browser 69.0.1 (64bit)
> > >> and the same behavior with IE and Chrome.
> > >>
> > >> if I open http://squid_fqdn/wpad.dat the file gets downloaded and has
> > >> all the info.
> > >> apache logs show me the client is properly connecting and requesting
> the file.
> > >>
> > >> the wpad.dat has two lines
> > >
> >
> > That is one problem. The PAC file is supposed to define a fully formed
> > function like so:
> >
> > function FindProxyForURL(url, host) {
> >   if (isPlainHostName(host)) return "DIRECT";
> >     return "PROXY squid_fqdn:8080";}
> >
> > You also need to ensure the web server is producing the HTTP response
> > with a "Content-Type: application/x-ns-proxy-autoconfig" header or it
> > will fail.
> >
> > see <http://findproxyforurl.com/> for more info about WPAD/PAC.
> >
> > Amos
> > _______________________________________________
> > squid-users mailing list
> > squid-users at lists.squid-cache.org
> > http://lists.squid-cache.org/listinfo/squid-users
>
> So sorry Amos,
> actually the function is implemented properly. I just didnt paste it
> And yes, wireshark shows me HTTP/1.1 200 OK
> (application/x-ns-proxy-autoconfig)
> I followed this document: https://www.giantstride.eu/proxy-autodiscovery/
> I created wpad CNAME in DNS that points to squidfqdn
> I created option 252 in DHCP
> and also unblocked wpad block in DNS according to same document
> https://www.giantstride.eu/proxy-autodiscovery/
>
> --
>
---------------------
> Erick Perez
>

Well, I believe it is because is 3:26am here and I am tired.

The issue was that Wpad.dat file was not being processed properly.

So, I opened another wpad from a working implementation and compared it.

They were the same EXCEPT that my non working file had some "white spaces"
at the end.
 It makes no sense for me (I'm mostly a Windows guy) but I removed the
empty spaces and the file was loaded and interpreted correctly.

I'm not sure if the problem is that Apache was serving the file with some
issues or if the browser was misinterpreting the file.

But it is working now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20191003/01700527/attachment.html>


More information about the squid-users mailing list