Updated with PR review comments.

This commit is contained in:
cameronts 2022-07-29 12:10:42 -07:00
parent 3dcce87868
commit 3f0f2c88ca
2 changed files with 5 additions and 3 deletions

View file

@ -97,10 +97,11 @@ func startGoRoutines(wg *sync.WaitGroup) context.CancelFunc {
if err := wireguard.ApplyConf(&cfg.Node, cfg.Node.Interface, ncutils.GetNetclientPathSpecific()+cfg.Node.Interface+".conf"); err != nil {
logger.Log(0, "failed to start ", cfg.Node.Interface, "wg interface", err.Error())
}
server := cfg.Server.Server
if cfg.PublicIPService != "" {
global_settings.PublicIPServices[server] = cfg.PublicIPService
global_settings.PublicIPServices[network] = cfg.PublicIPService
}
server := cfg.Server.Server
if !serverSet[server] {
// == subscribe to all nodes for each on machine ==
serverSet[server] = true

View file

@ -2,4 +2,5 @@ package global_settings
// globalsettings - settings that are global in nature. Avoids circular dependencies between config loading and usage.
var PublicIPServices map[string]string
// PublicIPServices - the list of user-specified IP services to use to obtain the node's public IP
var PublicIPServices map[string]string = make(map[string]string)