Commit Graph

2828 Commits

Author SHA1 Message Date
Nick Mathewson
eb327e7660 Add feature to handle unset (default) configuration options in GETCONF control messages
svn:r4461
2005-06-19 22:38:36 +00:00
Nick Mathewson
64fc1f7bae Implement all the rest of the new controller protocol, debug a little, add some new features, add ADDRMAP events.
svn:r4460
2005-06-19 20:40:41 +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
Roger Dingledine
cc57e1cab1 fix stray funny-character
svn:r4458
2005-06-19 08:35:16 +00:00
Nick Mathewson
d38c696d5a The new protocol is implemented. Except for the pesky string unquoting business. And the cleanups. And the docs. And the testing. And the debugging. And the new features. Hm, I think it is time to sleep.
svn:r4456
2005-06-18 03:50:08 +00:00
Nick Mathewson
3f2339d1d3 Implement EXTENDCIRCUIT and ATTACHCIRCUIT. Only SETCONFIG and AUTHENTICATE remain.
svn:r4455
2005-06-18 03:09:43 +00:00
Nick Mathewson
c2f6fe9b85 Implement even more control functionality
svn:r4454
2005-06-18 02:39:25 +00:00
Roger Dingledine
8fdab20704 fix typo
svn:r4453
2005-06-18 02:23:11 +00:00
Nick Mathewson
5fee58adfb Add a tor_memmem function
svn:r4452
2005-06-18 02:17:11 +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
f9f09f1c5e Start implementing framework for revised control spec.
svn:r4447
2005-06-17 18:49:55 +00:00
Nick Mathewson
d4972bd2e1 Remove code that has been #if-0ed for a long time.
svn:r4435
2005-06-15 18:34:46 +00:00
Roger Dingledine
a3c66475f3 compile fix by agl, for code that is always commented out
svn:r4427
2005-06-13 17:33:12 +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
Roger Dingledine
2111c0e263 a bit more cleanup
svn:r4417
2005-06-12 04:33:26 +00:00
Roger Dingledine
91b1fb7ff7 some more cleaning and docing
svn:r4415
2005-06-11 21:17:38 +00:00
Nick Mathewson
beae4d0d32 whitespace fix
svn:r4414
2005-06-11 18:59:24 +00:00
Nick Mathewson
44107b6b13 fix typo in last patch
svn:r4413
2005-06-11 18:56:16 +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
2587fa09f9 move more docs into our code
svn:r4406
2005-06-11 06:07:22 +00:00
Roger Dingledine
fcd0fc3364 flesh out the source file descriptions for doxygen
svn:r4404
2005-06-11 05:31:17 +00:00
Roger Dingledine
b349e60543 don't tell people you're publishing the server descriptor if you're
actually not.


svn:r4387
2005-06-09 21:23:54 +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
5bca8e8b4d forward-port:
## If certain IPs and ports are blocked externally, e.g. by your firewall,
## you should update your exit policy to reflect this -- otherwise Tor
## users will be told that those destinations are down.


svn:r4376
2005-06-09 10:42:25 +00:00
Roger Dingledine
15f937c95e when a dirserver gets a mismatched fingerprint, log the expected
fp and the received fp


svn:r4372
2005-06-09 10:21:55 +00:00
Roger Dingledine
cfc89f8753 pay more attention to the ClientOnly config option
svn:r4367
2005-06-09 08:54:42 +00:00
Roger Dingledine
d922fa7b10 fix another underflow in keeping stats
these size_ts are subtle buggers


svn:r4364
2005-06-09 03:57:54 +00:00
Nick Mathewson
87caad5445 Fix an underflow in buffer use conting.
svn:r4360
2005-06-08 21:55:02 +00:00
Roger Dingledine
43709a9c3d clean up the log warn a bit
svn:r4357
2005-06-08 20:45:29 +00:00
Nick Mathewson
c45845204a Fix warning about unused function when compiling with ancient libevent
svn:r4355
2005-06-08 20:35:28 +00:00
Roger Dingledine
44e85544e4 absolutely refuse to let people pick internal IP addresses if
they're using the default dirservers.

we're getting a big pile of a dozen or so servers that have picked
private IP addresses despite the warning (presumably they don't even
know they have logs)


svn:r4354
2005-06-08 20:32:22 +00:00
Nick Mathewson
b0538591c7 Reset buf->highwater every time buf_shrink is called, not just on suffessful shrink.
svn:r4353
2005-06-08 20:17:32 +00:00
Roger Dingledine
9ed7b53143 don't upload your descriptor if rebuilding it failed
svn:r4352
2005-06-08 19:45:17 +00:00
Nick Mathewson
8b2a7ff9fe Remove extraneous newlines from libevent log messages. Backport candidate?
svn:r4350
2005-06-08 17:41:32 +00:00
Roger Dingledine
4c43789435 Some play code to throw away old buffers sometimes rather
than constantly reallocing them; just in case this is our memory
problem. It looks for now like it isn't, so disabled.


svn:r4349
2005-06-08 17:27:11 +00:00
Roger Dingledine
eeb6d6dba6 dump periodic memory usage stats
svn:r4348
2005-06-08 17:24:58 +00:00
Nick Mathewson
be1c81a767 Fix syntax error.
svn:r4346
2005-06-08 16:26:44 +00:00
Nick Mathewson
ec07e1195f add patch for 143 and code to check for known-bad/slow libevent versions. Needs more testing.
svn:r4344
2005-06-08 13:53:19 +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
621ab95e59 Fix for 152: reject malformed .onion addresses rather then passing them on
svn:r4329
2005-06-07 18:01:46 +00:00
Nick Mathewson
2118e5798a Use correct errno from libevent on win32
svn:r4327
2005-06-07 17:32:33 +00:00
Nick Mathewson
1d9bc936c2 Adapt patch from Adam Langley: fix possible memory leak in tor_lookup_hostname
svn:r4326
2005-06-07 13:45:58 +00:00
Roger Dingledine
51b5b808cb bump cvs to 0.1.1.0-alpha-cvs
svn:r4323
2005-06-06 20:27:36 +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
5420aed38e Possible bugfix for 151: backport candidate.
svn:r4318
2005-06-06 20:02:09 +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
7c8d5c3178 correct some instructions in the sample torrc
svn:r4314
2005-06-06 15:57:53 +00:00
Nick Mathewson
9f24078452 Fix buffer overlow when checking hashed passwords
svn:r4308
2005-06-05 14:28:47 +00:00
Nick Mathewson
3c58cdf280 Add unit test for openpgp s2k
svn:r4306
2005-06-04 13:43:03 +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
6cfce54ab0 bump to 0.1.0.8-rc
svn:r4286
2005-05-23 05:47:21 +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
751db63a17 Always disable kqueue on OSX. It seems linked to kernel panics
svn:r4282
2005-05-23 04:28:58 +00:00
Roger Dingledine
78f26e8806 test out commit mails again
svn:r4281
2005-05-23 03:39:53 +00:00
Roger Dingledine
ee553a9c72 put a tor version at the top of the torrc.sample file
svn:r4280
2005-05-23 03:38:32 +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
b86716b839 If a socks connection ends because read fails, don't warn that you're
not sending a socks reply back. (bug reported by Warren Barrow)


svn:r4277
2005-05-21 00:15:23 +00:00
Roger Dingledine
d22c141659 we were leaking 616 bytes every time somebody established us as
an intro point for their hidden service.


svn:r4276
2005-05-20 22:14:33 +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
f0e309e5bd add HttpProxyAuthenticator config option too
svn:r4272
2005-05-20 08:51:45 +00:00
Roger Dingledine
208dc969b3 bump to 0.1.0.7-rc-cvs
svn:r4267
2005-05-18 04:01:57 +00:00
Roger Dingledine
0fa1890e0e fix the assumption that uninitialized variables are 0
clean up router_load_single_router() more


svn:r4266
2005-05-18 03:52:07 +00:00
Roger Dingledine
fe78aac027 fix seg faults when router_load_single_router fails
svn:r4265
2005-05-18 03:42:46 +00:00
Nick Mathewson
e7354725bb Handle relay cells with rh.length too large.
svn:r4264
2005-05-17 20:00:24 +00:00
Roger Dingledine
9abef5e483 allow the middle hop of the testing circuit to be running
any version, now that most of them have the bugfix to let
them connect to unknown servers.


svn:r4263
2005-05-17 19:46:43 +00:00
Roger Dingledine
b7d6b8a397 doxygeny goodness from tyranix
svn:r4262
2005-05-17 17:01:36 +00:00
Roger Dingledine
ebee138d75 bump to 0.1.0.7-rc
svn:r4255
2005-05-17 04:42:48 +00:00
Roger Dingledine
ec1331d49e fix a comment that tyranix noticed
svn:r4239
2005-05-17 01:55:53 +00:00
Roger Dingledine
2812d4a08c free some memory that is still reachable on exit
svn:r4234
2005-05-16 10:32:10 +00:00
Nick Mathewson
530da0e772 Normalize whitespace
svn:r4233
2005-05-16 01:04:28 +00:00
Roger Dingledine
14b9615d7d bump cvs to 0.1.0.6-rc-cvs
svn:r4231
2005-05-15 13:26:08 +00:00
Roger Dingledine
28195a0eb1 clean up some log entries
svn:r4228
2005-05-15 05:00:24 +00:00
Roger Dingledine
b7a88ebd15 fix url in comment in torrc
svn:r4225
2005-05-15 03:00:00 +00:00
Nick Mathewson
9bc6e3aa6c Add an explanatory comment
svn:r4222
2005-05-15 02:05:45 +00:00
Roger Dingledine
7eb559fada bump to 0.1.0.6-rc
svn:r4217
2005-05-15 01:00:45 +00:00
Nick Mathewson
c7bc2f9eae Add ENABLE_THREADS macro to windows orconfig.h
svn:r4212
2005-05-15 00:17:59 +00:00
Roger Dingledine
3c9ec416f6 fix a case error in suppressing a bogus libevent warning.
nick, was this lower-case for a reason? have both cases
appeared? or was this just a typo.


svn:r4206
2005-05-14 05:14:36 +00:00
Roger Dingledine
07230a698c if router_resolve fails on the descriptor the controller
gives us, we shouldn't leave the routerinfo in the list.


svn:r4205
2005-05-14 05:01:41 +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
00f2a09380 Append default exit policy before checking for implicit internal addresses: fix bug 129.
svn:r4201
2005-05-14 00:13:17 +00:00
Nick Mathewson
776b411dc9 Fix a segfault
svn:r4191
2005-05-11 04:14:17 +00:00
Nick Mathewson
3893b3c7ac Patch for task 133
svn:r4189
2005-05-10 22:33:45 +00:00
Nick Mathewson
d0c0d6c86a Apply patch from Geoff for bug 132. Clean it up a little to fix a memory leak and to avoid unnecessary parse/unparse code.
svn:r4188
2005-05-10 22:12:48 +00:00
Nick Mathewson
ea5591ee4d Implement --disable-threads
svn:r4187
2005-05-10 20:02:52 +00:00
Nick Mathewson
13126eeb0f Patch from goodell for task 131: Do not die on internal address if we are not publishing.
svn:r4186
2005-05-09 04:31:00 +00:00
Nick Mathewson
10b2208d93 Make Tor compile with no warnings with gcc4.0 on OSX
svn:r4184
2005-05-07 05:55:06 +00:00
Nick Mathewson
6567ec9ccf Functions work better when you call them. Resolve a bug which would prevent unreachable dirports from getting suppressed.
svn:r4183
2005-05-07 05:17:36 +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
cee7c5988c fix massive memory leak
(50 megabytes over a couple of days, on the dirservers)


svn:r4181
2005-05-06 08:53:23 +00:00
Roger Dingledine
cc0b19888d log buffer sizes on kill -usr1 too.
svn:r4180
2005-05-06 08:32:37 +00:00
Roger Dingledine
1f263bf6f5 whine at you if you're a server and you don't set your contactinfo
svn:r4178
2005-05-04 20:45:38 +00:00
Roger Dingledine
68ba303323 fix compile error if you're not multithreaded
svn:r4177
2005-05-03 18:44:20 +00:00
Roger Dingledine
6ea839265d remove archaic debugging aid that was probably unsafe
svn:r4176
2005-05-03 10:17:38 +00:00
Roger Dingledine
87850c47b0 cleanup now that 0.0.9pre1 is obsolete
svn:r4175
2005-05-03 10:12:08 +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
8b9ae25224 Change some >=s to >s in buf_resize, so that we do not denormalize buffers on resize.
svn:r4172
2005-05-03 03:25:04 +00:00
Nick Mathewson
4666b801fa If DataDir is ~/.tor, and that expands to /.tor, then default to LOCALSTATEDIR/tor instead.
svn:r4170
2005-05-03 00:36:57 +00:00
Nick Mathewson
14bac4dad4 Elaborate on buf_shrink comment.
svn:r4169
2005-05-02 23:41:39 +00:00
Roger Dingledine
aa6bcd50ca comment buf_shrink
svn:r4168
2005-05-02 23:39:09 +00:00
Nick Mathewson
ad547cbb8c Correct and simplify buf_shrink logic
svn:r4167
2005-05-02 23:36:13 +00:00
Nick Mathewson
d6a6c8785b When removing all bytes from a buffer, reset buf->cur=buf->mem
svn:r4166
2005-05-02 23:32:23 +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
Nick Mathewson
9c683c7613 Make buffer shrinking algorithm a little smarter.
svn:r4164
2005-05-02 22:49:24 +00:00
Nick Mathewson
830ac87611 Actually, dont send CREATE_FAST cells at all for now
svn:r4163
2005-05-02 22:39:59 +00:00
Nick Mathewson
ab34901263 New and frightening code to implement fast-path first-hop CREATE_FAST cells. Watch out when we bump the version to 0.1.0.6-rc!
svn:r4162
2005-05-02 22:35:18 +00:00
Roger Dingledine
978648bff8 also print the platform string for rejected descriptors
svn:r4160
2005-05-02 22:06:04 +00:00
Roger Dingledine
15c1853bd6 don't print nulls
svn:r4159
2005-05-02 21:54:16 +00:00
Roger Dingledine
50505e677e fix a comment
svn:r4157
2005-05-02 21:49:04 +00:00
Roger Dingledine
c9e83eb1b4 when we refuse a router descriptor, log contactinfo and source address.
svn:r4156
2005-05-02 21:48:54 +00:00
Roger Dingledine
57b7427c2d reformat routerparse a bit
svn:r4155
2005-05-02 21:48:25 +00:00
Nick Mathewson
69dc4e1675 Remove support for looking at old directory/routerdesc elements; mark non-new elements optional; switch to new format for dir-signing-key; start accepting newer elements so we can mark them as non-opt later; make tor-spec say the right stuff.
svn:r4154
2005-05-02 21:22:31 +00:00
Roger Dingledine
729e720095 workaround for user error: some people were putting "Address " in their
torrc, and they had a buggy resolver that resolved " " to 0.0.0.0. Oops.


svn:r4150
2005-04-29 18:52:05 +00:00
Roger Dingledine
3d2fbeb979 bump to 0.1.0.5-rc-cvs
svn:r4149
2005-04-28 16:11:48 +00:00
Nick Mathewson
fe65e57ca1 Re-do fragmented control message handling to work with new buf_t system.
svn:r4144
2005-04-27 22:01:34 +00:00
Nick Mathewson
d0a9a8bdd3 Appease VC7. It has a strangely puritanical attitude about what programmers are allowed to do a consenting void*.
svn:r4140
2005-04-27 20:02:52 +00:00
Nick Mathewson
53607d3bb3 Turn SENTINELS back on; give NOINLINE a name and turn it off.
svn:r4139
2005-04-27 19:40:31 +00:00
Roger Dingledine
42d57317cd bump to 0.1.0.5-rc
svn:r4138
2005-04-27 19:30:32 +00:00
Roger Dingledine
4c4a14e3cb turn off the mongo debugging stuff, for performance tests
svn:r4137
2005-04-27 17:21:42 +00:00
Roger Dingledine
543d31c89a bump the default bandwidthrate from 1mb to 2mb
svn:r4131
2005-04-27 04:13:59 +00:00
Nick Mathewson
52376dc9e8 Rename buf->start to buf->cur; fix bug in read_to_buf; still debug with paranoia.
svn:r4130
2005-04-27 02:55:21 +00:00
Nick Mathewson
746768df5d Add even more debugging code; temporarily disable inlines in buffers.c
svn:r4129
2005-04-27 00:53:44 +00:00
Roger Dingledine
914ee87e07 stop re-reading and re-parsing the directory as soon as we make it.
it was nice for checking if we've got bugs, but it's really quite
expensive too. it was also nice for updating our routerinfo's
immediately, but we'll update them like everybody else when we fetch
a new dir from somebody else.


svn:r4128
2005-04-27 00:48:05 +00:00
Roger Dingledine
adaf3d31e6 hidden service client connections were using some of their
60 seconds fetching the hidserv descriptor, which made them
more likely to fail on the first attempt, yet they work fine
on the second. so now give them extra time for the first try.


svn:r4127
2005-04-26 22:36:00 +00:00
Roger Dingledine
2a7aec0ffd fix function prototype, fix typo
svn:r4126
2005-04-26 21:29:20 +00:00
Nick Mathewson
ecc76d8245 Avoid overflow on wrapping a TLS read.
svn:r4125
2005-04-26 21:20:22 +00:00
Nick Mathewson
e6794e5808 Fix unit tests for buffers.
svn:r4124
2005-04-26 21:10:31 +00:00
Roger Dingledine
15c7c73c5e bump to 0.1.0.4-rc-cvs while we're testing
svn:r4123
2005-04-26 20:59:36 +00:00
Nick Mathewson
9ba2dd7ea1 Clean/renormalize whitespace
svn:r4122
2005-04-26 20:55:32 +00:00
Nick Mathewson
ef2409e4ed Change the implementation of buf_t a lot: make it a ring buffer to minimize memmove on flush. This may break the universe, but it is probably Necessary For Perfomance.
svn:r4121
2005-04-26 20:53:22 +00:00
Roger Dingledine
4eb3cf9330 a bit more debug info
svn:r4119
2005-04-26 20:05:15 +00:00
Roger Dingledine
953cf91ecd add more debugging info to help us find the weird dns freebsd pthreads bug.
svn:r4117
2005-04-26 19:08:06 +00:00
Roger Dingledine
509405a5f7 clean up this TOR_FRAGILE business
svn:r4116
2005-04-26 18:52:16 +00:00
Roger Dingledine
5e86e87124 Add basic HttpsProxyAuthenticator support, based on patch
from Adam Langley.


svn:r4115
2005-04-26 18:33:33 +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
Roger Dingledine
662cfc976d only call the connection open once we've decided we like the cert.
svn:r4112
2005-04-25 17:23:52 +00:00
Roger Dingledine
f3ea883ccd bugfix: stop trying to print a null pointer if an OR conn fails
because we didn't like its cert.


svn:r4111
2005-04-25 15:43:37 +00:00
Roger Dingledine
12ea3a26b2 bugfix: make a debug log stop lying
svn:r4110
2005-04-25 15:43:05 +00:00
Roger Dingledine
92b970d2a6 only complain about wedged cpuworkers after an hour, not 100 secs
svn:r4100
2005-04-23 20:58:44 +00:00
Nick Mathewson
4fb95f166e Apparently, ASN1 failures are not treated as SSL connection errors, but are just general OpenSSL errors. Or something. Anyway, bulletproof tor_tls_handshake.
svn:r4098
2005-04-23 20:35:38 +00:00
Roger Dingledine
6128cdead0 let NumCpus be singular without whining
svn:r4097
2005-04-23 19:29:09 +00:00
Roger Dingledine
df18661a28 bump experimental version to 0.1.0.4-rc
svn:r4096
2005-04-23 18:31:25 +00:00
Roger Dingledine
cc620c2afb bump to 0.1.0.3-rc-cvs
svn:r4088
2005-04-23 16:13:56 +00:00