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 1/9] 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 21547c7e..fa912f77 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 00000000..96118c6e --- /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 2/9] 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 96118c6e..3a3cdb13 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 3/9] 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 fa912f77..21547c7e 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 4/9] 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 836cc747..e5a62c08 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 5/9] 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 95810441..30753cea 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 6/9] 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 30753cea..6d16154f 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 a6738832..a489356f 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 bde7441d..a1962708 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 7/9] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6d16154f..e0163d0e 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 8/9] 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 13a5d51d..bf8c50e6 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 9/9] 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 e5a62c08..ba8d3011 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": {