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