A lightweight Docker image, designed for easy connection to CloudFlare WARP, exposing
socks5
proxy all together.
Multi-platform: linux/amd64
, linux/arm64
, linux/ppc64le
, linux/s390x
;
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.
docker run --privileged --restart=always -itd \
--name warp_socks \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--sysctl net.ipv4.conf.all.src_valid_mark=1 \
--cap-add NET_ADMIN --cap-add SYS_MODULE \
-p 9091:9091 \
-v /lib/modules:/lib/modules \
monius/docker-warp-socks
The 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.
Test it
# Host
curl --proxy socks5h://127.0.0.1:9091 https://www.cloudflare.com/cdn-cgi/trace
# See`warp=on` means success.
It will also recognize the prepared wgcf-profile.conf
and danted.conf
if they are located in ~/wireguard/
.
docker run --privileged --restart=always -itd \
--name warp_socks \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--sysctl net.ipv4.conf.all.src_valid_mark=1 \
--cap-add NET_ADMIN --cap-add SYS_MODULE \
-p 9091:9091 \
-v /lib/modules:/lib/modules \
-v ~/wireguard/:/opt/wireguard/:ro \
monius/docker-warp-socks
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.