v2fly / docker

docker build repo for v2fly
https://hub.docker.com/r/v2fly/v2fly-core
MIT License
753 stars 215 forks source link

I hope Docker provides transparent proxy to support iptables or nftables by default #48

Open xzxiaoshan opened 1 year ago

xzxiaoshan commented 1 year ago

I hope Docker provides transparent proxy to support iptables or nftables by default

lhbdhr commented 1 year ago

透明代理不是应该本地来做吗? 这个项目主要是给服务器用的吧? 再说所有人网络环境都不同,不可能内置iptables规则, 相比自己写规则,那安装iptables几行命令又有什么麻烦的?

我也不太了解alpine linux,不知道是否内置了iptables

xzxiaoshan commented 1 year ago

透明代理不是应该本地来做吗? 这个项目主要是给服务器用的吧? 再说所有人网络环境都不同,不可能内置iptables规则, 相比自己写规则,那安装iptables几行命令又有什么麻烦的?

我也不太了解alpine linux,不知道是否内置了iptables

对,是的,透明代理不是每个人都需要的需求。但是透明代理需要 iptables 这个环境,目前这个docker 镜像的基础镜像中没有包含 iptables 环境,所以想使用这个镜像就完全没有办法自行添加执行 iptables 规则了。

我的意思是,在 Dockerfile 中默认为该镜像安装 iptables 环境就可以了,iptables 的规则,可以由用户自己通过 sh 代码来执行。

我之前提交过一个 PR,您可以看看,看看改动内容就明白了。

https://github.com/v2fly/docker/pull/49

https://github.com/v2fly/docker/pull/49/files