Aug
29
2014
Web Proxy Autodiscovery Protocol with dnsmasq

It seems that you can push a WPAD to desktops via dhcp.

My proxy is based on squid running on 8080.

I ‘ve build a WPAD file similar to the below:

wpad.dat



function FindProxyForURL(url, host)
{
        return "PROXY 192.168.1.2:8080; DIRECT";
}

next thing is to publish it via a web server.
I am using thttpd for static pages/files:

how to test it:


# curl -L 192.168.1.2/wpad.dat

after that a simple entry on Dnsmasq



dhcp-option=252,"http://192.168.1.2/wpad.dat"

and restart your dnsmasq

Dont forget to do a dhcp release on your windows machine

Tag(s): dnsmasq, squid, WPAD