Commit Graph

887 Commits

Author SHA1 Message Date
Roger Dingledine
769f9201a6 Send out a burst of long-range drop cells after we've established that
we're reachable. Spread them over 4 circuits, so hopefully a few will
be fast. This exercises our bandwidth and bootstraps us quicker.


svn:r8399
2006-09-15 05:30:25 +00:00
Peter Palfrader
ba091ae5d7 r9770@danube: weasel | 2006-09-15 07:20:05 +0200
router_set_networkstatus() gets a list of status documents we asked for from
 connection_dir_client_reached_eof().  However, as a cache we (sometimes?) just
 ask for "all".  router_set_networkstatus() would freak out over that, meaning
 it would log a warning and drop the status document instead of caching it
 as it is supposed to.  Now we let router_set_networkstatus() know if the
 data comes from an all-request so it can do the right thing.


svn:r8398
2006-09-15 05:20:16 +00:00
Nick Mathewson
4f888c9dfc r8808@senior-two-eighty: nickm | 2006-09-14 00:59:54 -0400
House style for no-args functions is old-style C, not C++


svn:r8388
2006-09-14 05:00:02 +00:00
Peter Palfrader
984e8f6efb r9736@danube: weasel | 2006-09-14 05:53:06 +0200
Refactor dirserv_parse_fingerprint_file(fname) into dirserv_load_fingerprint_file():
 There is not need to put together the path to the approved-routers file in more than one place.


svn:r8386
2006-09-14 04:53:23 +00:00
Roger Dingledine
29b6d6560e add a "getinfo address" controller command.
svn:r8354
2006-09-09 03:18:39 +00:00
Roger Dingledine
25cb9453d7 possibly make tor build and run on cygwin again.
svn:r8353
2006-09-08 20:48:43 +00:00
Peter Palfrader
fdd56dee69 r9695@danube: weasel | 2006-09-08 18:11:53 +0200
Make tor build with -O0


svn:r8352
2006-09-08 16:12:15 +00:00
Roger Dingledine
ae67a044f0 clean up some comments
svn:r8338
2006-09-07 01:23:15 +00:00
Roger Dingledine
5a8563baed new config option AvoidDiskWrites for people running tors on
usb keys and other media that degrades when you write.
not implemented yet, so just a reminder.


svn:r8331
2006-09-07 00:30:29 +00:00
Roger Dingledine
f75ef94f27 fix bug found by Adam J. Richter: directory clients shouldn't
hang up five minutes after they begin. but directory servers
should still hang up after 5 minutes of failing to deliver
any bytes.


svn:r8271
2006-08-28 18:51:36 +00:00
Nick Mathewson
54ca0387a5 r8608@Kushana: nickm | 2006-08-27 16:57:47 -0400
Make it possible to change nameserver options while Tor is running.


svn:r8255
2006-08-28 03:15:55 +00:00
Nick Mathewson
be7054c626 r8607@Kushana: nickm | 2006-08-27 15:45:42 -0400
Change configuration strategy for eventdns. Instead of elaborate option set, just allow the user to specify another resolv.conf to use.


svn:r8254
2006-08-28 03:15:50 +00:00
Nick Mathewson
fd36eb0788 r8576@Kushana: nickm | 2006-08-25 17:16:01 -0400
Fix bug 314: Instead of checking address_in_virtualrange, check addressmap_have_mapping().  This should be more accurate.  [Rename to addressmap_have_mapping() from addressmap_already_mapped().]


svn:r8226
2006-08-25 21:16:22 +00:00
Nick Mathewson
0f5bfc1521 r7411@Kushana: nickm | 2006-08-17 19:00:25 -0400
patch suggested by Karsten Loesing: respond to SIGNAL command before we execute the signal, in case the signal shuts us down.


svn:r7072
2006-08-17 23:00:32 +00:00
Nick Mathewson
200e24981a r7046@Kushana: nickm | 2006-08-05 13:57:04 -0400
Make it possible for dns_init() to fail; note failure of eventdns configuratoin.


svn:r7059
2006-08-14 21:44:34 +00:00
Nick Mathewson
6da96f0ed7 r7369@Kushana: nickm | 2006-08-14 02:03:10 -0400
Shortening fields is only one part of making structs shorter. You must also consider alignment padding. Whee.


svn:r7045
2006-08-14 06:03:26 +00:00
Roger Dingledine
2c27cfc38e save 3-7 bytes per edge connection
svn:r7044
2006-08-14 05:53:57 +00:00
Roger Dingledine
6fdc63aed2 simplify the connection_write_to_buf_zlib() wrapper.
svn:r7042
2006-08-13 23:38:30 +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
Nick Mathewson
d893d8c52e r7300@Kushana: nickm | 2006-08-10 01:36:40 -0700
Distinguish netfilter vs pf at configure time based on headers, not on OS.


svn:r7008
2006-08-10 09:01:46 +00:00
Nick Mathewson
5cff4164a0 r7299@Kushana: nickm | 2006-08-10 01:08:58 -0700
Patch from Tup to add support for transparent AP connections: this basically bundles the functionality of trans-proxy-tor into the tor mainline.  Now hosts with compliant pf/netfilter implementations can redirect TCP connections straight to Tor without diverting through SOCKS.


svn:r7007
2006-08-10 09:01:37 +00:00
Nick Mathewson
7c596c166b r7029@Kushana: nickm | 2006-08-04 14:08:41 -0700
Remove now-spurious size and data arguments from tor_mmap_file


svn:r6987
2006-08-05 17:53:21 +00:00
Nick Mathewson
714d1b66aa r7027@Kushana: nickm | 2006-08-04 13:06:48 -0700
Oops. Fix downcast macro.


svn:r6985
2006-08-05 17:52:51 +00:00
Nick Mathewson
bf72878cad r7012@Kushana: nickm | 2006-08-03 19:21:25 -0700
Add an "mmap handle" type to encapsulate bookkeeping elements of mmap issues; add prelim win32 impl


svn:r6980
2006-08-04 18:32:43 +00:00
Roger Dingledine
798b580695 fix assert found by DreadWingKnight: now that rendezvous streams
are attached to p_streams, the p_streams list can consist of both AP
and EXIT conns.


svn:r6945
2006-07-30 04:54:13 +00:00
Nick Mathewson
84c2a6c16b r6950@Kushana: nickm | 2006-07-28 10:32:08 -0400
Document split fields better. Now, I think we can take a break from type splitting for a bit.


svn:r6935
2006-07-28 15:11:28 +00:00
Nick Mathewson
85f381153b r6949@Kushana: nickm | 2006-07-28 10:17:38 -0400
Shave another 8 bytes from connection_t: turn inbuf_reached_eof into a bit, and lower timestamp_lastempty to or_connection_t


svn:r6934
2006-07-28 15:11:20 +00:00
Nick Mathewson
6dc13cdbeb r6948@Kushana: nickm | 2006-07-28 10:10:35 -0400
Identify some likely target fields for lowering; lower global_identifier (since we only use it for AP streams and origin circs).


svn:r6933
2006-07-28 15:11:11 +00:00
Nick Mathewson
5227395aba r6922@Kushana: nickm | 2006-07-26 16:32:24 -0400
Rename some fields, compress a bitfield, and document some structs and fields


svn:r6919
2006-07-27 05:03:57 +00:00
Nick Mathewson
dd779d99ea Fix comments that implied that only dir connections had a purpose field, and the code that believed in those comments.
svn:r6918
2006-07-27 04:10:51 +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
18771e851f r6907@Kushana: nickm | 2006-07-25 19:03:43 -0400
Realign circuit structs to avoid wasted space.


svn:r6905
2006-07-26 19:07:23 +00:00
Nick Mathewson
e61d28dfb8 r6903@Kushana: nickm | 2006-07-25 18:22:48 -0400
No circuit can be both an intro point and a rend point, so we can merge both the cookie and the pk digest into one "rend_token" field for or circuits. This saves another 20 bytes per or circuit.


svn:r6904
2006-07-26 19:05:41 +00:00
Nick Mathewson
a88ec48a39 r6902@Kushana: nickm | 2006-07-25 17:30:27 -0400
Move rend_query to origin_circuit_t where it belongs; save another 17 bytes per OR circuit.


svn:r6903
2006-07-26 19:05:34 +00:00
Nick Mathewson
96bcbb1e1c Remove code to special-case "-cvs" ending, since it has not actually mattered since 0.0.9. Perhaps we can special-case even more...
svn:r6898
2006-07-25 04:34:14 +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
2d6a4d283b i lied, that won't work at all. maybe this will.
svn:r6805
2006-07-22 07:15:34 +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
9db7b2c068 Allow servers with no hostname or IP address to learn their IP address
by asking the directory authorities. This code only kicks in when you
would normally have exited with a "no address" error.

This design is flawed, though, since the X-Your-Address-Is header is not
authenticated, and doing it this way introduces too many new attacks. The
right answer is to give IP address hints inside the HELLO cell; much of
this code can be reused when we switch.


svn:r6774
2006-07-17 06:35:06 +00:00
Roger Dingledine
886b10bbe2 whitespace/etc cleanups
svn:r6765
2006-07-16 05:57:11 +00:00
Roger Dingledine
ee5f512e13 parameterize the loudness of resolve_my_address(), and call things
IP addresses, not IPs.


svn:r6764
2006-07-15 20:26:05 +00:00
Nick Mathewson
a40ad152b1 When using eventdns: suppress logging of addresses when SafeLogging is active, and make set of nameservers configurable from torrc.
svn:r6744
2006-07-07 17:33:30 +00:00
Roger Dingledine
05d0b70573 Get rid of the router_retry_connections notion. Now routers no longer
try to rebuild long-term connections to directory authorities, and
directory authorities no longer try to rebuild long-term connections to
all servers.

We still don't hang up connections in these two cases though -- we need
to look at it more carefully to avoid flapping, and we likely need to
wait til 0.1.1.x is obsolete.


svn:r6712
2006-07-04 03:31:27 +00:00
Nick Mathewson
b7910202a3 Next batch of memory miserdom: mmap cached-routers file. This is sure to break somewhere.
svn:r6675
2006-06-22 07:01:54 +00:00
Nick Mathewson
e2697a62ac When requesting or serving resources via fingerprint/digest, request and respond in-order, removing duplicates.
svn:r6673
2006-06-21 04:57:12 +00:00
Nick Mathewson
4283b81a48 Start spooling v2 networkstatus docs as well.
svn:r6664
2006-06-20 00:48:23 +00:00
Nick Mathewson
537104c908 write_to_buf != connection_write_to_buf. Also, add a connection_write_to_buf_zlib wrapper that sucks.
svn:r6650
2006-06-18 08:46:55 +00:00
Nick Mathewson
b1a8b7869a Oops. conn->requested_resource is client only.
svn:r6642
2006-06-18 07:55:04 +00:00