MicroWARP 🚀 请严格遵守您所在国家和地区的法律法规。任何因违法违规使用本项目而引发的法律纠纷或后果,均与本项目及作者无关。 Please strictly comply with the laws and regulations of your country and region. Any legal disputes or consequences arising from illegal use of this project have nothing to do with this project and its authors. English | 中文说明 📊 Performance Comparison Here is a real-world performance test on a 1C1G (1 vCPU, 1GB RAM) VPS, comparing MicroWARP with the…
Please strictly comply with the laws and regulations of your country and region. Any legal disputes or consequences arising from illegal use of this project have nothing to do with this project and its authors.
Here is a real-world performance test on a 1C1G (1 vCPU, 1GB RAM) VPS, comparing MicroWARP with the widely used caomingjun/warp.
以下是在 1C1G 服务器上的真实运行数据截图对比:
Metric (指标)
caomingjun/warp (Official Daemon)
🚀 MicroWARP (Pure C + Kernel approach)
Improvement (提升)
Image Size (Docker 镜像体积)
201 MB
~15–20 MB(含可选 usque)
📉 ~-90%
RAM Usage (日常内存占用)
~150 MB
~800 KiB WG 默认 (MASQUE 为用户态,更高)
📉 -99.4%(WG)
CPU Overhead (高并发 CPU 损耗)
High (Userspace App)
~0.25% (Kernel Space)
⚡ Near Zero
Core Engine (底层核心引擎)
Cloudflare warp-cli (Rust)
Linux wg0 + Pure C microsocks(default) Optional MASQUE via usque
🛠️ Minimalist + Compatible
IP Stack (协议栈)
Mostly IPv4-focused
Dual-stack IPv4 + IPv6
🌐 Native
Tunnel protocol (隧道协议)
WireGuard / MASQUE (daemon)
WireGuard kernel (default) or MASQUE userspace
🔀 Selectable
🔥 Real docker stats output:
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O
2fa58f84c517 warp 0.25% 800KiB / 967.4MiB 0.08% 48.8MB / 39.1MB 238kB / 36.9kB
Yes, you read that right. It processed ~90MB of traffic using only 800 KB of RAM!是的,你没看错。它仅使用了 800 KB 的内存,就处理了约 90 MB 的流量!
🇬🇧 English
A minimalist, high-performance Cloudflare WARP SOCKS5 proxy in Docker.
Designed as a lightweight drop-in replacement for standard WARP proxy images (e.g., caomingjun/warp).
🌟 Why MicroWARP?
Many popular WARP Docker images rely on the official Cloudflare warp-cli daemon. This approach typically results in significant memory usage (often 150MB+) and potential process overhead under high concurrency.
MicroWARP is built differently:
Kernel-Level WireGuard (default): Instead of the userspace client, it leverages the native Linux wg0 interface for near-zero CPU overhead.
Optional MASQUE: Set TUNNEL_PROTOCOL=masque to use usque (CONNECT-IP over HTTP/3). Better when WireGuard UDP is QoS’d/blocked; traffic looks like HTTPS on UDP/TCP 443.
MicroSOCKS Engine: WireGuard path uses pure C microsocks; MASQUE path uses usquel4-socks / socks.
Minimal Memory Footprint (WireGuard): Runs smoothly on < 5MB RAM (often ~800KB). MASQUE is userspace QUIC and needs far more RAM (see below).
Native Dual-Stack: Full IPv4 + IPv6 WARP routing on the WireGuard path (AllowedIPs = 0.0.0.0/0, ::/0), with IPv6 policy routing for inbound reply paths.
Seamless Tailscale Integration: On the WireGuard path, restores asymmetric routing for IPv4 (100.64.0.0/10) and IPv6 (fd7a:115c:a1e0::/48).
Multi-Arch: Native support for amd64 and arm64 (plus armv7 registration path).
🎯 Use Cases
API Routing: Route crawlers or AI API gateways (like Grok, ChatGPT) through MicroWARP to leverage high-trust Cloudflare IPs.
Outbound Privacy: Obfuscate your server’s real IP by using WARP as your default egress network to prevent direct traceback.
Sidecar Proxy: Perfectly designed as an ultra-lightweight Docker Sidecar network gateway.
IPv6 Egress: Reach IPv6-only destinations via Cloudflare WARP when the host has limited or no native IPv6 peering.
📦 Quick Start
Map port 1080 and grant NET_ADMIN privileges. Create a docker-compose.yml:
Fail-safe defaults: the sample mapping publishes only on host loopback (127.0.0.1:1080:1080), so the proxy is never exposed publicly. Starting without SOCKS_USER/SOCKS_PASS is refused unless you explicitly set ALLOW_NO_AUTH=1.
⚙️ Environment Variables
Variable
Default
Description
TUNNEL_PROTOCOL
wireguard
wireguard (kernel, default) or masque (usque). Aliases: wg / usque.
BIND_ADDR
0.0.0.0
SOCKS5 listen address. Use :: for IPv6 / dual-stack listen.
BIND_PORT
1080
SOCKS5 listen port.
SOCKS_USER / SOCKS_PASS
(empty)
Optional SOCKS5 authentication. Both must be set together; starting with neither set is refused.
WG blocked/QoSed, captive portals, “looks like HTTPS”
Capabilities
Full IP tunnel + dual-stack policy routing
l4-socks = TCP only; socks = TCP+UDP via gVisor
Identity persistence: both wg0.conf and masque-config.json live under /etc/wireguard. Always mount the volume — re-registering every restart will hit Cloudflare rate limits.
🌐 IPv6 notes
WARP tunnel dual-stack is enabled by default (ENABLE_IPV6=1). The entrypoint keeps the IPv6 address from wgcf and sets AllowedIPs = 0.0.0.0/0, ::/0.
Docker host IPv6 must be available for end-to-end IPv6 SOCKS clients. Enable Docker daemon IPv6 if you need published IPv6 ports.
SOCKS listen: default BIND_ADDR=0.0.0.0 is IPv4-only on the listen socket. Set BIND_ADDR=:: if clients should connect over IPv6.
Disable dual-stack anytime with ENABLE_IPV6=0 (useful on hosts where IPv6 breaks wg-quick).
🚀 Convert to HTTP proxy
The image stays SOCKS-only to remain tiny. Use gost (or similar) on the host:
评论