Forcing Proxy but only for a specific device


I want to put only one device through proxy; configured through OpenWRT (running on ERX).
The device does not support proxy.

The proxy type matters less. SOCKS5 or whatever. That I can make available.

The core requirement is enabling proxy for one specific device (based on IP or MAC i guess).

Can anyone give some instructions/directions?

Thank you.

I suppose it depends on the method you use to enable the proxy.
So, what method do you use?

In that case VPN via policy-based routing or source-routing should do as well.


Would like to avoid VPN if possible.

HTTPS/SOCKS5 are preferred.

fwiw, it is a "smart" TV.

This is untested but gives the general idea.....if device supports WPAD;

/etc/dnsmasq.conf ( change the mac - add more for more hosts)

dhcp-option = net:proxyset, option:252,

/www/wpad.dat ( change the ip for proxyhost:3128 )

function FindProxyForURL(url, host)
   if (isInNet(host, "", "")) {
      return "DIRECT";
   } else {
      if (shExpMatch(url, "http:*"))
         return "PROXY" ;
      if (shExpMatch(url, "https:*"))
         return "PROXY" ;
      if (shExpMatch(url, "ftp:*"))
         return "PROXY" ;
      return "DIRECT";

And for brevvity, since you said force you'll also want something in firewall..... blocking that ip on 80:443 etc.

1 Like

Did you tried the tinyproxy?