Setup WPAD on Asus Merlin

I have flashed my Asus RT-AC68U to Merlin, SSH has been enabled.

This is a tutorial about setting up WPAD on Asus router.

Environment

Router: RT-AC68U
Firmware: Merlin 380.59
Router IP: 192.168.1.1
Local Domain: my.home.local
Router Admin Account: admin
DHCPd: dnsmasq

Prepare

SSH to router, and check files.

Web root is set to /www, there is a wpad.dat but a dead link to /www/ext/proxy.pac, which does not exist on the router.

File can be accessed but with a 404 response.

Create file and retry

Set up

Write a simple PAC file forwarding request to Charles Proxy on my laptop.

Check dnsmasq.conf

empty line by default.

postconf on dnsmasq is supported by the Merlin firmware according to: https://github.com/RMerl/asuswrt-merlin/wiki/Custom-config-files

Now check JFFS2

Edit /jffs/scripts/dnsmasq.postconf

Chmod and restart dnsmasq

Verify

iOS

Go to WiFi settings and change PROXY to AUTO.

# EOF

Setup WPAD on Asus Merlin by @sskaje: https://sskaje.me/2016/07/setup-wpad-asus-merlin/