Wireguard exporter friendly tags (#81)

* add friendly name

* add friendly name as option to configuration

* add friendly name configuration to readme
This commit is contained in:
ultram4rine
2021-12-16 22:35:15 +04:00
committed by GitHub
parent acb629f672
commit e581b3a69f
6 changed files with 64 additions and 57 deletions

View File

@@ -112,7 +112,7 @@ func (s *Server) GetInterfaceConfig(c *gin.Context) {
currentSession := GetSessionData(c)
device := s.peers.GetDevice(currentSession.DeviceName)
peers := s.peers.GetActivePeers(device.DeviceName)
cfg, err := device.GetConfigFile(peers)
cfg, err := device.GetConfigFile(peers, s.config.Core.WGExoprterFriendlyNames)
if err != nil {
s.GetHandleError(c, http.StatusInternalServerError, "ConfigFile error", err.Error())
return