diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..b2a65b9 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: Lint + +on: + push: + branches: + - master + - production + pull_request: + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: '14' + + - run: | + cd src + npm ci + npm run lint diff --git a/.wg-easy/wg0.conf b/.wg-easy/wg0.conf deleted file mode 100644 index 73c5f2f..0000000 --- a/.wg-easy/wg0.conf +++ /dev/null @@ -1,9 +0,0 @@ - -# Note: Do not edit this file directly. -# Your changes will be overwritten! - -# Server -[Interface] -PrivateKey = 8JtWwlHvx4ogphP601ABdvNFXbd1noCd+Sn9fg19jWA= -Address = 10.8.0.1/24 -ListenPort = 51820 \ No newline at end of file diff --git a/.wg-easy/wg0.json b/.wg-easy/wg0.json deleted file mode 100644 index 4175eef..0000000 --- a/.wg-easy/wg0.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "server": { - "privateKey": "8JtWwlHvx4ogphP601ABdvNFXbd1noCd+Sn9fg19jWA=", - "publicKey": "065+jEZi4CMWbwSCrixByy3D+haZR2e+kjmxMq6h+EY=", - "address": "10.8.0.1" - }, - "clients": {} -} \ No newline at end of file diff --git a/README.md b/README.md index 9039dc9..0974992 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,26 @@ # WireGuard Easy [![Build & Publish Docker Image to Docker Hub](https://github.com/WeeJeWel/wg-easy/actions/workflows/deploy.yml/badge.svg?branch=production)](https://github.com/WeeJeWel/wg-easy/actions/workflows/deploy.yml) +[![Lint](https://github.com/WeeJeWel/wg-easy/actions/workflows/lint.yml/badge.svg?branch=master)](https://github.com/WeeJeWel/wg-easy/actions/workflows/lint.yml) +[![Docker](https://img.shields.io/docker/v/weejewel/wg-easy/latest)](https://hub.docker.com/r/weejewel/wg-easy) +[![Docker](https://img.shields.io/docker/pulls/weejewel/wg-easy.svg)](https://hub.docker.com/r/weejewel/wg-easy) +[![Sponsor](https://img.shields.io/github/sponsors/weejewel)](https://github.com/sponsors/WeeJeWel) You have found the easiest way to install & manage WireGuard on any Linux host!
- +
## Features -* All-in-one: WireGuard + Web UI -* A beautiful management Web UI -* Easy installation -* List, create, delete, enable & disable clients -* Show a client's QR code -* Download a client's configuration file -* Statistics for which clients are connected -* Gravatar support 😏 +* All-in-one: WireGuard + Web UI. +* Easy installation, simple to use. +* List, create, delete, enable & disable clients. +* Show a client's QR code. +* Download a client's configuration file. +* Statistics for which clients are connected. +* Gravatar support. ## Installation @@ -52,7 +55,7 @@ Optionally, set a Web UI password by uncommenting `PASSWORD=foobar123` and chang Finally, run WireGuard. It will automatically start after a reboot. ```bash -$ docker-compose up +$ docker-compose up --detach ``` The Web UI will be available on `http://0.0.0.0:51821`. You can create new clients there. diff --git a/docker-compose.yml b/docker-compose.yml index 92ed610..09ec7ff 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: image: weejewel/wg-easy container_name: wg-easy volumes: - - .wg-easy:/etc/wireguard + - .:/etc/wireguard ports: - "51820:51820/udp" - "51821:51821/tcp" diff --git a/src/.eslintrc.json b/src/.eslintrc.json index f0d4a77..4652c8d 100644 --- a/src/.eslintrc.json +++ b/src/.eslintrc.json @@ -1,5 +1,8 @@ { "extends": "athom", + "ignorePatterns": [ + "**/vendor/*.js" + ], "rules": { "consistent-return": "off", "no-shadow": "off" diff --git a/src/package.json b/src/package.json index 611c879..f061e5b 100644 --- a/src/package.json +++ b/src/package.json @@ -5,7 +5,8 @@ "main": "server.js", "scripts": { "serve": "DEBUG=Server,WireGuard WG_HOST=0.0.0.0 WG_PATH=../config/ nodemon server.js", - "serve-with-password": "PASSWORD=wg npm run serve" + "serve-with-password": "PASSWORD=wg npm run serve", + "lint": "eslint ." }, "author": "Emile Nijssen", "license": "GPL",