TODO 18 KB

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