TODO 20 KB

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