From af5cfbea8456f7e1f595f25e3215593bbd8f2c20 Mon Sep 17 00:00:00 2001 From: xtcnet Date: Sun, 8 Mar 2026 14:42:57 +0700 Subject: [PATCH] feat: switch default docker compose template to network_mode host --- README.md | 11 ++--------- install.sh | 6 +----- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 6c3558e..09b6aba 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,7 @@ docker run -d \ --cap-add=SYS_MODULE \ --sysctl net.ipv4.ip_forward=1 \ --sysctl net.ipv4.conf.all.src_valid_mark=1 \ - -p 80:80 \ - -p 81:81 \ - -p 443:443 \ - -p 51820-51830:51820-51830/udp \ + --network host \ -v npm-wg-data:/data \ -v npm-wg-letsencrypt:/etc/letsencrypt \ -v npm-wg-wireguard:/etc/wireguard \ @@ -73,11 +70,7 @@ services: sysctls: - net.ipv4.ip_forward=1 - net.ipv4.conf.all.src_valid_mark=1 - ports: - - "80:80" # HTTP - - "81:81" # Admin UI - - "443:443" # HTTPS - - "51820-51830:51820-51830/udp" # WireGuard Multi-Server Range + network_mode: "host" volumes: - data:/data - letsencrypt:/etc/letsencrypt diff --git a/install.sh b/install.sh index aab4435..408f2d8 100644 --- a/install.sh +++ b/install.sh @@ -188,11 +188,7 @@ services: sysctls: - net.ipv4.ip_forward=1 - net.ipv4.conf.all.src_valid_mark=1 - ports: - - "80:80" # HTTP - - "81:81" # Admin UI - - "443:443" # HTTPS - - "51820-51830:51820-51830/udp" # WireGuard Multi-Server Range + network_mode: "host" volumes: - ./data:/data - ./letsencrypt:/etc/letsencrypt