#WPAD设置 ##WPAD可以通过DHCP,这是建议的解决方案。
- a wpad file. This is the same javascript file as the pac file, renamed (or symlinked) to wpad.dat
- a web server to host the wpad.dat script. The wpad script needs to be located in the document root of the http server
- the web server must be configured for .dat files with a MIME type of "application/x-ns-proxy-autoconfig"
- a dhcp server, configured with option 252 = "http://your.server.here/wpad.dat"
- 一个
wpad
文件。跟 pac 文件是一样的,只是改名为wpad.dat
。 - 存放
wpad.dat
文件的 WEB 服务器,文件位置必须是 www 主机的根目录下比如http://192.168.8.1/wpad.dat
- WEB 服务器必须设置为XXX(看不懂,没接触过)
- dhcp 服务器,配置文件要有
dhcp-option=252,http://192.168.8.1/wpad.dat
openwrt 的 dnsmasq 可能在
/etc/dnsmasq.conf
只需编辑加入dhcp-option=252,http://192.168.8.1/wpad.dat
即可。FF 不支持通过 DHCP 配置的 WPAD 只支持 DNS 配置的 WPAD,所以在
host
文件(建议在 DHCP 服务器上进行修改,在本机修改也可以)中加入192.168.0.1 wpad
使得主机ping wpad
结果为服务器的地址
sample lighttpd wpad setup
## /etc/lighttpd/lighttpd.conf
mimetype.assign = (
".html" => "text/html",
".txt" => "text/plain",
".wpad" => "application/x-ns-proxy-autoconfig",
[...]
)
[...]
sample dnsmasq wpad setup
## dnsmasq is a combined dns and dhcp server
## /etc/dnsmasq.conf
dhcp-option=252,http://your.server.here/wpad.dat
###参考页面