r14358@Kushana: nickm | 2007-09-08 13:45:16 -0400
[tor.git] / doc / TODO
blobb61304dd80d5b9d394794c493f1f705977da9a17
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 Things we'd like to do in 0.2.0.x:
17   - See also Flyspray tasks.
18   - See also all items marked XXXX020 and DOCDOC in the code
20   - Bugs.
21      - Bug reports Roger has heard along that way that don't have enough
22         details/attention to solve them yet.
23         - tup said that when he set FetchUselessDescriptors, after
24           24 or 48 hours he wasn't fetching any descriptors at all
25           anymore. This was in 0.2.0 but worked fine in 0.1.2.
26         - arma noticed that when his network went away and he tried
27           a new guard node and the connect() syscall failed to it,
28           the guard wasn't being marked as down. 0.2.0.x.
29         - after being without network for 12 hours, arma's tor decided
30           it couldn't fetch any network statuses, and never tried again
31           even when the network came back and arma clicked on things.
32           also 0.2.0.
33         - phobos says relaybandwidth* sometimes don't do what we expect.
34           http://interloper.org/tmp/2007-06-bw-usage.png
35         - this notion of authorities notifying servers that they're
36           unreachable is bunk -- it's leftover from the time when all
37           servers ran 24/7. now it triggers every time a server goes
38           away and then returns before the old descriptor has expired.
39       - add a --quiet commandline option that suppresses logs. useful
40         for --hashed-password and maybe others.
41       - Tor logs the libevent version on startup, for debugging purposes.
42         This is great. But it does this before configuring the logs, so
43         it only goes to stdout and is then lost.
44       o Aug 30 [...] wmtbf 4:6:16
45         The wmtbf time value is missing some zero-pads.
47   - Proposals:
48     . 101: Voting on the Tor Directory System (plus 103)
49       . Finalize proposal
50         * Describe schedule in copious detail.
51       - Get authorities voting
52         o Code to manage key certificates
53           o Download as needed.
54             o Code to download
55             o Code to retry download.
56         . Code to generate consensus from a list of votes
57           * Detect whether votes are really all for the same period.
58         . Push/pull documents as appropriate.
59           - Pull votes and signatures if we don't get them.
60         - Cache votes and signatures on disk.
61           - Code to keep consensus docs in limbo if they don't have
62             have enough signatures.
63         o Have clients know which authorities are v3 authorities, and what
64           their keys are.
65           - While we're at it, let v3 authorities have fqdns lines.
66         - Fix all XXXX020s in vote code
67       - Validate information properly.
68         - Warn if we get a vote with different authorities than we know.
69         - Don't count votes with a different valid-after when generating
70           the same consensus.
71         - Dump certificates with the wrong time.  Or just warn?
72         - Warn authority ops when their certs are nearly invalid.
73         - When checking a consensus, make sure that its times are plausible.
74         - Add a function that will eventually tell us about our clock skew.
75           For now, just require that authorities not be skewed.
76       - Start caching consensus documents once authorities make them
77       - Start downloading and using consensus documents once caches serve them
78       - Controller support
79         - GETINFO to get consensus
80         - Event when new consensus arrives
81     . 104: Long and Short Router Descriptors
82       - Drop bandwidth history from router-descriptors around September 10,
83         once torstatus and weasel have upgraded.
84     - 105: Version negotiation for the Tor protocol
85     . 111: Prioritize local traffic over relayed.
86       o Implement
87       - Merge into tor-spec.txt.
89   - Refactoring:
90     . Make cells get buffered on circuit, not on the or_conn.
91       . Switch to pool-allocation for cells?
92         - Benchmark pool-allocation vs straightforward malloc.
93         - Adjust memory allocation logic in pools to favor a little less
94           slack memory.
95     . Remove socketpair-based bridges conns, and the word "bridge".  (Use
96       shared (or connected) buffers for communication, rather than sockets.)
97       . Implement
98         - Handle rate-limiting on directory writes to linked directory
99           connections in a more sensible manner.
100         - Find more ways to test this.
101     - Have clients do TLS connection rotation less often than "every 10
102       minutes" in the thrashy case, and more often than "once a week" in the
103       extra-stable case.
104     - Streamline how we pick entry nodes: Make choose_random_entry() have
105       less magic and less control logic.
106     - Maybe move NT services into their own module.
107     - Refactor networkstatus generation:
108       - Include "v" line in getinfo values.
110   - Bridges:
111     . Bridges users (rudimentary version)
112       o Ability to specify bridges manually
113       o Config option 'UseBridges' that bridge users can turn on.
114         o uses bridges as first hop rather than entry guards.
115       o if you don't have any routerinfos for your bridges, or you don't
116         like the ones you have, ask a new bridge for its server/authority.
117       . Ask all directory questions to bridge via BEGIN_DIR.
118         - use the bridges for dir fetches even when our dirport is open.
119 R     - drop 'authority' queries if they're to our own identity key; accept
120         them otherwise.
121 N     - Design/implement the "local-status" or something like it, from the
122         "Descriptor purposes: how to tell them apart" section of
123         http://archives.seul.org/or/dev/May-2007/msg00008.html
124         - cache of bridges that we've learned about and use but aren't
125           manually listed in the torrc.
126       o timeout and retry schedules for fetching bridge descriptors
127       - give extend_info_t a router_purpose again
128       o react faster to download networkstatuses after the first bridge
129         descriptor arrives
130       o be more robust to bridges being marked as down and leaving us
131         stranded without any known "running" bridges.
132     - Bridges operators (rudimentary version)
133       - Ability to act as dir cache without a dir port.
134       o Bridges publish to bridge authorities
135       o Fix BEGIN_DIR so that you connect to bridge of which you only
136         know IP (and optionally fingerprint), and then use BEGIN_DIR to learn
137         more about it.
138       - look at server_mode() and decide if it always applies to bridges too.
139     - Bridges authorities (rudimentary version)
140       o Rudimentary "do not publish networkstatus" option for bridge
141         authorities.
142       - Clients can ask bridge authorities for more bridges.
143     - Bridges
144       o Clients can ask bridge authorities for updates on known bridges.
145       - More TLS normalization work: make Tor less easily
146         fingerprinted.
147       - Directory system improvements
148     - Misc
149       - Make BEGIN_DIR mandatory for asking questions of bridge authorities?
151   - Features (other than bridges):
152     - Blocking-resistance.
153       - Write a proposal; make this part of 105.
154     - Audit how much RAM we're using for buffers and cell pools; try to
155       trim down a lot.
156     o Accept \n as end of lines in the control protocol in addition to \r\n.
157       o Use fetch_from_buf_line_lf in control.c instead of fetch_from_buf_line.
158       o Fix up read escaped_data to accept LF instead of CRLF, and to
159         always translate_newlines (since that's the only way it's called).
160     - Base relative control socket paths on datadir.
161     - We should ship with a list of stable dir mirrors -- they're not
162       trusted like the authorities, but they'll provide more robustness
163       and diversity for bootstrapping clients.
164     - Better estimates in the directory of whether servers have good uptime
165        (high expected time to failure) or good guard qualities (high
166        fractional uptime).
167      - AKA Track uptime as %-of-time-up, as well as time-since-last-down
168     - Make TrackHostExits expire TrackHostExitsExpire seconds after their
169        *last* use, not their *first* use.
170     - Limit to 2 dir, 2 OR, N SOCKS connections per IP.
171      - Or maybe close connections from same IP when we get a lot from one.
172      - Or maybe block IPs that connect too many times at once.
173     - add an AuthDirBadexit torrc option if we decide we want one.
174     o Add a GuardsSelectedByVersion line to the state file so we know
175       not to drop guards we added.
176       o Have it include the date too.
178   - Testing
179 N   - Hack up a client that gives out weird/no certificates, so we can
180       test to make sure that this doesn't cause servers to crash.
182   - Deprecations:
183     - can we deprecate 'getinfo network-status'?
184     - can we deprecate the FastFirstHopPK config option?
186   - Documentation
187     - HOWTO for DNSPort.
188     - Tell people about OSX Uninstaller
189     - Quietly document NT Service options
190     - More prominently, we should have a recommended apps list.
191       - recommend gaim.
192       - unrecommend IE because of ftp:// bug.
193     - we should add a preamble to tor-design saying it's out of date.
194     . Document transport and natdport in a good HOWTO.
195     - Publicize torel.  (What else?
196     . Finish path-spec.txt
198 P - Packaging:
199 P   - Can we switch to polipo?  Please?
200     - Make documentation realize that location of system configuration file
201       will depend on location of system defaults, and isn't always /etc/torrc.
202 P   - If we haven't replaced privoxy, lock down its configuration in all
203       packages, as documented in tor-doc-unix.html
204 P - Figure out why dll's compiled in mingw don't work right in WinXP.
205 P - Figure out why openssl 0.9.8e "make test" fails at sha256t test.
206 P - Figure out if including RSA and IDEA are bad for Tor from a legal
207      perspective
208 P - Create packages for Nokia 800, requested by Chris Soghoian
209 P - Consider creating special Tor-Polipo-Vidalia test packages,
210     requested by Dmitri Vitalev
211   - Get Vidalia supporting protocolinfo and using auth by default.
212   - Try to get newer Torbuttons into the windows bundle.
214 Nice-to-have items for 0.2.0.x, time permitting:
215   - Proposals
216     - 113: Simplifying directory authority administration
217     - 110: prevent infinite-length circuits (phase one)
218     . Robust decentralized storage for hidden service descriptors.
219       (Karsten is working on this; proposal 114.)
220     - 118: Listen on and advertise multiple ports:
221       - Tor should be able to have a pool of outgoing IP addresses that it is
222         able to rotate through. (maybe.  Possible overlap with proposal 118.)
223       - config option to publish what ports you listen on, beyond
224         ORPort/DirPort.  It should support ranges and bit prefixes (?) too.
225         (This is very similar to proposal 118.)
226     - 117: IPv6 Exits
227       - Internal code support for ipv6:
228         o Clone ipv6 functions (inet_ntop, inet_pton) where they don't exist.
229         - Most address variables need to become tor_addr_t
230         - Teach resolving code how to handle ipv6.
231         - Teach exit policies about ipv6 (consider ipv4/ipv6 interaction!)
233   - Features
234     - Let controller set router flags for authority to transmit, and for
235       client to use.
236     - add an 'exit-address' line in the descriptor for servers that exit
237       from something that isn't their published address.
238     - Clients should estimate their skew as median of skew from servers
239       over last N seconds.
240     - More work on AvoidDiskWrites?
242   - Protocol work
243     - MAYBE kill stalled circuits rather than stalled connections.  This is
244       possible thanks to cell queues, but we need to consider the anonymity
245       implications.
246     - Implement TLS shutdown properly when possible.
248   - Low-priority bugs:
249     - we try to build 4 test circuits to break them over different
250       servers. but sometimes our entry node is the same for multiple
251       test circuits. this defeats the point.
252     - If the client's clock is too far in the past, it will drop (or just not
253       try to get) descriptors, so it'll never build circuits.
255   - Refactoring:
256     - Move all status info out of routerinfo into local_routerstatus.  Make
257       "who can change what" in local_routerstatus explicit.  Make
258       local_routerstatus (or equivalent) subsume all places to go for "what
259       router is this?"
261   - Build:
262     - Detect correct version of libraries from autoconf script.
264   - Documentation:
265     - Review torrc.sample to make it more discursive.
267 Deferred from 0.2.0.x:
268   - Features
269     - Make a TCP DNSPort
270   - Refactoring
271     - Make resolves no longer use edge_connection_t unless they are actually
272       _on_ a socks connection: have edge_connection_t and (say)
273       dns_request_t both extend an edge_stream_t, and have p_streams and
274       n_streams both be linked lists of edge_stream_t.
275     - Generate torrc.{complete|sample}.in, tor.1.in, the HTML manual, and the
276       online config documentation from a single source.
277   - Blocking/scanning-resistance
278     - It would be potentially helpful to https requests on the OR port by
279       acting like an HTTPS server.
280     - Do we want to maintain our own set of entryguards that we use as
281       next hop after the bridge? Open research question; let's say no
282       for 0.2.0 unless we learn otherwise.
283     - Should do reachability testing but only on the purpose==bridge
284       descriptors we have.
285     - Some mechanism for specifying that we want to stop using a cached
286       bridge.
289 Future versions:
290   - See also Flyspray tasks.
291   - See also all OPEN/ACCEPTED proposals.
292   - See also all items marked XXXX and FFFF in the code.
294   - Protocol:
295     - Our current approach to block attempts to use Tor as a single-hop proxy
296       is pretty lame; we should get a better one.
297     - Allow small cells and large cells on the same network?
298     - Cell buffering and resending. This will allow us to handle broken
299       circuits as long as the endpoints don't break, plus will allow
300       connection (tls session key) rotation.
301     - Implement Morphmix, so we can compare its behavior, complexity,
302       etc.  But see paper breaking morphmix.
303     - Other transport. HTTP, udp, rdp, airhook, etc. May have to do our own
304       link crypto, unless we can bully DTLS into it.
305     - Need a relay teardown cell, separate from one-way ends.
306       (Pending a user who needs this)
307     - Handle half-open connections: right now we don't support all TCP
308       streams, at least according to the protocol. But we handle all that
309       we've seen in the wild.
310       (Pending a user who needs this)
312   - Directory system
313     - BEGIN_DIR items
314       - turn the received socks addr:port into a digest for setting .exit
315       - handle connect-dir streams that don't have a chosen_exit_name set.
316     - Have a "Faster" status flag that means it. Fast2, Fast4, Fast8?
317     - Add an option (related to AvoidDiskWrites) to disable directory
318       caching.  (Is this actually a good idea??)
319     - Add d64 and fp64 along-side d and fp so people can paste status
320       entries into a url. since + is a valid base64 char, only allow one
321       at a time. Consider adding to controller as well.
322     - Some back-out mechanism for auto-approval on authorities
323       - a way of rolling back approvals to before a timestamp
324         - Consider minion-like fingerprint file/log combination.
325     - Have new people be in limbo and need to demonstrate usefulness
326       before we approve them.
328   - Hidden services:
329     - Standby/hotswap/redundant hidden services.
330     . Update the hidden service stuff for the new dir approach.  (Much
331       of this will be superseded by 114.)
332       - switch to an ascii format, maybe sexpr?
333       - authdirservers publish blobs of them.
334       - other authdirservers fetch these blobs.
335       - hidserv people have the option of not uploading their blobs.
336       - you can insert a blob via the controller.
337       - and there's some amount of backwards compatibility.
338       - teach clients, intro points, and hidservs about auth mechanisms.
339       - come up with a few more auth mechanisms.
340     - auth mechanisms to let hidden service midpoint and responder filter
341       connection requests.
342     - Let each hidden service (or other thing) specify its own
343       OutboundBindAddress?
344     - Hidserv offerers shouldn't need to define a SocksPort
346   - Server operation
347     - When we notice a 'Rejected: There is already a named server with
348       this nickname' message... or maybe instead when we see in the
349       networkstatuses that somebody else is Named with the name we
350       want: warn the user, send a STATUS_SERVER message, and fall back
351       to unnamed.
352     - If the server is spewing complaints about raising your ulimit -n,
353       we should add a note about this to the server descriptor so other
354       people can notice too.
355     - When we hit a funny error from a dir request (eg 403 forbidden),
356       but tor is working and happy otherwise, and we haven't seen many
357       such errors recently, then don't warn about it.
359   - Controller
360     - A way to adjust router flags from the controller.  (How do we
361       prevent the authority from clobbering them soon afterward?)
362     - Implement missing status events and accompanying getinfos
363       - DIR_REACHABLE
364       - BAD_DIR_RESPONSE (Unexpected directory response; maybe we're behind
365         a firewall.)
366       - BAD_PROXY (Bad http or https proxy)
367       - UNRECOGNIZED_ROUTER (a nickname we asked for is unavailable)
368       - Status events related to hibernation
369       - something about failing to parse our address?
370         from resolve_my_address() in config.c
371       - sketchy OS, sketchy threading
372       - too many onions queued: threading problems or slow CPU?
373     - Implement missing status event fields:
374       - TIMEOUT on CHECKING_REACHABILITY
375     - GETINFO status/client, status/server, status/general: There should be
376       some way to learn which status events are currently "in effect."
377       We should specify which these are, what format they appear in, and so
378       on.
379     - More information in events:
380       - Include bandwidth breakdown by conn->type in BW events.
381       - Change circuit status events to give more details, like purpose,
382         whether they're internal, when they become dirty, when they become
383         too dirty for further circuits, etc.
384       - Change stream status events analogously.
385     - Expose more information via getinfo:
386       - import and export rendezvous descriptors
387       - Review all static fields for additional candidates
388     - Allow EXTENDCIRCUIT to unknown server.
389       - We need some way to adjust server status, and to tell tor not to
390         download directories/network-status, and a way to force a download.
391       - Make everything work with hidden services
393   - Performance/resources
394     - per-conn write buckets
395     - separate config options for read vs write limiting
396       (It's hard to support read > write, since we need better
397        congestion control to avoid overfull buffers there.  So,
398        defer the whole thing.)
399     - Investigate RAM use in directory authorities.
400     - Look into pulling serverdescs off buffers as they arrive.
401     - Rate limit exit connections to a given destination -- this helps
402       us play nice with websites when Tor users want to crawl them; it
403       also introduces DoS opportunities.
404     - Consider truncating rather than destroying failed circuits,
405       in order to save the effort of restarting.  There are security
406       issues here that need thinking, though.
407     - Handle full buffers without totally borking
408     - Rate-limit OR and directory connections overall and per-IP and
409       maybe per subnet.
411   - Misc
412     - Hold-open-until-flushed now works by accident; it should work by
413       design.
414     - Display the reasons in 'destroy' and 'truncated' cells under
415       some circumstances?
416     - Make router_is_general_exit() a bit smarter once we're sure what
417       it's for.
418     - Automatically determine what ports are reachable and start using
419       those, if circuits aren't working and it's a pattern we
420       recognize ("port 443 worked once and port 9001 keeps not
421       working").
423   - Security
424     - don't do dns hijacking tests if we're reject *:* exit policy?
425       (deferred until 0.1.1.x is less common)
426     - Directory guards
427     - Mini-SoaT:
428       - Servers might check certs for known-good ssl websites, and if
429         they come back self-signed, declare themselves to be
430         non-exits.  Similar to how we test for broken/evil dns now.
431       - Authorities should try using exits for http to connect to some
432         URLS (specified in a configuration file, so as not to make the
433         List Of Things Not To Censor completely obvious) and ask them
434         for results.  Exits that don't give good answers should have
435         the BadExit flag set.
436       - Alternatively, authorities should be able to import opinions
437         from Snakes on a Tor.
438     - More consistent error checking in router_parse_entry_from_string().
439       I can say "banana" as my bandwidthcapacity, and it won't even squeak.
440     - Bind to random port when making outgoing connections to Tor servers,
441       to reduce remote sniping attacks.
442     - Audit everything to make sure rend and intro points are just as
443       likely to be us as not.
444     - Do something to prevent spurious EXTEND cells from making
445       middleman nodes connect all over.  Rate-limit failed
446       connections, perhaps?
447     - DoS protection: TLS puzzles, public key ops, bandwidth exhaustion.
449   - Bridges
450     - Tolerate clock skew on bridge relays.
452   - Needs thinking
453     - Now that we're avoiding exits when picking non-exit positions,
454       we need to consider how to pick nodes for internal circuits. If
455       we avoid exits for all positions, we skew the load balancing. If
456       we accept exits for all positions, we leak whether it's an
457       internal circuit at every step. If we accept exits only at the
458       last hop, we reintroduce Lasse's attacks from the Oakland paper.
460   - Windows server usability
461     - Solve the ENOBUFS problem.
462       - make tor's use of openssl operate on buffers rather than sockets,
463         so we can make use of libevent's buffer paradigm once it has one.
464       - make tor's use of libevent tolerate either the socket or the
465         buffer paradigm; includes unifying the functions in connect.c.
466     - We need a getrlimit equivalent on Windows so we can reserve some
467       file descriptors for saving files, etc. Otherwise we'll trigger
468       asserts when we're out of file descriptors and crash.
469     - Merge code from Urz into libevent
470     - Make Tor use evbuffers.
472   - Documentation
473     - a way to generate the website diagrams from source, so we can
474       translate them as utf-8 text rather than with gimp.
475     . Flesh out options_description array in src/or/config.c
476     . multiple sample torrc files
477     . figure out how to make nt service stuff work?
478       . Document it.
479     - Refactor tor man page to divide generally useful options from
480       less useful ones?
481     - Add a doxygen style checker to make check-spaces so nick doesn't drift
482        too far from arma's undocumented styleguide.  Also, document that
483        styleguide in HACKING.  (See r9634 for example.)
484        - exactly one space at beginning and at end of comments, except i
485          guess when there's line-length pressure.
486        - if we refer to a function name, put a () after it.
487        - only write <b>foo</b> when foo is an argument to this function.
488        - doxygen comments must always end in some form of punctuation.
489        - capitalize the first sentence in the doxygen comment, except
490          when you shouldn't.
491        - avoid spelling errors and incorrect comments. ;)
493   - Packaging
494     - The Debian package now uses --verify-config when (re)starting,
495       to distinguish configuration errors from other errors. Perhaps
496       the RPM and other startup scripts should too?
497     - add a "default.action" file to the tor/vidalia bundle so we can
498       fix the https thing in the default configuration:
499       http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#PrivoxyWeirdSSLPort
501   - Related tools
502     - Patch privoxy and socks protocol to pass strings to the browser.
505 Documentation, non-version-specific.
506   - Specs
507     - Mark up spec; note unclear points about servers
508 NR  - write a spec appendix for 'being nice with tor'
509     - Specify the keys and key rotation schedules and stuff
510   - Mention controller libs someplace.
511   - Remove need for HACKING file.
512 P - document http://wiki.noreply.org/noreply/TheOnionRouter/TransparentProxy on freebsd and osx
513 P - figure out why x86_64 won't build rpms from tor.spec
514 P - figure out spec files for bundles of vidalia-tor-polipo
515 P - figure out polipo install scripts for bundles of vidalia-tor-polipo on osx, win32
516 P - evaluate https://sourceforge.net/projects/kleanup/
517 P - evaluate TorK
518 P - figure out selinux policy for tor
519 P - change packaging system to more automated and specific for each
520      platform, suggested by Paul Wouter
522 Website:
523   - tor-in-the-media page
524   . more pictures from ren. he wants to describe the tor handshake
525   - Figure out licenses for website material.
526   - and remove home and make the "Tor" picture be the link to home.
527   - put the logo on the website, in source form, so people can put it on
528     stickers directly, etc.
529   - put the source image for the stickers on the website, so people can
530     print their own
531 R - make a page with the hidden service diagrams.
532   - ask Jan to be the translation coordinator? add to volunteer page.
533   - add a page for localizing all tor's components.
534   - It would be neat if we had a single place that described _all_ the
535     tor-related tools you can use, and what they give you, and how well they
536     work.  Right now, we don't give a lot of guidance wrt
537     torbutton/foxproxy/privoxy/polipo in any consistent place.