I've been strugging with this and I hope someone can shed some light on this.
I want to auto-configure a proxy on my network. I am running
# cat /etc/openwrt_release
DISTRIB_ID="OpenWrt"
DISTRIB_RELEASE="12.09"
DISTRIB_REVISION="r36088"
DISTRIB_CODENAME="attitude_adjustment"
DISTRIB_TARGET="ar71xx/generic"
DISTRIB_DESCRIPTION="OpenWrt Attitude Adjustment 12.09"
I have squid running and configured; I can connect to it manually. I want browsers to auto-configure to use the proxy.
To that end, I've read the docs and set up a wpad.dat at http://wpad.seiner.lan/wpad.dat
That file contains:
function FindProxyForURL(url, host)
{
if (isInNet(host, "192.168.0.0", "255.255.0.0")) {
return "DIRECT";
} else {
if (shExpMatch(url, "http:*"))
return "PROXY 192.168.128.21:3128" ;
if (shExpMatch(url, "https:*"))
return "PROXY 192.168.128.21:3128" ;
if (shExpMatch(url, "ftp:*"))
return "PROXY 192.168.128.21:3128" ;
return "DIRECT";
}
}
and my /etc/config/dhcp:
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option expandhosts '1'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
option domain 'seiner.lan'
list server '208.67.222.222'
list server '208.67.220.220'
list dhcp-option '252,http://wpad.seiner.lan/wpad.dat'
....
config domain
option ip '192.168.128.21'
option name 'wpad'
so all this should work according to the documentation I've read. But I am running into 2 issues, both Luci related:
1. Luci crashes when I click on the DHCP and DNS tab under Network
/usr/lib/lua/luci/dispatcher.lua:448: Failed to execute cbi dispatcher target for entry '/admin/network/dhcp'.
The called action terminated with an exception:
/usr/lib/lua/luci/cbi.lua:334: Unable to read UCI data: dhcp
stack traceback:
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:448: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:195: in function </usr/lib/lua/luci/dispatcher.lua:194>
and
2. there is no corresponding
dhcp_option=252,http://wpad.seiner.lan/wpad.dat
in /tmp/etc/ndnsmasq.conf