Commit Graph

419 Commits

Author SHA1 Message Date
Nick Mathewson
9e8ae9766e Only check versions against downloaded directories, not cached directories.
svn:r2413
2004-10-03 02:37:52 +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
d20d10f360 If we are an authoritative dirserver, check out the fingerprint list when setting connection nicknames
svn:r2389
2004-09-28 22:24:56 +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
a2517b4f07 checking only 0.0.7 and 0.0.8 didn't work, because some dirservers
files have really old descriptors for the authdirservers, so we're
asking them in the new format because they're too old.

now we actually compare the version to a cutoff version, and act
appropriately.

also take this chance to use only >=0.0.8 servers for dns resolves,
because of the recent bugs. we'll bump to >=0.0.9pre1 once there are
some servers running that.


svn:r2380
2004-09-27 06:00:43 +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
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
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
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
765530421e be more aggressive about trying to make circuits:
try once a second for 30 seconds, and only when the entire previous
period has failed do we pause after MAX_CIRCUIT_FAILURES failures.


svn:r2281
2004-08-18 08:51:04 +00:00
Roger Dingledine
b294a037a4 choose exit nodes by bandwidth too
svn:r2274
2004-08-18 06:10:12 +00:00
Nick Mathewson
86980cf6e2 Functions to test nickname validity
svn:r2269
2004-08-18 04:44:24 +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
Nick Mathewson
74621132a9 Implement AllowUnverifiedNodes
svn:r2246
2004-08-17 05:13:58 +00:00
Nick Mathewson
0b91fd1cbe Add a generic Comma-separated-value config type, and a FirewallPorts option to tell FascistFirewall which ports are open. (Defaults to 80,443)
svn:r2244
2004-08-16 20:47:00 +00:00
Roger Dingledine
0a6e27208b o Handle servers with dynamic IP addresses: don't replace
options->Address with the resolved one at startup.
  o detect our address right before we make a routerinfo each time.
o external IP vs bind-IP. Already done, just use options->Address.
o OutboundBindAddress config option, to bind to a specific
  IP address for outgoing connect()s.


svn:r2241
2004-08-16 11:43:18 +00:00
Nick Mathewson
416653271a Implement strict{entry|exit}nodes config options
svn:r2236
2004-08-15 20:14:44 +00:00
Roger Dingledine
cd3da3fc12 o clients choose nodes proportional to advertised bandwidth
o and/or while avoiding unreliable nodes, depending on goals
o 'fascistfirewall' option to pick dirservers on port 80 and ORs on
  port 443.
o if a begin failed due to exit policy, but we believe the IP should                       have been allowed, switch that router to exitpolicy reject *:* until                     we get our next directory.


svn:r2231
2004-08-15 08:15:12 +00:00
Roger Dingledine
b2c7b5adfb fix a race condition in 008pre2: don't try to extend onto a connection
that's still handshaking.

for servers in clique mode, require the conn to be open before you'll
choose it for your path.


svn:r2198
2004-08-08 10:32:36 +00:00
Roger Dingledine
05790d1722 let children survive sigint, sigterm, etc.
this was biting us because ^c would get delivered to all of them,
maybe because they were all still listening to stdin?


svn:r2197
2004-08-08 07:25:45 +00:00
Roger Dingledine
fb4b804c2c Don't warn about being unverified if you're not in the running-routers
list at all.


svn:r2193
2004-08-07 09:01:56 +00:00
Roger Dingledine
052537dad9 rotate onion keys every 12 hours, not every 2 hours
svn:r2184
2004-08-07 03:03:23 +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
Roger Dingledine
b51a444dd2 commit some odds and ends, so my tree is clean
svn:r2137
2004-08-04 05:10:49 +00:00
Nick Mathewson
5b61dd0457 Fix all warnings on win32 build
svn:r2127
2004-08-03 23:57:05 +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
Nick Mathewson
33fe5e362f Never use time(NULL) as assumed publication time for a directory.
svn:r2105
2004-07-22 20:30:02 +00:00
Roger Dingledine
06b72cc8f2 publish advertised_bandwidth in descriptor
svn:r2095
2004-07-22 04:20:27 +00:00
Nick Mathewson
334de84cbe Misc small code cleanups; remove exit_server_mode(); change tor_tls_verify behavior
svn:r2073
2004-07-21 00:44:04 +00:00
Roger Dingledine
99926813b1 get the function prototype right
svn:r2072
2004-07-21 00:21:26 +00:00
Roger Dingledine
73ffcc5cef add a new advertised_server_mode() to distinguish ORs that
are willing to become servers from ones that really are servers.


svn:r2071
2004-07-21 00:12:42 +00:00
Nick Mathewson
e57698cc6e Track bandwidth usage to estimate capacity
svn:r2065
2004-07-20 20:57:46 +00:00
Nick Mathewson
d858a9e990 Remember list of digests for trusted dirservers; use this list to tell whether you are a trusted dirserver
svn:r2064
2004-07-20 20:09:59 +00:00
Roger Dingledine
d5999a24af also don't hang up on him if we're an OR and he's an authdirserver
otherwise we keep getting taken out of the running-routers list


svn:r2063
2004-07-20 19:45:29 +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
Roger Dingledine
f54224ab35 clients can now pick non-authdirservers for fetching directories.
servers still pick authdirservers, but they never pick themselves.

but picking themselves for fetching rend descs is ok.


svn:r2059
2004-07-20 06:44:16 +00:00
Nick Mathewson
54c129d8dc abstract ORPort/SocksPort checks into server_mode(), proxy_mode(), clique_mode(), etc. Dont change underlying comments.
svn:r2054
2004-07-18 21:47:04 +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
bc36db351f Resolve all DOCDOCs.
svn:r2050
2004-07-16 22:23:18 +00:00
Nick Mathewson
5f7738d4cc Code to parse tor version numbers so we can do an is-newer-than check.
svn:r2044
2004-07-13 19:16:49 +00:00
Roger Dingledine
86e0ede07e checkpoint: start working on bandwidth tracking and
letting clients evaluate whether they're suitable servers


svn:r2037
2004-07-13 07:42:20 +00:00
Roger Dingledine
2325050b1b tor now tolerates down dirservers better
svn:r2031
2004-07-12 20:39:40 +00:00
Roger Dingledine
e167eeb18e add 'advertisedbandwidth' to router descriptor
svn:r2028
2004-07-12 18:02:54 +00:00
Nick Mathewson
7d8de8cd10 More digest/nickname fixes
svn:r2000
2004-07-02 23:40:03 +00:00
Roger Dingledine
62dcf9e20f some of the infrastructure to let ORs connect on demand
svn:r1998
2004-07-02 09:29:01 +00:00