tordam

A library for peer discovery inside the Tor network
git clone https://git.parazyd.org/tordam
Log | Files | Refs | README | LICENSE

commit ece23839a13bb1e2ec29027902076e691f25525b
parent ac674b405ea9c6e14fe1c5ceb17611c60b577ad7
Author: parazyd <parazyd@dyne.org>
Date:   Mon,  3 Sep 2018 13:32:56 +0200

Add a commandline flag for a variable announce interval.

Diffstat:
Mcmd/dam-client/main.go | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cmd/dam-client/main.go b/cmd/dam-client/main.go @@ -206,8 +206,10 @@ func fetchDirlist(locations []string) ([]string, error) { func main() { var d bool + var ai int flag.BoolVar(&d, "d", false, "Don't fetch remote entry points") + flag.IntVar(&ai, "ai", 10, "Announce interval in minutes") flag.Parse() if d { @@ -315,8 +317,8 @@ func main() { } else { log.Printf("Successfully authenticated with %d nodes.\n", ann) } - log.Println("Waiting 10 minutes before next announce.") - time.Sleep(600 * time.Second) + log.Printf("Waiting %d min. before next announce.\n", ai) + time.Sleep(time.Duration(ai) * time.Minute) } //err = cmd.Wait() // Hidden service Python daemon