From 7cd64c3511088d3360cb992107cce8eec70f4a86 Mon Sep 17 00:00:00 2001 From: NPM Update Bot Date: Thu, 8 Feb 2024 00:11:38 +0000 Subject: [PATCH 01/10] npm: package updates --- src/package-lock.json | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index 0c280ca1..8818245d 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -2463,13 +2463,14 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.1.tgz", - "integrity": "sha512-KmuibvwbWaM4BHcBRYwJfZ1JxyJeBwB8ct9YYu67SvYdbEIlcQ2e56dHxfbobqW38GXo8/zDFqJeGtHiVbWyQw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, "dependencies": { "call-bind": "^1.0.5", - "es-errors": "^1.3.0" + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" }, "engines": { "node": ">= 0.4" @@ -3690,9 +3691,9 @@ } }, "node_modules/postcss": { - "version": "8.4.34", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.34.tgz", - "integrity": "sha512-4eLTO36woPSocqZ1zIrFD2K1v6wH7pY1uBh0JIM2KKfrVtGvPFiAku6aNOP0W1Wr9qwnaCsF0Z+CrVnryB2A8Q==", + "version": "8.4.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", + "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", "dev": true, "funding": [ { From 7b91dd678e2aae16d2a22dd91a4093cb2c2fd6a8 Mon Sep 17 00:00:00 2001 From: Guillem Bonet Date: Fri, 9 Feb 2024 10:01:34 +0100 Subject: [PATCH 02/10] Add catalan language Signed-off-by: Guillem Bonet --- README.md | 1 + docker-compose.yml | 2 +- src/www/js/i18n.js | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c8fe4fc..b9a1a11f 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,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, ru, tr, no, pl, fr, de, ca). | > If you change `WG_PORT`, make sure to also change the exposed port. diff --git a/docker-compose.yml b/docker-compose.yml index d59aa9cf..67f7fb74 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: wg-easy: environment: # Change Language: - # (Supports: en, ru, tr, no, pl, fr, de) + # (Supports: en, ru, tr, no, pl, fr, de, ca) - 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 1a2bafb2..71266039 100644 --- a/src/www/js/i18n.js +++ b/src/www/js/i18n.js @@ -191,4 +191,31 @@ const messages = { // eslint-disable-line no-unused-vars madeBy: 'Erstellt von', donate: 'Spenden', }, + ca: { // github.com/guillembonet + name: 'Nom', + password: 'Contrasenya', + signIn: 'Iniciar sessió', + logout: 'Tanca sessió', + updateAvailable: 'Hi ha una actualització disponible!', + update: 'Actualitza', + clients: 'Clients', + new: 'Nou', + deleteClient: 'Esborra client', + deleteDialog1: 'Estàs segur que vols esborrar aquest client?', + deleteDialog2: 'Aquesta acció no es pot desfer.', + cancel: 'Cancel·la', + create: 'Crea', + createdOn: 'Creat el ', + lastSeen: 'Última connexió el ', + totalDownload: 'Baixada total: ', + totalUpload: 'Pujada total: ', + newClient: 'Nou client', + disableClient: 'Desactiva client', + enableClient: 'Activa client', + noClients: 'Encara no hi ha cap client.', + showQR: 'Mostra codi QR', + downloadConfig: 'Descarrega configuració', + madeBy: 'Fet per', + donate: 'Donatiu', + }, }; From d386bed47625aad5e88dd5631210652d574c3748 Mon Sep 17 00:00:00 2001 From: NPM Update Bot Date: Mon, 12 Feb 2024 00:12:28 +0000 Subject: [PATCH 03/10] npm: package updates --- src/package-lock.json | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index 8818245d..ebc18d21 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -486,9 +486,9 @@ "dev": true }, "node_modules/@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.7.tgz", + "integrity": "sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { @@ -2672,9 +2672,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", "dependencies": { "function-bind": "^1.1.2" }, @@ -3987,14 +3987,15 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" From e190544c50444b2b457a1de65a11a59f713a2329 Mon Sep 17 00:00:00 2001 From: amarqz <73305139+amarqz@users.noreply.github.com> Date: Mon, 12 Feb 2024 11:11:06 +0100 Subject: [PATCH 04/10] Add Spanish language --- README.md | 2 +- docker-compose.yml | 2 +- src/www/js/i18n.js | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b9a1a11f..5cdb4034 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,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, ru, tr, no, pl, fr, de, ca). | +| `LANG` | `en` | `de` | Web UI language (Supports: en, ru, tr, no, pl, fr, de, ca, es). | > If you change `WG_PORT`, make sure to also change the exposed port. diff --git a/docker-compose.yml b/docker-compose.yml index 67f7fb74..3336589c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: wg-easy: environment: # Change Language: - # (Supports: en, ru, tr, no, pl, fr, de, ca) + # (Supports: en, ru, tr, no, pl, fr, de, ca, es) - 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 71266039..c5fbe339 100644 --- a/src/www/js/i18n.js +++ b/src/www/js/i18n.js @@ -218,4 +218,31 @@ const messages = { // eslint-disable-line no-unused-vars madeBy: 'Fet per', donate: 'Donatiu', }, + es: { // github.com/amarqz + name: 'Nombre', + password: 'Contraseña', + signIn: 'Iniciar sesión', + logout: 'Cerrar sesión', + updateAvailable: '¡Hay una actualización disponible!', + update: 'Actualizar', + clients: 'Clientes', + new: 'Nuevo', + deleteClient: 'Eliminar cliente', + deleteDialog1: '¿Estás seguro de que quieres borrar este cliente?', + deleteDialog2: 'Esta acción no podrá ser revertida.', + cancel: 'Cancelar', + create: 'Crear', + createdOn: 'Creado el ', + lastSeen: 'Última conexión el ', + totalDownload: 'Total descargado: ', + totalUpload: 'Total subido: ', + newClient: 'Nuevo cliente', + disableClient: 'Desactivar cliente', + enableClient: 'Activar cliente', + noClients: 'Aún no hay ningún cliente.', + showQR: 'Mostrar código QR', + downloadConfig: 'Descargar configuración', + madeBy: 'Hecho por', + donate: 'Donar', + }, }; From 9fb0b2b7606ffe144f4e972c73bd80b5dcc60d88 Mon Sep 17 00:00:00 2001 From: NPM Update Bot Date: Tue, 13 Feb 2024 00:12:36 +0000 Subject: [PATCH 05/10] npm: package updates --- src/package-lock.json | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index ebc18d21..fae33458 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -1286,17 +1286,20 @@ "peer": true }, "node_modules/define-data-property": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.2.tgz", - "integrity": "sha512-SRtsSqsDbgpJBbW3pABMCOt6rQyeM8s8RiyeSN8jYG8sYmt/kGJejbydttUsnDs1tadr19tvhT4ShwMyoqAm4g==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.3.tgz", + "integrity": "sha512-h3GBouC+RPtNX2N0hHVLo2ZwPYurq8mLmXpOLTsw71gr7lHt5VaI4vVkDUNOfiWmm48JEXe3VM7PmLX45AMmmg==", "dependencies": { "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.2", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/define-properties": { From 4b53c3d755436f0cfcabd27410b79775df553fb0 Mon Sep 17 00:00:00 2001 From: jkh0kr Date: Tue, 13 Feb 2024 11:19:42 +0900 Subject: [PATCH 06/10] Update i18n.js Add Korean language --- src/www/js/i18n.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/www/js/i18n.js b/src/www/js/i18n.js index c5fbe339..4d1bccfe 100644 --- a/src/www/js/i18n.js +++ b/src/www/js/i18n.js @@ -245,4 +245,31 @@ const messages = { // eslint-disable-line no-unused-vars madeBy: 'Hecho por', donate: 'Donar', }, + ko: { + name: '이름', + password: '암호', + signIn: '로그안', + logout: '로그아웃', + updateAvailable: '업데이트가 있습니다!', + update: '업데이트', + clients: '클라이언트', + new: '추가', + deleteClient: '클라이언트 삭제', + deleteDialog1: '삭제 하시겠습니까?', + deleteDialog2: '이 작업은 취소할 수 없습니다.', + cancel: '취소', + create: '생성', + createdOn: '생성일: ', + lastSeen: '마지막 사용 날짜: ', + totalDownload: '총 다운로드: ', + totalUpload: '총 업로드: ', + newClient: '새로운 클라이언트', + disableClient: '클라이언트 비활성화', + enableClient: '클라이언트 활성화', + noClients: '아직 클라이언트가 없습니다.', + showQR: 'QR 코드 표시', + downloadConfig: '구성 다운로드', + madeBy: '만든 사람', + donate: '기부', + }, }; From 14e97c8d86506160a8d9622a709859ba1f749ec8 Mon Sep 17 00:00:00 2001 From: NPM Update Bot Date: Tue, 13 Feb 2024 09:20:33 +0000 Subject: [PATCH 07/10] npm: package updates --- src/package-lock.json | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index fae33458..fa209388 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -1053,14 +1053,15 @@ } }, "node_modules/call-bind": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.6.tgz", - "integrity": "sha512-Mj50FLHtlsoVfRfnHaZvyrooHcrlceNZdL/QBvJJVd9Ta55qCQK0gs4ss2oZDeV9zFCs6ewzYgVE5yfVmfFpVg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { + "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.3", - "set-function-length": "^1.2.0" + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -1480,6 +1481,17 @@ "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", "dev": true }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-errors": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", @@ -2627,11 +2639,11 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dependencies": { - "get-intrinsic": "^1.2.2" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" From 257be24edfbfec67c4756152afab0f65c1f874b2 Mon Sep 17 00:00:00 2001 From: NPM Update Bot Date: Wed, 14 Feb 2024 00:12:09 +0000 Subject: [PATCH 08/10] npm: package updates --- src/package-lock.json | 55 ++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index fa209388..a3a0c418 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -1287,14 +1287,13 @@ "peer": true }, "node_modules/define-data-property": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.3.tgz", - "integrity": "sha512-h3GBouC+RPtNX2N0hHVLo2ZwPYurq8mLmXpOLTsw71gr7lHt5VaI4vVkDUNOfiWmm48JEXe3VM7PmLX45AMmmg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dependencies": { + "es-define-property": "^1.0.0", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.1" + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -1423,50 +1422,52 @@ } }, "node_modules/es-abstract": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.4.tgz", + "integrity": "sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg==", "dev": true, "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.5", - "es-set-tostringtag": "^2.0.1", + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.6", + "call-bind": "^1.0.7", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.2", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.2", - "get-symbol-description": "^1.0.0", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", + "has-property-descriptors": "^1.0.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "hasown": "^2.0.0", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", + "hasown": "^2.0.1", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.0", + "safe-regex-test": "^1.0.3", "string.prototype.trim": "^1.2.8", "string.prototype.trimend": "^1.0.7", "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", + "typed-array-buffer": "^1.0.1", "typed-array-byte-length": "^1.0.0", "typed-array-byte-offset": "^1.0.0", "typed-array-length": "^1.0.4", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.13" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" From deea4e17cd75ef7afc9033067e6667856e65abdc Mon Sep 17 00:00:00 2001 From: Viktor Yudov Date: Wed, 14 Feb 2024 15:52:29 +0300 Subject: [PATCH 09/10] Prepare release 1 --- .github/FUNDING.yml | 3 -- .github/workflows/codeql.yml | 1 - .github/workflows/deploy-development.yml | 6 ++-- .github/workflows/deploy-nightly.yml | 39 --------------------- .github/workflows/deploy.yml | 4 +-- .github/workflows/lint.yml | 1 - .github/workflows/npm-update-bot.yml | 3 +- .github/workflows/stale.yml | 35 ------------------- README.md | 43 +++++++++++++++++------- contributing.md | 15 ++++----- docker-compose.dev.yml | 10 ------ docs/changelog.json | 12 +------ package-lock.json | 11 ------ package.json | 8 ----- src/config.js | 5 +-- src/lib/Server.js | 7 ++++ src/lib/WireGuard.js | 1 - src/package-lock.json | 22 +++--------- src/package.json | 10 +++--- src/www/img/_logo.svg | 3 -- src/www/index.html | 16 +++++++++ src/www/js/api.js | 7 ++++ src/www/js/app.js | 7 +++- src/www/manifest.json | 6 ++-- wg-easy.service | 22 ------------ 25 files changed, 96 insertions(+), 201 deletions(-) delete mode 100644 .github/FUNDING.yml delete mode 100644 .github/workflows/deploy-nightly.yml delete mode 100644 .github/workflows/stale.yml delete mode 100644 docker-compose.dev.yml delete mode 100644 package-lock.json delete mode 100644 package.json delete mode 100644 src/www/img/_logo.svg delete mode 100644 wg-easy.service diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index a20fe5b0..00000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ -# These are supported funding model platforms - -github: weejewel diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 31d962d0..7c329335 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -12,7 +12,6 @@ jobs: analyze: name: Analyze runs-on: ubuntu-latest - if: github.repository_owner == 'wg-easy' permissions: actions: read contents: read diff --git a/.github/workflows/deploy-development.yml b/.github/workflows/deploy-development.yml index fa912f77..26cdd9f1 100644 --- a/.github/workflows/deploy-development.yml +++ b/.github/workflows/deploy-development.yml @@ -7,14 +7,14 @@ jobs: deploy: name: Build & Deploy runs-on: ubuntu-latest - if: github.repository_owner == 'wg-easy' + if: github.repository_owner == 'spcfox' permissions: packages: write contents: read steps: - uses: actions/checkout@v4 with: - ref: production + ref: master - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -34,4 +34,4 @@ jobs: with: push: true platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8 - tags: ghcr.io/wg-easy/wg-easy:development + tags: ghcr.io/spcfox/amnezia-wg-easy:development diff --git a/.github/workflows/deploy-nightly.yml b/.github/workflows/deploy-nightly.yml deleted file mode 100644 index 05d033cf..00000000 --- a/.github/workflows/deploy-nightly.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Build & Publish Nightly - -on: - workflow_dispatch: - schedule: - - cron: "0 0 * * *" - -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 & Publish Docker Image - uses: docker/build-push-action@v5 - with: - push: true - platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8 - tags: ghcr.io/wg-easy/wg-easy:nightly diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 332b3a76..b05254cc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,7 +10,7 @@ jobs: deploy: name: Build & Deploy runs-on: ubuntu-latest - if: github.repository_owner == 'wg-easy' + if: github.repository_owner == 'spcfox' permissions: packages: write contents: read @@ -40,4 +40,4 @@ jobs: with: push: true platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8 - tags: ghcr.io/wg-easy/wg-easy:latest, ghcr.io/wg-easy/wg-easy:${{ env.RELEASE }} + tags: ghcr.io/spcfox/amnezia-wg-easy:latest, ghcr.io/spcfox/amnezia-wg-easy:${{ env.RELEASE }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 088710ae..cf444d27 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,7 +11,6 @@ jobs: lint: name: Lint runs-on: ubuntu-latest - if: github.repository_owner == 'wg-easy' steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/npm-update-bot.yml b/.github/workflows/npm-update-bot.yml index 41ddfe3f..068f0699 100644 --- a/.github/workflows/npm-update-bot.yml +++ b/.github/workflows/npm-update-bot.yml @@ -10,12 +10,11 @@ jobs: npmupbot: name: NPM Update Bot 🤖 runs-on: ubuntu-latest - if: github.repository_owner == 'wg-easy' steps: - name: Checkout repository uses: actions/checkout@v4 with: - repository: wg-easy/wg-easy + repository: spcfox/amnezia-wg-easy ref: master - name: Setup Node uses: actions/setup-node@v4 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 868fa296..00000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,35 +0,0 @@ -# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. -# -# You can adjust the behavior by modifying this file. -# For more information, see: -# https://github.com/actions/stale -name: Mark stale issues and pull requests - -on: - workflow_dispatch: - schedule: - - cron: '*/5 * * * *' - -jobs: - stale: - - runs-on: ubuntu-latest - if: github.repository_owner == 'wg-easy' - permissions: - issues: write - pull-requests: write - - steps: - - uses: actions/stale@v9 - with: - days-before-issue-stale: 30 - days-before-issue-close: 14 - stale-issue-label: "stale" - stale-issue-message: "This issue is stale because it has been open for 30 days with no activity." - close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." - days-before-pr-stale: 30 - days-before-pr-close: 14 - stale-pr-message: "This PR is stale because it has been open for 30 days with no activity." - close-pr-message: "This PR was closed because it has been inactive for 14 days since being marked as stale." - repo-token: ${{ secrets.GITHUB_TOKEN }} - operations-per-run: 100 diff --git a/README.md b/README.md index 07e4dfe3..80d91e8d 100644 --- a/README.md +++ b/README.md @@ -35,16 +35,24 @@ $ exit And log in again. -### 2. Set environment variables - -In [.env](.env) set the following environment variables: -- Replace `YOUR_SERVER_IP` with your WAN IP, or a Dynamic DNS hostname. -- Replace `YOUR_ADMIN_PASSWORD` with a password to log in on the Web UI. - -### 3. Build & run the Docker image +### 2. Run AmneziaWG Easy ```bash -$ docker-compose up -d +$ docker run -d \ + --name=amnezia-wg-easy \ + -e LANG=en \ + -e WG_HOST=🚨YOUR_SERVER_IP \ + -e PASSWORD=🚨YOUR_ADMIN_PASSWORD \ + -v ~/.amnezia-wg-easy:/etc/wireguard \ + -p 51820:51820/udp \ + -p 51821:51821/tcp \ + --cap-add=NET_ADMIN \ + --cap-add=SYS_MODULE \ + --sysctl="net.ipv4.conf.all.src_valid_mark=1" \ + --sysctl="net.ipv4.ip_forward=1" \ + --device=/dev/net/tun:/dev/net/tun \ + --restart unless-stopped \ + ghcr.io/spcfox/amnezia-wg-easy ``` The Web UI will now be available on `http://0.0.0.0:51821`. @@ -58,6 +66,7 @@ These options can be configured by setting environment variables using `-e KEY=" | Env | Default | Example | Description | | - | - | - | - | | `LANGUAGE` | `en` | `de` | Web UI language. List of available languages in [i18n.js]() | +| `CHECK_UPDATE` | `true` | `false` | Check for a new version and display a notification about its availability | | `PORT` | `51821` | `6789` | TCP port for Web UI. | | `WEBUI_HOST` | `0.0.0.0` | `localhost` | IP address web UI binds to. | | `PASSWORD` | - | `foobar123` | When set, requires a password when logging in to the Web UI. | @@ -78,10 +87,20 @@ These options can be configured by setting environment variables using `-e KEY=" | `JMAX` | `1000` | `250` | Junk packet maximum size — maximum size for Junk packets. | | `S1` | `random` | `75` | Init packet junk size — the size of random data that will be added to the init packet, the size of which is initially fixed. | | `S2` | `random` | `75` | Response packet junk size — the size of random data that will be added to the response packet, the size of which is initially fixed. | -| `H1` | `random` | `59869232` | Init packet magic header — the header of the first byte of the handshake. Must be < uint_max. | -| `H2` | `random` | `869587260` | Response packet magic header — header of the first byte of the handshake response. Must be < uint_max. | -| `H3` | `random` | `1632311713` | Underload packet magic header — UnderLoad packet header. Must be < uint_max. | -| `H4` | `random` | `820711365` | Transport packet magic header — header of the packet of the data packet. Must be < uint_max. | +| `H1` | `random` | `1234567891` | Init packet magic header — the header of the first byte of the handshake. Must be < uint_max. | +| `H2` | `random` | `1234567892` | Response packet magic header — header of the first byte of the handshake response. Must be < uint_max. | +| `H3` | `random` | `1234567893` | Underload packet magic header — UnderLoad packet header. Must be < uint_max. | +| `H4` | `random` | `1234567894` | Transport packet magic header — header of the packet of the data packet. Must be < uint_max. | + +## Updating + +To update to the latest version, simply run: + +```bash +docker stop amnezia-wg-easy +docker rm amnezia-wg-easy +docker pull ghcr.io/spcfox/amnezia-wg-easy +``` ## Thanks diff --git a/contributing.md b/contributing.md index 83cb3d94..4738daa3 100644 --- a/contributing.md +++ b/contributing.md @@ -1,6 +1,6 @@ -# Contributing to wg-easy +# Contributing to amnezia-wg-easy -First and foremost, thank you! We appreciate that you want to contribute to wg-easy, your time is valuable, and your contributions mean a lot to us. +First and foremost, thank you! We appreciate that you want to contribute to amnezia-wg-easy, your time is valuable, and your contributions mean a lot to us. ## Important! @@ -25,14 +25,13 @@ Creating an issue is the simplest form of contributing to a project. But there a - Bug reports -## Showing support for wg-easy +## Showing support for amnezia-wg-easy Please keep in mind that open source software is built by people like you, who spend their free time creating things the rest the community can use. -Don't have time to contribute? No worries, here are some other ways to show your support for wg-easy: +Don't have time to contribute? No worries, here are some other ways to show your support for amnezia-wg-easy: -- star the [project](https://github.com/wg-easy/wg-easy) -- tweet your support for wg-easy +- star the [project](https://github.com/spcfox/amnezia-wg-easy) ## Issues @@ -67,14 +66,14 @@ Please be as descriptive as possible when creating an issue. Give us the informa - **description**: (required) What is the bug you're experiencing? How are you using this library/app? - **OS**: (required) what operating system are you on? -- **version**: (required) please note the version of wg-easy are you using +- **version**: (required) please note the version of amnezia-wg-easy are you using - **error messages**: (required) please paste any error messages into the issue, or a [gist](https://gist.github.com/) - **extensions, plugins, helpers, etc** (if applicable): please list any extensions you're using ### Closing issues -The original poster or the maintainers of wg-easy may close an issue at any time. Typically, but not exclusively, issues are closed when: +The original poster or the maintainers of amnezia-wg-easy may close an issue at any time. Typically, but not exclusively, issues are closed when: - The issue is resolved - The project's maintainers have determined the issue is out of scope diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml deleted file mode 100644 index 08e46978..00000000 --- a/docker-compose.dev.yml +++ /dev/null @@ -1,10 +0,0 @@ -version: "3.8" -services: - wg-easy: - image: wg-easy - command: npm run serve - volumes: - - ./src/:/app/ - environment: - # - PASSWORD=p - - WG_HOST=192.168.1.233 diff --git a/docs/changelog.json b/docs/changelog.json index e9d1b9e5..49fc7d85 100644 --- a/docs/changelog.json +++ b/docs/changelog.json @@ -1,13 +1,3 @@ { - "1": "Initial version. Enjoy!", - "2": "You can now rename a client, and update the address. Enjoy!", - "3": "Many improvements and small changes. Enjoy!", - "4": "Now with pretty charts for client's network speed. Enjoy!", - "5": "Many small improvements & feature requests. Enjoy!", - "6": "Many small performance improvements & bug fixes. Enjoy!", - "7": "Improved the look & performance of the upload/download chart.", - "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" + "1": "Initial version. Enjoy!" } diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index f57675bd..00000000 --- a/package-lock.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "wg-easy", - "version": "1.0.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "version": "1.0.1" - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index ded9b4e9..00000000 --- a/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "version": "1.0.1", - "scripts": { - "build": "DOCKER_BUILDKIT=1 docker build --tag wg-easy .", - "serve": "docker-compose -f docker-compose.yml -f docker-compose.dev.yml up", - "start": "docker run --env WG_HOST=0.0.0.0 --name wg-easy --cap-add=NET_ADMIN --cap-add=SYS_MODULE --sysctl=\"net.ipv4.conf.all.src_valid_mark=1\" --mount type=bind,source=\"$(pwd)\"/config,target=/etc/wireguard -p 51820:51820/udp -p 51821:51821/tcp wg-easy" - } -} diff --git a/src/config.js b/src/config.js index 65be0b63..6aefb4b4 100644 --- a/src/config.js +++ b/src/config.js @@ -2,6 +2,7 @@ const { release } = require('./package.json'); +module.exports.CHECK_UPDATE = process.env.CHECK_UPDATE ? process.env.CHECK_UPDATE.toLowerCase() === 'true' : true; module.exports.RELEASE = release; module.exports.PORT = process.env.PORT || 51821; module.exports.WEBUI_HOST = process.env.WEBUI_HOST || '0.0.0.0'; @@ -31,8 +32,8 @@ module.exports.WG_POST_DOWN = process.env.WG_POST_DOWN || ''; module.exports.LANG = process.env.LANGUAGE || 'en'; const getRandomInt = (min, max) => min + Math.floor(Math.random() * (max - min)); -const getRandomJunkSize = () => getRandomInt(15, 150) -const getRandomHeader = () => getRandomInt(1, 2_147_483_647) +const getRandomJunkSize = () => getRandomInt(15, 150); +const getRandomHeader = () => getRandomInt(1, 2_147_483_647); module.exports.JC = process.env.JC || getRandomInt(3, 10); module.exports.JMIN = process.env.JMIN || 50; diff --git a/src/lib/Server.js b/src/lib/Server.js index 1f00a6b4..60cda10f 100644 --- a/src/lib/Server.js +++ b/src/lib/Server.js @@ -13,6 +13,7 @@ const ServerError = require('./ServerError'); const WireGuard = require('../services/WireGuard'); const { + CHECK_UPDATE, PORT, WEBUI_HOST, RELEASE, @@ -37,6 +38,12 @@ module.exports = class Server { }, })) + .get('/api/check-update', (Util.promisify(async () => { + return { + checkUpdate: CHECK_UPDATE, + }; + }))) + .get('/api/release', (Util.promisify(async () => { return RELEASE; }))) diff --git a/src/lib/WireGuard.js b/src/lib/WireGuard.js index 8daffc87..267a16d6 100644 --- a/src/lib/WireGuard.js +++ b/src/lib/WireGuard.js @@ -75,7 +75,6 @@ module.exports = class WireGuard { clients: {}, }; - debug('Configuration generated.'); } diff --git a/src/package-lock.json b/src/package-lock.json index 0c280ca1..9cc12699 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -1,12 +1,12 @@ { - "name": "wg-easy", - "version": "1.0.1", + "name": "amnezia-wg-easy", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "wg-easy", - "version": "1.0.1", + "name": "amnezia-wg-easy", + "version": "1.0.0", "license": "GPL", "dependencies": { "bcryptjs": "^2.4.3", @@ -2380,20 +2380,6 @@ "dev": true, "peer": true }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", diff --git a/src/package.json b/src/package.json index 68056acb..370efb82 100644 --- a/src/package.json +++ b/src/package.json @@ -1,8 +1,8 @@ { - "release": "11", - "name": "wg-easy", - "version": "1.0.1", - "description": "The easiest way to run WireGuard VPN + Web-based Admin UI.", + "release": "1", + "name": "amnezia-wg-easy", + "version": "1.0.0", + "description": "The easiest way to run AmneziaWG VPN + Web-based Admin UI.", "main": "server.js", "scripts": { "serve": "DEBUG=Server,WireGuard nodemon server.js", @@ -10,7 +10,7 @@ "lint": "eslint .", "buildcss": "npx tailwindcss -i ./www/src/css/app.css -o ./www/css/app.css" }, - "author": "Emile Nijssen", + "author": "Viktor Yudov", "license": "GPL", "dependencies": { "bcryptjs": "^2.4.3", diff --git a/src/www/img/_logo.svg b/src/www/img/_logo.svg deleted file mode 100644 index 82df90f1..00000000 --- a/src/www/img/_logo.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/www/index.html b/src/www/index.html index ace5021d..e9d419d7 100644 --- a/src/www/index.html +++ b/src/www/index.html @@ -40,6 +40,22 @@

+
+
+
+

{{$t("updateAvailable")}}

+

{{latestRelease.changelog}}

+
+ + + {{$t("update")}} → + +
+
+
diff --git a/src/www/js/api.js b/src/www/js/api.js index 366aeaa1..51155d1b 100644 --- a/src/www/js/api.js +++ b/src/www/js/api.js @@ -29,6 +29,13 @@ class API { return json; } + async checkUpdate() { + return this.call({ + method: 'get', + path: '/check-update', + }); + } + async getRelease() { return this.call({ method: 'get', diff --git a/src/www/js/app.js b/src/www/js/app.js index 45f7118b..36a49f59 100644 --- a/src/www/js/app.js +++ b/src/www/js/app.js @@ -5,6 +5,8 @@ 'use strict'; +const CHANGELOG_URL = 'https://raw.githubusercontent.com/spcfox/amnezia-wg-easy/production/docs/changelog.json'; + function bytes(bytes, decimals, kib, maxunit) { kib = kib || false; if (bytes === 0) return '0 B'; @@ -299,8 +301,11 @@ new Vue({ i18n.locale = lang; } + const checkUpdate = await this.api.checkUpdate(); + if (!checkUpdate) return; + const currentRelease = await this.api.getRelease(); - const latestRelease = await fetch('https://wg-easy.github.io/wg-easy/changelog.json') + const latestRelease = await fetch(CHANGELOG_URL) .then((res) => res.json()) .then((releases) => { const releasesArray = Object.entries(releases).map(([version, changelog]) => ({ diff --git a/src/www/manifest.json b/src/www/manifest.json index e0834f74..bbb7635b 100644 --- a/src/www/manifest.json +++ b/src/www/manifest.json @@ -1,11 +1,11 @@ { - "name": "WireGuard", + "name": "AmneziaWG", "display": "standalone", "background_color": "#fff", "icons": [ { - "src": "img/favicon.png", - "type": "image/png" + "src": "img/favicon.ico", + "type": "image/x-icon" } ] } diff --git a/wg-easy.service b/wg-easy.service deleted file mode 100644 index 1cc33614..00000000 --- a/wg-easy.service +++ /dev/null @@ -1,22 +0,0 @@ -[Unit] -Description=Wireguard VPN + + Web-based Admin UI -After=network-online.target nss-lookup.target - -[Service] -Environment="WG_HOST=raspberrypi.local" # Change this to your host's public address or static public ip. -Environment="PASSWORD=REPLACEME" # When set, requires a password when logging in to the Web UI, to disable add a hashtag -#Environment="WG_DEFAULT_ADDRESS=10.0.8.x" #Clients IP address range. -#Environment="WG_DEFAULT_DNS=10.0.8.1, 1.1.1.1" #DNS server clients will use. If set to blank value, clients will not use any DNS. -#Environment="WG_ALLOWED_IPS=0.0.0.0/0,::/0" #Allowed IPs clients will use. -#Environment="WG_DEVICE=ens1" #Ethernet device the wireguard traffic should be forwarded through. -#Environment="PORT=80" #TCP port for Web UI. Default : 51821 -#Environment="WG_MTU=1420" #The MTU the clients will use. Server uses default WG MTU -#Environment="WG_PERSISTENT_KEEPALIVE=25" #Value in seconds to keep the "connection" open. If this value is 0, then connections won't be kept alive. -Type=simple -RemainAfterExit=no -ExecStart=/usr/bin/env node /app/server.js -Restart=on-failure -RestartSec=1 - -[Install] -WantedBy=multi-user.target From e65dd0d4d346629086ffeada4a3111dc8401a09d Mon Sep 17 00:00:00 2001 From: Viktor Yudov Date: Wed, 14 Feb 2024 16:21:05 +0300 Subject: [PATCH 10/10] fix disable update checking --- src/lib/Server.js | 4 +--- src/www/js/api.js | 2 +- src/www/js/app.js | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/Server.js b/src/lib/Server.js index 60cda10f..eaf34cfb 100644 --- a/src/lib/Server.js +++ b/src/lib/Server.js @@ -39,9 +39,7 @@ module.exports = class Server { })) .get('/api/check-update', (Util.promisify(async () => { - return { - checkUpdate: CHECK_UPDATE, - }; + return CHECK_UPDATE; }))) .get('/api/release', (Util.promisify(async () => { diff --git a/src/www/js/api.js b/src/www/js/api.js index 51155d1b..bb244e07 100644 --- a/src/www/js/api.js +++ b/src/www/js/api.js @@ -29,7 +29,7 @@ class API { return json; } - async checkUpdate() { + async getCheckUpdate() { return this.call({ method: 'get', path: '/check-update', diff --git a/src/www/js/app.js b/src/www/js/app.js index 36a49f59..47e82418 100644 --- a/src/www/js/app.js +++ b/src/www/js/app.js @@ -301,7 +301,7 @@ new Vue({ i18n.locale = lang; } - const checkUpdate = await this.api.checkUpdate(); + const checkUpdate = await this.api.getCheckUpdate(); if (!checkUpdate) return; const currentRelease = await this.api.getRelease();