Before this fix, a too early `return` statement terminated the `updateLdapUsers()` function, whenever one not already existing user was created. Therefore, in each LDAP sync a maximum of one new user could be created (i.e., it took x LDAP sync cycles until x new LDAP users are registered in wg-portal). Depending on the LDAP `sync_interval` this can take a long time and produces unecessary long waiting times until users are available in wg-portal. Removing the early return statement, and move the remainder of the function into an `else` statement, so that all new users can be added in a single LDAP sync. Also adding a debug statement to better trace the behavior. Signed-off-by: klmmr <35450576+klmmr@users.noreply.github.com> |
||
---|---|---|
.github | ||
.run | ||
cmd | ||
deploy/helm | ||
docs | ||
frontend | ||
internal | ||
scripts | ||
.dockerignore | ||
.gitignore | ||
config.yml.sample | ||
ct.yaml | ||
docker-compose.yml | ||
Dockerfile | ||
go.mod | ||
go.sum | ||
LICENSE.txt | ||
Makefile | ||
mkdocs.yml | ||
README.md | ||
SECURITY.md |
WireGuard Portal (v2 - testing)
Caution
Version 2 is currently under development and may contain bugs and breaking changes. It is not advised to use this version in production. Use version v1 instead.
Important
Since the project was accepted by the Docker-Sponsored Open Source Program, the Docker image location has moved to wgportal/wg-portal. Please update the Docker image from h44z/wg-portal to wgportal/wg-portal.
Introduction
WireGuard Portal is a simple, web-based configuration portal for WireGuard server management. The portal uses the WireGuard wgctrl library to manage existing VPN interfaces. This allows for the seamless activation or deactivation of new users without disturbing existing VPN connections.
The configuration portal supports using a database (SQLite, MySQL, MsSQL or Postgres), OAuth or LDAP (Active Directory or OpenLDAP) as a user source for authentication and profile data.
Features
- Self-hosted - the whole application is a single binary
- Responsive multi-language web UI written in Vue.JS
- Automatically selects IP from the network pool assigned to the client
- QR-Code for convenient mobile client configuration
- Sends email to the client with QR-code and client config
- Enable / Disable clients seamlessly
- Generation of wg-quick configuration file (
wgX.conf
) if required - User authentication (database, OAuth, or LDAP)
- IPv6 ready
- Docker ready
- Can be used with existing WireGuard setups
- Support for multiple WireGuard interfaces
- Peer Expiry Feature
- Handles route and DNS settings like wg-quick does
- Exposes Prometheus metrics for monitoring and alertingt
- REST API for management and client deployment
Documentation
For the complete documentation visit wgportal.org.
V2 TODOs
- Audit UI
What is out of scope
- Automatic generation or application of any
iptables
ornftables
rules. - Support for operating systems other than linux.
- Automatic import of private keys of an existing WireGuard setup.
Application stack
- wgctrl-go and netlink for interface handling
- Gin, HTTP web framework written in Go
- Bootstrap, for the HTML templates
- Vue.JS, for the frontend
License
- MIT License. MIT or https://opensource.org/licenses/MIT