mirror of
https://github.com/swissmakers/wireguard-manager.git
synced 2025-07-20 14:20:57 +02:00
change module name, before upgrade
This commit is contained in:
parent
2fdafd34ca
commit
dd621ea472
@ -24,7 +24,7 @@ docker-compose*
|
||||
# App data & bin
|
||||
db
|
||||
assets
|
||||
wireguard-ui
|
||||
wireguard-manager
|
||||
|
||||
# Examples
|
||||
examples
|
||||
|
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@ -1 +1 @@
|
||||
github: [ngoduykhanh]
|
||||
github: [swissmakers]
|
||||
|
2
.github/workflows/docker-build.yml
vendored
2
.github/workflows/docker-build.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
||||
- name: Prepare image tags
|
||||
id: image-tags
|
||||
run: |
|
||||
base=ngoduykhanh/wireguard-ui
|
||||
base=swissmakers/wireguard-manager
|
||||
app_version=dev
|
||||
|
||||
## Set git tag as image tag
|
||||
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: wireguard-ui build release
|
||||
name: wireguard-manager build release
|
||||
|
||||
on:
|
||||
release:
|
||||
@ -56,6 +56,6 @@ jobs:
|
||||
goarch: ${{ matrix.goarch }}
|
||||
goversion: "https://dl.google.com/go/go1.21.5.linux-amd64.tar.gz"
|
||||
pre_command: export CGO_ENABLED=0
|
||||
binary_name: "wireguard-ui"
|
||||
binary_name: "wireguard-manager"
|
||||
build_flags: -v
|
||||
ldflags: -X "main.appVersion=${{ env.APP_VERSION }}" -X "main.buildTime=${{ env.BUILD_TIME }}" -X main.gitCommit=${{ github.sha }} -X main.gitRef=${{ github.ref }}
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,7 +4,7 @@
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
wireguard-ui
|
||||
wireguard-manager
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Build stage
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.21-alpine3.19 AS builder
|
||||
LABEL maintainer="Khanh Ngo <k@ndk.name>"
|
||||
LABEL maintainer="Swissmakers GmbH <info[at]swissmakers.ch>"
|
||||
|
||||
ARG BUILDPLATFORM
|
||||
ARG TARGETOS
|
||||
|
1
LICENSE
1
LICENSE
@ -1,5 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2025 Swissmakers GmbH - info[at]swissmakers.ch
|
||||
Copyright (c) 2020 Khanh Ngo - k[at]ndk.name
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
22
README.md
22
README.md
@ -1,6 +1,6 @@
|
||||

|
||||

|
||||
|
||||
# wireguard-ui
|
||||
# wireguard-manager
|
||||
|
||||
A web user interface to manage your WireGuard setup.
|
||||
|
||||
@ -11,7 +11,7 @@ A web user interface to manage your WireGuard setup.
|
||||
- Manage extra client information (name, email, etc.)
|
||||
- Retrieve client config using QR code / file / email / Telegram
|
||||
|
||||

|
||||

|
||||
|
||||
## Run WireGuard-UI
|
||||
|
||||
@ -22,7 +22,7 @@ A web user interface to manage your WireGuard setup.
|
||||
Download the binary file from the release page and run it directly on the host machine
|
||||
|
||||
```
|
||||
./wireguard-ui
|
||||
./wireguard-manager
|
||||
```
|
||||
|
||||
### Using docker compose
|
||||
@ -38,7 +38,7 @@ docker-compose up
|
||||
|
||||
| Variable | Description | Default |
|
||||
|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
|
||||
| `BASE_PATH` | Set this variable if you run wireguard-ui under a subpath of your reverse proxy virtual host (e.g. /wireguard) | N/A |
|
||||
| `BASE_PATH` | Set this variable if you run wireguard-manager under a subpath of your reverse proxy virtual host (e.g. /wireguard) | N/A |
|
||||
| `BIND_ADDRESS` | The addresses that can access to the web interface and the port, use unix:///abspath/to/file.socket for unix domain socket. | 0.0.0.0:80 |
|
||||
| `SESSION_SECRET` | The secret key used to encrypt the session cookies. Set this to a random value | N/A |
|
||||
| `SESSION_SECRET_FILE` | Optional filepath for the secret key used to encrypt the session cookies. Leave `SESSION_SECRET` blank to take effect | N/A |
|
||||
@ -58,7 +58,7 @@ docker-compose up
|
||||
| `WGUI_TABLE` | The default WireGuard table value settings | `auto` |
|
||||
| `WGUI_CONFIG_FILE_PATH` | The default WireGuard config file path used in global settings | `/etc/wireguard/wg0.conf` |
|
||||
| `WGUI_LOG_LEVEL` | The default log level. Possible values: `DEBUG`, `INFO`, `WARN`, `ERROR`, `OFF` | `INFO` |
|
||||
| `WG_CONF_TEMPLATE` | The custom `wg.conf` config file template. Please refer to our [default template](https://github.com/ngoduykhanh/wireguard-ui/blob/master/templates/wg.conf) | N/A |
|
||||
| `WG_CONF_TEMPLATE` | The custom `wg.conf` config file template. Please refer to our [default template](https://github.com/swissmakers/wireguard-manager/blob/master/templates/wg.conf) | N/A |
|
||||
| `EMAIL_FROM_ADDRESS` | The sender email address | N/A |
|
||||
| `EMAIL_FROM_NAME` | The sender name | `WireGuard UI` |
|
||||
| `SENDGRID_API_KEY` | The SendGrid api key | N/A |
|
||||
@ -205,7 +205,7 @@ this feature work.
|
||||
Go to the project root directory and run the following command:
|
||||
|
||||
```sh
|
||||
docker build --build-arg=GIT_COMMIT=$(git rev-parse --short HEAD) -t wireguard-ui .
|
||||
docker build --build-arg=GIT_COMMIT=$(git rev-parse --short HEAD) -t wireguard-manager .
|
||||
```
|
||||
|
||||
or
|
||||
@ -214,11 +214,11 @@ or
|
||||
docker compose build --build-arg=GIT_COMMIT=$(git rev-parse --short HEAD)
|
||||
```
|
||||
|
||||
:information_source: A container image is available on [Docker Hub](https://hub.docker.com/r/ngoduykhanh/wireguard-ui)
|
||||
:information_source: A container image is available on [Docker Hub](https://hub.docker.com/r/swissmakers/wireguard-manager)
|
||||
which you can pull and use
|
||||
|
||||
```
|
||||
docker pull ngoduykhanh/wireguard-ui
|
||||
docker pull swissmakers/wireguard-manager
|
||||
````
|
||||
|
||||
### Build binary file
|
||||
@ -232,12 +232,12 @@ Prepare the assets directory
|
||||
Then build your executable
|
||||
|
||||
```sh
|
||||
go build -o wireguard-ui
|
||||
go build -o wireguard-manager
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT. See [LICENSE](https://github.com/ngoduykhanh/wireguard-ui/blob/master/LICENSE).
|
||||
MIT. See [LICENSE](https://github.com/swissmakers/wireguard-manager/blob/master/LICENSE).
|
||||
|
||||
## Support
|
||||
|
||||
|
@ -3,7 +3,7 @@ version: "3"
|
||||
services:
|
||||
wg:
|
||||
build: .
|
||||
#image: ngoduykhanh/wireguard-ui:latest
|
||||
#image: swissmakers/wireguard-manager:latest
|
||||
container_name: wgui
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
|
@ -6,17 +6,17 @@ services:
|
||||
command:
|
||||
- wg0
|
||||
container_name: boringtun
|
||||
# use the network of the 'wireguard-ui' service. this enables to show active clients in the status page
|
||||
network_mode: service:wireguard-ui
|
||||
# use the network of the 'wireguard-manager' service. this enables to show active clients in the status page
|
||||
network_mode: service:wireguard-manager
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
volumes:
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
- ./config:/etc/wireguard
|
||||
|
||||
wireguard-ui:
|
||||
image: ngoduykhanh/wireguard-ui:latest
|
||||
container_name: wireguard-ui
|
||||
wireguard-manager:
|
||||
image: swissmakers/wireguard-manager:latest
|
||||
container_name: wireguard-manager
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
environment:
|
||||
@ -37,7 +37,7 @@ services:
|
||||
- ./db:/app/db
|
||||
- ./config:/etc/wireguard
|
||||
ports:
|
||||
# port for wireguard-ui
|
||||
# port for wireguard-manager
|
||||
- "5000:5000"
|
||||
# port of the wireguard server. this must be set here as the `boringtun` container joins the network of this container and hasn't its own network over which it could publish the ports
|
||||
- "51820:51820/udp"
|
||||
|
@ -9,14 +9,14 @@ services:
|
||||
volumes:
|
||||
- ./config:/config
|
||||
ports:
|
||||
# port for wireguard-ui. this must be set here as the `wireguard-ui` container joins the network of this container and hasn't its own network over which it could publish the ports
|
||||
# port for wireguard-manager. this must be set here as the `wireguard-manager` container joins the network of this container and hasn't its own network over which it could publish the ports
|
||||
- "5000:5000"
|
||||
# port of the wireguard server
|
||||
- "51820:51820/udp"
|
||||
|
||||
wireguard-ui:
|
||||
image: ngoduykhanh/wireguard-ui:latest
|
||||
container_name: wireguard-ui
|
||||
wireguard-manager:
|
||||
image: swissmakers/wireguard-manager:latest
|
||||
container_name: wireguard-manager
|
||||
depends_on:
|
||||
- wireguard
|
||||
cap_add:
|
||||
|
@ -1,9 +1,9 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
wireguard-ui:
|
||||
image: ngoduykhanh/wireguard-ui:latest
|
||||
container_name: wireguard-ui
|
||||
wireguard-manager:
|
||||
image: swissmakers/wireguard-manager:latest
|
||||
container_name: wireguard-manager
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
# required to show active clients. with this set, you don't need to expose the ui port (5000) anymore
|
||||
|
4
go.mod
4
go.mod
@ -1,6 +1,6 @@
|
||||
module github.com/ngoduykhanh/wireguard-ui
|
||||
module github.com/swissmakers/wireguard-manager
|
||||
|
||||
go 1.21
|
||||
go 1.22.9
|
||||
|
||||
require (
|
||||
github.com/NicoNex/echotron/v3 v3.27.0
|
||||
|
@ -23,11 +23,11 @@ import (
|
||||
"golang.zx2c4.com/wireguard/wgctrl"
|
||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||
|
||||
"github.com/ngoduykhanh/wireguard-ui/emailer"
|
||||
"github.com/ngoduykhanh/wireguard-ui/model"
|
||||
"github.com/ngoduykhanh/wireguard-ui/store"
|
||||
"github.com/ngoduykhanh/wireguard-ui/telegram"
|
||||
"github.com/ngoduykhanh/wireguard-ui/util"
|
||||
"github.com/swissmakers/wireguard-manager/emailer"
|
||||
"github.com/swissmakers/wireguard-manager/model"
|
||||
"github.com/swissmakers/wireguard-manager/store"
|
||||
"github.com/swissmakers/wireguard-manager/telegram"
|
||||
"github.com/swissmakers/wireguard-manager/util"
|
||||
)
|
||||
|
||||
var usernameRegexp = regexp.MustCompile("^\\w[\\w\\-.]*$")
|
||||
|
@ -8,9 +8,9 @@ import (
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/gommon/log"
|
||||
"github.com/ngoduykhanh/wireguard-ui/model"
|
||||
"github.com/ngoduykhanh/wireguard-ui/store"
|
||||
"github.com/sabhiram/go-wol/wol"
|
||||
"github.com/swissmakers/wireguard-manager/model"
|
||||
"github.com/swissmakers/wireguard-manager/store"
|
||||
)
|
||||
|
||||
type WakeOnLanHostSavePayload struct {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/gorilla/sessions"
|
||||
"github.com/labstack/echo-contrib/session"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/ngoduykhanh/wireguard-ui/util"
|
||||
"github.com/swissmakers/wireguard-manager/util"
|
||||
)
|
||||
|
||||
func ValidSession(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
|
16
main.go
16
main.go
@ -15,14 +15,14 @@ import (
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/gommon/log"
|
||||
"github.com/ngoduykhanh/wireguard-ui/store"
|
||||
"github.com/ngoduykhanh/wireguard-ui/telegram"
|
||||
"github.com/swissmakers/wireguard-manager/store"
|
||||
"github.com/swissmakers/wireguard-manager/telegram"
|
||||
|
||||
"github.com/ngoduykhanh/wireguard-ui/emailer"
|
||||
"github.com/ngoduykhanh/wireguard-ui/handler"
|
||||
"github.com/ngoduykhanh/wireguard-ui/router"
|
||||
"github.com/ngoduykhanh/wireguard-ui/store/jsondb"
|
||||
"github.com/ngoduykhanh/wireguard-ui/util"
|
||||
"github.com/swissmakers/wireguard-manager/emailer"
|
||||
"github.com/swissmakers/wireguard-manager/handler"
|
||||
"github.com/swissmakers/wireguard-manager/router"
|
||||
"github.com/swissmakers/wireguard-manager/store/jsondb"
|
||||
"github.com/swissmakers/wireguard-manager/util"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -159,7 +159,7 @@ func init() {
|
||||
fmt.Println("Git Commit\t:", gitCommit)
|
||||
fmt.Println("Git Ref\t\t:", gitRef)
|
||||
fmt.Println("Build Time\t:", buildTime)
|
||||
fmt.Println("Git Repo\t:", "https://github.com/ngoduykhanh/wireguard-ui")
|
||||
fmt.Println("Git Repo\t:", "https://github.com/swissmakers/wireguard-manager")
|
||||
fmt.Println("Authentication\t:", !util.DisableLogin)
|
||||
fmt.Println("Bind address\t:", util.BindAddress)
|
||||
//fmt.Println("Sendgrid key\t:", util.SendgridApiKey)
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "wireguard-ui",
|
||||
"name": "wireguard-manager",
|
||||
"version": "1.0.0",
|
||||
"description": "Wireguard web interface",
|
||||
"main": "index.js",
|
||||
"repository": "git@github.com:ngoduykhanh/wireguard-ui.git",
|
||||
"repository": "git@github.com:swissmakers/wireguard-manager.git",
|
||||
"author": "Khanh Ngo <k@ndk.name>",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
@ -13,7 +13,7 @@ import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/echo/v4/middleware"
|
||||
"github.com/labstack/gommon/log"
|
||||
"github.com/ngoduykhanh/wireguard-ui/util"
|
||||
"github.com/swissmakers/wireguard-manager/util"
|
||||
)
|
||||
|
||||
// TemplateRegistry is a custom html/template renderer for Echo framework
|
||||
|
@ -13,8 +13,8 @@ import (
|
||||
"github.com/skip2/go-qrcode"
|
||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||
|
||||
"github.com/ngoduykhanh/wireguard-ui/model"
|
||||
"github.com/ngoduykhanh/wireguard-ui/util"
|
||||
"github.com/swissmakers/wireguard-manager/model"
|
||||
"github.com/swissmakers/wireguard-manager/util"
|
||||
)
|
||||
|
||||
type JsonDB struct {
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"fmt"
|
||||
"path"
|
||||
|
||||
"github.com/ngoduykhanh/wireguard-ui/model"
|
||||
"github.com/ngoduykhanh/wireguard-ui/util"
|
||||
"github.com/swissmakers/wireguard-manager/model"
|
||||
"github.com/swissmakers/wireguard-manager/util"
|
||||
)
|
||||
|
||||
func (o *JsonDB) GetWakeOnLanHosts() ([]model.WakeOnLanHost, error) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package store
|
||||
|
||||
import (
|
||||
"github.com/ngoduykhanh/wireguard-ui/model"
|
||||
"github.com/swissmakers/wireguard-manager/model"
|
||||
)
|
||||
|
||||
type IStore interface {
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/NicoNex/echotron/v3"
|
||||
"github.com/labstack/gommon/log"
|
||||
"github.com/ngoduykhanh/wireguard-ui/store"
|
||||
"github.com/swissmakers/wireguard-manager/store"
|
||||
)
|
||||
|
||||
type SendRequestedConfigsToTelegram func(db store.IStore, userid int64) []string
|
||||
|
@ -63,7 +63,7 @@ About
|
||||
</div>
|
||||
<strong>Copyright ©
|
||||
<script>document.write(new Date().getFullYear())</script>
|
||||
<a href="https://github.com/ngoduykhanh/wireguard-ui">Wireguard UI</a>.
|
||||
<a href="https://github.com/swissmakers/wireguard-manager">Wireguard UI</a>.
|
||||
</strong> All rights reserved.
|
||||
|
||||
</div>
|
||||
@ -83,7 +83,7 @@ About
|
||||
$.ajax({
|
||||
cache: false,
|
||||
method: 'GET',
|
||||
url: 'https://api.github.com/repos/ngoduykhanh/wireguard-ui/releases/tags/' + $("#version").val(),
|
||||
url: 'https://api.github.com/repos/swissmakers/wireguard-manager/releases/tags/' + $("#version").val(),
|
||||
dataType: 'json',
|
||||
contentType: "application/json",
|
||||
success: function (data) {
|
||||
@ -99,7 +99,7 @@ About
|
||||
$.ajax({
|
||||
cache: false,
|
||||
method: 'GET',
|
||||
url: 'https://api.github.com/repos/ngoduykhanh/wireguard-ui/releases/latest',
|
||||
url: 'https://api.github.com/repos/swissmakers/wireguard-manager/releases/latest',
|
||||
dataType: 'json',
|
||||
contentType: "application/json",
|
||||
success: function (data) {
|
||||
@ -121,7 +121,7 @@ About
|
||||
$.ajax({
|
||||
cache: false,
|
||||
method: 'GET',
|
||||
url: 'https://api.github.com/repos/ngoduykhanh/wireguard-ui/contributors',
|
||||
url: 'https://api.github.com/repos/swissmakers/wireguard-manager/contributors',
|
||||
dataType: 'json',
|
||||
contentType: "application/json",
|
||||
success: function (data) {
|
||||
|
@ -352,7 +352,7 @@
|
||||
<div class="float-right d-none d-sm-block">
|
||||
<b>Version</b> {{ .appVersion }}
|
||||
</div>
|
||||
<strong>Copyright © <script>document.write(new Date().getFullYear())</script> <a href="https://github.com/ngoduykhanh/wireguard-ui">Wireguard UI</a>.</strong> All rights
|
||||
<strong>Copyright © <script>document.write(new Date().getFullYear())</script> <a href="https://github.com/swissmakers/wireguard-manager">Wireguard UI</a>.</strong> All rights
|
||||
reserved.
|
||||
</footer>
|
||||
-->
|
||||
|
@ -25,7 +25,7 @@
|
||||
<body class="hold-transition login-page">
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="https://github.com/ngoduykhanh/wireguard-ui">WireGuard UI</a>
|
||||
<a href="https://github.com/swissmakers/wireguard-manager">WireGuard UI</a>
|
||||
</div>
|
||||
<!-- /.login-logo -->
|
||||
<div class="card">
|
||||
|
@ -79,7 +79,7 @@
|
||||
|
||||
<div class="row">
|
||||
{{ range $idx, $host := .hosts }}
|
||||
{{- /*gotype: github.com/ngoduykhanh/wireguard-ui/model.WakeOnLanHost*/ -}}
|
||||
{{- /*gotype: github.com/swissmakers/wireguard-manager/model.WakeOnLanHost*/ -}}
|
||||
<div class="col-sm-4" id="{{ $host.ResolveResourceName }}">
|
||||
<div class="info-box">
|
||||
<div class="info-box-content">
|
||||
|
@ -1,4 +1,4 @@
|
||||
# This file was generated using wireguard-ui (https://github.com/ngoduykhanh/wireguard-ui)
|
||||
# This file was generated using wireguard-manager (https://github.com/swissmakers/wireguard-manager)
|
||||
# Please don't modify it manually, otherwise your change might get replaced.
|
||||
|
||||
# Address updated at: {{ .serverConfig.Interface.UpdatedAt }}
|
||||
|
@ -20,15 +20,15 @@ import (
|
||||
"text/template"
|
||||
"time"
|
||||
|
||||
"github.com/ngoduykhanh/wireguard-ui/store"
|
||||
"github.com/ngoduykhanh/wireguard-ui/telegram"
|
||||
"github.com/skip2/go-qrcode"
|
||||
"github.com/swissmakers/wireguard-manager/store"
|
||||
"github.com/swissmakers/wireguard-manager/telegram"
|
||||
"golang.org/x/mod/sumdb/dirhash"
|
||||
|
||||
externalip "github.com/glendc/go-external-ip"
|
||||
"github.com/labstack/gommon/log"
|
||||
"github.com/ngoduykhanh/wireguard-ui/model"
|
||||
"github.com/sdomino/scribble"
|
||||
"github.com/swissmakers/wireguard-manager/model"
|
||||
)
|
||||
|
||||
var qrCodeSettings = model.QRCodeSettings{
|
||||
|
Loading…
x
Reference in New Issue
Block a user