mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-03 16:48:52 +03:00
add friendly_name param
This commit is contained in:
parent
2fdafd34ca
commit
dd8f4742e7
6 changed files with 27 additions and 7 deletions
|
@ -481,6 +481,10 @@ func NewClient(db store.IStore) echo.HandlerFunc {
|
|||
}
|
||||
}
|
||||
|
||||
if client.FriendlyName == "" {
|
||||
client.FriendlyName = client.Name + "-" + client.ID
|
||||
}
|
||||
|
||||
if client.PresharedKey == "" {
|
||||
presharedKey, err := wgtypes.GenerateKey()
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue