使用 iptables 透明代理可以让 linux 所有网络流量转发到透明代理端口上,达到全局代理效果🤣。它是高效且灵活性的全局代理方案,你可以根据地域IP段进行过滤,也可以指定哪些端口不受代理网络影响~👍
使用条件
在使用脚本前,你必须确保系统上已经使用核心代理程序连接节点,并监听为透明端口,目前博主知道的代理程序支持透明代理的有 V2RAY(推荐)、Shadowsocks 等。
v2ray-core 透明代理 inbounds 参数举例:
"inbounds": [{
"tag": "transparent",
"listen": "127.0.0.1",
"port": 1080,
"protocol": "dokodemo-door",
"settings": {
"network": "tcp,udp",
"followRedirect": true
},
"streamSettings": null
}],
一键脚本
iptables_proxy.sh 脚本内容:
bash -c "$(curl -sS https://www.cooluc.com/iptables_proxy.sh)"
适用于所有透明代理
版权声明:本文为原创文章,版权归 Cooluc's Blog 所有,转载请注明出处!
本文链接:https://www.cooluc.com/archives/74.html
友情提示:如果博客出现404或链接失效,请留言或者联系博主修复!
2 条评论
测试评论
回复测试