Skip to content

Commit

Permalink
Change log entries to Debug
Browse files Browse the repository at this point in the history
With a lot of WireGuard beacons coming in these logs get excessive
  • Loading branch information
jamesgol committed Sep 14, 2022
1 parent 70b0667 commit f7a4aac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/c2/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,23 +103,23 @@ func StartWGListenerJob(listenPort uint16, nListenPort uint16, keyExchangeListen
}

if len(currentPeers) > oldNumPeers {
jobLog.Infof("New WG peers. Updating Wireguard config")
jobLog.Debugf("New WG peers. Updating Wireguard config")

oldNumPeers = len(currentPeers)

jobLog.Infof("Old WG config for peers: %s", currentWGConf.String())
jobLog.Debugf("Old WG config for peers: %s", currentWGConf.String())
for k, v := range currentPeers {
fmt.Fprintf(currentWGConf, "public_key=%s\n", k)
fmt.Fprintf(currentWGConf, "allowed_ip=%s/32\n", v)
}

jobLog.Infof("New WG config for peers: %s", currentWGConf.String())
jobLog.Debugf("New WG config for peers: %s", currentWGConf.String())

if err := dev.IpcSetOperation(bufio.NewReader(currentWGConf)); err != nil {
jobLog.Errorf("Failed to update Wireguard Config %s", err)
continue
}
jobLog.Infof("Successfully updated Wireguard config")
jobLog.Debugf("Successfully updated Wireguard config")
}
}
}
Expand Down

0 comments on commit f7a4aac

Please sign in to comment.