mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 13:00:47 +00:00
Increase the randomly generated port in -genconf to values above 32768
This commit is contained in:
parent
95a6cfff10
commit
6388b9b99d
@ -113,7 +113,7 @@ func generateConfig(isAutoconf bool) *nodeConfig {
|
|||||||
cfg.Listen = "[::]:0"
|
cfg.Listen = "[::]:0"
|
||||||
} else {
|
} else {
|
||||||
r1 := rand.New(rand.NewSource(time.Now().UnixNano()))
|
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.AdminListen = "[::1]:9001"
|
||||||
cfg.BoxPub = hex.EncodeToString(bpub[:])
|
cfg.BoxPub = hex.EncodeToString(bpub[:])
|
||||||
|
Loading…
Reference in New Issue
Block a user