Roger Dingledine
0e26973c02
make calls to address_is_in_virtual_range more bullet-proof.
...
might fix the assert failure i just got.
svn:r3906
2005-03-28 01:56:12 +00:00
Roger Dingledine
7a79acd9f6
clean up socks reply stuff more.
...
add a few more reasons so we can be more informative.
svn:r3895
2005-03-27 06:37:56 +00:00
Nick Mathewson
ce854906db
Rename ManageConnections to LeaveStreamsUnattached. Apparently, there was a missing "TorShould" that was mistaken for an "IWantTo".
...
svn:r3894
2005-03-27 06:25:33 +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
4533a46e41
move the assert higher up so the error message makes more sense
...
next time.
svn:r3887
2005-03-26 06:27:51 +00:00
Nick Mathewson
8e8915f3ca
Fix SOCKS5 bug: Set replylen to 0 after sending hanshake back
...
svn:r3850
2005-03-24 01:11:28 +00:00
Nick Mathewson
b9016bd18f
Fix several bugs (including some crashes) related to control interface; implement missing desc/name functionality.
...
svn:r3836
2005-03-23 08:40:11 +00:00
Nick Mathewson
b7ce4d1d3d
Correct fix for self-to-self addressmap; simplify replace-old-entry logic; add missing case.
...
svn:r3829
2005-03-23 05:32:06 +00:00
Roger Dingledine
7373042a7b
fix assert triggers (bugs 109 and 96), and put in some
...
debugging logs to notice future repeat bugs.
svn:r3826
2005-03-23 02:52:55 +00:00
Roger Dingledine
a523439cbc
maybe resolve an assert trigger i just got:
...
connection_edge.c:643 address_is_in_virtual_range: Assertion addr failed; aborting.
nick, what do you think?
svn:r3825
2005-03-23 00:19:51 +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
963ddf2953
fix typo
...
svn:r3784
2005-03-19 05:09:13 +00:00
Nick Mathewson
df9c8feac7
Commit fixes for several pending tor core tasks: document all DOCDOCed functions; time out uncontrolled unattached streams; feed reasons to SOCKS5 (refactoring connection_ap_handshake_socks_reply in the process); change DirFetchPeriod/StatusFetchPeriod to have a special "Be smart" value.
...
svn:r3769
2005-03-17 12:38:37 +00:00
Nick Mathewson
97dad670ea
Renormalize whitespace
...
svn:r3757
2005-03-14 03:18:35 +00:00
Nick Mathewson
fd150459b3
Raise common code for "detach this stream and try it with a different circuit" into a separate function; make that function handle controller-managed streams right.
...
svn:r3756
2005-03-14 03:12:59 +00:00
Nick Mathewson
115271f65e
Implement the common case of ATTACHSTREAM.
...
svn:r3751
2005-03-12 04:22:01 +00:00
Nick Mathewson
2b7907ef42
Increment step of a for loop should only happen once.
...
svn:r3746
2005-03-11 21:42:32 +00:00
Nick Mathewson
777d3dde0c
Get address map resetting implemented.
...
svn:r3745
2005-03-11 21:39:39 +00:00
Nick Mathewson
c185825585
Finish implementing GETINFO; make it easy to query address maps.
...
svn:r3732
2005-03-03 06:37:54 +00:00
Nick Mathewson
f90ccf5648
Implement new controller events for changed descriptors and new (not-yet-attached) streams.
...
svn:r3731
2005-03-02 22:29:58 +00:00
Nick Mathewson
4b5e213a0b
Separate reverse-virtual-address-map entries into ipv4 and hostname slots. Otherwise if you ask me to map "some IPv4 address" to foo.onion, I might tell you that I already mapped "bar.virtual" to foo.onion
...
svn:r3730
2005-03-02 22:01:10 +00:00
Nick Mathewson
5f8e2c2bc4
Rename unused-address functions to virtual address; this is more accurate. Also, include almost-right implementation of reusing dont-care mappings. (It is still kind of wrong because it does not take type into account.)
...
svn:r3728
2005-03-02 21:02:11 +00:00
Nick Mathewson
65230fd39f
Implement "Dont-Care" from addresses to MapAddress control message. For safety, refuse to launch connections to unmapped addresses in the dont-care range.
...
svn:r3725
2005-03-02 19:26:46 +00:00
Nick Mathewson
e14f812a67
Still more code to make sure we send the right number and kind of RELAY END cells
...
svn:r3723
2005-03-02 03:13:05 +00:00
Nick Mathewson
afe414f070
Revise all calls to connection_edge_end to avoid sending MISC, and to take errno into account where possible.
...
svn:r3720
2005-03-01 22:42:31 +00:00
Nick Mathewson
4ddf768a4f
Forward-port new reasons; clean up code more; add code to convert new reasons to SOCKS5 reply codes; add code to convert errnos to reasons. New code still needs to get invoked.
...
svn:r3719
2005-03-01 22:16:15 +00:00
Roger Dingledine
5b24ca6cde
cache .exit address better (i think)
...
svn:r3684
2005-02-24 11:44:08 +00:00
Nick Mathewson
22c38b0f9b
Clarify comment. Use CONN_IS_EDGE more. Try to be more zealous about calling connection_edge_end when things go bad with edge conns in connection.c
...
svn:r3671
2005-02-23 20:35:26 +00:00
Nick Mathewson
69a36e352e
clarify comment
...
svn:r3667
2005-02-23 06:46:54 +00:00
Nick Mathewson
e0387d1322
Addressmap tweak: Make "addressmap x x" remove any mapping from the address x.
...
svn:r3666
2005-02-23 06:40:48 +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
8991af604c
make the addressmap internals less noisy
...
svn:r3643
2005-02-22 00:55:50 +00:00
Roger Dingledine
8727acf2f1
Add a new AddressMap directive to rewrite incoming socks addresses.
...
Add a new TrackHostExits directive to trigger addressmaps for
certain incoming socks addresses, for sites that break when your exit
keeps changing.
Redo the client-side dns cache so it's just an addressmap too.
svn:r3641
2005-02-22 00:53:08 +00:00
Roger Dingledine
cbb4803ec8
forward-port some fixes
...
svn:r3631
2005-02-17 01:12:50 +00:00
Nick Mathewson
0289144229
Fix another crash bug found by Jaroslaw--it is possible for dns_resolve to mark a connection to be freed, if the circuit it was attached to fails for some reason.
...
svn:r3623
2005-02-14 21:16:27 +00:00
Nick Mathewson
60f234f42b
Add more functions to free things to help dmalloc allong.
...
svn:r3613
2005-02-10 23:18:39 +00:00
Nick Mathewson
a64b03a4fd
Avoid double-free on tor-resolve failure
...
svn:r3567
2005-02-05 23:55:21 +00:00
Nick Mathewson
322c728e97
Fix tor-resolve implementation to prevent crashes and send resolves when we should.
...
svn:r3561
2005-02-05 21:03:24 +00:00
Roger Dingledine
56d4b99491
forward-port the logic skew and double-free thing
...
svn:r3549
2005-02-04 01:49:58 +00:00
Roger Dingledine
b90983e44f
reject odd-looking addresses at the client, rather than having
...
the server drop them because they're malformed.
svn:r3493
2005-02-01 12:19:44 +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
d232831135
stop a sigpipe.
...
apparently when we get an eof, at least sometimes it *does* mean
you'd better not try writing.
svn:r3481
2005-01-31 08:12:30 +00:00
Roger Dingledine
b2fbd834f0
forward-port the dns and maxconn fixes
...
svn:r3448
2005-01-28 08:53:47 +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
0aff4ff4cb
get rid of 0.0.8 backwards compatibility
...
svn:r3353
2005-01-13 20:22:38 +00:00
Nick Mathewson
324b192f68
Make Tor use Niels Provos's libevent instead of it's current
...
poll-but-sometimes-select mess. This will let us use faster async cores
(like epoll, kpoll, and /dev/poll), and hopefully work better on Windows
too.
There are some fairly nasty changes to main.c here; this will almost
certainly break something. But hey, that's what alphas are for.
svn:r3341
2005-01-12 06:42:32 +00:00
Roger Dingledine
3a572fcffa
don't connection_edge_end() on eof if we're already marked for close,
...
because if we are then it's because we already got an end.
svn:r3223
2004-12-24 09:43:57 +00:00
Roger Dingledine
011ad3cba5
clean up logging,
...
make it clearer which warns are bugs,
make the control log event match its specification,
point out a bug in how we deal with failure when renewing the tls context.
svn:r3138
2004-12-13 00:44:39 +00:00
Roger Dingledine
ca95ed74ac
resolve tequila's crash bug: you can't free something
...
and then keep using it.
svn:r3117
2004-12-07 21:57:37 +00:00
Roger Dingledine
012255fe60
fix the other half of the pipe race
...
svn:r3111
2004-12-07 16:37:32 +00:00