This commit is contained in:
alikhanich 2023-03-17 11:17:12 +03:00
parent 8e6504c1de
commit 2130289caf
16 changed files with 30 additions and 30 deletions

View file

@ -1,4 +1,4 @@
![](https://github.com/ngoduykhanh/wireguard-ui/workflows/wireguard-ui%20build%20release/badge.svg) ![](https://github.com/alikhanich/wireguard-ui/workflows/wireguard-ui%20build%20release/badge.svg)
# wireguard-ui # wireguard-ui
@ -28,7 +28,7 @@ Download the binary file from the release page and run it directly on the host m
### Using docker compose ### Using docker compose
You can take a look at this example You can take a look at this example
of [docker-compose.yml](https://github.com/ngoduykhanh/wireguard-ui/blob/master/docker-compose.yaml). Please adjust of [docker-compose.yml](https://github.com/alikhanich/wireguard-ui/blob/master/docker-compose.yaml). Please adjust
volume mount points to work with your setup. Then run it like below: volume mount points to work with your setup. Then run it like below:
``` ```
@ -60,7 +60,7 @@ Note:
| `WGUI_PERSISTENT_KEEPALIVE` | The default persistent keepalive for WireGuard in global settings | `15` | | `WGUI_PERSISTENT_KEEPALIVE` | The default persistent keepalive for WireGuard in global settings | `15` |
| `WGUI_FORWARD_MARK` | The default WireGuard forward mark | `0xca6c` | | `WGUI_FORWARD_MARK` | The default WireGuard forward mark | `0xca6c` |
| `WGUI_CONFIG_FILE_PATH` | The default WireGuard config file path used in global settings | `/etc/wireguard/wg0.conf` | | `WGUI_CONFIG_FILE_PATH` | The default WireGuard config file path used in global settings | `/etc/wireguard/wg0.conf` |
| `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/alikhanich/wireguard-ui/blob/master/templates/wg.conf) | N/A |
| `EMAIL_FROM_ADDRESS` | The sender email address | N/A | | `EMAIL_FROM_ADDRESS` | The sender email address | N/A |
| `EMAIL_FROM_NAME` | The sender name | `WireGuard UI` | | `EMAIL_FROM_NAME` | The sender name | `WireGuard UI` |
| `SENDGRID_API_KEY` | The SendGrid api key | N/A | | `SENDGRID_API_KEY` | The SendGrid api key | N/A |
@ -229,7 +229,7 @@ rice append --exec wireguard-ui
## License ## License
MIT. See [LICENSE](https://github.com/ngoduykhanh/wireguard-ui/blob/master/LICENSE). MIT. See [LICENSE](https://github.com/alikhanich/wireguard-ui/blob/master/LICENSE).
## Support ## Support

2
go.mod
View file

@ -1,4 +1,4 @@
module github.com/ngoduykhanh/wireguard-ui module github.com/alikhanich/wireguard-ui
go 1.14 go 1.14

View file

@ -20,10 +20,10 @@ import (
"golang.zx2c4.com/wireguard/wgctrl" "golang.zx2c4.com/wireguard/wgctrl"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes" "golang.zx2c4.com/wireguard/wgctrl/wgtypes"
"github.com/ngoduykhanh/wireguard-ui/emailer" "github.com/alikhanich/wireguard-ui/emailer"
"github.com/ngoduykhanh/wireguard-ui/model" "github.com/alikhanich/wireguard-ui/model"
"github.com/ngoduykhanh/wireguard-ui/store" "github.com/alikhanich/wireguard-ui/store"
"github.com/ngoduykhanh/wireguard-ui/util" "github.com/alikhanich/wireguard-ui/util"
) )
// Health check handler // Health check handler

View file

@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/labstack/gommon/log" "github.com/labstack/gommon/log"
"github.com/ngoduykhanh/wireguard-ui/model" "github.com/alikhanich/wireguard-ui/model"
"github.com/ngoduykhanh/wireguard-ui/store" "github.com/alikhanich/wireguard-ui/store"
"github.com/sabhiram/go-wol/wol" "github.com/sabhiram/go-wol/wol"
"net" "net"
"net/http" "net/http"

View file

@ -6,7 +6,7 @@ import (
"github.com/labstack/echo-contrib/session" "github.com/labstack/echo-contrib/session"
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/ngoduykhanh/wireguard-ui/util" "github.com/alikhanich/wireguard-ui/util"
) )
func ValidSession(next echo.HandlerFunc) echo.HandlerFunc { func ValidSession(next echo.HandlerFunc) echo.HandlerFunc {

14
main.go
View file

@ -5,17 +5,17 @@ import (
"fmt" "fmt"
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/labstack/gommon/log" "github.com/labstack/gommon/log"
"github.com/ngoduykhanh/wireguard-ui/store" "github.com/alikhanich/wireguard-ui/store"
"net/http" "net/http"
"os" "os"
"time" "time"
rice "github.com/GeertJohan/go.rice" rice "github.com/GeertJohan/go.rice"
"github.com/ngoduykhanh/wireguard-ui/emailer" "github.com/alikhanich/wireguard-ui/emailer"
"github.com/ngoduykhanh/wireguard-ui/handler" "github.com/alikhanich/wireguard-ui/handler"
"github.com/ngoduykhanh/wireguard-ui/router" "github.com/alikhanich/wireguard-ui/router"
"github.com/ngoduykhanh/wireguard-ui/store/jsondb" "github.com/alikhanich/wireguard-ui/store/jsondb"
"github.com/ngoduykhanh/wireguard-ui/util" "github.com/alikhanich/wireguard-ui/util"
) )
var ( var (
@ -96,7 +96,7 @@ func init() {
fmt.Println("Git Commit\t:", gitCommit) fmt.Println("Git Commit\t:", gitCommit)
fmt.Println("Git Ref\t\t:", gitRef) fmt.Println("Git Ref\t\t:", gitRef)
fmt.Println("Build Time\t:", buildTime) 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/alikhanich/wireguard-ui")
fmt.Println("Authentication\t:", !util.DisableLogin) fmt.Println("Authentication\t:", !util.DisableLogin)
fmt.Println("Bind address\t:", util.BindAddress) fmt.Println("Bind address\t:", util.BindAddress)
//fmt.Println("Sendgrid key\t:", util.SendgridApiKey) //fmt.Println("Sendgrid key\t:", util.SendgridApiKey)

View file

@ -13,7 +13,7 @@ import (
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware" "github.com/labstack/echo/v4/middleware"
"github.com/labstack/gommon/log" "github.com/labstack/gommon/log"
"github.com/ngoduykhanh/wireguard-ui/util" "github.com/alikhanich/wireguard-ui/util"
) )
// TemplateRegistry is a custom html/template renderer for Echo framework // TemplateRegistry is a custom html/template renderer for Echo framework

View file

@ -12,8 +12,8 @@ import (
"github.com/skip2/go-qrcode" "github.com/skip2/go-qrcode"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes" "golang.zx2c4.com/wireguard/wgctrl/wgtypes"
"github.com/ngoduykhanh/wireguard-ui/model" "github.com/alikhanich/wireguard-ui/model"
"github.com/ngoduykhanh/wireguard-ui/util" "github.com/alikhanich/wireguard-ui/util"
) )
type JsonDB struct { type JsonDB struct {

View file

@ -3,7 +3,7 @@ package jsondb
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/ngoduykhanh/wireguard-ui/model" "github.com/alikhanich/wireguard-ui/model"
) )
func (o *JsonDB) GetWakeOnLanHosts() ([]model.WakeOnLanHost, error) { func (o *JsonDB) GetWakeOnLanHosts() ([]model.WakeOnLanHost, error) {

View file

@ -1,7 +1,7 @@
package store package store
import ( import (
"github.com/ngoduykhanh/wireguard-ui/model" "github.com/alikhanich/wireguard-ui/model"
) )
type IStore interface { type IStore interface {

View file

@ -57,7 +57,7 @@ About
</div> </div>
<strong>Copyright &copy; <strong>Copyright &copy;
<script>document.write(new Date().getFullYear())</script> <script>document.write(new Date().getFullYear())</script>
<a href="https://github.com/ngoduykhanh/wireguard-ui">Wireguard UI</a>. <a href="https://github.com/alikhanich/wireguard-ui">Wireguard UI</a>.
</strong> All rights reserved. </strong> All rights reserved.
</div> </div>

View file

@ -297,7 +297,7 @@
<div class="float-right d-none d-sm-block"> <div class="float-right d-none d-sm-block">
<b>Version</b> {{ .appVersion }} <b>Version</b> {{ .appVersion }}
</div> </div>
<strong>Copyright &copy; <script>document.write(new Date().getFullYear())</script> <a href="https://github.com/ngoduykhanh/wireguard-ui">Wireguard UI</a>.</strong> All rights <strong>Copyright &copy; <script>document.write(new Date().getFullYear())</script> <a href="https://github.com/alikhanich/wireguard-ui">Wireguard UI</a>.</strong> All rights
reserved. reserved.
</footer> </footer>
--> -->

View file

@ -25,7 +25,7 @@
<body class="hold-transition login-page"> <body class="hold-transition login-page">
<div class="login-box"> <div class="login-box">
<div class="login-logo"> <div class="login-logo">
<a href="https://github.com/ngoduykhanh/wireguard-ui">WireGuard UI</a> <a href="https://github.com/alikhanich/wireguard-ui">WireGuard UI</a>
</div> </div>
<!-- /.login-logo --> <!-- /.login-logo -->
<div class="card"> <div class="card">

View file

@ -79,7 +79,7 @@
<div class="row"> <div class="row">
{{ range $idx, $host := .hosts }} {{ range $idx, $host := .hosts }}
{{- /*gotype: github.com/ngoduykhanh/wireguard-ui/model.WakeOnLanHost*/ -}} {{- /*gotype: github.com/alikhanich/wireguard-ui/model.WakeOnLanHost*/ -}}
<div class="col-sm-4" id="{{ $host.ResolveResourceName }}"> <div class="col-sm-4" id="{{ $host.ResolveResourceName }}">
<div class="info-box"> <div class="info-box">
<div class="info-box-content"> <div class="info-box-content">

View file

@ -1,4 +1,4 @@
# This file was generated using wireguard-ui (https://github.com/ngoduykhanh/wireguard-ui) # This file was generated using wireguard-ui (https://github.com/alikhanich/wireguard-ui)
# Please don't modify it manually, otherwise your change might get replaced. # Please don't modify it manually, otherwise your change might get replaced.
# Address updated at: {{ .serverConfig.Interface.UpdatedAt }} # Address updated at: {{ .serverConfig.Interface.UpdatedAt }}

View file

@ -15,7 +15,7 @@ import (
rice "github.com/GeertJohan/go.rice" rice "github.com/GeertJohan/go.rice"
externalip "github.com/glendc/go-external-ip" externalip "github.com/glendc/go-external-ip"
"github.com/labstack/gommon/log" "github.com/labstack/gommon/log"
"github.com/ngoduykhanh/wireguard-ui/model" "github.com/alikhanich/wireguard-ui/model"
"github.com/sdomino/scribble" "github.com/sdomino/scribble"
) )