disco: better default parameters for disco

This commit is contained in:
rkonfj 2024-06-01 11:38:41 +08:00
parent 95f057aede
commit e1d9300fc5
2 changed files with 4 additions and 4 deletions

View File

@ -52,8 +52,8 @@ func init() {
Cmd.Flags().StringSlice("allowed-ip", []string{}, "declare IPs that can be routed/NATed by this machine (i.e. 192.168.0.0/24)")
Cmd.Flags().StringSlice("peer", []string{}, "specify peers instead of auto-discovery (pg://<peerID>?alias1=<ipv4>&alias2=<ipv6>)")
Cmd.Flags().Int("disco-port-scan-offset", -500, "scan ports offset when disco")
Cmd.Flags().Int("disco-port-scan-count", 2000, "scan ports count when disco")
Cmd.Flags().Int("disco-port-scan-offset", -1000, "scan ports offset when disco")
Cmd.Flags().Int("disco-port-scan-count", 3000, "scan ports count when disco")
Cmd.Flags().Int("disco-challenges-retry", 5, "ping challenges retry count when disco")
Cmd.Flags().Duration("disco-challenges-initial-interval", 200*time.Millisecond, "ping challenges initial interval when disco")
Cmd.Flags().Float64("disco-challenges-backoff-rate", 1.65, "ping challenges backoff rate when disco")

View File

@ -18,8 +18,8 @@ var (
)
var defaultDiscoConfig = DiscoConfig{
PortScanOffset: -500,
PortScanCount: 2000,
PortScanOffset: -1000,
PortScanCount: 3000,
ChallengesRetry: 5,
ChallengesInitialInterval: 200 * time.Millisecond,
ChallengesBackoffRate: 1.65,