From e5d1a64d7d59de5ef6b273c7ad3a172e7a5e60d4 Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Sat, 13 Dec 2025 16:05:12 +0800 Subject: [PATCH 1/3] Update to Python 3.14-alpine and refactor IP parsing Bump Dockerfile base image from python:3.13.3-alpine to python:3.14-alpine for both build and runtime stages. Refactor IP address parsing in dashboard.py for improved clarity and variable naming. --- docker/Dockerfile | 4 ++-- src/dashboard.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 969743ff..e0b0b3b4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -55,7 +55,7 @@ RUN make && chmod +x wg* # # Use the python-alpine image for building pip dependencies -FROM python:3.13.3-alpine AS pip-builder +FROM python:3.14-alpine AS pip-builder ARG TARGETPLATFORM @@ -91,7 +91,7 @@ RUN . /opt/wgdashboard/src/venv/bin/activate && \ # # Running with the python-alpine image. -FROM python:3.13.3-alpine AS final +FROM python:3.14-alpine AS final LABEL maintainer="dselen@nerthus.nl" # Install only the runtime dependencies diff --git a/src/dashboard.py b/src/dashboard.py index f08c3d3f..ec57ef9d 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -1238,8 +1238,9 @@ def API_ping_getAllPeersIpAddress(): ip = ipaddress.ip_network(x, strict=False) except ValueError as e: app.logger.error(f"Failed to parse IP address of {p.id} - {c.Name}") - if len(list(ip.hosts())) == 1: - parsed.append(str(ip.hosts()[0])) + host = list(ip.hosts()) + if len(host) == 1: + parsed.append(str(host[0])) endpoint = p.endpoint.replace(" ", "").replace("(none)", "") if len(p.name) > 0: cips[f"{p.name} - {p.id}"] = { From 6fe257fa4abe7f16c6993360f8fc69cfe41ead8a Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Sat, 13 Dec 2025 16:29:48 +0800 Subject: [PATCH 2/3] Update entrypoint.sh --- docker/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 62b8c47c..f28c0cbf 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -191,6 +191,7 @@ start_and_monitor() { echo "Starting WGDashboard directly with Gunicorn..." [[ ! -d ${WGDASH}/src/log ]] && mkdir ${WGDASH}/src/log + [[ ! -d ${WGDASH}/src/download ]] && mkdir ${WGDASH}/src/download ${WGDASH}/src/venv/bin/gunicorn --config ${WGDASH}/src/gunicorn.conf.py resolvconf -u From d6a930c04bca5dd8a13049f2d7578bd0a275a31f Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Sat, 13 Dec 2025 17:20:56 +0800 Subject: [PATCH 3/3] Bumped version number --- src/modules/DashboardConfig.py | 2 +- src/static/app/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/DashboardConfig.py b/src/modules/DashboardConfig.py index 730793c5..8a910d5a 100644 --- a/src/modules/DashboardConfig.py +++ b/src/modules/DashboardConfig.py @@ -16,7 +16,7 @@ from .DashboardAPIKey import DashboardAPIKey class DashboardConfig: - DashboardVersion = 'v4.3.0.3' + DashboardVersion = 'v4.3.1' ConfigurationPath = os.getenv('CONFIGURATION_PATH', '.') ConfigurationFilePath = os.path.join(ConfigurationPath, 'wg-dashboard.ini') diff --git a/src/static/app/package.json b/src/static/app/package.json index 5b534233..0c68e6a8 100644 --- a/src/static/app/package.json +++ b/src/static/app/package.json @@ -1,6 +1,6 @@ { "name": "app", - "version": "4.3.0.3", + "version": "4.3.1", "private": true, "type": "module", "module": "es2022",