TODO 21 KB

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