From 2ffb68eeb255c8710e36aae8989ed5bd8dfeb2d2 Mon Sep 17 00:00:00 2001 From: Philip H <47042125+pheiduck@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:46:50 +0100 Subject: [PATCH 01/10] [update] package.json and changelog to current release 12 Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com> --- docs/changelog.json | 3 ++- src/package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/changelog.json b/docs/changelog.json index fe4431f46..ac5208a61 100644 --- a/docs/changelog.json +++ b/docs/changelog.json @@ -9,5 +9,6 @@ "8": "Updated to Node.js v18.", "9": "Fixed issue running on devices with older kernels.", "10": "Added sessionless HTTP API auth & automatic dark mode.", - "11": "Multilanguage Support & various bugfixes" + "11": "Multilanguage Support & various bugfixes", + "12": "UI_TRAFFIC_STATS, Import json configurations with no PreShared-Key, allow clients with no privateKey & more." } diff --git a/src/package.json b/src/package.json index 14cf5183a..c3861f993 100644 --- a/src/package.json +++ b/src/package.json @@ -1,5 +1,5 @@ { - "release": "11", + "release": "12", "name": "wg-easy", "version": "1.0.1", "description": "The easiest way to run WireGuard VPN + Web-based Admin UI.", From a4c3bf029180985ab2db136652d558aea4821fc9 Mon Sep 17 00:00:00 2001 From: Philip H <47042125+pheiduck@users.noreply.github.com> Date: Wed, 13 Mar 2024 13:05:08 +0100 Subject: [PATCH 02/10] PR: Build Docker images Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com> --- .github/workflows/deploy-development.yml | 1 - .github/workflows/deploy-pr.yml | 38 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy-pr.yml diff --git a/.github/workflows/deploy-development.yml b/.github/workflows/deploy-development.yml index 21547c7e7..fa912f772 100644 --- a/.github/workflows/deploy-development.yml +++ b/.github/workflows/deploy-development.yml @@ -2,7 +2,6 @@ name: Build & Publish Development on: workflow_dispatch: - pull_request: jobs: deploy: diff --git a/.github/workflows/deploy-pr.yml b/.github/workflows/deploy-pr.yml new file mode 100644 index 000000000..96118c6e9 --- /dev/null +++ b/.github/workflows/deploy-pr.yml @@ -0,0 +1,38 @@ +name: Build & Publish Development + +on: + workflow_dispatch: + pull_request: + +jobs: + deploy: + name: Build & Deploy + runs-on: ubuntu-latest + if: github.repository_owner == 'wg-easy' + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v4 + with: + ref: production + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Docker Image + uses: docker/build-push-action@v5 + with: + push: false + platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8 + tags: ghcr.io/wg-easy/wg-easy:pr From bad7bff98ee06ce32f3aa816fd549b65830e3765 Mon Sep 17 00:00:00 2001 From: Philip H <47042125+pheiduck@users.noreply.github.com> Date: Wed, 13 Mar 2024 13:09:32 +0100 Subject: [PATCH 03/10] Update deploy-pr.yml --- .github/workflows/deploy-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-pr.yml b/.github/workflows/deploy-pr.yml index 96118c6e9..3a3cdb13f 100644 --- a/.github/workflows/deploy-pr.yml +++ b/.github/workflows/deploy-pr.yml @@ -1,4 +1,4 @@ -name: Build & Publish Development +name: Build Pull Request on: workflow_dispatch: From 11a56ffdc5dfdceacc73a07bd00f6c229d865c1a Mon Sep 17 00:00:00 2001 From: Philip H <47042125+pheiduck@users.noreply.github.com> Date: Wed, 13 Mar 2024 13:12:16 +0100 Subject: [PATCH 04/10] needed for testing on our test branches --- .github/workflows/deploy-development.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-development.yml b/.github/workflows/deploy-development.yml index fa912f772..21547c7e7 100644 --- a/.github/workflows/deploy-development.yml +++ b/.github/workflows/deploy-development.yml @@ -2,6 +2,7 @@ name: Build & Publish Development on: workflow_dispatch: + pull_request: jobs: deploy: From 4dc439f041f1d82a5b718de6f4f7afceac9dfe22 Mon Sep 17 00:00:00 2001 From: NPM Update Bot Date: Wed, 13 Mar 2024 17:49:02 +0000 Subject: [PATCH 05/10] npm: package updates --- src/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index 836cc7475..e5a62c082 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -3852,9 +3852,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.15", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", - "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", + "version": "6.0.16", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.16.tgz", + "integrity": "sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==", "dev": true, "dependencies": { "cssesc": "^3.0.0", From 2f5878d406f0ed520d6139b38117220b27387cd1 Mon Sep 17 00:00:00 2001 From: Edgars Date: Tue, 12 Mar 2024 16:10:50 +0200 Subject: [PATCH 06/10] Add setup and update instructions for Compose `README.md` was updated to provide installation and update instructions for Docker Compose as well. --- README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 958104412..30753cea4 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,9 @@ You have found the easiest way to install & manage WireGuard on any Linux host! If you haven't installed Docker yet, install it by running: ```bash -$ curl -sSL https://get.docker.com | sh -$ sudo usermod -aG docker $(whoami) -$ exit +curl -sSL https://get.docker.com | sh +sudo usermod -aG docker $(whoami) +exit ``` And log in again. @@ -72,6 +72,10 @@ The Web UI will now be available on `http://0.0.0.0:51821`. > ЁЯТб Your configuration files will be saved in `~/.wg-easy` +WireGuard Easy can be launched with Docker Compose as well - just download +[`docker-compose.yml`](docker-compose.yml), make necessary adjustments and +execute `docker compose up --detach`. + ### 3. Sponsor Are you enjoying this project? [Buy Emile a beer!](https://github.com/sponsors/WeeJeWel) ЁЯН╗ @@ -114,6 +118,16 @@ 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 +``` + +The WireGuared Easy container will be automatically recreated if a newer image +was pulled. + ## Common Use Cases * [Using WireGuard-Easy with Pi-Hole](https://github.com/wg-easy/wg-easy/wiki/Using-WireGuard-Easy-with-Pi-Hole) From d91f08eb1bb6f4b4806cef3ea49f52be14295f59 Mon Sep 17 00:00:00 2001 From: Rahil Bhimjiani Date: Tue, 12 Mar 2024 21:03:07 +0530 Subject: [PATCH 07/10] i18n.js: add Hindi language translation Signed-off-by: Rahil Bhimjiani --- README.md | 2 +- docker-compose.yml | 2 +- src/www/js/i18n.js | 28 ++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 30753cea4..6d16154fa 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ These options can be configured by setting environment variables using `-e KEY=" | `WG_POST_UP` | `...` | `iptables ...` | See [config.js](https://github.com/wg-easy/wg-easy/blob/master/src/config.js#L20) for the default value. | | `WG_PRE_DOWN` | `...` | - | See [config.js](https://github.com/wg-easy/wg-easy/blob/master/src/config.js#L27) for the default value. | | `WG_POST_DOWN` | `...` | `iptables ...` | See [config.js](https://github.com/wg-easy/wg-easy/blob/master/src/config.js#L28) for the default value. | -| `LANG` | `en` | `de` | Web UI language (Supports: en, ua, ru, tr, no, pl, fr, de, ca, es, ko, vi, nl, is, pt, chs, cht, it, th). | +| `LANG` | `en` | `de` | Web UI language (Supports: en, ua, ru, tr, no, pl, fr, de, ca, es, ko, vi, nl, is, pt, chs, cht, it, th, hi). | | `UI_TRAFFIC_STATS` | `false` | `true` | Enable detailed RX / TX client stats in Web UI | > If you change `WG_PORT`, make sure to also change the exposed port. diff --git a/docker-compose.yml b/docker-compose.yml index a6738832a..a489356f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: wg-easy: environment: # Change Language: - # (Supports: en, ua, ru, tr, no, pl, fr, de, ca, es, ko, vi, nl, is, pt, chs, cht, it, th) + # (Supports: en, ua, ru, tr, no, pl, fr, de, ca, es, ko, vi, nl, is, pt, chs, cht, it, th, hi) - LANG=de # тЪая╕П Required: # Change this to your host's public address diff --git a/src/www/js/i18n.js b/src/www/js/i18n.js index bde7441d9..a19627088 100644 --- a/src/www/js/i18n.js +++ b/src/www/js/i18n.js @@ -517,4 +517,32 @@ const messages = { // eslint-disable-line no-unused-vars madeBy: 'р╕кр╕гр╣Йр╕▓р╕Зр╣Вр╕Фр╕в', donate: 'р╕Ър╕гр╕┤р╕Ир╕▓р╕Д', }, + hi: { // github.com/rahilarious + name: 'рдирд╛рдо', + password: 'рдкрд╛рд╕рд╡рд░реНрдб', + signIn: 'рд▓реЙрдЧрд┐рди', + logout: 'рд▓реЙрдЧрдЖрдЙрдЯ', + updateAvailable: 'рдЕрдкрдбреЗрдЯ рдЙрдкрд▓рдмреНрдз рд╣реИ!', + update: 'рдЕрдкрдбреЗрдЯ', + clients: 'рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛рдпреЗ', + new: 'рдирдпрд╛', + deleteClient: 'рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛ рд╣рдЯрд╛рдПрдБ', + deleteDialog1: 'рдХреНрдпрд╛ рдЖрдкрдХреЛ рдкрдХреНрдХрд╛ рд╣рдЯрд╛рдирд╛ рд╣реИ', + deleteDialog2: 'рдпрд╣ рдирд┐рд░реНрдгрдп рдкрд▓рдЯ рдирд╣реАрдВ рд╕рдХрддрд╛ред', + cancel: 'рдХреБрдЫ рдирд╛ рдХрд░реЗрдВ', + create: 'рдмрдирд╛рдПрдВ', + createdOn: 'рд╕рд░реНрдЬрди рддрд╛рд░реАрдЦ ', + lastSeen: 'рдкрд┐рдЫрд▓реА рдмрд╛рд░ рджреЗрдЦреЗ рдЧрдП рдереЗ ', + totalDownload: 'рдХреБрд▓ рдбрд╛рдЙрдирд▓реЛрдб: ', + totalUpload: 'рдХреБрд▓ рдЕрдкрд▓реЛрдб: ', + newClient: 'рдирдпрд╛ рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛', + disableClient: 'рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛ рд╕реНрдердЧрд┐рдд рдХреАрдЬрд┐рдпреЗ', + enableClient: 'рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛ рд╢реБрд░реВ рдХреАрдЬрд┐рдпреЗ', + noClients: 'рдЕрднреА рддрдХ рдХреЛрдИ рднреА рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛ рдирд╣реАрдВ рд╣реИред', + noPrivKey: 'рдпреЗ рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛ рдХреА рдХреЛрдИ рднреА рдЧреБрдкреНрдд рдЪрд╛рдмреА рдирд╣реАрдВ рд╣реЗред рдмрдирд╛ рдирд╣реАрдВ рд╕рдХрддреЗред', + showQR: 'рдХреНрдпреВ рдЖрд░ рдХреЛрдб рджреЗрдЦрд┐рдпреЗ', + downloadConfig: 'рдбрд╛рдЙрдирд▓реЛрдб рдХреЙрдиреНрдлреАрдЧреНрдпреВрд░реЗрд╢рди', + madeBy: 'рд╕рд░реНрдЬрдХ', + donate: 'рджрд╛рди рдХрд░реЗрдВ', + }, }; From 9a35b56f5c8269209c5a55a93cde59245c93d399 Mon Sep 17 00:00:00 2001 From: Philip H <47042125+pheiduck@users.noreply.github.com> Date: Thu, 14 Mar 2024 09:33:08 +0100 Subject: [PATCH 08/10] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6d16154fa..e0163d0e4 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ You have found the easiest way to install & manage WireGuard on any Linux host! * Tx/Rx charts for each connected client. * Gravatar support. * Automatic Light / Dark Mode +* Multilanguage Support +* UI_TRAFFIC_STATS (default off) ## Requirements From ee5a2c6c5a63631f8d3b8b435a98cca98ee7a088 Mon Sep 17 00:00:00 2001 From: Philip H <47042125+pheiduck@users.noreply.github.com> Date: Fri, 15 Mar 2024 15:17:41 +0100 Subject: [PATCH 09/10] Server.js: remove cookie setting Proxy is recommended else use only internally --- src/lib/Server.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lib/Server.js b/src/lib/Server.js index 13a5d51d7..bf8c50e6b 100644 --- a/src/lib/Server.js +++ b/src/lib/Server.js @@ -33,9 +33,6 @@ module.exports = class Server { secret: crypto.randomBytes(256).toString('hex'), resave: true, saveUninitialized: true, - cookie: { - httpOnly: true, - }, })) .get('/api/release', (Util.promisify(async () => { From e2242daef125fcfae2b721f9dbef605235879c6c Mon Sep 17 00:00:00 2001 From: NPM Update Bot Date: Fri, 15 Mar 2024 14:18:17 +0000 Subject: [PATCH 10/10] npm: package updates --- src/package-lock.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index e5a62c082..ba8d30118 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -982,12 +982,15 @@ "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==" }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/body-parser": {