How to make a selective proxy with Openwrt router?

Is it possible to make or open proxies with my Openwrt router? Like socks4 OR socks5.

That as a public s€rvice would be an unnecessary liability to you.

Could you explain what you want, if needed in your native language auto-translating to English?

1 Like

In our country, we have specific websites, which can't be accessible from another ISP. In that case, I can do it quite easily if I'm traveling anywhere and need to access those. That's my motive.

OK, thats not "open proxy" accessible to general public.

If it is only for browser and some websites you can use PAC (proxy auto-configuration) file e.g.

function FindProxyForURL(url, host) {
  shExpMatch(url,"http://*.example.com") ||
    shExpMatch(url,"https://*.example.com") {
    return "PROXY 127.0.0.1:9080" ; 
  }
  return "DIRECT";
}

Then configure your browser to use a file hosted on OpenWRT router (placng it in /www) or a local file.

You can use privoxy or squid as a relaying proxy to a better proxy depending size of your router.

Can you elaborate in simple terms?

You put proxy configuration file on the webserver on the router

Yes. The easiest and most lightweight way is probably microsocks. You would install it it on your router, open its port on the firewall, and -- critically important -- set a password so it's not open to anyone who finds it.

However, even with a password this will probably be an invitation for the internet at large to hammer your home router with attempts to get in. The "better" way would be to have your router run a proper VPN server (e.g. WireGuard) and then, when you're on the road, dial into your own home network to access everything as if you were at home.

1 Like

sslh acting as SNI proxy, make your dnsmasq resolve the special DNS names with the IP of the SNI, the rest, as usual.