I’ve been using Shadowsocks to redirect packets for specific destination IPs to a local transparent proxy. However, after upgrading to OpenWrt 24.10, I discovered that the Shadowsocks packages were removed. Now I need to redirect packets manually via a script. Despite extensive searching and using AI tools, I haven’t found a working solution.
For example, I need to redirect all packets destined for these IP networks: 189.49.59.69/22 147.47.57.67/22
to a transparent proxy on local port 12344.
there is a wiki article https://openwrt.org/docs/guide-user/firewall/fw3_configurations/intercept_dns which describes the concept you can use. the main point, if i understand correctly your requirement, is that you should redirect all traffic sourced from your lan zone to destinations above in 'wan' zone to any destination port to your device's port 12344. you can add the external destination ip address on the advanced tab.
HTTPS, which is most of today's web, does not support transparent proxies on a fundamental/ technical level, this does not work and you will have to configure the proxy explicitly.