mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 08:47:35 +08:00
fixed tests and removed some debugging logs
This commit is contained in:
@@ -154,13 +154,6 @@ var UpdatePeers mqtt.MessageHandler = func(client mqtt.Client, msg mqtt.Message)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
ncutils.Log("update peer handler")
|
ncutils.Log("update peer handler")
|
||||||
ncutils.Log("recieved " + string(len(peerUpdate.Peers)) + "peers to update")
|
|
||||||
ncutils.Log(string(msg.Payload()))
|
|
||||||
ncutils.Log(peerUpdate.Network)
|
|
||||||
for _, peer := range peerUpdate.Peers {
|
|
||||||
key := peer.PublicKey.String()
|
|
||||||
ncutils.Log(key)
|
|
||||||
}
|
|
||||||
var cfg config.ClientConfig
|
var cfg config.ClientConfig
|
||||||
cfg.Network = peerUpdate.Network
|
cfg.Network = peerUpdate.Network
|
||||||
cfg.ReadConfig()
|
cfg.ReadConfig()
|
||||||
|
@@ -361,7 +361,6 @@ func UpdateWgPeers(wgInterface string, peers []wgtypes.PeerConfig) error {
|
|||||||
//delete the peers sections as they are going to be replaced
|
//delete the peers sections as they are going to be replaced
|
||||||
wireguard.DeleteSection(section_peers)
|
wireguard.DeleteSection(section_peers)
|
||||||
for i, peer := range peers {
|
for i, peer := range peers {
|
||||||
ncutils.Log("adding peer section for peer #: " + string(i) + peer.PublicKey.String())
|
|
||||||
wireguard.SectionWithIndex(section_peers, i).Key("PublicKey").SetValue(peer.PublicKey.String())
|
wireguard.SectionWithIndex(section_peers, i).Key("PublicKey").SetValue(peer.PublicKey.String())
|
||||||
//if peer.PresharedKey.String() != "" {
|
//if peer.PresharedKey.String() != "" {
|
||||||
//wireguard.SectionWithIndex(section_peers, i).Key("PreSharedKey").SetValue(peer.PresharedKey.String())
|
//wireguard.SectionWithIndex(section_peers, i).Key("PreSharedKey").SetValue(peer.PresharedKey.String())
|
||||||
|
Reference in New Issue
Block a user