Commit Graph

82 Commits

Author SHA1 Message Date
Roger Dingledine
9f9f0e5edd fix another bug with cached compressed directories
still not working


svn:r2383
2004-09-27 07:28:48 +00:00
Roger Dingledine
d0edf8e8b5 fix two bugs with cached directories:
- don't complain that you won't cache it, then cache it anyway.
- change confusing terminology from 'deflate' to 'compress', so
  we'll stop getting our logic backwards. i assume the rfc author
  has shot himself by now.


svn:r2382
2004-09-27 06:57:16 +00:00
Roger Dingledine
185b9fddf2 protect dirservers from overzealous descriptor uploading
wait 10 seconds after directory gets dirty, before regenerating


svn:r2370
2004-09-23 19:58:44 +00:00
Nick Mathewson
c20b24c952 clean up/bugfix deflate logic and log messages
svn:r2359
2004-09-21 18:09:38 +00:00
Nick Mathewson
0ef85f6dba Some platforms have weird translations when you open files in "test" mode; make read/write_str_to_file aware.
svn:r2336
2004-09-08 07:16:34 +00:00
Nick Mathewson
c66e4c4870 Flush more changes from sandbox
- make clients cache directories and use them to seed their router lists
   at startup.  This means clients have a datadir again.
 - Introduce a global_write_bucket.  We need to respond better to exhausting
   it.
 - Remove the last vestiges of LinkPadding and TrafficShaping.
 - Configuration infrastructure support for warning on obsolete options.
 - Refactor directory header parsing to use smartlist_split_string.
 - Respond to content-encoding headers by trying to uncompress as appropriate.
 - Reply with a deflated directory when a client asks for "dir.z".
   (We could use allow-encodings instead, but allow-encodings isn't
   specified in HTTP 1.0.)


svn:r2335
2004-09-08 06:52:33 +00:00
Nick Mathewson
d6e47bec46 Keep a deflated version of each directory so we can deliver it when requested
svn:r2328
2004-09-02 18:57:09 +00:00
Roger Dingledine
7506cce649 stop wasting cpu time on authdirservers
we were making a new directory only when the old one was dirty, but
every time we made one, we'd dirty it by testing it right then.


svn:r2199
2004-08-08 11:15:38 +00:00
Nick Mathewson
f6cc218742 Refactor ISO-style (yyyy-mm-dd hh:mm:ss) time parsing into util.c; rename format/parse_rfc1123_time; make rephist remember used bandwidth; published used bandwidth in descriptors in 15-minute chunks. Breaks unittests.
svn:r2182
2004-08-07 02:46:16 +00:00
Roger Dingledine
e95ae1c9ad let purging routerinfos and descriptors take an age argument
svn:r2171
2004-08-06 22:15:25 +00:00
Nick Mathewson
3ca2728eb2 (size_t)-1 is never < 0; fix an XXXX008 by changing the interface for dirserv_get_runningrouters
svn:r2165
2004-08-06 20:00:16 +00:00
Roger Dingledine
1d41c0ee35 note a bug that adam found
svn:r2150
2004-08-06 02:27:06 +00:00
Nick Mathewson
5b61dd0457 Fix all warnings on win32 build
svn:r2127
2004-08-03 23:57:05 +00:00
Roger Dingledine
a328aab316 clean whitespace and tabs
svn:r2115
2004-07-22 23:21:12 +00:00
Roger Dingledine
aebec8ab9e stop using atexit() to remove our pid, since it's called
immediately when we daemonize.

also drop our retry period for hidserv desc uploads from 10m to 5m


svn:r2111
2004-07-22 22:15:36 +00:00
Nick Mathewson
7b4865ec33 Add notion of "longest nickname-or-hex-digest-with-$"
svn:r2108
2004-07-22 21:31:04 +00:00
Roger Dingledine
a403c1035e getting an unknown descriptor is an info, not a warn, now
svn:r2098
2004-07-22 06:04:13 +00:00
Roger Dingledine
6c56f34aaf clients shouldn't create datadir until we have something to put there
svn:r2092
2004-07-22 00:13:42 +00:00
Roger Dingledine
f82a36508d make router_nickname_is_approved() do the right thing
svn:r2090
2004-07-21 22:54:27 +00:00
Roger Dingledine
3783d2e682 if johnny has three fenceposts, and jill takes four away...
svn:r2089
2004-07-21 22:37:03 +00:00
Roger Dingledine
ecc9009256 authdirservers accept the uploading of unverified descriptors.
fix a bunch of bugs in router_update_status_from_smartlist()
(Nick, did I get them all, or was there a trickier one still hiding?)


svn:r2081
2004-07-21 09:13:12 +00:00
Roger Dingledine
dc7951a5a7 a whole swath of fixes
introduce an authdir_mode() macro to match the others.
don't initialize uptime to the number of seconds since 1970.
non-authoritative dirservers don't cache their directory on disk.
make only authdirservers use clique_mode.
only read approved-routers file if you're an authdirserver.
even authdirservers fetch a new directory in do_hup.
retry_all_connections() is now called retry_all_listeners().
router_parse_list_from_string() correctly reports the router number
  it's working on.
only call dirserv_add_own_fingerprint() and
   dirserv_add_descriptor() on startup if we're an authdirserver.
if AuthDir and !ORPort then fail.
if AuthDir and ClientOnly then fail.


svn:r2061
2004-07-20 10:17:43 +00:00
Nick Mathewson
1040762531 Remove 1024-router limit in routerparse.c; unify handling of running-routers lines in running-routers requests and in directories; set is_verified field of routerinfo_ts correctly; use most-recent-info rule to decide whether to change router-is-running status.
svn:r2051
2004-07-16 23:05:40 +00:00
Nick Mathewson
c2103eb63a Finish most pre2 items: make running-routers list work right; rename secret key files; make even more lookup-by-nickname use lookup-by-id; default nicknames to hostname.
svn:r2043
2004-07-13 18:23:40 +00:00
Roger Dingledine
e1ba0c4663 running-routers now lists down routers too (with a ! before their name)
svn:r1996
2004-07-01 11:32:26 +00:00
Roger Dingledine
f42f04c859 cleanups on 008pre1 items
svn:r1993
2004-06-30 21:48:02 +00:00
Nick Mathewson
b1e9adf056 Always use get_data_directory() instead of options.DataDirectory; fix a memory leak in router.c
svn:r1991
2004-06-30 16:37:08 +00:00
Nick Mathewson
76f769deb9 Remaining 008pre1 items done; deferred where more design is needed.
More docs and (way more!) testing needed.

Done:
 - Authdirservers down directories from others.
 - Generate and use running-routers lists
 - Cache directories; store across reboots.
 - Refactor directory parsing a bit; note potential trouble spots.


svn:r1985
2004-06-25 00:29:31 +00:00
Nick Mathewson
8aec3a7301 Implement several 008pre1 items: needs more testing
svn:r1981
2004-06-21 04:37:27 +00:00
Roger Dingledine
ba5d48e852 router->is_trusted_dir implies router->dir_port>0
and add some infrastructure for fetching running-routers list


svn:r1973
2004-06-16 21:08:29 +00:00
Roger Dingledine
30a07b2ecd non-dirservers expire routerinfo's that are more than a day old
svn:r1907
2004-05-20 05:10:30 +00:00
Roger Dingledine
41c9b8230d fix compile error in dirserv
(declare variables before the rest of the function)


svn:r1896
2004-05-19 19:42:50 +00:00
Nick Mathewson
1cfac90984 remove upper limit on number of descriptors/directories in dirserver; use smartlists instead of arrays
svn:r1894
2004-05-18 17:41:40 +00:00
Roger Dingledine
d2de7120fa fix a seg fault, add another XXX for nick ;)
svn:r1892
2004-05-18 16:54:04 +00:00
Nick Mathewson
7511fbf993 Resolve some XXXs
svn:r1889
2004-05-18 15:35:21 +00:00
Nick Mathewson
50b7ebcf9e Make directory functions update routerlist, not replace it. Add notion of OR-is-trusted-to-be-a-dirserver. Arma, please review: does this handle being a dirserver right?
svn:r1880
2004-05-17 20:31:01 +00:00
Nick Mathewson
b45fafa3d0 Split directory/router parsing functionality into separate file from routerlist.c
svn:r1846
2004-05-10 17:30:51 +00:00
Nick Mathewson
81922a125c More doxygenation.
svn:r1832
2004-05-10 04:34:48 +00:00
Roger Dingledine
c6d4a00c5f more doxygen markup
plenty more remains


svn:r1824
2004-05-09 16:47:25 +00:00
Nick Mathewson
44defa4b1a Never list unapproved servers as recommended
svn:r1790
2004-05-05 04:55:00 +00:00
Nick Mathewson
efdb356a81 More documentation
svn:r1785
2004-05-05 00:30:43 +00:00
Roger Dingledine
2b5e6aef15 note another bug to be fixed sometime
svn:r1754
2004-04-30 05:42:52 +00:00
Nick Mathewson
7055f837ab Make Tor build on win32 with VC6 without warnings.
svn:r1739
2004-04-28 20:13:21 +00:00
Nick Mathewson
0fca143ea1 Remove onion_pkey from connection, since onion keys can change more often than connections. Also add more log messages
svn:r1693
2004-04-25 19:04:11 +00:00
Nick Mathewson
c44016e86e Merge flagday into main branch.
svn:r1683
2004-04-24 22:17:50 +00:00
Nick Mathewson
5514ad715b Scan list of servers in directory after reloading fingerprint list; remove any servers that are no longer recognized.
svn:r1613
2004-04-13 20:06:08 +00:00
Nick Mathewson
6290d027c9 Continue attack on magic numbers; use new crypto wrappers where possible
svn:r1504
2004-04-06 20:16:12 +00:00
Roger Dingledine
7793078dff alice can now look up bob's service descriptor,
choose an intro point, connect to it,
choose a rend point, connect to it and establish a cookie,
get an ack from the rendezvous point,
and know when both circs are ready for her.

APConns don't use conn->purpose anymore

don't initiate a renddesc lookup if one is already in progress

also fix a buffer overflow in nickname parsing (only exploitable
by the operator though)


svn:r1471
2004-04-05 00:47:48 +00:00
Nick Mathewson
b3c2b62a14 Make "common" no longer depend on or.h
svn:r1466
2004-04-03 04:05:12 +00:00
Roger Dingledine
83c88c55fd old or skewed descriptor doesn't mean we failed to parse it
svn:r1373
2004-03-29 23:23:01 +00:00