Commit Graph

172 Commits

Author SHA1 Message Date
Roger Dingledine
e541319dcb lay the groundwork for a default value for each config option.
tolerate null exitnodes, entrynodes, etc config options.


svn:r2655
2004-11-03 10:08:44 +00:00
Nick Mathewson
ad4dc74482 Use a stricter set of warnings; make them all pass.
svn:r2645
2004-11-02 03:02:17 +00:00
Nick Mathewson
11d330be5e Tweaks to prevent obsolete restarting tors from hammering the dirservers. (1) Cache a received directory as soon as the signature checks out. (2) Treat a cached directory as "recent" based on its mtime. (3) If we have a recent directory, we dont need to fetch a newer one for DirFetchPostPeriod. This needs review!
svn:r2618
2004-10-28 18:37:52 +00:00
Nick Mathewson
2fbf31533b Tricksy compiler warnings! We hates them, hates them forever, my precious!
svn:r2615
2004-10-27 21:14:11 +00:00
Nick Mathewson
6980929e64 Use strlcpy, not strcpy.
svn:r2610
2004-10-27 06:48:16 +00:00
Nick Mathewson
44d4516155 Use tor_snprintf, not snprintf
svn:r2609
2004-10-27 06:37:34 +00:00
Nick Mathewson
bc62f8e983 Replace sprintf with snprintf
svn:r2602
2004-10-27 05:53:07 +00:00
Nick Mathewson
b90b2bb848 Add and document router-status line using new unified liveness/verifiedness format; continue to generate running-routers; continue to parse running-routers when no router-status line is found
svn:r2592
2004-10-27 00:48:51 +00:00
Nick Mathewson
e5049d5aa3 Remove routerinfo_t->is_trusted_dir, and all the twisted machinery used to
maintain it.

Have clients default to the nickname "client" in their certificates.

Give a less frightening warning on obsolete (pre-0.0.8) routerinfo_t's.


svn:r2568
2004-10-19 18:19:59 +00:00
Roger Dingledine
97a0a43511 start the process of making 0.0.7* obsolete
svn:r2565
2004-10-17 21:51:20 +00:00
Nick Mathewson
56a592dbe3 Fix memory leak
svn:r2535
2004-10-16 08:39:56 +00:00
Nick Mathewson
9d5831341e Implement user-declared node families.
svn:r2534
2004-10-15 20:52:09 +00:00
Nick Mathewson
28dd458eaf Upload to trusted dir servers based on DirServer config options, not on routerinfos.
svn:r2529
2004-10-15 19:04:38 +00:00
Nick Mathewson
88e0c080cf Ignore fascistfirewall when dealing with service descriptors; obey fascistfirewall when posting server descriptors; ignore fascistfirewall on directory connections when httpproxy is set.
svn:r2527
2004-10-15 04:57:36 +00:00
Nick Mathewson
ff38cc06e1 Fix search-and-replace in comments: Friends->family does not imply friendship->familyhip.
svn:r2525
2004-10-15 03:55:53 +00:00
Nick Mathewson
7fa5d224d4 Implement "families" of coadministered nodes; prevent them all from appearing on the same circuit.
svn:r2523
2004-10-15 01:58:11 +00:00
Nick Mathewson
bd10bf4b5b Try to always dtrt if routerlist==NULL
svn:r2489
2004-10-14 03:44:45 +00:00
Roger Dingledine
89280e6c20 rename addr to address to we avoid this bug later
svn:r2488
2004-10-14 03:31:40 +00:00
Roger Dingledine
aebc3a03ba more int to size_t conversions, fixing one or more amd64 bugs
plus a whitespace patch on config.c from vicman


svn:r2482
2004-10-14 02:47:09 +00:00
Nick Mathewson
92bb360ad7 Add missing line; add similar check
svn:r2481
2004-10-14 02:29:03 +00:00
Nick Mathewson
0d5a847f12 Remove need for dirservers file: now, we note trusted dirservers in configuration options, and only need to remember addr:port and key digest for each one.
svn:r2479
2004-10-14 01:44:32 +00:00
Nick Mathewson
30dd1c87a5 Add default trusted-dir-server entries only when no dirserver lines are given in the config file
svn:r2467
2004-10-13 19:56:42 +00:00
Nick Mathewson
df3098367c Make directories get generated properly again; debug key lookup. Also, it is hard to find entries in a table when you never put them there.
svn:r2462
2004-10-13 18:28:39 +00:00
Nick Mathewson
0068415b80 Add an implementation of trusted_dir_server logic to switch towards simply remembering an addr/port/keyid for each trusted dir server
svn:r2443
2004-10-12 15:55:20 +00:00
Nick Mathewson
c7e8c2098a Include a dir-signing-key token in directories to tell the parsing entity which key is being used to sign. This is the first step in obsoleting the dirservers file.
svn:r2428
2004-10-07 21:10:40 +00:00
Nick Mathewson
dad7c71686 Workaround for bug on windows where cached-directories get crlf corruption.
svn:r2426
2004-10-07 20:22:58 +00:00
Roger Dingledine
8b02610bd5 when an OR starts up, it loads its directory from cache.
then it serves *that directory* to others who ask for a copy of the
directory. it's better to serve no directory at all until you have a
fresh copy.


svn:r2418
2004-10-06 05:05:43 +00:00
Nick Mathewson
9e8ae9766e Only check versions against downloaded directories, not cached directories.
svn:r2413
2004-10-03 02:37:52 +00:00
Roger Dingledine
136d4e5739 prefer tor_free to free
plus complain more loudly when we fail to parse a dir we just fetched


svn:r2401
2004-09-29 06:52:36 +00:00
Roger Dingledine
a31ba30ae6 if our local cached directory is new enough, go ahead and
start building circuits while we're fetching a new one


svn:r2394
2004-09-28 23:27:41 +00:00
Nick Mathewson
11384b6d92 Make sure that routerlists contain only routers; give a better error message if they start with a nonrouter.
svn:r2393
2004-09-28 22:49:34 +00:00
Nick Mathewson
0c653e5cc7 cached-directory has a directory, not a router list
svn:r2392
2004-09-28 22:43:11 +00:00
Roger Dingledine
4b3001a08c fix some local buffer overflows
fix a memory leak


svn:r2391
2004-09-28 22:38:21 +00:00
Roger Dingledine
ff622786f1 slightly better warn message
svn:r2357
2004-09-21 17:14:47 +00:00
Nick Mathewson
431b33a2ca Warn the user when we mark ourself as down.
svn:r2356
2004-09-21 16:44:20 +00:00
Roger Dingledine
959199340a don't pick administrative-friends when picking your path
(just a skeleton for now)


svn:r2349
2004-09-10 21:40:29 +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
bda41ba3fd Use new split function and strcmpstart correctly
svn:r2327
2004-09-02 18:39:59 +00:00
Roger Dingledine
79df0aa18a when picking unverified routers, skip those with bad uptime or
bad bandwidth, depending on what properties you care about


svn:r2302
2004-08-20 21:34:36 +00:00
Roger Dingledine
8ddc029d07 if options.FascistFirewall but none are running on port 80, try
the others before giving up.


svn:r2293
2004-08-18 21:13:58 +00:00
Roger Dingledine
b500104cbe tolerate old 0.0.7 clients that demand a certain ip:port for a router
even though it's moved on to another one.

also reduce some log verbosity.


svn:r2288
2004-08-18 11:20:15 +00:00
Roger Dingledine
3937ecfaae when we try to exclude our routerinfo from being picked in the
path, it fails because we're using a pointer to the routerinfo we
generate, not a pointer to the routerinfo in the routerlist. so look
up the right one and use that.


svn:r2286
2004-08-18 10:32:50 +00:00
Roger Dingledine
b885db033e remove crazy notion that clique_mode() means we are
already connected to everybody we could be connected to.


svn:r2283
2004-08-18 09:07:11 +00:00
Roger Dingledine
6d661d1bc0 bugfix: make intro circuits work again
svn:r2280
2004-08-18 07:53:43 +00:00
Roger Dingledine
b294a037a4 choose exit nodes by bandwidth too
svn:r2274
2004-08-18 06:10:12 +00:00
Roger Dingledine
aa1e518446 when a verified routerinfo arrives with a new key than the previous
verified routerinfo with that name, close connections to the obsolete
key to make way for connections to the new key.


svn:r2257
2004-08-17 08:00:23 +00:00
Roger Dingledine
9e5fc55564 now that we parse router->uptime, make use of it
svn:r2251
2004-08-17 06:42:30 +00:00
Roger Dingledine
ee23b7a470 use unverified routers in the desired positions
svn:r2249
2004-08-17 06:27:32 +00:00
Nick Mathewson
590cd621f8 Clean up last patch; implement (mostly) proper handling for verified/unverified name collisions.
svn:r2248
2004-08-17 06:06:05 +00:00