You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I dipped into your box.iptables config and, well... it's quite something. But unfortunately, like all other TProxy via IPTales examples, your config assumes redirecting all system traffic and is redundant for cases where only one application needs to be proxied, especially some blocked VPN client. The latter is a fairly popular request on the users side, but not on the developers side.
Can I ask you to write an additional config or some tutorial on how to use IPTables to redirect only selected apps to TProxy?
(Actually, I've been struggling to achieve this for a week now, but without proper tutorial from a IPTables expert, all I can do is mess up hardly, only knowing that it's possible.)
The text was updated successfully, but these errors were encountered:
Well, I was wrong: box.iptables contains section 'whitelist', which corresponds to my request. But I still can't adapt it to my minimalistic needs to tunnel only one application. My useless script now looks like this with TProxy running on 127.0.0.1:8200:
#!/system/bin/sh
UID='dumpsys package ch.protonvpn.android | grep userId | cut -d= -f2'
PORT=8200
ip rule add fwmark 1 table 100
ip route add local default dev lo table 100
ip -6 rule add fwmark 1 table 100
ip -6 route add local default dev lo table 100
iptables -t mangle -A PREROUTING -p tcp -i lo -j TPROXY --on-port $PORT --tproxy-mark 1
iptables -t mangle -A PREROUTING -p udp -i lo -j TPROXY --on-port $PORT --tproxy-mark 1
iptables -t mangle -A PREROUTING -p tcp -m owner --uid-owner $UID -j MARK --set-mark 1
iptables -t mangle -A PREROUTING -p udp -m owner --uid-owner $UID -j MARK --set-mark 1
I can see a lot of potentially doubtful points here, particularly the lack of -N NEW_CHAIN and -I PREROUTING -j NEW_CHAIN (it just blocked my network completely), but I don't know how to bring it all to the robust working minimum.
If anyone can help with correcting this mess, that would be great.
(Eventually I wish to write a tutorial on how to use blocked VPN clients through sing-box/v2ray, because I couldn't find any.)
I dipped into your box.iptables config and, well... it's quite something. But unfortunately, like all other TProxy via IPTales examples, your config assumes redirecting all system traffic and is redundant for cases where only one application needs to be proxied, especially some blocked VPN client. The latter is a fairly popular request on the users side, but not on the developers side.
Can I ask you to write an additional config or some tutorial on how to use IPTables to redirect only selected apps to TProxy?
(Actually, I've been struggling to achieve this for a week now, but without proper tutorial from a IPTables expert, all I can do is mess up hardly, only knowing that it's possible.)
The text was updated successfully, but these errors were encountered: