Commit Graph

406 Commits

Author SHA1 Message Date
Roger Dingledine
db657ea0af don't squeal if the first few retries fail.
svn:r6791
2006-07-18 04:48:59 +00:00
Roger Dingledine
892f671f59 Define a schedule for how long to wait between retrying
application connections. Rather than waiting a fixed amount of
time between each retry, we wait only 5 seconds for the first,
10 seconds for the second, and 15 seconds for each retry after
that. Hopefully this will improve the expected experience.

Addresses bug 297.


svn:r6790
2006-07-18 04:42:32 +00:00
Roger Dingledine
388ac4126a If we are using an exit enclave and we can't connect, e.g. because
its webserver is misconfigured to not listen on localhost, then back
off and try connecting from somewhere else before we fail.


svn:r6783
2006-07-18 00:59:46 +00:00
Roger Dingledine
3d79eb52ab stick to nick's nul/null convention
svn:r6763
2006-07-15 19:21:30 +00:00
Roger Dingledine
fad85f173a when an exit node gets a malformed begin cell, don't complain to
the node operator, since he can't do anything about it.


svn:r6733
2006-07-06 02:44:07 +00:00
Roger Dingledine
5c57348acd We got an obscure report of an assert error on a windows Tor server with
connection_add being called with socket = -1. The only places I can see
where that happen would be if our tor_socketpair succeeds but it hands
back negative values for some of its file descriptors. Perhaps this will
produce more useful assert errors next time.


svn:r6550
2006-06-06 00:06:52 +00:00
Nick Mathewson
2700e5a1ab Oops. When we dont get a TTL, we should default to the default, not to the minimum.
svn:r6527
2006-06-03 21:47:26 +00:00
Nick Mathewson
c660a0f6a2 More DNS fixes. Send meaningful TTLs back to the client when
possible.  Cache at the server side independently from the TTL, to
prevent attackers from probing the server to see who has been asking
for what hostnames.  (Hi, Dan Kaminski!)

Also, clean some whitespace.


svn:r6526
2006-06-03 21:41:14 +00:00
Roger Dingledine
6b058bd563 add a few more debugging lines to help mikec track down his
11 minute jump into the future.


svn:r6465
2006-05-23 03:08:30 +00:00
Roger Dingledine
5721747de2 class B really means /16 here
svn:r6404
2006-04-18 05:03:09 +00:00
Nick Mathewson
735a2131b8 require at least 2**16 assignable virtual addresses
svn:r6402
2006-04-18 04:57:07 +00:00
Nick Mathewson
7484ca06a5 [Forward-port ]Test and document last patch.
svn:r6400
2006-04-18 03:51:18 +00:00
Nick Mathewson
0df40a393b [forward-port] Implement an option, VirtualAddrMask, to set which addresses get handed out in response to mapaddress requests. Needs testing and docs!
svn:r6398
2006-04-18 03:36:28 +00:00
Roger Dingledine
21263982e4 Don't yell loudly about failed internal/bridge connections. These
are reachability testing and rendserv upload/downloads, and they
have their own failure messages elsewhere.


svn:r6343
2006-04-09 21:36:37 +00:00
Roger Dingledine
6f08d121d9 Refactor and consolidate addr/exit policies into a new policies.c.
Fix some minor bugs and memory leaks along the way.


svn:r6246
2006-03-27 02:25:34 +00:00
Roger Dingledine
28fafb9022 new config option SocksTimeout: How long do we let a socks connection
wait unattached before we fail it?

Use this value for controller socks timeout, for normal socks
timeout, and for hidden-service socks timeout.


svn:r6217
2006-03-21 23:27:43 +00:00
Roger Dingledine
d1d0813cf3 Allow non-printable characters for exit streams (both for
connecting and for resolving). Now we tolerate applications
that don't follow the RFCs. But continue to block malformed
names at the socks side.


svn:r6193
2006-03-19 03:55:48 +00:00
Roger Dingledine
726e825b09 i'm a little teapot, short and stout
svn:r6192
2006-03-19 01:59:02 +00:00
Roger Dingledine
7e2aa67fcb simplify when we're picking a default address for
when people ask for "serifos.exit".


svn:r6187
2006-03-18 22:54:08 +00:00
Nick Mathewson
0f0e14c6e3 normalize whitespace.
svn:r6173
2006-03-17 04:43:37 +00:00
Roger Dingledine
9a5df4cef5 resume being printist: if the hostname contains non-printable
characters, then fail. this time don't even bother telling the
server operator about these cases, because what's he going to do?

if it turns out that some significant population somewhere in the
world uses non-printable hostnames and wants to use tor, then i
hereby assume that they will contact us.


svn:r6171
2006-03-15 23:36:57 +00:00
Roger Dingledine
e8fd871d8b Stop being printist: just because our local platform doesn't
consider an alleged destination to be printable doesn't mean
nobody in the world will want to use it.


svn:r6167
2006-03-15 19:17:34 +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
a4da44c2b9 Now do address rewriting when the controller asks us to attach
to a particular circuit too. This will let Blossom specify
"moria2.exit" without having to learn what moria2's IP address is.

It may also cause other controller authors some angst. Let us know.


svn:r6136
2006-03-12 05:04:16 +00:00
Nick Mathewson
5777ee0e1a Add some functions to escape values from the network before sending them to the log. Use them everywhere except for routerinfo->plaftorm, routerinfo->contact_info, and rend*.c. (need sleep now)
svn:r6087
2006-03-05 09:50:26 +00:00
Roger Dingledine
d113b75da6 more log conversions.
whee.


svn:r6003
2006-02-13 09:02:35 +00:00
Roger Dingledine
5f051574d5 Happy new year!
svn:r5949
2006-02-09 05:46:49 +00:00
Roger Dingledine
0fadf0aad6 Fix bug 225: now "attachstream 0" treats conn like it just connected,
doing address remapping, handling .exit and .onion idioms, and so on.

Now we are more uniform in making sure that the controller hears about
all new connections, and making sure it hears when they close.


svn:r5897
2006-02-03 11:37:19 +00:00
Roger Dingledine
d682c84e79 attempted patch for bug 220: don't assert when we've tried all the
intro points for a hidden service and we try fetching the service
descriptor again.


svn:r5838
2006-01-17 04:16:59 +00:00
Nick Mathewson
878962bee1 Add reasons to DESTROY and RELAY_TRUNCATED cells.
svn:r5734
2006-01-05 21:23:03 +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
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
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
Roger Dingledine
b0ffa34219 tell the controller about new .onion streams too.
svn:r5520
2005-12-06 23:43:52 +00:00
Roger Dingledine
5c0338dca3 the other half of weasel's patch, so old gcc's can build cvs again.
svn:r5517
2005-12-06 21:03:48 +00:00
Peter Palfrader
0dbb622f26 Old gccs want you to do your variable declarations first
svn:r5516
2005-12-06 17:01:36 +00:00
Roger Dingledine
3347762fa4 when we're giving up on a circuit and retrying on a new one,
log the name of the exit node. perhaps people will find this
useful, or see patterns, or something.


svn:r5515
2005-12-06 07:21:17 +00:00
Nick Mathewson
835f06a77c Set chosen_exit_name to something we are not about to zero.
svn:r5507
2005-12-05 06:16:24 +00:00
Nick Mathewson
98290e4115 When parsing foo.exit, if foo is unknown, and we are leaving circuits unattached, set the chosen_exit field and leave the address empty
svn:r5504
2005-12-05 04:38:21 +00:00
Roger Dingledine
40cbe550f3 fix a log message to be mildly more helpful
svn:r5498
2005-12-04 23:06:48 +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
77a494dd55 Expunge remaining places where we used "tree" to mean "associative array".
svn:r5490
2005-12-03 02:21:31 +00:00
Nick Mathewson
d56a65c497 Fix some verbose warnings and remove an unneeded include.
svn:r5472
2005-11-30 06:38:41 +00:00
Nick Mathewson
a39269572f Replace balanced trees with hash tables: this should make stuff significantly faster.
svn:r5441
2005-11-23 04:18:45 +00:00
Roger Dingledine
c4aa9e7941 Add a new config option TestSocks so people can see if their
applications are using socks4, socks4a, socks5-with-ip, or
socks5-with-hostname. This way they don't have to keep mucking
with tcpdump and wondering if something got cached somewhere.


svn:r5399
2005-11-16 23:37:35 +00:00
Roger Dingledine
6fc30a65fd when a stream times out, provide less (but better) explanation
of what happened. don't bother printing the path, since i don't
know of any person who has gotten anything useful out of that.


svn:r5367
2005-11-14 04:13:43 +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
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
e7e170a59e Change more files to new loggin interface. 3 left.
svn:r5310
2005-10-25 08:20:10 +00:00
Nick Mathewson
f9b0be526e Use LD_BUG as appropriate; convert rend* and router* to new logging interface; use new circ_log_path interface
svn:r5302
2005-10-24 19:39:45 +00:00