|
|
@@ -23,13 +23,14 @@ var (
|
|
|
derpMapURL = flag.String("derp-map", "https://login.tailscale.com/derpmap/default", "URL to DERP map (https:// or file://)")
|
|
|
listen = flag.String("listen", ":8030", "HTTP listen address")
|
|
|
probeOnce = flag.Bool("once", false, "probe once and print results, then exit; ignores the listen flag")
|
|
|
+ spread = flag.Bool("spread", true, "whether to spread probing over time")
|
|
|
interval = flag.Duration("interval", 15*time.Second, "probe interval")
|
|
|
)
|
|
|
|
|
|
func main() {
|
|
|
flag.Parse()
|
|
|
|
|
|
- p := prober.New().WithSpread(true).WithOnce(*probeOnce)
|
|
|
+ p := prober.New().WithSpread(*spread).WithOnce(*probeOnce)
|
|
|
dp, err := prober.DERP(p, *derpMapURL, *interval, *interval, *interval)
|
|
|
if err != nil {
|
|
|
log.Fatal(err)
|