How do I intentionally make OpenWrt's firewall serve a proxy autoconfig script?

function FindProxyForURL(url, host){if(host=='192.168.49.1') return 'DIRECT';else return "PROXY 192.168.49.1:8282; SOCKS5 192.168.49.1:8181; DIRECT";}

For some reason putting the following config at the end of the firewall config makes OpenWRT serve the above proxy auto-config script with the file type "application/x-ns-proxy-autoconfig".

config redirect
	option target 'DNAT'
	option name 'redirT-A'
	option src 'lan'
	option src_ip '!192.168.49.1'
	option src_dport '80'
	option dest_ip '192.168.49.1'
	option dest_port '8282'

config nat
	option target 'SNAT'
	option name 'redirT-B'
	option dest 'lan'
	option src_dip '192.168.1.1'
	option dest_ip '192.168.49.1'
	option dest_port '8282'

Would it be possible to take advantage of that to specify how I want the auto config script to work without the issue of only getting the auto config script at literally every location possible in luci while never actually giving you luci?

I'm pretty sure the only reason I'm able to disable that behavior is because I left my PuTTY ssh client connected the entire time.

Those rules redirect attempts to access port 80 on 192.168.1.1 (the Luci web server) to an external machine at 192.168.49.1. What happens next depends on what that machine does.

so you don't know then?
because the machine at 192.168.49.1 doesn't serve an auto-config script for its proxy.

Scratch that, it oes serve one.
Odd that it doesn't say anything about it though.

nevermind on this question.
I'd still need to use a proxifier for stuff that doesn't play nicely with proxies.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.