TODO 17 KB

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