r9776@totoro: nickm | 2007-01-18 14:37:01 -0500
[tor.git] / doc / TODO
blob8f3de88450be6c60d4a0dd0794c491140ea3e798
1 $Id$
2 Legend:
3 SPEC!!  - Not specified
4 SPEC    - Spec not finalized
5 N       - nick claims
6 R       - arma claims
7 P       - phobos claims
8         - Not done
9         * Top priority
10         . Partially done
11         o Done
12         d Deferrable
13         D Deferred
14         X Abandoned
16     X <nickm> "Let's try to find a way to make it run and make the version
17        match, but if not, let's just make it run."
18     X <arma> "should we detect if we have a --with-ssl-dir and try the -R
19       by default, if it works?"
21 Items for 0.1.2.x, real soon now:
22 ? - Bug: combination of things:
23     When we've been idle a long time, we stop fetching server
24     descriptors. When we then get a socks request, we build circuits
25     immediately using whatever descriptors we have, rather than waiting
26     until we've fetched correct ones.
28 N - Test guard unreachable logic; make sure that we actually attempt to
29     connect to guards that we think are unreachable from time to time.
30     Make sure that we don't freak out when the network is down.
32 R - Reconstruct ChangeLog; put rolled-up info in ReleaseNotes or something.
34 Items for 0.1.2.x:
35 N - enumerate events of important things that occur in tor, so vidalia can
36     react.
37     o Backend implementation
38     o Actually list all the events (notice and warn log messages are a good
39       place to look.)  Divide messages into categories, perhaps.
40     o Specify general event system
41     o Specify actual events.
42     - Implement or defer remaining events
43     - Implement or defer GETINFO list of current status events.
44     - Clean up relevant bits of control-spec.txt
46   . Have (and document) a BEGIN_DIR relay cell that means "Connect to your
47     directory port."
48     o Implement
49 R   - turn the received socks addr:port into a digest for setting .exit
50     - be able to connect without having a server descriptor, to bootstrap.
51 R     - handle connect-dir streams that don't have a chosen_exit_name set.
52       o include ORPort in DirServers lines so we can know where to connect.
53         list the orport as 0 if it can't handle begin_dir.
54         - List orports of actual dirservers..
56   - Servers are easy to setup and run: being a relay is about as easy as
57     being a client.
58     . Reduce resource load
59       o A way to alert controller when router flags change.
60         o Specify: SETEVENTS NS
61         o Implement
62 R       - Hunt for places that change networkstatus info that I might have
63           missed.
65   . option to dl directory info via tor:
66     TunnelDirConns and PreferTunneledDirConns
67 R   - actually cause the directory.c functions to know about or_port
68       and use it when we're supposed to.
69 N   - for tunneled edge conns, stop reading to the bridge connection
70       when the or_conn we're writing to has a full outbuf.
71       - This is iffy.  Really, it would've been better to stop writing
72         on the dir conn when the edge conn's inbuf is getting full.
73         But the issue there is that we package from edge
74         connections aggressively until we hit their package windows or the
75         circuit package windows, even if the buffer on the corresponding OR
76         connection is pretty damn big.  This sucks from a RAM usage POV.
77         Now, we could try to stop reading on the edges (or just the edges
78         connected to a local bridge) when an or_conn's outbuf is full.  But
79         if we're a server, and we stop reading on some exit conns when OR
80         conns are full, soon OR conns will contain only traffic from other OR
81         conns, and the exit data in question  will never get written.
83       - The right solution in the long run (0.2.0) is probably as follows:
84         - Remove socketpair-based bridges: use shared (or connected) buffers
85           for communication, rather than sockets.
86         - When relaying cells from an OR conn to an OR conn, have them wait
87           in a queue on the or_circuit_t object; don't move them onto the
88           target conn until there is space in the target conn's outbuf.
89           Also, only package data from exitconns when there is space in the
90           target conn's outbuf.
91           - As an added advantage, this would let us kill stalled _circuits_
92             when their buffers get too full, rather than killing entire OR
93             conns.  But we must think about anonymity implications of that.
94         - We'll probably want to do some kind of big refactoring of our
95           dataflow when we do these changes; stuff is hairy enough already,
96           and it will only get harrier with this stuff.
98       - For the short run, our options seem to be:
99         - Disable BEGIN_DIR support at the server-side unless it's
100           explicitly turned on.
101         - Go ahead and make directory bridge data not get produced when the
102           corresponding or_conn is full, and accept the sometimes directory
103           data will just never get written.
104         - Rate-limit directory bridge data somehow when the corresponding
105           or_conn is full.  Possibly based on the flush rate of the or_conn?
106         - Reject BEGIN_DIR requests that we think will be insanely big.
109 N - DNS improvements
110     . Asynchronous DNS
111       - Make evdns use windows strerror equivalents.
112       - Make sure patches get into libevent.
113       - Verify that it works well on windows
114     - Debug and re-enable server-side reverse DNS caching
116   - Critical but minor bugs, backport candidates.
117     - support dir 503s better
118       o clients don't log as loudly when they receive them
119       o they don't count toward the 3-strikes rule
120         D But eventually, we give up after getting a lot of 503s.
121         D Delay when we get a lot of 503s, rather than punting onto the
122           servers that have given us 503s?
123         o Add a 'BadDirectory' flag to statuses.
124       o authorities should *never* 503 a cache, and should never 503
125         network status requests.
126       D They can 503 client descriptor requests when they feel like it.
127         How can they distinguish? Not implemented for now, maybe
128         should abandon.
129       - update dir-spec with what we decided for each of these
131   o Have a mode that doesn't write to disk much, so we can run Tor on
132     flash memory (e.g. Linksys routers or USB keys).
133     o Add AvoidDiskWrites config option.
134     o only write state file when it's "changed"
135       o crank up the numbers if avoiddiskwrites is on.
136       D some things may not want to get written at all.
137     o stop writing fingerprint every restart
138     D more?
140 NR. Write path-spec.txt
142   - Polishing
143     - Profile client and server; fix slow spots
144     - Address XXX012 items
146   - Packaging
147     - Tell people about OSX Uninstaller
148     - Quietly document NT Service options
149     - Switch canonical win32 compiler to mingw.
150 NR  D Get some kind of "meta signing key" to be used solely to sign
151       releases/to certify releases when signed by the right people/
152       to certify sign the right people's keys?  Also use this to cert the SSL
153       key, etc.
154     - If we haven't replaced privoxy, lock down its configuration in all
155       packages, as documented in tor-doc-unix.html
157   - Docs
158     - More prominently, we should have a recommended apps list.
159       - recommend gaim.
160       - unrecommend IE because of ftp:// bug.
161 N   - torrc.complete.in needs attention?
162 N   - we should add a preamble to tor-design saying it's out of date.
163 N   - Document transport and natdport
165   - Improvements to bandwidth counting
166 R   - look into "uncounting" bytes spent on local connections, so
167       we can bandwidthrate but still have fast downloads.
168 R   - "bandwidth classes", for incoming vs initiated-here conns,
169       and to give dir conns lower priority.
170     . Write limiting; separate token bucket for write
171       o preemptively give a 503 to some v1 dir requests
172       o preemptively give a 503 to some v2 dir requests
173         o Write function to estimate bytes needed for N descriptors
174           statuses
175       D per-conn write buckets
176       D separate config options for read vs write limiting
177         (It's hard to support read > write, since we need better
178          congestion control to avoid overfull buffers there.  So,
179          defer the whole thing.)
181   - Forward compatibility fixes
182     - Caches should start trying to cache consensus docs?
183 NR    - Design
184 N     - Implement, if we think it's smart.
185     - Start uploading short and long descriptors; authorities should support
186       URLs to retrieve long descriptors, and should discard short descriptors
187       for now.  Later, once tools use the "long descriptor" URLs, authorities
188       will serve the short descriptors every time they're asked for
189       a descriptor.
190 NR    - Design
191 N     - Implement, if we think it's smart.
193 Topics to think about during 0.1.2.x development:
194   * Figure out incentives.
195     - (How can we make this tolerant of a bad v0?)
196   * Figure out non-clique.
197   * Figure out China.
198   - Figure out partial network knowledge.
199   - Figure out hidden services.
200   - Design next-version protocol for directories
201   - Design next-version protocol for connections
203 Deferred from 0.1.2.x:
204 P - Figure out why dll's compiled in mingw don't work right in WinXP.
205 P - Figure out why openssl 0.9.8d "make test" fails at sha256t test.
206   - Directory guards
207   - RAM use in directory authorities.
208   - Memory use improvements:
209     - Look into pulling serverdescs off buffers as they arrive.
210     - Save and mmap v1 directories, and networkstatus docs; store them
211       zipped, not uncompressed.
212       - Switch cached_router_t to use mmap.
213       - What to do about reference counts on windows?  (On Unix, this is
214         easy: unlink works fine.  (Right?)  On Windows, I have doubts.  Do we
215         need to keep multiple files?)
216       - What do we do about the fact that people can't read zlib-
217         compressed files manually?
219   - If the client's clock is too far in the past, it will drop (or
220     just not try to get) descriptors, so it'll never build circuits.
221   - Tolerate clock skew on bridge relays.
223   - A more efficient dir protocol.
224     - Authorities should fetch the network-statuses amongst each
225       other, consensus them, and advertise a communal network-status.
226       This is not so much for safety/complexity as it is to reduce
227       bandwidth requirements for Alice.
228       - How does this interact with our goal of being able to choose
229         your own dir authorities? I guess we're now assuming that all
230         dir authorities know all the other authorities in their "group"?
231     - Should we also look into a "delta since last network-status
232       checkpoint" scheme, to reduce overhead further?
233     - Extend the "r" line in network-status to give a set of buckets (say,
234       comma-separated) for that router.
235       - Buckets are deterministic based on IP address.
236       - Then clients can choose a bucket (or set of buckets) to
237         download and use.
239   - Improvements to versioning.
240     - When we connect to a Tor server, it sends back a cell listing
241       the IP it believes it is using. Use this to block dvorak's attack.
242       Also, this is a fine time to say what time you think it is.
243       o Verify that a new cell type is okay with deployed codebase
244       . Specify HELLO cells
245       . Figure out v0 compatibility.
246       - Implement
248   - Eventdns improvements
249     - Have a way to query for AAAA and A records simultaneously.
250     - Improve request API: At the very least, add the ability to construct
251       a more-or-less arbitrary request and get a response.
252     - (Can we suppress cnames? Should we?)
254   - Now that we're avoiding exits when picking non-exit positions,
255     we need to consider how to pick nodes for internal circuits. If
256     we avoid exits for all positions, we skew the load balancing. If
257     we accept exits for all positions, we leak whether it's an internal
258     circuit at every step. If we accept exits only at the last hop, we
259     reintroduce Lasse's attacks from the Oakland paper.
261   - We should ship with a list of stable dir mirrors -- they're not
262     trusted like the authorities, but they'll provide more robustness
263     and diversity for bootstrapping clients.
265   - Simplify authority operation
266     - Follow weasel's proposal, crossed with mixminion dir config format
268   - A way to adjust router flags from the controller.
269     (How do we prevent the authority from clobbering them soon after?)
270   - a way to pick entry guards based wholly on extend_info equivalent;
271     a way to export extend_info equivalent.
273   - Better estimates in the directory of whether servers have good uptime
274     (high expected time to failure) or good guard qualities (high
275     fractional uptime).
276     - AKA Track uptime as %-of-time-up, as well as time-since-last-down
278   - Have a "Faster" status flag that means it. Fast2, Fast4, Fast8?
279     - spec
280     - implement
282   - Failed rend desc fetches sometimes don't get retried. True/false?
284   - Windows server usability
285     - Solve the ENOBUFS problem.
286       - make tor's use of openssl operate on buffers rather than sockets,
287         so we can make use of libevent's buffer paradigm once it has one.
288       - make tor's use of libevent tolerate either the socket or the
289         buffer paradigm; includes unifying the functions in connect.c.
290     - We need a getrlimit equivalent on Windows so we can reserve some
291       file descriptors for saving files, etc. Otherwise we'll trigger
292       asserts when we're out of file descriptors and crash.
293 M   - rewrite how libevent does select() on win32 so it's not so very slow.
294       - Add overlapped IO
296   - Add an option (related to AvoidDiskWrites) to disable directory caching.
298 Minor items for 0.1.2.x as time permits:
299   - getinfo ns/name/moria2 doesn't include a "v" line, even when some
300     network-statuses I have show it. I suppose the fix should go in
301     networkstatus_getinfo_helper_single() in routerlist.c.
302   - Unify autoconf search code for libevent and openssl.  Make code
303     suggest platform-appropriate "devel" / "dev" / whatever packages
304     if we can link but we can't find the headers.
305   - Recommend polipo? Please?
306   - Make documentation realize that location of system configuration file
307     will depend on location of system defaults, and isn't always /etc/torrc.
308   - Review torrc.sample to make it more discursive.
309   o when reporting clock skew (both to logs and to controller), if it's
310     taken 126 seconds to read from the directory, our clock skew estimate
311     is 126 seconds wrong. use conn->timestamp_create or _lastwritten
312     for a closer estimate?
313   - a way to generate the website diagrams from source, so we can
314     translate them as utf-8 text rather than with gimp.
315 R - add d64 and fp64 along-side d and fp so people can paste status
316     entries into a url. since + is a valid base64 char, only allow one
317     at a time. spec and then do.
318   D don't do dns hijacking tests if we're reject *:* exit policy?
319     (deferred until 0.1.1.x is less common)
320   - When we export something from foo.c file for testing purposes only,
321     make a foo_test.h file for test.c to include.
322   - The Debian package now uses --verify-config when (re)starting,
323     to distinguish configuration errors from other errors. Perhaps
324     the RPM and other startup scripts should too?
325   - add a "default.action" file to the tor/vidalia bundle so we can fix the
326     https thing in the default configuration:
327     http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#PrivoxyWeirdSSLPort
328   . Flesh out options_description array in src/or/config.c
329   - Don't let 'newnym' be triggered more often than every n seconds.
330   X If we try to publish as a nickname that's already claimed, should
331     we append a number (or increment the number) and try again? This
332     way people who read their logs can fix it as before, but people
333     who don't read their logs will still offer Tor servers.
334     - Fall back to unnamed; warn user; send controller event.  ("When we
335       notice a 'Rejected: There is already a named server with this nickname'
336       message... or maybe instead when we see in the networkstatuses that
337       somebody else is Named with the name we want: warn the user, send a
338       STATUS_SERVER message, and fall back to unnamed.")
339 ! - Tor should bind its ports before dropping privs, so users don't
340     have to do the ipchains dance.
341   - Rate limit exit connections to a given destination -- this helps
342     us play nice with websites when Tor users want to crawl them; it
343     also introduces DoS opportunities.
344   - Streamline how we pick entry nodes: Make choose_random_entry() have
345     less magic and less control logic.
346   - Christian Grothoff's attack of infinite-length circuit.
347     the solution is to have a separate 'extend-data' cell type
348     which is used for the first N data cells, and only
349     extend-data cells can be extend requests.
350     - Specify, including thought about anonymity implications.
351   - Display the reasons in 'destroy' and 'truncated' cells under some
352     circumstances?
353   - We need a way for the authorities to declare that nodes are
354     in a family.  Also, it kinda sucks that family declarations use O(N^2)
355     space in the descriptors.
356   - If the server is spewing complaints about raising your ulimit -n,
357     we should add a note about this to the server descriptor so other
358     people can notice too.
359   - cpu fixes:
360     - see if we should make use of truncate to retry
361     X kill dns workers more slowly
362   . Directory changes
363     . Some back-out mechanism for auto-approval
364       - a way of rolling back approvals to before a timestamp
365         - Consider minion-like fingerprint file/log combination.
366   - packaging and ui stuff:
367     . multiple sample torrc files
368     . figure out how to make nt service stuff work?
369       . Document it.
370     - Vet all pending installer patches
371       - Win32 installer plus privoxy, sockscap/freecap, etc.
372       - Vet win32 systray helper code
374   - Improve controller
375       - a NEWSTATUS event similar to NEWDESC.
376       - change circuit status events to give more details, like purpose,
377         whether they're internal, when they become dirty, when they become
378         too dirty for further circuits, etc.
379         - What do we want here, exactly?
380         - Specify and implement it.
381       - Change stream status events analogously.
382         - What do we want here, exactly?
383         - Specify and implement it.
384       - Make other events "better".
385       - Change stream status events analogously.
386         - What do we want here, exactly?
387         - Specify and implement it.
388       - Make other events "better" analogously
389         - What do we want here, exactly?
390         - Specify and implement it.
391       . Expose more information via getinfo:
392         - import and export rendezvous descriptors
393         - Review all static fields for additional candidates
394       - Allow EXTENDCIRCUIT to unknown server.
395       - We need some way to adjust server status, and to tell tor not to
396         download directories/network-status, and a way to force a download.
397       - Make everything work with hidden services
398   - Directory system improvements
399     - config option to publish what ports you listen on, beyond
400       ORPort/DirPort.  It should support ranges and bit prefixes (?) too.
401       - Parse this.
402       - Relay this in networkstatus.
404   - Be a DNS proxy.
405     - Need a way to request address lookups (and allocate a stream ID for
406       them) without having a corresponding client socket.
407       - Once this is done, it would be nice to have a way to request address
408         lookups from the controller without using SOCKS.
409     - Refactor exit/entry side of DNS resolve: we don't need a connection_t;
410       we can have an edge_connection_t and (say) dns_request_t both extend an
411       edge_stream_t, and have p_streams and n_streams both be linked lists
412       of edge_stream_t.
414   - Look into generating torrc.{complete|sample}.in, tor.1.in,
415     the HTML manual, and the online config documentation from a single
416     source.
418 Future version:
419   - Configuration format really wants sections.
420   - Good RBL substitute.
421   - Authorities should try using exits for http to connect to some URLS
422     (specified in a configuration file, so as not to make the List Of Things
423     Not To Censor completely obvious) and ask them for results.  Exits that
424     don't give good answers should have the BadExit flag set.
425   - Our current approach to block attempts to use Tor as a single-hop proxy
426     is pretty lame; we should get a better one.
427   . Update the hidden service stuff for the new dir approach.
428     - switch to an ascii format, maybe sexpr?
429     - authdirservers publish blobs of them.
430     - other authdirservers fetch these blobs.
431     - hidserv people have the option of not uploading their blobs.
432     - you can insert a blob via the controller.
433     - and there's some amount of backwards compatibility.
434     - teach clients, intro points, and hidservs about auth mechanisms.
435     - come up with a few more auth mechanisms.
436   - auth mechanisms to let hidden service midpoint and responder filter
437     connection requests.
438   - Bind to random port when making outgoing connections to Tor servers,
439     to reduce remote sniping attacks.
440   - Have new people be in limbo and need to demonstrate usefulness
441     before we approve them.
442   - Clients should estimate their skew as median of skew from servers
443     over last N seconds.
444   - Make router_is_general_exit() a bit smarter once we're sure what it's for.
445   - Audit everything to make sure rend and intro points are just as likely to
446     be us as not.
447   - Do something to prevent spurious EXTEND cells from making middleman
448     nodes connect all over.  Rate-limit failed connections, perhaps?
449   - Automatically determine what ports are reachable and start using
450     those, if circuits aren't working and it's a pattern we recognize
451     ("port 443 worked once and port 9001 keeps not working").
452   - Limit to 2 dir, 2 OR, N SOCKS connections per IP.
453   - Handle full buffers without totally borking
454   - Rate-limit OR and directory connections overall and per-IP and
455     maybe per subnet.
456   - Hold-open-until-flushed now works by accident; it should work by
457     design.
458   - DoS protection: TLS puzzles, public key ops, bandwidth exhaustion.
459     - Specify?
460   - tor-resolve script should use socks5 to get better error messages.
461   - hidserv offerers shouldn't need to define a SocksPort
462     * figure out what breaks for this, and do it.
463   - tor should be able to have a pool of outgoing IP addresses
464     that it is able to rotate through. (maybe)
465     - Specify; implement.
466   - let each hidden service (or other thing) specify its own
467     OutboundBindAddress?
468   - Stop using tor_socketpair to make connection bridges: do an
469     implementation that uses buffers only.
471 Blue-sky:
472   - Patch privoxy and socks protocol to pass strings to the browser.
473   - Standby/hotswap/redundant hidden services.
474   - Robust decentralized storage for hidden service descriptors.
475   - The "China problem"
476   - Allow small cells and large cells on the same network?
477   - Cell buffering and resending. This will allow us to handle broken
478     circuits as long as the endpoints don't break, plus will allow
479     connection (tls session key) rotation.
480   - Implement Morphmix, so we can compare its behavior, complexity, etc.
481   - Other transport. HTTP, udp, rdp, airhook, etc. May have to do our own
482     link crypto, unless we can bully openssl into it.
483   - Need a relay teardown cell, separate from one-way ends.
484     (Pending a user who needs this)
485   - Handle half-open connections: right now we don't support all TCP
486     streams, at least according to the protocol. But we handle all that
487     we've seen in the wild.
488     (Pending a user who needs this)
490 Non-Coding:
491   - Mark up spec; note unclear points about servers
492   - Mention controller libs someplace.
493   . more pictures from ren. he wants to describe the tor handshake
494 NR- write a spec appendix for 'being nice with tor'
495   - tor-in-the-media page
496   - Remove need for HACKING file.
497   - Figure out licenses for website material.
498   - Specify the keys and key rotation schedules and stuff
500 Website:
501   - and remove home and make the "Tor" picture be the link to home.
502   - put the logo on the website, in source form, so people can put it on
503     stickers directly, etc.
504 R - make a page with the hidden service diagrams.
506   - ask Jan to be the translation coordinator? add to volunteer page.
508   - add a page for localizing all tor's components.
510   - It would be neat if we had a single place that described _all_ the
511     tor-related tools you can use, and what they give you, and how well they
512     work.  Right now, we don't give a lot of guidance wrt
513     torbutton/foxproxy/privoxy/polipo in any consistent place.