tor-dam

tor distributed announce mechanism (not a dht)
git clone https://git.parazyd.org/tor-dam
Log | Files | Refs | README | LICENSE

commit 1999ba5caec580c2b873cc0b1afdf6c601564e1f
parent 402675f627ff126707f5dacd88e85258987941b8
Author: parazyd <parazyd@dyne.org>
Date:   Mon,  3 Sep 2018 15:25:17 +0200

Add some comments through the code.

Diffstat:
Mcmd/dam-client/main.go | 9+++++----
Mpython/damhs.py | 2+-
2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/cmd/dam-client/main.go b/cmd/dam-client/main.go @@ -205,11 +205,11 @@ func main() { var dh string var dirHosts []string - flag.BoolVar(&d, "d", false, "Don't fetch remote entry points") - flag.BoolVar(&gen, "gen", false, "Only (re)generate keypairs and exit cleanly") - flag.IntVar(&ai, "ai", 10, "Announce interval in minutes") + flag.BoolVar(&d, "d", false, "Don't fetch remote entry points.") + flag.BoolVar(&gen, "gen", false, "Only (re)generate keypairs and exit cleanly.") + flag.IntVar(&ai, "ai", 10, "Announce interval in minutes.") flag.StringVar(&dh, "dh", "https://dam.decodeproject.eu/dirs.txt", - "A remote list of entry points/directories (comma-separated)") + "A remote list of entry points/directories. (comma-separated)") flag.Parse() if d { @@ -320,6 +320,7 @@ func main() { wg.Wait() if ann < 1 { + // TODO: Should we bail out at this point or not? cmd.Process.Kill() log.Fatalln("No successful authentications. Exiting.") } else { diff --git a/python/damhs.py b/python/damhs.py @@ -54,7 +54,7 @@ def main(): portmap[int(tup[0])] = int(tup[1]) keyfile = argv[1] - ktype = 'RSA1024' + ktype = 'RSA1024' # ED25519-V3 kcont = open(keyfile).read() kcont = kcont.replace('\n', '') kcont = kcont.replace('-----BEGIN RSA PRIVATE KEY-----', '')