关于使用 nftables 实现透明代理的几点疑问 #2434
Unanswered
imotosaiko
asked this question in
Q&A
Replies: 2 comments
-
output链不允许tproxy. 下面是我在用的nftables规则,你可以参考一下。
|
Beta Was this translation helpful? Give feedback.
0 replies
-
在output链打上mark,再利用本机路由表让它进入prerouting链,这就解决了“output链不允许tproxy”问题。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
我通过阅读 https://xtls.github.io/document/level-2 的几篇文章大概了解了相关的步骤和原理。但是在应用的时候遇到有几点疑问:
这里说明一下,按照我的需求,我只想要在自己的电脑上代理所有本机程序,而不是把自己的电脑当作路由器代理整个局域网的流量,所以我只写了 output hook 的部分,其中 10808 是我的 Xray-core 中 dokodemo-door 入站的端口。当我执行上面的配置的时候,我得到了下面的报错:
然后我拿着这个去问 ChatGPT 的时候,它跟我说也许 output hook 里不能用 tproxy ,建议我用 redirect ,但是我用了 redirect 后还是同样的报错它又变脸说也许该试试 tproxy 。。。
在尝试的期间,我也试了进阶文档中给出的配置,但是在使用了之后对我的本机程序的流量完全不起作用,Xray的日志中也没有看到有流量进入了 dokodemo-door 入站的迹象
最后补充一下自己的环境:
操作系统是 Gentoo Linux
nftables 版本为 nftables v1.0.7
Beta Was this translation helpful? Give feedback.
All reactions