Roger Dingledine
8e7fc8d259
comment about a bug wrt clock skew
...
svn:r3461
2005-01-30 00:07:31 +00:00
Roger Dingledine
d273891107
if we fetch the dir from a mirror that has a wildly skewed
...
clock, then don't bother checking recommended-versions: it will
just make us sad.
as a side effect, people running obsolete versions and whose
clocks are wildly skewed will not be auto-shut-down. but they
will still get warns about their clock skew.
svn:r3459
2005-01-29 11:48:37 +00:00
Roger Dingledine
191e52179c
distinguish between "well-formed and rejected" and "not well
...
formed", when parsing server descriptors.
svn:r3458
2005-01-29 11:23:34 +00:00
Roger Dingledine
7fd8dfe6ea
accept LDAP (389/tcp) and LDAPS (636/tcp) in default exit policy
...
svn:r3457
2005-01-29 11:16:23 +00:00
Roger Dingledine
82d3894f3e
don't let a corrupt directory cache keep us from starting
...
svn:r3456
2005-01-29 11:07:35 +00:00
Roger Dingledine
0b9b97aaf4
forward-port the shutting up
...
svn:r3450
2005-01-28 10:00:29 +00:00
Roger Dingledine
b2fbd834f0
forward-port the dns and maxconn fixes
...
svn:r3448
2005-01-28 08:53:47 +00:00
Roger Dingledine
d7cee9dbf4
make the example log-to-file line use log-level notice rather than
...
log-level warn.
svn:r3441
2005-01-28 05:40:41 +00:00
Nick Mathewson
083b67cda5
Add rudimentary pthread support that needs more testing.
...
svn:r3439
2005-01-27 22:34:48 +00:00
Nick Mathewson
e03f571ee3
Forward-port win32 service patch; try to clean it a touch.
...
svn:r3438
2005-01-27 21:45:32 +00:00
Roger Dingledine
8ebe85333c
comment SocksPort better as it pertains to servers
...
svn:r3413
2005-01-22 06:51:31 +00:00
Nick Mathewson
fbb7f869c5
fwd-port win32 isprint fix
...
svn:r3410
2005-01-22 00:42:58 +00:00
Nick Mathewson
1dc4d9a0ce
Fix dumb bug in unittests.
...
svn:r3409
2005-01-22 00:42:40 +00:00
Roger Dingledine
2a908e5180
forward-port: fix win32 compile
...
svn:r3406
2005-01-22 00:35:09 +00:00
Nick Mathewson
de9b46ad64
clean a couple of messages
...
svn:r3401
2005-01-21 23:16:07 +00:00
Roger Dingledine
4826718eac
special case so we don't yell when an empty http body doesn't specify a
...
content-encoding
svn:r3397
2005-01-21 03:18:49 +00:00
Roger Dingledine
b137f6d19f
if we get an incredibly skewed timestamp from a dirserver mirror that
...
isn't a verified OR, don't complain very loudly -- it's probably him
that's wrong.
svn:r3395
2005-01-21 00:45:18 +00:00
Nick Mathewson
8115ca5f99
Log the offending policy, not the first policy
...
svn:r3394
2005-01-20 20:42:45 +00:00
Nick Mathewson
6704093c0d
Appease another 64-bit warning
...
svn:r3392
2005-01-20 20:21:34 +00:00
Nick Mathewson
fd41cbcadf
Have reason string for serverdesc post requests contain actual serverdesc status. Also fix return values of dirserv_add_descriptor to work as advertised.
...
svn:r3391
2005-01-20 20:18:32 +00:00
Nick Mathewson
5b45527851
Appease weasel's paranoid 64-bit compiler.
...
svn:r3389
2005-01-20 20:16:48 +00:00
Roger Dingledine
a2e441da06
give a header file for ntohs
...
svn:r3388
2005-01-20 20:15:14 +00:00
Roger Dingledine
67f0babfd4
start to fix http status stuff, more work needed
...
svn:r3387
2005-01-20 20:07:36 +00:00
Nick Mathewson
80e8359ccf
Give better reason phrases in HTTP status lines. Start resolving task #67 . (Messages still need to be better.)
...
svn:r3386
2005-01-20 19:46:02 +00:00
Nick Mathewson
29b6637a62
Compilation fixes for win32 version detection.
...
svn:r3385
2005-01-20 19:03:09 +00:00
Nick Mathewson
432e313c81
Make zlib detection happy on little-endian platforms; fix unit tests.
...
svn:r3384
2005-01-20 19:02:35 +00:00
Nick Mathewson
129e754ae4
Warn when exit policy implicitly allows local addresses.
...
svn:r3383
2005-01-20 18:39:48 +00:00
Roger Dingledine
a6e91f8157
The crowning hidden-service patch: prefer non-internal circuits
...
for normal connections, so we don't spend our internal circs on
other stuff and not have them when we need them.
svn:r3380
2005-01-20 07:02:24 +00:00
Roger Dingledine
38be533c69
Handle unavailable hidden services better. We try each intro point
...
until none are left, then we try to refetch the descriptor. If it's
the same one we had before, then close streams right then. Whenever
a new stream arrives, even if it's right after, optimistically try
refetching the descriptor, just in case.
svn:r3379
2005-01-19 23:15:59 +00:00
Roger Dingledine
ff48179372
make cannibalizing for rend circs prey on the pleb circs first
...
if possible, rather than the elite ones.
svn:r3378
2005-01-19 23:13:20 +00:00
Nick Mathewson
f8c14bbf1f
Detect windows platform correctly
...
svn:r3377
2005-01-19 23:10:16 +00:00
Nick Mathewson
2c803bff9a
Make detect_compression_method work on platforms with more evil chars.
...
svn:r3376
2005-01-19 23:07:43 +00:00
Nick Mathewson
1eddb28f82
Add unittests for compression detection. Make all rendezvous descriptors "plausible".
...
svn:r3375
2005-01-19 22:47:48 +00:00
Nick Mathewson
69fa5be7b6
Workaround for webservers that lie about Content-Encoding: Tor now tries to autodetect compressed directories and compression itself. (resolves bug 65)
...
svn:r3374
2005-01-19 22:40:33 +00:00
Nick Mathewson
e0bf597665
Give more useful log messages when the tor process closes dns/cpuworker connections. "Error: Success!" makes us seem like crazy people."
...
svn:r3373
2005-01-19 21:34:42 +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
f2a7ff6801
better comments for exit policies in torrc.sample
...
svn:r3371
2005-01-19 17:26:40 +00:00
Roger Dingledine
cfcc93296c
bugfix for cvs: we were needing a rendezvous circ, so we cannibalized
...
a general circ, and called rend_client_rendcirc_has_opened(), which
called connection_ap_attach_pending(), which was needing a rendezvous
circ, so it cannibalized a general circuit, and called ...
svn:r3370
2005-01-19 17:13:11 +00:00
Roger Dingledine
bd2d740b49
make it clearer why FooPort and FooBindAddress are separate
...
svn:r3369
2005-01-19 06:06:04 +00:00
Nick Mathewson
7d4a167c81
Basic windows libevent fixes
...
svn:r3366
2005-01-18 23:44:55 +00:00
Roger Dingledine
4e369bc9e8
allow bandwidthburst to be smaller, but whine if it's small.
...
svn:r3364
2005-01-18 19:34:22 +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
372832d8fe
make tor-resolve print the Tor version on --version too
...
svn:r3358
2005-01-16 02:21:14 +00:00
Roger Dingledine
c6771e5ce4
reset published uptime when you wake up from hibernation,
...
since if you hibernate daily a published uptime of >1day
will be misleading.
svn:r3356
2005-01-14 17:49:25 +00:00
Roger Dingledine
dcf8b18215
when the hidden service launches a rendezvous circ, make sure it
...
provides good uptime if any virtual_port of the service wants that.
svn:r3355
2005-01-14 04:35:53 +00:00
Nick Mathewson
a38bccdca7
Move call to event_init() immediately after start_daemon(); move start_daemon earlier. This should fix using libevent with RunAsDaemon.
...
svn:r3354
2005-01-13 21:32:08 +00:00
Roger Dingledine
0aff4ff4cb
get rid of 0.0.8 backwards compatibility
...
svn:r3353
2005-01-13 20:22:38 +00:00
Roger Dingledine
22f7934718
start generating version 1 style introduce cells
...
svn:r3352
2005-01-13 20:21:11 +00:00
Roger Dingledine
49fe4cba74
when deciding if a port is handled and the port demands uptime, don't
...
consider it handled if there's a circ that fits but isn't high-uptime.
svn:r3349
2005-01-13 07:23:19 +00:00
Roger Dingledine
abea142665
more cleanup
...
svn:r3347
2005-01-12 12:22:25 +00:00
Roger Dingledine
bafb3e4a5b
fix another integer underflow caused by buckets going negative
...
svn:r3346
2005-01-12 12:19:00 +00:00
Roger Dingledine
24a97d2c55
fix up some comments
...
svn:r3345
2005-01-12 12:18:46 +00:00
Roger Dingledine
3809c0ab91
tolerate bandwidtch buckets going negative (i hope)
...
svn:r3344
2005-01-12 10:00: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
9b578f2fe2
add more chat and interactive protocols to LongLivedPorts
...
svn:r3340
2005-01-12 05:18:14 +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
51f47d746e
clean up smartlist_string_isin so callers don't have to manage bufs
...
themselves
svn:r3338
2005-01-12 04:53:53 +00:00
Roger Dingledine
70b3208f0a
if somebody starts his tor server in jan 2004 and then fixes his
...
clock, don't make his published uptime be a year.
svn:r3337
2005-01-11 11:54:11 +00:00
Roger Dingledine
45eb8d9660
if you're a server and the auth dirservers are down, go to any other
...
server. only give up hope on network reachability when no other servers
are reachable either.
svn:r3335
2005-01-10 17:39:41 +00:00
Roger Dingledine
74bc4e5af0
help avoid overflow from len_in + (len_in/n)*len_ins
...
nick, do you think this does it? if so, we should maybe backport too.
svn:r3334
2005-01-10 16:30:51 +00:00
Roger Dingledine
4b6d55afdf
separate time_of_process_start from stats_n_seconds_uptime:
...
now we reset uptime when a dir fetch entirely fails. this
hopefully has something to do with stability of being on the
network.
svn:r3333
2005-01-10 05:10:22 +00:00
Roger Dingledine
3370f53010
it helps to use the correct name for the struct
...
svn:r3331
2005-01-10 04:32:59 +00:00
Roger Dingledine
10a81ccf18
when pruning circuit-wait streams when a dir fetch failed,
...
refer in logs to the destination address, not the address of the
application connection.
svn:r3330
2005-01-10 02:47:50 +00:00
Roger Dingledine
f468ff04ea
when we haven't fetched a directory yet, or the last time we
...
tried they were all unreachable, assume we are not connected to
the network.
when an application request comes in during this state, be
optimistic and assume we just reconnected. fetch a new directory
and if it works, begin making circuits.
svn:r3327
2005-01-07 15:57:57 +00:00
Roger Dingledine
608caffc64
fix unit tests: address has to be a non-private IP, and socksport
...
needs to be 0.
svn:r3324
2005-01-07 01:12:30 +00:00
Roger Dingledine
cd1f50d2f0
new config option DirAllowPrivateAddresses for authdirservers.
...
now by default they refuse router descriptors that have non-IP
or private-IP addresses.
svn:r3321
2005-01-06 21:03:27 +00:00
Nick Mathewson
91bafc476e
Fix a fun bug: do not rewrite a cached directory back to the cache; otherwise we will think it is recent and not fetch a newer one.
...
svn:r3319
2005-01-06 20:11:52 +00:00
Roger Dingledine
f8b517fa97
finish marking my comment in main.c
...
svn:r3318
2005-01-06 19:20:54 +00:00
Roger Dingledine
1f51809e65
clean up string printing in relay logs
...
svn:r3317
2005-01-06 19:19:13 +00:00
Roger Dingledine
6d2859c2e5
fix trivial typo in log entry
...
svn:r3316
2005-01-06 19:17:01 +00:00
Nick Mathewson
a6e587305f
typo spotted by chris
...
svn:r3308
2005-01-05 06:48:39 +00:00
Nick Mathewson
dcd228585d
Implement SIGNAL control command.
...
svn:r3307
2005-01-05 06:40:47 +00:00
Nick Mathewson
b4fedc7f14
Stop reversing and re-reversing config lines: keep them in order all the time. Removes needless confusion and fixes bug #50 .
...
svn:r3305
2005-01-05 06:05:37 +00:00
Nick Mathewson
e99f79fa4d
Remove broken and undocumented wart where multiple CSV config lines are appended rather than replaced. Resolves bug #49
...
svn:r3301
2005-01-05 02:51:04 +00:00
Roger Dingledine
814dd946f0
fix duplicate dns_cancel_pending_resolve reported by Giorgos Pallas
...
svn:r3293
2005-01-04 11:26:08 +00:00
Roger Dingledine
ba7c74e742
bandaid: make Giorgos Pallas's dns assert bug not actually crash on him.
...
one day we should try to figure out what's actually going on here.
svn:r3280
2005-01-04 06:21:06 +00:00
Nick Mathewson
6dd91de3bd
Nothing actually _uses_ socks_port, so why publish it? For backward compatibility, publish a socks_port of 0, and never read socks_port.
...
svn:r3279
2005-01-04 05:46:54 +00:00
Roger Dingledine
e6c1ab2daf
post 0.0.9.x, demand that servers declare at least 20000 bytes/s
...
for bandwidthrate
svn:r3277
2005-01-04 03:46:50 +00:00
Nick Mathewson
4d30e2f4b8
Make sequence of log messages when starting on win32 with no config file more reasonable.
...
svn:r3275
2005-01-04 02:25:36 +00:00
Roger Dingledine
1f3e77bf92
make the initial temp log only notice-err, not info-err
...
svn:r3274
2005-01-04 02:25:18 +00:00
Roger Dingledine
82c5381ecb
forward-port the fix for the compiler warning
...
svn:r3273
2005-01-04 01:16:20 +00:00
Roger Dingledine
d7a0f1a629
update print_usage to use new url
...
svn:r3267
2005-01-03 23:21:32 +00:00
Roger Dingledine
a005509c9d
update url for when users try to use socksport as an http proxy
...
svn:r3265
2005-01-03 23:19:15 +00:00
Roger Dingledine
9e6d6c6096
Bugfix: we've been using openssl's BIO_get_mem_data incorrectly.
...
We assumed the pem-encoded data written by PEM_write_bio_RSAPrivateKey
is nul-terminated, and at least sometimes, it's not.
svn:r3263
2005-01-03 22:35:40 +00:00
Roger Dingledine
53c522ee1c
make it clearer you can have multiple SocksBindAddress directives
...
svn:r3262
2005-01-03 21:47:59 +00:00
Nick Mathewson
d1fc7ad94b
Log when we retry a directory connection
...
svn:r3258
2005-01-03 21:14:09 +00:00
Nick Mathewson
0c4186d6ee
Use correct logic to decide whether there are more directory servers to retry.
...
svn:r3257
2005-01-03 20:51:24 +00:00
Nick Mathewson
65c4fa2614
Split mark-dir-failed-and-retry logic into separate function; make it retry runningrouters as well as directory fetches; note that the do-we-need-to-give-up test is wrong.
...
svn:r3256
2005-01-03 20:07:07 +00:00
Nick Mathewson
858eda4736
Fix an unused function warning
...
svn:r3255
2005-01-03 20:03:49 +00:00
Nick Mathewson
5f40d6bf72
Make directory fail-and-retry logic happen in connection_about_to_close(); fixes win32 bug.
...
svn:r3253
2005-01-03 19:51:10 +00:00
Nick Mathewson
b50263f740
More work on task #43 : fix race conditions on multithreaded (win32) servers.
...
svn:r3251
2005-01-03 19:07:25 +00:00
Nick Mathewson
ead52e0bdc
Possible fix for task #43 : when running on a multithreaded environment (currently only windows), threads should not close opposite sides of their socketpairs, and workers should not call connection_free_all(). This may fix win32 servers.
...
svn:r3247
2005-01-03 18:06:51 +00:00
Nick Mathewson
fca7ba9777
Resolve task 42: find where 19-char nicknames were getting truncated when read from certs, and fix it. Also audit use of MAX_NICKNAME_LEN; no other badness found, but some docs/code cleaned up a touch.
...
svn:r3244
2005-01-03 17:53:20 +00:00
Roger Dingledine
59504f4831
bugfix: if a server uploads a descriptor that's unapproved, actually
...
tell him so.
svn:r3243
2005-01-03 17:47:32 +00:00
Roger Dingledine
70075933c6
stop checking for clock skew, even for servers.
...
this means we are vulnerable to an attack where somebody recovers
and uses a really old certificate. however, if they do that, they
probably can get our identity key just as easily.
svn:r3241
2005-01-03 17:10:32 +00:00
Roger Dingledine
fdf8c55f30
clarify the comments about logs in the torrc
...
svn:r3239
2005-01-02 06:34:58 +00:00
Roger Dingledine
b4dad0e6a4
fix the assert bug reported by bassclef@163.com
...
svn:r3237
2005-01-02 06:16:46 +00:00
Roger Dingledine
0d7e8660c7
add a comment to explain what ContactInfo is for
...
svn:r3236
2005-01-01 23:58:16 +00:00
Roger Dingledine
a4ad47df86
Fix a double-mark-for-close bug, where we were finding a conn
...
for a cell even if that conn is already marked for close.
Don't back-port to 0.0.9.x, since this fix could have weird implications.
svn:r3235
2005-01-01 07:54:01 +00:00