docker run -d \
--name=wg-easy \
-e WG_HOST=123.56.183.178 \
-e PASSWORD=ypy269500. \
-e WG_DEFAULT_ADDRESS=10.0.8.3 \
-e WG_DEFAULT_DNS=114.114.114.114 \
-e WG_ALLOWED_IPS=10.0.8.0/24 \
-e WG_PERSISTENT_KEEPALIVE=25 \
-v ~/.wg-easy:/etc/wireguard \
-p 51820:51820/udp \
-p 51821:51821/tcp \
--cap-add=NET_ADMIN \
--cap-add=SYS_MODULE \
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \
--sysctl="net.ipv4.ip_forward=1" \
--restart unless-stopped \
dockerproxy.cn/weejewel/wg-easy:latest
docker pull dockerproxy.cn/weejewel/wg-easy:latest
系统必须版本 ubuntu 20.04