Nick Mathewson
99dc566c18
Add examples for hidden services
...
svn:r1453
2004-04-03 01:44:24 +00:00
Nick Mathewson
88e2a09c22
Startup without crashing.
...
svn:r1452
2004-04-03 01:11:04 +00:00
Nick Mathewson
fc4d15baf6
Hide smartlist internals
...
svn:r1451
2004-04-03 00:58:54 +00:00
Roger Dingledine
bbc9484957
fix some bugs; more remain
...
svn:r1450
2004-04-03 00:55:53 +00:00
Roger Dingledine
06c812c2de
remember to lower-case the y in y.onion
...
svn:r1449
2004-04-03 00:27:33 +00:00
Roger Dingledine
2202c2c7ec
AP conns use conn->rend_query now too
...
expose connection_ap_handshake_attach_circuit()
svn:r1448
2004-04-02 23:54:48 +00:00
Nick Mathewson
2bc2f1ed03
Finish renaming rend_service field
...
svn:r1447
2004-04-02 23:44:46 +00:00
Roger Dingledine
a8d805e292
break out circ->rend_service
...
(this breaks the compile; must fix things)
let alice react when she learns a new rendezvous descriptor
let alice launch intro and rend circuits and mark them with her query
svn:r1446
2004-04-02 23:38:26 +00:00
Nick Mathewson
e8345bfced
refactor; start adding debugging logs to midpoint rend stuff
...
svn:r1445
2004-04-02 23:30:54 +00:00
Nick Mathewson
25a9bc594f
Finish missing comment :p
...
svn:r1444
2004-04-02 23:04:10 +00:00
Nick Mathewson
08d748b6b3
Implement rennd_services_init
...
svn:r1443
2004-04-02 23:01:00 +00:00
Roger Dingledine
fc3d7383e7
router_choose_random_node can take a smartlist of nodes to exclude
...
svn:r1442
2004-04-02 22:30:39 +00:00
Roger Dingledine
f34e6da3e7
now circuit_get_newest returns an appropriate circ for your purpose
...
connection_ap_handshake_attach_circuit attaches to a circ of the
right purpose
add a skeletal rendclient.c
svn:r1441
2004-04-02 22:23:15 +00:00
Nick Mathewson
4cb21bab48
Make preferred/excluded intro points configurable
...
svn:r1440
2004-04-02 22:06:46 +00:00
Nick Mathewson
a981c4099a
Implement midpoint functionality for rendezvous points.
...
svn:r1439
2004-04-02 21:56:52 +00:00
Nick Mathewson
79fc52170e
For hidden services: handle INTRODUCE2, send ESTABLISH_INTRO, RENDEZVOUS1.
...
Also:
- Add a pending final cpath element to build_state
- Rename S_RENDEZVOUSING to S_CONNECT_REND
- Add [CS]_REND_JOINED
- Split out logic to initialize cpath crypto objects.
- Have circuits/cpaths remember the KH element from their handshake, so they
can use it for other authentication later. (As in ESTABLISH_INTRO)
svn:r1438
2004-04-01 22:21:01 +00:00
Nick Mathewson
6b958494f3
refactor to use new digest/checksig wrapper, add emacs magic, untabify
...
svn:r1437
2004-04-01 22:12:00 +00:00
Nick Mathewson
cbbd13f789
Add new functions to wrap digest and sign/checksig.
...
svn:r1436
2004-04-01 22:10:33 +00:00
Roger Dingledine
64cb3a027f
teach directory servers to handle renddesc responses
...
svn:r1434
2004-04-01 21:32:01 +00:00
Roger Dingledine
05b99bcf7d
alice chooses her rendezvous node from all running routers
...
and she can set preferences in her options
svn:r1433
2004-04-01 20:33:29 +00:00
Nick Mathewson
103b8ead40
Finish implementing what-bob-does-on-INTRODUCE2
...
svn:r1432
2004-04-01 20:05:57 +00:00
Nick Mathewson
56b3d67149
Separate "generate-DH-key" from "get-DH-key" without breaking old interface
...
svn:r1431
2004-04-01 20:04:54 +00:00
Roger Dingledine
f05937355e
teach alice to recognize y.onion addresses
...
svn:r1430
2004-04-01 19:39:11 +00:00
Nick Mathewson
7993382ba1
Add some hooks to handle rendezvous-related cells at ORs
...
svn:r1429
2004-04-01 04:07:09 +00:00
Roger Dingledine
cc3c4245cb
let the circuit-launcher choose the exit node (if he wants)
...
svn:r1428
2004-04-01 03:44:49 +00:00
Nick Mathewson
9feb44d3c4
Make it compile.
...
svn:r1427
2004-04-01 03:43:54 +00:00
Nick Mathewson
c671b10695
Add a (also fragmentary) function to handle introduction requests
...
svn:r1426
2004-04-01 03:34:05 +00:00
Roger Dingledine
d01497cf3c
outline what bob does to initialize his hidden services
...
let circuit_launch_new return the circ it just made
svn:r1424
2004-04-01 03:23:28 +00:00
Nick Mathewson
35f531b94f
Add helpful hybrid encryption functions
...
svn:r1423
2004-04-01 03:08:35 +00:00
Roger Dingledine
36ff23209b
let alice recognize a y.onion address and, uhm, do something
...
svn:r1422
2004-04-01 02:41:41 +00:00
Roger Dingledine
d13857a3f0
put in hooks for alice and bob logic when circuits finish/fail
...
let you specify the purpose of circuits you launch
bugfix: we used to be declaring the first successful circuit too early -- when the first hop finished. now we're more accurate.
svn:r1421
2004-04-01 01:57:22 +00:00
Nick Mathewson
6d8be5e6f6
Add relay command types for rendezvous
...
svn:r1419
2004-04-01 01:11:28 +00:00
Roger Dingledine
ee45ae575d
allow conns to demand to be attached to a clean circuit
...
(nobody uses this yet)
svn:r1417
2004-03-31 23:06:16 +00:00
Roger Dingledine
d7cb4d0ae6
make changes that ben laurie suggested
...
(ben, was this what you had in mind?)
svn:r1415
2004-03-31 22:41:25 +00:00
Roger Dingledine
a0b0d16981
Add an ap_bridge function to do a socketpair and skip socks.
...
This allows us to do a directory connection *through* tor just
as if we're doing it as an application.
Make ap_conns tolerate it when the application sends stuff before
The socks handshake is done (it just buffers it).
Tell directory_initiate_command the length of the payload (because
it might include nuls).
Add a directory_has_arrived function to, for example, start building
the rendezvous service descriptor.
svn:r1412
2004-03-31 22:02:13 +00:00
Nick Mathewson
28adda81e6
Add missing file
...
svn:r1411
2004-03-31 21:54:56 +00:00
Nick Mathewson
bf83b1e345
Add code to configure hidden services, parse configuration, generate keys and service IDs, and store/load them from disk
...
svn:r1410
2004-03-31 21:35:23 +00:00
Nick Mathewson
157cd7fe15
Fix warning
...
svn:r1409
2004-03-31 20:58:35 +00:00
Roger Dingledine
b4a61d1ab1
better way: always nul-terminate. then sometimes use it, sometimes not.
...
svn:r1408
2004-03-31 05:10:34 +00:00
Roger Dingledine
87dbd36a3c
let fetch_from_buf_http tolerate nuls in the http body
...
teach directory.c about which places it needs to nul-terminate
body before it uses it, and which places it must not
svn:r1407
2004-03-31 05:01:30 +00:00
Nick Mathewson
8fedefe6cb
rename hidserv_xx
...
svn:r1406
2004-03-31 04:10:10 +00:00
Nick Mathewson
b32440a028
Implement hidserv_XX functions; there is still an XXX in directory_handle_command
...
svn:r1404
2004-03-31 03:42:56 +00:00
Nick Mathewson
6ea61d5e0d
Parse and generate service descriptors
...
svn:r1403
2004-03-31 02:07:38 +00:00
Roger Dingledine
670aeb6c8d
add and use stubs for hidserv lookup and store
...
svn:r1402
2004-03-30 23:41:24 +00:00
Nick Mathewson
93ab51e9ac
Make smartlist Do What Arma Expects.
...
svn:r1401
2004-03-30 22:59:00 +00:00
Roger Dingledine
2d3ac08633
Refactor directory servers
...
* read all the time (before we would ignore eof sometimes, oops)
* we can handle different urls now
* send back 404 for an un-handled url
* commands initiated by the client can handle payloads now
* introduce conn->purpose to avoid exponential state-space explosion
svn:r1400
2004-03-30 22:57:49 +00:00
Nick Mathewson
919a8f236e
Resolve type-punning warnings
...
svn:r1399
2004-03-30 22:50:49 +00:00
Nick Mathewson
c31f5505da
Jump through a hoop, suppress a warning
...
svn:r1398
2004-03-30 22:42:26 +00:00
Nick Mathewson
96a86ef14d
Remove maximum-size field from smartlists
...
svn:r1397
2004-03-30 20:05:52 +00:00
Nick Mathewson
0ba9ab5fb0
Add rendezvous-related metadata and code to circuits. Initially, we
...
thought that a complicated adjunct structure would be necessary, but
it doesn't look that way anymore.
Of course, I might have forgotten something.
svn:r1396
2004-03-30 19:52:42 +00:00
Nick Mathewson
6ea95488d2
Add more key manipulation functions, and base32 functions, to crypto
...
svn:r1395
2004-03-30 19:47:32 +00:00
Nick Mathewson
abcf3d9341
Make smartlists start small and grow as needed.
...
svn:r1394
2004-03-30 19:25:43 +00:00
Roger Dingledine
524312494b
use 'notice' loglevel for things the operator should hear
...
but that aren't warnings
svn:r1384
2004-03-30 03:15:53 +00:00
Roger Dingledine
0864d3f484
add in a 'notice' log level
...
svn:r1383
2004-03-30 03:15:23 +00:00
Roger Dingledine
f796957182
don't freak people out as much with the warning message
...
svn:r1378
2004-03-30 00:06:59 +00:00
Roger Dingledine
c09b185f03
re-enable recommendedversion checking (oops, thanks weasel)
...
svn:r1376
2004-03-30 00:02:52 +00:00
Roger Dingledine
ce200ae133
rename torrc to torrc.sample
...
now by default no torrc will be installed, so we'll just
use the built-in defaults (we already do this on windows)
svn:r1375
2004-03-30 00:01:03 +00:00
Roger Dingledine
83c88c55fd
old or skewed descriptor doesn't mean we failed to parse it
...
svn:r1373
2004-03-29 23:23:01 +00:00
Roger Dingledine
ce08baba1b
refactor directories a smidgen
...
svn:r1371
2004-03-29 22:18:05 +00:00
Roger Dingledine
9723061dd9
first guess at a set of circuit purposes
...
svn:r1370
2004-03-29 22:14:19 +00:00
Roger Dingledine
bcda3ebaef
bugfix: we were closing socks-request connections immediately, rather
...
than flushing them, if they were timing out before we marked them
svn:r1366
2004-03-29 20:04:09 +00:00
Roger Dingledine
7118c6177d
clean up a few more bugs
...
svn:r1365
2004-03-29 19:57:50 +00:00
Roger Dingledine
155c777a84
fix typo
...
svn:r1364
2004-03-29 19:53:53 +00:00
Roger Dingledine
0edf0ea7cc
make normal exit nodes less likely to crash from the conn-munging bug
...
but leave dirservers just as likely to crash
svn:r1363
2004-03-29 19:51:39 +00:00
Nick Mathewson
6a79b1cb57
Re-enable unit tests for directory generation.
...
svn:r1362
2004-03-29 19:50:59 +00:00
Nick Mathewson
0e6084d751
Remove descriptors that are older than 24 hours from the directory. Use strlcat instead of strncat to generate directories.
...
svn:r1361
2004-03-29 19:28:16 +00:00
Nick Mathewson
47b9d4439a
Possible fix for c99 aliasing warnings
...
svn:r1360
2004-03-29 06:18:04 +00:00
Roger Dingledine
8c3999c964
make it less noisy for normal ORs when a server uses a false nickname
...
svn:r1359
2004-03-28 21:35:02 +00:00
Roger Dingledine
4a5586b8e3
make dns resolves a lot faster
...
(but only enable this once we've found the bug)
svn:r1358
2004-03-28 21:16:52 +00:00
Roger Dingledine
2ba9901cb4
oh, i forgot to enable the find-munged-conn function
...
svn:r1357
2004-03-28 21:14:05 +00:00
Roger Dingledine
e6a2e03524
hold socks reply open until flushed (if possible)
...
svn:r1356
2004-03-28 09:48:21 +00:00
Roger Dingledine
f241fdfc73
there is yet another dns-pending-conn-clobbering bug
...
somewhere
svn:r1354
2004-03-28 04:54:36 +00:00
Roger Dingledine
56dfc3151f
work around a tsocks bug
...
when an AP connection dies early, be sure to do a socks reject
for it. if you just hang up, tsocks goes into an infinite loop.
svn:r1352
2004-03-27 05:45:52 +00:00
Roger Dingledine
9ab5f3c067
fix an assert trigger where an OP would fail to handshake, and we'd
...
expect it to have a nickname.
svn:r1351
2004-03-27 01:28:14 +00:00
Roger Dingledine
47b40de0aa
only build circuits after we've fetched the directory
...
this resolves a subtle bug where tor clients were preferentially using
the directory servers, since when they start building circuits they
know only about the directory servers
on the other hand, it now takes longer after startup before there's
a working circuit. so it goes.
svn:r1350
2004-03-27 00:15:09 +00:00
Roger Dingledine
f2a692081f
make it less noisy to consider exit policies
...
svn:r1349
2004-03-27 00:13:27 +00:00
Roger Dingledine
32e268c61b
oops, 0.0.4 is more broken than 0.0.3
...
maybe this will fix it
svn:r1347
2004-03-26 23:37:13 +00:00
Roger Dingledine
45699bb5ee
clean up some 'warn' messages while i'm at it
...
svn:r1342
2004-03-26 22:28:16 +00:00
Roger Dingledine
9c69f14a49
fix two assert triggers (darn it, I hate releasing software)
...
when connecting to a dirserver or OR and the network is down,
we would crash.
svn:r1340
2004-03-26 22:07:45 +00:00
Roger Dingledine
4d747cd954
a missing comma could wreak all sorts of havoc.
...
svn:r1335
2004-03-26 18:29:05 +00:00
Nick Mathewson
d44e3ad809
Remove unused open circuits when there are too many, not when they are too old.
...
svn:r1332
2004-03-21 06:33:57 +00:00
Nick Mathewson
b3f6b55ea1
Dont expire circuits we didnt originate. This may be redundant somehow, but better safe than sorry.
...
svn:r1331
2004-03-21 05:01:06 +00:00
Nick Mathewson
b69f5f3e1b
Add an autoconf test for whether unaligned int access is permitted.
...
It works on macos, and works correctly when I twiddle the test code to
generate a spurious segfault. Will it work anywhere else?
svn:r1329
2004-03-21 04:14:06 +00:00
Nick Mathewson
f608b85ddf
Replace all connection_removes outsice of main.c with connection_mark_for_close
...
svn:r1328
2004-03-21 03:18:45 +00:00
Nick Mathewson
b7c2b18bd6
Add a RunTesting option to try to learn link state by creating test circuits, even when SocksPort is off.
...
svn:r1327
2004-03-21 03:03:10 +00:00
Nick Mathewson
0d8feba6d8
Add macros and functions to wrap memcpy/alignment logic.
...
svn:r1326
2004-03-21 02:01:17 +00:00
Roger Dingledine
3d2c6c7cfa
catch signals in a more portable way, so solaris can catch them too
...
svn:r1324
2004-03-20 23:27:22 +00:00
Roger Dingledine
d10fcc89ec
make uname() more likely to work on solaris
...
(linux says 0 is success, solaris says 1 is success)
svn:r1322
2004-03-20 21:22:16 +00:00
Roger Dingledine
ed0ef86c0e
make OR not crash when non-OR connection dies
...
svn:r1319
2004-03-20 20:37:49 +00:00
Roger Dingledine
568a4e0a04
warn and fail if server chose a nickname with illegal characters
...
svn:r1318
2004-03-20 20:28:53 +00:00
Roger Dingledine
4f0bad280d
make servers not crash when they rep-hist-note circuits that don't start at them
...
svn:r1317
2004-03-20 20:21:20 +00:00
Roger Dingledine
66f878513f
deal with hardware word alignment
...
this was causing the seg faults on sparc processors
i wonder if i got them all.
svn:r1314
2004-03-20 09:30:30 +00:00
Nick Mathewson
2ba2f02181
Integrate the new "rephist" [rep(utation) hist(ory)] module to trace
...
successful/failed connections, successful/failed extends, and
connection uptimes.
It's still not done: more tests are needed, and not everything calls
connection/circuit_mark_for_close properly. This skews the results.
Also, there needs to be a 'testing' mode for non-OP ORs, where they
periodically build circuits just to test whether extends work.
svn:r1313
2004-03-20 04:59:29 +00:00
Nick Mathewson
da9d5ccfda
Add initial history-tracking backend code for reputation module. Not called or tested yet.
...
svn:r1310
2004-03-20 01:48:05 +00:00
Nick Mathewson
b0ef4e1143
Use strmap code for client DNS.
...
svn:r1309
2004-03-20 01:21:19 +00:00
Nick Mathewson
9199696182
Add some wrappers around SPLAY_* for the common map-from-string-to-X case.
...
It will probably be less blindingly fast than using SPLAY_* directly, but
only slightly so.
svn:r1306
2004-03-19 22:07:24 +00:00
Roger Dingledine
df3f37b84f
getpid returns a pid_t. we all know that's an int. but solaris doesn't know.
...
svn:r1305
2004-03-19 21:34:04 +00:00
Roger Dingledine
c195f69058
isspace and friends take an int. solaris cares.
...
svn:r1303
2004-03-19 20:50:12 +00:00
Roger Dingledine
6438a5db08
ship strlcat and strlcpy with the tarball, but don't compile them
...
svn:r1297
2004-03-19 06:39:52 +00:00
Roger Dingledine
7648c6c0ea
define INADDR_NONE so we compile on solaris
...
svn:r1295
2004-03-18 19:59:39 +00:00
Roger Dingledine
208625ae31
clean up some presentation and comments
...
svn:r1294
2004-03-18 19:22:56 +00:00
Nick Mathewson
971b002d93
Include strlcpy and strlcat where not available, so our string ops can be less error-prone.
...
svn:r1289
2004-03-17 07:28:09 +00:00
Roger Dingledine
a346889e94
make directory format tests quiet again
...
svn:r1287
2004-03-15 05:13:25 +00:00
Roger Dingledine
0b9c140102
make it warn about internal IPs not only if we had to guess,
...
but also if they used a hostname rather than an IP
svn:r1285
2004-03-15 04:57:24 +00:00
Roger Dingledine
70cc557a18
only complain about private IPs if we had to guess
...
svn:r1279
2004-03-15 04:04:16 +00:00
Roger Dingledine
be18884765
and another one
...
svn:r1278
2004-03-15 04:00:14 +00:00
Roger Dingledine
6a2821a7ff
fix a byte order bug
...
svn:r1277
2004-03-15 04:00:11 +00:00
Roger Dingledine
fdc5751c60
bugfix: address that strcat vulnerability in circuit.c
...
svn:r1273
2004-03-14 22:47:11 +00:00
Roger Dingledine
5d41346b67
prevent servers from publishing an internal IP as their address
...
svn:r1272
2004-03-14 18:12:59 +00:00
Roger Dingledine
f55ff5b8d2
teach us to recognize internal IPs
...
svn:r1271
2004-03-14 18:07:46 +00:00
Roger Dingledine
74ef3a63ae
bugfix: decrement OR connections from global_bucket too
...
bugfix: don't return immediately for has_pending_tls_data unless
the conn is allowed to read
svn:r1270
2004-03-14 17:06:29 +00:00
Roger Dingledine
703b2d3cf8
refactor bandwidth-control token buckets
...
this is a checkpoint commit; there still remain some
bugs, er, somewhere.
svn:r1269
2004-03-14 16:00:52 +00:00
Roger Dingledine
3ccd545c9a
crash when our logs go bad
...
nick, can you think of a better response here?
svn:r1268
2004-03-14 15:50:00 +00:00
Roger Dingledine
1ae45b771e
don't close all the fd's when you spawn a thread, only when you fork
...
svn:r1267
2004-03-12 21:52:15 +00:00
Roger Dingledine
965a73dc71
bugfix: we were caching transient dns failures
...
svn:r1266
2004-03-12 18:45:42 +00:00
Roger Dingledine
45a3f6b97c
more pesky tabs
...
svn:r1265
2004-03-12 13:02:16 +00:00
Roger Dingledine
87797bcde5
get rid of those pesky tabs
...
svn:r1264
2004-03-12 13:00:34 +00:00
Roger Dingledine
6af8d0606f
inform unapproved servers when we reject their descriptors
...
svn:r1263
2004-03-12 12:43:13 +00:00
Roger Dingledine
623cb0e311
more details when a conn is closed before it's done flushing
...
svn:r1262
2004-03-12 08:16:48 +00:00
Roger Dingledine
52e813951a
start tracking the 'broken pipe' error
...
svn:r1261
2004-03-11 20:15:53 +00:00
Nick Mathewson
976bacae94
Make all the other read/writes into recv/sends, except when they shouldn't be.
...
svn:r1260
2004-03-11 06:35:03 +00:00
Nick Mathewson
060d721554
UnDOSify CRLF->LF.
...
svn:r1259
2004-03-11 06:22:53 +00:00
Nick Mathewson
9b4203266e
Make OP work on windows! (Also misc logging tweaks)
...
svn:r1258
2004-03-11 06:19:08 +00:00
Nick Mathewson
59e2c77824
Get entropy in windows.
...
svn:r1257
2004-03-11 05:14:06 +00:00
Roger Dingledine
8e4f1f67fa
actually, if recommendedversions is required for dirservers,
...
then require it.
svn:r1253
2004-03-10 07:44:31 +00:00
Roger Dingledine
3ba392e69f
give a useful error message to clients when the dirserver hasn't
...
defined any recommended versions
svn:r1252
2004-03-10 07:02:56 +00:00
Nick Mathewson
2f103ccf6f
Some stuff *should* be signed
...
svn:r1251
2004-03-10 06:57:57 +00:00
Nick Mathewson
d877aac5ad
Make windows version correct; initialize windows foolishness so that gethostbyname works.
...
svn:r1250
2004-03-10 06:26:38 +00:00
Nick Mathewson
c230132562
Fix some bugs in parse_time
...
svn:r1249
2004-03-09 22:17:35 +00:00
Nick Mathewson
0e5a134709
Fix DOS line endings; autoconfize checks for strptime and inet_aton
...
svn:r1248
2004-03-09 22:09:13 +00:00
Nick Mathewson
2da54de968
Make tor build on windows again. More work still needed
...
svn:r1247
2004-03-09 22:01:17 +00:00
Roger Dingledine
30969421d3
stop troubling router operators with unapproved router connect attempts
...
but give the dirserver operator more information
svn:r1246
2004-03-09 14:53:00 +00:00
Roger Dingledine
416993afc1
bugfix: only set conn->hold_open_until_flushed after marking
...
svn:r1245
2004-03-08 01:19:57 +00:00
Roger Dingledine
6e22801e0f
when you get a desc from an unknown router, log its fingerprint
...
svn:r1244
2004-03-08 00:15:40 +00:00
Roger Dingledine
20f11f1800
clarifying comment for crypto_pk_get_fingerprint
...
svn:r1243
2004-03-08 00:11:37 +00:00
Roger Dingledine
0ab367ed91
re-try streams at most 4 times
...
svn:r1242
2004-03-07 23:50:15 +00:00
Roger Dingledine
694d287774
improve comments for server operators (maybe)
...
svn:r1241
2004-03-07 10:18:15 +00:00
Roger Dingledine
10cee8b7f7
fix a rare race condition: when we send a cell and then
...
mark an OR connection expired, we might close it before
finishing a flush if the other side isn't reading.
svn:r1240
2004-03-06 06:05:00 +00:00
Roger Dingledine
516ef41ac1
if a stream times out after 15s without a connected cell,
...
don't try that circuit again.
svn:r1239
2004-03-06 05:10:07 +00:00
Roger Dingledine
c362ed877d
if the directory client hangs up before getting the directory,
...
then give up on him
svn:r1238
2004-03-06 05:09:33 +00:00
Roger Dingledine
6c9d78b319
stop asserting that computers always go forward in time
...
it's simply not true
svn:r1236
2004-03-06 01:43:37 +00:00
Nick Mathewson
1e5b7bc6f1
New, more flexible directory parsing backend. Uses a bit more RAM, but implements the new spec. Uses more RAM, but not so you would notice.
...
svn:r1235
2004-03-05 05:48:28 +00:00
Roger Dingledine
01e06148a1
make workers explain their death better when tor dies
...
and make them say it at log level info rather than err
svn:r1232
2004-03-04 21:26:23 +00:00
Roger Dingledine
8fe504fee6
bugfix: don't pass complex things to the connection_mark_for_close macro
...
svn:r1231
2004-03-04 20:49:38 +00:00
Nick Mathewson
c03e9206ae
Clean up dns->connection_mark_for_close->dns_remove path
...
svn:r1230
2004-03-04 18:43:44 +00:00
Roger Dingledine
89d9d80e76
Store options->Address as IP, not hostname
...
And figure it out while reading config, not every time you
rebuild the descriptor
svn:r1226
2004-03-04 01:53:56 +00:00
Nick Mathewson
b7633e2e67
Try to find out early if buffers get trashed or double-freed.
...
svn:r1225
2004-03-03 22:49:15 +00:00
Roger Dingledine
5e2e6555a2
and a minor patch
...
svn:r1215
2004-03-03 08:48:32 +00:00
Roger Dingledine
419a672222
holding until flush was borked
...
we were never writing anything when hold_open_until_flushed was set,
since conn_write returns early if marked_for_conn is set.
seems a bit better now.
svn:r1214
2004-03-03 08:46:18 +00:00
Roger Dingledine
6022bfea11
better debugging for lonely flushes
...
svn:r1213
2004-03-03 07:26:58 +00:00
Roger Dingledine
d8e5f3a3a2
close immediately when write() fails too, else things will turn bad
...
svn:r1212
2004-03-03 07:26:34 +00:00
Roger Dingledine
dbdd2eaa2a
don't mark_for_close again when the destroy arrives after the end cell
...
svn:r1211
2004-03-03 07:24:53 +00:00
Roger Dingledine
3c71d09402
use conn->hold_open_until_flushed for streams
...
and also note/fix a variety of other stream-based bugs
svn:r1210
2004-03-03 06:26:34 +00:00
Nick Mathewson
f4e4dac801
Implement hold_open_until_flushed. I may have missed something important.
...
svn:r1209
2004-03-03 05:08:01 +00:00
Roger Dingledine
8275e2302c
make socks5 not give a spurious warning
...
also rename AP_CONN_STATE_CONNECTING to _CONNECT_WAIT
svn:r1208
2004-03-03 04:54:16 +00:00
Roger Dingledine
77bb3e054e
reenable part of assert_circuit_ok, leave some still disabled
...
svn:r1207
2004-03-03 04:11:18 +00:00
Roger Dingledine
de146de0c5
make circuit-building less noisy when a node in your exclude/exit/entrynodes is down
...
svn:r1206
2004-03-03 03:02:06 +00:00
Nick Mathewson
20ecb66c7d
Fix (maybe) assert_circuit_ok. leave it disabled till arma confirms
...
svn:r1205
2004-03-03 02:24:17 +00:00
Nick Mathewson
5a053a6a81
remove redundant check
...
svn:r1204
2004-03-03 02:14:35 +00:00
Nick Mathewson
6379dbbe2a
warn more when losing data on closed/marked connections.
...
svn:r1203
2004-03-03 02:07:57 +00:00
Roger Dingledine
49281424ae
bugfix: close_immediate called buf_clear but listeners don't have bufs
...
svn:r1202
2004-03-03 01:58:45 +00:00
Nick Mathewson
5985aef18a
Nth time is the charm on list manip.
...
svn:r1201
2004-03-03 01:37:54 +00:00
Roger Dingledine
4f6cf727b9
fix a pair of lurking segfaults
...
svn:r1198
2004-03-02 18:08:07 +00:00
Nick Mathewson
6f3c6d1289
Split out mark_for_close with circuits. Seems to work for me.
...
svn:r1197
2004-03-02 17:48:17 +00:00
Nick Mathewson
a1e4c6dc85
Fix assertion failure spotted by arma.
...
Apparently, when a DNS failure was already cached, then when we tried
to mark the exit connection as closed, we'd try to remove it from the
pending queue anyway, and hit an assert. Now, we put failed-resolve
connections in a separate state so that mark_for_close does the right
thing.
svn:r1196
2004-03-02 07:24:11 +00:00
Roger Dingledine
b961732246
add --version, note that --help is probably obsolete
...
svn:r1195
2004-03-02 05:19:01 +00:00
Roger Dingledine
1147289dc0
make config_assign fail rather than warn for unrecognized config options
...
svn:r1194
2004-03-02 05:00:50 +00:00
Roger Dingledine
08346f13f0
make parse_line_from_file fail rather than warn for malformed lines
...
svn:r1193
2004-03-02 04:59:52 +00:00
Roger Dingledine
f81ad1550e
note an assert trigger bug
...
nick, want to fix this? :)
svn:r1192
2004-03-01 12:37:45 +00:00
Nick Mathewson
5072488a95
make 'make test' exit(1) if a test fails.
...
svn:r1190
2004-03-01 06:45:32 +00:00
Roger Dingledine
2c341cd032
put switch_id and start_daemon earlier
...
svn:r1188
2004-02-29 22:34:38 +00:00
Roger Dingledine
e2881631cf
fix duplicate call to connection_mark_for_close
...
svn:r1187
2004-02-29 22:07:44 +00:00
Roger Dingledine
2ac37c64f2
bugfix: we were checking the wrong thing to see if 'reason'
...
was out of range
svn:r1186
2004-02-29 22:04:52 +00:00
Roger Dingledine
8e5c1921fc
when a stream is 15s late, print out the circuit at -l warn
...
svn:r1180
2004-02-29 09:15:29 +00:00
Roger Dingledine
ef5f917e9e
print a statement when the first circ is finished,
...
so the user knows it's working
svn:r1179
2004-02-29 03:52:38 +00:00
Roger Dingledine
4716d4d871
bugfix: only warn about an unrouter router after we've fetched a directory
...
svn:r1178
2004-02-29 01:31:33 +00:00
Roger Dingledine
b4338ce704
disable buffer tests, until we rewrite them (one of them fails)
...
svn:r1177
2004-02-29 00:15:20 +00:00
Roger Dingledine
195ee8c845
create a separate connection_edge_destroy() function
...
svn:r1176
2004-02-29 00:11:37 +00:00
Roger Dingledine
62d3df8633
bugfix: when we time out on a stream and detach, send an end first
...
svn:r1175
2004-02-28 23:56:50 +00:00
Roger Dingledine
ae67c48805
bugfix: in some cases, connection_mark_for_close wasn't marking the conn
...
svn:r1174
2004-02-28 23:52:56 +00:00
Roger Dingledine
3fb9c869a8
clearer warning message
...
svn:r1173
2004-02-28 23:31:15 +00:00
Roger Dingledine
c058f87513
disallow changing from ORPort==0 to ORPort>0 on hup
...
svn:r1172
2004-02-28 23:30:41 +00:00
Roger Dingledine
928db6dadc
cwd to datadir if it's defined, rather than /
...
this way people can get cores if they want to
svn:r1171
2004-02-28 23:23:06 +00:00
Roger Dingledine
5cf0b6224b
bugfix: stop trying to write to a stderr that may not be there
...
also, tell start_daemon our desired cwd
svn:r1170
2004-02-28 23:21:29 +00:00
Roger Dingledine
5701cc2359
fix the function comment
...
svn:r1169
2004-02-28 22:34:47 +00:00
Nick Mathewson
0a673f4491
Split dns_cancel_pending_resolve into dns_cancel_pending_resolve (kill a
...
resolve in response to a DNS worker dying) and connection_dns_remove (remove
a pending connection from the resolve structure.)
svn:r1168
2004-02-28 22:23:44 +00:00
Roger Dingledine
9a55700747
add a log_warn to notify us of yet another potential dns.c bug
...
svn:r1167
2004-02-28 22:13:58 +00:00
Nick Mathewson
833d14246d
Make dns_cancel_pending_resolve less agressive.
...
svn:r1166
2004-02-28 22:06:59 +00:00
Nick Mathewson
55174d1cb0
Fix bug on dns_found_answer from mark_to_close stuff.
...
svn:r1165
2004-02-28 21:52:58 +00:00
Roger Dingledine
fadfd26188
remove assert from dns.c that's no longer true:
...
typically the resolve will be pending, but it could be failed if it
just failed and we're working through the 'pending' list, or it could
be valid if some other dnsworker raced us to fill in the entry.
svn:r1164
2004-02-28 21:49:10 +00:00
Nick Mathewson
f039eca658
Stop trying to flush on broken sockets marked for close.
...
svn:r1163
2004-02-28 19:14:11 +00:00
Roger Dingledine
80410fa8dc
some comments to point nick at the latest bugs
...
svn:r1162
2004-02-28 11:48:22 +00:00
Roger Dingledine
d1deb753db
better explain exit policies in the torrc
...
svn:r1161
2004-02-28 11:44:07 +00:00
Roger Dingledine
cec2eee533
enable assert_connection_ok()
...
we weren't actually asserting much. oops.
svn:r1160
2004-02-28 07:51:30 +00:00
Roger Dingledine
70c43e152a
note bug in assert_connection_ok
...
svn:r1159
2004-02-28 07:48:28 +00:00
Roger Dingledine
dd632e697e
clean up some log messages and severities
...
still plenty more left to clean
svn:r1158
2004-02-28 07:01:22 +00:00
Roger Dingledine
a24b6e6d4f
make flush_buf have a sane return convention
...
svn:r1157
2004-02-28 05:22:07 +00:00
Roger Dingledine
b354ecfecd
rename ExcludedNodes config option to ExcludeNodes
...
svn:r1155
2004-02-28 05:09:37 +00:00
Roger Dingledine
3a1a6bb09e
if a relay cell is unrecognized at the end of the circuit,
...
send back a destroy
svn:r1153
2004-02-28 04:48:46 +00:00
Roger Dingledine
e59f19ca03
some more small fixes
...
svn:r1152
2004-02-28 04:44:48 +00:00
Nick Mathewson
b4a7883c90
make code more readable; arrbitrarily change a -1 to a 0.
...
svn:r1151
2004-02-28 04:34:27 +00:00
Nick Mathewson
ee68371f41
Stop answering "end" with "end"
...
svn:r1150
2004-02-28 04:25:54 +00:00
Nick Mathewson
4e89c6661a
Push responsibility for connection marking down as far as possible; have only a close path; add some missing end cells; change return conventions a little.
...
svn:r1149
2004-02-28 04:11:53 +00:00
Nick Mathewson
88e222ff76
Make has_sent_end irrelevant: only try to send end if reason is nonzero
...
svn:r1148
2004-02-28 03:06:31 +00:00
Roger Dingledine
d0ad9b147a
and another one
...
svn:r1147
2004-02-27 23:30:27 +00:00
Roger Dingledine
611f117ce1
patches/answers to nick's commit
...
svn:r1146
2004-02-27 23:23:33 +00:00
Nick Mathewson
c5bbb571d2
Refactor mark_for_close, connection_edge_end and friends. Now, everybody
...
who wants to shut down a connection calls connection_mark_for_close instead
of setting marked_for_close to 1. This automatically removes the connection
from the DNS cache if needed, sends a RELAY END cell if appropriate, and can
be changed to do whatever else is needed.
Still to do:
- The same for circuits, maybe.
- Add some kind of hold_connection_open_until_flushed flag, maybe.
- Change stuff that closes connections with return -1 to use mark_for_close,
maybe.
svn:r1145
2004-02-27 22:00:26 +00:00
Roger Dingledine
737b2a0bf1
make 'connected' cells include the resolved IP
...
svn:r1143
2004-02-27 04:52:02 +00:00
Roger Dingledine
195dfd35a8
Fix a bug where you might flush some data on a tls connection, and then
...
add some more data to be flushed but never turn POLLOUT on. not sure
how commonly this bug was hit, but it would be a doozy.
Also add some asserts to see if it happens elsewhere.
svn:r1142
2004-02-27 04:42:14 +00:00
Roger Dingledine
1b3c197fad
clean up an ia64 warning
...
svn:r1140
2004-02-27 01:59:36 +00:00
Peter Palfrader
1bc2384c5a
Give the nice message about not being an HTTP proxy an <h1> headline
...
svn:r1139
2004-02-27 01:33:02 +00:00
Roger Dingledine
d3e9afda27
When it can't resolve any dirservers, it was useless from then on.
...
Now it reloads the RouterFile (or default dirservers) if it has no
dirservers.
svn:r1130
2004-02-26 22:56:36 +00:00
Roger Dingledine
4c48359ece
break out the operations done on sighup into their own function
...
svn:r1129
2004-02-26 22:30:44 +00:00
Roger Dingledine
43156904ce
dump a new router.desc on hup
...
svn:r1128
2004-02-26 22:20:00 +00:00
Roger Dingledine
2c74f19d7e
writing html in C strings sucks
...
svn:r1127
2004-02-26 22:10:55 +00:00
Roger Dingledine
8f2b429a3b
when they use tor as an http proxy, give them an http 501 failure
...
svn:r1126
2004-02-26 22:02:22 +00:00
Roger Dingledine
0b27ae0c2d
if the default torrc isn't there, just use some default defaults
...
plus provide an internal dirservers file if they don't have one
having no config files will make it easier to run on windows
svn:r1124
2004-02-26 21:25:51 +00:00
Nick Mathewson
496e414e52
Basic RAM poisoning and magic-checking to notice connection and circuit
...
corruption faster; also, check for corruption in dns.c so we can fail fast
for the bug that's nailing Lucky and moria3.
svn:r1123
2004-02-25 07:31:46 +00:00
Roger Dingledine
1b25794a56
bugfix: if the exit stream is pending on the resolve, and a destroy
...
arrives, then the stream wasn't getting removed from the pending list.
this may have been the lucky-bug.
this commit may also not actually fix the bug. it's darn hard to
reproduce.
svn:r1122
2004-02-25 06:57:57 +00:00
Roger Dingledine
8da2e00a83
remove dead code
...
svn:r1121
2004-02-25 06:56:11 +00:00
Roger Dingledine
01e7b8638d
move the tor program back to usr/bin/
...
svn:r1119
2004-02-25 06:41:21 +00:00
Roger Dingledine
7985f525ec
fix some bugs in assert_connection_ok
...
svn:r1118
2004-02-24 22:33:30 +00:00
Roger Dingledine
598f8b5661
start hunting the lucky-bug
...
svn:r1116
2004-02-22 20:50:20 +00:00
Nick Mathewson
67a273962a
On OSX, decline to use the built-in select-baed poll wrapper, since it seems to sometimes not work.
...
svn:r1114
2004-02-20 23:41:45 +00:00
Roger Dingledine
f202d38191
patch from vicman to publish less platform information
...
svn:r1111
2004-02-18 21:23:50 +00:00
Roger Dingledine
67c0c64aa4
go back to a single exitpolicy parameter
...
if your exitpolicy includes " *:*" then it is final,
else we append the default exit policy.
(thanks weasel)
svn:r1105
2004-02-18 07:23:38 +00:00
Roger Dingledine
4e178907ab
allow imaps and pop3s in default exit policy
...
svn:r1104
2004-02-18 04:02:05 +00:00
Roger Dingledine
7562a62ef0
Get rid of the notion of a separate default default exit policy.
...
Create ExitPolicyPrepend config parameter, to customize the default
exit policy.
svn:r1103
2004-02-18 03:56:12 +00:00
Roger Dingledine
c9d9b9b2a7
we define some big constant arrays but don't use them
...
svn:r1102
2004-02-18 03:17:35 +00:00
Roger Dingledine
3456adec31
adding the reattach-after-timeout feature wasn't so easy after all.
...
maybe it works now.
svn:r1101
2004-02-18 01:21:20 +00:00
Roger Dingledine
39efb0ed52
retry streams where the connected cell hasn't arrived in 15 seconds
...
svn:r1100
2004-02-17 21:07:15 +00:00
Nick Mathewson
72568d2620
Another case of the same.
...
svn:r1099
2004-02-17 08:52:57 +00:00
Nick Mathewson
bab6c0a332
Fix the Big Bug in router_compare_addr_to_exit_policy: we used port 0
...
to mean "unknown port". But no exit policy supports (nonexistant)
port 0, except accept *:*, and we had no special handling for 'unknown port'.
Now we do.
svn:r1098
2004-02-17 08:52:03 +00:00
Roger Dingledine
46ffc5984d
best_support_idx is obsolete
...
(also doesn't fix the bug)
svn:r1097
2004-02-17 08:42:25 +00:00
Nick Mathewson
bd14023afd
Propagate yes/no/maybe a little farther forward.
...
svn:r1096
2004-02-17 08:29:22 +00:00
Roger Dingledine
d081d1d061
make braces cleaner, bug still persists
...
svn:r1095
2004-02-17 08:10:07 +00:00
Nick Mathewson
61756b5893
Fix router_compare_addr_to_exit_policy, and name its return codes. The bug was: "maybe reject,accept" should be "maybe", not "accept".
...
svn:r1093
2004-02-17 07:56:33 +00:00
Roger Dingledine
d508a194f7
Let paranoid exit nodes (which default to reject) be exit nodes
...
Before we resolve the hostname, we don't know whether its IP will be accepted or rejected by the exit policy of each host. So we were only going with nodes that would certainly accept -- which
was just itys and poblano.
(This bug was hidden until now by the earlier port bug.)
(Actual bugfix pending on Nick's next commit, hopefully.)
svn:r1092
2004-02-17 07:45:44 +00:00
Roger Dingledine
1801bd7592
prevent picking middleman nodes as the last node in the circuit
...
svn:r1088
2004-02-17 06:39:20 +00:00
Roger Dingledine
a8d8b82662
install the 'tor' binary to usr/sbin by default
...
svn:r1082
2004-02-17 04:48:01 +00:00
Nick Mathewson
17adfa9dfd
log when exit situation is hopeless.
...
svn:r1057
2004-02-04 22:35:58 +00:00
Roger Dingledine
f00dc6fe1e
last minute fix: don't early-flush non-tls streams
...
e.g., this breaks directory service
svn:r1033
2004-01-31 00:36:00 +00:00
Roger Dingledine
f6f9b1d94d
for perf testing, paths are always 3 hops, not "3 or more"
...
svn:r1030
2004-01-30 23:43:17 +00:00
Roger Dingledine
e05d39d1af
fix a per-circuit memory leak
...
svn:r1029
2004-01-30 21:32:40 +00:00
Nick Mathewson
a81435c64e
Another related leak
...
svn:r1028
2004-01-30 21:16:51 +00:00
Nick Mathewson
e4ad1f1629
Freeing twice does *not* make the heap twice as clean.
...
svn:r1027
2004-01-30 21:05:47 +00:00
Nick Mathewson
88b579dd33
Fix a bug that might have caused the leak, but which might have been hiding other bugs.
...
svn:r1026
2004-01-30 20:59:15 +00:00
Nick Mathewson
6c3f55526a
Fix possible (but unlikely) mem leak.
...
svn:r1025
2004-01-30 20:38:08 +00:00
Roger Dingledine
7651b09c8a
finally locate the memory leak,
...
plus commit a patch that doesn't fix it
(but doesn't hurt? i dunno)
svn:r1024
2004-01-30 20:33:04 +00:00
Roger Dingledine
afdaff63ef
turn some knobs, add more debugging
...
svn:r1023
2004-01-30 19:31:39 +00:00
Roger Dingledine
b42b16357f
note an assert trigger, if you use an old broken netscape socks4
...
svn:r1022
2004-01-30 15:15:11 +00:00
Roger Dingledine
deda0d93dd
Let AP edges receive 'end' relay cells while waiting for 'connected'
...
svn:r1012
2004-01-20 18:17:43 +00:00
Roger Dingledine
3516ae1a26
add an ap_conn connecting state; report connecting delay
...
svn:r1011
2004-01-20 09:21:46 +00:00
Roger Dingledine
61723a1f69
small default route when doing speed testing
...
svn:r1010
2004-01-20 03:12:46 +00:00
Roger Dingledine
f5ebf4c712
push out a tls record's worth of data once you've got it
...
svn:r1009
2004-01-20 02:14:51 +00:00
Roger Dingledine
585c2efe87
add TOR_PERF macro options
...
svn:r1008
2004-01-20 02:14:30 +00:00
Roger Dingledine
c12a6f58b5
fix typo
...
svn:r1007
2004-01-20 02:14:12 +00:00
Roger Dingledine
fb81a32c68
setuid to User _before_ complaining about running as root
...
svn:r1006
2004-01-19 06:12:32 +00:00
Roger Dingledine
522982f8e9
fix assert trigger in server
...
Jan 18 04:11:43.312 [warn] connection_edge_send_command(): no circ. Closing.
i think it was while sending a connected relay cell back.
reason for having the circ gone is still not known. presumably the end cell
arrived at just the right time.
svn:r1005
2004-01-19 04:58:39 +00:00
Roger Dingledine
561c6236af
fix some errors in logs and comments
...
svn:r999
2004-01-16 08:27:17 +00:00
Nick Mathewson
793c65e60f
Note discrepency between N bytes transmitted over TLS and actual bandwidth use; add 2 functions to help resolve.
...
svn:r986
2004-01-13 01:19:02 +00:00
Roger Dingledine
b669b1d57c
oh, and make it compile
...
still need to make a decision about per-connection rate limiting
(take it out? update it?)
svn:r984
2004-01-11 07:41:01 +00:00
Roger Dingledine
5086300815
split the token bucket into 'rate' and 'burst' params
...
we're not entirely migrated to burst yet, for backward compatibility
note some win32 probable-bugs
clean up routerlist.c
svn:r982
2004-01-10 23:40:38 +00:00
Roger Dingledine
db0c27b362
resolve cygwin warnings for pre19
...
svn:r981
2004-01-08 22:48:18 +00:00
Roger Dingledine
c485725c5a
Fix the dns bug: children weren't dying
...
We were telling a child to die by closing the parent's file descriptor
to him. But newer children were inheriting the open file descriptor from
the parent, and since they weren't closing them, the socket never closed,
so the child never read eof, so he never knew to exit.
As a side effect to this bug, we were probably failing to properly close
connections to remote hosts, ORs, and OPs, after a dns child was born.
I'm surprised Tor worked at all.
svn:r974
2004-01-06 07:53:40 +00:00
Roger Dingledine
d6ce65afd6
the onionskin challenge length was 30 bytes longer than necessary
...
(i think ;)
svn:r971
2004-01-05 05:23:03 +00:00
Roger Dingledine
607078cf70
print an entry at the top of the logfile so you know it's working
...
clean up a minor bug in a debugfile log entry
svn:r970
2004-01-05 05:22:04 +00:00
Nick Mathewson
cacacfe2b1
Integrate new daemon code, adapted from submission by christian grothoff
...
svn:r969
2004-01-03 22:40:49 +00:00
Roger Dingledine
53061b3778
fix endian issue: rh.integrity was getting sent wrong
...
now it's a char[4] rather than an int
svn:r966
2004-01-02 09:03:38 +00:00
Roger Dingledine
c2e37901be
stop a bug that straycat may have found
...
svn:r964
2004-01-01 07:01:09 +00:00
Roger Dingledine
8085235e5f
make loglevel info less noisy
...
svn:r961
2003-12-30 22:49:35 +00:00
Roger Dingledine
f3fdbadfdf
randomize the initial circ_id and stream_id, so an adversary who
...
breaks in part-way through can't learn how many circs/streams have
been made
svn:r960
2003-12-28 04:46:09 +00:00
Roger Dingledine
71739b486a
back out the insert-padding-if-conflict code
...
use recognized + digest instead, just assume it's enough bits
svn:r959
2003-12-26 06:29:57 +00:00
Roger Dingledine
43fcb70bad
checkpoint: revamp relay cell packaging and handling
...
include the infrastructure for inserting padding cells when there's
a relay-recognized conflict, but it does not work currently.
svn:r958
2003-12-23 07:45:31 +00:00
Roger Dingledine
bc8c6732cb
add crypto_cipher_rewind to reverse crypto_cipher_advance
...
svn:r957
2003-12-23 07:43:05 +00:00
Roger Dingledine
55a94cd497
correct a warn message in mark_if_closed
...
svn:r956
2003-12-23 07:42:01 +00:00
Roger Dingledine
ad93c0a2bd
make sure there's no conflict when generating stream_ids
...
svn:r955
2003-12-19 21:25:44 +00:00
Roger Dingledine
a5e6ec244f
rename circ_id_t to uint16_t for code clarity
...
change message when using non-recommended tor version
svn:r954
2003-12-19 19:55:02 +00:00
Roger Dingledine
45a66c6955
make a relay_header_t struct and pack/unpack funcs
...
split 7-byte stream_id string into 2-byte recognized and 2-byte stream_id
fix two seg faults in fetch_from_buf_http
fix several lurking seg faults in handling unexpected relay cells
still need to
* clean up relay_crypt
* use relay dummies if there's going to be a conflict with rh.recognized
* check for a conflict when generating stream_ids
svn:r953
2003-12-19 05:09:51 +00:00
Roger Dingledine
eb730c41c8
clean tabs, trailing whitespace
...
svn:r952
2003-12-17 21:14:13 +00:00
Roger Dingledine
6a19e64066
remove trailing whitespace
...
svn:r951
2003-12-17 21:09:31 +00:00
Roger Dingledine
5ecd6b6bad
make fetch_from_buf_http malloc its strings rather
...
than use fixed-size strings
reorganize directory_handle_command so it'll be easier to do more with
our directory servers
svn:r950
2003-12-17 09:42:28 +00:00
Roger Dingledine
4a1e05de51
betcha didn't know strncpy could leave an unterminated string
...
svn:r949
2003-12-17 09:20:29 +00:00
Roger Dingledine
aba237e3e2
end-to-end integrity checking now works
...
initialize digests from shared secrets at handshake
make circuit_send_next_onion_skin use connection_edge_send_command
svn:r948
2003-12-17 05:58:30 +00:00
Roger Dingledine
389eb48690
document an openssl gotcha
...
svn:r947
2003-12-17 05:31:52 +00:00
Roger Dingledine
21cc01299b
infrastructure for integrity-checks in relay cells
...
make circuit_consider_sending_sendme use connection_edge_send_command
fix endian bug in relay length handling (maybe)
svn:r946
2003-12-16 22:56:50 +00:00
Roger Dingledine
4e50f79b11
resolve an edge case in get_unique_circ_id_by_conn
...
svn:r944
2003-12-16 20:45:10 +00:00
Roger Dingledine
8712a30e91
move cell size to 512 bytes
...
move length to 2 bytes, put it in the relay header
remove 4 reserved bytes in cell
add 4 bytes to relay header for the integrity check
svn:r942
2003-12-16 09:48:17 +00:00
Roger Dingledine
961ecf7abf
add H(K|1) to the onionskin reply
...
verify it at the client end
abstract the onionskin handshake lengths
breaks backward compatibility (again)
svn:r941
2003-12-16 08:21:58 +00:00
Roger Dingledine
f3b165fdc0
change crypto_digest_new_env to crypto_new_digest_env
...
(and same with _free_)
to match our conventions
i think our conventions may be getting too ad hoc
svn:r940
2003-12-16 08:13:26 +00:00
Roger Dingledine
e358a362ee
rename digest_copy to digest_dup, make it return, make gcc happier
...
svn:r939
2003-12-16 05:47:21 +00:00
Nick Mathewson
7c439c30d0
Resolve format warnings on MacOS X 10.3
...
svn:r938
2003-12-16 05:33:11 +00:00
Nick Mathewson
eeae6157ed
Add more fine-grained SHA1 functionality.
...
svn:r937
2003-12-16 05:29:04 +00:00
Nick Mathewson
4885e90490
Make compile warning-free on cygwin
...
svn:r936
2003-12-15 21:35:52 +00:00
Roger Dingledine
a5aa80cc41
make --debuglogfile (or any second log file) work
...
svn:r935
2003-12-14 09:58:43 +00:00
Roger Dingledine
08534a6271
start tracking the 'It appears I've already sent the end' warning
...
svn:r932
2003-12-14 08:32:14 +00:00
Roger Dingledine
0ea88d508d
oops, i broke buffers. fixed.
...
svn:r931
2003-12-14 08:15:41 +00:00
Roger Dingledine
f9bdb8a0da
document aborted attempt to merge client dns cache with server dns cache
...
svn:r930
2003-12-14 07:50:45 +00:00
Roger Dingledine
7d58bfbd50
change dns notation from question/answer to address/addr
...
svn:r929
2003-12-14 07:40:47 +00:00
Roger Dingledine
8f573c06c3
start to track the 'unexpected relay cell' warning
...
svn:r928
2003-12-14 06:50:44 +00:00
Roger Dingledine
36ea39ec9c
on hup, close and rebind listener ports too (in case their config has changed)
...
svn:r926
2003-12-14 06:03:46 +00:00
Roger Dingledine
50e17d633b
clean up some file-scope-global directory variables
...
svn:r925
2003-12-14 05:25:23 +00:00
Roger Dingledine
1096eae543
add options.ExcludedNodes -- nodes that are never picked in path building
...
svn:r924
2003-12-14 05:08:28 +00:00
Roger Dingledine
3465c4dee4
make it compile
...
svn:r923
2003-12-14 05:00:09 +00:00
Roger Dingledine
f4cb5d8c93
extend smartlist with _remove() and _subtract()
...
svn:r922
2003-12-14 04:57:47 +00:00
Roger Dingledine
2997ef8dd9
warn if you're running tor as root
...
svn:r921
2003-12-14 04:39:23 +00:00
Roger Dingledine
25e7e97d73
on HUP, retry OR connections, and stop clobbering the dirserver's routerlist
...
svn:r920
2003-12-14 04:33:18 +00:00
Roger Dingledine
05c05d6444
more friendly warning when there are too many dns workers
...
svn:r919
2003-12-14 04:19:12 +00:00
Roger Dingledine
9e3608ce7b
more friendly warning when a connection buffer overflows
...
svn:r918
2003-12-14 04:18:43 +00:00
Roger Dingledine
a1745b6895
slightly different default default exit policy.
...
svn:r917
2003-12-14 00:18:57 +00:00
Roger Dingledine
55d3ec028d
reject 0.0.0.0/8,reject 169.254.0.0/16
...
svn:r916
2003-12-14 00:17:44 +00:00
Roger Dingledine
29adf04683
more general cleanup
...
svn:r915
2003-12-14 00:12:02 +00:00
Roger Dingledine
444798dfb9
remove obsolete code
...
svn:r914
2003-12-14 00:11:48 +00:00
Nick Mathewson
fb95d99f79
Accept 1.2.3.4/x as a synonym for 1.2.3.4/x:* .
...
svn:r912
2003-12-14 00:04:29 +00:00
Roger Dingledine
78a7de300c
make options.ExitNodes work
...
if your best choices happen to include any of your preferred exit nodes,
you choose among just those preferred exit nodes.
svn:r911
2003-12-13 23:32:57 +00:00
Roger Dingledine
4d3d99fa0c
extend smartlist with a few smarter operations
...
svn:r910
2003-12-13 23:32:03 +00:00
Roger Dingledine
8222fe8e4f
clean up some copyrights
...
svn:r907
2003-12-13 22:53:17 +00:00
Roger Dingledine
03616803e6
bughunt: start tracking the bug mutiny found
...
svn:r906
2003-12-13 08:06:03 +00:00
Roger Dingledine
7a3a3ae1df
bugfix: a circuit that immediately failed still counts as a failed circuit
...
svn:r905
2003-12-13 07:42:18 +00:00
Roger Dingledine
9e6f4a3029
revamp circuit node selection to use smartlists:
...
* now we know for sure if an acceptable node is available; we
don't have to keep guessing and checking
* we try options.EntryNodes first for picking the first node
svn:r904
2003-12-13 07:01:46 +00:00
Roger Dingledine
5458ca39e8
minor tweaks to the smartlist operations
...
svn:r903
2003-12-13 06:56:21 +00:00
Nick Mathewson
911f155f94
Make default exit policy reject 127.*:*
...
svn:r902
2003-12-13 03:37:25 +00:00
Roger Dingledine
41bb717241
reasonably permissive exit policy if you don't set one
...
svn:r901
2003-12-13 02:53:35 +00:00
Roger Dingledine
865173d7a1
put the default exit policy in place
...
svn:r900
2003-12-13 02:52:54 +00:00
Nick Mathewson
f37f7daa2f
Add port ranges to exit policies
...
svn:r899
2003-12-13 02:44:02 +00:00
Roger Dingledine
c425f2e0ec
use the smartlist to pick random routers, rather than our own idiom
...
svn:r898
2003-12-13 01:43:21 +00:00
Roger Dingledine
1ae84fcbc1
add a 'smartlist' building block that picks random elements from a list
...
svn:r897
2003-12-13 01:42:44 +00:00
Roger Dingledine
9c66e2bf9a
if >=2 circs are being built that handle a given stream,
...
no need to have new circs handle it too.
svn:r896
2003-12-12 23:03:25 +00:00
Roger Dingledine
d23c66b041
make the license explicit on fakepoll.[ch]
...
svn:r895
2003-12-09 21:37:26 +00:00
Nick Mathewson
17269eff3c
Document parsing functions in routerlist.c, and separate parsing from non-parsing functions.
...
svn:r894
2003-12-09 04:29:52 +00:00
Roger Dingledine
38ce03d0e7
close the circuit when we get a truncated cell
...
svn:r893
2003-12-09 02:06:58 +00:00
Roger Dingledine
ea6c4f6348
our circuit symmetric key (for aes) is 127 bits, not 128 bits.
...
we accept that.
svn:r892
2003-12-09 01:04:40 +00:00
Roger Dingledine
48e42e9346
back out the broken change from yesterday
...
svn:r891
2003-12-09 01:04:11 +00:00
Nick Mathewson
ac552573dd
Make router/directory parsing nondestructive and more const-friendly
...
svn:r890
2003-12-08 23:45:37 +00:00
Roger Dingledine
8bd7c94bf6
general cleanups
...
svn:r889
2003-12-07 22:03:47 +00:00
Roger Dingledine
6a968495b1
declare the prototypes better
...
svn:r888
2003-12-06 06:01:42 +00:00
Roger Dingledine
c25fbd2676
break routers.c into router.c for stuff the router does,
...
and routerlist.c for handling routerlist.
svn:r887
2003-12-06 05:54:04 +00:00
Roger Dingledine
e0952d0773
terminology shift:
...
directory is the string that dirserv.c and directory.c deal with
routerlist is routerinfo's that are bundled together in routers.c
rename some of the get_routerlist functions to set_routerlist
preparing to break into router.c for stuff the router does,
and routerlist.c for handling routerlist.
svn:r886
2003-12-05 09:51:49 +00:00
Roger Dingledine
727a260a81
prevent assert failure on -HUP when options->PidFile==NULL
...
svn:r885
2003-12-03 22:00:20 +00:00
Roger Dingledine
c183789c96
OnionRouter config option is obsolete
...
svn:r883
2003-12-03 20:21:03 +00:00
Roger Dingledine
4f2d556508
choose randomly from running dirservers, not always the first one
...
svn:r881
2003-12-03 10:39:27 +00:00
Roger Dingledine
63f81bddae
pick nodes for a circuit only from those the directory says are up
...
svn:r880
2003-12-03 10:28:51 +00:00
Roger Dingledine
99db996aef
stop segfault when choose_good_exit_server returns NULL
...
svn:r879
2003-12-03 10:04:44 +00:00
Roger Dingledine
d172fdd300
fix vicious bug in connection_ap_attach_pending that caused it to
...
never work.
fix vicious bug in choose_good_exit_server that caused it to *skip over*
pending circuits, and look only at *non-pending circuits*, when choosing
a good exit node for the new circuit.
bugfix: remove incorrect asserts in circuit_get_newest()
svn:r876
2003-12-03 09:50:02 +00:00
Roger Dingledine
05b9c35173
assert that nobody asks for a random number between 0 and -1
...
svn:r875
2003-12-03 08:08:07 +00:00
Roger Dingledine
f65e871bfd
bugfix in exit node choice: we used to find the perfect exit node but then use the wrong one.
...
bugfix in connection_ap_can_use_exit: it was using the wrong port
bugfix: the OP now handles a port of '*' correctly when the IP is not
yet known and it's trying to guess whether a router's exit policy
might accept it.
we now don't ever pick exit routers which will reject *:*
attach_circuit now fails a new stream outright if it will never work.
when you get an 'end' cell that resolves an IP, now it will fail the circuit outright if no safe exit nodes exist for that IP.
don't try building a new circuit after an 'end' if a suitable one is
already on the way.
svn:r874
2003-12-03 08:06:55 +00:00
Roger Dingledine
fc98ca1a2d
stop expecting sample-server-torrc to be there
...
svn:r873
2003-12-02 22:43:23 +00:00
Roger Dingledine
af4192b172
start tracking a rare bug: package_raw_inbuf gets called with package_window 0
...
Nov 25 22:39:18.294 [warn] connection_edge_package_raw_inbuf(): called with package_window 0. T
ell Roger.
svn:r870
2003-11-30 10:10:29 +00:00
Roger Dingledine
3d37291e02
stop complaining as loudly when a dns resolve fails
...
svn:r869
2003-11-30 09:57:00 +00:00
Roger Dingledine
02ec2cdb34
bugfix: we were writing to stderr even when it's closed
...
svn:r868
2003-11-30 09:51:35 +00:00
Roger Dingledine
2de4fc2b7f
bump up header length when the dirserv reads http commands
...
Nov 23 12:10:26.556 [warn] fetch_from_buf_http(): headerlen 1487 larger than 1023. Failing.
Nov 23 12:10:26.556 [warn] directory_handle_command(): input too large. Failing.
svn:r867
2003-11-30 09:47:57 +00:00
Roger Dingledine
3818776f62
remove a conn_close_if_marked warning
...
Nov 27 15:45:19.003 [warn] connection_write_to_buf(): write_to_buf failed. Closing connection (fd 42).
Nov 27 15:45:19.010 [warn] conn_close_if_marked(): Conn (socket 42) still wants to flush. Losing 0 bytes!
svn:r866
2003-11-30 09:35:26 +00:00
Roger Dingledine
00de055f43
bugfix: an offline OP would leak all its sockets and stop working
...
svn:r865
2003-11-29 02:50:12 +00:00
Nick Mathewson
c52ee5e2af
Fix a few bugs in sending and receiving DNS results
...
svn:r864
2003-11-23 18:16:06 +00:00
Nick Mathewson
1155ae9b03
Bring assert_connection_ok up to date
...
svn:r863
2003-11-23 18:14:19 +00:00
Nick Mathewson
5e9ba094bc
Fix incorrect error message
...
svn:r862
2003-11-21 05:55:03 +00:00
Roger Dingledine
f53fe3cd7f
merge torrc.in and sample-server-torrc.in
...
svn:r858
2003-11-20 18:22:09 +00:00
Roger Dingledine
975bb68010
simplify: options.OnionRouter==1 iff options.ORPort>0
...
svn:r857
2003-11-20 17:49:45 +00:00
Roger Dingledine
91cf5e44cc
default log level is now warn
...
(info is too noisy)
svn:r855
2003-11-19 22:48:48 +00:00
Roger Dingledine
d6601f8cff
make pidfile default to null rather than writing to your cwd
...
svn:r853
2003-11-19 22:45:06 +00:00
Roger Dingledine
4565150db2
if you tell people that IgnoreVersion exists,
...
some of them will use it rather than upgrade.
svn:r852
2003-11-19 21:24:04 +00:00
Roger Dingledine
f5994416c4
bugfix and cleanups
...
svn:r848
2003-11-19 13:12:43 +00:00
Nick Mathewson
fd07872a72
Separate failure-count tracking from circuit-launching.
...
Increment failure counts only when circuits close without having been built.
Reset failure counts only on the second, and when circuits are done building.
svn:r847
2003-11-19 02:22:52 +00:00
Peter Palfrader
9a676b04dd
Check that we can write to the logfile and log a warning to stderr if we can't
...
Move writing of pidfile after daemonizing, and also after setting the [ug]id:
This means that the tor user needs write priviliges to the pidfile location.
It needs it for unlinking the pidfile anyway.
svn:r846
2003-11-19 02:09:43 +00:00
Nick Mathewson
3d145769de
Patch last patch to last patch
...
svn:r845
2003-11-19 01:35:44 +00:00
Nick Mathewson
312208eff1
removed unused variable; silence warning
...
svn:r844
2003-11-19 01:32:34 +00:00
Nick Mathewson
dde0eb6570
Patch last patch.
...
svn:r843
2003-11-19 01:28:57 +00:00
Nick Mathewson
0e5abcb635
Skip non-running routers for exit node selection
...
svn:r842
2003-11-19 01:24:19 +00:00
Roger Dingledine
25ac8857f3
bugfix: sometimes we closed a circ while cpuworker was cranking,
...
and it didn't notice
svn:r841
2003-11-18 21:12:17 +00:00
Roger Dingledine
a6595f4579
revert part of that last change
...
time for bed
svn:r840
2003-11-18 10:38:13 +00:00
Roger Dingledine
c00953d2a1
make more sure we can't end up with two connections to the same OR
...
fix leaked pk in connection_tls_finish_handshake
svn:r839
2003-11-18 10:17:52 +00:00
Roger Dingledine
f0cccc567e
bugfix: don't ask for ->next of an expired circuit
...
bugfix: keep going when a circ fails in circuit_n_conn_open
(make circuit_enumerate_by_naddr_nport obsolete)
bugfix: make circuit_n_conn_open only look at circ's that start at us
bugfix: only try circuit_n_conn_open if we're an OP. Otherwise we
expect connections to always already be up.
bugfix: when choosing path length, pay attention to whether the directory
says a router is down.
bugfix: when picking good exit, skip routers which are known to be down
(more work needs to be done on this one)
svn:r838
2003-11-18 09:53:03 +00:00
Roger Dingledine
ac56486bf6
use the tor_malloc_zero wrapper
...
svn:r837
2003-11-18 08:20:19 +00:00
Roger Dingledine
ec02f83f94
add a tor_malloc_zero wrapper: tor_malloc and memset 0
...
svn:r836
2003-11-18 08:20:09 +00:00
Roger Dingledine
a3e39b0ceb
don't build too many circs at once
...
expire circs that have been building for too long
svn:r835
2003-11-18 07:48:00 +00:00
Nick Mathewson
bb0e409fbd
Simplify post-TLS-handshake checks, and add check for correct nickname
...
svn:r834
2003-11-18 07:25:04 +00:00
Nick Mathewson
dd16a9abcb
Stop leaking X509 certs; those things are _nasty_ on the carpet
...
svn:r833
2003-11-18 06:52:25 +00:00
Nick Mathewson
366ba4a7c7
Always include newline with port section of exit policy
...
svn:r832
2003-11-18 06:51:29 +00:00
Roger Dingledine
51de02bcb5
stop client_dns_clean from calling malloc(0)
...
svn:r831
2003-11-18 00:02:24 +00:00
Nick Mathewson
4eabb8450e
Fix possible bug in circID selection when building circuits on combination OP/OR servers
...
svn:r830
2003-11-17 18:40:56 +00:00
Roger Dingledine
7a702d64d4
more verbose info for circuits when kill -USR1
...
svn:r829
2003-11-17 09:30:29 +00:00
Nick Mathewson
f42c77f618
"I don't think it's quite fair to condemn a whole program because of a
...
single slip-up."
-- General "Buck" Turgidson, _Doctor Strangelove_
svn:r828
2003-11-17 08:15:37 +00:00
Roger Dingledine
a18ced652b
finally find and possibly fix the circuit_deliver_relay_cell warn bug
...
svn:r827
2003-11-17 07:43:03 +00:00
Nick Mathewson
44ced0952f
Fix bytesex issues on in.s_addr
...
svn:r826
2003-11-17 07:37:45 +00:00
Roger Dingledine
42b5ed754f
catch the last missing log line i hope
...
svn:r825
2003-11-17 07:29:43 +00:00
Nick Mathewson
90e143e6d4
Remove a possible source of error in circID picking.
...
svn:r824
2003-11-17 07:24:01 +00:00
Roger Dingledine
e5d6e7db1a
continue the circuit_deliver_relay_cell forward-failure bughunt
...
svn:r823
2003-11-17 07:20:51 +00:00
Nick Mathewson
ac5fc456ee
comment choose_good_exit_server
...
svn:r822
2003-11-17 06:02:41 +00:00
Roger Dingledine
851b0933f5
trivial bugfixes
...
svn:r821
2003-11-17 01:23:15 +00:00
Nick Mathewson
53ab335787
Fix a segfault caused by a weird logic error and masked by another.
...
svn:r820
2003-11-17 01:20:35 +00:00
Roger Dingledine
4aede010b9
recognize in-progress circs and don't start redundant ones
...
quickly notice streams that don't have a circ on the way, and start one
svn:r819
2003-11-17 00:57:56 +00:00
Roger Dingledine
5e81e4748e
bugfixes
...
svn:r818
2003-11-16 23:43:08 +00:00
Roger Dingledine
6d0e611fde
change when circuits are built and expired
...
not quite happy with it yet
svn:r817
2003-11-16 21:49:52 +00:00
Roger Dingledine
f5089681f7
bugfix: if you recognize a relay cell, don't also pass it on.
...
svn:r816
2003-11-16 17:31:19 +00:00
Roger Dingledine
b5e84e24ae
dump exit policies correctly to descriptor
...
svn:r815
2003-11-16 17:15:40 +00:00
Roger Dingledine
fe856406be
initial patches on patches
...
svn:r814
2003-11-16 17:00:02 +00:00
Nick Mathewson
8a17d9e5d3
Finish implementing the rest of the exitpolicy stuff, except for automatically starting circuit builds.
...
svn:r813
2003-11-16 05:33:45 +00:00
Nick Mathewson
a8eaa79e03
Improved exit policy syntax; basic client-side DNS caching.
...
- Exit policies now support bitmasks (18.0.0.0/255.0.0.0) and bitcounts
18.0.0.0/8. Policies are parsed on startup, not when comparing to them.
- desired_path_len is now part of an opaque cpath_build_state_t structure.
- END_REASON_EXITPOLICY cells no longer include a port.
- RELAY_COMMAND_CONNECTED cells now include the IP address we've connected
to.
- connection_edge now has a client_dns cache to remember resolved addresses.
It gets populated by RELAY_COMMAND_CONNECTED cells and END_REASON_EXITPOLICY
cells. It gets used by connection_ap_handshake_send_begin. We don't
compare it to exit policies yet.
svn:r812
2003-11-14 20:45:47 +00:00
Roger Dingledine
273da1d3c4
commencing the bughunt
...
svn:r811
2003-11-14 07:15:52 +00:00
Roger Dingledine
c8639b2bbc
bump default pathlen to 3; clean up surrounding code
...
svn:r810
2003-11-13 23:01:56 +00:00