mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-15 15:21:14 +00:00
generate interface and peer configuration filenames in backend only (#395)
This commit is contained in:
@@ -47,8 +47,9 @@ type Interface struct {
|
||||
|
||||
// Calculated values
|
||||
|
||||
EnabledPeers int `json:"EnabledPeers"`
|
||||
TotalPeers int `json:"TotalPeers"`
|
||||
EnabledPeers int `json:"EnabledPeers"`
|
||||
TotalPeers int `json:"TotalPeers"`
|
||||
Filename string `json:"Filename"` // the filename of the config file, for example: wg0.conf
|
||||
}
|
||||
|
||||
func NewInterface(src *domain.Interface, peers []domain.Peer) *Interface {
|
||||
@@ -88,6 +89,7 @@ func NewInterface(src *domain.Interface, peers []domain.Peer) *Interface {
|
||||
|
||||
EnabledPeers: 0,
|
||||
TotalPeers: 0,
|
||||
Filename: src.GetConfigFileName(),
|
||||
}
|
||||
|
||||
if len(peers) > 0 {
|
||||
|
Reference in New Issue
Block a user