summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-11-01 23:51:44 -0400
committerjoe <joe@jerkface.net>2017-11-01 23:51:44 -0400
commit30748b9edd4eb8df8998e29f68dfedb218ff8e8c (patch)
tree47a3171f7e8e7f31389d7e662bd50400ca25f033
parent565ea19d5a36f3cd2a1f88c127bc1a0183427cea (diff)
Updated todo.txt and comments.
-rw-r--r--examples/dhtd.hs58
-rw-r--r--todo.txt87
2 files changed, 83 insertions, 62 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs
index badea2b1..67dece2e 100644
--- a/examples/dhtd.hs
+++ b/examples/dhtd.hs
@@ -16,6 +16,8 @@
16{-# LANGUAGE TypeFamilies #-} 16{-# LANGUAGE TypeFamilies #-}
17{-# LANGUAGE TypeOperators #-} 17{-# LANGUAGE TypeOperators #-}
18 18
19module Main where
20
19import Control.Arrow 21import Control.Arrow
20import Control.Applicative 22import Control.Applicative
21import Control.Concurrent.STM 23import Control.Concurrent.STM
@@ -525,6 +527,16 @@ clientSession s@Session{..} sock cnum h = do
525 , ("node-id", show $ thisNode bkts) 527 , ("node-id", show $ thisNode bkts)
526 , ("network", netname) ] 528 , ("network", netname) ]
527 529
530 -- TODO: online documentation.
531 --
532 -- k - manage key-pairs
533 --
534 -- k (list keys)
535 -- k gen (generate new key and list keys)
536 -- k add <secret-key> (input a specific secret key)
537 -- k del <secret-key>
538 -- k secrets (list key pairs, including secret keys)
539
528 ("k", s) | "" <- strp s -> cmd0 $ do 540 ("k", s) | "" <- strp s -> cmd0 $ do
529 ks <- atomically $ readTVar userkeys 541 ks <- atomically $ readTVar userkeys
530 hPutClient h $ unlines $ map (mappend " " . show . Tox.key2id . snd) ks 542 hPutClient h $ unlines $ map (mappend " " . show . Tox.key2id . snd) ks
@@ -607,6 +619,30 @@ clientSession s@Session{..} sock cnum h = do
607 goQuery 619 goQuery
608 $ Map.lookup method dhtQuery 620 $ Map.lookup method dhtQuery
609 621
622 -- TODO: Online help.
623 --
624 -- p - put/publish a single given datum on a single given node.
625 --
626 -- When destination address (node-addr) is optional, it's absense means to
627 -- publish information in the local node's own database.
628 --
629 -- Bittorrent: (peer) publish yourself as peer in swarm.
630 -- (port) set your current bittorrent listen port.
631 --
632 -- p peer <infohash> <token> [node-addr]
633 --
634 -- p port <num>
635 --
636 -- Tox: (toxid) publish a rendezvous onion route to dht node.
637 -- (friend) send a friend-request over a rendezvous point.
638 -- (dhtkey) send your dht node-id over a rendezvous point.
639 --
640 -- p toxid <key> <token> <node-addr>
641 --
642 -- p friend <key> <nospam> <rendezvous-addr> <text>
643 --
644 -- p dhtkey <key> - <rendezvous-addr>
645
610 ("p", s) | Just DHT{..} <- Map.lookup netname dhts 646 ("p", s) | Just DHT{..} <- Map.lookup netname dhts
611 -> cmd0 $ do 647 -> cmd0 $ do
612 -- arguments: method 648 -- arguments: method
@@ -635,6 +671,28 @@ clientSession s@Session{..} sock cnum h = do
635 goTarget 671 goTarget
636 $ Map.lookup method dhtAnnouncables 672 $ Map.lookup method dhtAnnouncables
637 673
674 -- TODO: Online documentation.
675 --
676 -- a - announce, like put/publish but automatically selects nodes to publish on
677 -- and periodically refreshes them.
678 --
679 -- The method name is preceded with a + to start or a - to stop a given
680 -- recurring publication.
681 --
682 -- BitTorrent: (peer) Every minute, announce you are participating
683 -- in a torrent swarm.
684 --
685 -- a +peer <infohash> a -peer <infohash>
686 --
687 -- Tox: (toxid) Every 15 seconds, announce your tox identity to the
688 -- DHT so friends can find you.
689 --
690 -- a +toxid <key>
691 -- a -toxid <key>
692 --
693 -- These probably don't work:
694 -- (experimental) a +friend <nospam> <text>
695 -- (experimental) a +dhtkey
638 ("a", s) | Just DHT{..} <- Map.lookup netname dhts 696 ("a", s) | Just DHT{..} <- Map.lookup netname dhts
639 , not (null s) 697 , not (null s)
640 -> cmd0 $ do 698 -> cmd0 $ do
diff --git a/todo.txt b/todo.txt
index f92dd435..92da7962 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,17 +1,23 @@
1Online help. 1ui: Online help.
2 2
3Change refresh algorithm to refresh farther away buckets before closer ones. 3ui: Explicit routing table node deletion. "forget" command.
4 4
5Remove (without replacement) stale routing nodes at some point. 5ui: a - with no arguments would list the currently active recuring publications.
6 6
7Explicit routing table node deletion. "forget" command. 7kademlia: Change refresh algorithm to refresh farther away buckets before closer ones.
8 8
9Debug why disabled-6 does not get peer/key storage. 9kademlia: Remove (without replacement) stale routing nodes at some point.
10 10
11Give different networks a different minimum count to terminate bootstrap. Imperically, 11bug: Why does running without -4 (ipv4-only) on an ipv6-disabled computer prevent
12tox4: 6 buckets, tox6: 3 buckets 12 storage of bt peers and tox keys in the local store?
13 13
14handle exception: dhtd: Network.Socket.sendTo: does not exist (Network is unreachable 14kademlia: Give different networks a different minimum count to terminate
15 bootstrap. Imperically, tox4: 6 buckets, tox6: 3 buckets
16
17bug: Unhandled exception: dhtd: Network.Socket.sendTo: does not exist (Network
18 is unreachable
19
20tox: Don't store ourself in the kademlia buckets.
15 21
16tox: fallback to https://nodes.tox.chat/json 22tox: fallback to https://nodes.tox.chat/json
17 23
@@ -21,11 +27,9 @@ tox: hardening get-nodes test request.
21 27
22tox: nat ping 28tox: nat ping
23 29
24tox: base64 read/show
25
26tox: cache diffie-helman secrets 30tox: cache diffie-helman secrets
27 31
28tox: Expire old Tox keys. 32tox: Expire ofline Tox announces.
29 33
30tox: Chat support. 34tox: Chat support.
31 35
@@ -37,56 +41,15 @@ bt: Limit peers in get_peers response for UDP packet size limiting (around 1k).
37 41
38bt: Use LMDB backend for peer store (and nodes too?). 42bt: Use LMDB backend for peer store (and nodes too?).
39 43
40Notes: 44maint: Rename files.
41
42
43
44new commands:
45
46p - put/publish a single given datum on a single given node.
47
48 When destination address (node-addr) is optional, it's absense means to
49 publish information in the local node's own database.
50
51 Bittorrent: (peer) publish yourself as peer in swarm.
52 arguments: {"id" : "<querying nodes id>",
53 "implied_port": <0 or 1>,
54 "info_hash" : "<20-byte infohash of target torrent>",
55 "port" : <port number>,
56 "token" : "<opaque token>"}
57 response: {"id" : "<queried nodes id>"}
58
59 p peer <infohash> <token> [node-addr]
60
61 Tox: (toxid) publish a rendezvous onion route to dht node.
62 (friend) publish friend-request to rendezvous point.
63 (dhtkey) publish dht-nodeid to rendezvous point.
64
65 p toxid <key-pair> <token> [node-addr]
66
67 p friend <key-pair> <nospam> <rendezvous-addr> <text>
68
69 p dhtkey <key-pair> - <rendezvous-addr>
70
71a - announce, like put/publish but automatically selects nodes to publish on
72 and continually refreshes the records.
73
74 The method name is preceded with a + to start or a - to stop a given
75 recuring publication.
76
77 a - with no arguments would list the currently active recuring publications.
78
79 a +peer <infohash>
80 a -peer <infohash>
81
82 a +toxid <key-pair>
83 a +friend <nospam> <text>
84 a +dhtkey
85 45
86k - manage key-pairs 46 OnionRouter -> Network.Tox.Onion.Routes
47 Announcer -> Network.Kademlia.Announce
48 InterruptibleDelay -> Control.Concurrent.Delay
49 Roster -> Network.Tox.ContactInfo
50 Crypto.Tox -> Network.Tox.Crypto
51 Network.Tox.Crypto.Handlers -> Network.Tox.Friend.Handlers
52 Network.Tox.Crypto.Transport -> Network.Tox.Friend.Transport
87 53
88 k (list keys) 54maint: Probably, Network.* should be reserved for very general tools and the Tox and
89 k gen (generate new key and list keys) 55 BitTorrent paths should be moved to the top level.
90 k add <secret-key> (input a specific secret key)
91 k del <secret-key>
92 k secrets (list key pairs, including secret keys)