TODO 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. Issues identified while writing paper:
  2. - Rotate tls-level connections -- make new ones, expire old ones.
  3. - Dirserver shouldn't put you in running-routers list if you haven't
  4. uploaded a descriptor recently
  5. - Look at having smallcells and largecells
  6. - separate trying to rebuild a circuit because you have none from trying
  7. to rebuild a circuit because the current one is stale
  8. <nickm> If I compromise a node, and streamIDs are sequential, I learn
  9. how many streams have been open and closed on this circuit at this point.
  10. > hm. you learn this for circuits too, do you not?
  11. <nickm> True. But how-many-circuits-from-A-to-B only leaks how long
  12. the connection from A to B has been alive and how much use it's seen.
  13. > ok. needs more investigation.
  14. Legend:
  15. SPEC!! - Not specified
  16. SPEC - Spec not finalized
  17. NICK - nick claims
  18. ARMA - arma claims
  19. - Not done
  20. * Top priority
  21. . Partially done
  22. o Done
  23. D Deferred
  24. X Abandoned
  25. Short-term:
  26. - Rename ACI to circID
  27. . integrate rep_ok functions, see what breaks
  28. - update tor faq
  29. o obey SocksBindAddress, ORBindAddress
  30. - warn if we're running as root
  31. o make connection_flush_buf() more obviously obsolete
  32. . let hup reread the config file, eg so we can get new exit
  33. policies without restarting
  34. - use times(2) rather than gettimeofday to measure how long it
  35. takes to process a cell
  36. . Exit policies
  37. o Spec how to write the exit policies
  38. - Path selection algorithms
  39. - Let user request certain nodes
  40. - And disallow certain nodes
  41. D Choose path by jurisdiction, etc?
  42. - Make relay end cells have failure status and payload attached
  43. - Streams that fail due to exit policy must reextend to new node
  44. - Add extend_wait state to edge connections, thumb through them
  45. when the AP get an extended cell.
  46. - let non-approved routers handshake.
  47. - just list approved routers in directory.
  48. . migrate to using nickname rather than addr:port for routers
  49. o decide_aci_type
  50. - generate onion skins
  51. - circuit_send_next_onion_skin
  52. - circuit_extend
  53. - onion_generate_cpath
  54. - get_unique_aci_by_addr_port
  55. - circ->n_addr and circ->n_port
  56. - circuit_enumerate_by_naddr_nport
  57. - cpath layers
  58. - connection_or_connect
  59. - connection_exact_get_by_addr_port
  60. - connection_twin_get_by_addr_port
  61. - router_get_by_addr_port
  62. - connection_or_init_conn_from_router
  63. - tag_pack, tag_unpack, connection_cpu_process_inbuf
  64. - directory_initiate_command
  65. . Move from onions to ephemeral DH
  66. o incremental path building
  67. o transition circuit-level sendmes to hop-level sendmes
  68. o implement truncate, truncated
  69. o move from 192byte DH to 128byte DH, so it isn't so damn slow
  70. - exiting from not-last hop
  71. - OP logic to decide to extend/truncate a path
  72. - make sure exiting from the not-last hop works
  73. - logic to find last *open* hop, not last hop, in cpath
  74. - choose exit nodes by exit policies
  75. - Remember address and port when beginning.
  76. - Extend by nickname/hostname/something, not by IP.
  77. On-going
  78. . Better comments for functions!
  79. . Go through log messages, reduce confusing error messages.
  80. . make the logs include more info (fd, etc)
  81. . Unit tests
  82. Mid-term:
  83. . Redo scheduler
  84. o fix SSL_read bug for buffered records
  85. - make round-robining more fair
  86. - What happens when a circuit's length is 1? What breaks?
  87. . streams / circuits
  88. o Implement streams
  89. o Rotate circuits after N minutes?
  90. X Circuits should expire when circuit->expire triggers
  91. NICK . Handle half-open connections
  92. o openssh is an application that uses half-open connections
  93. o Figure out what causes connections to close, standardize
  94. when we mark a connection vs when we tear it down
  95. o Look at what ssl does to keep from mutating data streams
  96. ARMA - Reduce streamid footprint from 7 bytes to 2 bytes
  97. - Check for collisions in streamid (now possible with
  98. just 2 bytes), and back up & replace with padding if so
  99. - Use the 3 saved bytes to put pseudorandomness in each relay cell
  100. - Use the 4 reserved bytes in each cell header to keep 1/5
  101. of a sha1 of the relay payload (move into stream header)
  102. - Move length into the stream header too
  103. - Spec the stream_id stuff. Clarify that nobody on the backward
  104. stream should look at stream_id.
  105. . Put CPU workers in separate processes
  106. o Handle multiple cpu workers (one for each cpu, plus one)
  107. o Queue for pending tasks if all workers full
  108. o Support the 'process this onion' task
  109. D Merge dnsworkers and cpuworkers to some extent
  110. - Handle cpuworkers dying
  111. . Scrubbing proxies
  112. - Find an smtp proxy?
  113. - Check the old smtp proxy code
  114. o Find an ftp proxy? wget --passive
  115. D Wait until there are packet redirectors for Linux
  116. . Get socks4a support into Mozilla
  117. . Develop rendezvous points
  118. SPEC!! - Handle socks commands other than connect, eg, bind?
  119. o Design
  120. - Spec
  121. - Implement
  122. - Tests
  123. o Testing harness/infrastructure
  124. D System tests (how?)
  125. - Performance tests, so we know when we've improved
  126. . webload infrastructure (Bruce)
  127. . httperf infrastructure (easy to set up)
  128. . oprofile (installed in RH >8.0)
  129. NICK . Daemonize and package
  130. o Teach it to fork and background
  131. - Red Hat spec file
  132. - Debian spec file equivalent
  133. . Portability
  134. . Which .h files are we actually using?
  135. . Port to:
  136. o Linux
  137. o BSD
  138. . Solaris
  139. o Cygwin
  140. . Win32
  141. o OS X
  142. - deal with pollhup / reached_eof on all platforms
  143. o openssl randomness
  144. o inet_ntoa
  145. . stdint.h
  146. - Make a script to set up a local network on your machine
  147. - More flexibility in node addressing
  148. D Support IPv6 rather than just 4
  149. - Handle multihomed servers (config variable to set IP)
  150. In the distant future:
  151. D Load balancing between router twins
  152. D Keep track of load over links/nodes, to
  153. know who's hosed
  154. SPEC!! D Non-clique topologies
  155. D Implement our own memory management, at least for common structs
  156. (Not ever necessary?)
  157. D Advanced directory servers
  158. D Automated reputation management
  159. SPEC!! D Figure out how to do threshold directory servers
  160. D jurisdiction info in dirserver entries? other info?
  161. Older (done) todo stuff:
  162. o Get tor to act like a socks server
  163. o socks4, socks4a
  164. o socks5
  165. o routers have identity key, link key, onion key.
  166. o link key certs are
  167. D signed by identity key
  168. D not in descriptor
  169. o not in config
  170. D not on disk
  171. o identity and onion keys are in descriptor (and disk)
  172. o upon boot, if it doesn't find identity key, generate it and write it.
  173. o also write a file with the identity key fingerprint in it
  174. o router generates descriptor: flesh out router_get_my_descriptor()
  175. o Routers sign descriptors with identity key
  176. o routers put version number in descriptor
  177. o routers should maybe have `uname -a` in descriptor?
  178. o Give nicknames to routers
  179. o in config
  180. o in descriptors
  181. o router posts descriptor
  182. o when it boots
  183. D when it changes
  184. o change tls stuff so certs don't get written to disk, or read from disk
  185. o make directory.c 'thread'safe
  186. o dirserver parses descriptor
  187. o dirserver checks signature
  188. D client checks signature?
  189. o dirserver writes directory to file
  190. o reads that file upon boot
  191. o directory includes all routers, up and down
  192. o add "up" line to directory, listing nicknames
  193. o instruments ORs to report stats
  194. o average cell fullness
  195. o average bandwidth used
  196. o configure log files. separate log file, separate severities.
  197. o what assumptions break if we fclose(0) when we daemonize?
  198. o make buffer struct elements opaque outside buffers.c
  199. o add log convention to the HACKING file
  200. o make 'make install' do the right thing
  201. o change binary name to tor
  202. o change config files so you look at commandline, else look in
  203. /etc/torrc. no cascading.
  204. o have an absolute datadir with fixed names for files, and fixed-name
  205. keydir under that with fixed names
  206. o Move (most of) the router/directory code out of main.c
  207. o Simple directory servers
  208. o Include key in source; sign directories
  209. o Signed directory backend
  210. o Document
  211. o Integrate
  212. o Add versions to code
  213. o Have directories list recommended-versions
  214. o Include line in directories
  215. o Check for presence of line.
  216. o Quit if running the wrong version
  217. o Command-line option to override quit
  218. o Add more information to directory server entries
  219. o Exit policies
  220. o Clearer bandwidth management
  221. o Do we want to remove bandwidth from OR handshakes?
  222. o What about OP handshakes?
  223. X Move away from openssl
  224. o Abstract out crypto calls
  225. X Look at nss, others? Just include code?
  226. o Use a stronger cipher
  227. o aes now, by including the code ourselves
  228. X On the fly compression of each stream
  229. o Clean up the event loop (optimize and sanitize)
  230. o Remove that awful concept of 'roles'
  231. o Terminology
  232. o Circuits, topics, cells stay named that
  233. o 'Connection' gets divided, or renamed, or something?
  234. o DNS farm
  235. o Distribute queries onto the farm, get answers
  236. o Preemptively grow a new worker before he's needed
  237. o Prune workers when too many are idle
  238. o DNS cache
  239. o Clear DNS cache over time
  240. D Honor DNS TTL info (how??)
  241. o Have strategy when all workers are busy
  242. o Keep track of which connections are in dns_wait
  243. o Need to cache positives/negatives on the tor side
  244. o Keep track of which queries have been asked
  245. o Better error handling when
  246. o An address doesn't resolve
  247. o We have max workers running
  248. o Consider taking the master out of the loop?
  249. X Implement reply onions
  250. o Total rate limiting
  251. o Look at OR handshake in more detail
  252. o Spec it
  253. o Merge OR and OP handshakes
  254. o rearrange connection_or so it doesn't suck so much to read
  255. D Periodic link key rotation. Spec?
  256. o wrap malloc with something that explodes when it fails
  257. o Clean up the number of places that get to look at prkey