A lightweight Docker image, designed for easy connection to CloudFlare WARP, exposing
socks5proxy all together.
Multi-platform: linux/amd64, linux/arm64, linux/arm, and linux/s390x;
- Automatically install and config CloudFlare WARP Client in Docker
- Enable the access of WARP network from Docker Container's SOCKS5 port
- Extend accessibility and avoid potential restrictions by using proxy services
- Avoid looping verification in the Midjourney Discord Channel
- Prevent being banned by proxying API calls
- Successfully pre-process the AI WaitList
- Develop apps with warp embedded
- Bypass the New Bing wait-list
- ...
The official warp-cli only support amd64 machines, and its guide is prone to causing potential connection loss risks on remote machines. It is recommended to experiment with fresh installations within a docker container, or you have to reboot it via the panel.
With any existed running proxy service, it acts just like a plugin that helps unlock public content such as ChatGPT, Google Scholar, and Netflix. No necessary to have any knowledge of CloudFlare, Warp, WireGuard, and WGCF before using this image.
The docker image is built based on ubuntu:22.04 aka ubuntu:focal. It's designed to be robust enough to avoid reboot and platform issues. Please follow the EXAMPLES 1.1 and 2.1 To Get Start !
# in case, you have no docker-ce installed;
curl -fsSL https://get.docker.com | sudo bash
# to avoid `sudo` calling
sudo usermod -aG docker ${USER}
# or check https://docs.docker.com/engine/security/rootless
# if required a rootless install with `dockerd-rootless-setuptool.sh install`Run the following commands in your terminal:
docker run --privileged --restart=always -itd \
--name warp_socks \
--cap-add NET_ADMIN \
--cap-add SYS_MODULE \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--sysctl net.ipv4.conf.all.src_valid_mark=1 \
-v /lib/modules:/lib/modules \
-p 9091:9091 \
monius/docker-warp-socksThe above command will create a background service that allows the entire container network to join the dual-stack cloudflare network pool without disconnecting from the host.
To use your prepared config:
docker run --privileged --restart=always -itd \
--name warp_socks \
--cap-add NET_ADMIN \
--cap-add SYS_MODULE \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--sysctl net.ipv4.conf.all.src_valid_mark=1 \
-p 127.0.0.1:9091:9091 \
-v /lib/modules:/lib/modules \
-v ~/wireguard/:/opt/wireguard/:ro \
monius/docker-warp-socksIt will also recognize the prepared wgcf-profile.conf and danted.conf if they are located in ~/wireguard/.
Use -v ~/wireguard/:/opt/wireguard/:ro to map the directory.
And, -p 127.0.0.1:9091:9091 will create a localhost(127.0.0.1) access-only 9091 port to secure the connection.
To output the network test log:
# Host
curl --proxy socks5h://127.0.0.1:9091 https://www.cloudflare.com/cdn-cgi/trace
# See`warp=on` means success. docker-compose.yml could replace some args in a file to run a container.
If you don't have Docker-Compose installed, following this:
sudo curl -fsSL <https://github.com/docker/compose/releases/download/v2.17.2/docker-compose->`uname -s`-`uname -m` > /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose#start
curl -fsSL https://bit.ly/docker-warp-socks-compose | docker-compose -f - up -d --wait && curl --proxy socks5h://127.0.0.1:9091 https://www.cloudflare.com/cdn-cgi/trace
#stop
curl -fsSL https://bit.ly/docker-warp-socks-compose | docker-compose -f - down Click the CLOSE button, Replace the $IP with the given one on the top side, then run:
curl --proxy socks5h://$IP:9091 "https://www.cloudflare.com/cdn-cgi/trace"
To use Docker Stack, first perform the Swarm Initialized by:
# create
docker swarm init
# leave
docker swarm leave --force# create
curl -fsSL https://bit.ly/docker-warp-socks-compose | docker stack deploy -c - TEST
# remove
docker stack rm TESTdocker infodocker node lsdocker network lsdocker stack ps TESTdocker stack services TESTdocker service lsdocker service logs TEST_warp-socksdocker service inspect TEST_warp-socks
# in swarm mode, the ip addr is random
TID=`docker ps -aqf "name=^TEST_warp-socks"`
IF=`docker exec $TID sh -c "ip route show default" | awk '{print $5}'`
TIP=`docker exec $TID sh -c "ifconfig $IF" | awk '/inet /{print $2}' | cut -d' ' -f2`
curl --proxy socks5h://$TIP:9091 "https://www.cloudflare.com/cdn-cgi/trace"For those who has amd64 remote machine and don't need to use docker to secure network connection, I suggest to use the official warp-cli as following:
# install
curl "https://pkg.cloudflareclient.com/pubkey.gpg" | sudo gpg --yes --dearmor --output "/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg"
echo "deb [arch=amd64 signed-by="/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg"] "https://pkg.cloudflareclient.com/" focal main" | sudo tee "/etc/apt/sources.list.d/cloudflare-client.list"
apt -y update && apt -y install cloudflare-warp
# run
warp-cli register
warp-cli set-mode proxy
warp-cli set-proxy-port 9091
warp-cli connect
# test
curl --proxy socks5h://127.0.0.1:9091 "https://www.cloudflare.com/cdn-cgi/trace"
# See`warp=on` means success. We are not affiliated, associated, authorized, endorsed by, or in any way officially connected with Cloudflare, or any of its subsidiaries or its affiliates. The official Cloudflare website can be found at https://www.cloudflare.com.
