Version 15.0.0-beta.1: Rewrite in Nuxt and Typescript, Move to UI (#1333)
* Add Nuxt, ESM, Typescript (#1244)
* wip: add nuxt
* basic implementation
* add changes from c9ff248
* update workflow, add eslint
* add types, fix wrong error message
* install correct bcrypt, move eslint to dev modules
* add docker dev script
* fix styling
* add wireguard routes
* typescript, vendors
* fix lint workflow
* lint fixes
* add prettier, format
* fix lint, add vscode settings
* better typescript
* use auto imports
* add prettier eslint config
* cache config
* fix styling issue, fix formatting
* fix tailwind problems
* fix logout not showing
* fix lint action
* Fix session middleware
* split files into correct methods
* use type safe api, fix typescript errors
* better return types
not tested
* change default working directory
* update workflows
* fix error
* correct session middleware, type safe session
* convert undefined to boolean
* correct key for api errors
* use zod to validate input
* add more jobs to check for good code
* add pinia
Co-authored-by: Sergei Birukov <suxscribe@gmail.com>
Co-authored-by: Bernd Storath <bernd.storath@offizium.de>
* use color mode plugin
* !! use better storage key name
Breaking as if old key exists it breaks as "auto" is not compatible with new "system"
* better local dev while dev container is running
use `docker compose -f docker-compose.dev.yml up`
or after changing dockerfile
`docker compose -f docker-compose.dev.yml up --build`
* update translation to match new theme mode
* improve dx
new devs get extensions recommended to catch errors, etc directly in vscode
* reduce errors, improve typing
* Split components (#1)
* update: introduce pages & components
fix lint
* update: starting split components
* use auto imports
* Improve workflows and docker
workflow fix step naming
simplify docker dev
simplify docker prod
revert to node 18
dockerfile naming scheme
* Split components (#2)
* update: starting split components
* upd: rebase & continue splitting components
- layouts: header & footer
- components: basic buttton
- pages: login page
* update: login page
* package.json: remove dev:pass script
* Split into Components, migrate to nuxt
fixup
shutdown wireguard properly
fix styling, fix store
split even more
clear interval
split even more
split even more
handle auth middleware on server
avoid flicker of login page
* fix: buttons spaces & move layouts to components (#3)
* update: icons into components
- fix: header login page
* fix: tailwind handle btn class
* Split into icons
fix avatar
move class to view not icon itself
fix icon
format
* invalidate cache to make restoreConfig work
* fix apexchart
* use different color mode module
other one resulted in hydration mismatch
* fix dialog
* fix bad i18n merge
* use nuxt 4
* fix typing, fix redirect, latest release on server
* start wireguard on start
* wait for shutdown
* improve zod errors, consistent server errors
* migrate to useFetch
this makes sure that there is no double fetching
* fix hydration issues, remove unnecessary state, rename function
* fetch globalstore globally
otherwise this will load on login to homepage
* migrate to useFetch
no javascript support
TODO: not properly tested
* update backend
* wip: frontend
* update frontend
* update pnpm lock
---------
Co-authored-by: Sergei Birukov <suxscribe@gmail.com>
Co-authored-by: Bernd Storath <bernd.storath@offizium.de>
Co-authored-by: tetuaoro <65575727+tetuaoro@users.noreply.github.com>
* Fix various issues
fix router param
fix max age
unit is seconds not ms
fix regressions
fix missing expire date in client create dialog
fix wrong type rules
fix wrong api endpoint
properly catch error running cron job
fix type issues
* add database (#1330)
* add: database abstraction
* update: get lang from database
* udpate: with repositories
* add: interfaces to connect a database provider
- easy swapping between database provider
* add: setup page
- add: in-memory database provider
- create a new account (signup)
- login with username and password
- first setup page to create an account
- PASSWORD_HASH was removed from environment and files was updated/removed due to that change
* update: Dockerfile
* fix: review done
- remove: REQUIRES_PASSWORD & RELEASE environment variables
* fix: i18n translation
- rename directories
* update: use database
* fix: typecheck
* fix: review
* rebase & add: persistent lowdb provider
* update: french translation
* revert: due to rebase
* remove & document
* Refactor New UI (#1342)
* refactor code
* refactor code
* add some todos
* update pnpm, start migrating to database
* add missing i18n key
* add todo
* basic setup styling
* nuxt 4 folder structure, update packages
* Feat: Migrations (#1344)
* add migrations
* improve migration runner
* improve migration runner
* document what each migration does
* Feat: Rewrite Wireguard to use Database (#1345)
* update wireguard
* update
* update
* remove all config
* move all features into one route
* improve code
* fix some issues
add wg_path, update documentation
* Feat: Cidr Support (#1347)
* cidr support
* add cidr
* fix some errors
fix server config
missing cidr block in server config
* Fix: Database Date type (#1349)
* Feat: IPv6 (#1354)
* start supporting ipv6
* add ipv6 support
* build server with es2020
es2019 doesn't support bigint
* fix issues, better naming
* Fix: Security (#1355)
* separate route for onboarding
* zse zod for validation
* use argon2id
* add build tools
* Feat: Server AllowedIPs, MTU (#1356)
* add wireguard helpers
* improve wireguard helpers
* add server mtu
* fix wg0.conf formatting
* add ipv6 support to docker compose and readme
* Feat: Docs (#1361)
* basic docs
* use semver versioning
* Feat: Migration (#1363)
* start migration
* improve migration
* remove endpoint from client
* improve docker
* Chore: Deprecate Dockerless (#1377)
* deprecate dockerless
* Feat: Improve Repository pattern (#1380)
* improve repository pattern
* fix errors
* Feat: Improve Database Handling (#1383)
* improve docker build
* build doc workflow
* Feat: Changelog, Release Notes (#1385)
* add changelog, use semver for update message
* use first line of release for short changelog
* load ipv6 iptables module
* Feat: Show Version in Footer (#1389)
update ui logic, always store release in global store.
new release logic uses rate limited github api, avoid using cache
* use i18n ally (#1391)
* improve gh actions
* Setup UI (#1392)
* update: setup ui page
* rebase
* remove script addition
* Fixed usage of Ukrainian instead of Russian in ru.json (#1414)
* Added translations for the Belarusian language (#1472)
* Install kmod from alpine repository (#1553)
Because the busybox modprobe utility is unable to load zstd compressed modules.
Co-authored-by: Matt <mmoore2012@users.noreply.github.com>
* WIP: Feat: UI, General Improvements (#1397)
* update: setup ui page
* remove script addition
* add admin panel
* basic user menu and admin page
* make usable admin panel
* add radix vue, improve ui
* fix features, add toast
* rewrite middleware logic, support basic auth
* add todo marker
* active tailwind forms
* remove some console.logs
* check if user is enabled
frontend doesn't handle this state yet, nothing will work as api routes will fail
* add email to user, basic account page
* better group database
* group even more
* basic statistics page
* update: admin ui
- add: common panel components to get same UI
- i18n: french
* update: setup page error handle
- use fetch error data to provide error message
- use translation to provider error message
* update: me page
* fix: :text props
* update: login page
* update: i18n french support
* fix: use radix toast duration
* update: reduce templates
- remake: setup page to add others step configuration (host/port/migration)
* udpate: setup page use wizard form step
* update: ui
* update: step page
- first step to choose a language
- use red color in light mode
- validate step before move toward
* update: setup page
- use radix select component to reduce boilerplate
* update: setup page
- add: database langugage method
- update: api lang & export supported languages
* update: setup page
- update ui select language
- change lang on selection
* fix: use global store
* fix: initial value
- update: sort langs by value
* fix: ui center paragraph
* fix: remove file extension & some revert
- add: script to run checks script
* update: setup page
- add: host/port section
- i18n: french
- fix: fallback translation
* refactor: split setup into files
* update: setup page
- redirect to login when the setup is done
- allow user to return to previous steps
- prompt error message
- i18n french
* add: migration UI step
- rename: components
- fix: label for & form child id
- i18n french sup
* add: migration server
* fix: use string instead of File
* improve: with zod validation
* restore: clients
* rework setup
* add client page, move api routes
* improve setup
* switch to agpl
* add step back
* update licensed under texts
cc -> agpl
* make db results readonly
avoid weird side effects, when modifying the db object as its only allowed inside e.g. lowdb.ts
* update footer links
* improve client edit page, add mtu
* reorder tailwind classes
* update packages
* update comments
* better toast, better avatar
* delete feature toggle
* remove chart, statistics from server
let user decide what he wants to display
* move into own components
* switch from AGPL-3.0-or-later to AGPL-3.0-only
AGPL-3.0-or-later is not OSI approved
* fix building source
fixes https://github.com/wg-easy/wg-easy/issues/1563
* update packages
---------
Co-authored-by: tetuaoro <65575727+tetuaoro@users.noreply.github.com>
* update readme
* Feat: Settings, UI, General Improvements (#1572)
* deprecate other languages
new ui has too many new strings
* fix wrong license in readme
* properly fetch release
* order safe data structure for migrations
* empty server allowed ips by default
* show userconfig in admin panel
* remove routes, fix config
* add ability to update clients
* handle form submit using js
avoid weird behavior with FormData
* global toast, be able to update client
* update packages
* fix date field
* delete client using radix dialog
* remove lang from backend, let users decide
* be able to change interface and general
* be able to update user config
* consistent allowedips
* fix array field
* improve avatar, code cleanup
* basic metrics support
* remove dateTime helper
* be able to change hooks
* start cidr update
* be able to update cidr
* Feat: SQLite (#1619)
* start drizzle migration
* split schema
* improve schema
* improve schema, cascade, unique
* improve structure, start migration
* migrate to sqlite
* work in prod docker
* start adding a better permission handler
* permission matrix, permission handler
* update packages
* move session timeout to session config, use new permission handler
* improve docker dev
only install dependencies if changed
* implement setup
* migrate to sqlite
* improve debug, fix custom migration
* migrate to sqlite
* regenerate migrations
* ignore autogenerated migrations from prettier
* migrate to sqlite
* migrate to sqlite
* Migrate to sqlite
* fix prod error
* move nuxt middleware from server to nuxt
* update corepack in prod dockerfile
* use correct branch for workflow
* make docker file build on armv6/v7
* fix client update
* update zod locales
* cancel pr workflow if new commit
* test concurrency
* Feat: Account (#1645)
* be able to change name, email
* be able to change password
* consistent naming
zod is a schema not a type
* use transaction instance
* add zod strings
* Feat: Prometheus (#1655)
* check metrics password
* rewrite prometheus and json metric endpoints
* move metrics to general
metrics is not per interface
* change metrics settings in admin panel
* add i18n keys
* Chore: Remove multi interface support (#1657)
* streamline references to wg0
database wg0 name makes no sense anymore
wg0 only in database, could be easily replaced, or support for custom name added
* fix default key gen
* Feat: Permission System (#1660)
* wip: add abac
* wip: add admin abac
* add me abac
* fix type issue
* move from role check
avoid authStore.userData?.role === roles.ADMIN
* Feat: Zod Generic String (#1661)
* start improving zod translations
* update zod translations
* Feat: Migration (#1663)
* show error for old env vars
* reorder setup, be able to migrate
* fix type issue
* footer and header in setup, remove lang setup step
* remove backup / restore
* refactor dialog (#1665)
* fixed Dockerfile HEALTHCHECK syntax (#1686)
HEALTHCHECK options should always come before the CMD instruction
* Feat: Info (#1666)
* add tooltip info, extract strings
* multi type toast
* improve useSubmit, i18n
* better login screen
* improve
* consistent folder casing
* consistent casing
* fix even more stuff
* temp
* fix type errors
* remove armv6/7 support for now
* add information to client page
* optimize dockerfile
* update base image in Dockerfile to use node:lts-alpine
* fix build stage
* Chore: TODOs (#1695)
* verify setup step
* improve readme
* format todos
* move id
* remove objectMessage
* style array field
* Chore: TODOs (#1696)
* fix chart
* replace localstorage with cookies
* Chore: Improvments (#1697)
* update packages
* fix tab issues
* consistent imports
* use eslint module
* update date
* improve docs
* update docs
* format
* fix docs, fix cookie
* recognize timing attack potential
* improve gh actions, issue templates (#1700)
* Feat improv (#1702)
* add insecure option, link readme to docs
* improve docs
* update version
* add warning to readme
---------
Co-authored-by: Sergei Birukov <suxscribe@gmail.com>
Co-authored-by: Bernd Storath <bernd.storath@offizium.de>
Co-authored-by: tetuaoro <65575727+tetuaoro@users.noreply.github.com>
Co-authored-by: laperuz92 <31198184+laperuz92@users.noreply.github.com>
Co-authored-by: Siomkin Alexander <siomkin.alexander@gmail.com>
Co-authored-by: Matt <102529127+mmoore2012@users.noreply.github.com>
Co-authored-by: Matt <mmoore2012@users.noreply.github.com>
Co-authored-by: Denis Kazimirov <rokiden@users.noreply.github.com>
This commit is contained in:
5
docs/content/advanced/api.md
Normal file
5
docs/content/advanced/api.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: API
|
||||
---
|
||||
|
||||
TODO
|
||||
5
docs/content/advanced/config/optional-config.md
Normal file
5
docs/content/advanced/config/optional-config.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Optional Configuration
|
||||
---
|
||||
|
||||
TODO
|
||||
47
docs/content/advanced/migrate/from-14-to-15.md
Normal file
47
docs/content/advanced/migrate/from-14-to-15.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: Migrate from v14 to v15
|
||||
---
|
||||
|
||||
This guide will help you migrate from `v14` to version `v15` of `wg-easy`.
|
||||
|
||||
## Changes
|
||||
|
||||
This is a complete rewrite of the `wg-easy` project. Therefore the configuration files and the way you interact with the project have changed.
|
||||
|
||||
## Migration
|
||||
|
||||
### Backup
|
||||
|
||||
Before you start the migration, make sure to backup your existing configuration files.
|
||||
|
||||
Go into the Web Ui and click the Backup button, this should download a `wg0.json` file.
|
||||
|
||||
Or download the `wg0.json` file from your container volume to your pc.
|
||||
|
||||
You will need this file for the migration
|
||||
|
||||
### Remove old container
|
||||
|
||||
1. Stop the running container
|
||||
|
||||
If you are using `docker run`
|
||||
|
||||
```shell
|
||||
docker stop wg-easy
|
||||
```
|
||||
|
||||
If you are using `docker-compose`
|
||||
|
||||
```shell
|
||||
docker-compose down
|
||||
```
|
||||
|
||||
### Start new container
|
||||
|
||||
Follow the instructions in the [Getting Started](../../usage.md) or [Basic Installation](../../examples/tutorials/basic-installation.md) guide to start the new container.
|
||||
|
||||
In the setup wizard, select that you already already have a configuration file and upload the `wg0.json` file you downloaded in the backup step.
|
||||
|
||||
### Done
|
||||
|
||||
You have now successfully migrated to `v15` of `wg-easy`.
|
||||
BIN
docs/content/assets/logo/favicon.png
Normal file
BIN
docs/content/assets/logo/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
BIN
docs/content/assets/logo/logo.png
Normal file
BIN
docs/content/assets/logo/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
23
docs/content/contributing/general.md
Normal file
23
docs/content/contributing/general.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
title: General Information
|
||||
---
|
||||
|
||||
## Coding Style
|
||||
|
||||
When refactoring, writing or altering files, adhere to these rules:
|
||||
|
||||
1. **Adjust your style of coding to the style that is already present**! Even if you do not like it, this is due to consistency. There was a lot of work involved in making all files consistent.
|
||||
2. **Use `pnpm lint` to check your scripts**! Your contributions are checked by GitHub Actions too, so you will need to do this.
|
||||
3. **Use the provided `.vscode/settings.json`** file.
|
||||
|
||||
## Documentation
|
||||
|
||||
Make sure to select `nightly` in the dropdown menu at the top. Navigate to the page you would like to edit and click the edit button in the top right. This allows you to make changes and create a pull-request.
|
||||
|
||||
Alternatively you can make the changes locally. For that you'll need to have Docker installed. Run
|
||||
|
||||
```sh
|
||||
pnpm docs:serve
|
||||
```
|
||||
|
||||
This serves the documentation on your local machine on port `8080`. Each change will be hot-reloaded onto the page you view, just edit, save and look at the result.
|
||||
58
docs/content/contributing/issues-and-pull-requests.md
Normal file
58
docs/content/contributing/issues-and-pull-requests.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
title: Issues and Pull Requests
|
||||
---
|
||||
|
||||
This project is Open Source. That means that you can contribute on enhancements, bug fixing or improving the documentation.
|
||||
|
||||
## Opening an Issue
|
||||
|
||||
/// note | Attention
|
||||
|
||||
**Before opening an issue**, read the [`README`][github-file-readme] carefully, study the docs for your version (maybe [latest][docs-latest]) and your search engine you trust. The issue tracker is not meant to be used for unrelated questions!
|
||||
///
|
||||
|
||||
When opening an issue, please provide details use case to let the community reproduce your problem.
|
||||
|
||||
/// note | Attention
|
||||
|
||||
**Use the issue templates** to provide the necessary information. Issues which do not use these templates are not worked on and closed.
|
||||
///
|
||||
|
||||
By raising issues, I agree to these terms and I understand, that the rules set for the issue tracker will help both maintainers as well as everyone to find a solution.
|
||||
|
||||
Maintainers take the time to improve on this project and help by solving issues together. It is therefore expected from others to make an effort and **comply with the rules**.
|
||||
|
||||
### Filing a Bug Report
|
||||
|
||||
Thank you for participating in this project and reporting a bug. wg-easy is a community-driven project, and each contribution counts!
|
||||
|
||||
Maintainers and moderators are volunteers. We greatly appreciate reports that take the time to provide detailed information via the template, enabling us to help you in the best and quickest way. Ignoring the template provided may seem easier, but discourages receiving any support (_via assignment of the label `meta/no template - no support`_).
|
||||
|
||||
Markdown formatting can be used in almost all text fields (_unless stated otherwise in the description_).
|
||||
|
||||
Be as precise as possible, and if in doubt, it's best to add more information that too few.
|
||||
|
||||
When an option is marked with "not officially supported" / "unsupported", then support is dependent on availability from specific maintainers.
|
||||
|
||||
## Pull Requests
|
||||
|
||||
/// question | Motivation
|
||||
|
||||
You want to add a feature? Feel free to start creating an issue explaining what you want to do and how you're thinking doing it. Other users may have the same need and collaboration may lead to better results.
|
||||
///
|
||||
|
||||
### Submit a Pull-Request
|
||||
|
||||
The development workflow is the following:
|
||||
|
||||
1. Fork the project
|
||||
2. Write the code that is needed :D
|
||||
3. Document your improvements if necessary
|
||||
4. [Commit][commit] (and [sign your commit][gpg]), push and create a pull-request to merge into `master`. Please **use the pull-request template** to provide a minimum of contextual information and make sure to meet the requirements of the checklist.
|
||||
|
||||
Pull requests are automatically tested against the CI and will be reviewed when tests pass. When your changes are validated, your branch is merged. CI builds the new `:nightly` image every night and your changes will be includes in the next version release.
|
||||
|
||||
[docs-latest]: https://wg-easy.github.io/wg-easy/latest
|
||||
[github-file-readme]: https://github.com/wg-easy/wg-easy/blob/master/README.md
|
||||
[commit]: https://help.github.com/articles/closing-issues-via-commit-messages/
|
||||
[gpg]: https://docs.github.com/en/github/authenticating-to-github/generating-a-new-gpg-key
|
||||
56
docs/content/examples/tutorials/basic-installation.md
Normal file
56
docs/content/examples/tutorials/basic-installation.md
Normal file
@@ -0,0 +1,56 @@
|
||||
---
|
||||
title: Basic Installation
|
||||
---
|
||||
|
||||
<!-- TOOD: add docs for pihole, nginx, caddy, traefik -->
|
||||
|
||||
## Requirements
|
||||
|
||||
1. You need to have a host that you can manage
|
||||
2. You need to have a domain name or a public IP address
|
||||
3. You need a supported architecture (x86_64, arm64)
|
||||
4. You need curl installed on your host
|
||||
|
||||
## Install Docker
|
||||
|
||||
Follow the Docs here: <https://docs.docker.com/engine/install/> and install Docker on your host.
|
||||
|
||||
## Install `wg-easy`
|
||||
|
||||
1. Create a directory for the configuration files (you can choose any directory you like):
|
||||
|
||||
```shell
|
||||
DIR=/docker/wg-easy
|
||||
sudo mkdir -p $DIR
|
||||
```
|
||||
|
||||
2. Download docker compose file
|
||||
|
||||
```shell
|
||||
sudo curl -o $URL/docker-compose.yml https://raw.githubusercontent.com/wg-easy/wg-easy/master/docker-compose.yml
|
||||
```
|
||||
|
||||
3. Start `wg-easy`
|
||||
|
||||
```shell
|
||||
sudo docker-compose -f $DIR/docker-compose.yml up -d
|
||||
```
|
||||
|
||||
## Setup Firewall
|
||||
|
||||
If you are using a firewall, you need to open the following ports:
|
||||
|
||||
- UDP 51820 (WireGuard)
|
||||
- TCP 51821 (Web UI)
|
||||
|
||||
These ports can be changed, so if you change them you have to update your firewall rules accordingly.
|
||||
|
||||
## Setup Reverse Proxy
|
||||
|
||||
TODO
|
||||
|
||||
## Access the Web UI
|
||||
|
||||
Open your browser and navigate to `https://<your-domain>:51821` or `https://<your-ip>:51821`.
|
||||
|
||||
Follow the instructions to set up your WireGuard VPN.
|
||||
5
docs/content/examples/tutorials/dockerless.md
Normal file
5
docs/content/examples/tutorials/dockerless.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Without Docker
|
||||
---
|
||||
|
||||
TODO
|
||||
96
docs/content/examples/tutorials/podman.md
Normal file
96
docs/content/examples/tutorials/podman.md
Normal file
@@ -0,0 +1,96 @@
|
||||
---
|
||||
title: Podman
|
||||
---
|
||||
|
||||
This guide will show you how to run `wg-easy` with rootful Podman and nftables.
|
||||
|
||||
## Requirements
|
||||
|
||||
1. Podman installed with version 4.4 or higher
|
||||
|
||||
## Configuration
|
||||
|
||||
Create a Folder for the configuration files:
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /etc/containers/systemd/wg-easy
|
||||
sudo mkdir -p /etc/containers/volumes/wg-easy
|
||||
```
|
||||
|
||||
Create a file `/etc/containers/systemd/wg-easy/wg-easy.container` with the following content:
|
||||
|
||||
```ini
|
||||
[Container]
|
||||
ContainerName=wg-easy
|
||||
Image=ghcr.io/wg-easy/wg-easy:latest
|
||||
|
||||
Volume=/etc/containers/volumes/wg-easy:/etc/wireguard:Z
|
||||
Network=wg-easy.network
|
||||
PublishPort=51820:51820/udp
|
||||
PublishPort=51821:51821/tcp
|
||||
|
||||
AddCapability=NET_ADMIN
|
||||
AddCapability=SYS_MODULE
|
||||
AddCapability=NET_RAW
|
||||
Sysctl=net.ipv4.ip_forward=1
|
||||
Sysctl=net.ipv4.conf.all.src_valid_mark=1
|
||||
Sysctl=net.ipv6.conf.all.disable_ipv6=0
|
||||
Sysctl=net.ipv6.conf.all.forwarding=1
|
||||
Sysctl=net.ipv6.conf.default.forwarding=1
|
||||
|
||||
[Install]
|
||||
# this is used to start the container on boot
|
||||
WantedBy=default.target
|
||||
```
|
||||
|
||||
Create a file `/etc/containers/systemd/wg-easy/wg-easy.network` with the following content:
|
||||
|
||||
```ini
|
||||
[Network]
|
||||
NetworkName=wg-easy
|
||||
IPv6=true
|
||||
```
|
||||
|
||||
## Load Kernel Modules
|
||||
|
||||
You will need to load the following kernel modules
|
||||
|
||||
```txt
|
||||
wireguard
|
||||
nft_masq
|
||||
```
|
||||
|
||||
Create a file `/etc/modules-load.d/wg-easy.conf` with the following content:
|
||||
|
||||
```txt
|
||||
wireguard
|
||||
nft_masq
|
||||
```
|
||||
|
||||
## Start the Container
|
||||
|
||||
```shell
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl start wg-easy
|
||||
```
|
||||
|
||||
## Edit Hooks
|
||||
|
||||
In the Admin Panel of your WireGuard server, go to the `Hooks` tab and add the following hook:
|
||||
|
||||
1. PostUp
|
||||
|
||||
```shell
|
||||
apk add nftables; nft add table inet wg_table; nft add chain inet wg_table postrouting { type nat hook postrouting priority 100 \; }; nft add rule inet wg_table postrouting ip saddr {{ipv4Cidr}} oifname {{device}} masquerade; nft add rule inet wg_table postrouting ip6 saddr {{ipv6Cidr}} oifname {{device}} masquerade; nft add chain inet wg_table input { type filter hook input priority 0 \; policy drop \; }; nft add rule inet wg_table input udp dport {{port}} accept; nft add chain inet wg_table forward { type filter hook forward priority 0 \; policy drop \; }; nft add rule inet wg_table forward iifname "wg0" accept; nft add rule inet wg_table forward oifname "wg0" accept;
|
||||
```
|
||||
|
||||
2. PostDown
|
||||
|
||||
```shell
|
||||
nft delete table inet wg_table
|
||||
```
|
||||
|
||||
<!--
|
||||
TODO: improve docs after better nftables support
|
||||
TODO: fix accept web ui port
|
||||
-->
|
||||
92
docs/content/getting-started.md
Normal file
92
docs/content/getting-started.md
Normal file
@@ -0,0 +1,92 @@
|
||||
---
|
||||
title: Getting Started
|
||||
hide:
|
||||
- navigation
|
||||
---
|
||||
|
||||
This page explains how to get started with wg-easy. The guide uses Docker Compose as a reference. In our examples, we mount the named volume `etc_wireguard` to `/etc/wireguard` inside the container.
|
||||
|
||||
## Preliminary Steps
|
||||
|
||||
Before you can get started with deploying your own VPN, there are some requirements to be met:
|
||||
|
||||
1. You need to have a host that you can manage
|
||||
2. You need to have a domain name or a public IP address
|
||||
3. You need a supported architecture (x86_64, arm64)
|
||||
|
||||
### Host Setup
|
||||
|
||||
There are a few requirements for a suitable host system:
|
||||
|
||||
1. You need to have a container runtime installed
|
||||
|
||||
/// note | About the Container Runtime
|
||||
|
||||
On the host, you need to have a suitable container runtime (like _Docker_ or _Podman_) installed. We assume [_Docker Compose_][docker-compose] is [installed][docker-compose-installation]. We have aligned file names and configuration conventions with the latest [Docker Compose specification][docker-compose-specification].
|
||||
If you're using podman, make sure to read the related [documentation][docs-podman].
|
||||
///
|
||||
|
||||
[docker-compose]: https://docs.docker.com/compose/
|
||||
[docker-compose-installation]: https://docs.docker.com/compose/install/
|
||||
[docker-compose-specification]: https://docs.docker.com/compose/compose-file/
|
||||
[docs-podman]: ./examples/tutorials/podman.md
|
||||
|
||||
## Deploying the Actual Image
|
||||
|
||||
### Tagging Convention
|
||||
|
||||
To understand which tags you should use, read this section carefully. [Our CI][github-ci] will automatically build, test and push new images to the following container registry:
|
||||
|
||||
1. GitHub Container Registry ([`ghcr.io/wg-easy/wg-easy`][ghcr-image])
|
||||
|
||||
All workflows are using the tagging convention listed below. It is subsequently applied to all images.
|
||||
|
||||
| Event | Image Tags |
|
||||
| ----------------------- | ----------------------------- |
|
||||
| `cron` on `master` | `nightly` |
|
||||
| `push` a tag (`v1.2.3`) | `1.2.3`, `1.2`, `1`, `latest` |
|
||||
|
||||
When publishing a tag we follow the [Semantic Versioning][semver] specification. The `latest` tag is always pointing to the latest stable release. If you want to avoid breaking changes, use the major version tag (e.g. `15`).
|
||||
|
||||
[github-ci]: https://github.com/wg-easy/wg-easy/actions
|
||||
[ghcr-image]: https://github.com/wg-easy/wg-easy/pkgs/container/wg-easy
|
||||
[semver]: https://semver.org/
|
||||
|
||||
### Get All Files
|
||||
|
||||
Issue the following command to acquire the necessary file:
|
||||
|
||||
```shell
|
||||
wget "https://raw.githubusercontent.com/wg-easy/wg-easy/master/docker-compose.yml"
|
||||
```
|
||||
|
||||
### Start the Container
|
||||
|
||||
To start the container, issue the following command:
|
||||
|
||||
```shell
|
||||
sudo docker compose up -d
|
||||
```
|
||||
|
||||
### Configuration Steps
|
||||
|
||||
Now follow the setup process in your web browser
|
||||
|
||||
### Stopping the Container
|
||||
|
||||
To stop the container, issue the following command:
|
||||
|
||||
```shell
|
||||
sudo docker compose down
|
||||
```
|
||||
|
||||
/// danger | Using the Correct Commands For Stopping and Starting wg-easy
|
||||
|
||||
**Use `sudo docker compose up / down`, not `sudo docker compose start / stop`**. Otherwise, the container is not properly destroyed and you may experience problems during startup because of inconsistent state.
|
||||
///
|
||||
|
||||
**That's it! It really is that easy**.
|
||||
|
||||
If you need more help you can read the [Basic Installation Tutorial][basic-installation].
|
||||
|
||||
[basic-installation]: ./examples/tutorials/basic-installation.md
|
||||
35
docs/content/index.md
Normal file
35
docs/content/index.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
title: Home
|
||||
hide:
|
||||
- navigation
|
||||
---
|
||||
|
||||
# Welcome to the Documentation for `wg-easy`
|
||||
|
||||
/// info | This Documentation is Versioned
|
||||
|
||||
**Make sure** to select the correct version of this documentation! It should match the version of the image you are using. The default version corresponds to the `:latest` image tag - [the most recent stable release][docs-tagging].
|
||||
///
|
||||
|
||||
This documentation provides you not only with the basic setup and configuration of wg-easy but also with advanced configuration, elaborate usage scenarios, detailed examples, hints and more.
|
||||
|
||||
[docs-tagging]: ./usage.md#tagging-convention
|
||||
|
||||
## About
|
||||
|
||||
`wg-easy` is the easiest way to run WireGuard VPN + Web-based Admin UI.
|
||||
|
||||
## Contents
|
||||
|
||||
### Getting Started
|
||||
|
||||
If you're new to wg-easy, make sure to read the [_Usage_ chapter][docs-usage] first. If you want to look at examples for Docker Run and Compose, we have an [_Examples_ page][docs-examples].
|
||||
|
||||
[docs-usage]: ./usage.md
|
||||
[docs-examples]: ./examples/tutorials/basic-installation.md
|
||||
|
||||
### Contributing
|
||||
|
||||
We are always happy to welcome new contributors. For guidelines and entrypoints please have a look at the [Contributing section][docs-contributing].
|
||||
|
||||
[docs-contributing]: ./contributing/issues-and-pull-requests.md
|
||||
81
docs/mkdocs.yml
Normal file
81
docs/mkdocs.yml
Normal file
@@ -0,0 +1,81 @@
|
||||
site_name: "wg-easy"
|
||||
site_description: "The easiest way to run WireGuard VPN + Web-based Admin UI."
|
||||
site_author: "wg-easy (Github Organization)"
|
||||
copyright: '<p>© <a href="https://github.com/wg-easy"><em>Wireguard Easy Organization</em></a><br/><span>This project is licensed under the GNU Affero General Public License v3.0 or later.</span></p>'
|
||||
|
||||
repo_url: https://github.com/wg-easy/wg-easy
|
||||
repo_name: wg-easy
|
||||
|
||||
edit_uri: "edit/master/docs/content"
|
||||
|
||||
docs_dir: "content/"
|
||||
|
||||
site_url: https://wg-easy.github.io/wg-easy
|
||||
|
||||
theme:
|
||||
name: material
|
||||
favicon: assets/logo/favicon.png
|
||||
logo: assets/logo/logo.png
|
||||
icon:
|
||||
repo: fontawesome/brands/github
|
||||
features:
|
||||
- navigation.tabs
|
||||
- navigation.top
|
||||
- navigation.expand
|
||||
- navigation.instant
|
||||
- content.action.edit
|
||||
- content.action.view
|
||||
- content.code.annotate
|
||||
palette:
|
||||
# Light mode
|
||||
- media: "(prefers-color-scheme: light)"
|
||||
scheme: default
|
||||
primary: grey
|
||||
accent: red
|
||||
toggle:
|
||||
icon: material/weather-night
|
||||
name: Switch to dark mode
|
||||
# Dark mode
|
||||
- media: "(prefers-color-scheme: dark)"
|
||||
scheme: slate
|
||||
primary: grey
|
||||
accent: red
|
||||
toggle:
|
||||
icon: material/weather-sunny
|
||||
name: Switch to light mode
|
||||
|
||||
extra:
|
||||
version:
|
||||
provider: mike
|
||||
|
||||
markdown_extensions:
|
||||
- toc:
|
||||
anchorlink: true
|
||||
- abbr
|
||||
- attr_list
|
||||
- pymdownx.blocks.admonition:
|
||||
types:
|
||||
- danger
|
||||
- note
|
||||
- info
|
||||
- question
|
||||
- warning
|
||||
- pymdownx.details
|
||||
- pymdownx.superfences:
|
||||
custom_fences:
|
||||
- name: mermaid
|
||||
class: mermaid
|
||||
format: !!python/name:pymdownx.superfences.fence_code_format
|
||||
- pymdownx.tabbed:
|
||||
alternate_style: true
|
||||
slugify: !!python/object/apply:pymdownx.slugs.slugify
|
||||
kwds:
|
||||
case: lower
|
||||
- pymdownx.tasklist:
|
||||
custom_checkbox: true
|
||||
- pymdownx.magiclink
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.tilde
|
||||
- pymdownx.emoji:
|
||||
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||
4
docs/requirements.txt
Normal file
4
docs/requirements.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
mkdocs-material
|
||||
pillow
|
||||
cairosvg
|
||||
mike
|
||||
Reference in New Issue
Block a user