<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 3, 2019, 2:07 AM Erick Perez - Quadrian Enterprises <<a href="mailto:eperez@quadrianweb.com">eperez@quadrianweb.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Oct 3, 2019 at 12:45 AM Amos Jeffries <<a href="mailto:squid3@treenet.co.nz" target="_blank" rel="noreferrer">squid3@treenet.co.nz</a>> wrote:<br>
><br>
> On 3/10/19 5:55 pm, Erick Perez - Quadrian Enterprises wrote:<br>
> > On Wed, Oct 2, 2019 at 10:47 PM Erick Perez - Quadrian Enterprises wrote:<br>
> >><br>
> >> Hi, maybe somebody here experienced the same issues while working with<br>
> >> WPAD files.<br>
> >><br>
> >> I have a working Centos 7.6/SQUID v4.8 that works as expected.<br>
> >> It works as long as I manually configure the proxy in the network<br>
> >> settings of each workstation (windows) firefox browser 69.0.1 (64bit)<br>
> >> and the same behavior with IE and Chrome.<br>
> >><br>
> >> if I open <a href="http://squid_fqdn/wpad.dat" rel="noreferrer noreferrer" target="_blank">http://squid_fqdn/wpad.dat</a> the file gets downloaded and has<br>
> >> all the info.<br>
> >> apache logs show me the client is properly connecting and requesting the file.<br>
> >><br>
> >> the wpad.dat has two lines<br>
> ><br>
><br>
> That is one problem. The PAC file is supposed to define a fully formed<br>
> function like so:<br>
><br>
> function FindProxyForURL(url, host) {<br>
>   if (isPlainHostName(host)) return "DIRECT";<br>
>     return "PROXY squid_fqdn:8080";}<br>
><br>
> You also need to ensure the web server is producing the HTTP response<br>
> with a "Content-Type: application/x-ns-proxy-autoconfig" header or it<br>
> will fail.<br>
><br>
> see <<a href="http://findproxyforurl.com/" rel="noreferrer noreferrer" target="_blank">http://findproxyforurl.com/</a>> for more info about WPAD/PAC.<br>
><br>
> Amos<br>
> _______________________________________________<br>
> squid-users mailing list<br>
> <a href="mailto:squid-users@lists.squid-cache.org" target="_blank" rel="noreferrer">squid-users@lists.squid-cache.org</a><br>
> <a href="http://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer noreferrer" target="_blank">http://lists.squid-cache.org/listinfo/squid-users</a><br>
<br>
So sorry Amos,<br>
actually the function is implemented properly. I just didnt paste it<br>
And yes, wireshark shows me HTTP/1.1 200 OK (application/x-ns-proxy-autoconfig)<br>
I followed this document: <a href="https://www.giantstride.eu/proxy-autodiscovery/" rel="noreferrer noreferrer" target="_blank">https://www.giantstride.eu/proxy-autodiscovery/</a><br>
I created wpad CNAME in DNS that points to squidfqdn<br>
I created option 252 in DHCP<br>
and also unblocked wpad block in DNS according to same document<br>
<a href="https://www.giantstride.eu/proxy-autodiscovery/" rel="noreferrer noreferrer" target="_blank">https://www.giantstride.eu/proxy-autodiscovery/</a><br>
<br>
-- <br></blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---------------------<br>
Erick Perez<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Well, I believe it is because is 3:26am here and I am tired.</div><div dir="auto"><br></div><div dir="auto">The issue was that Wpad.dat file was not being processed properly.</div><div dir="auto"><br></div><div dir="auto">So, I opened another wpad from a working implementation and compared it. </div><div dir="auto"><br></div><div dir="auto">They were the same EXCEPT that my non working file had some "white spaces" at the end.</div><div dir="auto"> 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.</div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">But it is working now.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>