mirror of
https://github.com/WGDashboard/WGDashboard.git
synced 2026-12-01 17:07:47 +00:00
Compare commits
14
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4b33de173 | ||
|
|
914a7812e7 | ||
|
|
0a9f37cd2e | ||
|
|
a00799c3c5 | ||
|
|
dec86ad222 | ||
|
|
e547a83776 | ||
|
|
f8bb750d5d | ||
|
|
8d21152947 | ||
|
|
0018a9b1e2 | ||
|
|
dded6a86df | ||
|
|
4ee6b462dc | ||
|
|
e27dd986bc | ||
|
|
e6448f2ffd | ||
|
|
e2b5a59291 |
+8
-3
@@ -1,9 +1,14 @@
|
|||||||
.git
|
.git
|
||||||
.github
|
.github
|
||||||
*.md
|
|
||||||
tests/
|
tests/
|
||||||
docs/
|
docs/
|
||||||
|
|
||||||
|
*.md
|
||||||
|
|
||||||
|
**/node_modules
|
||||||
|
**/venv
|
||||||
|
**/__pycache__
|
||||||
|
**/*.pyc
|
||||||
|
|
||||||
src/db
|
src/db
|
||||||
src/wg-dashboard.ini
|
src/wg-dashboard.ini
|
||||||
src/static/app
|
|
||||||
src/static/client
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ jobs:
|
|||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
with:
|
with:
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@@ -74,7 +74,7 @@ jobs:
|
|||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
||||||
docker_scan:
|
docker_scan:
|
||||||
if: ${{ github.event_name != 'pull_request' }}
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ pnpm-debug.log*
|
|||||||
lerna-debug.log*
|
lerna-debug.log*
|
||||||
|
|
||||||
dist
|
dist
|
||||||
|
/src/static/.dist-staging.*
|
||||||
|
|
||||||
node_modules
|
node_modules
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|||||||
+1
-1
@@ -4,5 +4,5 @@
|
|||||||
|
|
||||||
| Version | Supported |
|
| Version | Supported |
|
||||||
| ------- | ------------------ |
|
| ------- | ------------------ |
|
||||||
| 4.3 | :white_check_mark: |
|
| > 4.3 | :white_check_mark: |
|
||||||
| < 4.3 | :x: |
|
| < 4.3 | :x: |
|
||||||
|
|||||||
@@ -1,76 +0,0 @@
|
|||||||
FROM golang:1.24 AS awg-go
|
|
||||||
|
|
||||||
RUN git clone https://github.com/WGDashboard/amneziawg-go /awg
|
|
||||||
WORKDIR /awg
|
|
||||||
RUN go mod download && \
|
|
||||||
go mod verify && \
|
|
||||||
go build -ldflags '-linkmode external -extldflags "-fno-PIC -static"' -v -o /usr/bin
|
|
||||||
|
|
||||||
FROM alpine:latest AS awg-tools
|
|
||||||
|
|
||||||
RUN apk update && apk add --no-cache \
|
|
||||||
make git build-base linux-headers \
|
|
||||||
&& git clone https://github.com/WGDashboard/amneziawg-tools \
|
|
||||||
&& cd amneziawg-tools/src \
|
|
||||||
&& make \
|
|
||||||
&& chmod +x wg*
|
|
||||||
|
|
||||||
FROM alpine:latest
|
|
||||||
LABEL maintainer="[email protected]"
|
|
||||||
|
|
||||||
RUN apk update && apk add --no-cache \
|
|
||||||
iproute2 iptables bash curl wget unzip procps sudo \
|
|
||||||
tzdata wireguard-tools python3 py3-psutil py3-bcrypt openresolv
|
|
||||||
|
|
||||||
COPY --from=awg-go /usr/bin/amneziawg-go /usr/bin/amneziawg-go
|
|
||||||
COPY --from=awg-tools /amneziawg-tools/src/wg /usr/bin/awg
|
|
||||||
COPY --from=awg-tools /amneziawg-tools/src/wg-quick/linux.bash /usr/bin/awg-quick
|
|
||||||
|
|
||||||
# Declaring environment variables, change Peernet to an address you like, standard is a 24 bit subnet.
|
|
||||||
ARG wg_net="10.0.0.1" \
|
|
||||||
wg_port="51820"
|
|
||||||
|
|
||||||
# Following ENV variables are changable on container runtime because /entrypoint.sh handles that. See compose.yaml for more info.
|
|
||||||
ENV TZ="Europe/Amsterdam" \
|
|
||||||
global_dns="9.9.9.9" \
|
|
||||||
wgd_port="10086" \
|
|
||||||
public_ip=""
|
|
||||||
|
|
||||||
# Using WGDASH -- like wg_net functionally as a ARG command. But it is needed in entrypoint.sh so it needs to be exported as environment variable.
|
|
||||||
ENV WGDASH=/opt/wgdashboard
|
|
||||||
|
|
||||||
# Doing WireGuard Dashboard installation measures. Modify the git clone command to get the preferred version, with a specific branch for example.
|
|
||||||
RUN mkdir /data \
|
|
||||||
&& mkdir /configs \
|
|
||||||
&& mkdir -p ${WGDASH}/src \
|
|
||||||
&& mkdir -p /etc/amnezia/amneziawg
|
|
||||||
COPY ./src ${WGDASH}/src
|
|
||||||
|
|
||||||
# Generate basic WireGuard interface. Echoing the WireGuard interface config for readability, adjust if you want it for efficiency.
|
|
||||||
# Also setting the pipefail option, verbose: https://github.com/hadolint/hadolint/wiki/DL4006.
|
|
||||||
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
|
|
||||||
|
|
||||||
# Defining a way for Docker to check the health of the container. In this case: checking the gunicorn process.
|
|
||||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
||||||
CMD sh -c 'pgrep gunicorn > /dev/null && pgrep tail > /dev/null' || exit 1
|
|
||||||
|
|
||||||
# Copy the basic entrypoint.sh script.
|
|
||||||
COPY ./docker/entrypoint.sh /entrypoint.sh
|
|
||||||
|
|
||||||
# Exposing the default WireGuard Dashboard port for web access.
|
|
||||||
EXPOSE 10086
|
|
||||||
WORKDIR $WGDASH
|
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
|
||||||
+42
-9
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Pull the current golang-alpine image.
|
# Pull the current golang-alpine image.
|
||||||
FROM golang:1.27-alpine3.23 AS awg-go
|
FROM golang:1.27-alpine3.24 AS awg-go-builder
|
||||||
|
|
||||||
# Install build-dependencies.
|
# Install build-dependencies.
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
@@ -30,7 +30,7 @@ RUN go version && \
|
|||||||
# AWG TOOLS BUILDING STAGE
|
# AWG TOOLS BUILDING STAGE
|
||||||
# Base: Alpine
|
# Base: Alpine
|
||||||
#
|
#
|
||||||
FROM alpine:3.24 AS awg-tools
|
FROM alpine:3.24 AS awg-tools-builder
|
||||||
|
|
||||||
# Install needed dependencies.
|
# Install needed dependencies.
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
@@ -55,7 +55,7 @@ RUN make && chmod +x wg*
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Use the python-alpine image for building pip dependencies
|
# Use the python-alpine image for building pip dependencies
|
||||||
FROM python:3.14-alpine3.23 AS pip-builder
|
FROM python:3.15-alpine3.24 AS pip-builder
|
||||||
|
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
|
|
||||||
@@ -85,13 +85,32 @@ RUN . /opt/wgdashboard/src/venv/bin/activate && \
|
|||||||
pip3 install --upgrade pip && \
|
pip3 install --upgrade pip && \
|
||||||
pip3 install -r /opt/wgdashboard/src/requirements.txt
|
pip3 install -r /opt/wgdashboard/src/requirements.txt
|
||||||
|
|
||||||
|
#
|
||||||
|
# WGDashboard FRONTEND BUILDING
|
||||||
|
# Base: Node Alpine
|
||||||
|
#
|
||||||
|
FROM node:26-alpine3.24 AS frontend-builder
|
||||||
|
|
||||||
|
WORKDIR /workspace
|
||||||
|
|
||||||
|
# Copy frontend source, package files and lockfiles
|
||||||
|
COPY ./src/static/ ./
|
||||||
|
|
||||||
|
# Build the admin frontend
|
||||||
|
WORKDIR /workspace/app
|
||||||
|
RUN npm ci && npm run build
|
||||||
|
|
||||||
|
# Build the client frontend
|
||||||
|
WORKDIR /workspace/client
|
||||||
|
RUN npm ci && npm run build
|
||||||
|
|
||||||
#
|
#
|
||||||
# WGDashboard RUNNING STAGE
|
# WGDashboard RUNNING STAGE
|
||||||
# Base: Alpine
|
# Base: Alpine
|
||||||
#
|
#
|
||||||
|
|
||||||
# Running with the python-alpine image.
|
# Running with the python-alpine image.
|
||||||
FROM python:3.14-alpine3.23 AS final
|
FROM python:3.15-alpine3.24 AS final
|
||||||
LABEL maintainer="[email protected]"
|
LABEL maintainer="[email protected]"
|
||||||
|
|
||||||
# Install only the runtime dependencies
|
# Install only the runtime dependencies
|
||||||
@@ -102,9 +121,9 @@ RUN apk add --no-cache \
|
|||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
# Copy only the final binaries from the AWG builder stages
|
# Copy only the final binaries from the AWG builder stages
|
||||||
COPY --from=awg-go /usr/bin/amneziawg-go /usr/bin/amneziawg-go
|
COPY --from=awg-go-builder /usr/bin/amneziawg-go /usr/bin/amneziawg-go
|
||||||
COPY --from=awg-tools /workspace/awg-tools/src/wg /usr/bin/awg
|
COPY --from=awg-tools-builder /workspace/awg-tools/src/wg /usr/bin/awg
|
||||||
COPY --from=awg-tools /workspace/awg-tools/src/wg-quick/linux.bash /usr/bin/awg-quick
|
COPY --from=awg-tools-builder /workspace/awg-tools/src/wg-quick/linux.bash /usr/bin/awg-quick
|
||||||
|
|
||||||
# Environment variables
|
# Environment variables
|
||||||
ARG wg_net="10.0.0.1"
|
ARG wg_net="10.0.0.1"
|
||||||
@@ -121,11 +140,25 @@ ENV TZ="Europe/Amsterdam" \
|
|||||||
RUN mkdir /data /configs -p ${WGDASH}/src /etc/amnezia/amneziawg \
|
RUN mkdir /data /configs -p ${WGDASH}/src /etc/amnezia/amneziawg \
|
||||||
&& echo "name_servers=${global_dns}" >> /etc/resolvconf.conf
|
&& echo "name_servers=${global_dns}" >> /etc/resolvconf.conf
|
||||||
|
|
||||||
# Copy the venv and source files from local compiled locations or repos
|
# Copy application source
|
||||||
COPY ./src ${WGDASH}/src
|
COPY ./src ${WGDASH}/src
|
||||||
COPY --from=pip-builder /opt/wgdashboard/src/venv /opt/wgdashboard/src/venv
|
|
||||||
|
# Copy Python dependencies
|
||||||
|
COPY --from=pip-builder \
|
||||||
|
/opt/wgdashboard/src/venv \
|
||||||
|
${WGDASH}/src/venv
|
||||||
|
|
||||||
|
RUN rm -rf ${WGDASH}/src/static/dist \
|
||||||
|
${WGDASH}/src/static/app \
|
||||||
|
${WGDASH}/src/static/client
|
||||||
|
|
||||||
|
COPY --from=frontend-builder \
|
||||||
|
/workspace/dist/ \
|
||||||
|
${WGDASH}/src/static/dist/
|
||||||
|
|
||||||
COPY ./docker/wg0.conf.template /tmp/wg0.conf.template
|
COPY ./docker/wg0.conf.template /tmp/wg0.conf.template
|
||||||
COPY ./docker/wg-dashboard-oidc-providers.json.template /tmp/wg-dashboard-oidc-providers.json.template
|
COPY ./docker/wg-dashboard-oidc-providers.json.template /tmp/wg-dashboard-oidc-providers.json.template
|
||||||
|
|
||||||
# Copy in the runtime script, essential.
|
# Copy in the runtime script, essential.
|
||||||
COPY ./docker/entrypoint.sh /entrypoint.sh
|
COPY ./docker/entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
|||||||
@@ -121,6 +121,20 @@ Updating the WGDashboard container should be through 'The Docker Way' - by pulli
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 🧩 Custom Startup Scripts
|
||||||
|
|
||||||
|
Every file placed in `/data/custom-init.d/` is executed with `bash` at container startup, in alphabetical order, right before WGDashboard starts. A failing script is logged but does not stop the container.
|
||||||
|
|
||||||
|
This is useful for installing additional packages, for example `/data/custom-init.d/apk-add`:
|
||||||
|
```bash
|
||||||
|
apk update > /dev/null 2>&1
|
||||||
|
apk add --no-cache util-linux openssh-client > /dev/null 2>&1
|
||||||
|
```
|
||||||
|
|
||||||
|
> 📁 When using a Docker volume for `/data`, you can also bind-mount the directory directly, e.g. `./custom-init.d:/data/custom-init.d:ro`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 🔐 Port Forwarding Note
|
## 🔐 Port Forwarding Note
|
||||||
|
|
||||||
When using multiple WireGuard interfaces, remember to **open their respective ports** on the host.
|
When using multiple WireGuard interfaces, remember to **open their respective ports** on the host.
|
||||||
@@ -202,6 +216,7 @@ ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
|||||||
|
|
||||||
- **`ensure_installation`**: Sets up the app, database, and Python environment.
|
- **`ensure_installation`**: Sets up the app, database, and Python environment.
|
||||||
- **`set_envvars`**: Writes `wg-dashboard.ini` and applies environment variables.
|
- **`set_envvars`**: Writes `wg-dashboard.ini` and applies environment variables.
|
||||||
|
- **`run_custom_init`**: Runs user scripts from `/data/custom-init.d/`.
|
||||||
- **`start_core`**: Starts the main WGDashboard service.
|
- **`start_core`**: Starts the main WGDashboard service.
|
||||||
- **`ensure_blocking`**: Tails the error log to keep the container process alive.
|
- **`ensure_blocking`**: Tails the error log to keep the container process alive.
|
||||||
|
|
||||||
|
|||||||
@@ -258,6 +258,24 @@ set_envvars() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Run user-provided drop-in scripts, e.g. to install additional packages
|
||||||
|
run_custom_init() {
|
||||||
|
local init_dir="/data/custom-init.d"
|
||||||
|
|
||||||
|
[[ -d "$init_dir" ]] || return 0
|
||||||
|
|
||||||
|
printf "\n------------------ RUNNING CUSTOM SCRIPTS ------------------\n"
|
||||||
|
|
||||||
|
for script in "$init_dir"/*; do
|
||||||
|
[[ -f "$script" ]] || continue
|
||||||
|
|
||||||
|
echo "Running custom script: ${script}"
|
||||||
|
if ! bash "$script"; then
|
||||||
|
echo "Custom script ${script} exited with an error, continuing."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# Start service and monitor logs
|
# Start service and monitor logs
|
||||||
start_and_monitor() {
|
start_and_monitor() {
|
||||||
printf "\n---------------------- STARTING CORE -----------------------\n"
|
printf "\n---------------------- STARTING CORE -----------------------\n"
|
||||||
@@ -331,4 +349,5 @@ start_and_monitor() {
|
|||||||
# Main execution flow
|
# Main execution flow
|
||||||
ensure_installation
|
ensure_installation
|
||||||
set_envvars
|
set_envvars
|
||||||
|
run_custom_init
|
||||||
start_and_monitor
|
start_and_monitor
|
||||||
|
|||||||
+5
-5
@@ -113,10 +113,12 @@ def createClientBlueprint(wireguardConfigurations: dict[WireguardConfiguration],
|
|||||||
return ResponseObject(False, "Please provide a valid Email")
|
return ResponseObject(False, "Please provide a valid Email")
|
||||||
|
|
||||||
token = dashboardClients.GenerateClientPasswordResetToken(u.get('ClientID'))
|
token = dashboardClients.GenerateClientPasswordResetToken(u.get('ClientID'))
|
||||||
|
if not token:
|
||||||
|
return ResponseObject(False, "A reset token was recently sent. Please wait 2 minutes before requesting another.")
|
||||||
|
|
||||||
status, msg = emailSender.send(
|
status, msg = emailSender.send(
|
||||||
email, "[WGDashboard | Client] Reset Password",
|
email, "[WGDashboard | Client] Reset Password",
|
||||||
f"Hi {email}, \n\nIt looks like you're trying to reset your password at {date} \n\nEnter this 6 digits code on the Forgot Password to continue:\n\n{token}\n\nThis code will expire in 30 minutes for your security. If you didn’t request a password reset, you can safely ignore this email—your current password will remain unchanged.\n\nIf you need help, feel free to contact support.\n\nBest regards,\n\nWGDashboard"
|
f"Hi {email}, \n\nIt looks like you're trying to reset your password at {date} \n\nEnter this reset token on the Forgot Password page to continue:\n\n{token}\n\nThis token will expire in 30 minutes for your security. If you didn’t request a password reset, you can safely ignore this email—your current password will remain unchanged.\n\nIf you need help, feel free to contact support.\n\nBest regards,\n\nWGDashboard"
|
||||||
)
|
)
|
||||||
|
|
||||||
return ResponseObject(status, msg)
|
return ResponseObject(status, msg)
|
||||||
@@ -150,11 +152,9 @@ def createClientBlueprint(wireguardConfigurations: dict[WireguardConfiguration],
|
|||||||
return ResponseObject(False, "Please provide a valid Email")
|
return ResponseObject(False, "Please provide a valid Email")
|
||||||
|
|
||||||
if not dashboardClients.ValidateClientPasswordResetToken(u.get('ClientID'), token):
|
if not dashboardClients.ValidateClientPasswordResetToken(u.get('ClientID'), token):
|
||||||
return ResponseObject(False, "Verification code is either invalid or expired")
|
return ResponseObject(False, "Reset token is either invalid or expired")
|
||||||
|
|
||||||
status, msg = dashboardClients.ResetClientPassword(u.get('ClientID'), password, confirmPassword)
|
status, msg = dashboardClients.ResetClientPassword(u.get('ClientID'), password, confirmPassword, token)
|
||||||
|
|
||||||
dashboardClients.RevokeClientPasswordResetToken(u.get('ClientID'), token)
|
|
||||||
|
|
||||||
return ResponseObject(status, msg)
|
return ResponseObject(status, msg)
|
||||||
|
|
||||||
|
|||||||
+59
-37
@@ -9,8 +9,7 @@ from zipfile import ZipFile
|
|||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
import sqlalchemy
|
import sqlalchemy
|
||||||
from jinja2 import Template
|
from flask import Flask, request, render_template, session, send_file, current_app, g
|
||||||
from flask import Flask, request, render_template, session, send_file, current_app, redirect, url_for
|
|
||||||
from flask_cors import CORS
|
from flask_cors import CORS
|
||||||
from icmplib import ping, traceroute
|
from icmplib import ping, traceroute
|
||||||
from flask.json.provider import DefaultJSONProvider
|
from flask.json.provider import DefaultJSONProvider
|
||||||
@@ -20,7 +19,8 @@ from sqlalchemy import RowMapping
|
|||||||
|
|
||||||
from modules.Utilities import (
|
from modules.Utilities import (
|
||||||
RegexMatch, StringToBoolean, ValidateDNSAddress,
|
RegexMatch, StringToBoolean, ValidateDNSAddress,
|
||||||
GenerateWireguardPublicKey, GenerateWireguardPrivateKey
|
GenerateWireguardPublicKey, GenerateWireguardPrivateKey,
|
||||||
|
RenderSandboxedTemplate
|
||||||
)
|
)
|
||||||
from packaging import version
|
from packaging import version
|
||||||
from modules.Email import EmailSender
|
from modules.Email import EmailSender
|
||||||
@@ -248,7 +248,7 @@ def auth_req():
|
|||||||
if request.method.lower() == 'options':
|
if request.method.lower() == 'options':
|
||||||
return ResponseObject(True)
|
return ResponseObject(True)
|
||||||
|
|
||||||
DashboardConfig.APIAccessed = False
|
g.api_key_authenticated = False
|
||||||
authenticationRequired = DashboardConfig.GetConfig("Server", "auth_req")[1]
|
authenticationRequired = DashboardConfig.GetConfig("Server", "auth_req")[1]
|
||||||
d = request.headers
|
d = request.headers
|
||||||
if authenticationRequired:
|
if authenticationRequired:
|
||||||
@@ -258,7 +258,6 @@ def auth_req():
|
|||||||
apiKeyExist = len(list(filter(lambda x : x.Key == apiKey, DashboardConfig.DashboardAPIKeys))) == 1
|
apiKeyExist = len(list(filter(lambda x : x.Key == apiKey, DashboardConfig.DashboardAPIKeys))) == 1
|
||||||
DashboardLogger.log(str(request.url), str(request.remote_addr), Message=f"API Key Access: {('true' if apiKeyExist else 'false')} - Key: {apiKey}")
|
DashboardLogger.log(str(request.url), str(request.remote_addr), Message=f"API Key Access: {('true' if apiKeyExist else 'false')} - Key: {apiKey}")
|
||||||
if not apiKeyExist:
|
if not apiKeyExist:
|
||||||
DashboardConfig.APIAccessed = False
|
|
||||||
response = Flask.make_response(app, {
|
response = Flask.make_response(app, {
|
||||||
"status": False,
|
"status": False,
|
||||||
"message": "API Key does not exist",
|
"message": "API Key does not exist",
|
||||||
@@ -267,9 +266,8 @@ def auth_req():
|
|||||||
response.content_type = "application/json"
|
response.content_type = "application/json"
|
||||||
response.status_code = 401
|
response.status_code = 401
|
||||||
return response
|
return response
|
||||||
DashboardConfig.APIAccessed = True
|
g.api_key_authenticated = True
|
||||||
else:
|
else:
|
||||||
DashboardConfig.APIAccessed = False
|
|
||||||
appPrefix = APP_PREFIX if len(APP_PREFIX) > 0 else ''
|
appPrefix = APP_PREFIX if len(APP_PREFIX) > 0 else ''
|
||||||
whiteList = [
|
whiteList = [
|
||||||
# f'/static/',
|
# f'/static/',
|
||||||
@@ -358,7 +356,7 @@ def API_AuthenticateLogin():
|
|||||||
if not DashboardConfig.GetConfig("Server", "auth_req")[1]:
|
if not DashboardConfig.GetConfig("Server", "auth_req")[1]:
|
||||||
return ResponseObject(True, DashboardConfig.GetConfig("Other", "welcome_session")[1])
|
return ResponseObject(True, DashboardConfig.GetConfig("Other", "welcome_session")[1])
|
||||||
|
|
||||||
if DashboardConfig.APIAccessed:
|
if getattr(g, 'api_key_authenticated', False):
|
||||||
authToken = hashlib.sha256(f"{request.headers.get('wg-dashboard-apikey')}{datetime.now()}".encode()).hexdigest()
|
authToken = hashlib.sha256(f"{request.headers.get('wg-dashboard-apikey')}{datetime.now()}".encode()).hexdigest()
|
||||||
session['role'] = 'admin'
|
session['role'] = 'admin'
|
||||||
session['username'] = authToken
|
session['username'] = authToken
|
||||||
@@ -945,8 +943,17 @@ def API_addPeers(configName):
|
|||||||
allowed_ips: list[str] = data.get('allowed_ips', [])
|
allowed_ips: list[str] = data.get('allowed_ips', [])
|
||||||
allowed_ips_validation: bool = data.get('allowed_ips_validation', True)
|
allowed_ips_validation: bool = data.get('allowed_ips_validation', True)
|
||||||
|
|
||||||
endpoint_allowed_ip: str = data.get('endpoint_allowed_ip', DashboardConfig.GetConfig("Peers", "peer_endpoint_allowed_ip")[1])
|
config = WireguardConfigurations.get(configName)
|
||||||
dns_addresses: str = data.get('DNS', DashboardConfig.GetConfig("Peers", "peer_global_DNS")[1])
|
overridePeerSettings = config.configurationInfo.OverridePeerSettings
|
||||||
|
|
||||||
|
endpoint_allowed_ip: str = data.get('endpoint_allowed_ip', (
|
||||||
|
overridePeerSettings.EndpointAllowedIPs
|
||||||
|
if overridePeerSettings.EndpointAllowedIPs else DashboardConfig.GetConfig("Peers", "peer_endpoint_allowed_ip")[1]
|
||||||
|
))
|
||||||
|
dns_addresses: str = data.get('DNS', (
|
||||||
|
overridePeerSettings.DNS
|
||||||
|
if overridePeerSettings.DNS else DashboardConfig.GetConfig("Peers", "peer_global_DNS")[1]
|
||||||
|
))
|
||||||
|
|
||||||
|
|
||||||
mtu: int = data.get('mtu', None)
|
mtu: int = data.get('mtu', None)
|
||||||
@@ -955,7 +962,10 @@ def API_addPeers(configName):
|
|||||||
preshared_key: str = data.get('preshared_key', "")
|
preshared_key: str = data.get('preshared_key', "")
|
||||||
|
|
||||||
if type(mtu) is not int or mtu < 0 or mtu > 1460:
|
if type(mtu) is not int or mtu < 0 or mtu > 1460:
|
||||||
default: str = DashboardConfig.GetConfig("Peers", "peer_mtu")[1]
|
default: str = (
|
||||||
|
str(overridePeerSettings.MTU)
|
||||||
|
if overridePeerSettings.MTU else DashboardConfig.GetConfig("Peers", "peer_mtu")[1]
|
||||||
|
)
|
||||||
if default.isnumeric():
|
if default.isnumeric():
|
||||||
try:
|
try:
|
||||||
mtu = int(default)
|
mtu = int(default)
|
||||||
@@ -964,7 +974,10 @@ def API_addPeers(configName):
|
|||||||
else:
|
else:
|
||||||
mtu = 0
|
mtu = 0
|
||||||
if type(keep_alive) is not int or keep_alive < 0:
|
if type(keep_alive) is not int or keep_alive < 0:
|
||||||
default = DashboardConfig.GetConfig("Peers", "peer_keep_alive")[1]
|
default = (
|
||||||
|
str(overridePeerSettings.PersistentKeepalive)
|
||||||
|
if overridePeerSettings.PersistentKeepalive else DashboardConfig.GetConfig("Peers", "peer_keep_alive")[1]
|
||||||
|
)
|
||||||
if default.isnumeric():
|
if default.isnumeric():
|
||||||
try:
|
try:
|
||||||
keep_alive = int(default)
|
keep_alive = int(default)
|
||||||
@@ -973,7 +986,6 @@ def API_addPeers(configName):
|
|||||||
else:
|
else:
|
||||||
keep_alive = 0
|
keep_alive = 0
|
||||||
|
|
||||||
config = WireguardConfigurations.get(configName)
|
|
||||||
if not config.getStatus():
|
if not config.getStatus():
|
||||||
config.toggleConfiguration()
|
config.toggleConfiguration()
|
||||||
ipStatus, availableIps = config.getAvailableIP(-1)
|
ipStatus, availableIps = config.getAvailableIP(-1)
|
||||||
@@ -1040,8 +1052,7 @@ def API_addPeers(configName):
|
|||||||
if ipStatus:
|
if ipStatus:
|
||||||
for subnet in availableIps.keys():
|
for subnet in availableIps.keys():
|
||||||
for ip in availableIps[subnet]:
|
for ip in availableIps[subnet]:
|
||||||
allowed_ips = [ip]
|
allowed_ips.append(ip)
|
||||||
break
|
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
return ResponseObject(False, "No more available IP can assign")
|
return ResponseObject(False, "No more available IP can assign")
|
||||||
@@ -1140,23 +1151,36 @@ def API_GetPeerHistoricalEndpoints():
|
|||||||
if not configurationName or not id:
|
if not configurationName or not id:
|
||||||
return ResponseObject(False, "Please provide configurationName and id")
|
return ResponseObject(False, "Please provide configurationName and id")
|
||||||
fp, p = WireguardConfigurations.get(configurationName).searchPeer(id)
|
fp, p = WireguardConfigurations.get(configurationName).searchPeer(id)
|
||||||
if fp:
|
if not fp:
|
||||||
result = p.getEndpoints()
|
|
||||||
geo = {}
|
|
||||||
try:
|
|
||||||
r = requests.post(f"http://ip-api.com/batch?fields=city,country,lat,lon,query",
|
|
||||||
data=json.dumps([x['endpoint'] for x in result]))
|
|
||||||
d = r.json()
|
|
||||||
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
return ResponseObject(data=result, message="Failed to request IP address geolocation. " + str(e))
|
|
||||||
|
|
||||||
return ResponseObject(data={
|
|
||||||
"endpoints": p.getEndpoints(),
|
|
||||||
"geolocation": d
|
|
||||||
})
|
|
||||||
return ResponseObject(False, "Peer does not exist")
|
return ResponseObject(False, "Peer does not exist")
|
||||||
|
endpoints = p.getEndpoints()
|
||||||
|
ips = [x['endpoint'] for x in endpoints]
|
||||||
|
unique_ips = list(set(ips))
|
||||||
|
def chunks(lst, size=100):
|
||||||
|
for i in range(0, len(lst), size):
|
||||||
|
yield lst[i:i + size]
|
||||||
|
geo_cache = {}
|
||||||
|
try:
|
||||||
|
for batch in chunks(unique_ips, 100):
|
||||||
|
r = requests.post(
|
||||||
|
"http://ip-api.com/batch?fields=city,country,lat,lon,query",
|
||||||
|
data=json.dumps(batch),
|
||||||
|
timeout=5
|
||||||
|
)
|
||||||
|
r.raise_for_status()
|
||||||
|
data = r.json()
|
||||||
|
for item in data:
|
||||||
|
geo_cache[item["query"]] = item
|
||||||
|
geolocation = [geo_cache[ip] for ip in ips]
|
||||||
|
except Exception as e:
|
||||||
|
return ResponseObject(
|
||||||
|
data={"endpoints": endpoints},
|
||||||
|
message="Failed to request IP address geolocation. " + str(e)
|
||||||
|
)
|
||||||
|
return ResponseObject(data={
|
||||||
|
"endpoints": endpoints,
|
||||||
|
"geolocation": geolocation
|
||||||
|
})
|
||||||
|
|
||||||
@app.get(f'{APP_PREFIX}/api/getPeerSessions')
|
@app.get(f'{APP_PREFIX}/api/getPeerSessions')
|
||||||
def API_GetPeerSessions():
|
def API_GetPeerSessions():
|
||||||
@@ -1597,10 +1621,9 @@ def API_Email_Send():
|
|||||||
if configuration is not None:
|
if configuration is not None:
|
||||||
fp, p = configuration.searchPeer(data.get('Peer'))
|
fp, p = configuration.searchPeer(data.get('Peer'))
|
||||||
if fp:
|
if fp:
|
||||||
template = Template(body)
|
|
||||||
download = p.downloadPeer()
|
download = p.downloadPeer()
|
||||||
body = template.render(peer=p.toJson(), configurationFile=download)
|
body = RenderSandboxedTemplate(body, peer=p.toJson(), configurationFile=download)
|
||||||
subject = Template(data.get('Subject', '')).render(peer=p.toJson(), configurationFile=download)
|
subject = RenderSandboxedTemplate(data.get('Subject', ''), peer=p.toJson(), configurationFile=download)
|
||||||
if data.get('IncludeAttachment', False):
|
if data.get('IncludeAttachment', False):
|
||||||
u = str(uuid4())
|
u = str(uuid4())
|
||||||
peerName = p.toJson().get('name', '').strip()
|
peerName = p.toJson().get('name', '').strip()
|
||||||
@@ -1629,11 +1652,10 @@ def API_Email_PreviewBody():
|
|||||||
return ResponseObject(False, "Peer does not exist")
|
return ResponseObject(False, "Peer does not exist")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
template = Template(body)
|
|
||||||
download = p.downloadPeer()
|
download = p.downloadPeer()
|
||||||
return ResponseObject(data={
|
return ResponseObject(data={
|
||||||
"Body": Template(body).render(peer=p.toJson(), configurationFile=download),
|
"Body": RenderSandboxedTemplate(body, peer=p.toJson(), configurationFile=download),
|
||||||
"Subject": Template(subject).render(peer=p.toJson(), configurationFile=download)
|
"Subject": RenderSandboxedTemplate(subject, peer=p.toJson(), configurationFile=download)
|
||||||
})
|
})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return ResponseObject(False, message=str(e))
|
return ResponseObject(False, message=str(e))
|
||||||
|
|||||||
@@ -37,6 +37,15 @@ class AmneziaConfiguration(WireguardConfiguration):
|
|||||||
self.I3 = ""
|
self.I3 = ""
|
||||||
self.I4 = ""
|
self.I4 = ""
|
||||||
self.I5 = ""
|
self.I5 = ""
|
||||||
|
self.HeaderProtectionKey = ""
|
||||||
|
self.ContentPaddingAddition = 0
|
||||||
|
self.RekeyAfterTime = 0
|
||||||
|
self.RekeyTimeout = 0
|
||||||
|
self.RejectAfterTime = 0
|
||||||
|
self.KeepaliveTimeout = 0
|
||||||
|
self.MaxHandshakeAttempts = 0
|
||||||
|
self.RandomTrailers = 0
|
||||||
|
self.DisableCookies = 0
|
||||||
self.J1 = ""
|
self.J1 = ""
|
||||||
self.J2 = ""
|
self.J2 = ""
|
||||||
self.J3 = ""
|
self.J3 = ""
|
||||||
@@ -84,6 +93,15 @@ class AmneziaConfiguration(WireguardConfiguration):
|
|||||||
"I3": self.I3,
|
"I3": self.I3,
|
||||||
"I4": self.I4,
|
"I4": self.I4,
|
||||||
"I5": self.I5,
|
"I5": self.I5,
|
||||||
|
"HeaderProtectionKey": self.HeaderProtectionKey,
|
||||||
|
"ContentPaddingAddition": self.ContentPaddingAddition,
|
||||||
|
"RekeyAfterTime": self.RekeyAfterTime,
|
||||||
|
"RekeyTimeout": self.RekeyTimeout,
|
||||||
|
"RejectAfterTime": self.RejectAfterTime,
|
||||||
|
"KeepaliveTimeout": self.KeepaliveTimeout,
|
||||||
|
"MaxHandshakeAttempts": self.MaxHandshakeAttempts,
|
||||||
|
"RandomTrailers": self.RandomTrailers,
|
||||||
|
"DisableCookies": self.DisableCookies,
|
||||||
"J1": self.J1,
|
"J1": self.J1,
|
||||||
"J2": self.J2,
|
"J2": self.J2,
|
||||||
"J3": self.J3,
|
"J3": self.J3,
|
||||||
@@ -152,7 +170,8 @@ class AmneziaConfiguration(WireguardConfiguration):
|
|||||||
f'{dbName}_history_endpoint', self.metadata,
|
f'{dbName}_history_endpoint', self.metadata,
|
||||||
sqlalchemy.Column('id', sqlalchemy.String(255), nullable=False),
|
sqlalchemy.Column('id', sqlalchemy.String(255), nullable=False),
|
||||||
sqlalchemy.Column('endpoint', sqlalchemy.String(255), nullable=False),
|
sqlalchemy.Column('endpoint', sqlalchemy.String(255), nullable=False),
|
||||||
sqlalchemy.Column('time', time_col_type)
|
sqlalchemy.Column('time', time_col_type),
|
||||||
|
extend_existing=True
|
||||||
)
|
)
|
||||||
|
|
||||||
self.infoTable = sqlalchemy.Table(
|
self.infoTable = sqlalchemy.Table(
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import hashlib
|
import hashlib
|
||||||
import random
|
import secrets
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import bcrypt
|
import bcrypt
|
||||||
@@ -305,7 +305,9 @@ class DashboardClients:
|
|||||||
def GetClientAssignedPeers(self, ClientID):
|
def GetClientAssignedPeers(self, ClientID):
|
||||||
return self.DashboardClientsPeerAssignment.GetAssignedPeers(ClientID)
|
return self.DashboardClientsPeerAssignment.GetAssignedPeers(ClientID)
|
||||||
|
|
||||||
def ResetClientPassword(self, ClientID, NewPassword, ConfirmNewPassword) -> tuple[bool, str] | tuple[bool, None]:
|
def ResetClientPassword(
|
||||||
|
self, ClientID, NewPassword, ConfirmNewPassword, ResetToken
|
||||||
|
) -> tuple[bool, str] | tuple[bool, None]:
|
||||||
c = self.GetClient(ClientID)
|
c = self.GetClient(ClientID)
|
||||||
if c is None:
|
if c is None:
|
||||||
return False, "Client does not exist"
|
return False, "Client does not exist"
|
||||||
@@ -316,18 +318,36 @@ class DashboardClients:
|
|||||||
pwStrength, msg = ValidatePasswordStrength(NewPassword)
|
pwStrength, msg = ValidatePasswordStrength(NewPassword)
|
||||||
if not pwStrength:
|
if not pwStrength:
|
||||||
return pwStrength, msg
|
return pwStrength, msg
|
||||||
|
|
||||||
|
if not isinstance(ResetToken, str) or not ResetToken or len(ResetToken) > 128:
|
||||||
|
return False, "Reset token is either invalid or expired"
|
||||||
|
|
||||||
|
tokenDigest = hashlib.sha256(ResetToken.encode("utf-8")).hexdigest()
|
||||||
|
now = datetime.datetime.now()
|
||||||
try:
|
try:
|
||||||
with self.engine.begin() as conn:
|
with self.engine.begin() as conn:
|
||||||
|
tokenClaimed = conn.execute(
|
||||||
|
self.dashboardClientsPasswordResetLinkTable.update().values({
|
||||||
|
"ExpiryDate": now
|
||||||
|
}).where(
|
||||||
|
db.and_(
|
||||||
|
self.dashboardClientsPasswordResetLinkTable.c.ClientID == ClientID,
|
||||||
|
self.dashboardClientsPasswordResetLinkTable.c.ResetToken == tokenDigest,
|
||||||
|
self.dashboardClientsPasswordResetLinkTable.c.ExpiryDate > now
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
if tokenClaimed.rowcount != 1:
|
||||||
|
return False, "Reset token is either invalid or expired"
|
||||||
|
|
||||||
conn.execute(
|
conn.execute(
|
||||||
self.dashboardClientsTable.update().values({
|
self.dashboardClientsTable.update().values({
|
||||||
"TotpKeyVerified": None,
|
|
||||||
"TotpKey": pyotp.random_base32(),
|
|
||||||
"Password": bcrypt.hashpw(NewPassword.encode('utf-8'), bcrypt.gensalt()).decode("utf-8"),
|
"Password": bcrypt.hashpw(NewPassword.encode('utf-8'), bcrypt.gensalt()).decode("utf-8"),
|
||||||
}).where(
|
}).where(
|
||||||
self.dashboardClientsTable.c.ClientID == ClientID
|
self.dashboardClientsTable.c.ClientID == ClientID
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
self.logger.log(Message=f"User {ClientID} reset password and TOTP")
|
self.logger.log(Message=f"User {ClientID} reset password")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger.log(Status="false", Message=f"User {ClientID} reset password failed, reason: {str(e)}")
|
self.logger.log(Status="false", Message=f"User {ClientID} reset password failed, reason: {str(e)}")
|
||||||
return False, "Reset password failed."
|
return False, "Reset password failed."
|
||||||
@@ -420,11 +440,24 @@ class DashboardClients:
|
|||||||
if c is None:
|
if c is None:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
newToken = str(random.randint(0, 999999)).zfill(6)
|
newToken = secrets.token_urlsafe(32)
|
||||||
|
tokenDigest = hashlib.sha256(newToken.encode("utf-8")).hexdigest()
|
||||||
|
now = datetime.datetime.now()
|
||||||
with self.engine.begin() as conn:
|
with self.engine.begin() as conn:
|
||||||
|
recentToken = conn.execute(
|
||||||
|
self.dashboardClientsPasswordResetLinkTable.select().where(
|
||||||
|
db.and_(
|
||||||
|
self.dashboardClientsPasswordResetLinkTable.c.ClientID == ClientID,
|
||||||
|
self.dashboardClientsPasswordResetLinkTable.c.CreatedDate > now - datetime.timedelta(minutes=2)
|
||||||
|
)
|
||||||
|
).limit(1)
|
||||||
|
).first()
|
||||||
|
if recentToken:
|
||||||
|
return False
|
||||||
|
|
||||||
conn.execute(
|
conn.execute(
|
||||||
self.dashboardClientsPasswordResetLinkTable.update().values({
|
self.dashboardClientsPasswordResetLinkTable.update().values({
|
||||||
"ExpiryDate": datetime.datetime.now()
|
"ExpiryDate": now
|
||||||
|
|
||||||
}).where(
|
}).where(
|
||||||
db.and_(
|
db.and_(
|
||||||
@@ -435,10 +468,10 @@ class DashboardClients:
|
|||||||
)
|
)
|
||||||
conn.execute(
|
conn.execute(
|
||||||
self.dashboardClientsPasswordResetLinkTable.insert().values({
|
self.dashboardClientsPasswordResetLinkTable.insert().values({
|
||||||
"ResetToken": newToken,
|
"ResetToken": tokenDigest,
|
||||||
"ClientID": ClientID,
|
"ClientID": ClientID,
|
||||||
"CreatedDate": datetime.datetime.now(),
|
"CreatedDate": now,
|
||||||
"ExpiryDate": datetime.datetime.now() + datetime.timedelta(minutes=30)
|
"ExpiryDate": now + datetime.timedelta(minutes=30)
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -446,13 +479,14 @@ class DashboardClients:
|
|||||||
|
|
||||||
def ValidateClientPasswordResetToken(self, ClientID, Token):
|
def ValidateClientPasswordResetToken(self, ClientID, Token):
|
||||||
c = self.GetClient(ClientID)
|
c = self.GetClient(ClientID)
|
||||||
if c is None:
|
if c is None or not isinstance(Token, str) or not Token or len(Token) > 128:
|
||||||
return False
|
return False
|
||||||
|
tokenDigest = hashlib.sha256(Token.encode("utf-8")).hexdigest()
|
||||||
with self.engine.connect() as conn:
|
with self.engine.connect() as conn:
|
||||||
t = conn.execute(
|
t = conn.execute(
|
||||||
self.dashboardClientsPasswordResetLinkTable.select().where(
|
self.dashboardClientsPasswordResetLinkTable.select().where(
|
||||||
db.and_(self.dashboardClientsPasswordResetLinkTable.c.ClientID == ClientID,
|
db.and_(self.dashboardClientsPasswordResetLinkTable.c.ClientID == ClientID,
|
||||||
self.dashboardClientsPasswordResetLinkTable.c.ResetToken == Token,
|
self.dashboardClientsPasswordResetLinkTable.c.ResetToken == tokenDigest,
|
||||||
self.dashboardClientsPasswordResetLinkTable.c.ExpiryDate > datetime.datetime.now())
|
self.dashboardClientsPasswordResetLinkTable.c.ExpiryDate > datetime.datetime.now())
|
||||||
|
|
||||||
)
|
)
|
||||||
@@ -460,13 +494,16 @@ class DashboardClients:
|
|||||||
return t is not None
|
return t is not None
|
||||||
|
|
||||||
def RevokeClientPasswordResetToken(self, ClientID, Token):
|
def RevokeClientPasswordResetToken(self, ClientID, Token):
|
||||||
|
if not isinstance(Token, str) or len(Token) > 128:
|
||||||
|
return False
|
||||||
|
tokenDigest = hashlib.sha256(Token.encode("utf-8")).hexdigest()
|
||||||
with self.engine.begin() as conn:
|
with self.engine.begin() as conn:
|
||||||
conn.execute(
|
conn.execute(
|
||||||
self.dashboardClientsPasswordResetLinkTable.update().values({
|
self.dashboardClientsPasswordResetLinkTable.update().values({
|
||||||
"ExpiryDate": datetime.datetime.now()
|
"ExpiryDate": datetime.datetime.now()
|
||||||
}).where(
|
}).where(
|
||||||
db.and_(self.dashboardClientsPasswordResetLinkTable.c.ClientID == ClientID,
|
db.and_(self.dashboardClientsPasswordResetLinkTable.c.ClientID == ClientID,
|
||||||
self.dashboardClientsPasswordResetLinkTable.c.ResetToken == Token)
|
self.dashboardClientsPasswordResetLinkTable.c.ResetToken == tokenDigest)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return True
|
return True
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ class DashboardConfig:
|
|||||||
self.dbMetadata = db.MetaData()
|
self.dbMetadata = db.MetaData()
|
||||||
self.__createAPIKeyTable()
|
self.__createAPIKeyTable()
|
||||||
self.DashboardAPIKeys = self.__getAPIKeys()
|
self.DashboardAPIKeys = self.__getAPIKeys()
|
||||||
self.APIAccessed = False
|
|
||||||
self.SetConfig("Server", "version", DashboardConfig.DashboardVersion)
|
self.SetConfig("Server", "version", DashboardConfig.DashboardVersion)
|
||||||
|
|
||||||
def EnsureDatabaseIntegrity(self, wireguardConfigurations):
|
def EnsureDatabaseIntegrity(self, wireguardConfigurations):
|
||||||
@@ -145,7 +144,9 @@ class DashboardConfig:
|
|||||||
|
|
||||||
for col_name, col_type in expected_columns.items():
|
for col_name, col_type in expected_columns.items():
|
||||||
if col_name not in existing_columns:
|
if col_name not in existing_columns:
|
||||||
type_str = col_type().compile(dialect=self.engine.dialect)
|
type_str = (
|
||||||
|
col_type if isinstance(col_type, db.types.TypeEngine) else col_type()
|
||||||
|
).compile(dialect=self.engine.dialect)
|
||||||
current_app.logger.info(f"Adding missing column '{col_name}' to table '{table_name}'")
|
current_app.logger.info(f"Adding missing column '{col_name}' to table '{table_name}'")
|
||||||
preparer = self.engine.dialect.identifier_preparer
|
preparer = self.engine.dialect.identifier_preparer
|
||||||
quoted_table = preparer.quote_identifier(table_name)
|
quoted_table = preparer.quote_identifier(table_name)
|
||||||
|
|||||||
+12
-3
@@ -7,12 +7,12 @@ import json
|
|||||||
import os, subprocess, uuid, random, re
|
import os, subprocess, uuid, random, re
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
||||||
import jinja2
|
|
||||||
import sqlalchemy as db
|
import sqlalchemy as db
|
||||||
from .PeerJob import PeerJob
|
from .PeerJob import PeerJob
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
from .PeerShareLink import PeerShareLink
|
from .PeerShareLink import PeerShareLink
|
||||||
from .Utilities import GenerateWireguardPublicKey, CheckAddress, ValidateDNSAddress
|
from .Utilities import GenerateWireguardPublicKey, CheckAddress, ValidateDNSAddress, \
|
||||||
|
RenderSandboxedTemplate
|
||||||
|
|
||||||
|
|
||||||
class Peer:
|
class Peer:
|
||||||
@@ -207,6 +207,15 @@ class Peer:
|
|||||||
"I3": self.configuration.I3,
|
"I3": self.configuration.I3,
|
||||||
"I4": self.configuration.I4,
|
"I4": self.configuration.I4,
|
||||||
"I5": self.configuration.I5,
|
"I5": self.configuration.I5,
|
||||||
|
"HeaderProtectionKey": self.configuration.HeaderProtectionKey,
|
||||||
|
"ContentPaddingAddition": self.configuration.ContentPaddingAddition,
|
||||||
|
"RekeyAfterTime": self.configuration.RekeyAfterTime,
|
||||||
|
"RekeyTimeout": self.configuration.RekeyTimeout,
|
||||||
|
"RejectAfterTime": self.configuration.RejectAfterTime,
|
||||||
|
"KeepaliveTimeout": self.configuration.KeepaliveTimeout,
|
||||||
|
"MaxHandshakeAttempts": self.configuration.MaxHandshakeAttempts,
|
||||||
|
"RandomTrailers": self.configuration.RandomTrailers,
|
||||||
|
"DisableCookies": self.configuration.DisableCookies,
|
||||||
"J1": self.configuration.J1,
|
"J1": self.configuration.J1,
|
||||||
"J2": self.configuration.J2,
|
"J2": self.configuration.J2,
|
||||||
"J3": self.configuration.J3,
|
"J3": self.configuration.J3,
|
||||||
@@ -237,7 +246,7 @@ class Peer:
|
|||||||
if val is not None and ((type(val) is str and len(val) > 0) or (type(val) is int and val > 0)):
|
if val is not None and ((type(val) is str and len(val) > 0) or (type(val) is int and val > 0)):
|
||||||
final["file"] += f"{key} = {val}\n"
|
final["file"] += f"{key} = {val}\n"
|
||||||
|
|
||||||
final["file"] = jinja2.Template(final["file"]).render(configuration=self.configuration)
|
final["file"] = RenderSandboxedTemplate(final["file"], configuration=self.configuration)
|
||||||
|
|
||||||
|
|
||||||
if self.configuration.Protocol == "awg":
|
if self.configuration.Protocol == "awg":
|
||||||
|
|||||||
@@ -1,6 +1,21 @@
|
|||||||
import re, ipaddress
|
import re, ipaddress
|
||||||
import subprocess
|
import subprocess
|
||||||
import sqlalchemy
|
import sqlalchemy
|
||||||
|
from jinja2.sandbox import SandboxedEnvironment
|
||||||
|
|
||||||
|
sandboxEnvironment = SandboxedEnvironment()
|
||||||
|
|
||||||
|
def RenderSandboxedTemplate(source: str, **context) -> str:
|
||||||
|
"""
|
||||||
|
Render a Jinja2 template within a sandboxed environment. Template sources built with
|
||||||
|
user-provided content (e.g. email body, peer configuration file) must go through this
|
||||||
|
function, so unsafe attribute access (such as __globals__) is denied and template
|
||||||
|
injection cannot escalate into arbitrary code execution.
|
||||||
|
@param source: Template source string, may contain user-provided content
|
||||||
|
@param context: Variables passed into the template
|
||||||
|
@return: Rendered template
|
||||||
|
"""
|
||||||
|
return sandboxEnvironment.from_string(source).render(**context)
|
||||||
|
|
||||||
def RegexMatch(regex, text) -> bool:
|
def RegexMatch(regex, text) -> bool:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ WireGuard Configuration
|
|||||||
"""
|
"""
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
import jinja2
|
|
||||||
import sqlalchemy, random, shutil, configparser, ipaddress, os, subprocess, time, re, uuid, psutil, traceback
|
import sqlalchemy, random, shutil, configparser, ipaddress, os, subprocess, time, re, uuid, psutil, traceback
|
||||||
from zipfile import ZipFile
|
from zipfile import ZipFile
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
@@ -21,7 +20,8 @@ from .Utilities import StringToBoolean, \
|
|||||||
ValidateDNSAddress, \
|
ValidateDNSAddress, \
|
||||||
ValidateEndpointAllowedIPs, \
|
ValidateEndpointAllowedIPs, \
|
||||||
CheckAddress, \
|
CheckAddress, \
|
||||||
CheckPeerKey
|
CheckPeerKey, \
|
||||||
|
RenderSandboxedTemplate
|
||||||
from .WireguardConfigurationInfo import WireguardConfigurationInfo, PeerGroupsClass
|
from .WireguardConfigurationInfo import WireguardConfigurationInfo, PeerGroupsClass
|
||||||
from .DashboardWebHooks import DashboardWebHooks
|
from .DashboardWebHooks import DashboardWebHooks
|
||||||
|
|
||||||
@@ -126,6 +126,15 @@ class WireguardConfiguration:
|
|||||||
"I3": self.I3,
|
"I3": self.I3,
|
||||||
"I4": self.I4,
|
"I4": self.I4,
|
||||||
"I5": self.I5,
|
"I5": self.I5,
|
||||||
|
"HeaderProtectionKey": self.HeaderProtectionKey,
|
||||||
|
"ContentPaddingAddition": self.ContentPaddingAddition,
|
||||||
|
"RekeyAfterTime": self.RekeyAfterTime,
|
||||||
|
"RekeyTimeout": self.RekeyTimeout,
|
||||||
|
"RejectAfterTime": self.RejectAfterTime,
|
||||||
|
"KeepaliveTimeout": self.KeepaliveTimeout,
|
||||||
|
"MaxHandshakeAttempts": self.MaxHandshakeAttempts,
|
||||||
|
"RandomTrailers": self.RandomTrailers,
|
||||||
|
"DisableCookies": self.DisableCookies,
|
||||||
"J1": self.J1,
|
"J1": self.J1,
|
||||||
"J2": self.J2,
|
"J2": self.J2,
|
||||||
"J3": self.J3,
|
"J3": self.J3,
|
||||||
@@ -240,7 +249,7 @@ class WireguardConfiguration:
|
|||||||
self.Status = self.getStatus()
|
self.Status = self.getStatus()
|
||||||
|
|
||||||
def __dropDatabase(self):
|
def __dropDatabase(self):
|
||||||
existingTables = [self.Name, f'{self.Name}_restrict_access', f'{self.Name}_transfer', f'{self.Name}_deleted']
|
existingTables = [self.Name, f'{self.Name}_restrict_access', f'{self.Name}_transfer', f'{self.Name}_deleted', f'{self.Name}_history_endpoint']
|
||||||
try:
|
try:
|
||||||
with self.engine.begin() as conn:
|
with self.engine.begin() as conn:
|
||||||
for name in existingTables:
|
for name in existingTables:
|
||||||
@@ -315,7 +324,8 @@ class WireguardConfiguration:
|
|||||||
f'{dbName}_history_endpoint', self.metadata,
|
f'{dbName}_history_endpoint', self.metadata,
|
||||||
sqlalchemy.Column('id', sqlalchemy.String(255), nullable=False),
|
sqlalchemy.Column('id', sqlalchemy.String(255), nullable=False),
|
||||||
sqlalchemy.Column('endpoint', sqlalchemy.String(255), nullable=False),
|
sqlalchemy.Column('endpoint', sqlalchemy.String(255), nullable=False),
|
||||||
sqlalchemy.Column('time', time_col_type)
|
sqlalchemy.Column('time', time_col_type),
|
||||||
|
extend_existing=True
|
||||||
)
|
)
|
||||||
|
|
||||||
self.infoTable = sqlalchemy.Table(
|
self.infoTable = sqlalchemy.Table(
|
||||||
@@ -949,8 +959,8 @@ class WireguardConfiguration:
|
|||||||
files.sort(key=lambda x: x[1], reverse=True)
|
files.sort(key=lambda x: x[1], reverse=True)
|
||||||
|
|
||||||
for f, ct in files:
|
for f, ct in files:
|
||||||
if RegexMatch(rf"^({self.Name})_(\d+)\\.(conf)$", f):
|
if RegexMatch(rf"^({self.Name})_(\d+)\.(conf)$", f):
|
||||||
s = re.search(rf"^({self.Name})_(\d+)\\.(conf)$", f)
|
s = re.search(rf"^({self.Name})_(\d+)\.(conf)$", f)
|
||||||
date = s.group(2)
|
date = s.group(2)
|
||||||
d = {
|
d = {
|
||||||
"filename": f,
|
"filename": f,
|
||||||
@@ -991,7 +1001,11 @@ class WireguardConfiguration:
|
|||||||
if backupFileName not in backups:
|
if backupFileName not in backups:
|
||||||
return False
|
return False
|
||||||
try:
|
try:
|
||||||
os.remove(os.path.join(self.__getProtocolPath(), 'WGDashboard_Backup', backupFileName))
|
backupPath = os.path.join(self.__getProtocolPath(), 'WGDashboard_Backup')
|
||||||
|
for ext in ('.conf', '.sql'):
|
||||||
|
f = os.path.join(backupPath, os.path.splitext(backupFileName)[0] + ext)
|
||||||
|
if os.path.exists(f):
|
||||||
|
os.remove(f)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
@@ -1024,7 +1038,7 @@ class WireguardConfiguration:
|
|||||||
allowEdit = ["Address", "PreUp", "PostUp", "PreDown", "PostDown", "ListenPort", "Table"]
|
allowEdit = ["Address", "PreUp", "PostUp", "PreDown", "PostDown", "ListenPort", "Table"]
|
||||||
awgKeys = []
|
awgKeys = []
|
||||||
if self.Protocol == 'awg':
|
if self.Protocol == 'awg':
|
||||||
awgKeys = ["Jc", "Jmin", "Jmax", "S1", "S2", "S3", "S4", "H1", "H2", "H3", "H4", "I1", "I2", "I3", "I4", "I5", "J1", "J2", "J3", "Itime"]
|
awgKeys = ["Jc", "Jmin", "Jmax", "S1", "S2", "S3", "S4", "H1", "H2", "H3", "H4", "I1", "I2", "I3", "I4", "I5", "HeaderProtectionKey", "ContentPaddingAddition", "RekeyAfterTime", "RekeyTimeout", "RejectAfterTime", "KeepaliveTimeout", "MaxHandshakeAttempts", "RandomTrailers", "DisableCookies", "J1", "J2", "J3", "Itime"]
|
||||||
allowEdit += awgKeys
|
allowEdit += awgKeys
|
||||||
start = original.index("[Interface]")
|
start = original.index("[Interface]")
|
||||||
try:
|
try:
|
||||||
@@ -1092,6 +1106,7 @@ class WireguardConfiguration:
|
|||||||
doRenameStatement("_restrict_access")
|
doRenameStatement("_restrict_access")
|
||||||
doRenameStatement("_deleted")
|
doRenameStatement("_deleted")
|
||||||
doRenameStatement("_transfer")
|
doRenameStatement("_transfer")
|
||||||
|
doRenameStatement("_history_endpoint")
|
||||||
conn.execute(
|
conn.execute(
|
||||||
self.infoTable.update()
|
self.infoTable.update()
|
||||||
.where(self.infoTable.c.ID == self.Name)
|
.where(self.infoTable.c.ID == self.Name)
|
||||||
@@ -1242,7 +1257,7 @@ class WireguardConfiguration:
|
|||||||
elif key == "OverridePeerSettings":
|
elif key == "OverridePeerSettings":
|
||||||
for (key, val) in value.items():
|
for (key, val) in value.items():
|
||||||
try:
|
try:
|
||||||
status, msg = self.__validateOverridePeerSettings(key, jinja2.Template(val).render(configuration=self.toJson()))
|
status, msg = self.__validateOverridePeerSettings(key, RenderSandboxedTemplate(val, configuration=self.toJson()))
|
||||||
if not status:
|
if not status:
|
||||||
return False, msg, key
|
return False, msg, key
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ tcconfig==0.30.1
|
|||||||
sqlalchemy==2.1.6
|
sqlalchemy==2.1.6
|
||||||
sqlalchemy_utils==0.43.0
|
sqlalchemy_utils==0.43.0
|
||||||
psycopg[binary]==3.3.6
|
psycopg[binary]==3.3.6
|
||||||
PyMySQL==1.2.0
|
PyMySQL==1.2.3
|
||||||
tzlocal==5.4.5
|
tzlocal==5.4.5
|
||||||
python-jose==3.5.0
|
python-jose[cryptography]==3.5.0
|
||||||
pydantic==2.14.1
|
pydantic==2.14.2
|
||||||
|
|||||||
Generated
+1389
-2157
File diff suppressed because it is too large
Load Diff
+13
-13
@@ -12,36 +12,36 @@
|
|||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@volar/language-server": "2.4.28",
|
"@volar/language-server": "2.4.30",
|
||||||
"@vue/language-server": "3.2.7",
|
"@vue/language-server": "3.3.14",
|
||||||
"@vuepic/vue-datepicker": "^14.0.0",
|
"@vuepic/vue-datepicker": "^14.0.0",
|
||||||
"@vueuse/core": "^15.0.0",
|
"@vueuse/core": "^15.0.0",
|
||||||
"@vueuse/shared": "^14.3.0",
|
"@vueuse/shared": "^15.0.0",
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"bootstrap": "^5.3.2",
|
"bootstrap": "^5.3.2",
|
||||||
"bootstrap-icons": "^1.11.3",
|
"bootstrap-icons": "^1.13.2",
|
||||||
"cidr-tools": "^12.0.2",
|
"cidr-tools": "^13.0.4",
|
||||||
"css-color-converter": "^2.0.0",
|
"css-color-converter": "^2.0.0",
|
||||||
"dayjs": "^1.11.19",
|
"dayjs": "^1.11.23",
|
||||||
"electron-builder": "^26.7.0",
|
"electron-builder": "^26.18.0",
|
||||||
"fuse.js": "^7.5.0",
|
"fuse.js": "^7.5.0",
|
||||||
"i": "^0.3.7",
|
"i": "^0.3.7",
|
||||||
"is-cidr": "^7.0.3",
|
"is-cidr": "^7.0.3",
|
||||||
"npm": "^11.13.0",
|
"npm": "^12.2.1",
|
||||||
"ol": "^10.9.0",
|
"ol": "^10.11.0",
|
||||||
"pinia": "^3.0.4",
|
"pinia": "^4.1.0",
|
||||||
"pinia-plugin-persistedstate": "^4.7.1",
|
"pinia-plugin-persistedstate": "^4.7.1",
|
||||||
"qrcode": "^1.5.3",
|
"qrcode": "^1.5.3",
|
||||||
"qrcodejs": "^1.0.0",
|
"qrcodejs": "^1.0.0",
|
||||||
"simple-code-editor": "^2.0.9",
|
"simple-code-editor": "^2.0.9",
|
||||||
"uuid": "^14.0.0",
|
"uuid": "^14.0.3",
|
||||||
"vue": "^3.5.32",
|
"vue": "^3.5.32",
|
||||||
"vue-chartjs": "^5.3.3",
|
"vue-chartjs": "^5.3.4",
|
||||||
"vue-router": "^5.4.0"
|
"vue-router": "^5.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vitejs/plugin-vue": "^6.0.10",
|
"@vitejs/plugin-vue": "^6.0.10",
|
||||||
"vite": "^8.0.16"
|
"vite": "^8.3.5"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"tar": "^7.5.6"
|
"tar": "^7.5.6"
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ const deleteConfigurationModal = ref(false)
|
|||||||
v-model="data[key]"
|
v-model="data[key]"
|
||||||
:id="'configuration_' + key">
|
:id="'configuration_' + key">
|
||||||
</div>
|
</div>
|
||||||
<div v-for="key in ['Jc', 'Jmin', 'Jmax', 'S1', 'S2', 'S3', 'S4', 'H1', 'H2', 'H3', 'H4', 'I1', 'I2', 'I3', 'I4', 'I5']"
|
<div v-for="key in ['Jc', 'Jmin', 'Jmax', 'S1', 'S2', 'S3', 'S4', 'H1', 'H2', 'H3', 'H4', 'I1', 'I2', 'I3', 'I4', 'I5', 'HeaderProtectionKey', 'ContentPaddingAddition', 'RekeyAfterTime', 'RekeyTimeout', 'RejectAfterTime', 'KeepaliveTimeout', 'MaxHandshakeAttempts', 'RandomTrailers', 'DisableCookies']"
|
||||||
v-if="configurationInfo.Protocol === 'awg'">
|
v-if="configurationInfo.Protocol === 'awg'">
|
||||||
<label :for="'configuration_' + key" class="form-label">
|
<label :for="'configuration_' + key" class="form-label">
|
||||||
<small class="text-muted">
|
<small class="text-muted">
|
||||||
|
|||||||
@@ -101,6 +101,14 @@ export default {
|
|||||||
<samp>{{Peer.allowed_ip}}</samp>
|
<samp>{{Peer.allowed_ip}}</samp>
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
|
<div :class="{'d-flex gap-2 align-items-center' : dashboardStore.Configuration.Server.dashboard_peer_list_display === 'list'}">
|
||||||
|
<small class="text-muted">
|
||||||
|
<LocaleText t="Endpoint"></LocaleText>
|
||||||
|
</small>
|
||||||
|
<small class="d-block">
|
||||||
|
<samp>{{Peer.endpoint && Peer.endpoint !== 'N/A' ? Peer.endpoint : '(none)'}}</samp>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
<div class="d-flex align-items-center gap-1"
|
<div class="d-flex align-items-center gap-1"
|
||||||
:class="{'ms-auto': dashboardStore.Configuration.Server.dashboard_peer_list_display === 'list'}"
|
:class="{'ms-auto': dashboardStore.Configuration.Server.dashboard_peer_list_display === 'list'}"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -88,6 +88,16 @@ defineEmits(['close'])
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="word-break: break-all" class="col-12 col-lg-6">
|
||||||
|
<div class="card rounded-3 bg-transparent h-100">
|
||||||
|
<div class="card-body py-2 d-flex flex-column justify-content-center">
|
||||||
|
<p class="mb-0 text-muted"><small>
|
||||||
|
<LocaleText t="Endpoint"></LocaleText>
|
||||||
|
</small></p>
|
||||||
|
<samp>{{selectedPeer.endpoint && selectedPeer.endpoint !== 'N/A' ? selectedPeer.endpoint : '(none)'}}</samp>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div style="word-break: break-all" class="col-12 col-lg-6">
|
<div style="word-break: break-all" class="col-12 col-lg-6">
|
||||||
<div class="card rounded-3 bg-transparent h-100">
|
<div class="card rounded-3 bg-transparent h-100">
|
||||||
<div class="card-body py-2 d-flex flex-column justify-content-center">
|
<div class="card-body py-2 d-flex flex-column justify-content-center">
|
||||||
|
|||||||
@@ -191,6 +191,12 @@ const searchPeers = computed(() => {
|
|||||||
wireguardConfigurationStore.Filter.ShowAllPeersWhenHiddenTags || (!wireguardConfigurationStore.Filter.ShowAllPeersWhenHiddenTags && taggedPeers.value.includes(x.id))
|
wireguardConfigurationStore.Filter.ShowAllPeersWhenHiddenTags || (!wireguardConfigurationStore.Filter.ShowAllPeersWhenHiddenTags && taggedPeers.value.includes(x.id))
|
||||||
));
|
));
|
||||||
|
|
||||||
|
if (dashboardStore.Configuration.Server.dashboard_sort === "traffic"){
|
||||||
|
return result.sort((a, b) => {
|
||||||
|
return (b.total_data + b.cumu_data) - (a.total_data + a.cumu_data)
|
||||||
|
}).slice(0, showPeersCount.value);
|
||||||
|
}
|
||||||
|
|
||||||
if (dashboardStore.Configuration.Server.dashboard_sort === "restricted"){
|
if (dashboardStore.Configuration.Server.dashboard_sort === "restricted"){
|
||||||
return result.sort((a, b) => {
|
return result.sort((a, b) => {
|
||||||
if ( a[dashboardStore.Configuration.Server.dashboard_sort]
|
if ( a[dashboardStore.Configuration.Server.dashboard_sort]
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ export default {
|
|||||||
status: GetLocale("Status"),
|
status: GetLocale("Status"),
|
||||||
name: GetLocale("Name"),
|
name: GetLocale("Name"),
|
||||||
allowed_ip: GetLocale("Allowed IPs"),
|
allowed_ip: GetLocale("Allowed IPs"),
|
||||||
|
traffic: GetLocale("Total Usage"),
|
||||||
restricted: GetLocale("Restricted")
|
restricted: GetLocale("Restricted")
|
||||||
},
|
},
|
||||||
interval: {
|
interval: {
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
|
type="button"
|
||||||
:disabled="!this.passwordValid"
|
:disabled="!this.passwordValid"
|
||||||
class="ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm" @click="this.useValidation()">
|
class="ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm" @click="this.useValidation()">
|
||||||
<i class="bi bi-save2-fill me-2"></i>
|
<i class="bi bi-save2-fill me-2"></i>
|
||||||
|
|||||||
@@ -49,11 +49,20 @@ export default {
|
|||||||
H2: 0,
|
H2: 0,
|
||||||
H3: 0,
|
H3: 0,
|
||||||
H4: 0,
|
H4: 0,
|
||||||
I1: "0",
|
I1: "",
|
||||||
I2: "0",
|
I2: "",
|
||||||
I3: "0",
|
I3: "",
|
||||||
I4: "0",
|
I4: "",
|
||||||
I5: "0"
|
I5: "",
|
||||||
|
HeaderProtectionKey: "",
|
||||||
|
ContentPaddingAddition: "0-64",
|
||||||
|
RekeyAfterTime: "100-140",
|
||||||
|
RekeyTimeout: "4-7",
|
||||||
|
RejectAfterTime: "160-200",
|
||||||
|
KeepaliveTimeout: "8-12",
|
||||||
|
MaxHandshakeAttempts: "14-20",
|
||||||
|
RandomTrailers: "on",
|
||||||
|
DisableCookies: "on"
|
||||||
},
|
},
|
||||||
numberOfAvailableIPs: "0",
|
numberOfAvailableIPs: "0",
|
||||||
error: false,
|
error: false,
|
||||||
@@ -72,9 +81,15 @@ export default {
|
|||||||
this.newConfiguration[key] = this.rand(1, 2**31);
|
this.newConfiguration[key] = this.rand(1, 2**31);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Initialize I1 to I5 as "0"
|
// Initialize HeaderProtectionKey
|
||||||
['I1', 'I2', 'I3', 'I4', 'I5'].forEach(key => {
|
let headerProtectionKey = new Uint8Array(32);
|
||||||
this.newConfiguration[key] = "0";
|
window.crypto.getRandomValues(headerProtectionKey);
|
||||||
|
this.newConfiguration.HeaderProtectionKey = btoa(String.fromCharCode(...headerProtectionKey));
|
||||||
|
|
||||||
|
// S1-S4 are recommended be the same to work with RandomTrailers and must 12 or more to work with HeaderProtectionKey
|
||||||
|
let constantS = 12 + this.rand(1, 2**5);
|
||||||
|
['S1', 'S2', 'S3', 'S4'].forEach(key => {
|
||||||
|
this.newConfiguration[key] = constantS;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -388,7 +403,7 @@ export default {
|
|||||||
|
|
||||||
<div class="card rounded-3"
|
<div class="card rounded-3"
|
||||||
v-if="this.newConfiguration.Protocol === 'awg'"
|
v-if="this.newConfiguration.Protocol === 'awg'"
|
||||||
v-for="key in ['Jc', 'Jmin', 'Jmax', 'S1', 'S2', 'S3', 'S4', 'H1', 'H2', 'H3', 'H4', 'I1', 'I2', 'I3', 'I4', 'I5']">
|
v-for="key in ['Jc', 'Jmin', 'Jmax', 'S1', 'S2', 'S3', 'S4', 'H1', 'H2', 'H3', 'H4', 'I1', 'I2', 'I3', 'I4', 'I5', 'HeaderProtectionKey', 'ContentPaddingAddition', 'RekeyAfterTime', 'RekeyTimeout', 'RejectAfterTime', 'KeepaliveTimeout', 'MaxHandshakeAttempts', 'RandomTrailers', 'DisableCookies']">
|
||||||
<div class="card-header">{{ key }}</div>
|
<div class="card-header">{{ key }}</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<input type="text"
|
<input type="text"
|
||||||
|
|||||||
Generated
+256
-351
@@ -8,16 +8,16 @@
|
|||||||
"name": "client",
|
"name": "client",
|
||||||
"version": "v1.0.1",
|
"version": "v1.0.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.18.0",
|
"axios": "^1.21.0",
|
||||||
"bootstrap": "^5.3.8",
|
"bootstrap": "^5.3.8",
|
||||||
"bootstrap-icons": "^1.13.1",
|
"bootstrap-icons": "^1.13.2",
|
||||||
"dayjs": "^1.11.21",
|
"dayjs": "^1.11.23",
|
||||||
"oidc-client-ts": "^3.5.0",
|
"oidc-client-ts": "^3.5.0",
|
||||||
"pinia": "^3.0.4",
|
"pinia": "^4.1.0",
|
||||||
"qrcode": "^1.5.4",
|
"qrcode": "^1.5.4",
|
||||||
"uuid": "^14.0.3",
|
"uuid": "^14.0.3",
|
||||||
"vue": "^3.5.44",
|
"vue": "^3.5.44",
|
||||||
"vue-router": "^5.1.0"
|
"vue-router": "^5.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vitejs/plugin-vue": "^6.0.10",
|
"@vitejs/plugin-vue": "^6.0.10",
|
||||||
@@ -510,9 +510,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/sourcemap-codec": {
|
"node_modules/@jridgewell/sourcemap-codec": {
|
||||||
"version": "1.5.5",
|
"version": "1.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz",
|
||||||
"integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
|
"integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/trace-mapping": {
|
"node_modules/@jridgewell/trace-mapping": {
|
||||||
@@ -818,10 +818,10 @@
|
|||||||
"devOptional": true,
|
"devOptional": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/jsesc": {
|
"node_modules/@types/estree": {
|
||||||
"version": "2.5.1",
|
"version": "1.0.9",
|
||||||
"resolved": "https://registry.npmjs.org/@types/jsesc/-/jsesc-2.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",
|
||||||
"integrity": "sha512-9VN+6yxLOPLOav+7PwjZbxiID2bVaeq0ED4qSQmdQTdjnXJSaCVKTR58t15oqH1H5t8Ng2ZX1SabJVoN9Q34bw==",
|
"integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@vitejs/plugin-vue": {
|
"node_modules/@vitejs/plugin-vue": {
|
||||||
@@ -842,9 +842,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vue-macros/common": {
|
"node_modules/@vue-macros/common": {
|
||||||
"version": "3.1.2",
|
"version": "3.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@vue-macros/common/-/common-3.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/@vue-macros/common/-/common-3.1.4.tgz",
|
||||||
"integrity": "sha512-h9t4ArDdniO9ekYHAD95t9AZcAbb19lEGK+26iAjUODOIJKmObDNBSe4+6ELQAA3vtYiFPPBtHh7+cQCKi3Dng==",
|
"integrity": "sha512-/5Fv+6DgIcM9ajY05ZmKBv+LMX1M9A0X+IUwDRVdt67ciw8OV9bvG2r34p3RiEadlsQybjhKPRKNXDC8Bp23cw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/compiler-sfc": "^3.5.22",
|
"@vue/compiler-sfc": "^3.5.22",
|
||||||
@@ -972,12 +972,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vue/devtools-api": {
|
"node_modules/@vue/devtools-api": {
|
||||||
"version": "7.7.9",
|
"version": "8.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.7.9.tgz",
|
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-8.2.1.tgz",
|
||||||
"integrity": "sha512-kIE8wvwlcZ6TJTbNeU2HQNtaxLx3a84aotTITUuL/4bzfPxzajGBOoqjMhwZJ8L9qFYDU/lAYMEEm11dnZOD6g==",
|
"integrity": "sha512-6u4vXBlIBAC1wMplIZgpyPn7uh/s4Bf6F5bMzvLv+EdJ0aHs/+4B7Ygv864EStQSjRbsRzTko/kUG1A1IejQ3A==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/devtools-kit": "^7.7.9"
|
"@vue/devtools-kit": "^8.2.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vue/devtools-core": {
|
"node_modules/@vue/devtools-core": {
|
||||||
@@ -994,11 +994,10 @@
|
|||||||
"vue": "^3.0.0"
|
"vue": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vue/devtools-core/node_modules/@vue/devtools-kit": {
|
"node_modules/@vue/devtools-kit": {
|
||||||
"version": "8.2.1",
|
"version": "8.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-8.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-8.2.1.tgz",
|
||||||
"integrity": "sha512-FIGIuq3AWReEpbAHY/cRGeHDfI0qOb8OCQ3YjbEAX04uaxIDbGc9rhkbVcG7rnfHPXE3RsU5KrWOu9V/okd8AQ==",
|
"integrity": "sha512-FIGIuq3AWReEpbAHY/cRGeHDfI0qOb8OCQ3YjbEAX04uaxIDbGc9rhkbVcG7rnfHPXE3RsU5KrWOu9V/okd8AQ==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/devtools-shared": "^8.2.1",
|
"@vue/devtools-shared": "^8.2.1",
|
||||||
@@ -1007,44 +1006,12 @@
|
|||||||
"perfect-debounce": "^2.0.0"
|
"perfect-debounce": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vue/devtools-core/node_modules/@vue/devtools-shared": {
|
"node_modules/@vue/devtools-shared": {
|
||||||
"version": "8.2.1",
|
"version": "8.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-8.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-8.2.1.tgz",
|
||||||
"integrity": "sha512-Fkac7lUdGReh6pVOi3AYPRGe82LQqRmAfThW7RRligOAP0ZA/Z1z9XLHDM9dv34pV2HRc79DK8uKPeG2fLnA/g==",
|
"integrity": "sha512-Fkac7lUdGReh6pVOi3AYPRGe82LQqRmAfThW7RRligOAP0ZA/Z1z9XLHDM9dv34pV2HRc79DK8uKPeG2fLnA/g==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@vue/devtools-core/node_modules/perfect-debounce": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@vue/devtools-kit": {
|
|
||||||
"version": "7.7.9",
|
|
||||||
"resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.7.9.tgz",
|
|
||||||
"integrity": "sha512-PyQ6odHSgiDVd4hnTP+aDk2X4gl2HmLDfiyEnn3/oV+ckFDuswRs4IbBT7vacMuGdwY/XemxBoh302ctbsptuA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@vue/devtools-shared": "^7.7.9",
|
|
||||||
"birpc": "^2.3.0",
|
|
||||||
"hookable": "^5.5.3",
|
|
||||||
"mitt": "^3.0.1",
|
|
||||||
"perfect-debounce": "^1.0.0",
|
|
||||||
"speakingurl": "^14.0.1",
|
|
||||||
"superjson": "^2.2.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@vue/devtools-shared": {
|
|
||||||
"version": "7.7.9",
|
|
||||||
"resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.7.9.tgz",
|
|
||||||
"integrity": "sha512-iWAb0v2WYf0QWmxCGy0seZNDPdO3Sp5+u78ORnyeonS6MT4PC7VPrryX2BpMJrwlDeaZ6BD4vP4XKjK0SZqaeA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"rfdc": "^1.4.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@vue/reactivity": {
|
"node_modules/@vue/reactivity": {
|
||||||
"version": "3.5.44",
|
"version": "3.5.44",
|
||||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.44.tgz",
|
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.44.tgz",
|
||||||
@@ -1094,9 +1061,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/acorn": {
|
"node_modules/acorn": {
|
||||||
"version": "8.16.0",
|
"version": "8.19.0",
|
||||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz",
|
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz",
|
||||||
"integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
|
"integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bin": {
|
"bin": {
|
||||||
"acorn": "bin/acorn"
|
"acorn": "bin/acorn"
|
||||||
@@ -1168,22 +1135,94 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ast-walker-scope": {
|
"node_modules/ast-walker-scope": {
|
||||||
"version": "0.9.0",
|
"version": "0.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/ast-walker-scope/-/ast-walker-scope-0.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/ast-walker-scope/-/ast-walker-scope-0.10.0.tgz",
|
||||||
"integrity": "sha512-IJdzo2vLiElBxKzwS36VsCue/62d6IdWjnPB2v3nuPKeWGynp6FF/CYoLa5i/3jXH/z97ZDdsXz6abpgM6w07A==",
|
"integrity": "sha512-KzvoxDfXNz2Gm8KYLh47K3qcY3Zza3WKOuh2xoqa7LBu6MDKWAZLovJtU9DuAd/Er+rhQHCRn619lHS5U+qmhw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/parser": "^7.29.2",
|
"@babel/parser": "^8.0.0",
|
||||||
"@babel/types": "^7.29.0",
|
"@babel/types": "^8.0.0",
|
||||||
"ast-kit": "^2.2.0"
|
"ast-kit": "^3.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20.19.0"
|
"node": "^22.18.0 || >=24.11.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/sxzz"
|
"url": "https://github.com/sponsors/sxzz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/ast-walker-scope/node_modules/@babel/helper-string-parser": {
|
||||||
|
"version": "8.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-8.0.6.tgz",
|
||||||
|
"integrity": "sha512-+6HYEBnsDRZHJtUTAEfMQd0zMDqdFHS7C+5vAsEZqBUr3vEMWOWlHJ0Jz1gS8jJIlCvLsuA6ivmeoqzH936YcA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": "^22.18.0 || >=24.11.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ast-walker-scope/node_modules/@babel/helper-validator-identifier": {
|
||||||
|
"version": "8.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-8.0.6.tgz",
|
||||||
|
"integrity": "sha512-HYx0YmuchRxRSpnjvcNffnPS8DCauKNmnumIuHG3jnQAVewRA7kfJGwF13ayEpSZs7s4R/oBH4eppuXcAQd5JQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": "^22.18.0 || >=24.11.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ast-walker-scope/node_modules/@babel/parser": {
|
||||||
|
"version": "8.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-8.0.7.tgz",
|
||||||
|
"integrity": "sha512-UkDwEbPO1px2JQSrdh4qIgaH1JgG7GO/pFeJkpxhDxIETkT/QvGpnigXIw75ViHYPtIgKITmVUJqLjiO+JuWjA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/types": "^8.0.6"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"parser": "bin/babel-parser.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^22.18.0 || >=24.11.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ast-walker-scope/node_modules/@babel/types": {
|
||||||
|
"version": "8.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/types/-/types-8.0.6.tgz",
|
||||||
|
"integrity": "sha512-c+xgSWboV2pdwXP67BUWDVRHi2BO5Q3KwxyFVs7taVTY+fsK47/L51ZXQoV9rozHJDNHvJ4v4WEsI/IlxV2l2A==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/helper-string-parser": "^8.0.6",
|
||||||
|
"@babel/helper-validator-identifier": "^8.0.6"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^22.18.0 || >=24.11.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ast-walker-scope/node_modules/ast-kit": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ast-kit/-/ast-kit-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-8OG92q3R35qjC/4i6BLBMg8IB+fClWu/1PEwg2Z9Rn+BuNaiEgJzpzn+pxWOdHJWDCAwu2JP0wCDTozAM4QirQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/parser": "^8.0.0",
|
||||||
|
"estree-walker": "^3.0.3",
|
||||||
|
"pathe": "^2.0.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^22.18.0 || >=24.11.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sxzz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ast-walker-scope/node_modules/estree-walker": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/estree": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/asynckit": {
|
"node_modules/asynckit": {
|
||||||
"version": "0.4.0",
|
"version": "0.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||||
@@ -1191,21 +1230,21 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/axios": {
|
"node_modules/axios": {
|
||||||
"version": "1.18.0",
|
"version": "1.21.0",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.18.0.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-1.21.0.tgz",
|
||||||
"integrity": "sha512-E32NzpYKp++W7XRe52rHiXV2ehxmh3wbdgO7MHeFM+vqxLBYHzt0ElkiImtOBxtOmyp0yoC8C6uESVV84Y2/hw==",
|
"integrity": "sha512-YCzXMB53Q9PZBsh7yN7wtapit4WepwcHS2fP8QhGsBxSz5YtgYobV7GGlWlAJi+RxfU77GQTQi2DSLUma42EYA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"follow-redirects": "^1.16.0",
|
"follow-redirects": "^1.16.0",
|
||||||
"form-data": "^4.0.5",
|
"form-data": "^4.0.6",
|
||||||
"https-proxy-agent": "^5.0.1",
|
"https-proxy-agent": "^5.0.1",
|
||||||
"proxy-from-env": "^2.1.0"
|
"proxy-from-env": "^2.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/baseline-browser-mapping": {
|
"node_modules/baseline-browser-mapping": {
|
||||||
"version": "2.10.34",
|
"version": "2.11.33",
|
||||||
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.34.tgz",
|
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.33.tgz",
|
||||||
"integrity": "sha512-IMDedajPifLnHNY0X9n8hKxRTQ6/eTHwr5bDo04WnuqxyKw6LYtQywCuuqPZwhl3aBXMvQpJov42GLCwRRdQzw==",
|
"integrity": "sha512-yiVKDX+qCMRKBE084lXvq9EcwFUhKZ2nU8TK1EQQuOgPNR/lmbGxXOeDdlGUqC2Zz11Cs9rk1d/8NfgBmlkt0w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -1244,9 +1283,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/bootstrap-icons": {
|
"node_modules/bootstrap-icons": {
|
||||||
"version": "1.13.1",
|
"version": "1.13.2",
|
||||||
"resolved": "https://registry.npmmirror.com/bootstrap-icons/-/bootstrap-icons-1.13.1.tgz",
|
"resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.13.2.tgz",
|
||||||
"integrity": "sha512-ijombt4v6bv5CLeXvRWKy7CuM3TRTuPEuGaGKvTV5cz65rQSY8RQ2JcHt6b90cBBAC7s8fsf2EkQDldzCoXUjw==",
|
"integrity": "sha512-fAU1Ly3dH7hwRg+CB8EZ0Vl0fF80zgXHeUVJyfUOKzoURr+TbwISbCW5tKUoQLERaWYG2emTCybcPbD96hdD1A==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "github",
|
"type": "github",
|
||||||
@@ -1260,9 +1299,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/browserslist": {
|
"node_modules/browserslist": {
|
||||||
"version": "4.28.2",
|
"version": "4.29.4",
|
||||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz",
|
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.4.tgz",
|
||||||
"integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==",
|
"integrity": "sha512-2TcbbiwXEq+N0kD36tykpCfyyQigUXmuwNQbnPp4Xk4PX9JOqVIKjJlIDjpH7uY6tmRGoAd+apeT1p60T8wsdA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -1280,11 +1319,11 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"baseline-browser-mapping": "^2.10.12",
|
"baseline-browser-mapping": "^2.11.29",
|
||||||
"caniuse-lite": "^1.0.30001782",
|
"caniuse-lite": "^1.0.30001816",
|
||||||
"electron-to-chromium": "^1.5.328",
|
"electron-to-chromium": "^1.5.459",
|
||||||
"node-releases": "^2.0.36",
|
"node-releases": "^2.0.59",
|
||||||
"update-browserslist-db": "^1.2.3"
|
"update-browserslist-db": "^1.3.4"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"browserslist": "cli.js"
|
"browserslist": "cli.js"
|
||||||
@@ -1332,9 +1371,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001793",
|
"version": "1.0.30001819",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001793.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001819.tgz",
|
||||||
"integrity": "sha512-iwSsYWaCOoh26cV8NwNRViHlrfUvYsHDfRVcbtmw0Kg6PJIZZXwMkj1442FYLBGkeUf1juAsU3DTfxW579mrPA==",
|
"integrity": "sha512-LFUqIIAwpzsIuevnKnsR9qnStBcgzPShTX61lBwN9uFkkf8o8zLiebEjbW8AYtZiF+1YKDWfdt/pWDtMuG8Xwg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -1409,9 +1448,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/confbox": {
|
"node_modules/confbox": {
|
||||||
"version": "0.2.4",
|
"version": "0.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/confbox/-/confbox-0.3.1.tgz",
|
||||||
"integrity": "sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==",
|
"integrity": "sha512-cKUSoKa8YxFZZSmraVi7onONx3amu77ngK3kGpsYHDH7drPwCRkQE1RYMPlLRrMtnciRj274XNRxcHxnKmDSnA==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/convert-source-map": {
|
"node_modules/convert-source-map": {
|
||||||
@@ -1421,21 +1460,6 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/copy-anything": {
|
|
||||||
"version": "4.0.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-4.0.5.tgz",
|
|
||||||
"integrity": "sha512-7Vv6asjS4gMOuILabD3l739tsaxFQmC+a7pLZm02zyvs8p977bL3zEgq3yDk5rn9B0PbYgIv++jmHcuUab4RhA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"is-what": "^5.2.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/mesqueeb"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/csstype": {
|
"node_modules/csstype": {
|
||||||
"version": "3.2.3",
|
"version": "3.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
|
||||||
@@ -1443,9 +1467,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/dayjs": {
|
"node_modules/dayjs": {
|
||||||
"version": "1.11.21",
|
"version": "1.11.23",
|
||||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.21.tgz",
|
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.23.tgz",
|
||||||
"integrity": "sha512-98IT+HOahAisibz/yjKbzuOBwYcjJ7BCLPzARyHiyEBmRz4fatF+KPJszEHXsGYjUG234aH/cOjW1wwTbKUZlA==",
|
"integrity": "sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/debug": {
|
"node_modules/debug": {
|
||||||
@@ -1557,9 +1581,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.5.368",
|
"version": "1.5.464",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.368.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.464.tgz",
|
||||||
"integrity": "sha512-7RckJJK4uESJF9PxvfMWd3TGqIiieUTG4HxnKaKuIpGbcr+r2ZEB3g2gAhCP3Fqm42vJSzLfgab9eva/C4/XVw==",
|
"integrity": "sha512-nRa65aFge40viPAKxMKULIY8tcXKwKboJWNn4RoKwyWXJ6SP7BnrDGKUTzc64818jIciH0PK7LSF8QzZes19GA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
@@ -1610,9 +1634,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/es-object-atoms": {
|
"node_modules/es-object-atoms": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz",
|
||||||
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
"integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"es-errors": "^1.3.0"
|
"es-errors": "^1.3.0"
|
||||||
@@ -1653,9 +1677,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/exsolve": {
|
"node_modules/exsolve": {
|
||||||
"version": "1.0.8",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.1.3.tgz",
|
||||||
"integrity": "sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA==",
|
"integrity": "sha512-kuzL9zherLQoqDeQaS55AiiIg1kb4KYXaSusTtgZTPlvKP2gGCI82LNmBNh5RjDVUXIcmgx+/Mx7vPwRzBbhJA==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/fdir": {
|
"node_modules/fdir": {
|
||||||
@@ -1689,9 +1713,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/follow-redirects": {
|
"node_modules/follow-redirects": {
|
||||||
"version": "1.16.0",
|
"version": "1.16.2",
|
||||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz",
|
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.2.tgz",
|
||||||
"integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==",
|
"integrity": "sha512-/kVP2U8z596Ia0gwFrwyIeo74ta5aVmSeU1FfAUMAmcEP5EP7zydmag3SLiN64NaRKef3lxsq7i/g7ltJQDGow==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "individual",
|
"type": "individual",
|
||||||
@@ -1709,16 +1733,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/form-data": {
|
"node_modules/form-data": {
|
||||||
"version": "4.0.5",
|
"version": "4.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz",
|
||||||
"integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
|
"integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"asynckit": "^0.4.0",
|
"asynckit": "^0.4.0",
|
||||||
"combined-stream": "^1.0.8",
|
"combined-stream": "^1.0.8",
|
||||||
"es-set-tostringtag": "^2.1.0",
|
"es-set-tostringtag": "^2.1.0",
|
||||||
"hasown": "^2.0.2",
|
"hasown": "^2.0.4",
|
||||||
"mime-types": "^2.1.12"
|
"mime-types": "^2.1.35"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
@@ -1843,9 +1867,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/hasown": {
|
"node_modules/hasown": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
|
||||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
"integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"function-bind": "^1.1.2"
|
"function-bind": "^1.1.2"
|
||||||
@@ -1917,18 +1941,6 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/is-what": {
|
|
||||||
"version": "5.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-what/-/is-what-5.5.0.tgz",
|
|
||||||
"integrity": "sha512-oG7cgbmg5kLYae2N5IVd3jm2s+vldjxJzK1pcu9LfpGuQ93MQSzo0okvRna+7y5ifrD+20FE8FvjusyGaz14fw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/mesqueeb"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/is-wsl": {
|
"node_modules/is-wsl": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz",
|
||||||
@@ -1956,6 +1968,7 @@
|
|||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
|
||||||
"integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
|
"integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bin": {
|
"bin": {
|
||||||
"jsesc": "bin/jsesc"
|
"jsesc": "bin/jsesc"
|
||||||
@@ -1968,6 +1981,7 @@
|
|||||||
"version": "2.2.3",
|
"version": "2.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
||||||
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bin": {
|
"bin": {
|
||||||
"json5": "lib/cli.js"
|
"json5": "lib/cli.js"
|
||||||
@@ -2347,12 +2361,6 @@
|
|||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/mitt": {
|
|
||||||
"version": "3.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz",
|
|
||||||
"integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/mlly": {
|
"node_modules/mlly": {
|
||||||
"version": "1.8.2",
|
"version": "1.8.2",
|
||||||
"resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.2.tgz",
|
"resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.2.tgz",
|
||||||
@@ -2423,15 +2431,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/node-releases": {
|
"node_modules/node-releases": {
|
||||||
"version": "2.0.47",
|
"version": "2.0.60",
|
||||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.47.tgz",
|
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.60.tgz",
|
||||||
"integrity": "sha512-Uzmd6LXpouKo8EUK68IjH4+E01w/hXyV3R3g/geCJo+rXLNfh1xucB+LOzYEOQPSiUK3h/xZf0cQGcSsmyL2Og==",
|
"integrity": "sha512-OmO8+GM1JUZqXET720VrJCwkjUCXmCMQm0Z3UDDRbfNLHS4NEAvY60j5jiFv0tkKw2PNNlqOLhahVmwJIOLDIQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/nostics": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/nostics/-/nostics-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-wzRsrJwNlFbqIRQt8aCeL2WE8USip/uuvGSOZV1D02CxX8ABTMbw8IywKjH7yWHETMXbWJI4OBpihg9rmz2Vyg==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/ohash": {
|
"node_modules/ohash": {
|
||||||
"version": "2.0.11",
|
"version": "2.0.11",
|
||||||
"resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz",
|
"resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz",
|
||||||
@@ -2522,9 +2536,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/perfect-debounce": {
|
"node_modules/perfect-debounce": {
|
||||||
"version": "1.0.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-2.1.0.tgz",
|
||||||
"integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==",
|
"integrity": "sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/picocolors": {
|
"node_modules/picocolors": {
|
||||||
@@ -2546,34 +2560,38 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/pinia": {
|
"node_modules/pinia": {
|
||||||
"version": "3.0.4",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/pinia/-/pinia-3.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/pinia/-/pinia-4.1.0.tgz",
|
||||||
"integrity": "sha512-l7pqLUFTI/+ESXn6k3nu30ZIzW5E2WZF/LaHJEpoq6ElcLD+wduZoB2kBN19du6K/4FDpPMazY2wJr+IndBtQw==",
|
"integrity": "sha512-+5/HMuVjYQfKlCD5xQ7zfXn1xUzYFEa7pd0DQK5SaMfZCaFRTHlaH/c02N1FoGOdlzSiwf5EOPgJx//1QDw6gw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/devtools-api": "^7.7.7"
|
"nostics": "^1.2.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/posva"
|
"url": "https://github.com/sponsors/posva"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"typescript": ">=4.5.0",
|
"@vue/devtools-api": "^8.2.1",
|
||||||
|
"typescript": ">=5.6.0",
|
||||||
"vue": "^3.5.11"
|
"vue": "^3.5.11"
|
||||||
},
|
},
|
||||||
"peerDependenciesMeta": {
|
"peerDependenciesMeta": {
|
||||||
|
"@vue/devtools-api": {
|
||||||
|
"optional": false
|
||||||
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"optional": true
|
"optional": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/pkg-types": {
|
"node_modules/pkg-types": {
|
||||||
"version": "2.3.1",
|
"version": "2.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.4.0.tgz",
|
||||||
"integrity": "sha512-y+ichcgc2LrADuhLNAx8DFjVfgz91pRxfZdI3UDhxHvcVEZsenLO+7XaU5vOp0u/7V/wZ+plyuQxtrDlZJ+yeg==",
|
"integrity": "sha512-07Fys7iVx0X6TcviMOgogM1Lk33ZyqOezMnU79S+kffWqwolG/5W9V8EgQSeYCIfFTYVgssRbnH630Oa2+soBA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"confbox": "^0.2.4",
|
"confbox": "^0.3.1",
|
||||||
"exsolve": "^1.0.8",
|
"exsolve": "^1.1.3",
|
||||||
"pathe": "^2.0.3"
|
"pathe": "^2.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2684,12 +2702,6 @@
|
|||||||
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
|
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/rfdc": {
|
|
||||||
"version": "1.4.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
|
|
||||||
"integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/rolldown": {
|
"node_modules/rolldown": {
|
||||||
"version": "1.2.15",
|
"version": "1.2.15",
|
||||||
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.15.tgz",
|
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.15.tgz",
|
||||||
@@ -2783,15 +2795,6 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/speakingurl": {
|
|
||||||
"version": "14.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/speakingurl/-/speakingurl-14.0.1.tgz",
|
|
||||||
"integrity": "sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==",
|
|
||||||
"license": "BSD-3-Clause",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/string-width": {
|
"node_modules/string-width": {
|
||||||
"version": "4.2.3",
|
"version": "4.2.3",
|
||||||
"resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
|
"resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
|
||||||
@@ -2818,18 +2821,6 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/superjson": {
|
|
||||||
"version": "2.2.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.6.tgz",
|
|
||||||
"integrity": "sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"copy-anything": "^4"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/tinyglobby": {
|
"node_modules/tinyglobby": {
|
||||||
"version": "0.2.17",
|
"version": "0.2.17",
|
||||||
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
|
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
|
||||||
@@ -2863,27 +2854,71 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/unplugin": {
|
"node_modules/unplugin": {
|
||||||
"version": "3.0.0",
|
"version": "3.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/unplugin/-/unplugin-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/unplugin/-/unplugin-3.4.0.tgz",
|
||||||
"integrity": "sha512-0Mqk3AT2TZCXWKdcoaufeXNukv2mTrEZExeXlHIOZXdqYoHHr4n51pymnwV8x2BOVxwXbK2HLlI7usrqMpycdg==",
|
"integrity": "sha512-9skdIFlCsPdFV7wUfZxNsFInlW+7nJmGu2gkTu0OUhF56aXGsHab9x52/QhdJ4lC7ZDPWTxbiC4ANqVlsuaW3w==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/remapping": "^2.3.5",
|
"@jridgewell/remapping": "^2.3.5",
|
||||||
"picomatch": "^4.0.3",
|
"picomatch": "^4.0.7",
|
||||||
"webpack-virtual-modules": "^0.6.2"
|
"webpack-virtual-modules": "^0.6.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.19.0 || >=22.12.0"
|
"node": "^20.19.0 || >=22.12.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@farmfe/core": "*",
|
||||||
|
"@rsbuild/core": "*",
|
||||||
|
"@rspack/core": "*",
|
||||||
|
"bun-types-no-globals": "*",
|
||||||
|
"esbuild": "*",
|
||||||
|
"rolldown": "*",
|
||||||
|
"rollup": "*",
|
||||||
|
"unloader": "*",
|
||||||
|
"vite": "*",
|
||||||
|
"webpack": "*"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@farmfe/core": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"@rsbuild/core": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"@rspack/core": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"bun-types-no-globals": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"esbuild": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"rolldown": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"rollup": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"unloader": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"vite": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"webpack": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/unplugin-utils": {
|
"node_modules/unplugin-utils": {
|
||||||
"version": "0.3.1",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/unplugin-utils/-/unplugin-utils-0.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/unplugin-utils/-/unplugin-utils-0.3.2.tgz",
|
||||||
"integrity": "sha512-5lWVjgi6vuHhJ526bI4nlCOmkCIF3nnfXkCMDeMJrtdvxTs6ZFCM8oNufGTsDbKv/tJ/xj8RpvXjRuPBZJuJog==",
|
"integrity": "sha512-xVToRh2CTmLk2HnEG7ac4rl1MJTT3RFkpS8B++/SnB0kXvuaavD+n3m/vrzyWQOdJNSZQACnbz01pnppbwV5BA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pathe": "^2.0.3",
|
"pathe": "^2.0.3",
|
||||||
"picomatch": "^4.0.3"
|
"picomatch": "^4.0.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20.19.0"
|
"node": ">=20.19.0"
|
||||||
@@ -2893,9 +2928,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/update-browserslist-db": {
|
"node_modules/update-browserslist-db": {
|
||||||
"version": "1.2.3",
|
"version": "1.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.4.tgz",
|
||||||
"integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",
|
"integrity": "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -3035,33 +3070,6 @@
|
|||||||
"vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
"vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vite-plugin-vue-devtools/node_modules/@vue/devtools-kit": {
|
|
||||||
"version": "8.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-8.2.1.tgz",
|
|
||||||
"integrity": "sha512-FIGIuq3AWReEpbAHY/cRGeHDfI0qOb8OCQ3YjbEAX04uaxIDbGc9rhkbVcG7rnfHPXE3RsU5KrWOu9V/okd8AQ==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@vue/devtools-shared": "^8.2.1",
|
|
||||||
"birpc": "^2.6.1",
|
|
||||||
"hookable": "^5.5.3",
|
|
||||||
"perfect-debounce": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/vite-plugin-vue-devtools/node_modules/@vue/devtools-shared": {
|
|
||||||
"version": "8.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-8.2.1.tgz",
|
|
||||||
"integrity": "sha512-Fkac7lUdGReh6pVOi3AYPRGe82LQqRmAfThW7RRligOAP0ZA/Z1z9XLHDM9dv34pV2HRc79DK8uKPeG2fLnA/g==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/vite-plugin-vue-devtools/node_modules/perfect-debounce": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/vite-plugin-vue-devtools/node_modules/vite-plugin-inspect": {
|
"node_modules/vite-plugin-vue-devtools/node_modules/vite-plugin-inspect": {
|
||||||
"version": "11.3.3",
|
"version": "11.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/vite-plugin-inspect/-/vite-plugin-inspect-11.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/vite-plugin-inspect/-/vite-plugin-inspect-11.3.3.tgz",
|
||||||
@@ -3167,38 +3175,37 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vue-router": {
|
"node_modules/vue-router": {
|
||||||
"version": "5.1.0",
|
"version": "5.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-5.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-5.4.0.tgz",
|
||||||
"integrity": "sha512-HAbiLzLEHQwxPgvsbOJDAwtavszEgLwri6XfyrsPECIFez8+59xc9LofWVdc/HEaSRT822lJ8H9Ns38VVond5g==",
|
"integrity": "sha512-pFvcYcxinDHjZUlf7AzFBrT8r8Xqvv4uMHoJnjc+EqPawXQvHTkF8S4tfSmQLpriVHUGfkaKlI7Et0KRjTMTdw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/generator": "^8.0.0-rc.4",
|
"@vue-macros/common": "^3.1.3",
|
||||||
"@vue-macros/common": "^3.1.1",
|
"@vue/devtools-api": "^8.1.5",
|
||||||
"@vue/devtools-api": "^8.1.2",
|
"ast-walker-scope": "^0.10.0",
|
||||||
"ast-walker-scope": "^0.9.0",
|
|
||||||
"chokidar": "^5.0.0",
|
"chokidar": "^5.0.0",
|
||||||
"json5": "^2.2.3",
|
"confbox": "^0.3.1",
|
||||||
"local-pkg": "^1.1.2",
|
"local-pkg": "^1.2.1",
|
||||||
"magic-string": "^0.30.21",
|
"magic-string": "^1.4.3",
|
||||||
"mlly": "^1.8.2",
|
"mlly": "^1.8.2",
|
||||||
"muggle-string": "^0.4.1",
|
"muggle-string": "^0.4.1",
|
||||||
|
"nostics": "^1.3.0",
|
||||||
"pathe": "^2.0.3",
|
"pathe": "^2.0.3",
|
||||||
"picomatch": "^4.0.3",
|
"picomatch": "^4.0.7",
|
||||||
"scule": "^1.3.0",
|
"scule": "^1.3.0",
|
||||||
"tinyglobby": "^0.2.16",
|
"tinyglobby": "^0.2.17",
|
||||||
"unplugin": "^3.0.0",
|
"unplugin": "^3.4.0",
|
||||||
"unplugin-utils": "^0.3.1",
|
"unplugin-utils": "^0.3.2"
|
||||||
"yaml": "^2.9.0"
|
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/posva"
|
"url": "https://github.com/sponsors/posva"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@pinia/colada": ">=0.21.2",
|
"@pinia/colada": ">=0.21.2",
|
||||||
"@vue/compiler-sfc": "^3.5.34",
|
"@vue/compiler-sfc": "^3.5.34 || ^4.0.0",
|
||||||
"pinia": "^3.0.4",
|
"pinia": "^3.0.4 || ^4.0.2",
|
||||||
"vite": "^7.0.0 || ^8.0.0",
|
"vite": "^7.3.0 || ^8.0.0",
|
||||||
"vue": "^3.5.34"
|
"vue": "^3.5.34 || ^4.0.0"
|
||||||
},
|
},
|
||||||
"peerDependenciesMeta": {
|
"peerDependenciesMeta": {
|
||||||
"@pinia/colada": {
|
"@pinia/colada": {
|
||||||
@@ -3215,102 +3222,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vue-router/node_modules/@babel/generator": {
|
"node_modules/vue-router/node_modules/magic-string": {
|
||||||
"version": "8.0.0-rc.6",
|
"version": "1.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-8.0.0-rc.6.tgz",
|
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.3.tgz",
|
||||||
"integrity": "sha512-6mIzgVK8DgEzvIapoQwhXTMnnkuE4STQmVv9H03i/tZ2ml8oev3TRvZJgTenK2Bsq0YWNtzOrFdTyNzCMFtjJQ==",
|
"integrity": "sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/parser": "^8.0.0-rc.6",
|
"@jridgewell/sourcemap-codec": "^1.6.0"
|
||||||
"@babel/types": "^8.0.0-rc.6",
|
|
||||||
"@jridgewell/gen-mapping": "^0.3.12",
|
|
||||||
"@jridgewell/trace-mapping": "^0.3.28",
|
|
||||||
"@types/jsesc": "^2.5.0",
|
|
||||||
"jsesc": "^3.0.2"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^22.18.0 || >=24.11.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vue-router/node_modules/@babel/helper-string-parser": {
|
|
||||||
"version": "8.0.0-rc.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-8.0.0-rc.6.tgz",
|
|
||||||
"integrity": "sha512-BCkFy+zN6kXQed3YOT7aJl93NfDSzQc3pBfsvTVPs9gU9X3V0aefEF5kwBT0E+mDWH9QgKaZstYUQN9VdQZT4g==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": "^22.18.0 || >=24.11.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/vue-router/node_modules/@babel/helper-validator-identifier": {
|
|
||||||
"version": "8.0.0-rc.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-8.0.0-rc.6.tgz",
|
|
||||||
"integrity": "sha512-nVJ+1JcCgntv8d78rRo++o2wuODT0Irknx2BF8Np4Ft2CRgjLqIs4qzSZ8b66yGbBdMWGmZBO9WEZv1hhNiSpg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": "^22.18.0 || >=24.11.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/vue-router/node_modules/@babel/parser": {
|
|
||||||
"version": "8.0.0-rc.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-8.0.0-rc.6.tgz",
|
|
||||||
"integrity": "sha512-rOS8IpdO7mQELkTPlCsTgPejO0bFuZdEDCGQJouYbYf9e1FLTym7Fei2pEjq8q7MWbX0ravcd7QQYKs1TxOuog==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/types": "^8.0.0-rc.6"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"parser": "bin/babel-parser.js"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^22.18.0 || >=24.11.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/vue-router/node_modules/@babel/types": {
|
|
||||||
"version": "8.0.0-rc.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-8.0.0-rc.6.tgz",
|
|
||||||
"integrity": "sha512-p7/ABylAYlexb31wtRdIfH9L9A0Z2T/9H6zAqzqndkY2PLkvNNc580wGhp/gGKN4Sp9sQvSkhc6Oga8/O+wTyw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/helper-string-parser": "^8.0.0-rc.6",
|
|
||||||
"@babel/helper-validator-identifier": "^8.0.0-rc.6"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^22.18.0 || >=24.11.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/vue-router/node_modules/@vue/devtools-api": {
|
|
||||||
"version": "8.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-8.1.2.tgz",
|
|
||||||
"integrity": "sha512-vA0O112YqyDuNA1s7Yb2gCgToQ/OxOWiFDO5ThLCcDy0ldHnSd1dUTaSYhOldbqoNgumE4dxtGAoAaSUKUD1Zg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@vue/devtools-kit": "^8.1.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/vue-router/node_modules/@vue/devtools-kit": {
|
|
||||||
"version": "8.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-8.1.2.tgz",
|
|
||||||
"integrity": "sha512-f75/upc+GCyjXErpgPGz4582ujS0L/adAltGy+tqXMGUJpgAcfGr6CxnnhpZY8BHuMYt6KpbF8uaFrrQG66rGQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@vue/devtools-shared": "^8.1.2",
|
|
||||||
"birpc": "^2.6.1",
|
|
||||||
"hookable": "^5.5.3",
|
|
||||||
"perfect-debounce": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/vue-router/node_modules/@vue/devtools-shared": {
|
|
||||||
"version": "8.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-8.1.2.tgz",
|
|
||||||
"integrity": "sha512-X9RyVFYAdkBe4IUf5v48TxBF/6QPmF8CmWrDAjXzfUHrgQ/HGfTC1A6TqgXqZ03ye66l3AD51BAGD69IvKM9sw==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/vue-router/node_modules/perfect-debounce": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/webpack-virtual-modules": {
|
"node_modules/webpack-virtual-modules": {
|
||||||
"version": "0.6.2",
|
"version": "0.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz",
|
||||||
@@ -3366,21 +3286,6 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/yaml": {
|
|
||||||
"version": "2.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz",
|
|
||||||
"integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==",
|
|
||||||
"license": "ISC",
|
|
||||||
"bin": {
|
|
||||||
"yaml": "bin.mjs"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 14.6"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/eemeli"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/yargs": {
|
"node_modules/yargs": {
|
||||||
"version": "15.4.1",
|
"version": "15.4.1",
|
||||||
"resolved": "https://registry.npmmirror.com/yargs/-/yargs-15.4.1.tgz",
|
"resolved": "https://registry.npmmirror.com/yargs/-/yargs-15.4.1.tgz",
|
||||||
|
|||||||
@@ -9,16 +9,16 @@
|
|||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.18.0",
|
"axios": "^1.21.0",
|
||||||
"bootstrap": "^5.3.8",
|
"bootstrap": "^5.3.8",
|
||||||
"bootstrap-icons": "^1.13.1",
|
"bootstrap-icons": "^1.13.2",
|
||||||
"dayjs": "^1.11.21",
|
"dayjs": "^1.11.23",
|
||||||
"oidc-client-ts": "^3.5.0",
|
"oidc-client-ts": "^3.5.0",
|
||||||
"pinia": "^3.0.4",
|
"pinia": "^4.1.0",
|
||||||
"qrcode": "^1.5.4",
|
"qrcode": "^1.5.4",
|
||||||
"uuid": "^14.0.3",
|
"uuid": "^14.0.3",
|
||||||
"vue": "^3.5.44",
|
"vue": "^3.5.44",
|
||||||
"vue-router": "^5.1.0"
|
"vue-router": "^5.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vitejs/plugin-vue": "^6.0.10",
|
"@vitejs/plugin-vue": "^6.0.10",
|
||||||
|
|||||||
@@ -29,12 +29,8 @@ const requestToken = async (e) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const code = ref("")
|
const code = ref("")
|
||||||
const parseCode = () => {
|
|
||||||
code.value = code.value.replace(/\D/i, "")
|
|
||||||
code.value = code.value.slice(0, 6)
|
|
||||||
}
|
|
||||||
const codeReady = computed(() => {
|
const codeReady = computed(() => {
|
||||||
return /^[0-9]{6}$/.test(code.value)
|
return code.value.trim().length > 0
|
||||||
})
|
})
|
||||||
const codeValidated = ref(false)
|
const codeValidated = ref(false)
|
||||||
const validateCode = async (e) => {
|
const validateCode = async (e) => {
|
||||||
@@ -42,13 +38,13 @@ const validateCode = async (e) => {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
let codeValidation = await axiosPost("/api/resetPassword/validateResetToken", {
|
let codeValidation = await axiosPost("/api/resetPassword/validateResetToken", {
|
||||||
Email: email.value,
|
Email: email.value,
|
||||||
Token: code.value
|
Token: code.value.trim()
|
||||||
})
|
})
|
||||||
loading.value = false
|
loading.value = false
|
||||||
if (codeValidation.status){
|
if (codeValidation.status){
|
||||||
codeValidated.value = true
|
codeValidated.value = true
|
||||||
}else{
|
}else{
|
||||||
store.newNotification("Your verification code is either invalid or expired", "danger")
|
store.newNotification("Your reset token is either invalid or expired", "danger")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +59,7 @@ const resetPassword = async (e) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
let reset = await axiosPost("/api/resetPassword", {
|
let reset = await axiosPost("/api/resetPassword", {
|
||||||
Email: email.value,
|
Email: email.value,
|
||||||
Token: code.value,
|
Token: code.value.trim(),
|
||||||
Password: password.value,
|
Password: password.value,
|
||||||
ConfirmPassword: confirmPassword.value
|
ConfirmPassword: confirmPassword.value
|
||||||
})
|
})
|
||||||
@@ -71,6 +67,8 @@ const resetPassword = async (e) => {
|
|||||||
store.newNotification("Password reset! Now you can sign in with your new password", "success")
|
store.newNotification("Password reset! Now you can sign in with your new password", "success")
|
||||||
|
|
||||||
await router.push('/signin')
|
await router.push('/signin')
|
||||||
|
}else{
|
||||||
|
store.newNotification(reset.message || "Password reset failed", "danger")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -98,7 +96,7 @@ const resetPassword = async (e) => {
|
|||||||
autocomplete="email"
|
autocomplete="email"
|
||||||
autofocus
|
autofocus
|
||||||
class="form-control rounded-3 border-0" id="email" placeholder="email">
|
class="form-control rounded-3 border-0" id="email" placeholder="email">
|
||||||
<label for="email" class="d-flex">
|
<label for="token" class="d-flex">
|
||||||
<i class="bi bi-person-circle me-2"></i>
|
<i class="bi bi-person-circle me-2"></i>
|
||||||
Email
|
Email
|
||||||
</label>
|
</label>
|
||||||
@@ -122,7 +120,7 @@ const resetPassword = async (e) => {
|
|||||||
</a>
|
</a>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h1 class="display-4">Almost there</h1>
|
<h1 class="display-4">Almost there</h1>
|
||||||
<p class="text-muted">Enter the code you received below to retrieve a reset your password</p>
|
<p class="text-muted">Enter the reset token you received below to reset your password</p>
|
||||||
<p class="text-muted" v-if="resendCountdown > 0">Didn't get the code? Maybe check your Spam/Junk mailbox. You can get another code in {{ resendCountdown }} seconds.</p>
|
<p class="text-muted" v-if="resendCountdown > 0">Didn't get the code? Maybe check your Spam/Junk mailbox. You can get another code in {{ resendCountdown }} seconds.</p>
|
||||||
<a role="button"
|
<a role="button"
|
||||||
:class="{disabled: loading}"
|
:class="{disabled: loading}"
|
||||||
@@ -131,17 +129,17 @@ const resetPassword = async (e) => {
|
|||||||
<form class="mt-4 d-flex flex-column gap-3" @submit="e => validateCode(e)">
|
<form class="mt-4 d-flex flex-column gap-3" @submit="e => validateCode(e)">
|
||||||
<div class="form-floating">
|
<div class="form-floating">
|
||||||
<input type="text"
|
<input type="text"
|
||||||
inputmode="numeric"
|
|
||||||
required
|
required
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
v-model="code"
|
v-model="code"
|
||||||
@keyup="parseCode()"
|
autocomplete="off"
|
||||||
autocomplete="one-time-code"
|
autocapitalize="off"
|
||||||
|
spellcheck="false"
|
||||||
autofocus
|
autofocus
|
||||||
class="form-control rounded-3 border-0" id="token" placeholder="token">
|
class="form-control rounded-3 border-0" id="token" placeholder="token">
|
||||||
<label for="email" class="d-flex">
|
<label for="token" class="d-flex">
|
||||||
<i class="bi bi-person-circle me-2"></i>
|
<i class="bi bi-person-circle me-2"></i>
|
||||||
6 Digits Verification Code
|
Password Reset Token
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
|
|||||||
+244
-102
@@ -5,12 +5,17 @@
|
|||||||
#trap "kill $TOP_PID"
|
#trap "kill $TOP_PID"
|
||||||
export TOP_PID=$$
|
export TOP_PID=$$
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Configuration
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
app_name="dashboard.py"
|
app_name="dashboard.py"
|
||||||
app_official_name="WGDashboard"
|
app_official_name="WGDashboard"
|
||||||
venv_python="./venv/bin/python3"
|
venv_python="./venv/bin/python3"
|
||||||
venv_gunicorn="./venv/bin/gunicorn"
|
venv_gunicorn="./venv/bin/gunicorn"
|
||||||
pythonExecutable="python3"
|
pythonExecutable="python3"
|
||||||
|
|
||||||
|
frontend_dirs=("./static/app" "./static/client")
|
||||||
|
|
||||||
heavy_checkmark=$(printf "\xE2\x9C\x85")
|
heavy_checkmark=$(printf "\xE2\x9C\x85")
|
||||||
heavy_crossmark=$(printf "\xE2\x9D\x8C")
|
heavy_crossmark=$(printf "\xE2\x9D\x8C")
|
||||||
install=$(printf "\xF0\x9F\x92\xBF")
|
install=$(printf "\xF0\x9F\x92\xBF")
|
||||||
@@ -30,6 +35,10 @@ fi
|
|||||||
dashes='---------------------------------------------------------------------------------'
|
dashes='---------------------------------------------------------------------------------'
|
||||||
equals='============================================================'
|
equals='============================================================'
|
||||||
helpMsg="[WGDashboard] Please check ./log/install.txt for more details. For further assistance, please open a ticket on https://github.com/WGDashboard/WGDashboard/issues/new/choose, I'm more than happy to help :)"
|
helpMsg="[WGDashboard] Please check ./log/install.txt for more details. For further assistance, please open a ticket on https://github.com/WGDashboard/WGDashboard/issues/new/choose, I'm more than happy to help :)"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Output helpers
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
print_header(){
|
print_header(){
|
||||||
printf "=================================================================================\n"
|
printf "=================================================================================\n"
|
||||||
printf "+ <WGDashboard> by Donald Zou - https://github.com/donaldzou +\n"
|
printf "+ <WGDashboard> by Donald Zou - https://github.com/donaldzou +\n"
|
||||||
@@ -49,6 +58,19 @@ help () {
|
|||||||
printf "=================================================================================\n"
|
printf "=================================================================================\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_logSection(){
|
||||||
|
{ printf "\n\n [%s] [%s] \n\n" "$1" "$(date)"; } >> ./log/install.txt
|
||||||
|
}
|
||||||
|
|
||||||
|
_unsupportedOS(){
|
||||||
|
printf "[WGDashboard] %s Sorry, your OS is not supported. Currently the install script only support Debian-based, Red Hat-based OS. With experimental support for Alpine Linux.\n" "$heavy_crossmark"
|
||||||
|
printf "%s\n" "$helpMsg"
|
||||||
|
kill $TOP_PID
|
||||||
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Environment detection
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
_check_and_set_venv(){
|
_check_and_set_venv(){
|
||||||
VIRTUAL_ENV="./venv"
|
VIRTUAL_ENV="./venv"
|
||||||
if [ ! -d $VIRTUAL_ENV ]; then
|
if [ ! -d $VIRTUAL_ENV ]; then
|
||||||
@@ -72,15 +94,16 @@ _determineOS(){
|
|||||||
elif [ -f /etc/redhat-release ]; then
|
elif [ -f /etc/redhat-release ]; then
|
||||||
OS="redhat"
|
OS="redhat"
|
||||||
else
|
else
|
||||||
printf "[WGDashboard] %s Sorry, your OS is not supported. Currently the install script only support Debian-based, Red Hat-based OS. With experimental support for Alpine Linux.\n" "$heavy_crossmark"
|
_unsupportedOS
|
||||||
printf "%s\n" "$helpMsg"
|
|
||||||
kill $TOP_PID
|
|
||||||
fi
|
fi
|
||||||
printf "[WGDashboard] OS: %s\n" "$OS"
|
printf "[WGDashboard] OS: %s\n" "$OS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Python
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
_installPython(){
|
_installPython(){
|
||||||
{ printf "\n\n [Installing Python] [%s] \n\n""$(date)"; } >> ./log/install.txt
|
_logSection "Installing Python"
|
||||||
printf "[WGDashboard] %s Installing Python\n" "$install"
|
printf "[WGDashboard] %s Installing Python\n" "$install"
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
ubuntu|debian|raspbian)
|
ubuntu|debian|raspbian)
|
||||||
@@ -112,7 +135,7 @@ _installPython(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
_installPythonVenv(){
|
_installPythonVenv(){
|
||||||
{ printf "\n\n [Installing Python Venv] [%s] \n\n""$(date)"; } >> ./log/install.txt
|
_logSection "Installing Python Venv"
|
||||||
printf "[WGDashboard] %s Installing Python Virtual Environment\n" "$install"
|
printf "[WGDashboard] %s Installing Python Virtual Environment\n" "$install"
|
||||||
if [ "$pythonExecutable" = "python3" ]; then
|
if [ "$pythonExecutable" = "python3" ]; then
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
@@ -133,9 +156,7 @@ _installPythonVenv(){
|
|||||||
{ echo "Python Virtual Environment is installed by default from version Python3.3"; printf "\n\n"; } &>> ./log/install.txt # https://wiki.archlinux.org/title/Python/Virtual_environment
|
{ echo "Python Virtual Environment is installed by default from version Python3.3"; printf "\n\n"; } &>> ./log/install.txt # https://wiki.archlinux.org/title/Python/Virtual_environment
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
printf "[WGDashboard] %s Sorry, your OS is not supported. Currently the install script only support Debian-based, Red Hat-based OS. With experimental support for Alpine Linux.\n" "$heavy_crossmark"
|
_unsupportedOS
|
||||||
printf "%s\n" "$helpMsg"
|
|
||||||
kill $TOP_PID
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
@@ -156,7 +177,7 @@ _installPythonVenv(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
_installPythonPip(){
|
_installPythonPip(){
|
||||||
{ printf "\n\n [Installing Python Pip] [%s] \n\n""$(date)"; } >> ./log/install.txt
|
_logSection "Installing Python Pip"
|
||||||
|
|
||||||
if ! $pythonExecutable -m pip -h > /dev/null 2>&1
|
if ! $pythonExecutable -m pip -h > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
@@ -183,9 +204,7 @@ _installPythonPip(){
|
|||||||
{ sudo pacman -Syu python-pip; printf "\n\n"; } &>> ./log/install.txt
|
{ sudo pacman -Syu python-pip; printf "\n\n"; } &>> ./log/install.txt
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
printf "[WGDashboard] %s Sorry, your OS is not supported. Currently the install script only support Debian-based, Red Hat-based OS. With experimental support for Alpine Linux.\n" "$heavy_crossmark"
|
_unsupportedOS
|
||||||
printf "%s\n" "$helpMsg"
|
|
||||||
kill $TOP_PID
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
@@ -200,6 +219,82 @@ _installPythonPip(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_checkPythonVersion(){
|
||||||
|
version_pass=$($pythonExecutable -c 'import sys; print("1") if (sys.version_info.major == 3 and sys.version_info.minor >= 12) else print("0");')
|
||||||
|
version=$($pythonExecutable --version)
|
||||||
|
if [ $version_pass == "1" ]
|
||||||
|
then
|
||||||
|
printf "[WGDashboard] %s Found compatible version of Python. Will be using %s to install WGDashboard.\n" "$heavy_checkmark" "$($pythonExecutable --version)"
|
||||||
|
return;
|
||||||
|
elif python3.12 --version > /dev/null 2>&1
|
||||||
|
then
|
||||||
|
printf "[WGDashboard] %s Found Python 3.12. Will be using [python3.12] to install WGDashboard.\n" "$heavy_checkmark"
|
||||||
|
pythonExecutable="python3.12"
|
||||||
|
else
|
||||||
|
printf "[WGDashboard] %s Could not find a compatible version of Python. Current Python is %s.\n" "$heavy_crossmark" "$version"
|
||||||
|
printf "[WGDashboard] WGDashboard required Python 3.12 or above. Halting install now.\n"
|
||||||
|
kill $TOP_PID
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_determinePypiMirror(){
|
||||||
|
printf "[WGDashboard] %s Pinging list of recommended Python Package Index mirror\n" "$install"
|
||||||
|
urls=(
|
||||||
|
"https://pypi.org/simple/"
|
||||||
|
"https://pypi.tuna.tsinghua.edu.cn/simple/"
|
||||||
|
"https://pypi.mirrors.ustc.edu.cn/simple/"
|
||||||
|
"https://mirrors.aliyun.com/pypi/simple/"
|
||||||
|
"https://pypi.douban.com/simple/"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Ping each mirror's hostname once and extract the RTT
|
||||||
|
index=1
|
||||||
|
printf " ---------------------------------------------------------\n"
|
||||||
|
for url in "${urls[@]}"; do
|
||||||
|
hostname=$(echo "$url" | awk -F/ '{print $3}')
|
||||||
|
rtt=$(ping -c 1 -W 1 "$hostname" 2>/dev/null | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}')
|
||||||
|
# Handle cases where the hostname is not reachable
|
||||||
|
if [ -z "$rtt" ]; then
|
||||||
|
rtt="9999"
|
||||||
|
printf " [%i] [FAILED] %s\n" "$index" "$url"
|
||||||
|
else
|
||||||
|
rtt=${rtt//.*/}
|
||||||
|
printf " [%i] %sms %s\n" "$index" "$rtt" "$url"
|
||||||
|
fi
|
||||||
|
rtthost[$index]=$rtt
|
||||||
|
index=$((index+1))
|
||||||
|
done
|
||||||
|
printf " ---------------------------------------------------------\n"
|
||||||
|
for i in "${!rtthost[@]}"; do
|
||||||
|
[[ -z ${rtthost[i]} ]] && continue # Skip unset or empty values
|
||||||
|
if [[ -z $min_val || ${rtthost[i]} -lt $min_val ]]; then
|
||||||
|
min_val=${rtthost[i]}
|
||||||
|
min_idx=$i
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
min_idx=$((min_idx - 1))
|
||||||
|
|
||||||
|
printf " Which mirror you would like to use (Hit enter to use default)\n"
|
||||||
|
printf " Default is %s :" "${urls[$min_idx]}"
|
||||||
|
read -t ${msleep} -r choice
|
||||||
|
printf "\n"
|
||||||
|
|
||||||
|
if [[ -z "$choice" ]]; then
|
||||||
|
choice=$((min_idx + 1))
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$choice" =~ ^[0-9]+$ ]] && (( choice >= 1 && choice <= ${#urls[@]} )); then
|
||||||
|
selected_url="${urls[choice-1]}"
|
||||||
|
printf "[WGDashboard] %s Will download Python packages from %s\n" "$heavy_checkmark" "$selected_url"
|
||||||
|
else
|
||||||
|
selected_url="${urls[0]}"
|
||||||
|
printf "[WGDashboard] %s Will download Python packages from %s\n" "$heavy_checkmark" "${urls[0]}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# WireGuard
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
_checkWireguard(){
|
_checkWireguard(){
|
||||||
if ! command -v wg > /dev/null 2>&1 || ! command -v wg-quick > /dev/null 2>&1
|
if ! command -v wg > /dev/null 2>&1 || ! command -v wg-quick > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
@@ -243,81 +338,131 @@ _checkWireguard(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Frontend (Node.js) - Docker builds the frontend itself, so this is only for
|
||||||
|
# bare-metal installs.
|
||||||
_checkPythonVersion(){
|
#------------------------------------------------------------------------------
|
||||||
version_pass=$($pythonExecutable -c 'import sys; print("1") if (sys.version_info.major == 3 and sys.version_info.minor >= 12) else print("0");')
|
_installNode(){
|
||||||
version=$($pythonExecutable --version)
|
_logSection "Installing Node.js"
|
||||||
if [ $version_pass == "1" ]
|
printf "[WGDashboard] %s Installing Node.js and npm\n" "$install"
|
||||||
then
|
case "$OS" in
|
||||||
printf "[WGDashboard] %s Found compatible version of Python. Will be using %s to install WGDashboard.\n" "$heavy_checkmark" "$($pythonExecutable --version)"
|
ubuntu|debian|raspbian)
|
||||||
return;
|
{ sudo apt update ; sudo apt-get install -y nodejs npm; printf "\n\n"; } &>> ./log/install.txt
|
||||||
elif python3.12 --version > /dev/null 2>&1
|
;;
|
||||||
then
|
centos|fedora|redhat|rhel|almalinux|rocky)
|
||||||
printf "[WGDashboard] %s Found Python 3.12. Will be using [python3.12] to install WGDashboard.\n" "$heavy_checkmark"
|
if command -v dnf &> /dev/null; then
|
||||||
pythonExecutable="python3.12"
|
{ sudo dnf install -y nodejs npm; printf "\n\n"; } &>> ./log/install.txt
|
||||||
else
|
else
|
||||||
printf "[WGDashboard] %s Could not find a compatible version of Python. Current Python is %s.\n" "$heavy_crossmark" "$version"
|
{ sudo yum install -y nodejs npm; printf "\n\n"; } &>> ./log/install.txt
|
||||||
printf "[WGDashboard] WGDashboard required Python 3.12 or above. Halting install now.\n"
|
fi
|
||||||
kill $TOP_PID
|
;;
|
||||||
|
alpine)
|
||||||
|
{ sudo apk update; sudo apk add nodejs npm --no-cache; printf "\n\n"; } &>> ./log/install.txt
|
||||||
|
;;
|
||||||
|
arch)
|
||||||
|
{ sudo pacman -Syu nodejs npm; printf "\n\n"; } &>> ./log/install.txt
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
_unsupportedOS
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Vite requires Node.js ^20.19.0 || >=22.12.0
|
||||||
|
_isNodeVersionSupported(){
|
||||||
|
local node_version major minor
|
||||||
|
node_version=$(node --version 2>/dev/null | sed 's/^v//')
|
||||||
|
major=${node_version%%.*}
|
||||||
|
minor=${node_version#*.}
|
||||||
|
minor=${minor%%.*}
|
||||||
|
[[ "$major" =~ ^[0-9]+$ && "$minor" =~ ^[0-9]+$ ]] || return 1
|
||||||
|
|
||||||
|
if (( major > 22 )); then return 0; fi
|
||||||
|
if (( major == 22 && minor >= 12 )); then return 0; fi
|
||||||
|
if (( major == 20 && minor >= 19 )); then return 0; fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
_checkNode(){
|
||||||
|
if ! command -v node > /dev/null 2>&1 || ! command -v npm > /dev/null 2>&1
|
||||||
|
then
|
||||||
|
_installNode
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v node > /dev/null 2>&1 || ! command -v npm > /dev/null 2>&1
|
||||||
|
then
|
||||||
|
printf "[WGDashboard] %s Node.js and npm are still not installed, halting script now.\n" "$heavy_crossmark"
|
||||||
|
printf "%s\n" "$helpMsg"
|
||||||
|
return 1
|
||||||
|
elif ! _isNodeVersionSupported
|
||||||
|
then
|
||||||
|
printf "[WGDashboard] %s Found Node.js %s, but the frontend requires Node.js 20.19+ or 22.12+. Halting install now.\n" "$heavy_crossmark" "$(node --version)"
|
||||||
|
printf "%s\n" "$helpMsg"
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
printf "[WGDashboard] %s Node.js %s and npm %s are installed\n" "$heavy_checkmark" "$(node --version)" "$(npm --version)"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
_determinePypiMirror(){
|
_compileFrontend(){
|
||||||
printf "[WGDashboard] %s Pinging list of recommended Python Package Index mirror\n" "$install"
|
_logSection "Compiling Frontend"
|
||||||
urls=(
|
if ! _checkNode; then
|
||||||
"https://pypi.org/simple/"
|
return 1
|
||||||
"https://pypi.tuna.tsinghua.edu.cn/simple/"
|
|
||||||
"https://pypi.mirrors.ustc.edu.cn/simple/"
|
|
||||||
"https://mirrors.aliyun.com/pypi/simple/"
|
|
||||||
"https://pypi.douban.com/simple/"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Function to extract hostname and ping it
|
|
||||||
index=1
|
|
||||||
printf " ---------------------------------------------------------\n"
|
|
||||||
for url in "${urls[@]}"; do
|
|
||||||
# Extract the hostname from the URL
|
|
||||||
hostname=$(echo "$url" | awk -F/ '{print $3}')
|
|
||||||
# Ping the hostname once and extract the RTT
|
|
||||||
rtt=$(ping -c 1 -W 1 "$hostname" 2>/dev/null | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}')
|
|
||||||
# Handle cases where the hostname is not reachable
|
|
||||||
if [ -z "$rtt" ]; then
|
|
||||||
rtt="9999"
|
|
||||||
printf " [%i] [FAILED] %s\n" "$index" "$url"
|
|
||||||
else
|
|
||||||
rtt=${rtt//.*/}
|
|
||||||
printf " [%i] %sms %s\n" "$index" "$rtt" "$url"
|
|
||||||
fi
|
fi
|
||||||
rtthost[$index]=$rtt
|
|
||||||
index=$((index+1))
|
local staging_root live_dir backup_dir dir output_dir index
|
||||||
done
|
local frontend_output_dirs=("WGDashboardAdmin" "WGDashboardClient")
|
||||||
printf " ---------------------------------------------------------\n"
|
staging_root=$(mktemp -d "$PWD/static/.dist-staging.XXXXXX") || return 1
|
||||||
for i in "${!rtthost[@]}"; do
|
live_dir="$PWD/static/dist"
|
||||||
[[ -z ${rtthost[i]} ]] && continue # Skip unset or empty values
|
backup_dir="${staging_root}.previous"
|
||||||
if [[ -z $min_val || ${rtthost[i]} -lt $min_val ]]; then
|
|
||||||
min_val=${rtthost[i]}
|
for index in "${!frontend_dirs[@]}"; do
|
||||||
min_idx=$i
|
dir="${frontend_dirs[$index]}"
|
||||||
|
output_dir="$staging_root/${frontend_output_dirs[$index]}"
|
||||||
|
printf "[WGDashboard] %s Compiling frontend in %s\n" "$install" "$dir"
|
||||||
|
if ! ( cd "$dir" && npm ci && npm run build -- --outDir "$output_dir" --emptyOutDir ) &>> ./log/install.txt
|
||||||
|
then
|
||||||
|
printf "[WGDashboard] %s Failed to compile frontend in %s, halting script now.\n" "$heavy_crossmark" "$dir"
|
||||||
|
printf "%s\n" "$helpMsg"
|
||||||
|
rm -rf "$staging_root"
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
min_idx=$((min_idx - 1))
|
|
||||||
|
|
||||||
printf " Which mirror you would like to use (Hit enter to use default)\n"
|
if [[ ! -f "$staging_root/WGDashboardAdmin/index.html" || ! -f "$staging_root/WGDashboardClient/client.html" ]]; then
|
||||||
printf " Default is %s :" "${urls[$min_idx]}"
|
printf "[WGDashboard] %s Frontend build did not produce the expected entry files.\n" "$heavy_crossmark"
|
||||||
read -t ${msleep} -r choice
|
rm -rf "$staging_root"
|
||||||
printf "\n"
|
return 1
|
||||||
|
|
||||||
if [[ -z "$choice" ]]; then
|
|
||||||
choice=$((min_idx + 1))
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$choice" =~ ^[0-9]+$ ]] && (( choice >= 1 && choice <= ${#urls[@]} )); then
|
if [[ -e "$live_dir" ]] && ! mv "$live_dir" "$backup_dir"; then
|
||||||
selected_url="${urls[choice-1]}"
|
printf "[WGDashboard] %s Could not preserve the current frontend bundle.\n" "$heavy_crossmark"
|
||||||
printf "[WGDashboard] %s Will download Python packages from %s\n" "$heavy_checkmark" "$selected_url"
|
rm -rf "$staging_root"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if ! mv "$staging_root" "$live_dir"; then
|
||||||
|
printf "[WGDashboard] %s Could not install the new frontend bundle.\n" "$heavy_crossmark"
|
||||||
|
if [[ -e "$backup_dir" ]]; then
|
||||||
|
mv "$backup_dir" "$live_dir"
|
||||||
|
fi
|
||||||
|
rm -rf "$staging_root"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
rm -rf "$backup_dir"
|
||||||
|
|
||||||
|
printf "[WGDashboard] %s Frontend is compiled\n" "$heavy_checkmark"
|
||||||
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Install
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
_ensureFolder(){
|
||||||
|
if [ ! -d "$1" ]
|
||||||
|
then
|
||||||
|
mkdir "$1"
|
||||||
|
printf "[WGDashboard] %s Created ./%s folder\n" "$heavy_checkmark" "$1"
|
||||||
else
|
else
|
||||||
selected_url="${urls[0]}"
|
printf "[WGDashboard] %s Found existing ./%s folder\n" "$heavy_checkmark" "$1"
|
||||||
printf "[WGDashboard] %s Will download Python packages from %s\n" "$heavy_checkmark" "${urls[0]}"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,29 +470,9 @@ install_wgd(){
|
|||||||
printf "[WGDashboard] Starting to install WGDashboard\n"
|
printf "[WGDashboard] Starting to install WGDashboard\n"
|
||||||
_determineOS
|
_determineOS
|
||||||
|
|
||||||
if [ ! -d "log" ]
|
_ensureFolder "log"
|
||||||
then
|
_ensureFolder "download"
|
||||||
mkdir "log"
|
_ensureFolder "db"
|
||||||
printf "[WGDashboard] %s Created ./log folder\n" "$heavy_checkmark"
|
|
||||||
else
|
|
||||||
printf "[WGDashboard] %s Found existing ./log folder\n" "$heavy_checkmark"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d "download" ]
|
|
||||||
then
|
|
||||||
mkdir "download"
|
|
||||||
printf "[WGDashboard] %s Created ./download folder\n" "$heavy_checkmark"
|
|
||||||
else
|
|
||||||
printf "[WGDashboard] %s Found existing ./download folder\n" "$heavy_checkmark"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d "db" ]
|
|
||||||
then
|
|
||||||
mkdir "db"
|
|
||||||
printf "[WGDashboard] %s Created ./db folder\n" "$heavy_checkmark"
|
|
||||||
else
|
|
||||||
printf "[WGDashboard] %s Found existing ./db folder\n" "$heavy_checkmark"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! python3 --version > /dev/null 2>&1
|
if ! python3 --version > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
@@ -362,6 +487,9 @@ install_wgd(){
|
|||||||
_installPythonVenv
|
_installPythonVenv
|
||||||
_installPythonPip
|
_installPythonPip
|
||||||
_checkWireguard
|
_checkWireguard
|
||||||
|
if ! _compileFrontend; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
sudo chmod -R 755 /etc/wireguard/
|
sudo chmod -R 755 /etc/wireguard/
|
||||||
|
|
||||||
_check_and_set_venv
|
_check_and_set_venv
|
||||||
@@ -371,7 +499,6 @@ install_wgd(){
|
|||||||
printf "[WGDashboard] %s Installing latest Python dependencies\n" "$install"
|
printf "[WGDashboard] %s Installing latest Python dependencies\n" "$install"
|
||||||
{ date; python3 -m pip install -r requirements.txt -i "$selected_url"; printf "\n\n"; } >> ./log/install.txt #This all works on the default installation.
|
{ date; python3 -m pip install -r requirements.txt -i "$selected_url"; printf "\n\n"; } >> ./log/install.txt #This all works on the default installation.
|
||||||
|
|
||||||
|
|
||||||
if [ ! -f "ssl-tls.ini" ]
|
if [ ! -f "ssl-tls.ini" ]
|
||||||
then
|
then
|
||||||
printf "[SSL/TLS]\ncertificate_path = \nprivate_key_path = \n" >> ssl-tls.ini
|
printf "[SSL/TLS]\ncertificate_path = \nprivate_key_path = \n" >> ssl-tls.ini
|
||||||
@@ -379,10 +506,14 @@ install_wgd(){
|
|||||||
else
|
else
|
||||||
printf "[WGDashboard] %s Found existing ssl-tls.ini\n" "$heavy_checkmark"
|
printf "[WGDashboard] %s Found existing ssl-tls.ini\n" "$heavy_checkmark"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "[WGDashboard] %s WGDashboard installed successfully!\n" "$heavy_checkmark"
|
printf "[WGDashboard] %s WGDashboard installed successfully!\n" "$heavy_checkmark"
|
||||||
printf "[WGDashboard] Enter ./wgd.sh start to start the dashboard\n"
|
printf "[WGDashboard] Enter ./wgd.sh start to start the dashboard\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Status / SSL
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
check_wgd_status(){
|
check_wgd_status(){
|
||||||
if test -f "$PID_FILE"; then
|
if test -f "$PID_FILE"; then
|
||||||
if ps aux | grep -v grep | grep $(cat ./gunicorn.pid) > /dev/null; then
|
if ps aux | grep -v grep | grep $(cat ./gunicorn.pid) > /dev/null; then
|
||||||
@@ -407,6 +538,9 @@ certbot_renew_ssl () {
|
|||||||
certbot renew --work-dir $cb_work_dir --config-dir $cb_config_dir
|
certbot renew --work-dir $cb_work_dir --config-dir $cb_config_dir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Start / Stop
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
gunicorn_start () {
|
gunicorn_start () {
|
||||||
printf "[WGDashboard] Starting WGDashboard with Gunicorn in the background.\n"
|
printf "[WGDashboard] Starting WGDashboard with Gunicorn in the background.\n"
|
||||||
d=$(date '+%Y%m%d%H%M%S')
|
d=$(date '+%Y%m%d%H%M%S')
|
||||||
@@ -462,6 +596,9 @@ start_wgd_debug() {
|
|||||||
sudo "$venv_python" "$app_name"
|
sudo "$venv_python" "$app_name"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Update
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
update_wgd() {
|
update_wgd() {
|
||||||
_determineOS
|
_determineOS
|
||||||
if ! python3 --version > /dev/null 2>&1
|
if ! python3 --version > /dev/null 2>&1
|
||||||
@@ -497,7 +634,10 @@ update_wgd() {
|
|||||||
printf "[WGDashboard] Downloading %s from GitHub..." "$new_ver"
|
printf "[WGDashboard] Downloading %s from GitHub..." "$new_ver"
|
||||||
{ date; git stash; git pull https://github.com/WGDashboard/WGDashboard.git $new_ver --force; } >> ./log/update.txt
|
{ date; git stash; git pull https://github.com/WGDashboard/WGDashboard.git $new_ver --force; } >> ./log/update.txt
|
||||||
chmod +x ./wgd.sh
|
chmod +x ./wgd.sh
|
||||||
sudo ./wgd.sh install
|
if ! sudo ./wgd.sh install; then
|
||||||
|
printf "[WGDashboard] %s Update installation failed. Check ./log/install.txt; the previous frontend bundle was preserved when possible.\n" "$heavy_crossmark"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
printf "[WGDashboard] Update completed!\n"
|
printf "[WGDashboard] Update completed!\n"
|
||||||
rm wgd.sh.old
|
rm wgd.sh.old
|
||||||
else
|
else
|
||||||
@@ -505,7 +645,9 @@ update_wgd() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Entry point
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
print_header
|
print_header
|
||||||
if [ "$#" -lt 1 ]; then
|
if [ "$#" -lt 1 ]; then
|
||||||
help
|
help
|
||||||
|
|||||||
Reference in New Issue
Block a user