feat(WireGuardVPN): 添加wg-easy配置文件和部署文档

添加wg-easy的docker-compose配置文件和环境变量配置
补充wg-easy的部署说明文档和WireGuard手动配置文档
This commit is contained in:
2025-12-14 15:25:26 +08:00
parent 3849c32b0f
commit 6e4d87b1e9
4 changed files with 155 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
## RUN:: docker compose -p wg-easy --env-file ./WireGuardVPN/wg-easy/env.cfg -f ./WireGuardVPN/wg-easy/stack.yml up -d
services:
wg-easy:
image: ${IMAGE_TAG}
container_name: wg-easy
environment:
# [!] 重要改成你的服务器的公网IP或域名
- WG_HOST=${WG_HOST}
# [!] 重要设置一个强密码来登录Web UI
- PASSWORD=${WG_PASSWORD}
# 可选修改Web UI的端口容器内是51821映射到主机可自定义
#- WG_PORT=51820
#- WEB_PORT=51821
volumes:
# [!] 关键将容器内的WireGuard配置目录映射到主机
- ${Volumes_Path}/data:/etc/wireguard
ports:
# 将WireGuard的端口映射到主机必须与你原来的端口一致通常是51820
- "51820:51820/udp"
# 将Web UI的端口映射到主机
- "51821:51821/tcp"
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.ip_forward=1
- net.ipv6.conf.all.forwarding=1
restart: unless-stopped