diff --git a/.github/workflows/deploy-pr.yml b/.github/workflows/deploy-pr.yml new file mode 100644 index 000000000..3a3cdb13f --- /dev/null +++ b/.github/workflows/deploy-pr.yml @@ -0,0 +1,38 @@ +name: Build Pull Request + +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 diff --git a/README.md b/README.md index 77d975edb..d5687ca85 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,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 @@ -40,9 +42,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. @@ -76,6 +78,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) ЁЯН╗ @@ -101,7 +107,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. @@ -118,6 +124,16 @@ docker pull dartegnian/wg-easy-m3 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) diff --git a/docker-compose.yml b/docker-compose.yml index 4334b2b11..c9b2f5b7b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,8 +6,8 @@ services: wg-easy-m3: environment: # Change Language: + # (Supports: en, ua, ru, tr, no, pl, fr, de, ca, es, ko, vi, nl, is, pt, chs, cht, it, th, hi) - LANG=en - # (Supports: en, ua, ru, tr, no, pl, fr, de, ca, es, ko, vi, nl, is, pt, chs, cht, it, th) # тЪая╕П Required: # Change this to your host's public address - WG_HOST=wg.dartegnian.com 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/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 () => { diff --git a/src/package-lock.json b/src/package-lock.json index 05e369ade..9e38fbb48 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": { @@ -3852,9 +3855,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", diff --git a/src/package.json b/src/package.json index 5bc5930c0..88ee911fe 100644 --- a/src/package.json +++ b/src/package.json @@ -1,5 +1,5 @@ { - "release": "11", + "release": "12", "name": "wg-easy-m3", "version": "1.0.1", "description": "The easiest way to run WireGuard VPN + Web-based Admin UI.", 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: 'рджрд╛рди рдХрд░реЗрдВ', + }, };