Commit Graph

325 Commits

Author SHA1 Message Date
Roger Dingledine
cf6ba3e76f let an authdir that's not a naming authdir start even
if it doesn't have an approved-routers file. if it does,
read it and parse it as usual.


svn:r6182
2006-03-18 00:22:23 +00:00
Roger Dingledine
7d141c6776 but i made the line too long
svn:r6176
2006-03-17 19:25:36 +00:00
Roger Dingledine
f1bcc2d6f8 stop tricking server operators into thinking they got their
torrc perfect, just because tor could build a circuit.


svn:r6175
2006-03-17 19:20:07 +00:00
Roger Dingledine
8d1f65a222 quiet another entry guard log message
svn:r6169
2006-03-15 22:48:48 +00:00
Peter Palfrader
a4ec555228 change INET_NTOA_BUF_LEN+1 to INET_NTOA_BUF_LEN
add a comment in a few places where we add weird numbers to buffer lengths


svn:r6161
2006-03-14 23:40:37 +00:00
Roger Dingledine
86a72f73b9 make entry guard logs even quieter
svn:r6116
2006-03-10 16:51:26 +00:00
Roger Dingledine
82d1fdbaea don't abandon entry guards until they've been dead a whole month.
make entry guard log messages quieter.


svn:r6106
2006-03-09 00:55:55 +00:00
Roger Dingledine
2bfd2a2400 clean up a log message
svn:r6074
2006-02-21 17:54:56 +00:00
Peter Palfrader
5eea6c76df Split ReachableAddresses into ReachableDirAddresses and ReachableORAddresses
svn:r6009
2006-02-13 21:17:20 +00:00
Roger Dingledine
36484f873a convert some more source files to the new log convention
svn:r6002
2006-02-13 08:28:42 +00:00
Roger Dingledine
3c4e68488b Clients now honor the "guard" flag in the router status when
picking entry guards, rather than looking at is_fast or is_stable.

Now dirservers can change how they define it and clients will
automatically use their new definition.


svn:r5979
2006-02-12 03:43:39 +00:00
Roger Dingledine
5f051574d5 Happy new year!
svn:r5949
2006-02-09 05:46:49 +00:00
Roger Dingledine
1c596156aa tweak comment
svn:r5930
2006-02-09 00:08:23 +00:00
Roger Dingledine
bdba6e42dc avoid a minor confusing log message
svn:r5887
2006-02-01 03:05:52 +00:00
Roger Dingledine
8fc44169e5 only start testing reachability once we've established a circuit.
this will make startup on dirservers less noisy.
it may also break things in subtle ways.


svn:r5878
2006-01-29 01:11:41 +00:00
Roger Dingledine
cca9a2f7b0 oh, and the other bits of the commit
svn:r5836
2006-01-17 04:03:23 +00:00
Roger Dingledine
5ca40affeb we were leaking a smartlist every time we built a circuit
svn:r5795
2006-01-11 04:14:10 +00:00
Nick Mathewson
8907391ad6 Fix wide lines
svn:r5793
2006-01-11 04:04:42 +00:00
Roger Dingledine
284fe9cad5 if we learn that a down entry guard is up, count our working entry
guards correctly when logging.


svn:r5791
2006-01-11 03:58:59 +00:00
Roger Dingledine
7d1f675c85 entry nodes are now entry guards.
this is our last easy chance for a wholesale change. heave ho.


svn:r5782
2006-01-10 22:42:44 +00:00
Roger Dingledine
210d9db54d and even more so
svn:r5776
2006-01-10 21:01:30 +00:00
Roger Dingledine
aea0a78254 make entry node logging slightly less chatty.
still quite chatty. it's an alpha, that's ok.


svn:r5775
2006-01-10 20:59:39 +00:00
Roger Dingledine
9796733e89 "Pending" is a bad term for a circuit that uses your server as its last hop.
svn:r5751
2006-01-07 02:31:14 +00:00
Roger Dingledine
f88fa3efc1 helper nodes are dead
svn:r5743
2006-01-07 00:41:50 +00:00
Nick Mathewson
878962bee1 Add reasons to DESTROY and RELAY_TRUNCATED cells.
svn:r5734
2006-01-05 21:23:03 +00:00
Roger Dingledine
1d474e14d7 strictentrynodes means we should clear the current entry_nodes list.
svn:r5703
2006-01-02 11:33:14 +00:00
Roger Dingledine
1a11b97b15 get rid of the special case for 'testing' circuits
svn:r5684
2005-12-31 06:37:34 +00:00
Roger Dingledine
5947388968 Finish implementing config's EntryNodes and StrictEntryNodes option.
The logging is way verbose for now.


svn:r5683
2005-12-31 06:32:57 +00:00
Roger Dingledine
dbd7b97eff helper nodes are dead. long live entry nodes.
(config options EntryNodes and StrictEntryNodes still not
implemented.)


svn:r5673
2005-12-28 09:07:31 +00:00
Roger Dingledine
5d9256a367 but only close the new conn if one of the earlier helper nodes
that we mark up is actually reachable, fast enough, etc to use.


svn:r5672
2005-12-28 07:27:41 +00:00
Roger Dingledine
c1145138ea but only close it if we have marked an earlier helper as up.
that way we don't close it too needlessly.


svn:r5671
2005-12-28 07:20:33 +00:00
Roger Dingledine
60cd03069a when we connect to a helper node for the first time, close
that connection and its circuits. this lets us go back to
using the old helper nodes rather than immediately using
the last one in the list.


svn:r5670
2005-12-28 07:19:55 +00:00
Roger Dingledine
f46c135fac when we succeed at connecting to a helper that we've never connected
to before, mark all the previous helpers as up. This is handy if the
network went away and then returned.


svn:r5666
2005-12-27 08:54:37 +00:00
Roger Dingledine
25fcb5fa9c helpful log
svn:r5665
2005-12-27 08:38:22 +00:00
Roger Dingledine
976bf06463 slightly more accurate log messages
svn:r5664
2005-12-27 07:37:21 +00:00
Roger Dingledine
25052c6f4b first cut of the new helper stuff. seems to work in the normal
case, but many edge cases still need testing.


svn:r5663
2005-12-27 07:23:52 +00:00
Nick Mathewson
d94b9fd7d2 normalize spaces
svn:r5658
2005-12-27 04:52:34 +00:00
Roger Dingledine
815df977cf comments? i'll show you comments.
svn:r5652
2005-12-26 05:52:44 +00:00
Roger Dingledine
40c267a89f prevent a rare infinite loop on two-byte architectures,
and be more thorough and starting over when the clock jumps.


svn:r5647
2005-12-25 04:37:33 +00:00
Roger Dingledine
7e0d62b14a stop being sneaky, especially if we're being incorrectly sneaky
svn:r5646
2005-12-24 23:39:20 +00:00
Roger Dingledine
b0144276db more comments, and start to use the made_contact entry.
svn:r5645
2005-12-24 23:32:35 +00:00
Roger Dingledine
35986a2374 simplify because we weren't using those return values anyway
svn:r5643
2005-12-24 22:48:12 +00:00
Roger Dingledine
3a2ce447b4 start to document the helper node functions
svn:r5642
2005-12-24 20:07:19 +00:00
Roger Dingledine
7cd46d7f95 fix a seg fault when you finish connecting to a server but
at that moment you dump his server descriptor, and you also
happen to be logging at loglevel info.
(found by weasel)


svn:r5615
2005-12-18 22:59:47 +00:00
Nick Mathewson
1af630d32c Bite the bullet and limit all our source lines to 80 characters, the way IBM intended.
svn:r5582
2005-12-14 20:40:40 +00:00
Roger Dingledine
d853c9a009 bugfix: when we removed a dead helper node, we never committed that
change to disk.


svn:r5576
2005-12-13 02:52:38 +00:00
Roger Dingledine
bf4da967c1 Don't use helper nodes for circuits with purpose 'testing'.
Also, when picking the helper node for a given circuit,
exclude the circuit's exit from your choices.


svn:r5569
2005-12-11 12:14:26 +00:00
Roger Dingledine
a131783c8b when removing dead helpers, only write or_state to disk once at the
end, not for every helper you remove.


svn:r5568
2005-12-11 11:56:17 +00:00
Roger Dingledine
9c01fa3d59 fix yet another time comparison bug. we were abandoning helpers
as soon as they became unavailable. (is this true?)


svn:r5565
2005-12-11 11:23:36 +00:00
Roger Dingledine
f3349d6ed3 fix an error in reporting why we abandoned a helper node
svn:r5564
2005-12-11 11:20:26 +00:00
Roger Dingledine
b974f67c01 choose helper nodes to have high capacity always
svn:r5563
2005-12-11 11:20:01 +00:00
Roger Dingledine
defa3804cf explain why 0.1.1.9-alpha-cvs is a special version.
svn:r5552
2005-12-10 21:07:21 +00:00
Roger Dingledine
58366ffd24 when we changed from log_fn to debug/info/notice/warn/err,
we screwed up the formatting in wild and unpredictable ways.

fix it before it becomes convention to format logs in wild and
unpredictable ways.

still need to do src/common/ someday.


svn:r5551
2005-12-10 09:36:26 +00:00
Roger Dingledine
9b0a40ec78 crank the max line limit down to 150 chars.
svn:r5550
2005-12-10 08:27:01 +00:00
Roger Dingledine
8730190914 when we're checking reachability, make it clearer in the logs
what to expect.


svn:r5538
2005-12-08 21:12:47 +00:00
Roger Dingledine
d3dcea08af remove a redundant memcpy when extending to a new server
and attaching circuits to it.


svn:r5537
2005-12-08 20:33:57 +00:00
Nick Mathewson
e9b66ec906 Document CREATE_FAST better in the code. Move our key expansion algorithm into a separate function in crypto.c
svn:r5530
2005-12-08 17:38:32 +00:00
Nick Mathewson
f031ee8246 Make clients use CREATE_FAST cells. add an option to disable this.
svn:r5524
2005-12-07 22:09:02 +00:00
Roger Dingledine
4902ece698 what the heck is wrong with this little piece of code?
why can none of us get it right?
it looks so simple.


svn:r5521
2005-12-07 04:43:39 +00:00
Nick Mathewson
1b0134dda8 Clean up some comments; remove some dead code
svn:r5493
2005-12-03 16:32:29 +00:00
Nick Mathewson
148a1e969d Shave off another 4.7%: remove a linear search when figuring out which circuits wanted us to open a given OR connection.
svn:r5489
2005-12-03 02:12:37 +00:00
Nick Mathewson
3bd613b44d Rename connection_get_by_identity_digest to reflect that it is OR-only. Make it use a hashtable instead of a linear search.
svn:r5469
2005-11-30 03:01:16 +00:00
Roger Dingledine
2350e487a2 minor cleanup
svn:r5454
2005-11-24 06:44:13 +00:00
Roger Dingledine
ea7fe0c267 Fix a bug found by Lasse Overlier: when we were making internal circuits
(intended to be cannibalized later for rendezvous and introduction
circuits), we were picking them so that they had useful exit nodes. There
was no need for this, and it actually aids some statistical attacks.


svn:r5453
2005-11-24 06:43:39 +00:00
Roger Dingledine
5b583073a1 remove some more dead code (found while hunting lasse's bug)
svn:r5452
2005-11-24 06:06:50 +00:00
Roger Dingledine
7aae63994f Recover better from TCP connections to Tor servers that are broken but
don't tell you (it happens!); and rotate TLS connections once a week.

1) If an OR conn becomes more than a week old, make it obsolete.
2) If it's obsolete and empty, kill it.
3) When an OR makes a second connection to you, allow it.
4) If we want to send a new create cell, but the best conn we've
   got is obsolete, and the router is 0.1.1.9-alpha-cvs or later, ask
   for a new conn instead.
5) When we time out on circuit building on the first hop, make that
   connection obsolete.


svn:r5429
2005-11-19 06:57:44 +00:00
Roger Dingledine
f824fb5f83 Bugfix: it looks like some middleman circuits were spending the
first few moments of their existence in CIRCUIT_STATE_OPEN, then
when Alice sent an extend request for a Tor that they're not connected
to, they switched to CIRCUIT_STATE_OR_WAIT and spent the rest of
their sorry little lives in that state, even when the connection
was established and they were shuttling relay cells back and forth.

And I'm not going to backport this (yet), because somehow it worked!


svn:r5427
2005-11-19 01:55:58 +00:00
Nick Mathewson
75d85c8214 On directory servers, old_routers was wasting hundreds of bytes per superseded router descriptor. Roll the signed descriptor info and identifying info into a cache_info struct, and use only that for old_routers.
svn:r5349
2005-11-05 20:15:27 +00:00
Roger Dingledine
44b3f3060a make circ->onionskin a pointer, not a static array. moria2 was using
125000 circuit_t's after it had been up for a few weeks, which translates
to 20+ megs of wasted space.


svn:r5333
2005-10-29 19:13:48 +00:00
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
26caf69555 Fix possible minor memory leak when parsing helpernode state
svn:r5305
2005-10-25 07:00:03 +00:00
Nick Mathewson
fa338d85db Fix one possible source of reuse-a-circuit-id bug; convert circuitbuild to new logging
svn:r5301
2005-10-24 19:37:45 +00:00
Nick Mathewson
3347c1741d Refactor routerlist access slightly: always use router_get_by_routerlist(); change its interface; add modifier functions to add/remove elements from the current routerlist (so we can add indices).
svn:r5276
2005-10-18 17:43:54 +00:00
Roger Dingledine
bec2271029 fix a few comments
svn:r5262
2005-10-17 08:41:58 +00:00
Peter Palfrader
7b15f77dd6 Make a few INFO log lines into DEBUG
svn:r5257
2005-10-17 02:13:36 +00:00
Roger Dingledine
ae92a91d96 more log uncluttering
svn:r5254
2005-10-17 01:29:28 +00:00
Nick Mathewson
905ef987e2 Make --hash-password not craash on exit.
svn:r5243
2005-10-12 19:08:48 +00:00
Nick Mathewson
61ea516885 Check for named servers when looking them up by nickname;
warn when we'recalling a non-named server by its nickname;
don't warn twice about the same name.

Fix a bug in routers_update_status_from_networkstatus that made nearly
all clients never update routerinfo_t.is_named.

Try to list MyFamily elements by key, not by nickname.

Only warn about names that we generated ourself, or got from the local
user.

On TLS handshake, only check the other router's nickname against its
expected nickname if is_named is set.


svn:r5185
2005-10-04 22:23:31 +00:00
Roger Dingledine
88c37f2d24 comment cleanups
svn:r5181
2005-10-04 06:53:59 +00:00
Nick Mathewson
9e54e2e293 free helper node status info on shutdown
svn:r5177
2005-09-30 21:38:57 +00:00
Nick Mathewson
5c53545d81 Add a bunch more warnings to out warning suite; resolve them; pack structs a little better.
svn:r5150
2005-09-29 22:59:17 +00:00
Nick Mathewson
d4e0af7822 Fix a bunch of log messages. Deprecate some routerlist fields; remove others, and status_set_at from routerinfo_t. Compress routerlist.c cleanup functions. Update cached networkstatus mtime when we download the same one twice. Change some interfaces.
svn:r5068
2005-09-14 23:42:06 +00:00
Nick Mathewson
922cee3d0c Clean up a few warnings that make gcc twig out a bit.
svn:r5062
2005-09-14 20:59:25 +00:00
Roger Dingledine
26cc51ffea a bit more code cleanup
svn:r5033
2005-09-13 21:24:51 +00:00
Roger Dingledine
1d9786a392 generalize route length to three plus one if the exit node is risky.
svn:r4978
2005-09-10 01:01:40 +00:00
Roger Dingledine
69da0ef757 add punctuation
svn:r4924
2005-09-08 06:49:02 +00:00
Nick Mathewson
e863771485 Log when falling back to nonfast/nonstabl routers
svn:r4869
2005-08-26 22:16:32 +00:00
Roger Dingledine
6577e08e38 when we're trying to build a circuit and we're being picky about what
sort we get but there aren't any suitable servers, try being less picky
rather than simply failing.


svn:r4867
2005-08-26 22:10:22 +00:00
Roger Dingledine
23ed3c9786 whoops, avoid printing a null string sometimes
svn:r4815
2005-08-22 22:58:38 +00:00
Roger Dingledine
435d2d8fde when we begin reachability testing, log the address:port for each
port we're testing, so people are more likely to notice that they're
using the wrong ip address.


svn:r4808
2005-08-22 05:46:02 +00:00
Roger Dingledine
f57d062d9c Implement exit enclaves: if we know an IP address for the destination,
and there's a running Tor server at that address which allows exit to
the destination, then extend the circuit to that exit first.
Also, if the user asks for a .exit node, cannibalize general circs for it.


svn:r4779
2005-08-15 03:25:40 +00:00
Nick Mathewson
789374dbbd Make GCC very happy, even with lots of warnings set. Also, try to fix some reported Solaris x86 warnings.
svn:r4770
2005-08-12 17:24:53 +00:00
Nick Mathewson
249b72f53e Replace (Fascist)Firewall* with a new ReachableAddresses option that understands address policies.
svn:r4751
2005-08-08 21:58:48 +00:00
Nick Mathewson
01d0788950 Generalize FirewallPorts to FirewallIPs so I can run happily when locked in net 18.
svn:r4737
2005-08-07 21:24:00 +00:00
Nick Mathewson
4cb89fd557 Implement some more GETINFO goodness: expose helper nodes, config options, getinfo keys.
svn:r4694
2005-08-04 19:56:41 +00:00
Nick Mathewson
d90841ff5a Fix bug in state parsing
svn:r4681
2005-07-28 19:08:51 +00:00
Nick Mathewson
299af3d393 Possibly broken implementation of persistant state; handles helper nodes; does not handle accounting info yet.
svn:r4680
2005-07-28 19:01:48 +00:00
Roger Dingledine
9385a96235 fix typos
svn:r4645
2005-07-23 04:35:58 +00:00
Nick Mathewson
bb4ebaac6f document code for hibernation
svn:r4644
2005-07-23 04:12:35 +00:00
Nick Mathewson
18c11eb3bc Be consistent about preferring foo* to struct foo*
svn:r4637
2005-07-22 21:12:10 +00:00
Nick Mathewson
c3a62c1739 Initial, somewhat dodgy implementation of helper nodes. It has too many XXXXs, it logs too verbosely, and it doesnt do persistence.
svn:r4633
2005-07-22 17:32:25 +00:00
Roger Dingledine
11bd4bc521 in circuit_list_path(), don't redundantly print the intended exit
nickname when the circuit is open.


svn:r4622
2005-07-20 20:33:13 +00:00
Roger Dingledine
e479cc935e stop asserting if we have a controller listening for circuit events
and we're offline so we fail to make a circuit and it tries to notify
us about the zero-length circuit.


svn:r4600
2005-07-18 23:18:00 +00:00
Roger Dingledine
2259032ea1 trivial changes on nick's rendezvous commit
svn:r4553
2005-07-14 08:43:19 +00:00
Nick Mathewson
ec83652357 Logic to implement rendezvous/introduction via unknown servers.
- Add a new extend_info_t datatype to hold information needed to
  extend a circuit (addr,port,keyid,onion_key).  Use it in cpath and
  build_state.  Make appropriate functions take or return it instead of
  routerinfo_t or keyid.

- #if 0 needless check in circuit_get_by_edge_conn; if nobody triggers this
  error in 0.1.0.10, nobody will trigger it.

- Implement new hidden service descriptor format, which contains "extend
  info" for introduction points, along with protocol version list.
  - Parse new format.
  - Generate new format
  - Cache old and new formats alongside each other.
  - Directories serve "old" format if asked in old way, "newest available"
    format if asked in new way.
  - Use new format to find introduction points if possible; otherwise fall
    back.  Keep nickname lists and extendinfo lists in sync.
  - Tests for new format.

- Implement new "v2" INTRODUCE cell format.
  - Accept new format
  - Use new format if we have a versioned service descriptor that says the
    server accepts the new format.

- Add documentation for functions and data types.


svn:r4506
2005-06-29 21:46:55 +00:00
Nick Mathewson
d4972bd2e1 Remove code that has been #if-0ed for a long time.
svn:r4435
2005-06-15 18:34:46 +00:00
Roger Dingledine
91b1fb7ff7 some more cleaning and docing
svn:r4415
2005-06-11 21:17:38 +00:00
Nick Mathewson
232861ba42 Docment or add DOCDOC comments to undocumented functions in src/or. Make function definition format uniform.
svn:r4411
2005-06-11 18:52:12 +00:00
Nick Mathewson
0831823763 Change end-of-file NLNL convention. It turns out arma I and I agree.
svn:r4382
2005-06-09 19:03:31 +00:00
Nick Mathewson
a6f51001a5 New whitespace normalization rule: no blank line at EOF.
svn:r4378
2005-06-09 16:46:51 +00:00
Roger Dingledine
9abef5e483 allow the middle hop of the testing circuit to be running
any version, now that most of them have the bugfix to let
them connect to unknown servers.


svn:r4263
2005-05-17 19:46:43 +00:00
Roger Dingledine
28195a0eb1 clean up some log entries
svn:r4228
2005-05-15 05:00:24 +00:00
Nick Mathewson
10b2208d93 Make Tor compile with no warnings with gcc4.0 on OSX
svn:r4184
2005-05-07 05:55:06 +00:00
Roger Dingledine
5265bbd2b8 first iteration of scrubbing sensitive strings from logs.
also generally clean up log messages.


svn:r4174
2005-05-03 10:04:08 +00:00
Nick Mathewson
830ac87611 Actually, dont send CREATE_FAST cells at all for now
svn:r4163
2005-05-02 22:39:59 +00:00
Nick Mathewson
ab34901263 New and frightening code to implement fast-path first-hop CREATE_FAST cells. Watch out when we bump the version to 0.1.0.6-rc!
svn:r4162
2005-05-02 22:35:18 +00:00
Roger Dingledine
509405a5f7 clean up this TOR_FRAGILE business
svn:r4116
2005-04-26 18:52:16 +00:00
Roger Dingledine
f3ea883ccd bugfix: stop trying to print a null pointer if an OR conn fails
because we didn't like its cert.


svn:r4111
2005-04-25 15:43:37 +00:00
Nick Mathewson
8cc3307e0d Improve conn_*_to_string; add circuit_state_to_string; make skewed-descriptor messages better.
svn:r4047
2005-04-07 21:07:19 +00:00
Nick Mathewson
2a0b1025e5 Fix bug in last commit when no circid can be found
svn:r4023
2005-04-06 05:45:07 +00:00
Nick Mathewson
b7cdcf3462 Hopefully, this will make ORs much faster, and not break them: keep a big splay tree of (circid,orconn)->circuit mappings to make circuit_get_by_circid_conn much faster.
svn:r4020
2005-04-06 05:33:32 +00:00
Nick Mathewson
055ee7c323 Give better warnings if connection_close_unattached_ap gets called twice or called on a marked connection; rename it to connection_mark_unattached_ap.
svn:r3990
2005-04-02 22:11:24 +00:00
Nick Mathewson
0e81265359 update copyright notices.
svn:r3982
2005-04-01 20:15:56 +00:00
Roger Dingledine
1ff62dbd18 require exactly 0.0.9.7 for middle hops of testing circs, for now
svn:r3967
2005-04-01 09:23:51 +00:00
Roger Dingledine
e786e5dedb when building testing circuits, always use middle hops
running at least 0.0.9.7


svn:r3966
2005-04-01 08:42:26 +00:00
Roger Dingledine
2ff2db8d2a fix some log spacing problems
svn:r3942
2005-04-01 06:23:21 +00:00
Roger Dingledine
1f5c8335e8 still publish your descriptor if orport is reachable but dirport isn't
when building testing circs for orport testing, require high-bandwidth
nodes, so fewer circs fail. complain about unreachable orport separately
from unreachable dirport.


svn:r3935
2005-03-31 19:26:33 +00:00
Roger Dingledine
4f5192b280 ...and use it to make sure we only conclude reachability if
we didn't initiate the conn.


svn:r3932
2005-03-31 07:46:59 +00:00
Roger Dingledine
b8fe866a9d forward-port the fixing of the crash bug.
svn:r3900
2005-03-27 07:18:30 +00:00
Roger Dingledine
36baf7219d stop most cases of hanging up on a socks connection without sending
the socks reject. audit for remaining ones. also make things more
uniform so we always remember to hold-open-until-flushed, etc.


svn:r3891
2005-03-27 04:55:13 +00:00
Roger Dingledine
b8d38dc57b try harder to establish reachability, in the first 20 minutes
of uptime.


svn:r3884
2005-03-26 05:54:50 +00:00
Roger Dingledine
1328383482 make it clearer to the human that his server is testing
its reachability. tell him when it succeeds, or when 20
minutes pass and it hasn't succeeded yet.


svn:r3882
2005-03-26 01:43:39 +00:00
Nick Mathewson
631ab5c69b Add a magic value to cpath_layer_t to make sure that we can tell valid cpaths from freed ones. I audited this once; it could use another audit.
svn:r3831
2005-03-23 06:21:48 +00:00
Roger Dingledine
ad5f5ddf7e remove a duplicate circuit_mark_for_close() when picking
a path for the circuit fails.


svn:r3822
2005-03-22 23:20:33 +00:00
Roger Dingledine
f1ba4296c1 clean up and refactor some more
svn:r3798
2005-03-22 01:01:15 +00:00
Roger Dingledine
35953edae0 Implement controller's "extendcircuit" directive.
Also refactor circuit building so we plan the whole path ahead
of time.


svn:r3797
2005-03-22 00:42:38 +00:00
Roger Dingledine
4a497e5030 if our clock jumps forward by 100 seconds or more, assume something
has gone wrong with our network and abandon all not-yet-used circs.


svn:r3792
2005-03-19 23:58:42 +00:00
Roger Dingledine
856ab90ca8 stop logging at -l notice every single time a create cell successfully
gets processed


svn:r3791
2005-03-19 23:04:15 +00:00
Nick Mathewson
b88c4ba11c Turn addr_policy_compare from a tristate to a quadstate; this should help address our "Ah, you allow 1.2.3.4:80. You are a good choice for google.com" problem.
svn:r3786
2005-03-19 06:57:16 +00:00
Roger Dingledine
229761465c re-enable reachability testing stuff.
also, consider your ORPort reachable after you've processed a
create cell from any non-local address.


svn:r3763
2005-03-15 01:44:46 +00:00
Nick Mathewson
97dad670ea Renormalize whitespace
svn:r3757
2005-03-14 03:18:35 +00:00
Roger Dingledine
a1f1fa6ab2 Checkpoint in-progress fixes:
Add 'testing' circuit purpose, for reachability testing.
Notice when our IP changes, and reset stats.
Try to pull down a directory via Tor to see if our DirPort is working.
Try to extend a circuit back to us to see if our ORPort is working.
Only publish a descriptor if they're both reachable.

These mostly work, and I'd better get them in before I cause conflicts.


svn:r3703
2005-02-27 09:47:01 +00:00
Nick Mathewson
6e6d95b3db Change from inet_ntoa to a threadproof tor_inet_ntoa.
svn:r3656
2005-02-22 08:18:36 +00:00
Roger Dingledine
797419a62c remove unused code
svn:r3629
2005-02-16 02:06:54 +00:00
Roger Dingledine
2e97593d25 define TOR_FRAGILE if you want tor to give you a core when
something goes wrong. this should only be used by people actively
tracking bugs.


svn:r3487
2005-02-01 00:37:16 +00:00
Roger Dingledine
75d83827e0 fix another bug where general exit circs were looking at rendezvous
streams. consolidate the looking into one function so it doesn't
happen again.


svn:r3372
2005-01-19 17:59:37 +00:00
Roger Dingledine
ea24dc31bc remove some extra-verbose logs
svn:r3361
2005-01-17 18:49:13 +00:00
Roger Dingledine
d2400a5afd Introduce a notion of 'internal' circs, which are chosen without regard
to the exit policy of the last hop. Intro and rendezvous circs must
be internal circs, to avoid leaking information. Resolve and connect
streams can use internal circs if they want.

New circuit pooling algorithm: make sure to have enough circs around
to satisfy any predicted ports, and also make sure to have 2 internal
circs around if we've required internal circs lately (with high uptime
if we've seen that lately).

Split NewCircuitPeriod config option into NewCircuitPeriod (30 secs),
which describes how often we retry making new circuits if current ones
are dirty, and MaxCircuitDirtiness (10 mins), which describes how long
we're willing to make use of an already-dirty circuit.

Once rendezvous circuits are established, keep using the same circuit as
long as you attach a new stream to it at least every 10 minutes. (So web
browsing doesn't require you to build new rend circs every 30 seconds.)

Cannibalize GENERAL circs to be C_REND, C_INTRO, S_INTRO, and S_REND
circ as necessary, if there are any completed ones lying around when
we try to launch one.

Re-instate the ifdef's to use version-0 style introduce cells, since
there was yet another bug in handling version-1 style. We'll try switching
over again after 0.0.9 is obsolete.

Bugfix: when choosing an exit node for a new non-internal circ, don't take
into account whether it'll be useful for any pending x.onion addresses --
it won't.

Bugfix: we weren't actually publishing the hidden service descriptor when
it became dirty. So we only published it every 20 minutes or so, which
means when you first start your Tor, the hidden service will seem broken.


svn:r3360
2005-01-17 18:13:09 +00:00
Roger Dingledine
84c81e0783 Annotate circuits w/ whether they aim to contain high uptime nodes and/or
high capacity nodes. When building circuits, choose appropriate nodes.

New config option LongLivedPorts to indicate application streams
that will want high uptime circuits.

When attaching a stream to a circuit, pay attention to its requirements.

This means that every single node in an intro rend circuit, not just
the last one, will have a minimum uptime.

Boost the min uptime from an hour to 24 hours.


svn:r3339
2005-01-12 04:58:23 +00:00
Roger Dingledine
308ffa8a05 When listing circuits that are pending on an opening OR connection,
if we're an OR we were listing circuits that *end* at us as
being pending on every listener, dns/cpu worker, etc. Stop that.


svn:r3171
2004-12-17 23:17:00 +00:00