如何在我的 android 上使用 iptables 进行透明代理?

问题描述 投票:0回答:0

我没有 iptables 世界的基础知识。所以这是我的问题,我想将我的 android 流量(tcp、udp、dns)转发/定向到本地主机代理,该应用程序在 127.0.0.1:8090 上运行(应用程序 uid 10234)。

我试过这些命令:

sysctl -w net.ipv4.ip_forward=1

iptables -t nat -A OUTPUT -p tcp -j DNAT --to-destination 127.0.0.1:8090

iptables -t nat -A OUTPUT -p udp --dport 53 -j DNAT --to-destination 127.0.0.1:8090

但它随后无法正常工作,只是阻止了我的浏览器和电报连接,但无缘无故 youtube 应用程序还可以。你们能启发我如何解决这个问题吗?谢谢。

android proxy localhost iptables transparentproxy
© www.soinside.com 2019 - 2024. All rights reserved.