Commit Graph

495 Commits

Author SHA1 Message Date
Peter Palfrader
ca43044600 I bet I screwed up while merging in the changes from the feature branch into my git-svn repository. Undo r14451
svn:r14452
2008-04-24 15:43:25 +00:00
Peter Palfrader
016e67f941 Merge conditional consensus downloading
svn:r14451
2008-04-24 15:39:14 +00:00
Peter Palfrader
788404dacf and the client part of the consensus-by-authority-fpr proposal (ifdef'ed out)
svn:r14446
2008-04-24 15:38:57 +00:00
Nick Mathewson
e623d9baff r15277@tombo: nickm | 2008-04-22 13:14:18 -0400
Note a place to refactor.


svn:r14412
2008-04-22 17:21:09 +00:00
Nick Mathewson
296289de82 r18873@catbus: nickm | 2008-03-17 00:06:31 -0400
oops.  guard status logging change had a bug.  it is non-obvious how to make the code perfect atm; just make it work.


svn:r14070
2008-03-17 04:07:56 +00:00
Nick Mathewson
e6b617bf05 r18872@catbus: nickm | 2008-03-16 23:56:48 -0400
Only dump all guard node status to the log when the guard node status actually changes.  Downgrade the 4 most common remaining INFO log messages to DEBUG.


svn:r14069
2008-03-17 04:07:51 +00:00
Nick Mathewson
b98c437fcc r18195@catbus: nickm | 2008-02-19 14:11:15 -0500
TOR_PERF has not not been a sane thing for ages. Remove it.


svn:r13579
2008-02-19 19:30:37 +00:00
Roger Dingledine
3abafccd0e Start choosing which bridge to use proportional to its advertised
bandwidth, rather than uniformly at random. This should speed up Tor
for bridge users. Also do this for people who set StrictEntryNodes.


svn:r13486
2008-02-12 22:02:47 +00:00
Roger Dingledine
a89e523f19 note a simplification for the future
svn:r13466
2008-02-11 06:34:10 +00:00
Nick Mathewson
b5c03f05d8 r14102@tombo: nickm | 2008-02-10 13:30:04 -0500
Remove some deadcode.


svn:r13459
2008-02-10 18:40:27 +00:00
Roger Dingledine
509d2912dc doxygen and other cleanups
svn:r13440
2008-02-09 03:11:10 +00:00
Nick Mathewson
141a5877f3 r14063@tombo: nickm | 2008-02-08 15:48:32 -0500
Add a bunch more code documentation; change the interface of fetch_var_cell_from_buf() so it takes the current link protocol into account and can't get confused by weird command bytes on v1 connections.


svn:r13430
2008-02-08 21:13:15 +00:00
Nick Mathewson
842a33ff20 Update some copyright notices: it is now 2008.
svn:r13412
2008-02-07 05:31:47 +00:00
Nick Mathewson
12071df6c8 r17930@catbus: nickm | 2008-02-05 18:20:40 -0500
Initial attempts to track down bug 600, and refactor possibly offending code.  1) complain early if circuit state is set to OPEN when an onionskin is pending.  2) refactor onionskin field into one only used when n_conn is pending, and a separate onionskin field waiting for attention by a cpuworker.  This might even fix the bug.  More likely, it will make it fail with a more useful core.


svn:r13394
2008-02-05 23:20:49 +00:00
Roger Dingledine
fdbefc8934 If we're a relay, avoid picking ourselves as an introduction point,
a rendezvous point, or as the final hop for internal circuits. Bug
reported by taranis and lodger. Bugfix on 0.1.2.x.


svn:r13372
2008-02-04 17:25:24 +00:00
Nick Mathewson
3b8f76aa51 r17611@catbus: nickm | 2008-01-14 13:44:16 -0500
add some missing checks for failing return values.


svn:r13130
2008-01-14 19:00:23 +00:00
Roger Dingledine
4fb573fddd bugfix on r10612:
When we load a bridge descriptor from the cache,
and it was previously unreachable, mark it as retriable so we won't
just ignore it. Also, try fetching a new copy immediately.


svn:r12950
2007-12-24 10:31:39 +00:00
Nick Mathewson
da06bfb80f r15653@tombo: nickm | 2007-12-23 14:15:12 -0500
Refactor circuit_launch* functions to take a bitfield of flags rather than 4 separate nonconsecutive flags arguments.  Also, note a possible but in circuit_find_to_cannibalize, which seems to be ignoring its purpose argument.


svn:r12948
2007-12-23 19:15:22 +00:00
Roger Dingledine
6097e46420 Fix a crash when we load a bridge descriptor from disk but we don't
currently have a Bridge line for it in our torrc. Bugfix on
0.2.0.12-alpha.


svn:r12921
2007-12-22 06:11:49 +00:00
Roger Dingledine
73ff2e5d5e Fix a crash when we fetch a descriptor that turns out to be
unexpected (it used to be in our networkstatus when we started
fetching it, but it isn't in our current networkstatus), and we
aren't using bridges. Bugfix on 0.2.0.x.


svn:r12911
2007-12-21 22:58:22 +00:00
Roger Dingledine
1d8a8063b9 clean up copyrights, and assign 2007 copyrights to The Tor Project, Inc
svn:r12786
2007-12-12 21:09:01 +00:00
Roger Dingledine
52363d23d7 If we can't expand our list of entry guards (e.g. because we're
using bridges or we have StrictEntryNodes set), don't mark relays
down when they fail a directory request. Otherwise we're too quick
to mark all our entry points down.


svn:r12755
2007-12-10 17:16:41 +00:00
Roger Dingledine
07dbaaac16 We were ignoring our RelayBandwidthRate for the first 30 seconds
after opening a circuit -- even relayed circuits. Bugfix on
0.2.0.3-alpha.


svn:r12638
2007-12-02 11:24:06 +00:00
Roger Dingledine
b02e154470 minor cleanups
svn:r12571
2007-11-26 06:26:17 +00:00
Roger Dingledine
91bb09cb28 Only update guard status (usable / not usable) once we have
enough directory information. This was causing us to always pick
two new guards on startup (bugfix on 0.2.0.9-alpha), and it was
causing us to discard all our guards on startup if we hadn't been
running for a few weeks (bugfix on 0.1.2.x). Fixes bug 448.


svn:r12570
2007-11-26 02:18:57 +00:00
Roger Dingledine
d09439872d If we're using bridges or have strictentrynodes set, and our
chosen exit is in the same family as all our bridges/entry guards,
then be flexible about families.


svn:r12514
2007-11-16 07:37:49 +00:00
Roger Dingledine
b669fb7344 i'm a little teapot, ...
svn:r12513
2007-11-16 07:33:57 +00:00
Roger Dingledine
0871e02da8 If we're trying to fetch a bridge descriptor and there's no way
the bridge authority could help us (for example, we don't know
a digest, or there is no bridge authority), don't be so eager to
fall back to asking the bridge authority.


svn:r12512
2007-11-16 07:31:51 +00:00
Roger Dingledine
06a1e4124f Fix a small memory leak whenever we decide against using a
newly picked entry guard. Reported by Mike Perry.


svn:r12506
2007-11-15 11:14:08 +00:00
Roger Dingledine
e9af56cf2f If bridge users set UpdateBridgesFromAuthority, but the digest
they ask for is a 404 from the bridge authority, they now fall
back to trying the bridge directly.


svn:r12368
2007-11-04 00:15:42 +00:00
Nick Mathewson
20b1085989 r16242@catbus: nickm | 2007-10-28 16:28:13 -0400
Implement if-modified-since for consensus networkstatuses so that we do not download duplicates needlessly.


svn:r12258
2007-10-28 20:30:21 +00:00
Roger Dingledine
900ddcb8fd bugfix on r11298:
Fix a minor memory leak whenever we parse guards from our state
file. Bugfix on 0.2.0.7-alpha.


svn:r11862
2007-10-11 02:03:53 +00:00
Roger Dingledine
a5851939c0 i heard that users know the phrase 'system clock' better than 'clock'. hm.
svn:r11820
2007-10-09 21:11:16 +00:00
Nick Mathewson
6f7847b378 r15530@catbus: nickm | 2007-10-04 12:16:27 -0400
Add a bunch of function documentation; clean up a little code; fix some XXXXs; tag the nonsensical EXTRAINFO_PURPOSE_GENERAL as nonsesnse; note another bit of "do not cache special routers" code to nuke.


svn:r11761
2007-10-04 16:21:58 +00:00
Roger Dingledine
193a144c9f Make "UpdateBridgesFromAuthority" torrc option work: when bridge
users configure that and specify a bridge with an identity
fingerprint, now they will lookup the bridge descriptor at the
default bridge authority via a one-hop tunnel, but once circuits
are established they will switch to a three-hop tunnel for later
connections to the bridge authority.


svn:r11550
2007-09-21 06:14:36 +00:00
Nick Mathewson
eca3634f62 r14294@Kushana: nickm | 2007-09-01 13:50:03 -0400
Oops. Initialize "changed" variable when removing obsolete guards.


svn:r11346
2007-09-01 17:50:29 +00:00
Nick Mathewson
4266039c19 r14826@catbus: nickm | 2007-08-29 13:19:55 -0400
Add a line to the state file for each guard to let us know which version added the guard.  If the line is absent, assume the guard was added by whatever version of Tor last wrote the state file.  Remove guards if the version that added them was using a bad guard selection algorithm.  (Previously, we removed guards if the version that wrote the file was using a bad guard selection algorithm, even if the guards themselves were chosen by a good version.) 


svn:r11298
2007-08-29 17:22:00 +00:00
Nick Mathewson
a4cc3e4be1 r14821@catbus: nickm | 2007-08-27 19:57:56 -0400
Check for absent nickname when making extend info.  I still dont know when this happens, but it is easy enough to check for.  Fixes bug 467.


svn:r11293
2007-08-28 00:00:32 +00:00
Nick Mathewson
c3805e753a r14200@kushana: nickm | 2007-08-24 08:33:41 -0400
In new code, let's try to prefer named flags to mazes of twisted boolean arguments, all alike.


svn:r11267
2007-08-24 12:33:53 +00:00
Roger Dingledine
d39c7515d1 patch from mike perry to a) stop overloading guards as much, and
b) raise the max-believable-bandwidth to 10MB/s.


svn:r11258
2007-08-24 06:30:34 +00:00
Roger Dingledine
79066b4851 backport candidate:
Fix a minor memory leak when we fail to find enough suitable
servers to choose a circuit. Bugfix on 0.1.2.x.


svn:r11247
2007-08-22 03:03:24 +00:00
Nick Mathewson
676d8622de r14659@catbus: nickm | 2007-08-18 14:19:34 -0400
When we are loading state info from disk, never believe any date in the future.  Doing so can keep us from retrying guards, rotating onion keys, storing bandwidth info, etc.  Fixes bug 434, and others. Backport candidate, once it has been tested.


svn:r11166
2007-08-18 18:20:42 +00:00
Roger Dingledine
ca7c53d3cc Be even more aggressive about separating local traffic from relayed
traffic when RelayBandwidthRate is set. (Refines proposal 111.)


svn:r10974
2007-07-29 22:13:44 +00:00
Roger Dingledine
eca2a30060 make progress towards retrying our bridges when they're all
down and we get a new socks request


svn:r10967
2007-07-29 04:38:21 +00:00
Nick Mathewson
189bc7cf9f r13920@catbus: nickm | 2007-07-26 16:25:25 -0400
whitespace fixes


svn:r10935
2007-07-26 20:26:53 +00:00
Nick Mathewson
701fce8e5c r13858@catbus: nickm | 2007-07-22 18:44:02 -0400
Fix/note some relatively trivial mem usage issues


svn:r10905
2007-07-22 22:49:49 +00:00
Roger Dingledine
6fc336d217 handle fetching bridge descriptors from the bridge authority too.
svn:r10898
2007-07-22 00:16:48 +00:00
Roger Dingledine
a916e07ea6 when requesting tor/server/authority, ask for tor/server/authority.z
instead. same functionality, saves a bit of bandwidth. and might even
work.


svn:r10896
2007-07-21 22:04:18 +00:00
Roger Dingledine
50487c249d timeout and retry schedules for fetching bridge descriptors
svn:r10867
2007-07-18 10:06:03 +00:00
Roger Dingledine
5c4d86f512 using fascistfirewall and having your bridge on an unreachable
port silently didn't mix. now they loudly don't mix.


svn:r10862
2007-07-18 07:13:15 +00:00
Roger Dingledine
a1ab2c8087 free bridge list on exit; try harder to free buffer freelists on exit.
svn:r10854
2007-07-17 11:33:38 +00:00
Roger Dingledine
99bfb1bebe If there's a never-before-connected-to guard node in our list,
never choose any guards past it. This way we don't expand our 
guard list unless we need to. [Bugfix in 0.1.2.x]

I'm not sure if this will solve all our problems, but it is at least
something.



svn:r10730
2007-07-02 22:15:26 +00:00
Roger Dingledine
237cdfdf48 if we already have a bridge in our state file, it won't be
in the networkstatuses, so we'll mark it unusable when we
load it, and then when we get a new routerinfo for it, we'll
still think it's unusable. fix that.


svn:r10612
2007-06-15 18:32:27 +00:00
Roger Dingledine
07ff5c6785 bugfix on r10609: don't fail asserts when closing circuits
that were connected to an unkeyed connection.


svn:r10611
2007-06-15 16:21:40 +00:00
Roger Dingledine
2cd293dc8f now we can specify a bridge without specifying its key,
and we will still connect to it and use it. getting closer!


svn:r10609
2007-06-15 06:01:04 +00:00
Roger Dingledine
3d641bde0e Refine r10571: more work on bridge stuff.
- Only listen to responses for "authority" fetches if we're configured
    to use Bridges. Otherwise it's safe (and maybe smarter) to silently
    discard them like we used to.
  - React faster to download networkstatuses after the first bridge
    descriptor arrives.
  - Don't do dir fetches before we have any bridges, even when our 
    dirport is open.


svn:r10604
2007-06-15 02:12:15 +00:00
Roger Dingledine
af658b7828 More work towards making bridge users able to connect via bridges:
- demand options->Bridges and options->TunnelDirConns if 
    options->UseBridges is set.
  - after directory fetches, accept descriptors that aren't referenced by
    our networkstatuses, *if* they're for a configured bridge.
  - delay directory fetching until we have at least one bridge descriptor.
  - learn how to build a one-hop circuit when we have neither routerinfo
    nor routerstatus for our destination.
  - teach directory connections how to pick a bridge as the destination
    directory when doing non-anonymous fetches.
  - tolerate directory commands for which the dir_port is 0.
  - remember descriptors when the requested_resource was "authority", 
    rather than just ignoring them.
  - put bridges on our entry_guards list once we have a descriptor for them.
    When UseBridges is set, only pick entry guards that are bridges. Else
    vice versa.


svn:r10571
2007-06-12 09:17:23 +00:00
Roger Dingledine
04995f197d more building blocks towards being able to fetch bridge descriptors
svn:r10548
2007-06-10 07:34:21 +00:00
Roger Dingledine
1ae7708ff8 discard the "bridge list" stubs that i hope i never need.
svn:r10547
2007-06-10 00:30:14 +00:00
Roger Dingledine
8db1b61a26 avoid leaking memory in a path never followed. pointed out
by robert watson.


svn:r10521
2007-06-07 15:07:33 +00:00
Roger Dingledine
42d7b0877d forward-port r10318
svn:r10319
2007-05-24 23:39:04 +00:00
Nick Mathewson
6975a093e9 r12853@catbus: nickm | 2007-05-22 11:36:54 -0400
Make connection_array into a smartlist.


svn:r10292
2007-05-22 15:49:14 +00:00
Roger Dingledine
590a98ff37 clean up r10240 so we avoid the exit node itself too
svn:r10242
2007-05-22 01:20:23 +00:00
Roger Dingledine
6ede110c4d When choosing an entry guard for our circuit, avoid using guards
that are in the same family as the chosen exit -- not just guards
that are exactly the chosen exit. (Reported by lodger.)


svn:r10240
2007-05-22 01:01:24 +00:00
Nick Mathewson
ceac39aa8a r12697@catbus: nickm | 2007-05-09 00:15:40 -0400
Change authority_type_t to a set of flags; use it more consistently.


svn:r10144
2007-05-09 04:15:46 +00:00
Roger Dingledine
07bf274d98 Interim commit: new config options Bridge and UseBridges.
It is becoming increasingly clear to me that bridges should
be a special case of entry guards, not a whole separate pile
of nearly identical functions.


svn:r10141
2007-05-08 11:28:05 +00:00
Roger Dingledine
54f5ab39b3 record the router purpose at each step of the circuit path.
i have the feeling this will come in handy.


svn:r10139
2007-05-08 10:11:53 +00:00
Roger Dingledine
1d3bb103a4 clean up some function argument names
svn:r10138
2007-05-08 10:01:33 +00:00
Nick Mathewson
38c0bb3a99 r12651@Kushana: nickm | 2007-03-24 18:26:42 -0400
Initial version of circuit-based cell queues.  Instead of hammering or_conns with piles of cells, queue cells on their corresponding circuits, and append them to the or_conn as needed.  This seems to work so far, but needs a bit more work.  This will break the memory-use-limitation patch for begin_dir conns: the solution will be a fun but fiddly.


svn:r9904
2007-03-26 14:07:59 +00:00
Nick Mathewson
306d5400c3 r12643@0-41-wifi: nickm | 2007-03-23 14:56:35 -0400
Refactor a bunch of functions that take edge_connection_t not to also take a crypt_path_t; the cpath is implicit.


svn:r9899
2007-03-24 15:57:51 +00:00
Roger Dingledine
c36a6210a2 put the stopgap on whether we've sent a create cell, not
whether we've attached a stream.


svn:r9883
2007-03-20 03:26:51 +00:00
Nick Mathewson
7fcceb2c25 r12074@catbus: nickm | 2007-03-04 15:11:43 -0500
Make all LD_BUG log messsages get prefixed with "Bug: ".  Remove manually-generated "Bug: "s from log-messages.  (Apparently, we remembered to add them about 40% of the time.)


svn:r9733
2007-03-04 20:11:46 +00:00
Nick Mathewson
1a3e1c5510 r11970@catbus: nickm | 2007-02-27 19:17:27 -0500
Fix a bug found by Udo van den Heuvel: avoid an assertion failure when a controller sets and clears EntryNodes before the next call to choose_random_entry().  Also make a function static.


svn:r9669
2007-02-28 00:23:05 +00:00
Roger Dingledine
50f22e858a doc pedant
svn:r9634
2007-02-24 07:50:38 +00:00
Nick Mathewson
f599adf40a r11909@catbus: nickm | 2007-02-24 02:37:40 -0500
Move tricky "delete the member of the smartlist currently under iteration" logic into its own happyfun macro.


svn:r9633
2007-02-24 07:37:45 +00:00
Roger Dingledine
2015479b5a fix crash introduced in r9622
svn:r9632
2007-02-24 06:44:40 +00:00
Roger Dingledine
d63c58249e make it stop crashing when i exercise the new entrynodes behavior in
r9574. this hack is getting pretty darn hackish; perhaps it's time to
not use SMARTLIST_FOREACH in this situation.


svn:r9629
2007-02-24 04:17:29 +00:00
Nick Mathewson
f1d207b29a r11885@catbus: nickm | 2007-02-23 13:34:24 -0500
Fix an XXXX012: make entry guards _really_ get retried when the network comes back online.


svn:r9622
2007-02-23 18:34:35 +00:00
Nick Mathewson
d2893398f6 r11832@catbus: nickm | 2007-02-16 15:31:59 -0500
Fix 35 remaining DOCDOC comments. Yowza.


svn:r9596
2007-02-16 20:39:37 +00:00
Nick Mathewson
3c691b9da6 r11785@catbus: nickm | 2007-02-12 20:27:48 -0500
Node-picking fixes: Never warn when a down node is listed in a config option (bug 348); always warn when a node in a config option is unnamed.  Also, when entrynodes is configured, then build the guard list as: (parts of EntryNodes that were guards before), (the rest of EntryNodes), (the rest of the old guards).  This last point ensures that EntryNode users will get the EntryNodes they want with the minimum change to their guard list.


svn:r9574
2007-02-13 01:27:55 +00:00
Nick Mathewson
759c58151e r11775@catbus: nickm | 2007-02-12 16:39:09 -0500
Update copyright dates.


svn:r9570
2007-02-12 21:39:53 +00:00
Nick Mathewson
0c40a080a4 r11773@catbus: nickm | 2007-02-12 15:18:48 -0500
Implement proposal 106: stop requiring clients to have certificates, and stop checking for nicknames in certificates.  [See proposal 106 for rationale.]  Also improve messages when checking TLS handshake, to re-resolve bug 382.


svn:r9568
2007-02-12 21:39:33 +00:00
Nick Mathewson
e00a1cbf16 r11726@catbus: nickm | 2007-02-08 16:04:53 -0500
Resolve some XXXX012 items:
   - Remove PathlenCoinWeight: if we want it again, we can add it
     back in.
   - Ditto with RelayBandwidth*.
   - Decide to leave in the "hey, you didn't set end_reason!" BUG log message,
     but stop telling people to bug me personally.
   - Postpone strengthening assert_connection_ok(): it's important, but 
     it's also a good way to introduce weird bugs.
   - Move some expensive consistency checking from dns_free_all() into
     assert_cache_ok().


svn:r9533
2007-02-08 22:07:56 +00:00
Nick Mathewson
85d3c2fbaf r11702@catbus: nickm | 2007-02-08 02:10:19 -0500
Wow. Remember when I wrote that script to tell me about macros that were never used?  Good times.


svn:r9525
2007-02-08 07:24:15 +00:00
Roger Dingledine
9aa8e490f8 cleanups based on looking through svn commits
svn:r9491
2007-02-06 00:27:03 +00:00
Nick Mathewson
03ef2156c9 r11637@catbus: nickm | 2007-02-05 12:41:51 -0500
Fix an XXXX012, and make circuits_pending_or_conns a static variable.  In addition to cleaning up the code, this may also resolve Bug 386 if Roger has the right intuition there.


svn:r9482
2007-02-05 17:42:40 +00:00
Nick Mathewson
fefba95363 r11629@catbus: nickm | 2007-02-02 15:06:17 -0500
Removing the last DOCDOC comment hurt so much that I had to use Doxygen to identify undocumented macros and comments, and add 150 more DOCDOCs to point out where they were.  Oops.  Hey, kids!  Fixing some of these could be your first Tor patch!


svn:r9477
2007-02-02 20:06:43 +00:00
Nick Mathewson
76f896e714 r11607@catbus: nickm | 2007-01-30 17:19:27 -0500
Audit non-const char arguments; make a lot more of them const.


svn:r9466
2007-01-30 22:19:41 +00:00
Nick Mathewson
1894e7ea01 r11606@catbus: nickm | 2007-01-30 16:52:23 -0500
Write the entry guards section of path-spec; note a possible bug in cirbuitbuild.c; add a const; defer work on torrc.complete to be part of a bigger config documentation reorg.


svn:r9465
2007-01-30 22:19:31 +00:00
Roger Dingledine
d8d074f2e5 If the user asks to use invalid exit nodes, be willing to use the
unstable ones.


svn:r9441
2007-01-27 19:40:49 +00:00
Roger Dingledine
add7d7af19 Bring us one step closer to being able to establish an encrypted
directory tunnel without knowing a descriptor first. Still not
ready yet. As part of the change, now assume we can use a
create_fast cell if we don't know anything about a router.


svn:r9440
2007-01-27 19:29:16 +00:00
Nick Mathewson
71f47320f8 r11493@catbus: nickm | 2007-01-24 18:41:52 -0500
Use set_uint16/32 instead of raw assignments in order to make gcc happier.


svn:r9399
2007-01-24 23:42:00 +00:00
Nick Mathewson
792f819212 r11285@catbus: nickm | 2007-01-23 19:43:50 -0500
More documentation. (Again, trying to see whether I have buildbot working).


svn:r9394
2007-01-24 00:43:52 +00:00
Roger Dingledine
9f733c31cc minor cleanups
svn:r9387
2007-01-22 19:20:33 +00:00
Nick Mathewson
380f8983c7 r11966@Kushana: nickm | 2007-01-15 16:12:17 -0500
Tidy up ORCONN reason patch from Mike Perry.  Changes: make some of the handling of TLS error codes less error prone.  Enforce house style wrt spaces.  Make it compile with --enable-gcc-warnings.  Only set or_conn->tls_error in the case of an actual error.  Add a changelog entry.


svn:r9355
2007-01-15 21:21:05 +00:00
Nick Mathewson
ead35ef944 r11957@Kushana: nickm | 2007-01-15 15:25:57 -0500
Patch from Mike Perry: Track reasons for OR connection failure; display them in control events. Needs review and revision.


svn:r9354
2007-01-15 21:13:37 +00:00
Nick Mathewson
bba5a3533f r11679@Kushana: nickm | 2006-12-23 21:38:41 -0500
Update the state file less often when AvoidDiskWrites is set.


svn:r9174
2006-12-24 02:45:46 +00:00
Nick Mathewson
31e09bb524 r11614@Kushana: nickm | 2006-12-15 17:39:42 -0500
Implement SETEVENTS GUARD.  Needs review and testing.


svn:r9137
2006-12-15 22:40:20 +00:00
Roger Dingledine
c44dd3870e clarify our use of local time vs GMT
svn:r9109
2006-12-14 23:39:14 +00:00
Roger Dingledine
97c83a4c09 finish enabling begin-dir cells. require one-hop circs for
socks-command-connect-dir streams, so we don't open new anonymity
questions.


svn:r9099
2006-12-13 02:49:45 +00:00
Roger Dingledine
e206d22297 some more cleanups and a bugfix on r9052
svn:r9062
2006-12-10 08:04:50 +00:00
Roger Dingledine
f7319a0b6d correction and cleanups on r9047
svn:r9060
2006-12-09 19:40:16 +00:00
Nick Mathewson
cf04e1e6e7 r11479@Kushana: nickm | 2006-12-07 23:38:54 -0500
Refactor GETINFO into a table-driven dispatch, as suggested by arma.  My brain hurts.


svn:r9052
2006-12-08 04:39:13 +00:00
Nick Mathewson
7c79495137 r11468@Kushana: nickm | 2006-12-07 14:56:57 -0500
Revise logic used to flush state to disk. Now, we try to batch non-urgent changes so that we do not do too many writes, and we save very-non-urgent changes every once in a rare while, and we never save more than once per second.


svn:r9047
2006-12-07 20:11:30 +00:00
Nick Mathewson
aef64c1277 r9577@Kushana: nickm | 2006-11-20 11:07:28 -0500
Oops; fix bug in last fix. Time to get some coffee.


svn:r8970
2006-11-20 16:07:33 +00:00
Nick Mathewson
a667f2e514 r9567@Kushana: nickm | 2006-11-20 11:05:59 -0500
Fix leak in choose_good_exit_server_general()


svn:r8969
2006-11-20 16:06:09 +00:00
Roger Dingledine
77c8c0ee51 spec and implement some more status events. start to build
some conventions.


svn:r8805
2006-10-23 10:16:43 +00:00
Roger Dingledine
2a1c294717 implement a few status events, so we can make sure they work,
and so vidalia can start handling them if it wants.


svn:r8802
2006-10-23 05:51:46 +00:00
Nick Mathewson
b713b370bf r9060@totoro: nickm | 2006-10-17 11:12:48 -0400
Apply patch from Mike Perry: add more reasons for circuit destroys. (Slightly tweaked to avoid allocating a number for an "internal" reason.)


svn:r8739
2006-10-17 15:20:00 +00:00
Nick Mathewson
eca28f24f5 r9004@totoro: nickm | 2006-10-11 18:05:24 -0400
Add client support for a 'BadExit' flag, so authorities can say "Server X is a poor choise for your nytimes.com connections, as it seems to direct them to HoorayForMao.com or (more likely) WouldYouLikeToBuyTheseFineEncyclopedias.com"
 


svn:r8690
2006-10-11 22:06:01 +00:00
Roger Dingledine
655859f76b When reporting verbose nicknames in entry_guards_getinfo(), avoid
printing a duplicate "$" in the keys we send. (Reported by mwenge)


svn:r8681
2006-10-09 21:26:34 +00:00
Nick Mathewson
26283e69ba r8973@totoro: nickm | 2006-10-09 11:45:47 -0400
Touch up last patch (to add REASON to CIRC events): make some reasons
 more sensible, send reasons only to controllers that have enabled
 extended events, and clean up whitespace.
 
 


svn:r8672
2006-10-09 15:47:50 +00:00
Nick Mathewson
b76fd968b4 r8972@totoro: nickm | 2006-10-09 10:36:22 -0400
Patch from Mike Perry: add a REASON field to closed and failed circ events.


svn:r8671
2006-10-09 15:47:27 +00:00
Roger Dingledine
604b13c910 remove some old debugging code
svn:r8657
2006-10-08 23:20:43 +00:00
Nick Mathewson
ea00437f74 r8933@totoro: nickm | 2006-10-07 20:33:16 -0400
whitespace fixes; add changelog for last commit.


svn:r8644
2006-10-08 00:33:43 +00:00
Nick Mathewson
e230fe8ea6 r8926@totoro: nickm | 2006-10-07 15:56:14 -0400
refactor circuit_list_path and circuit_list_path_verbose into a common _impl function.


svn:r8642
2006-10-07 19:56:49 +00:00
Roger Dingledine
9fb98b269c finish poking and prodding. i'm all happy now.
svn:r8633
2006-10-07 09:13:30 +00:00
Roger Dingledine
f2bd0e2f16 more minor cleanups
svn:r8630
2006-10-07 06:28:50 +00:00
Roger Dingledine
4f3827f1d1 resolve the entryguard uptime/capacity question. and mark a
new xxx that we'll want to address one day.


svn:r8628
2006-10-07 02:55:44 +00:00
Roger Dingledine
06e5b2283c minor cleanups
svn:r8622
2006-10-07 00:50:39 +00:00
Roger Dingledine
1cf37f90c4 bugfix and cleanups re: entry guards.
svn:r8620
2006-10-06 23:37:07 +00:00
Nick Mathewson
50320ac420 r8862@totoro: nickm | 2006-10-03 14:54:14 -0400
Make verbose names get used (when appropriate and selected) in responses to getinfo requests.


svn:r8593
2006-10-03 19:00:18 +00:00
Nick Mathewson
6e0b90a902 r8838@totoro: nickm | 2006-10-02 15:24:39 -0400
Partial implementation of revised nickname syntax for controllers.  Implement ability to look up routers by "verbose" nicknames; add a per-v1-control-connection flag to turn the feature on in events.  Needs testing, spec, ability to actually turn on the flag, double-checking that we wont overflow any nickname buffers, and changelog.


svn:r8582
2006-10-03 18:58:40 +00:00
Roger Dingledine
246fecb585 the other half of the is_local_IP patch
svn:r8581
2006-10-03 05:45:58 +00:00
Nick Mathewson
4c56ac93ca r8851@totoro: nickm | 2006-10-02 18:13:27 -0400
Remove/clarify some XXXs for no longer being accurate; for begin things we do not indend to fix; for already being parts of big todo issues (like "/* XXX ipv6 */"); etc. Also fix some spaces.


svn:r8580
2006-10-02 22:13:42 +00:00
Nick Mathewson
57ffca883d r8826@totoro: nickm | 2006-10-01 17:58:45 -0400
Disprefer exit nodes for entry, middle positions (fixes bug 200).  Also, switch to using a uint64_t to hold "total bandwidth for all nodes" under consideration; crypt_rand_int would have died at 2GB/s network capacity.


svn:r8571
2006-10-01 21:59:09 +00:00
Nick Mathewson
ce72a9914e r8822@totoro: nickm | 2006-10-01 16:24:22 -0400
Fix bug 303: reject attempts to use Tor as a one-hop proxy.


svn:r8566
2006-10-01 20:50:11 +00:00
Nick Mathewson
723ff1c93d r8800@totoro: nickm | 2006-09-29 23:10:49 -0400
Resolve bug 336: When displaying circuit paths with non-named routers, use their digests, not their nicknames.


svn:r8548
2006-09-30 03:11:13 +00:00
Nick Mathewson
1a444e089a r8976@Kushana: nickm | 2006-09-28 17:18:57 -0400
Another tweak to guard logic: ignore check for the Guard flag if a server is listed on EntryNodes.  (Also remove redundant checks for always-set variables.)


svn:r8522
2006-09-28 23:57:56 +00:00
Nick Mathewson
d174cccd0b r8975@Kushana: nickm | 2006-09-28 17:13:53 -0400
Document entry-guard related functions


svn:r8521
2006-09-28 23:57:52 +00:00
Nick Mathewson
d3a06684bc r8974@Kushana: nickm | 2006-09-28 17:05:59 -0400
Improvement to last entry guards patch: track when we last attempted to connect to a node in our state file along with how long it has been unreachable.  Also clarify behavior of parse_iso_time() when it gets extra characters.


svn:r8520
2006-09-28 23:57:49 +00:00
Nick Mathewson
9988112c87 r8973@Kushana: nickm | 2006-09-28 16:53:19 -0400
Refactor entry guard status logic a lot; allow more factors [like not
 having a Guard flag or being listed in ExcludeNodes] to render a guard
 "unlisted" (now called "unusable"); track guard down status (now
 called "unreachable") separately from is_running.


svn:r8519
2006-09-28 23:57:44 +00:00
Roger Dingledine
c22dc94fe6 make my bandwidth exercises actually happen
svn:r8400
2006-09-15 05:53:00 +00:00
Nick Mathewson
09a895e222 r7324@Kushana: nickm | 2006-08-10 23:23:15 -0700
Add more warnings to the list of those we tolerate. Start using GCC attributes more, for better error checking and better code generation.


svn:r7020
2006-08-11 07:09:17 +00:00
Roger Dingledine
2bcb081cb1 defense in depth
svn:r6939
2006-07-30 04:32:58 +00:00
Nick Mathewson
ec82db6995 r6909@Kushana: nickm | 2006-07-26 13:05:58 -0400
Clean up wide lines from last patch.


svn:r6907
2006-07-26 19:07:37 +00:00
Nick Mathewson
4ff4577beb r6908@Kushana: nickm | 2006-07-26 12:38:52 -0400
Refactor connection_t into edge, or, dir, control, and base subtypes.  This might save some RAM on busy exit servers, but really matters most in terms of correctness.


svn:r6906
2006-07-26 19:07:26 +00:00
Nick Mathewson
7239262f71 Don't tell anybody, but we're going OO here. This patch splits
circuit_t into origin_circuit_t and or_circuit_t.  I fixed some
segaults; there may be more.  We still need to move more rendezvous
stuff into subtypes.

This is a trial run for splitting up connection_t; if the approach is
insane, please say so soon so we can do something smarter.

Also, this discards the old HALF_OPEN code, which nobody seems to
want.


svn:r6817
2006-07-23 07:37:35 +00:00
Roger Dingledine
9283ddb760 an entry guard that is "unlisted", as well as not known to be "down", is
not therefore "up".


svn:r6798
2006-07-21 07:06:18 +00:00
Roger Dingledine
237c7ecbfd tweak
svn:r6796
2006-07-20 23:45:26 +00:00
Roger Dingledine
42e2057d67 fix some more places where we shouldn't crash if we can't build
our own descriptor yet.


svn:r6775
2006-07-17 06:54:28 +00:00
Roger Dingledine
0ec293b189 actually, that excludenodes fix was redundant. take it out.
svn:r6727
2006-07-05 18:19:42 +00:00
Roger Dingledine
98c6bf6192 oops, we were ignoring options->ExcludeNodes when picking entry guards.
it is still the case that we ignore it with respect to entry guards
that we've already picked.


svn:r6726
2006-07-04 20:25:17 +00:00
Roger Dingledine
dc79dd6a46 minor fixes
svn:r6709
2006-07-04 03:19:59 +00:00
Roger Dingledine
d45757ebcb also remove word 'middleman' from a log notice
svn:r6704
2006-06-29 13:11:23 +00:00
Roger Dingledine
37c441d96f correct a function comment in compute_preferred_testing_list()
svn:r6660
2006-06-18 21:07:45 +00:00
Roger Dingledine
4e4cc9aa27 lower the number of seconds before we yell about clock jump.
and make the yelling only happen if you're a server.


svn:r6625
2006-06-15 09:03:15 +00:00
Roger Dingledine
de7a9c83d8 upgrade the severity of the 'clock jump' warn, and ask people
to report if it occurs.


svn:r6623
2006-06-14 22:28:16 +00:00
Roger Dingledine
09dfe1b265 bugfix: discourage picking directory authorities as our TestVia
hops, even if they're running the right versions, since we probably
already have a connection established to them.


svn:r6622
2006-06-14 11:06:43 +00:00
Roger Dingledine
977574e48d back off and add the $ at the beginning of the preferrednodes list
we generate.


svn:r6620
2006-06-13 12:57:19 +00:00