tAdd some comments through the code. - tordam - A library for peer discovery inside the Tor network
 (HTM) git clone https://git.parazyd.org/tordam
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 1999ba5caec580c2b873cc0b1afdf6c601564e1f
 (DIR) parent 402675f627ff126707f5dacd88e85258987941b8
 (HTM) Author: parazyd <parazyd@dyne.org>
       Date:   Mon,  3 Sep 2018 15:25:17 +0200
       
       Add some comments through the code.
       
       Diffstat:
         M cmd/dam-client/main.go              |       9 +++++----
         M python/damhs.py                     |       2 +-
       
       2 files changed, 6 insertions(+), 5 deletions(-)
       ---
 (DIR) diff --git a/cmd/dam-client/main.go b/cmd/dam-client/main.go
       t@@ -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 {
       t@@ -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 {
 (DIR) diff --git a/python/damhs.py b/python/damhs.py
       t@@ -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-----', '')