[squid-users] Problems with wpad in Squid3
Ralf Hildebrandt
Ralf.Hildebrandt at charite.de
Wed Sep 9 22:12:56 UTC 2015
* Marcio Demetrio Bacci <marciobacci at gmail.com>:
> Hi,
>
> I'm having the following problem with my squid3:
>
> When I set the browser: "Auto-Detect proxy settings for this network" does
> not work.
WHICH browser? Not every browser can read the DHCP option 252.
The proxy autoconfig file neeeds to be served when accessing
http://wpad/wpad.dat
ALso, try specifying the proxy autoconfig URL: http://wpad/wpad.dat to
check if it's working at all.
> When we report: "Manual proxy configuration" works.
So it's not a squid problem :)
> Follow my configuration files:
>
> */var/www/wpad.dat*
> function FindProxyForURL(url, host) {
> if (shExpMatch(url,"*.empresa.com/*"))
> {
> return "DIRECT";
> }
> if (isInNet(host, "192.168.0.0","255.255.252.0"))
> {
> return "DIRECT";
> }
> return "PROXY 192.168.0.69:3128";
> }
>
>
> */etc/dhcp/dhcpd.conf*
> ddns-update-style none;
> default-lease-time 600;
> max-lease-time 7200;
> authoritative;
> option wpad-url code 252 = text;
> ddns-domainname "cmb.empresa.com.";
> option domain-name "cmb.empresa.com.";
>
>
> subnet 192.168.0.0 netmask 255.255.252.0 {
> range 192.168.1.1 19.168.3.253;
> option routers 192.168.0.1;
> option domain-name-servers 192.168.0.25,192.168.0.10;
> option broadcast-address 192.168.3.255;
> option wpad-url "http://192.168.0.69/wpad.dat\n";
The URL for WPAD is http://wpad/wpad.dat
> proxy IN A 192.168.0.69
> wpad IN CNAME proxy
OK.
> Is there any tool to test my proxy ?
First you should test http://wpad/wpad.dat to see if the file returned
looks OK and has the correct content-type.
Content-Type: application/x-ns-proxy-autoconfig
> Do I need to set any library in apache2 ?
No.
--
Ralf Hildebrandt Charite Universitätsmedizin Berlin
ralf.hildebrandt at charite.de Campus Benjamin Franklin
http://www.charite.de Hindenburgdamm 30, 12203 Berlin
Geschäftsbereich IT, Abt. Netzwerk fon: +49-30-450.570.155
More information about the squid-users
mailing list