mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 22:55:06 +03:00
make it possible to override the default AdminListen value at compile time
This commit is contained in:
parent
b333c7d7f3
commit
2b4d896b6b
1 changed files with 8 additions and 1 deletions
|
@ -2,6 +2,8 @@ package defaults
|
||||||
|
|
||||||
import "github.com/yggdrasil-network/yggdrasil-go/src/config"
|
import "github.com/yggdrasil-network/yggdrasil-go/src/config"
|
||||||
|
|
||||||
|
var adminListen string
|
||||||
|
|
||||||
type MulticastInterfaceConfig = config.MulticastInterfaceConfig
|
type MulticastInterfaceConfig = config.MulticastInterfaceConfig
|
||||||
|
|
||||||
// Defines which parameters are expected by default for configuration on a
|
// Defines which parameters are expected by default for configuration on a
|
||||||
|
@ -31,7 +33,12 @@ func GenerateConfig() *config.NodeConfig {
|
||||||
cfg := new(config.NodeConfig)
|
cfg := new(config.NodeConfig)
|
||||||
cfg.NewKeys()
|
cfg.NewKeys()
|
||||||
cfg.Listen = []string{}
|
cfg.Listen = []string{}
|
||||||
cfg.AdminListen = GetDefaults().DefaultAdminListen
|
if adminListen == "" {
|
||||||
|
// TODO? "none" for all platforms?
|
||||||
|
cfg.AdminListen = GetDefaults().DefaultAdminListen
|
||||||
|
} else {
|
||||||
|
cfg.AdminListen = adminListen
|
||||||
|
}
|
||||||
cfg.Peers = []string{}
|
cfg.Peers = []string{}
|
||||||
cfg.InterfacePeers = map[string][]string{}
|
cfg.InterfacePeers = map[string][]string{}
|
||||||
cfg.AllowedPublicKeys = []string{}
|
cfg.AllowedPublicKeys = []string{}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue