TODO 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  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. o add in 'notice' log level
  33. X 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]
  103. o Code to configure hidden services [NM] 4 hours
  104. o Service descriptors
  105. o OPs need to maintain identity keys for hidden services [NM]
  106. o Code to generate and parse service descriptors [NM]
  107. o Advertisement
  108. o Generate y.onion hostnames [NM]
  109. o Store y.onion hostnames to disk. [NM]
  110. o Code to do an HTTP connection over Tor from within Tor [RD]
  111. o Publish service descriptors to directory [RD]
  112. o Directory accepts and remembers service descriptors, and
  113. delivers them as requested
  114. o Frontend [RD]
  115. o Backend [NM]
  116. o Code for OPs to retrieve (and cache?) service descriptors [RD]
  117. o Rendezvous
  118. o Code as needed to generate and parse all rendezvous-related
  119. cell types, and do all handshaking [NM]
  120. o ORs implement introduction points
  121. o OPs with hidden services establish introduction points
  122. o ORs implement rendezvous points
  123. o OPs notice y.onion URLs, and:
  124. o Retrieve service descriptors
  125. o Establish rendezvous points
  126. o Send introduction requests to introduction points
  127. o Communication
  128. o OPs remember which circuits are used for which rendezvous
  129. points, and can look up circuits by location-hidden service
  130. o OPs send/handle BEGIN cells for location-hidden services
  131. o End-to-end communication for location-hidden services
  132. o a section in the man pages: how to configure hidden services
  133. o let bob use himself as a rendezvous point
  134. o let bob choose himself as intro point
  135. o let bob replenish his intro points and republish
  136. o alice retries introduction and rendezvous a few times?
  137. o ORs should not pick themselves while building general circs
  138. o should alice ever try to refresh her service desc cache entries?
  139. should she expire them after e.g. 15 mins?
  140. o race condition: alice has the serverdesc in her cache, she opens
  141. the circs, serverdesc expires and is flushed, then she goes
  142. to send the intro cell. should serverdesc cache have a
  143. last-touched field? are there better fixes?
  144. o backward compatibility: when only certain nodes know about rend
  145. protocol, how do we deal? have nodes parse the tor version field?
  146. force an upgrade? simply be more robust against useless nodes?
  147. o should expire rend streams when too much time has passed
  148. o should make failed rend/intro circs count toward alice's
  149. num_failed circs, to prevent madness when we're offline (But
  150. don't count failed rend circs toward Bob's total, or Alice
  151. can bork him.)
  152. o deal with edge_type in connection_edge.c
  153. o retry end for certain reasons (resolvefailed, policyfailed)
  154. - preemptively build and start rendezvous circs
  155. - preemptively build n-1 hops of intro circs?
  156. o (n)ack introduction requests?
  157. - cannibalize general circs?
  158. - how to set up multiple locations for a hidden service?
  159. o make bob publish only established intro circs?
  160. On-going
  161. . Better comments for functions!
  162. . Go through log messages, reduce confusing error messages.
  163. . make the logs include more info (fd, etc)
  164. . Unit tests
  165. . Update the spec so it matches the code
  166. Mid-term:
  167. o Refactor: add own routerinfo to routerlist. Right now, only
  168. router_get_by_nickname knows about 'this router', as a hack to
  169. get circuit_launch_new to do the right thing.
  170. - Rotate tls-level connections -- make new ones, expire old ones.
  171. So we get actual key rotation, not just symmetric key rotation
  172. o Are there anonymity issues with sequential streamIDs? Sequential
  173. circIDs? Eg an attacker can learn how many there have been.
  174. The fix is to initialize them randomly rather than at 1.
  175. - Look at having smallcells and largecells
  176. . Redo scheduler
  177. o fix SSL_read bug for buffered records
  178. - make round-robining more fair
  179. - What happens when a circuit's length is 1? What breaks?
  180. . streams / circuits
  181. o Implement streams
  182. o Rotate circuits after N minutes?
  183. X Circuits should expire when circuit->expire triggers
  184. NICK . Handle half-open connections
  185. o openssh is an application that uses half-open connections
  186. o Figure out what causes connections to close, standardize
  187. when we mark a connection vs when we tear it down
  188. o Look at what ssl does to keep from mutating data streams
  189. o Put CPU workers in separate processes
  190. o Handle multiple cpu workers (one for each cpu, plus one)
  191. o Queue for pending tasks if all workers full
  192. o Support the 'process this onion' task
  193. D Merge dnsworkers and cpuworkers to some extent
  194. o Handle cpuworkers dying
  195. . Scrubbing proxies
  196. - Find an smtp proxy?
  197. - Check the old smtp proxy code
  198. o Find an ftp proxy? wget --passive
  199. D Wait until there are packet redirectors for Linux
  200. . Get socks4a support into Mozilla
  201. . Tests
  202. o Testing harness/infrastructure
  203. D System tests (how?)
  204. - Performance tests, so we know when we've improved
  205. . webload infrastructure (Bruce)
  206. . httperf infrastructure (easy to set up)
  207. . oprofile (installed in RH >8.0)
  208. NICK . Daemonize and package
  209. o Teach it to fork and background
  210. . Red Hat spec file
  211. o Debian spec file equivalent
  212. . Portability
  213. . Which .h files are we actually using?
  214. . Port to:
  215. o Linux
  216. o BSD
  217. o Solaris
  218. o Cygwin
  219. . Win32
  220. o OS X
  221. - deal with pollhup / reached_eof on all platforms
  222. o openssl randomness
  223. o inet_ntoa
  224. o stdint.h
  225. - Make a script to set up a local network on your machine
  226. o More flexibility in node addressing
  227. D Support IPv6 rather than just 4
  228. o Handle multihomed servers (config variable to set IP)
  229. In the distant future:
  230. D Load balancing between router twins
  231. D Keep track of load over links/nodes, to
  232. know who's hosed
  233. SPEC!! D Non-clique topologies
  234. D Implement our own memory management, at least for common structs
  235. (Not ever necessary?)
  236. D Advanced directory servers
  237. D Automated reputation management
  238. SPEC!! D Figure out how to do threshold directory servers
  239. D jurisdiction info in dirserver entries? other info?
  240. Older (done) todo stuff:
  241. For 0.0.2pre17:
  242. o Put a H(K | handshake) into the onionskin response
  243. o Make cells 512 bytes
  244. o Reduce streamid footprint from 7 bytes to 2 bytes
  245. X Check for collisions in streamid (now possible with
  246. just 2 bytes), and back up & replace with padding if so
  247. o Use the 4 reserved bytes in each cell header to keep 1/5
  248. of a sha1 of the ongoing relay payload (move into stream header)
  249. o Move length into the stream header too
  250. o Make length 2 bytes
  251. D increase DH key length
  252. D increase RSA key length
  253. D Spec the stream_id stuff. Clarify that nobody on the backward
  254. stream should look at stream_id.
  255. For 0.0.2pre15:
  256. o don't pick exit nodes which will certainly reject all things.
  257. o don't pick nodes that the directory says are down
  258. o choose randomly from running dirservers, not just first one
  259. o install the man page
  260. o warn when client-side tries an address/port which no router in the dir accepts.
  261. For 0.0.2pre14:
  262. o More flexible exit policies (18.*, 18.0.0.0/8)
  263. o Work to succeed in the precense of exit policy violation
  264. o Replace desired_path_len with opaque path-selection specifier
  265. o Client-side DNS caching
  266. o Add entries to client DNS cache based on END cells
  267. o Remove port from END_REASON_EXITPOLICY cells
  268. o Start building new circuits when we get an exit-policy
  269. failure. (Defer exiting from the middle of existing
  270. circuits or extending existing circuits for later.)
  271. o Implement function to check whether a routerinfo_t
  272. supports a given exit addr.
  273. o Choose the exit node of an in-progress circuit based on
  274. pending AP connections.
  275. o Choose the exit node _first_, then beginning, then
  276. middle nodes.
  277. Previous:
  278. o Get tor to act like a socks server
  279. o socks4, socks4a
  280. o socks5
  281. o routers have identity key, link key, onion key.
  282. o link key certs are
  283. D signed by identity key
  284. D not in descriptor
  285. o not in config
  286. D not on disk
  287. o identity and onion keys are in descriptor (and disk)
  288. o upon boot, if it doesn't find identity key, generate it and write it.
  289. o also write a file with the identity key fingerprint in it
  290. o router generates descriptor: flesh out router_get_my_descriptor()
  291. o Routers sign descriptors with identity key
  292. o routers put version number in descriptor
  293. o routers should maybe have `uname -a` in descriptor?
  294. o Give nicknames to routers
  295. o in config
  296. o in descriptors
  297. o router posts descriptor
  298. o when it boots
  299. o every DirFetchPostPeriod seconds
  300. D when it changes
  301. o change tls stuff so certs don't get written to disk, or read from disk
  302. o make directory.c 'thread'safe
  303. o dirserver parses descriptor
  304. o dirserver checks signature
  305. D client checks signature?
  306. o dirserver writes directory to file
  307. o reads that file upon boot
  308. o directory includes all routers, up and down
  309. o add "up" line to directory, listing nicknames
  310. o instruments ORs to report stats
  311. o average cell fullness
  312. o average bandwidth used
  313. o configure log files. separate log file, separate severities.
  314. o what assumptions break if we fclose(0) when we daemonize?
  315. o make buffer struct elements opaque outside buffers.c
  316. o add log convention to the HACKING file
  317. o make 'make install' do the right thing
  318. o change binary name to tor
  319. o change config files so you look at commandline, else look in
  320. /etc/torrc. no cascading.
  321. o have an absolute datadir with fixed names for files, and fixed-name
  322. keydir under that with fixed names
  323. o Move (most of) the router/directory code out of main.c
  324. o Simple directory servers
  325. o Include key in source; sign directories
  326. o Signed directory backend
  327. o Document
  328. o Integrate
  329. o Add versions to code
  330. o Have directories list recommended-versions
  331. o Include line in directories
  332. o Check for presence of line.
  333. o Quit if running the wrong version
  334. o Command-line option to override quit
  335. o Add more information to directory server entries
  336. o Exit policies
  337. o Clearer bandwidth management
  338. o Do we want to remove bandwidth from OR handshakes?
  339. o What about OP handshakes?
  340. X Move away from openssl
  341. o Abstract out crypto calls
  342. X Look at nss, others? Just include code?
  343. o Use a stronger cipher
  344. o aes now, by including the code ourselves
  345. X On the fly compression of each stream
  346. o Clean up the event loop (optimize and sanitize)
  347. o Remove that awful concept of 'roles'
  348. o Terminology
  349. o Circuits, topics, cells stay named that
  350. o 'Connection' gets divided, or renamed, or something?
  351. o DNS farm
  352. o Distribute queries onto the farm, get answers
  353. o Preemptively grow a new worker before he's needed
  354. o Prune workers when too many are idle
  355. o DNS cache
  356. o Clear DNS cache over time
  357. D Honor DNS TTL info (how??)
  358. o Have strategy when all workers are busy
  359. o Keep track of which connections are in dns_wait
  360. o Need to cache positives/negatives on the tor side
  361. o Keep track of which queries have been asked
  362. o Better error handling when
  363. o An address doesn't resolve
  364. o We have max workers running
  365. o Consider taking the master out of the loop?
  366. X Implement reply onions
  367. o Total rate limiting
  368. o Look at OR handshake in more detail
  369. o Spec it
  370. o Merge OR and OP handshakes
  371. o rearrange connection_or so it doesn't suck so much to read
  372. D Periodic link key rotation. Spec?
  373. o wrap malloc with something that explodes when it fails
  374. o Clean up the number of places that get to look at prkey