Browse Source

Merge branch 'master' of https://github.com/wg-easy/wg-easy

pull/1413/head
almaz 2 years ago
parent
commit
9b61d7ec3e
  1. 3
      .github/CODEOWNERS
  2. 28
      .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
  3. 4
      How_to_generate_an_bcrypt_hash.md
  4. 4
      README.md
  5. 10
      docker-compose.dev.yml
  6. 1
      docker-compose.yml
  7. 5
      docs/changelog.json
  8. 520
      src/package-lock.json
  9. 6
      src/package.json
  10. 14
      src/www/css/app.css
  11. 21
      src/www/js/i18n.js

3
.github/CODEOWNERS

@ -1,3 +1,4 @@
# Copyright (c) Emile Nijssen (WeeJeWel) # Copyright (c) Emile Nijssen (WeeJeWel)
# Founder and Codeowner of WireGuard Easy (wg-easy) # Founder and Codeowner of WireGuard Easy (wg-easy)
* @WeeJeWel # Maintained by Philip Heiduck (pheiduck)
* @pheiduck

28
.github/PULL_REQUEST_TEMPLATE/pull_request_template.md

@ -0,0 +1,28 @@
<!--- Provide a general summary of your changes in the Title above -->
## Description
<!--- Describe your changes in detail -->
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
## How has this been tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, tests ran to see how -->
<!--- your change affects other areas of the code, etc. -->
## Screenshots (if appropriate):
## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.

4
How_to_generate_an_bcrypt_hash.md

@ -13,7 +13,7 @@ To generate a bcrypt password hash using docker, run the following command :
```sh ```sh
docker run ghcr.io/wg-easy/wg-easy wgpw YOUR_PASSWORD docker run ghcr.io/wg-easy/wg-easy wgpw YOUR_PASSWORD
PASSWORD_HASH='$2b$12$coPqCsPtcFO.Ab99xylBNOW4.Iu7OOA2/ZIboHN6/oyxca3MWo7fW' // litteraly YOUR_PASSWORD PASSWORD_HASH='$2b$12$coPqCsPtcFO.Ab99xylBNOW4.Iu7OOA2/ZIboHN6/oyxca3MWo7fW' // literally YOUR_PASSWORD
``` ```
*Important* : make sure to enclose your password in single quotes when you run `docker run` command : *Important* : make sure to enclose your password in single quotes when you run `docker run` command :
@ -25,4 +25,4 @@ $ echo "$2b$12$coPqCsPtcF"
b2 b2
$ echo '$2b$12$coPqCsPtcF' $ echo '$2b$12$coPqCsPtcF'
$2b$12$coPqCsPtcF $2b$12$coPqCsPtcF
``` ```

4
README.md

@ -32,7 +32,8 @@ You have found the easiest way to install & manage WireGuard on any Linux host!
## Versions ## Versions
We provide more then 1 docker image to get, this will help you decide which one is best for you. We provide more then 1 docker image to get, this will help you decide which one is best for you. <br>
For **stable** versions instead of nightly or development please read **README** from the **production** branch!
| tag | Branch | Example | Description | | tag | Branch | Example | Description |
| - | - | - | - | | - | - | - | - |
@ -103,7 +104,6 @@ These options can be configured by setting environment variables using `-e KEY="
| `PORT` | `51821` | `6789` | TCP port for Web UI. | | `PORT` | `51821` | `6789` | TCP port for Web UI. |
| `WEBUI_HOST` | `0.0.0.0` | `localhost` | IP address web UI binds to. | | `WEBUI_HOST` | `0.0.0.0` | `localhost` | IP address web UI binds to. |
| `PASSWORD_HASH` | - | `$2y$05$Ci...` | When set, requires a password when logging in to the Web UI. See [How to generate an bcrypt hash.md]("https://github.com/wg-easy/wg-easy/blob/master/How_to_generate_an_bcrypt_hash.md") for know how generate the hash. | | `PASSWORD_HASH` | - | `$2y$05$Ci...` | When set, requires a password when logging in to the Web UI. See [How to generate an bcrypt hash.md]("https://github.com/wg-easy/wg-easy/blob/master/How_to_generate_an_bcrypt_hash.md") for know how generate the hash. |
| `PASSWORD` (deprecated) | - | `foobar123` | When set, requires a password when logging in to the Web UI. *(Not used if `PASSWORD_HASH` is set)* |
| `WG_HOST` | - | `vpn.myserver.com` | The public hostname of your VPN server. | | `WG_HOST` | - | `vpn.myserver.com` | The public hostname of your VPN server. |
| `WG_DEVICE` | `eth0` | `ens6f0` | Ethernet device the wireguard traffic should be forwarded through. | | `WG_DEVICE` | `eth0` | `ens6f0` | Ethernet device the wireguard traffic should be forwarded through. |
| `WG_PORT` | `51820` | `12345` | The public UDP port of your VPN server. WireGuard will listen on that (othwise default) inside the Docker container. | | `WG_PORT` | `51820` | `12345` | The public UDP port of your VPN server. WireGuard will listen on that (othwise default) inside the Docker container. |

10
docker-compose.dev.yml

@ -1,9 +1,17 @@
services: services:
wg-easy: wg-easy:
image: wg-easy build:
dockerfile: ./Dockerfile
command: npm run serve command: npm run serve
volumes: volumes:
- ./src/:/app/ - ./src/:/app/
# - ./data/:/etc/wireguard
ports:
- "51820:51820/udp"
- "51821:51821/tcp"
cap_add:
- NET_ADMIN
- SYS_MODULE
environment: environment:
# - PASSWORD=p # - PASSWORD=p
- WG_HOST=192.168.1.233 - WG_HOST=192.168.1.233

1
docker-compose.yml

@ -12,7 +12,6 @@ services:
- WG_HOST=raspberrypi.local - WG_HOST=raspberrypi.local
# Optional: # Optional:
# - PASSWORD=foobar123 (deprecated, see readme)
# - PASSWORD_HASH=$$2y$$10$$hBCoykrB95WSzuV4fafBzOHWKu9sbyVa34GJr8VV5R/pIelfEMYyG (needs double $$, hash of 'foobar123'; see "How_to_generate_an_bcrypt_hash.md" for generate the hash) # - PASSWORD_HASH=$$2y$$10$$hBCoykrB95WSzuV4fafBzOHWKu9sbyVa34GJr8VV5R/pIelfEMYyG (needs double $$, hash of 'foobar123'; see "How_to_generate_an_bcrypt_hash.md" for generate the hash)
# - PORT=51821 # - PORT=51821
# - WG_PORT=51820 # - WG_PORT=51820

5
docs/changelog.json

@ -1,6 +1,6 @@
{ {
"1": "Initial version. Enjoy!", "1": "Initial version. Enjoy!",
"2": "You can now rename a client, and update the address. Enjoy!", "2": "You can now rename a client & update the address. Enjoy!",
"3": "Many improvements and small changes. Enjoy!", "3": "Many improvements and small changes. Enjoy!",
"4": "Now with pretty charts for client's network speed. Enjoy!", "4": "Now with pretty charts for client's network speed. Enjoy!",
"5": "Many small improvements & feature requests. Enjoy!", "5": "Many small improvements & feature requests. Enjoy!",
@ -11,5 +11,6 @@
"10": "Added sessionless HTTP API auth & automatic dark mode.", "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.", "12": "UI_TRAFFIC_STATS, Import json configurations with no PreShared-Key, allow clients with no privateKey & more.",
"13": "New framework (h3), UI_CHART_TYPE, some bugfixes and more." "13": "New framework (h3), UI_CHART_TYPE, some bugfixes & more.",
"14": "Home Assistent support, PASSWORD_HASH (inc. Helper), translation updates bugfixes & more."
} }

520
src/package-lock.json

File diff suppressed because it is too large

6
src/package.json

@ -1,6 +1,6 @@
{ {
"release": { "release": {
"version": "13" "version": "14"
}, },
"name": "wg-easy", "name": "wg-easy",
"version": "1.0.1", "version": "1.0.1",
@ -16,7 +16,7 @@
"license": "CC BY-NC-SA 4.0", "license": "CC BY-NC-SA 4.0",
"dependencies": { "dependencies": {
"bcryptjs": "^2.4.3", "bcryptjs": "^2.4.3",
"debug": "^4.3.5", "debug": "^4.3.6",
"express-session": "^1.18.0", "express-session": "^1.18.0",
"h3": "^1.12.0", "h3": "^1.12.0",
"qrcode": "^1.5.3" "qrcode": "^1.5.3"
@ -24,7 +24,7 @@
"devDependencies": { "devDependencies": {
"eslint-config-athom": "^3.1.3", "eslint-config-athom": "^3.1.3",
"nodemon": "^3.1.4", "nodemon": "^3.1.4",
"tailwindcss": "^3.4.6" "tailwindcss": "^3.4.7"
}, },
"nodemonConfig": { "nodemonConfig": {
"ignore": [ "ignore": [

14
src/www/css/app.css

@ -1,5 +1,5 @@
/* /*
! tailwindcss v3.4.6 | MIT License | https://tailwindcss.com ! tailwindcss v3.4.7 | MIT License | https://tailwindcss.com
*/ */
/* /*
@ -803,6 +803,10 @@ video {
height: 1.5rem; height: 1.5rem;
} }
.h-1 {
height: 0.25rem;
}
.h-10 { .h-10 {
height: 2.5rem; height: 2.5rem;
} }
@ -843,6 +847,10 @@ video {
min-height: 100vh; min-height: 100vh;
} }
.w-1 {
width: 0.25rem;
}
.w-10 { .w-10 {
width: 2.5rem; width: 2.5rem;
} }
@ -960,6 +968,10 @@ video {
flex-direction: column-reverse; flex-direction: column-reverse;
} }
.flex-wrap {
flex-wrap: wrap;
}
.items-end { .items-end {
align-items: flex-end; align-items: flex-end;
} }

21
src/www/js/i18n.js

@ -84,10 +84,17 @@ const messages = { // eslint-disable-line no-unused-vars
disableClient: 'Выключить клиента', disableClient: 'Выключить клиента',
enableClient: 'Включить клиента', enableClient: 'Включить клиента',
noClients: 'Пока нет клиентов.', noClients: 'Пока нет клиентов.',
noPrivKey: 'Невозможно создать конфигурацию: у клиента нет известного приватного ключа.',
showQR: 'Показать QR-код', showQR: 'Показать QR-код',
downloadConfig: 'Скачать конфигурацию', downloadConfig: 'Скачать конфигурацию',
madeBy: 'Автор', madeBy: 'Автор',
donate: 'Поблагодарить', donate: 'Поблагодарить',
toggleCharts: 'Показать/скрыть графики',
theme: { dark: 'Темная тема', light: 'Светлая тема', auto: 'Как в системе' },
restore: 'Восстановить',
backup: 'Резервная копия',
titleRestoreConfig: 'Восстановить конфигурацию',
titleBackupConfig: 'Создать резервную копию конфигурации',
}, },
tr: { // Müslüm Barış Korkmazer @babico tr: { // Müslüm Barış Korkmazer @babico
name: 'İsim', name: 'İsim',
@ -103,19 +110,25 @@ const messages = { // eslint-disable-line no-unused-vars
deleteDialog2: 'Bu işlem geri alınamaz.', deleteDialog2: 'Bu işlem geri alınamaz.',
cancel: 'İptal', cancel: 'İptal',
create: 'Oluştur', create: 'Oluştur',
createdAt: 'Şu saatte oluşturuldu: ', createdOn: 'Şu saatte oluşturuldu: ',
lastSeen: 'Son görülme tarihi: ', lastSeen: 'Son görülme tarihi: ',
totalDownload: 'Toplam İndirme: ', totalDownload: 'Toplam İndirme: ',
totalUpload: 'Toplam Yükleme: ', totalUpload: 'Toplam Yükleme: ',
newClient: 'Yeni Kullanıcı', newClient: 'Yeni Kullanıcı',
disableClient: 'İstemciyi Devre Dışı Bırak', disableClient: 'Kullanıcıyı Devre Dışı Bırak',
enableClient: 'İstemciyi Etkinleştir', enableClient: 'Kullanıcıyı Etkinleştir',
noClients: 'Henüz kullanıcı yok.', noClients: 'Henüz kullanıcı yok.',
noPrivKey: 'Bu istemcinin bilinen bir özel anahtarı yok. Yapılandırma oluşturulamıyor.',
showQR: 'QR Kodunu Göster', showQR: 'QR Kodunu Göster',
downloadConfig: 'Yapılandırmayı İndir', downloadConfig: 'Yapılandırmayı İndir',
madeBy: 'Yapan Kişi: ', madeBy: 'Yapan Kişi: ',
donate: 'Bağış Yap', donate: 'Bağış Yap',
changeLang: 'Dil Değiştir', toggleCharts: 'Grafiği göster/gizle',
theme: { dark: 'Karanlık tema', light: 'Açık tema', auto: 'Otomatik tema' },
restore: 'Geri yükle',
backup: 'Yedekle',
titleRestoreConfig: 'Yapılandırmanızı geri yükleyin',
titleBackupConfig: 'Yapılandırmanızı yedekleyin',
}, },
no: { // github.com/digvalley no: { // github.com/digvalley
name: 'Navn', name: 'Navn',

Loading…
Cancel
Save