Compare commits

...

14 Commits

Author SHA1 Message Date
Donald Zou
82e10659b6 Update Wakatime badge link in README.md
Some checks are pending
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
Docker Build and Push / docker_build (push) Waiting to run
Docker Build and Push / docker_scan (push) Blocked by required conditions
2025-12-14 00:28:24 +08:00
Donald Zou
b6f25ac817 Include docker directory in workflow paths 2025-12-14 00:25:37 +08:00
Donald Zou
48481ab992 Implement path filter for Docker workflow triggers
Added a path filter to restrict Docker workflow triggers to changes in the 'src' directory.
2025-12-14 00:24:21 +08:00
Donald Zou
d56a3cb5d6 Merge pull request #1031 from WGDashboard/v4.3.2-dev
v4.3.1
2025-12-13 23:26:41 +08:00
Donald Zou
d6a930c04b Bumped version number 2025-12-13 17:20:56 +08:00
Donald Zou
6fe257fa4a Update entrypoint.sh 2025-12-13 16:29:48 +08:00
Donald Zou
e5d1a64d7d 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.
2025-12-13 16:05:12 +08:00
Donald Zou
da4cec60e5 Update Dockerfile
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Docker Build and Push / docker_build (push) Has been cancelled
Docker Build and Push / docker_scan (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-12-12 23:41:25 +08:00
DaanSelen
a4d471df4f chore: downgrade python due to compatibility 2025-12-12 16:32:48 +01:00
DaanSelen
f00940b73c chore: cleanup
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Docker Build and Push / docker_build (push) Has been cancelled
Docker Build and Push / docker_scan (push) Has been cancelled
2025-12-12 15:27:04 +01:00
DaanSelen
cb9cb4a0b6 chore: fix docker (hopefully) 2025-12-12 15:17:25 +01:00
DaanSelen
b695ccc5f9 chore: add openresolv back into the dependencies to blanked cover our deps
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Docker Build and Push / docker_build (push) Has been cancelled
Docker Build and Push / docker_scan (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-12-11 23:34:46 +01:00
DaanSelen
16cd4da5fc chore: add openrc to avoid no init systems (#1027)
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Docker Build and Push / docker_build (push) Has been cancelled
Docker Build and Push / docker_scan (push) Has been cancelled
2025-12-11 21:56:44 +01:00
Donald Zou
7be830a34e Merge pull request #1024 from WGDashboard/v4.3.0.3-dev
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Docker Build and Push / docker_build (push) Has been cancelled
Docker Build and Push / docker_scan (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Bumped version, corrected some vue package after update
2025-12-11 07:03:58 +08:00
8 changed files with 33 additions and 24 deletions

View File

@@ -7,6 +7,9 @@ on:
- 'main'
tags:
- '*'
paths:
- 'src/**'
- 'docker/**'
release:
types: [ published ]

View File

@@ -20,7 +20,7 @@
<p align="center">
<a href="https://github.com/WGDashboard/WGDashboard/releases/latest"><img src="https://img.shields.io/github/v/release/donaldzou/wireguard-dashboard?style=for-the-badge"></a>
<a href="https://wakatime.com/badge/github/donaldzou/WGDashboard"><img src="https://wakatime.com/badge/github/donaldzou/WGDashboard.svg?style=for-the-badge" alt="wakatime"></a>
<a href="https://wakatime.com/badge/github/donaldzou/WGDashboard"><img src="https://wakatime.com/badge/user/45f53c7c-9da9-4cb0-85d6-17bd38cc748b/project/5334ae20-e9a6-4c55-9fea-52d4eb9dfba6.svg?style=for-the-badge" alt="wakatime"></a>
<a href="https://hitscounter.dev"><img src="https://hitscounter.dev/api/hit?url=https%3A%2F%2Fgithub.com%2Fdonaldzou%2FWGDashboard&label=Visitor&icon=github&color=%230a58ca&style=for-the-badge"></a>
<img src="https://img.shields.io/docker/pulls/donaldzou/wgdashboard?logo=docker&label=Docker%20Image%20Pulls&labelColor=ffffff&style=for-the-badge">
<img src="https://github.com/WGDashboard/WGDashboard/actions/workflows/docker.yml/badge.svg?style=for-the-badge">

View File

@@ -97,8 +97,9 @@ LABEL maintainer="dselen@nerthus.nl"
# Install only the runtime dependencies
RUN apk add --no-cache \
iproute2 iptables \
bash curl procps \
tzdata wireguard-tools
bash curl procps openrc \
tzdata wireguard-tools envsubst
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Copy only the final binaries from the AWG builder stages
COPY --from=awg-go /usr/bin/amneziawg-go /usr/bin/amneziawg-go
@@ -107,6 +108,7 @@ COPY --from=awg-tools /workspace/awg-tools/src/wg-quick/linux.bash /usr/bin/awg-
# Environment variables
ARG wg_net="10.0.0.1"
ARG wg_subn="24"
ARG wg_port="51820"
ENV TZ="Europe/Amsterdam" \
global_dns="9.9.9.9" \
@@ -117,32 +119,23 @@ ENV TZ="Europe/Amsterdam" \
# Create directories needed for operation
RUN mkdir /data /configs -p ${WGDASH}/src /etc/amnezia/amneziawg
# Copy the python virtual environment from the pip-builder stage
# Copy the venv and source files from local compiled locations or repos
COPY ./src ${WGDASH}/src
COPY --from=pip-builder /opt/wgdashboard/src/venv /opt/wgdashboard/src/venv
COPY ./docker/wg0.conf.template /tmp/wg0.conf.template
# Copy in the runtime script, essential.
COPY ./docker/entrypoint.sh /entrypoint.sh
# First WireGuard interface template
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN out_adapt=$(ip -o -4 route show to default | awk '{print $NF}') \
&& echo -e "[Interface]\n\
Address = ${wg_net}/24\n\
PrivateKey =\n\
PostUp = iptables -t nat -I POSTROUTING 1 -s ${wg_net}/24 -o ${out_adapt} -j MASQUERADE\n\
PostUp = iptables -I FORWARD -i wg0 -o wg0 -j DROP\n\
PreDown = iptables -t nat -D POSTROUTING -s ${wg_net}/24 -o ${out_adapt} -j MASQUERADE\n\
PreDown = iptables -D FORWARD -i wg0 -o wg0 -j DROP\n\
ListenPort = ${wg_port}\n\
SaveConfig = true\n\
DNS = ${global_dns}" > /configs/wg0.conf.template \
&& chmod 600 /configs/wg0.conf.template
RUN export out_adapt=$(ip -o -4 route show to default | awk '{print $NF}') \
&& envsubst < /tmp/wg0.conf.template > /configs/wg0.conf.template \
&& chmod 600 /configs/wg0.conf.template \
&& cat /configs/wg0.conf.template
# Set a healthcheck to determine the container its health
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD sh -c 'pgrep gunicorn > /dev/null && pgrep tail > /dev/null' || exit 1
# Copy in the runtime script, essential.
COPY ./docker/entrypoint.sh /entrypoint.sh
# Expose ports on the container
EXPOSE 10086
WORKDIR $WGDASH/src

View File

@@ -191,7 +191,11 @@ 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
if [ $? -ne 0 ]; then
echo "Loading WGDashboard failed... Look above for details."
fi

8
docker/wg0.conf.template Normal file
View File

@@ -0,0 +1,8 @@
[Interface]
Address = ${wg_net}/24
PrivateKey =
PostUp = iptables -t nat -I POSTROUTING 1 -s ${wg_net}/24 -o ${out_adapt} -j MASQUERADE; iptables -I FORWARD -i wg0 -o wg0 -j DROP
PreDown = iptables -t nat -D POSTROUTING -s ${wg_net}/24 -o ${out_adapt} -j MASQUERADE; iptables -D FORWARD -i wg0 -o wg0 -j DROP
ListenPort = ${wg_port}
SaveConfig = true
DNS = ${global_dns}

View File

@@ -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}"] = {

View File

@@ -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')

View File

@@ -1,6 +1,6 @@
{
"name": "app",
"version": "4.3.0.3",
"version": "4.3.1",
"private": true,
"type": "module",
"module": "es2022",