Neilpang / wgcf-docker

CloudFlare warp in docker
141 stars 37 forks source link

I want the host to use the warp network of wgcf-docker #5

Open deixl opened 1 year ago

deixl commented 1 year ago

Hello, I am a novice. I want the host to use the warp network of wgcf-docker, such as curl -x socks5://127.0.0.1:1080 https://www.cloudflare.com/cdn-cgi/trace, How should I do it, please give me an example, thanks

After I successfully run the following command, I don't know how to allow the host to use socks5 to access the network of wgcf-docker docker run --rm -it \ --name wgcf \ --sysctl net.ipv6.conf.all.disable_ipv6=0 \ --privileged --cap-add net_admin \ -v /lib/modules:/lib/modules\ -v $(pwd)/wgcf:/wgcf\ neilpang/wgcf-docker I tried adding a -p 1080:1080, but I still can't use the wgcf-docker network docker run --rm -it \ --name wgcf \ --sysctl net.ipv6.conf.all.disable_ipv6=0 \ --privileged --cap-add net_admin \ -v /lib/modules:/lib/modules\ -v $(pwd)/wgcf:/wgcf\ -p 1080:1080 \ neilpang/wgcf-docker

lautumn1990 commented 1 year ago

try this wgcf-socks-docker project and run with docker compose

# use root
git clone https://github.com/lautumn1990/wgcf-socks-docker
cd wgcf-socks-docker

docker-compose up -d

# check and test
curl --proxy socks5h://127.0.0.1:1080 https://www.cloudflare.com/cdn-cgi/trace