clash 实现局域网透明代理
7.5K
使用clash +docker 进行路由转发实现全局透明代理
开启混杂模式
ip link set eth0 promisc on
docker创建网络,注意将网段改为你自己的
docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=eth0 macnet
提前准备好正确的clash config , 必须打开redir在7892, 以及dns在53端口
运行容器
docker run --name clash_tp -d -v /your/path/clash_config:/clash_config --network macnet --ip 192.168.1.100 --privileged zhangyi2018/clash_transparent_proxy
将手机/电脑等客户端 网关设置为容器ip,如192.168.1.100 ,dns也设置成这个
docker buildx build --platform linux/386,linux/amd64,linux/arm/v7,linux/arm64/v8 -t zhangyi2018/clash_transparent_proxy:1.0.7 -t zhangyi2018/clash_transparent_proxy:latest . --push
Content type
Image
Digest
Size
10.3 MB
Last updated
over 6 years ago
docker pull zhangyi2018/clash_transparent_proxy:1.0.7