Installing squid on openwrt router (GL.iNet GL-SFT1200 Opal)

SkyHigh007

Registered Member
Joined
Mar 27, 2024
Messages
66
Reaction score
18
I want to install squid to route all traffic (http & https) from connected wifi devices via a chosen proxy.

I (+ chatGPT as helper) tried many times, but I get stuck in the config.

Does anybody know how to do that?
 
Install squid in transparent mode, with so called "peek and splice" enabled.

Let it listen on port 3128.

Let iptables redirect table nat, chain PREROUTING from wifi clients subnet , to any 80,443 ports - to that local squid's port 3128.

Make sure DNS server is the same, in squid conf and on wifi clients side (to avoid weird tls errors).

Done, you are perfect.

P.s. instead of using squid, you can use any TCP redirector, that supports backend proxies, e.g. v2fly, xray or gost.
 
Install squid in transparent mode, with so called "peek and splice" enabled.

Let it listen on port 3128.

Let iptables redirect table nat, chain PREROUTING from wifi clients subnet , to any 80,443 ports - to that local squid's port 3128.

Make sure DNS server is the same, in squid conf and on wifi clients side (to avoid weird tls errors).

Done, you are perfect.

P.s. instead of using squid, you can use any TCP redirector, that supports backend proxies, e.g. v2fly, xray or gost.

Thanks!

It's more than just TCP redirecting, I also need DNS (=UDP) redirection, I don't want DNS leaks. Can this be done too?

Also I'm not stuck to Squid. Thats just what I tried, and what my router supports. This router is "almost openwrt", its a proprietary version from gl.iNet that does not have access to all packages. The packages redsocks2 & tun2socks & v2fly & xray & gost are not available for my router, but redsocks (v1) & squid & tinyproxy & privoxy is available.

Or is there a way that I just use OpenVPN client on a SOCK5/HTTP proxy instead of a VPN server?

Or I can just buy another router, if there is some router which makes this easy?

What is the easiest way to set this up?
 
Last edited:
Back
Top