From 01cfafa78f211dc3bdc3d094f649f67de35093b7 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Sun, 14 Dec 2025 15:58:19 +0800 Subject: [PATCH] =?UTF-8?q?fix(WireGuardVPN):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84=E5=86=85=E6=A0=B8=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=92=8C=E7=BD=91=E7=BB=9C=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加/lib/modules只读挂载以支持WireGuard内核模块 增加IPv4和IPv6相关网络配置参数确保网络转发正常工作 --- WireGuardVPN/wg-easy/stack.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WireGuardVPN/wg-easy/stack.yml b/WireGuardVPN/wg-easy/stack.yml index 784499f..b77a1f0 100644 --- a/WireGuardVPN/wg-easy/stack.yml +++ b/WireGuardVPN/wg-easy/stack.yml @@ -14,6 +14,7 @@ services: volumes: # [!] 关键:将容器内的WireGuard配置目录映射到主机 - ${Volumes_Path}/data:/etc/wireguard + - /lib/modules:/lib/modules:ro ports: # 将WireGuard的端口映射到主机(必须与你原来的端口一致,通常是51820) - "51820:51820/udp" @@ -24,5 +25,8 @@ services: - SYS_MODULE sysctls: - net.ipv4.ip_forward=1 + - net.ipv4.conf.all.src_valid_mark=1 + - net.ipv6.conf.all.disable_ipv6=0 - net.ipv6.conf.all.forwarding=1 + - net.ipv6.conf.default.forwarding=1 restart: unless-stopped