TODO 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. Legend:
  2. SPEC!! - Not specified
  3. SPEC - Spec not finalized
  4. NICK - nick claims
  5. ARMA - arma claims
  6. - Not done
  7. * Top priority
  8. . Partially done
  9. o Done
  10. D Deferred
  11. X Abandoned
  12. Bugs:
  13. o we call signal(), but we should be calling sigaction()
  14. - send socks rejects when things go bad ?
  15. o on solaris, need to build with
  16. LDFLAGS="-lsocket -lnsl" ./configure
  17. o on solaris, we HAVE_UNAME but the uname() call fails?
  18. - should maybe make clients exit(1) when bad things happen?
  19. e.g. clock skew.
  20. o client-side dns cache doesn't appear to be getting populated
  21. by 'connected' cells. In fact, the 'connected' cells don't even
  22. include the IP.
  23. o When it can't resolve any dirservers, it is useless from then on.
  24. We should make it reload the RouterFile if it has no dirservers.
  25. o Sometimes it picks a middleman node as the exit for a circuit.
  26. o if you specify a non-dirserver as exitnode or entrynode, when it
  27. makes the first few circuits it hasn't yet fetched the directory,
  28. so it warns that it doesn't know the node.
  29. o make 'make test' exit(1) if a test fails.
  30. . fix buffer unit test so it passes
  31. Short-term:
  32. o put IP into the descriptor, so clients don't need to resolve things
  33. o when you hup, rewrite the router.desc file (and maybe others)
  34. - consider handling broken socks4 implementations
  35. - improve how it behaves when i remove a line from the approved-routers files
  36. - Make tls connections tls_close intentionally
  37. - Add '[...truncated]' or similar to truncated log entries (like the directory
  38. in connection_dir_process_inbuf()).
  39. - Make logs handle it better when writing to them fails.
  40. - leave server descriptor out of directory if it's too old
  41. o Rename ACI to circID
  42. . integrate rep_ok functions, see what breaks
  43. - update tor faq
  44. o obey SocksBindAddress, ORBindAddress
  45. o warn if we're running as root
  46. o make connection_flush_buf() more obviously obsolete
  47. o let hup reread the config file, eg so we can get new exit
  48. policies without restarting
  49. o Put recommended_versions in a config entry
  50. X use times(2) rather than gettimeofday to measure how long it
  51. takes to process a cell
  52. o Separate trying to rebuild a circuit because you have none from trying
  53. to rebuild a circuit because the current one is stale
  54. X Continue reading from socks port even while waiting for connect.
  55. o Exit policies
  56. o Spec how to write the exit policies
  57. o Path selection algorithms
  58. o Choose path more incrementally
  59. o Let user request first/last node
  60. o And disallow certain nodes
  61. D Choose path by jurisdiction, etc?
  62. o Make relay end cells have failure status and payload attached
  63. X let non-approved routers handshake.
  64. X Dirserver shouldn't put you in running-routers list if you haven't
  65. uploaded a descriptor recently
  66. X migrate to using nickname rather than addr:port for routers
  67. - migrate to using IPv6 sizes everywhere
  68. o Move from onions to ephemeral DH
  69. o incremental path building
  70. o transition circuit-level sendmes to hop-level sendmes
  71. o implement truncate, truncated
  72. o move from 192byte DH to 128byte DH, so it isn't so damn slow
  73. X exiting from not-last hop
  74. X OP logic to decide to extend/truncate a path
  75. X make sure exiting from the not-last hop works
  76. X logic to find last *open* hop, not last hop, in cpath
  77. o Remember address and port when beginning.
  78. - Extend by nickname/hostname/something, not by IP.
  79. - Need a relay teardown cell, separate from one-way ends.
  80. X remove per-connection rate limiting
  81. - Make it harder to circumvent bandwidth caps: look at number of bytes
  82. sent across sockets, not number sent inside TLS stream.
  83. - Audit users of connnection_remove and connection_free outside of
  84. main.c; many should use mark_for_close instead.
  85. On-going
  86. . Better comments for functions!
  87. . Go through log messages, reduce confusing error messages.
  88. . make the logs include more info (fd, etc)
  89. . Unit tests
  90. . Update the spec so it matches the code
  91. Mid-term:
  92. - Rotate tls-level connections -- make new ones, expire old ones.
  93. So we get actual key rotation, not just symmetric key rotation
  94. o Are there anonymity issues with sequential streamIDs? Sequential
  95. circIDs? Eg an attacker can learn how many there have been.
  96. The fix is to initialize them randomly rather than at 1.
  97. - Look at having smallcells and largecells
  98. . Redo scheduler
  99. o fix SSL_read bug for buffered records
  100. - make round-robining more fair
  101. - What happens when a circuit's length is 1? What breaks?
  102. . streams / circuits
  103. o Implement streams
  104. o Rotate circuits after N minutes?
  105. X Circuits should expire when circuit->expire triggers
  106. NICK . Handle half-open connections
  107. o openssh is an application that uses half-open connections
  108. o Figure out what causes connections to close, standardize
  109. when we mark a connection vs when we tear it down
  110. o Look at what ssl does to keep from mutating data streams
  111. o Put CPU workers in separate processes
  112. o Handle multiple cpu workers (one for each cpu, plus one)
  113. o Queue for pending tasks if all workers full
  114. o Support the 'process this onion' task
  115. D Merge dnsworkers and cpuworkers to some extent
  116. o Handle cpuworkers dying
  117. . Scrubbing proxies
  118. - Find an smtp proxy?
  119. - Check the old smtp proxy code
  120. o Find an ftp proxy? wget --passive
  121. D Wait until there are packet redirectors for Linux
  122. . Get socks4a support into Mozilla
  123. . Develop rendezvous points
  124. X Handle socks commands other than connect, eg, bind?
  125. o Design
  126. - Spec
  127. - Implement
  128. . Tests
  129. o Testing harness/infrastructure
  130. D System tests (how?)
  131. - Performance tests, so we know when we've improved
  132. . webload infrastructure (Bruce)
  133. . httperf infrastructure (easy to set up)
  134. . oprofile (installed in RH >8.0)
  135. NICK . Daemonize and package
  136. o Teach it to fork and background
  137. . Red Hat spec file
  138. o Debian spec file equivalent
  139. . Portability
  140. . Which .h files are we actually using?
  141. . Port to:
  142. o Linux
  143. o BSD
  144. . Solaris
  145. o Cygwin
  146. . Win32
  147. o OS X
  148. - deal with pollhup / reached_eof on all platforms
  149. o openssl randomness
  150. o inet_ntoa
  151. o stdint.h
  152. - Make a script to set up a local network on your machine
  153. o More flexibility in node addressing
  154. D Support IPv6 rather than just 4
  155. o Handle multihomed servers (config variable to set IP)
  156. In the distant future:
  157. D Load balancing between router twins
  158. D Keep track of load over links/nodes, to
  159. know who's hosed
  160. SPEC!! D Non-clique topologies
  161. D Implement our own memory management, at least for common structs
  162. (Not ever necessary?)
  163. D Advanced directory servers
  164. D Automated reputation management
  165. SPEC!! D Figure out how to do threshold directory servers
  166. D jurisdiction info in dirserver entries? other info?
  167. Older (done) todo stuff:
  168. For 0.0.2pre17:
  169. o Put a H(K | handshake) into the onionskin response
  170. o Make cells 512 bytes
  171. o Reduce streamid footprint from 7 bytes to 2 bytes
  172. X Check for collisions in streamid (now possible with
  173. just 2 bytes), and back up & replace with padding if so
  174. o Use the 4 reserved bytes in each cell header to keep 1/5
  175. of a sha1 of the ongoing relay payload (move into stream header)
  176. o Move length into the stream header too
  177. o Make length 2 bytes
  178. D increase DH key length
  179. D increase RSA key length
  180. D Spec the stream_id stuff. Clarify that nobody on the backward
  181. stream should look at stream_id.
  182. Cell:
  183. ACI (anonymous circuit identifier) [2 bytes]
  184. Command [1 byte]
  185. Payload (padded with 0 bytes) [509 bytes]
  186. Relay payload:
  187. Relay command [1 byte]
  188. Stream ID [7 bytes]
  189. Partial SHA-1 [4 bytes]
  190. Length [2 bytes]
  191. Relay payload [495 bytes]
  192. For 0.0.2pre15:
  193. o don't pick exit nodes which will certainly reject all things.
  194. o don't pick nodes that the directory says are down
  195. o choose randomly from running dirservers, not just first one
  196. o install the man page
  197. o warn when client-side tries an address/port which no router in the dir accepts.
  198. For 0.0.2pre14:
  199. o More flexible exit policies (18.*, 18.0.0.0/8)
  200. o Work to succeed in the precense of exit policy violation
  201. o Replace desired_path_len with opaque path-selection specifier
  202. o Client-side DNS caching
  203. o Add entries to client DNS cache based on END cells
  204. o Remove port from END_REASON_EXITPOLICY cells
  205. o Start building new circuits when we get an exit-policy
  206. failure. (Defer exiting from the middle of existing
  207. circuits or extending existing circuits for later.)
  208. o Implement function to check whether a routerinfo_t
  209. supports a given exit addr.
  210. o Choose the exit node of an in-progress circuit based on
  211. pending AP connections.
  212. o Choose the exit node _first_, then beginning, then
  213. middle nodes.
  214. Previous:
  215. o Get tor to act like a socks server
  216. o socks4, socks4a
  217. o socks5
  218. o routers have identity key, link key, onion key.
  219. o link key certs are
  220. D signed by identity key
  221. D not in descriptor
  222. o not in config
  223. D not on disk
  224. o identity and onion keys are in descriptor (and disk)
  225. o upon boot, if it doesn't find identity key, generate it and write it.
  226. o also write a file with the identity key fingerprint in it
  227. o router generates descriptor: flesh out router_get_my_descriptor()
  228. o Routers sign descriptors with identity key
  229. o routers put version number in descriptor
  230. o routers should maybe have `uname -a` in descriptor?
  231. o Give nicknames to routers
  232. o in config
  233. o in descriptors
  234. o router posts descriptor
  235. o when it boots
  236. o every DirFetchPostPeriod seconds
  237. D when it changes
  238. o change tls stuff so certs don't get written to disk, or read from disk
  239. o make directory.c 'thread'safe
  240. o dirserver parses descriptor
  241. o dirserver checks signature
  242. D client checks signature?
  243. o dirserver writes directory to file
  244. o reads that file upon boot
  245. o directory includes all routers, up and down
  246. o add "up" line to directory, listing nicknames
  247. o instruments ORs to report stats
  248. o average cell fullness
  249. o average bandwidth used
  250. o configure log files. separate log file, separate severities.
  251. o what assumptions break if we fclose(0) when we daemonize?
  252. o make buffer struct elements opaque outside buffers.c
  253. o add log convention to the HACKING file
  254. o make 'make install' do the right thing
  255. o change binary name to tor
  256. o change config files so you look at commandline, else look in
  257. /etc/torrc. no cascading.
  258. o have an absolute datadir with fixed names for files, and fixed-name
  259. keydir under that with fixed names
  260. o Move (most of) the router/directory code out of main.c
  261. o Simple directory servers
  262. o Include key in source; sign directories
  263. o Signed directory backend
  264. o Document
  265. o Integrate
  266. o Add versions to code
  267. o Have directories list recommended-versions
  268. o Include line in directories
  269. o Check for presence of line.
  270. o Quit if running the wrong version
  271. o Command-line option to override quit
  272. o Add more information to directory server entries
  273. o Exit policies
  274. o Clearer bandwidth management
  275. o Do we want to remove bandwidth from OR handshakes?
  276. o What about OP handshakes?
  277. X Move away from openssl
  278. o Abstract out crypto calls
  279. X Look at nss, others? Just include code?
  280. o Use a stronger cipher
  281. o aes now, by including the code ourselves
  282. X On the fly compression of each stream
  283. o Clean up the event loop (optimize and sanitize)
  284. o Remove that awful concept of 'roles'
  285. o Terminology
  286. o Circuits, topics, cells stay named that
  287. o 'Connection' gets divided, or renamed, or something?
  288. o DNS farm
  289. o Distribute queries onto the farm, get answers
  290. o Preemptively grow a new worker before he's needed
  291. o Prune workers when too many are idle
  292. o DNS cache
  293. o Clear DNS cache over time
  294. D Honor DNS TTL info (how??)
  295. o Have strategy when all workers are busy
  296. o Keep track of which connections are in dns_wait
  297. o Need to cache positives/negatives on the tor side
  298. o Keep track of which queries have been asked
  299. o Better error handling when
  300. o An address doesn't resolve
  301. o We have max workers running
  302. o Consider taking the master out of the loop?
  303. X Implement reply onions
  304. o Total rate limiting
  305. o Look at OR handshake in more detail
  306. o Spec it
  307. o Merge OR and OP handshakes
  308. o rearrange connection_or so it doesn't suck so much to read
  309. D Periodic link key rotation. Spec?
  310. o wrap malloc with something that explodes when it fails
  311. o Clean up the number of places that get to look at prkey