Nick Mathewson
e1db33971e
NT service patch from Matt Edman to improve error messages, lightly cleaned; needs more testing.
...
svn:r4527
2005-07-09 16:37:12 +00:00
Roger Dingledine
2f1f0c8d21
be flexible in what you accept: when people type "tor --install" thinking
...
they had typed "tor -install", make it work too.
svn:r4526
2005-07-09 03:28:58 +00:00
Nick Mathewson
806da0d8b2
Compile on win32
...
svn:r4496
2005-06-27 23:35:04 +00:00
Nick Mathewson
2aff87caae
Load hardware acceleration options when/where available. Can anybody test this?
...
svn:r4467
2005-06-20 18:56:35 +00:00
Nick Mathewson
5eef9177c5
Appease verbose GCC warnings.
...
svn:r4466
2005-06-20 09:38:29 +00:00
Roger Dingledine
b5fd75a063
forward-port the --hash-password bug, plus other nearby fixes
...
svn:r4459
2005-06-19 08:35:46 +00:00
Nick Mathewson
9b4aa8d2ab
Implement all the easy bits of the new control protocol
...
svn:r4449
2005-06-17 20:37:21 +00:00
Nick Mathewson
2b8fd9ceda
Allow a few EINVALs from libevent before dying. Warn on kqueue with libevent before 1.1a
...
svn:r4419
2005-06-13 00:35:19 +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
Roger Dingledine
fcd0fc3364
flesh out the source file descriptions for doxygen
...
svn:r4404
2005-06-11 05:31:17 +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
eeb6d6dba6
dump periodic memory usage stats
...
svn:r4348
2005-06-08 17:24:58 +00:00
Roger Dingledine
aff308e6d9
reenable the part of the code that tries to flush as soon as an OR outbuf
...
has a full tls record available. perhaps this will make OR outbufs not grow
as huge except in rare cases, thus saving lots of cpu time plus memory.
svn:r4343
2005-06-08 04:55:06 +00:00
Roger Dingledine
1a5c5452b4
when you send a USR2 signal, the log message now tells you to send
...
a HUP signal if you want to change back to old log levels.
svn:r4332
2005-06-07 18:16:14 +00:00
Nick Mathewson
2118e5798a
Use correct errno from libevent on win32
...
svn:r4327
2005-06-07 17:32:33 +00:00
Nick Mathewson
e1c8aa8035
Fix win32 compilation: backport candidate
...
svn:r4320
2005-06-06 20:06:10 +00:00
Nick Mathewson
fc40f974c2
When RNG seeding fails, die. Backport candidate
...
svn:r4319
2005-06-06 20:02:33 +00:00
Nick Mathewson
baa10cbbfa
Instrument buffers.c and rephist.c memory usage
...
svn:r4317
2005-06-06 17:03:21 +00:00
Roger Dingledine
4855990d37
clean up a few more log entries
...
svn:r4304
2005-05-27 17:43:43 +00:00
Roger Dingledine
bfc7838b97
downgrade the 'caught sigpipe' notice.
...
we're going to pretend like all of these are fine.
svn:r4301
2005-05-25 02:20:15 +00:00
Roger Dingledine
4f0d7b82ae
make lucky's weird libevent poll einprogress bug just warn, not kill tor.
...
svn:r4300
2005-05-24 22:58:57 +00:00
Nick Mathewson
d2cdae221d
Fix not-freed-on-exit event
...
svn:r4298
2005-05-24 17:13:15 +00:00
Roger Dingledine
5005f682ae
Bugfix: we were checking to see if you want to send a keepalive, based
...
on five minutes since last successful write. But if you have bytes queued
already, and they're not getting through, we were adding a new keepalive
every second. This was bad.
svn:r4296
2005-05-23 22:20:54 +00:00
Roger Dingledine
040a748d87
i screwed up the dirport reachability testing when we don't yet
...
have a cached version of the directory. hopefully now fixed.
svn:r4284
2005-05-23 05:20:52 +00:00
Nick Mathewson
11a64692c3
Make hashed controller password encoding use hex not base64; this makes it possible to write a controller without base64
...
svn:r4279
2005-05-23 02:31:53 +00:00
Roger Dingledine
c95677725a
a note for nick about other memory not freed at exit
...
svn:r4275
2005-05-20 22:11:46 +00:00
Roger Dingledine
2812d4a08c
free some memory that is still reachable on exit
...
svn:r4234
2005-05-16 10:32:10 +00:00
Roger Dingledine
28195a0eb1
clean up some log entries
...
svn:r4228
2005-05-15 05:00:24 +00:00
Roger Dingledine
b92a77b1d2
move the periodic buffer shrinking interval from 3 mins to 1 min
...
svn:r4204
2005-05-14 01:11:45 +00:00
Nick Mathewson
bc51c8b074
Implement --verify-config command-line option to fix bug 69.
...
svn:r4182
2005-05-07 04:49:09 +00:00
Roger Dingledine
cc0b19888d
log buffer sizes on kill -usr1 too.
...
svn:r4180
2005-05-06 08:32:37 +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
b35f7dacef
Call tor_free_all instead of connections_free_all after forking
...
svn:r4173
2005-05-03 03:51:20 +00:00
Nick Mathewson
a312ce1d3b
Change buffer shrinking strategy: only try to shrink once every 3 minutes. Do not try to read over buffer size unless buffer is nearly empty.
...
svn:r4165
2005-05-02 23:17:08 +00:00
Roger Dingledine
509405a5f7
clean up this TOR_FRAGILE business
...
svn:r4116
2005-04-26 18:52:16 +00:00
Roger Dingledine
4fafa81f32
help debug: when we close a conn due to timeout, tell us its
...
file descriptor, not its connectionarray index.
svn:r4113
2005-04-25 17:24:16 +00:00
Nick Mathewson
cf84759b4b
zero-out errno before calling event_dispatch, just in case we have misdiagnosed poll(2)/EINVAL bug.
...
svn:r4081
2005-04-17 22:38:39 +00:00
Roger Dingledine
e2cdc87485
remove some redundant code
...
svn:r4062
2005-04-08 06:16:09 +00:00
Nick Mathewson
b897cb1ec3
Change conn_(type|state)_to_string from const arrays to switch functions so we (I) will not make Tor crash the next time we (I) add a new state.
...
svn:r4045
2005-04-07 20:25:22 +00:00
Roger Dingledine
46089c49c4
blow away most calls to assert_all_pending_dns_resolves_ok, since
...
they're eating our cpu.
svn:r4034
2005-04-06 20:05:34 +00:00
Roger Dingledine
9cbaf4603d
fix an assert trigger: when we have the rare case of accepting
...
a conn on 0.0.0.0:0, then when we look through the connection array,
we'll find any of the workers. this is no good.
svn:r4027
2005-04-06 15:19: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
Nick Mathewson
efe9ca659a
Use recent libevent features when possible
...
svn:r3940
2005-04-01 02:37:40 +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
20a8eda31b
don't check for reachability, and don't whine about it, while we're
...
hibernating.
svn:r3919
2005-03-29 03:48:31 +00:00
Roger Dingledine
9b5432214d
but only do the rapid reachability testing if we're hoping to be a server.
...
svn:r3902
2005-03-27 11:52:15 +00:00
Roger Dingledine
92acd64da0
if your server hasn't found itself to be reachable, complain every
...
20 minutes, not just once.
svn:r3897
2005-03-27 06:50:36 +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
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
Roger Dingledine
570da8a8e8
and fill in another missing socks reply
...
svn:r3877
2005-03-25 11:23:03 +00:00
Roger Dingledine
8945df8daa
remove dead code
...
svn:r3875
2005-03-25 10:55:49 +00:00
Nick Mathewson
4ee6addf57
Fix bug 44: on HUP, if descriptor building fails (say, because router_get_my_address() fails), use old descriptor and warn.
...
svn:r3839
2005-03-23 20:28:40 +00:00
Roger Dingledine
21b1adefbb
fix a 32bit/64bit sprintf mixup that weasel pointed out
...
svn:r3823
2005-03-22 23:27:29 +00:00
Nick Mathewson
ab1d0049a2
Prevent spurious closes when we put stuff on a conn that has not written for a while.
...
svn:r3816
2005-03-22 20:25:51 +00:00
Roger Dingledine
8a763b5ae3
cleanup and a question
...
svn:r3815
2005-03-22 20:04:00 +00:00
Nick Mathewson
2d662bf773
Clear up a couple of pedantic compiler warnings
...
svn:r3812
2005-03-22 18:56:11 +00:00
Nick Mathewson
c4470cbedf
be more explicit about why we are expiring a conn; improve logic a bit too
...
svn:r3808
2005-03-22 06:21:35 +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
b004eda10c
Enable NT service code by default
...
svn:r3780
2005-03-19 01:04:05 +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
0197b47ce9
Fix some more obscure compiler warnings
...
svn:r3758
2005-03-14 03:28:46 +00:00
Nick Mathewson
97dad670ea
Renormalize whitespace
...
svn:r3757
2005-03-14 03:18:35 +00:00
Nick Mathewson
777d3dde0c
Get address map resetting implemented.
...
svn:r3745
2005-03-11 21:39:39 +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
349ee1abea
Clean up rend cache on shutdown
...
svn:r3714
2005-02-28 22:38:00 +00:00
Nick Mathewson
97bc49bd72
Try a little harder to avoid openssl SSL* double-free reports.
...
svn:r3710
2005-02-28 02:52:51 +00:00
Roger Dingledine
b3177d509e
free some more memory at shutdown
...
svn:r3707
2005-02-28 01:59:18 +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
26e6eb7539
Check returns from libevent calls better; stop poking at internals of events to see if they are live.
...
svn:r3691
2005-02-25 05:42:01 +00:00
Nick Mathewson
2ff6cfccd6
Forward-port fix to make dual-purpose NT executable work.
...
svn:r3665
2005-02-23 05:34:25 +00:00
Roger Dingledine
55c3f15ed1
Forward-port the trick to bump up ConnLimit as far as it can
...
go, but not past MAXCONNECTIONS. Also throw away the FAKE_POLL
caveats since 0.1.0 doesn't need it any more.
svn:r3657
2005-02-22 23:52:44 +00:00
Nick Mathewson
1a55422006
Fix windows build: juggle }s and #endifs around in main.c
...
svn:r3645
2005-02-22 02:57:43 +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
Nick Mathewson
5d836c8140
Free tls resources on exit too
...
svn:r3615
2005-02-11 01:41:19 +00:00
Nick Mathewson
f672577bc6
Free even more things on shutdown. Temporarily move tor_free_all out from #ifdef so it gets tested more.
...
svn:r3614
2005-02-11 01:26:47 +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
Roger Dingledine
c5c46d6fb6
don't list version in the win32 service display name or service name,
...
since they'll keep changing and people will get messed up about which
one is installed.
svn:r3592
2005-02-09 02:26:24 +00:00
Nick Mathewson
bb32fa86d7
Re-normalize whitespace; make "make check-spaces" happy
...
svn:r3566
2005-02-05 21:42:46 +00:00
Nick Mathewson
24ad6542c9
forward-port NT service patch
...
svn:r3565
2005-02-05 21:40:25 +00:00
Roger Dingledine
bcece3d8a7
another minor fix
...
svn:r3511
2005-02-03 07:30:00 +00:00
Peter Palfrader
ddd724ef94
Add --with-dmalloc configure option
...
svn:r3508
2005-02-03 07:25:10 +00:00
Peter Palfrader
dfa3a0220f
Write a function header for Roger so he can fill it with life
...
svn:r3507
2005-02-03 07:23:48 +00:00
Roger Dingledine
0f5a198028
sometimes, a conn on the closeable_lst gets absolutely
...
clobbered. maybe this will help me find out why.
svn:r3498
2005-02-02 00:19:09 +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
d6489d8e41
lay a trap for situations where we connection_free something
...
that's still on one of the lists.
in particular, this will detect situations where we mark-for-close
and then free it ourselves.
svn:r3475
2005-01-31 00:33:32 +00:00
Roger Dingledine
75b45bcd4d
stop the infinite loop of freeing the same connection_t over and
...
over when it's not linked into the connection_array
svn:r3474
2005-01-31 00:26:09 +00:00
Roger Dingledine
3969b6066e
Stop crashing when we're asking to close_if_marked a conn that
...
hasn't been connection_added yet. This happens when an exit conn
is in dns_wait and we get a relay end cell for it before it finishes.
We were silently leaking each of these marked conns in 0.0.9.x. Now
we actually free them.
svn:r3470
2005-01-30 21:47:47 +00:00
Roger Dingledine
7ddeb7fae7
try to find the corrupt closeable_connection_lst entry early
...
svn:r3468
2005-01-30 20:31:08 +00:00
Roger Dingledine
8e7fc8d259
comment about a bug wrt clock skew
...
svn:r3461
2005-01-30 00:07:31 +00:00
Roger Dingledine
b2fbd834f0
forward-port the dns and maxconn fixes
...
svn:r3448
2005-01-28 08:53:47 +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
Nick Mathewson
6704093c0d
Appease another 64-bit warning
...
svn:r3392
2005-01-20 20:21:34 +00:00
Nick Mathewson
5b45527851
Appease weasel's paranoid 64-bit compiler.
...
svn:r3389
2005-01-20 20:16:48 +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
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