5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-12-26 11:15:41 +00:00

Fix default Listen config

This commit is contained in:
Neil Alexander 2019-03-06 13:00:45 +00:00
parent 531d9f39ca
commit 18ef28a477
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -82,7 +82,7 @@ func GenerateConfig(isAutoconf bool) *NodeConfig {
cfg.Listen = []string{"tcp://[::]:0"}
} else {
r1 := rand.New(rand.NewSource(time.Now().UnixNano()))
cfg.Listen = []string{fmt.Sprintf("[::]:%d", r1.Intn(65534-32768)+32768)}
cfg.Listen = []string{fmt.Sprintf("tcp://[::]:%d", r1.Intn(65534-32768)+32768)}
}
cfg.AdminListen = defaults.GetDefaults().DefaultAdminListen
cfg.EncryptionPublicKey = hex.EncodeToString(bpub[:])