mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-14 18:28:16 +03:00
User management
More than one user with Manager or Admin permissions can be created from UI
This commit is contained in:
parent
f256668a99
commit
df10417668
17 changed files with 706 additions and 101 deletions
|
@ -24,6 +24,7 @@ var (
|
|||
const (
|
||||
DefaultUsername = "admin"
|
||||
DefaultPassword = "admin"
|
||||
DefaultIsAdmin = true
|
||||
DefaultServerAddress = "10.252.1.0/24"
|
||||
DefaultServerPort = 51820
|
||||
DefaultDNS = "1.1.1.1"
|
||||
|
|
|
@ -381,7 +381,7 @@ func ValidateIPAllocation(serverAddresses []string, ipAllocatedList []string, ip
|
|||
}
|
||||
|
||||
// WriteWireGuardServerConfig to write Wireguard server config. e.g. wg0.conf
|
||||
func WriteWireGuardServerConfig(tmplBox *rice.Box, serverConfig model.Server, clientDataList []model.ClientData, globalSettings model.GlobalSetting) error {
|
||||
func WriteWireGuardServerConfig(tmplBox *rice.Box, serverConfig model.Server, clientDataList []model.ClientData, usersList []model.User, globalSettings model.GlobalSetting) error {
|
||||
var tmplWireguardConf string
|
||||
|
||||
// if set, read wg.conf template from WgConfTemplate
|
||||
|
@ -416,6 +416,7 @@ func WriteWireGuardServerConfig(tmplBox *rice.Box, serverConfig model.Server, cl
|
|||
"serverConfig": serverConfig,
|
||||
"clientDataList": clientDataList,
|
||||
"globalSettings": globalSettings,
|
||||
"usersList": usersList,
|
||||
}
|
||||
|
||||
err = t.Execute(f, config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue