5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-22 08:20:28 +00:00

Increase the randomly generated port in -genconf to values above 32768

This commit is contained in:
Neil Alexander 2018-03-07 22:36:16 +00:00
parent 95a6cfff10
commit 6388b9b99d
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -113,7 +113,7 @@ func generateConfig(isAutoconf bool) *nodeConfig {
cfg.Listen = "[::]:0"
} else {
r1 := rand.New(rand.NewSource(time.Now().UnixNano()))
cfg.Listen = fmt.Sprintf("[::]:%d", r1.Intn(65534 - 1024) + 1024)
cfg.Listen = fmt.Sprintf("[::]:%d", r1.Intn(65534 - 32768) + 32768)
}
cfg.AdminListen = "[::1]:9001"
cfg.BoxPub = hex.EncodeToString(bpub[:])