From 6c567d00821bc8464a10a6f9f95dc4c8be604de4 Mon Sep 17 00:00:00 2001 From: Edgars Date: Thu, 21 Mar 2024 08:55:57 +0200 Subject: [PATCH 1/5] Use one command for updating with Docker Compose `README.md` was updated to use a one-liner to update WireGuard Easy with Docker Compose. A note about image tag was added to avoid confusion when one is specified in Compose file and it is other than `latest`, as that would result in no pull and no WireGuard Easy container recreation. --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e0163d0e4..940f8b24b 100644 --- a/README.md +++ b/README.md @@ -120,13 +120,11 @@ docker pull ghcr.io/wg-easy/wg-easy And then run the `docker run -d \ ...` command above again. -To update using Docker Compose: - -```shell -docker compose pull -docker compose up --detach -``` - +With Docker Compose WireGuard Easy can be updated with a single command: +`docker compose up --detach --pull always` (if an image tag is specified in the +Compose file and it is not `latest`, make sure that it is changed to the desired +one; by default it is omitted and +[defaults to `latest`](https://docs.docker.com/engine/reference/run/#image-references)). \ The WireGuared Easy container will be automatically recreated if a newer image was pulled. From 5afb701013798b352df71a743e5cfd7c5183e571 Mon Sep 17 00:00:00 2001 From: NPM Update Bot Date: Thu, 21 Mar 2024 10:42:32 +0000 Subject: [PATCH 2/5] npm: package updates --- src/package-lock.json | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index 96ae60d35..d27fbcf82 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -806,15 +806,16 @@ } }, "node_modules/array-includes": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", - "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", "is-string": "^1.0.7" }, "engines": { @@ -3551,9 +3552,9 @@ } }, "node_modules/postcss": { - "version": "8.4.37", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.37.tgz", - "integrity": "sha512-7iB/v/r7Woof0glKLH8b1SPHrsX7uhdO+Geb41QpF/+mWZHU3uxxSlN+UXGVit1PawOYDToO+AbZzhBzWRDwbQ==", + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "dev": true, "funding": [ { From ac47789561d710f8c7f9ee8015b6d61537c8f15d Mon Sep 17 00:00:00 2001 From: Philip H <47042125+pheiduck@users.noreply.github.com> Date: Sat, 23 Mar 2024 19:35:58 +0100 Subject: [PATCH 3/5] revert: Workaround CVE-2023-42282 newest images have updated ip package --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4e410b8e5..e1271eb8a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,8 +26,6 @@ COPY --from=build_node_modules /node_modules /node_modules RUN \ # Enable this to run `npm run serve` npm i -g nodemon &&\ - # Workaround CVE-2023-42282 - npm uninstall -g ip &&\ # Delete unnecessary files npm cache clean --force && rm -rf ~/.npm From c2829d79e0db2f96d4a8942da9d03217b99a05dd Mon Sep 17 00:00:00 2001 From: NPM Update Bot Date: Sat, 23 Mar 2024 18:36:33 +0000 Subject: [PATCH 4/5] npm: package updates --- src/package-lock.json | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index d27fbcf82..fea8e2dcf 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -3201,9 +3201,9 @@ "dev": true }, "node_modules/node-fetch-native": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.2.tgz", - "integrity": "sha512-69mtXOFZ6hSkYiXAVB5SqaRvrbITC/NPyqv7yuu/qw0nmgPyYbIMYYNIDhNtwPrzk0ptrimrLz/hhjvm4w5Z+w==" + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.4.tgz", + "integrity": "sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==" }, "node_modules/normalize-path": { "version": "3.0.0", @@ -4197,14 +4197,17 @@ } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4553,9 +4556,9 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.5.tgz", - "integrity": "sha512-yMi0PlwuznKHxKmcpoOdeLwxBoVPkqZxd7q2FgMkmD3bNwvF5VW0+UlUQ1k1vmktTu4Yu13Q0RIxEP8+B+wloA==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dev": true, "dependencies": { "call-bind": "^1.0.7", From 8d00c5456a9e9f8ed697c1441e6e24dbdd13094b Mon Sep 17 00:00:00 2001 From: cany748 Date: Sat, 23 Mar 2024 18:23:32 +0700 Subject: [PATCH 5/5] fix: add Content-Type header for static files --- src/lib/Server.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/Server.js b/src/lib/Server.js index b6b2f5f40..18e015cb6 100644 --- a/src/lib/Server.js +++ b/src/lib/Server.js @@ -225,6 +225,12 @@ module.exports = class Server { return; } + if (id.endsWith('.html')) setHeader(event, 'Content-Type', 'text/html'); + if (id.endsWith('.js')) setHeader(event, 'Content-Type', 'application/javascript'); + if (id.endsWith('.json')) setHeader(event, 'Content-Type', 'application/json'); + if (id.endsWith('.css')) setHeader(event, 'Content-Type', 'text/css'); + if (id.endsWith('.png')) setHeader(event, 'Content-Type', 'image/png'); + return { size: stats.size, mtime: stats.mtimeMs,