Skip to content

Commit

Permalink
disco: better default parameters for disco
Browse files Browse the repository at this point in the history
  • Loading branch information
rkonfj committed Jun 1, 2024
1 parent 95f057a commit e1d9300
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/pgcli/vpn/vpn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions disco/disco.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e1d9300

Please sign in to comment.