warp-svc
🚀 Nano RAM (800KB Runtime) — Cloudflare WARP SOCKS5 Server in Docker 🐳 Fork MicroWarp
2.7K
Run Cloudflare WARP client as a SOCKS5 proxy server in Docker.
This Docker image packages the official Cloudflare WARP client for Linux and provides a SOCKS5 proxy server that can be used in:
✨ Automatic Registration - Register new Cloudflare WARP accounts automatically
🛡️ Families Mode - Configurable DNS filtering (off/malware/full)
⚡ WARP+ Support - Subscribe to Cloudflare WARP+ for unlimited data
🐳 Multi-arch Support - Works on amd64 and arm64 platforms
The container requires specific kernel modules and capabilities:
Required Docker flags:
--device /dev/net/tun - Access to TUN device for virtual network interface--cap-add NET_ADMIN - Modify network configuration (interfaces, routing)--cap-add MKNOD - Create device nodes--cap-add AUDIT_WRITE - Write to audit logRun these commands on your host system before starting the container:
# Enable IP forwarding
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf && sysctl -p
# Allow masquerading in firewall (required for RHEL 9)
firewall-cmd --zone=public --add-masquerade --permanent
# Load required kernel modules
modprobe nf_conntrack
modprobe tun
# Set modules to auto-load on boot
echo -e "nf_conntrack\ntun" > /etc/modules-load.d/custom-modules.conf
# Verify setup
lsmod | grep -E "nf_conntrack|tun"
ls -l /dev/net/tun
Create a docker-compose.yml file:
services:
cloudflare-warp:
image: zhengxiongzhao/warp-svc:latest
container_name: cloudflare-warp
restart: always
ports:
- "1080:1080"
environment:
TZ: Asia/Shanghai
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
logging:
driver: "json-file"
options:
max-size: "3m"
max-file: "3"
volumes:
- warp-data:/etc/wireguard
volumes:
warp-data:
Start the container:
docker-compose up -d
Verify that WARP is active and working:
curl -x socks5h://127.0.0.1:1080 -sL https://cloudflare.com/cdn-cgi/trace | grep warp
Expected output:
warp=on
or for WARP+ users:
warp=plus
environment:
- BIND_ADDR=0.0.0.0 # Bind address
- BIND_PORT=1080 # Custom SOCKS5 port
- SOCKS_USER=admin # Enable authentication
- SOCKS_PASS=123456 # Auth password
# ⚠️ Port Hopping (Mitigating Datacenter QoS):
# If your VPS is in a datacenter (e.g., DMIT, AWS) where UDP 2408 is throttled or blocked,
# use port 4500 (standard IPsec NAT-T) to bypass restrictive firewall rules.
- ENDPOINT_IP=162.159.192.1:4500
Verify that WARP is active and working:
curl -x socks5h://127.0.0.1:1080 -sL https://cloudflare.com/cdn-cgi/trace | grep warp
Expected output:
warp=on
or for WARP+ users:
warp=plus
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Content type
Image
Digest
sha256:405325828…
Size
341.6 MB
Last updated
about 4 hours ago
docker pull zhengxiongzhao/warp-svc