Skip to content

Commit b1637b0

Browse files
committed
Merge branch 'master' into stable
# Conflicts: # internal/domain/peer.go
2 parents 0cc7ebb + da76327 commit b1637b0

File tree

137 files changed

+10247
-1968
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+10247
-1968
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: h44z # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@ updates:
2828
patch:
2929
update-types:
3030
- patch
31+
32+
- package-ecosystem: "docker"
33+
directory: /
34+
schedule:
35+
interval: weekly

.github/workflows/chart.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
if: ${{ github.event_name == 'pull_request' }}
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v5
2424
with:
2525
fetch-depth: 0
2626

@@ -35,7 +35,7 @@ jobs:
3535
# ct lint requires Python 3.x to run following packages:
3636
# - yamale (https://github.com/23andMe/Yamale)
3737
# - yamllint (https://github.com/adrienverge/yamllint)
38-
- uses: actions/setup-python@v5
38+
- uses: actions/setup-python@v6
3939
with:
4040
python-version: '3.x'
4141

@@ -60,7 +60,7 @@ jobs:
6060
permissions:
6161
packages: write
6262
steps:
63-
- uses: actions/checkout@v4
63+
- uses: actions/checkout@v5
6464

6565
- uses: docker/login-action@v3
6666
with:

.github/workflows/docker-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Check out the repo
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2222

2323
- name: Set up QEMU
2424
uses: docker/setup-qemu-action@v3
@@ -110,7 +110,7 @@ jobs:
110110
contents: write
111111
steps:
112112
- name: Download binaries
113-
uses: actions/download-artifact@v4
113+
uses: actions/download-artifact@v5
114114
with:
115115
name: binaries
116116

.github/workflows/pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
deploy:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919
with:
2020
fetch-depth: 0
2121

22-
- uses: actions/setup-python@v5
22+
- uses: actions/setup-python@v6
2323
with:
2424
python-version: 3.x
2525

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN npm run build
2020
######
2121
# Build backend
2222
######
23-
FROM --platform=${BUILDPLATFORM} golang:1.24-alpine AS builder
23+
FROM --platform=${BUILDPLATFORM} golang:1.25-alpine AS builder
2424
# Set the working directory
2525
WORKDIR /build
2626
# Download dependencies
@@ -50,9 +50,9 @@ COPY --from=builder /build/dist/wg-portal /
5050
######
5151
# Final image
5252
######
53-
FROM alpine:3.19
53+
FROM alpine:3.22
5454
# Install OS-level dependencies
55-
RUN apk add --no-cache bash curl iptables nftables openresolv wireguard-tools
55+
RUN apk add --no-cache bash curl iptables nftables openresolv wireguard-tools tzdata
5656
# Setup timezone
5757
ENV TZ=UTC
5858
# Copy binaries

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2020-2023 Christoph Haas
1+
Copyright (c) 2020-2025 Christoph Haas
22

33
Permission is hereby granted, free of charge, to any person obtaining
44
a copy of this software and associated documentation files (the

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,18 @@ The configuration portal supports using a database (SQLite, MySQL, MsSQL, or Pos
2121
## Features
2222

2323
* Self-hosted - the whole application is a single binary
24-
* Responsive multi-language web UI written in Vue.js
24+
* Responsive multi-language web UI with dark-mode written in Vue.js
2525
* Automatically selects IP from the network pool assigned to the client
2626
* QR-Code for convenient mobile client configuration
2727
* Sends email to the client with QR-code and client config
2828
* Enable / Disable clients seamlessly
2929
* Generation of wg-quick configuration file (`wgX.conf`) if required
30-
* User authentication (database, OAuth, or LDAP)
30+
* User authentication (database, OAuth, or LDAP), Passkey support
3131
* IPv6 ready
3232
* Docker ready
3333
* Can be used with existing WireGuard setups
3434
* Support for multiple WireGuard interfaces
35+
* Supports multiple WireGuard backends (wgctrl or MikroTik)
3536
* Peer Expiry Feature
3637
* Handles route and DNS settings like wg-quick does
3738
* Exposes Prometheus metrics for monitoring and alerting
@@ -61,6 +62,17 @@ For the complete documentation visit [wgportal.org](https://wgportal.org).
6162

6263
* MIT License. [MIT](LICENSE.txt) or <https://opensource.org/licenses/MIT>
6364

65+
## Contributors and Sponsors
66+
67+
Thanks so much for all your contributions! They’re truly appreciated and help keep WireGuard Portal moving ahead.
68+
69+
<a href="https://github.com/h44z/wg-portal/graphs/contributors">
70+
<img src="https://contrib.rocks/image?repo=h44z/wg-portal" />
71+
</a>
72+
73+
Want to support the project? You can buy me a coffee or join as a contributor - every bit of support helps!
74+
[Become a sponsor!](https://github.com/sponsors/h44z)
75+
6476

6577
> [!IMPORTANT]
6678
> Since the project was accepted by the Docker-Sponsored Open Source Program, the Docker image location has moved to [wgportal/wg-portal](https://hub.docker.com/r/wgportal/wg-portal).

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ If you believe you've found a security issue in one of the supported versions of
77
| Version | Supported |
88
|---------|--------------------|
99
| v2.x | :white_check_mark: |
10-
| v1.x | :white_check_mark: |
10+
| v1.x | :x: |
1111

1212
## Reporting a Vulnerability
1313

cmd/wg-portal/main.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ func main() {
5050
database, err := adapters.NewSqlRepository(rawDb)
5151
internal.AssertNoError(err)
5252

53-
wireGuard := adapters.NewWireGuardRepository()
54-
55-
wgQuick := adapters.NewWgQuickRepo()
53+
wireGuard, err := wireguard.NewControllerManager(cfg)
54+
internal.AssertNoError(err)
5655

5756
mailer := adapters.NewSmtpMailRepo(cfg.Mail)
5857

@@ -87,8 +86,12 @@ func main() {
8786

8887
authenticator, err := auth.NewAuthenticator(&cfg.Auth, cfg.Web.ExternalUrl, eventBus, userManager)
8988
internal.AssertNoError(err)
89+
authenticator.StartBackgroundJobs(ctx)
90+
91+
webAuthn, err := auth.NewWebAuthnAuthenticator(cfg, eventBus, userManager)
92+
internal.AssertNoError(err)
9093

91-
wireGuardManager, err := wireguard.NewWireGuardManager(cfg, eventBus, wireGuard, wgQuick, database)
94+
wireGuardManager, err := wireguard.NewWireGuardManager(cfg, eventBus, wireGuard, database)
9295
internal.AssertNoError(err)
9396
wireGuardManager.StartBackgroundJobs(ctx)
9497

@@ -102,7 +105,7 @@ func main() {
102105
mailManager, err := mail.NewMailManager(cfg, mailer, cfgFileManager, database, database)
103106
internal.AssertNoError(err)
104107

105-
routeManager, err := route.NewRouteManager(cfg, eventBus, database)
108+
routeManager, err := route.NewRouteManager(cfg, eventBus, database, wireGuard)
106109
internal.AssertNoError(err)
107110
routeManager.StartBackgroundJobs(ctx)
108111

@@ -124,12 +127,13 @@ func main() {
124127
apiV0BackendInterfaces := backendV0.NewInterfaceService(cfg, wireGuardManager, cfgFileManager)
125128
apiV0BackendPeers := backendV0.NewPeerService(cfg, wireGuardManager, cfgFileManager, mailManager)
126129

127-
apiV0EndpointAuth := handlersV0.NewAuthEndpoint(cfg, apiV0Auth, apiV0Session, validatorManager, authenticator)
130+
apiV0EndpointAuth := handlersV0.NewAuthEndpoint(cfg, apiV0Auth, apiV0Session, validatorManager, authenticator,
131+
webAuthn)
128132
apiV0EndpointAudit := handlersV0.NewAuditEndpoint(cfg, apiV0Auth, auditManager)
129133
apiV0EndpointUsers := handlersV0.NewUserEndpoint(cfg, apiV0Auth, validatorManager, apiV0BackendUsers)
130134
apiV0EndpointInterfaces := handlersV0.NewInterfaceEndpoint(cfg, apiV0Auth, validatorManager, apiV0BackendInterfaces)
131135
apiV0EndpointPeers := handlersV0.NewPeerEndpoint(cfg, apiV0Auth, validatorManager, apiV0BackendPeers)
132-
apiV0EndpointConfig := handlersV0.NewConfigEndpoint(cfg, apiV0Auth)
136+
apiV0EndpointConfig := handlersV0.NewConfigEndpoint(cfg, apiV0Auth, wireGuard)
133137
apiV0EndpointTest := handlersV0.NewTestEndpoint(apiV0Auth)
134138

135139
apiFrontend := handlersV0.NewRestApi(apiV0Session,

0 commit comments

Comments
 (0)