Allow router to use transparent proxy

My ipset and iptables config bellow .

ipset create localnetwork hash:net
ipset add localnetwork 127.0.0.0/8
ipset add localnetwork 192.168.7.0/24
ipset add localnetwork 192.168.8.0/24
ipset add localnetwork 192.168.9.0/24
ipset add localnetwork 224.0.0.0/4
ipset add localnetwork 240.0.0.0/4
iptables -t mangle -N TTPXY
iptables -t mangle -F TTPXY
iptables -t mangle -A TTPXY -m set --match-set localnetwork dst -j RETURN

ip route add local default dev lo table 100
ip rule add fwmark 1 lookup 100

iptables -t mangle -A TTPXY -p tcp  -j TPROXY --on-port 1080 --tproxy-mark 0x01/0x01
iptables -t mangle -A TTPXY -p udp  -j TPROXY --on-port 1080 --tproxy-mark 0x01/0x01
iptables -t mangle -A PREROUTING -p tcp -j TTPXY
iptables -t mangle -A PREROUTING -p udp -j TTPXY

all working fine but the problems i can not use proxy for local/ router

root@XiaomiR3P:~# opkg update
Downloading https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/packages/Packages.gz

Here is a good description, but you'll have to run the proxy service as a different user to avoid loops.

https://docs.mitmproxy.org/stable/howto-transparent/#work-around-to-redirect-traffic-originating-from-the-machine-itself