Roger Dingledine
fe54bd00b9
ok, vim isn't the greatest editor in the world
...
svn:r2457
2004-10-12 20:28:53 +00:00
Roger Dingledine
0b4d3c4df7
parse HttpProxy address in config
...
fix a potential confusion in fetch_from_buf_http()
make all our int config options non-negative
better bounds checking on options that are ports
svn:r2456
2004-10-12 20:22:09 +00:00
Roger Dingledine
a7d858bd6e
start the great migration from int to size_t
...
and clean some deadweight from util.h
svn:r2455
2004-10-12 20:20:19 +00:00
Nick Mathewson
7cc126e8a9
Appease overzealous gcc
...
svn:r2454
2004-10-12 20:17:45 +00:00
Nick Mathewson
f7404f6bb9
Use tor_parse_long in more places
...
svn:r2453
2004-10-12 19:33:03 +00:00
Nick Mathewson
19da1f36c2
Make a bounds-checking replacement for strtol with slightly easier error-checking in the common case
...
svn:r2452
2004-10-12 19:32:41 +00:00
Roger Dingledine
1c757b917d
fix signed/unsigned comparison, plus typo
...
svn:r2451
2004-10-12 19:09:40 +00:00
Nick Mathewson
e7241044e8
Better bounds checking on parsed ints
...
svn:r2450
2004-10-12 19:01:53 +00:00
Nick Mathewson
e8748b3fa0
Add default directory servers
...
svn:r2449
2004-10-12 19:01:28 +00:00
Nick Mathewson
f6fc2b9dd2
Add fix for remote-crash bug.
...
svn:r2447
2004-10-12 18:38:36 +00:00
Roger Dingledine
578a3e25e5
fix a signed/unsigned comparison
...
svn:r2446
2004-10-12 18:32:34 +00:00
Nick Mathewson
79636823b8
Oops, missed one
...
svn:r2445
2004-10-12 16:04:25 +00:00
Nick Mathewson
a91fc48b39
Note byte-order on result for parse_addr_port()
...
svn:r2444
2004-10-12 16:02:15 +00:00
Nick Mathewson
0068415b80
Add an implementation of trusted_dir_server logic to switch towards simply remembering an addr/port/keyid for each trusted dir server
...
svn:r2443
2004-10-12 15:55:20 +00:00
Nick Mathewson
43ef5a3e37
Add long-term format for dir-signing-key fields (commented out)
...
svn:r2442
2004-10-12 15:52:57 +00:00
Nick Mathewson
0383afac9a
Use parse_addr_port() function instead of ad-hoc variants
...
svn:r2441
2004-10-12 15:52:09 +00:00
Nick Mathewson
8b037509f3
Add functions to parse addr[:port] consistently
...
svn:r2440
2004-10-12 15:48:30 +00:00
Roger Dingledine
1efad74164
bugfix on my friday commit: make hidden services work again in cvs
...
svn:r2439
2004-10-12 06:03:10 +00:00
Roger Dingledine
24f9946db1
fix paul gardner's assert bug.
...
sometimes circuit_get_open_circ_or_launch() can return 0 but not
return a circuit, e.g. because too many circuits have failed recently
so the new one didn't launch. we need to tolerate that.
svn:r2438
2004-10-11 22:19:12 +00:00
Roger Dingledine
5c53c63aa0
Fix a potential buffer overflow found by Ilja van Sprundel.
...
We don't think this is exploitable, but best to fix it anyway.
svn:r2437
2004-10-11 21:55:19 +00:00
Roger Dingledine
7798e3d770
fix the stale pointer assert bug reported by joe magic
...
svn:r2436
2004-10-11 01:17:42 +00:00
Roger Dingledine
6468e049be
when a begin cell has an invalid port, give us a better hint of
...
what went wrong
svn:r2435
2004-10-10 01:47:24 +00:00
Roger Dingledine
1a4cb248f3
interim commit for http proxy support
...
svn:r2431
2004-10-08 05:53:59 +00:00
Roger Dingledine
2bcd0f34f5
fix compile error: move variable declarations before code
...
svn:r2430
2004-10-08 05:43:28 +00:00
Nick Mathewson
6c970aec94
Turn tor_strpartion into a swiss-army-knife function, so it can terminate or not-terminate appropriately.
...
svn:r2429
2004-10-07 21:37:06 +00:00
Nick Mathewson
c7e8c2098a
Include a dir-signing-key token in directories to tell the parsing entity which key is being used to sign. This is the first step in obsoleting the dirservers file.
...
svn:r2428
2004-10-07 21:10:40 +00:00
Nick Mathewson
7b98fb58eb
More complete docs for crypto.c; factor out string partitioning code
...
svn:r2427
2004-10-07 20:58:53 +00:00
Nick Mathewson
dad7c71686
Workaround for bug on windows where cached-directories get crlf corruption.
...
svn:r2426
2004-10-07 20:22:58 +00:00
Nick Mathewson
3be0bf4b88
Bump windows version
...
svn:r2425
2004-10-07 20:22:03 +00:00
Nick Mathewson
b7bddcac75
Windows requires a different cast uint64_t format
...
svn:r2424
2004-10-07 20:15:56 +00:00
Nick Mathewson
ce3162d035
Make base-64-encoded DER work, including workaround for ugly openssl misfeature that makes base64 decoding fail when you strip out the newlines.
...
svn:r2423
2004-10-07 03:11:42 +00:00
Nick Mathewson
2bba65148b
Refactor fingerprint handling: remember hex digests (no spaces) instead of beautified fingerprints
...
svn:r2422
2004-10-06 13:31:48 +00:00
Nick Mathewson
b08ff7b1f7
Fix a couple of typos, one of which conceals a bug in parsing opt keywords with objects
...
svn:r2421
2004-10-06 13:28:34 +00:00
Nick Mathewson
b56bb39ed6
Add a function to remove a set of characters from a string
...
svn:r2420
2004-10-06 13:26:37 +00:00
Nick Mathewson
8cca36d26a
Implement (temporarily) a base64-encoded-DER format for RSA keys; make it easier to generate fingerprints with no space
...
svn:r2419
2004-10-06 13:26:10 +00:00
Roger Dingledine
8b02610bd5
when an OR starts up, it loads its directory from cache.
...
then it serves *that directory* to others who ask for a copy of the
directory. it's better to serve no directory at all until you have a
fresh copy.
svn:r2418
2004-10-06 05:05:43 +00:00
Roger Dingledine
980b6169eb
use only 0.0.9pre1 and later servers for resolve cells
...
svn:r2416
2004-10-03 19:39:29 +00:00
Roger Dingledine
c205ad05ba
better example lines for dirbindaddress and orbindaddress
...
svn:r2415
2004-10-03 19:37:48 +00:00
Nick Mathewson
9e8ae9766e
Only check versions against downloaded directories, not cached directories.
...
svn:r2413
2004-10-03 02:37:52 +00:00
Roger Dingledine
5e74ce8d57
better warn message for failed hidserv desc fetch
...
svn:r2412
2004-10-03 00:06:47 +00:00
Roger Dingledine
3f4b544b77
use size_t rather than int for directory lengths in memory
...
this might fix a bug with amd64
svn:r2410
2004-10-01 21:02:12 +00:00
Nick Mathewson
91044765f2
Decode Content-Encoding header correctly.
...
svn:r2403
2004-10-01 04:45:14 +00:00
Roger Dingledine
eff780c815
Fix a rare assert trigger, where routerinfos for entries in our cpath
...
would expire while we're building the path.
Thanks to Eugene Armstead for pointing it out.
svn:r2402
2004-09-30 15:40:05 +00:00
Roger Dingledine
136d4e5739
prefer tor_free to free
...
plus complain more loudly when we fail to parse a dir we just fetched
svn:r2401
2004-09-29 06:52:36 +00:00
Roger Dingledine
6ed095b177
print the IP if a conn fails badly, to see if there are any trends
...
svn:r2400
2004-09-29 05:59:55 +00:00
Roger Dingledine
1c47de319e
ha ha, thought the bugs were done
...
don't stop writing the compressed directory just because you found a nul
svn:r2399
2004-09-29 05:48:25 +00:00
Roger Dingledine
a31ba30ae6
if our local cached directory is new enough, go ahead and
...
start building circuits while we're fetching a new one
svn:r2394
2004-09-28 23:27:41 +00:00
Nick Mathewson
11384b6d92
Make sure that routerlists contain only routers; give a better error message if they start with a nonrouter.
...
svn:r2393
2004-09-28 22:49:34 +00:00
Nick Mathewson
0c653e5cc7
cached-directory has a directory, not a router list
...
svn:r2392
2004-09-28 22:43:11 +00:00
Roger Dingledine
4b3001a08c
fix some local buffer overflows
...
fix a memory leak
svn:r2391
2004-09-28 22:38:21 +00:00
Nick Mathewson
7eff786e4b
Fix messages for _UNRECOGNIZED tokens
...
svn:r2390
2004-09-28 22:35:02 +00:00
Nick Mathewson
d20d10f360
If we are an authoritative dirserver, check out the fingerprint list when setting connection nicknames
...
svn:r2389
2004-09-28 22:24:56 +00:00
Roger Dingledine
d381aa4696
Fix an evil bug: when we failed to write to our log, fputs()
...
gave us a sigpipe, and we logged that we were ignoring it,
causing us to fail to log that, and delete the log entry. Then
when the signal handler exited, we proceeded to delete the log
entry that had already been deleted.
Now we make sure to only log inside our signal handler if we'll
be exit()ing right after.
svn:r2388
2004-09-28 21:14:40 +00:00
Roger Dingledine
1e3b9e7d31
make the warn message better for reading short files
...
svn:r2385
2004-09-28 08:40:03 +00:00
Roger Dingledine
0d2f9b9b4b
the tor clients in cvs can't speak to the current tor authdirservers for
...
rendezvous publishes and fetches, since they're still running 0.0.8. so
make them speak the old way until we've upgraded the authdirservers.
svn:r2384
2004-09-28 03:30:28 +00:00
Roger Dingledine
9f9f0e5edd
fix another bug with cached compressed directories
...
still not working
svn:r2383
2004-09-27 07:28:48 +00:00
Roger Dingledine
d0edf8e8b5
fix two bugs with cached directories:
...
- don't complain that you won't cache it, then cache it anyway.
- change confusing terminology from 'deflate' to 'compress', so
we'll stop getting our logic backwards. i assume the rfc author
has shot himself by now.
svn:r2382
2004-09-27 06:57:16 +00:00
Roger Dingledine
6e7e880438
put my fenceposts back in valid memory space
...
svn:r2381
2004-09-27 06:45:32 +00:00
Roger Dingledine
a2517b4f07
checking only 0.0.7 and 0.0.8 didn't work, because some dirservers
...
files have really old descriptors for the authdirservers, so we're
asking them in the new format because they're too old.
now we actually compare the version to a cutoff version, and act
appropriately.
also take this chance to use only >=0.0.8 servers for dns resolves,
because of the recent bugs. we'll bump to >=0.0.9pre1 once there are
some servers running that.
svn:r2380
2004-09-27 06:00:43 +00:00
Roger Dingledine
a64d093339
post descriptors to 0.0.8 authdirservers the old way, to make the
...
transition easier
svn:r2379
2004-09-27 03:50:58 +00:00
Roger Dingledine
10df7d9afc
clients ask 0.0.9-and-later dirservers for a compressed dir
...
dirservers rewrite url /foo/ to /tor/foo/, which will help us run things
behind apache once 0.0.8 is obsolete
svn:r2378
2004-09-27 03:39:30 +00:00
Nick Mathewson
09586ef712
Make read_all distinguish between error and EOF; read_file_to_string should only check bytes read against st_size when in binary mode.
...
svn:r2375
2004-09-26 16:51:31 +00:00
Roger Dingledine
57d7857def
don't mind empty exit policy entries
...
svn:r2373
2004-09-23 22:57:32 +00:00
Roger Dingledine
fa0a1ec49f
cleanup: use strcmpstart() in more places
...
svn:r2372
2004-09-23 22:18:50 +00:00
Roger Dingledine
09f450104a
don't imply to people that they should store their hidden service
...
keys in /tmp
svn:r2371
2004-09-23 20:50:27 +00:00
Roger Dingledine
185b9fddf2
protect dirservers from overzealous descriptor uploading
...
wait 10 seconds after directory gets dirty, before regenerating
svn:r2370
2004-09-23 19:58:44 +00:00
Roger Dingledine
02e3e3327c
discourage people from setting their dirfetchpostperiod more often
...
than once per minute
svn:r2369
2004-09-23 19:23:32 +00:00
Roger Dingledine
8385fdb590
make our tor_assert actually work when it's going to be triggered,
...
rather than seg fault
svn:r2368
2004-09-23 05:02:51 +00:00
Roger Dingledine
a1979800ab
bugfix on the bugfix
...
actually unlink the log entry.
ok, that wasn't cleverly hidden enough. let's try again.
svn:r2367
2004-09-23 04:59:02 +00:00
Roger Dingledine
8727a28119
bugfix: we were starting to daemonize before we opened our logs,
...
so if there were any problems opening logs, we would complain to
stderr (which wouldn't work) and then mysteriously exit.
svn:r2366
2004-09-23 04:32:43 +00:00
Roger Dingledine
f753f6f0e2
bugfix: when we run out of disk space, or other log writing error,
...
don't crash. just stop logging to that log and continue.
nick, can you find the bug i've cleverly hidden in this commit?
svn:r2365
2004-09-23 03:51:45 +00:00
Roger Dingledine
c0db9fa803
fix confusing cut-n-paste mistake
...
svn:r2364
2004-09-22 04:08:05 +00:00
Roger Dingledine
013104a1e2
people are starting to bump into the limit of 50 dns workers.
...
raise it to 100 for now. we need a better solution long-term.
but alas, there are no better solutions that are also portable.
hm.
svn:r2363
2004-09-22 03:56:41 +00:00
Nick Mathewson
9defe8a307
Attach dummy resolve connections to a circuit *before* calling dns_resolve(). This fixes a bug where cached answers would never be sent in RESOLVED cells.
...
svn:r2360
2004-09-21 18:12:12 +00:00
Nick Mathewson
c20b24c952
clean up/bugfix deflate logic and log messages
...
svn:r2359
2004-09-21 18:09:38 +00:00
Roger Dingledine
d977677aa8
bugfix: when a resolve fails for a begin request, actually send
...
the end cell back. also, give a better reason for failure.
svn:r2358
2004-09-21 17:33:05 +00:00
Roger Dingledine
ff622786f1
slightly better warn message
...
svn:r2357
2004-09-21 17:14:47 +00:00
Nick Mathewson
431b33a2ca
Warn the user when we mark ourself as down.
...
svn:r2356
2004-09-21 16:44:20 +00:00
Nick Mathewson
0dcc8c7048
Bugfix: When a dns request failed, we would detach any "resolving" streams from the circuit before we would send a the resolve_failed cells.
...
svn:r2355
2004-09-21 16:42:07 +00:00
Nick Mathewson
93f085c4a2
Stop using openssl functions that rely on stdio; they can apparently lead to linker grief on win32.
...
svn:r2354
2004-09-21 04:55:43 +00:00
Roger Dingledine
802b203ff1
fix a rare seg fault for people running hidden services on
...
intermittent connections
svn:r2353
2004-09-20 03:07:11 +00:00
Roger Dingledine
eade496dcd
JI hates people who say "IP" when they mean "IP address"
...
svn:r2352
2004-09-12 15:07:14 +00:00
Roger Dingledine
959199340a
don't pick administrative-friends when picking your path
...
(just a skeleton for now)
svn:r2349
2004-09-10 21:40:29 +00:00
Roger Dingledine
8954cd91ce
LOG_ERR is for when we're going to exit
...
svn:r2348
2004-09-10 21:39:53 +00:00
Roger Dingledine
a475ccf5b8
we should exit(1) if $HOME doesn't exist and we needed it
...
svn:r2344
2004-09-10 19:16:01 +00:00
Nick Mathewson
8ab26650ee
Fix documentation about how not to be an OP
...
svn:r2342
2004-09-10 18:54:21 +00:00
Nick Mathewson
0ef85f6dba
Some platforms have weird translations when you open files in "test" mode; make read/write_str_to_file aware.
...
svn:r2336
2004-09-08 07:16:34 +00:00
Nick Mathewson
c66e4c4870
Flush more changes from sandbox
...
- make clients cache directories and use them to seed their router lists
at startup. This means clients have a datadir again.
- Introduce a global_write_bucket. We need to respond better to exhausting
it.
- Remove the last vestiges of LinkPadding and TrafficShaping.
- Configuration infrastructure support for warning on obsolete options.
- Refactor directory header parsing to use smartlist_split_string.
- Respond to content-encoding headers by trying to uncompress as appropriate.
- Reply with a deflated directory when a client asks for "dir.z".
(We could use allow-encodings instead, but allow-encodings isn't
specified in HTTP 1.0.)
svn:r2335
2004-09-08 06:52:33 +00:00
Nick Mathewson
b6798866d0
Idiot-proof uncompress; make sure it always nul-terminates its output. Also, make all compression methods nonzero.
...
svn:r2334
2004-09-08 06:47:33 +00:00
Nick Mathewson
9836ccda8c
Move a paren 4 characters to the left; fix a bug in OutboundBindAddress
...
svn:r2330
2004-09-02 23:25:23 +00:00
Nick Mathewson
ecf414f05e
Stop using separate defaults for no-config-file and empty-config-file
...
svn:r2329
2004-09-02 22:08:36 +00:00
Nick Mathewson
d6e47bec46
Keep a deflated version of each directory so we can deliver it when requested
...
svn:r2328
2004-09-02 18:57:09 +00:00
Nick Mathewson
bda41ba3fd
Use new split function and strcmpstart correctly
...
svn:r2327
2004-09-02 18:39:59 +00:00
Nick Mathewson
4c799ae731
Check for zlib; link with it.
...
svn:r2326
2004-09-02 18:27:09 +00:00
Nick Mathewson
f311206d1d
Make split function smarter; add a strcmpstart function so we can stop bungling strcmp(x, y, strlen(y));
...
svn:r2325
2004-09-02 18:25:50 +00:00
Nick Mathewson
3590eb535a
Add basic wrappers for zlib/gzip
...
svn:r2324
2004-09-02 18:22:51 +00:00
Nick Mathewson
6e844ea743
Bump windows version to 0.0.8
...
svn:r2319
2004-08-26 01:27:58 +00:00
Nick Mathewson
31b81650b7
Define LONG_MAX and UINT_MAX when they are missing
...
svn:r2317
2004-08-25 19:16:18 +00:00
Roger Dingledine
f91c552af7
fix a seg fault on solaris
...
svn:r2313
2004-08-25 17:37:00 +00:00
Roger Dingledine
444a01610c
make the compile work (and not complain) on sunos 5.9
...
svn:r2312
2004-08-25 17:31:47 +00:00
Roger Dingledine
be7909f670
Fix a symptom for a bug that straycat found.
...
Apparently in rare cases poll() is returning POLLIN for an idle
dns worker. It reads no bytes, presumably because the idle dns
worker didn't write anything in the first place. Gosh, who knows.
Now we only trigger the assert if the idle dns worker actually
tries to send an answer to us.
svn:r2311
2004-08-25 05:26:09 +00:00
Roger Dingledine
d91cacb839
agree with nick: this legal-chars-in-filename stuff gets us nothing
...
svn:r2310
2004-08-24 21:57:12 +00:00
Nick Mathewson
015232bd39
As far as I can tell, CONFIG_LEGAL_FILENAME_CHARACTERS is both pointless and broken. #if it out, pending agreement from arma. This fixes a bug on win32 that rejected paths with a : in them.
...
svn:r2309
2004-08-24 20:48:22 +00:00
Nick Mathewson
4b4bfd500a
Improve log message to make it obvious _why_ reading the configuration has failed.
...
svn:r2308
2004-08-24 20:46:42 +00:00
Roger Dingledine
79df0aa18a
when picking unverified routers, skip those with bad uptime or
...
bad bandwidth, depending on what properties you care about
svn:r2302
2004-08-20 21:34:36 +00:00
Nick Mathewson
7979c0277d
Workaround for oddity in cygwin autoconf
...
svn:r2301
2004-08-19 17:21:17 +00:00
Nick Mathewson
c8b621b147
Increment windows version to 0.0.8rc1
...
svn:r2299
2004-08-18 22:25:50 +00:00
Nick Mathewson
ae46b6b077
Fix some DOCDOCs
...
svn:r2295
2004-08-18 21:56:45 +00:00
Roger Dingledine
cf6159abb9
fix a seg fault on hup when FascistFirewall is defined
...
svn:r2294
2004-08-18 21:46:53 +00:00
Roger Dingledine
8ddc029d07
if options.FascistFirewall but none are running on port 80, try
...
the others before giving up.
svn:r2293
2004-08-18 21:13:58 +00:00
Roger Dingledine
2396c6bf71
remove last vestiges of this 'twin' concept
...
svn:r2291
2004-08-18 20:35:11 +00:00
Roger Dingledine
9504db8ce8
be more aggressive about building circuits when we have no
...
open circuits
svn:r2290
2004-08-18 20:34:43 +00:00
Roger Dingledine
7304ac1d6f
tweak the [...truncated] string again
...
svn:r2289
2004-08-18 11:21:50 +00:00
Roger Dingledine
b500104cbe
tolerate old 0.0.7 clients that demand a certain ip:port for a router
...
even though it's moved on to another one.
also reduce some log verbosity.
svn:r2288
2004-08-18 11:20:15 +00:00
Roger Dingledine
3937ecfaae
when we try to exclude our routerinfo from being picked in the
...
path, it fails because we're using a pointer to the routerinfo we
generate, not a pointer to the routerinfo in the routerlist. so look
up the right one and use that.
svn:r2286
2004-08-18 10:32:50 +00:00
Roger Dingledine
20b8819023
even better, only print extend attempts if there are any.
...
svn:r2285
2004-08-18 09:57:50 +00:00
Roger Dingledine
a447570036
stop taking strlen of an uninitialized buffer
...
we were (are?) printing garbage in the rephist stats
svn:r2284
2004-08-18 09:49:17 +00:00
Roger Dingledine
b885db033e
remove crazy notion that clique_mode() means we are
...
already connected to everybody we could be connected to.
svn:r2283
2004-08-18 09:07:11 +00:00
Roger Dingledine
40f9f94794
don't add a spurious newline before [truncated]
...
svn:r2282
2004-08-18 08:52:12 +00:00
Roger Dingledine
765530421e
be more aggressive about trying to make circuits:
...
try once a second for 30 seconds, and only when the entire previous
period has failed do we pause after MAX_CIRCUIT_FAILURES failures.
svn:r2281
2004-08-18 08:51:04 +00:00
Roger Dingledine
6d661d1bc0
bugfix: make intro circuits work again
...
svn:r2280
2004-08-18 07:53:43 +00:00
Nick Mathewson
555f8f30f4
Avoid segfault when freeing options_t without firewall_ports
...
svn:r2279
2004-08-18 07:06:53 +00:00
Roger Dingledine
99e367f045
authdirservers don't need to be treated specially on hup for
...
making intro points
svn:r2277
2004-08-18 06:48:45 +00:00
Roger Dingledine
807a484b88
only establish intro points after we've gotten a directory
...
svn:r2276
2004-08-18 06:47:01 +00:00
Roger Dingledine
6e9e467b1d
dirservers now don't build circuits until they have fetched a
...
directory from somebody else. this means they have time to
build their connections first.
svn:r2275
2004-08-18 06:29:58 +00:00
Roger Dingledine
b294a037a4
choose exit nodes by bandwidth too
...
svn:r2274
2004-08-18 06:10:12 +00:00
Nick Mathewson
6de61bd694
Revert dumb think-o. Just because _some_ INTRODUCE2 cells are now longer,
...
doesn't mean we should raise the _minimum_ size.
svn:r2273
2004-08-18 05:05:58 +00:00
Nick Mathewson
196e6c1cc2
Support new INTRODUCE2 cell format
...
svn:r2270
2004-08-18 04:48:59 +00:00
Nick Mathewson
86980cf6e2
Functions to test nickname validity
...
svn:r2269
2004-08-18 04:44:24 +00:00
Nick Mathewson
fffb4dbb8b
fix unix build: CONFDIR, not CONF_DIR
...
svn:r2267
2004-08-18 04:04:08 +00:00
Nick Mathewson
8626c7724e
Clean windows whitespace
...
svn:r2266
2004-08-18 03:47:55 +00:00
Nick Mathewson
17ce7d499f
On windows, default datadir is APPDATA/tor, and default config file is APPDATA/tor/torrc. (APPDATA is usually somedrive:/Documents and Settings/.../Application Data/)
...
svn:r2265
2004-08-18 03:42:55 +00:00
Nick Mathewson
7cb93e5bb6
Move string-splitting into a separate function
...
svn:r2263
2004-08-17 21:06:36 +00:00
Roger Dingledine
2c002b1533
deal better if we don't have enough available nodes to choose a path
...
svn:r2262
2004-08-17 12:09:37 +00:00
Roger Dingledine
4c47e07a11
make csv parsing notice the last letter of each entry too
...
svn:r2261
2004-08-17 11:55:47 +00:00
Roger Dingledine
0131d94a6c
bugfix: make receiving csv lines not seg fault
...
svn:r2260
2004-08-17 11:52:20 +00:00
Roger Dingledine
6cf09a5dc0
people with no torrc allow unverified middle/rendezvous nodes by default
...
svn:r2259
2004-08-17 11:42:22 +00:00
Roger Dingledine
92a44fddb1
allow unverified nodes in middle and rendezvous positions by default
...
svn:r2258
2004-08-17 08:48:52 +00:00
Roger Dingledine
aa1e518446
when a verified routerinfo arrives with a new key than the previous
...
verified routerinfo with that name, close connections to the obsolete
key to make way for connections to the new key.
svn:r2257
2004-08-17 08:00:23 +00:00
Nick Mathewson
4e026f5b1d
Fix crash when looking for ~/.torrc with no $HOME set
...
svn:r2256
2004-08-17 07:33:06 +00:00
Nick Mathewson
9bcd4a9c6a
make last patch compile
...
svn:r2255
2004-08-17 07:14:45 +00:00
Nick Mathewson
525a4fc365
Stop logging events that happen to uninitialized digests
...
svn:r2254
2004-08-17 07:12:05 +00:00
Roger Dingledine
2d8a1f208a
if they ask for exactly one entrynode, don't pick it as an exitnode.
...
also, fix part of the zero-identity-router-in-stats bug
svn:r2252
2004-08-17 07:09:02 +00:00
Roger Dingledine
9e5fc55564
now that we parse router->uptime, make use of it
...
svn:r2251
2004-08-17 06:42:30 +00:00
Nick Mathewson
8566bbb489
Add strmap_isempty
...
svn:r2250
2004-08-17 06:28:34 +00:00
Roger Dingledine
ee23b7a470
use unverified routers in the desired positions
...
svn:r2249
2004-08-17 06:27:32 +00:00
Nick Mathewson
590cd621f8
Clean up last patch; implement (mostly) proper handling for verified/unverified name collisions.
...
svn:r2248
2004-08-17 06:06:05 +00:00
Nick Mathewson
85a910e085
Parse uptime into routerinfo
...
svn:r2247
2004-08-17 05:29:41 +00:00
Nick Mathewson
74621132a9
Implement AllowUnverifiedNodes
...
svn:r2246
2004-08-17 05:13:58 +00:00
Roger Dingledine
76eadc6f0a
if a router claim huge bandwidth, don't believe it
...
svn:r2245
2004-08-17 02:00:36 +00:00
Nick Mathewson
0b91fd1cbe
Add a generic Comma-separated-value config type, and a FirewallPorts option to tell FascistFirewall which ports are open. (Defaults to 80,443)
...
svn:r2244
2004-08-16 20:47:00 +00:00
Nick Mathewson
15a903b21c
Convenience function to do a strcmp on each member of a smartlist of strings
...
svn:r2243
2004-08-16 20:46:00 +00:00
Roger Dingledine
0a6e27208b
o Handle servers with dynamic IP addresses: don't replace
...
options->Address with the resolved one at startup.
o detect our address right before we make a routerinfo each time.
o external IP vs bind-IP. Already done, just use options->Address.
o OutboundBindAddress config option, to bind to a specific
IP address for outgoing connect()s.
svn:r2241
2004-08-16 11:43:18 +00:00
Nick Mathewson
6514eb5d44
Update to new choose_random_node interface.
...
svn:r2239
2004-08-15 20:31:11 +00:00
Nick Mathewson
bcf8ca5ba6
Check for time skew on http headers; report date in response to "GET /".
...
svn:r2238
2004-08-15 20:30:15 +00:00
Nick Mathewson
e19af3fa0f
We are an OR if ORPort *or* ORBindAddress is set; similarly for being an OP
...
svn:r2237
2004-08-15 20:16:26 +00:00
Nick Mathewson
416653271a
Implement strict{entry|exit}nodes config options
...
svn:r2236
2004-08-15 20:14:44 +00:00
Nick Mathewson
ebf2d275bf
End truncated log entries with [truncated]
...
svn:r2235
2004-08-15 20:13:07 +00:00
Roger Dingledine
488aa52f25
fix assert triggers in 0.0.7.x: if the other side returns
...
an address 0.0.0.0, don't put it into the client dns cache.
svn:r2233
2004-08-15 20:05:35 +00:00
Roger Dingledine
cd3da3fc12
o clients choose nodes proportional to advertised bandwidth
...
o and/or while avoiding unreliable nodes, depending on goals
o 'fascistfirewall' option to pick dirservers on port 80 and ORs on
port 443.
o if a begin failed due to exit policy, but we believe the IP should have been allowed, switch that router to exitpolicy reject *:* until we get our next directory.
svn:r2231
2004-08-15 08:15:12 +00:00
Roger Dingledine
699a9d8b46
commit some minor fixes from this sandbox so i can commit the next one
...
svn:r2229
2004-08-15 05:28:09 +00:00
Nick Mathewson
ba7cc463d4
Clean up tempdir after finishing unittests; use tor_temp_$PID instead of tor_temp; quit if tor_temp_$PID exists.
...
svn:r2226
2004-08-11 19:20:24 +00:00
Roger Dingledine
dda2e44222
compile again on win32 (i think)
...
svn:r2222
2004-08-09 23:45:11 +00:00
Roger Dingledine
1e415817a3
minor fix
...
svn:r2215
2004-08-09 07:41:32 +00:00
Roger Dingledine
7068dd8e87
make "%llu" less likely to warn on weird platforms
...
svn:r2209
2004-08-09 05:25:19 +00:00
Nick Mathewson
6453a25567
Add replace_file to util.[ch] to survive stupidity of windows rename call
...
svn:r2208
2004-08-09 04:28:25 +00:00
Nick Mathewson
98b8a89aa8
Fix comment
...
svn:r2207
2004-08-09 04:27:42 +00:00
Nick Mathewson
6141097f6e
Fix bug in saving onion keys to disk when rotating; also survive short-term shutdowns better
...
svn:r2206
2004-08-09 04:27:13 +00:00
Nick Mathewson
e6c34ad071
Make unittests pass
...
svn:r2205
2004-08-09 04:26:25 +00:00
Nick Mathewson
0652a0e90a
Fix a fencepost error in the last bandwidth reporting fix
...
svn:r2202
2004-08-08 19:14:44 +00:00
Roger Dingledine
7506cce649
stop wasting cpu time on authdirservers
...
we were making a new directory only when the old one was dirty, but
every time we made one, we'd dirty it by testing it right then.
svn:r2199
2004-08-08 11:15:38 +00:00
Roger Dingledine
b2c7b5adfb
fix a race condition in 008pre2: don't try to extend onto a connection
...
that's still handshaking.
for servers in clique mode, require the conn to be open before you'll
choose it for your path.
svn:r2198
2004-08-08 10:32:36 +00:00
Roger Dingledine
05790d1722
let children survive sigint, sigterm, etc.
...
this was biting us because ^c would get delivered to all of them,
maybe because they were all still listening to stdin?
svn:r2197
2004-08-08 07:25:45 +00:00
Roger Dingledine
292e9c5567
reject the default edonkey, kazaa, gnutella ports
...
to slow the coming flood
svn:r2195
2004-08-08 05:26:13 +00:00
Roger Dingledine
fb4b804c2c
Don't warn about being unverified if you're not in the running-routers
...
list at all.
svn:r2193
2004-08-07 09:01:56 +00:00
Roger Dingledine
44ff309c26
touch-ups
...
svn:r2192
2004-08-07 09:01:04 +00:00
Nick Mathewson
28a6d0901f
Handle loop initialization for bandwidth tracking properly
...
svn:r2190
2004-08-07 05:13:55 +00:00
Nick Mathewson
3de630ec67
Only warn about version newness once
...
svn:r2189
2004-08-07 05:12:08 +00:00
Roger Dingledine
dbf150bd4e
list the port and socks version when complaining about unsafe socks
...
svn:r2188
2004-08-07 04:03:01 +00:00
Nick Mathewson
bc24c3f47d
Allow multiple ORs with same nickname in routerlist
...
svn:r2187
2004-08-07 03:38:07 +00:00
Nick Mathewson
05e9a2269c
Remove obsolete link-key keyword
...
svn:r2186
2004-08-07 03:37:36 +00:00
Nick Mathewson
1ada52fe87
router_get_hash_impl would fail when end_str started with \n. Now it works.
...
svn:r2185
2004-08-07 03:25:42 +00:00
Roger Dingledine
052537dad9
rotate onion keys every 12 hours, not every 2 hours
...
svn:r2184
2004-08-07 03:03:23 +00:00
Nick Mathewson
b0c9ba99f8
Fix a leak
...
svn:r2183
2004-08-07 02:59:46 +00:00
Nick Mathewson
f6cc218742
Refactor ISO-style (yyyy-mm-dd hh:mm:ss) time parsing into util.c; rename format/parse_rfc1123_time; make rephist remember used bandwidth; published used bandwidth in descriptors in 15-minute chunks. Breaks unittests.
...
svn:r2182
2004-08-07 02:46:16 +00:00
Roger Dingledine
f47fe829dd
avoid racing the mark-for-close when the client hangs up on us
...
at the same time we get an end relay cell.
(thanks to wmf for reminding me)
svn:r2181
2004-08-07 02:19:49 +00:00
Roger Dingledine
658e02a621
untwisting the logic, it would seem the pkey is always defined?
...
svn:r2180
2004-08-07 01:48:50 +00:00
Nick Mathewson
6ceb351e31
Comment about n_args<1 is correct, since all directory servers are running post-007x versions
...
svn:r2179
2004-08-07 01:30:23 +00:00
Nick Mathewson
2091dab7f4
fencepost
...
svn:r2178
2004-08-07 01:18:02 +00:00
Roger Dingledine
8491d97b9c
print the name of the dirserver that told us we were unverified
...
nick, please review this.
svn:r2177
2004-08-07 01:17:38 +00:00
Nick Mathewson
f5f4314e2d
Always initialize hexid in rend_mid_rendezvous, no matter what
...
svn:r2176
2004-08-07 01:12:04 +00:00
Nick Mathewson
380f32f07d
hex_encode is obsoleted by base16_encode, and never actually worked in the first place. (Thanks to Timo Lindfors for noticing the never-actually-worked part.)
...
svn:r2175
2004-08-07 01:03:33 +00:00
Roger Dingledine
9952b37456
reject tor-resolve requests for .onion addresses early
...
svn:r2174
2004-08-07 00:19:14 +00:00
Roger Dingledine
810ebc80d0
be willing to expire routers that have a dirport open
...
it's just the authoritative dirservers we want to not forget
svn:r2173
2004-08-06 22:47:41 +00:00
Roger Dingledine
e95ae1c9ad
let purging routerinfos and descriptors take an age argument
...
svn:r2171
2004-08-06 22:15:25 +00:00
Nick Mathewson
bed5696185
Keep track of a whole day of bandwidth, not just 12 hrs
...
svn:r2168
2004-08-06 20:46:50 +00:00
Nick Mathewson
3ca2728eb2
(size_t)-1 is never < 0; fix an XXXX008 by changing the interface for dirserv_get_runningrouters
...
svn:r2165
2004-08-06 20:00:16 +00:00
Nick Mathewson
2ff6d6d8b9
There is no space after network-status; make router_get_hash_impl more bulletproof.
...
svn:r2162
2004-08-06 19:54:20 +00:00
Roger Dingledine
6e9bdc862c
when they use tor as an http proxy, point them at a better url
...
svn:r2161
2004-08-06 19:44:17 +00:00
Roger Dingledine
05e9fb5c44
and add a comment to that effect
...
svn:r2159
2004-08-06 10:13:25 +00:00
Roger Dingledine
f8c14e5dce
make explicit that 'no socks policy' means 'accept'
...
svn:r2158
2004-08-06 10:12:55 +00:00
Roger Dingledine
59a356ea47
clarify sockspolicy, exitpolicy rules
...
svn:r2157
2004-08-06 10:11:57 +00:00
Roger Dingledine
276d953b22
fix an assert: check the sockspolicy before we make/add the connection,
...
else we close a connection without assigning it a state, which is bad
because it fails assert_conn_ok()
svn:r2156
2004-08-06 09:56:36 +00:00
Roger Dingledine
967a762fe1
they're uint64 and uint32, not int and int
...
svn:r2152
2004-08-06 08:40:55 +00:00
Roger Dingledine
f32e34044f
list total traffic and total uptime in -usr1 stats
...
svn:r2151
2004-08-06 08:37:13 +00:00
Roger Dingledine
1d41c0ee35
note a bug that adam found
...
svn:r2150
2004-08-06 02:27:06 +00:00
Roger Dingledine
3b00c950c2
note a bug in our dns error handling. we should fix this sometime.
...
svn:r2149
2004-08-05 19:33:54 +00:00
Roger Dingledine
de0f72ce2a
bugfix: when you finish answering a 'resolve' request, hold the
...
connection open so you can flush the answer
svn:r2148
2004-08-05 00:39:23 +00:00
Roger Dingledine
54dd90d391
bugfix: when tor-resolve asks to resolve an IP to an IP and we answer
...
immediately, there's no need to send an 'end' relay cell when we close
the conn.
svn:r2147
2004-08-04 21:38:00 +00:00
Roger Dingledine
0c8542d889
fix rare race condition that causes infinite loop
...
if we get a sigchld but all our children are gone by the time we get
around to reaping them (i don't think this should ever happen, but it
just did), then we'd loop forever trying to reap them.
svn:r2141
2004-08-04 06:49:17 +00:00
Roger Dingledine
97338cf9a0
update the sample torrc
...
svn:r2139
2004-08-04 06:17:24 +00:00
Roger Dingledine
b51a444dd2
commit some odds and ends, so my tree is clean
...
svn:r2137
2004-08-04 05:10:49 +00:00
Nick Mathewson
75684a48d5
<arma> did you get it working on win32? or just compiling
...
svn:r2136
2004-08-04 04:58:30 +00:00
Nick Mathewson
78f12ffcca
Bugfix: "Okay, I just shut down like you told me. Now let me verify your signature." Also fix error message when running over-new version.
...
svn:r2135
2004-08-04 02:35:06 +00:00
Roger Dingledine
d0cfbcf875
only pick a default nickname if you're a server
...
svn:r2134
2004-08-04 02:15:22 +00:00
Roger Dingledine
a939796919
put a comment by routerlist_update_from_runningrouters() to
...
remind me that it's not used yet
svn:r2132
2004-08-04 01:25:21 +00:00
Roger Dingledine
da26a7a197
log a warning if you're running an unverified server, to let
...
you know you might want to get it verified
also, moved that whole block below the check-signature logic, so
we don't execute it if the directory is a fake.
(the recommended-versions logic is still executed before the signature
is checked; we should fix that.)
svn:r2131
2004-08-04 01:17:21 +00:00
Nick Mathewson
630e1e4b44
Hack: Include date with successful directory GETs.
...
svn:r2130
2004-08-04 01:15:57 +00:00
Nick Mathewson
14d5478f29
Add functions to format and parse RFC1123-style times, for HTTP protocol.
...
svn:r2129
2004-08-04 01:11:15 +00:00
Roger Dingledine
8b55f73bbe
put the have_warned_about_unsafe_socks static var inside the function
...
svn:r2128
2004-08-04 01:08:10 +00:00
Nick Mathewson
5b61dd0457
Fix all warnings on win32 build
...
svn:r2127
2004-08-03 23:57:05 +00:00
Roger Dingledine
8cb4124121
warn if we use an unsafe socks variant
...
for now, warn every time. we should decide how often we want to warn;
one problem here is that there are several scenarios where we use an
unsafe socks variant safely, so the warning may be inaccurate. hm.
svn:r2126
2004-08-03 23:42:33 +00:00
Nick Mathewson
849e998ac6
It is possible to have struct timeval but not gettimeofday.
...
svn:r2125
2004-08-03 23:31:22 +00:00
Roger Dingledine
5525606653
check return value of fclose while writing to disk, since it might
...
return out-of-space, etc
svn:r2122
2004-07-23 21:25:28 +00:00
Roger Dingledine
5b54780df3
don't send an end back for a malformed resolved cell,
...
since they don't establish streams
svn:r2119
2004-07-23 06:28:12 +00:00
Roger Dingledine
cc54d9efe9
tor-resolve triggered a has_sent_end warning
...
svn:r2116
2004-07-23 00:04:40 +00:00
Roger Dingledine
a328aab316
clean whitespace and tabs
...
svn:r2115
2004-07-22 23:21:12 +00:00
Roger Dingledine
3aaba3b16e
tell the user what time _they_ are too, when a cert is expired
...
svn:r2114
2004-07-22 23:06:28 +00:00
Roger Dingledine
aebec8ab9e
stop using atexit() to remove our pid, since it's called
...
immediately when we daemonize.
also drop our retry period for hidserv desc uploads from 10m to 5m
svn:r2111
2004-07-22 22:15:36 +00:00
Nick Mathewson
7119345fbb
Fix base16_decode; trashing the stack is rude.
...
svn:r2110
2004-07-22 21:41:50 +00:00
Nick Mathewson
1391eafe67
Chek for overlong nicknames in add_nickname_list_to_smartlist
...
svn:r2109
2004-07-22 21:36:03 +00:00
Nick Mathewson
7b4865ec33
Add notion of "longest nickname-or-hex-digest-with-$"
...
svn:r2108
2004-07-22 21:31:04 +00:00
Nick Mathewson
0c990259de
Add noisy debug log to hunt for bug in router_update_status_from_smartlist
...
svn:r2107
2004-07-22 21:20:23 +00:00
Nick Mathewson
d07d0a4e6b
Add fingerprint to router format in tests
...
svn:r2106
2004-07-22 20:34:55 +00:00
Nick Mathewson
33fe5e362f
Never use time(NULL) as assumed publication time for a directory.
...
svn:r2105
2004-07-22 20:30:02 +00:00
Roger Dingledine
0536b853fd
add a comment asking ORs to configure a DirPort too
...
svn:r2104
2004-07-22 11:16:39 +00:00
Roger Dingledine
7459d067a5
now base16_encode() and base32_encode() can't ever fail
...
svn:r2103
2004-07-22 08:30:06 +00:00
Roger Dingledine
ea43172c11
make router_is_me() compare identity, not nickname
...
svn:r2102
2004-07-22 08:08:25 +00:00
Roger Dingledine
f355a9c9f1
put our fingerprint into the descriptor, so we can match a
...
desc to a running-routers entry
svn:r2100
2004-07-22 06:22:04 +00:00
Roger Dingledine
c1450319f4
allow OPs to set a DirPort and cache/serve directories
...
(hey, why not, it works)
svn:r2099
2004-07-22 06:04:54 +00:00
Roger Dingledine
a403c1035e
getting an unknown descriptor is an info, not a warn, now
...
svn:r2098
2004-07-22 06:04:13 +00:00
Roger Dingledine
b48cdc9d40
populate router_get_my_routerinfo()->is_verified
...
svn:r2097
2004-07-22 06:03:53 +00:00
Nick Mathewson
38d8e36919
Make tor_tls_new variant use alternative (certless) context
...
svn:r2096
2004-07-22 04:53:34 +00:00
Roger Dingledine
06b72cc8f2
publish advertised_bandwidth in descriptor
...
svn:r2095
2004-07-22 04:20:27 +00:00
Roger Dingledine
eb0a19c475
change 0.0.8 extend cell format so it's compatible with 0.0.7
...
svn:r2094
2004-07-22 03:47:20 +00:00
Roger Dingledine
6c56f34aaf
clients shouldn't create datadir until we have something to put there
...
svn:r2092
2004-07-22 00:13:42 +00:00
Roger Dingledine
3c2c8ed42b
0.0.8 ORs should autoconnect to authdirservers and 0.0.7 servers
...
svn:r2091
2004-07-21 23:43:47 +00:00
Roger Dingledine
f82a36508d
make router_nickname_is_approved() do the right thing
...
svn:r2090
2004-07-21 22:54:27 +00:00
Roger Dingledine
3783d2e682
if johnny has three fenceposts, and jill takes four away...
...
svn:r2089
2004-07-21 22:37:03 +00:00
Roger Dingledine
156cfb00fa
oh, and it should compile too
...
svn:r2088
2004-07-21 22:34:32 +00:00
Roger Dingledine
6e571c8c4c
make base16_encode() fail more obviously when it fails
...
svn:r2087
2004-07-21 22:33:26 +00:00
Roger Dingledine
cdb98cf04a
fix our tls handshake chain cert bug
...
svn:r2086
2004-07-21 22:11:11 +00:00
Roger Dingledine
ce7fcd110c
solve the authdirserver initialization precedence problem
...
svn:r2085
2004-07-21 18:53:56 +00:00
Roger Dingledine
1e62d24ddc
bugfix: only require the correct key if the nickname is for
...
a verified router
svn:r2084
2004-07-21 18:20:09 +00:00
Nick Mathewson
c83f0e948f
Log certificate lifetime on failure.
...
svn:r2083
2004-07-21 17:59:24 +00:00
Roger Dingledine
fd0fcc89e9
disallow picking unverified routers in circuits
...
(for now)
svn:r2082
2004-07-21 09:35:24 +00:00
Roger Dingledine
ecc9009256
authdirservers accept the uploading of unverified descriptors.
...
fix a bunch of bugs in router_update_status_from_smartlist()
(Nick, did I get them all, or was there a trickier one still hiding?)
svn:r2081
2004-07-21 09:13:12 +00:00
Roger Dingledine
906d1aa99f
caching dirservers don't handle posts, running-routers, or rend descs
...
svn:r2080
2004-07-21 08:40:57 +00:00
Roger Dingledine
3e97c12f24
rearrange to prepare to solve the authdirserver initialization
...
precedence problem. doesn't actually solve it yet.
svn:r2079
2004-07-21 07:50:06 +00:00
Nick Mathewson
2d514037b7
Log number of certs in wrong-length chains
...
svn:r2078
2004-07-21 03:32:56 +00:00
Roger Dingledine
ddb6eb35af
we were counting incorrectly when trying to figure out whether
...
a given AP stream was being handled or not.
(how did this work?)
svn:r2077
2004-07-21 03:16:24 +00:00
Roger Dingledine
30d6b1479b
clients exit immediately on interrupt; they don't wait
...
svn:r2076
2004-07-21 03:15:32 +00:00
Roger Dingledine
84b8f8e04a
fix some bool logic
...
svn:r2075
2004-07-21 02:42:49 +00:00
Roger Dingledine
e547ab293b
make connection_tls_finish_handshake() more plausible.
...
now we accept connections from unknown routers.
svn:r2074
2004-07-21 02:25:14 +00:00
Nick Mathewson
334de84cbe
Misc small code cleanups; remove exit_server_mode(); change tor_tls_verify behavior
...
svn:r2073
2004-07-21 00:44:04 +00:00
Roger Dingledine
99926813b1
get the function prototype right
...
svn:r2072
2004-07-21 00:21:26 +00:00
Roger Dingledine
73ffcc5cef
add a new advertised_server_mode() to distinguish ORs that
...
are willing to become servers from ones that really are servers.
svn:r2071
2004-07-21 00:12:42 +00:00
Roger Dingledine
0da256ef97
when we get a sigint, don't accept new connections/circuits,
...
but delay 30 seconds until exiting.
if we get a second sigint, exit immediately.
svn:r2070
2004-07-20 23:31:00 +00:00
Nick Mathewson
18d752e518
Correct "advance-time" logic
...
svn:r2069
2004-07-20 23:25:00 +00:00
Nick Mathewson
06c11a61ce
When faking gettimeofday with ftime, do it right.
...
svn:r2068
2004-07-20 21:23:50 +00:00
Nick Mathewson
2a339b7627
Split uptime into separate field
...
svn:r2067
2004-07-20 21:13:11 +00:00
Nick Mathewson
e57698cc6e
Track bandwidth usage to estimate capacity
...
svn:r2065
2004-07-20 20:57:46 +00:00
Nick Mathewson
d858a9e990
Remember list of digests for trusted dirservers; use this list to tell whether you are a trusted dirserver
...
svn:r2064
2004-07-20 20:09:59 +00:00
Roger Dingledine
d5999a24af
also don't hang up on him if we're an OR and he's an authdirserver
...
otherwise we keep getting taken out of the running-routers list
svn:r2063
2004-07-20 19:45:29 +00:00
Roger Dingledine
66fc6cf04a
if you're an OR and he's an OR and he's running 0.0.7,
...
don't expire your connections to him.
svn:r2062
2004-07-20 19:28:02 +00:00
Roger Dingledine
dc7951a5a7
a whole swath of fixes
...
introduce an authdir_mode() macro to match the others.
don't initialize uptime to the number of seconds since 1970.
non-authoritative dirservers don't cache their directory on disk.
make only authdirservers use clique_mode.
only read approved-routers file if you're an authdirserver.
even authdirservers fetch a new directory in do_hup.
retry_all_connections() is now called retry_all_listeners().
router_parse_list_from_string() correctly reports the router number
it's working on.
only call dirserv_add_own_fingerprint() and
dirserv_add_descriptor() on startup if we're an authdirserver.
if AuthDir and !ORPort then fail.
if AuthDir and ClientOnly then fail.
svn:r2061
2004-07-20 10:17:43 +00:00
Roger Dingledine
f54224ab35
clients can now pick non-authdirservers for fetching directories.
...
servers still pick authdirservers, but they never pick themselves.
but picking themselves for fetching rend descs is ok.
svn:r2059
2004-07-20 06:44:16 +00:00
Roger Dingledine
b4d4a961b1
break connection_dir_client_finished_reading() into its own function
...
svn:r2058
2004-07-20 02:44:26 +00:00
Roger Dingledine
a5ff0527e6
it turns out we weren't looking at the result from getsockopt().
...
now we do.
but i'm not sure it matters, since we also poll for reads, and if
there's an error with the connecting socket, poll is supposed to
return readable, so we should notice it then.
who knows.
svn:r2057
2004-07-19 23:26:21 +00:00
Roger Dingledine
19deb93c29
more useful warning messages
...
(fixed because the old ones confused a user)
svn:r2055
2004-07-19 19:49:03 +00:00
Nick Mathewson
54c129d8dc
abstract ORPort/SocksPort checks into server_mode(), proxy_mode(), clique_mode(), etc. Dont change underlying comments.
...
svn:r2054
2004-07-18 21:47:04 +00:00
Roger Dingledine
87d0948903
bugfix: hidden services were broken in cvs
...
svn:r2053
2004-07-17 19:50:29 +00:00
Nick Mathewson
df3544422c
Change rule from "reject non-recommended versions" to "reject obsolete versions". A version is "obsolete" if it is non-recommended, and at least one recommended version is newer than it.
...
svn:r2052
2004-07-16 23:33:42 +00:00
Nick Mathewson
1040762531
Remove 1024-router limit in routerparse.c; unify handling of running-routers lines in running-routers requests and in directories; set is_verified field of routerinfo_ts correctly; use most-recent-info rule to decide whether to change router-is-running status.
...
svn:r2051
2004-07-16 23:05:40 +00:00
Nick Mathewson
bc36db351f
Resolve all DOCDOCs.
...
svn:r2050
2004-07-16 22:23:18 +00:00
Nick Mathewson
656a664334
Revert cpuworker to use addr/port
...
svn:r2049
2004-07-16 21:47:18 +00:00
Nick Mathewson
0b3357d573
Look in .torrc if no CONFDIR "torrc" is found.
...
svn:r2048
2004-07-16 19:43:58 +00:00
Nick Mathewson
9364c40afd
Add generic expand_filename function to handle expanding ~/
...
svn:r2047
2004-07-15 02:00:43 +00:00
Nick Mathewson
c458f33ef1
Fix warning
...
svn:r2046
2004-07-15 01:59:18 +00:00
Nick Mathewson
5f7738d4cc
Code to parse tor version numbers so we can do an is-newer-than check.
...
svn:r2044
2004-07-13 19:16:49 +00:00
Nick Mathewson
c2103eb63a
Finish most pre2 items: make running-routers list work right; rename secret key files; make even more lookup-by-nickname use lookup-by-id; default nicknames to hostname.
...
svn:r2043
2004-07-13 18:23:40 +00:00
Nick Mathewson
e9365f9ed5
Bugfix: some things (like ctrl-z) can make a second take more than one second
...
svn:r2042
2004-07-13 18:07:57 +00:00
Roger Dingledine
d37850bb98
only count bytes transmitted to/from non-local IPs
...
svn:r2041
2004-07-13 16:58:01 +00:00
Roger Dingledine
7e344f191a
add is_local_IP() function to help distinguish which bandwidth "matters"
...
svn:r2040
2004-07-13 16:57:37 +00:00
Roger Dingledine
86e0ede07e
checkpoint: start working on bandwidth tracking and
...
letting clients evaluate whether they're suitable servers
svn:r2037
2004-07-13 07:42:20 +00:00
Roger Dingledine
017d7d1fb3
refuse to build a circuit before the directory has arrived
...
this will prevent a few of the 'couldn't decrypt onionskin' errors, maybe
svn:r2036
2004-07-13 01:25:39 +00:00
Roger Dingledine
3294b514d3
when you expire a wedged dir conn, conn_close_if_marked will take
...
care of trying to flush before it closes
svn:r2035
2004-07-13 00:38:08 +00:00
Roger Dingledine
149115cc4e
bugfix: tell circuits what id_digest to look for, so
...
n_conn_open() can find waiting circuits.
svn:r2034
2004-07-12 23:53:16 +00:00
Roger Dingledine
a3aaff34b7
why does gcc not warn me about this at all? that's evil.
...
svn:r2032
2004-07-12 20:41:20 +00:00
Roger Dingledine
2325050b1b
tor now tolerates down dirservers better
...
svn:r2031
2004-07-12 20:39:40 +00:00
Roger Dingledine
63256c9e7a
make unit tests pass again
...
but note a bug that i don't know how to address. nick?
svn:r2030
2004-07-12 20:18:05 +00:00
Roger Dingledine
538655cd80
if connecting to an OR fails immediately, mark it as down
...
svn:r2029
2004-07-12 18:19:55 +00:00
Roger Dingledine
e167eeb18e
add 'advertisedbandwidth' to router descriptor
...
svn:r2028
2004-07-12 18:02:54 +00:00
Roger Dingledine
17e5f25214
trivial punctuation tweak
...
svn:r2027
2004-07-12 16:51:28 +00:00
Roger Dingledine
379768290e
fix a bug related to reading usernames for socks4
...
this hasn't bitten us yet, but hey.
svn:r2026
2004-07-12 16:51:05 +00:00
Nick Mathewson
38c889c454
Remove spurious assert
...
svn:r2018
2004-07-07 19:51:20 +00:00
Nick Mathewson
e9d81d873b
Fix the router_compare_to_my_exit_policy assertion failure once-and-for-all, by declaring 0.0.0.0 always denied.
...
svn:r2017
2004-07-07 19:49:48 +00:00
Nick Mathewson
88451ce25b
Yes, I did mean "else if".
...
svn:r2016
2004-07-06 23:29:34 +00:00
Nick Mathewson
d5e275ddf4
Fix bug reported by peter palfrader: an empty address is unresolvable, but not an occasion for an assertion failure in a dnsworker.
...
svn:r2015
2004-07-06 23:25:21 +00:00
Roger Dingledine
cbf73b2bc5
touchups all over
...
put uptime in descriptor
svn:r2011
2004-07-04 22:48:11 +00:00
Nick Mathewson
0f3fcfd1db
When tor_lookup_hostname says 0.0.0.0, treat it as an error.
...
svn:r2003
2004-07-04 04:52:43 +00:00
Roger Dingledine
198e5f4c16
fix a seg fault when you try to launch a circ
...
svn:r2002
2004-07-03 01:45:13 +00:00
Roger Dingledine
dc0a36d27b
populate circ->n_conn_id_digest when we set circ->n_conn
...
svn:r2001
2004-07-03 01:37:59 +00:00
Nick Mathewson
7d8de8cd10
More digest/nickname fixes
...
svn:r2000
2004-07-02 23:40:03 +00:00
Roger Dingledine
d58d4c0db6
another checkpoint toward letting ORs connect on demand
...
svn:r1999
2004-07-02 23:08:59 +00:00
Roger Dingledine
62dcf9e20f
some of the infrastructure to let ORs connect on demand
...
svn:r1998
2004-07-02 09:29:01 +00:00
Nick Mathewson
cbab134bd9
Switch most uses of *_by_addr_port to *_by_identity_digest
...
svn:r1997
2004-07-01 23:13:04 +00:00
Roger Dingledine
e1ba0c4663
running-routers now lists down routers too (with a ! before their name)
...
svn:r1996
2004-07-01 11:32:26 +00:00
Nick Mathewson
541add90a1
Track routers by hash of identity key; use hex hash of identity key in place of nickname; accept (and use) hash of identity key in EXTEND cells.
...
svn:r1994
2004-07-01 01:16:59 +00:00
Roger Dingledine
f42f04c859
cleanups on 008pre1 items
...
svn:r1993
2004-06-30 21:48:02 +00:00
Nick Mathewson
29818d5b6b
Use arguments to routerlist_update_from_runningrouters correctly
...
svn:r1992
2004-06-30 16:48:36 +00:00
Nick Mathewson
b1e9adf056
Always use get_data_directory() instead of options.DataDirectory; fix a memory leak in router.c
...
svn:r1991
2004-06-30 16:37:08 +00:00
Nick Mathewson
653aaeef08
Always log version when starting tor.
...
svn:r1990
2004-06-30 16:35:11 +00:00
Roger Dingledine
899bd4f471
stop leaking options->ContactInfo on hup
...
svn:r1989
2004-06-29 19:46:06 +00:00
Roger Dingledine
0f69fd9954
add an example ContactInfo line to torrc.sample
...
svn:r1988
2004-06-29 19:32:11 +00:00
Nick Mathewson
76f769deb9
Remaining 008pre1 items done; deferred where more design is needed.
...
More docs and (way more!) testing needed.
Done:
- Authdirservers down directories from others.
- Generate and use running-routers lists
- Cache directories; store across reboots.
- Refactor directory parsing a bit; note potential trouble spots.
svn:r1985
2004-06-25 00:29:31 +00:00
Nick Mathewson
f7976c1e9b
Terminate comment
...
svn:r1982
2004-06-21 04:40:24 +00:00
Nick Mathewson
8aec3a7301
Implement several 008pre1 items: needs more testing
...
svn:r1981
2004-06-21 04:37:27 +00:00
Roger Dingledine
207fcb35d1
tweaks and bugfix on resolve/resolved code
...
svn:r1980
2004-06-17 21:11:09 +00:00
Nick Mathewson
3708886939
Implement RESOLVE/RESOLVED cells and socks resolve code
...
svn:r1978
2004-06-17 18:13:09 +00:00
Roger Dingledine
ba5d48e852
router->is_trusted_dir implies router->dir_port>0
...
and add some infrastructure for fetching running-routers list
svn:r1973
2004-06-16 21:08:29 +00:00
Roger Dingledine
80cee93f84
include <inttypes.h> if we have it
...
openbsd on a sparc64 needs this (apparently)
svn:r1971
2004-06-16 00:49:27 +00:00
Roger Dingledine
43295ca61f
if datadirectory isn't owned by this uid, tell the user he must
...
fix it before he can proceed.
svn:r1968
2004-06-13 11:28:32 +00:00
Roger Dingledine
73d3f3efa5
what is this "command line" that we can allegedly write to?
...
svn:r1967
2004-06-13 11:25:20 +00:00
Nick Mathewson
a788981399
Implement code to run tor as an NT service. More testing is needed, as is code to install the service.
...
svn:r1966
2004-06-12 21:43:02 +00:00
Nick Mathewson
125b351970
Break tor_main into startup/loop/shutdown portions, to make NT service refactoring possible.
...
svn:r1965
2004-06-12 19:45:46 +00:00
Roger Dingledine
23c1a72c4c
Address can be an IP too
...
svn:r1964
2004-06-10 14:23:34 +00:00
Nick Mathewson
dbf9fe57ea
Use intptr_t correctly in test.c; try to resolve ia64 warnings
...
svn:r1963
2004-06-08 19:08:45 +00:00
Nick Mathewson
5577333db7
Update windows version to 0.0.7
...
svn:r1962
2004-06-07 22:31:24 +00:00
Roger Dingledine
d90cb3504e
provide a prototype for dnsworkers_rotate
...
svn:r1961
2004-06-07 20:00:30 +00:00
Roger Dingledine
26f77f4454
tweak on the sample torrc
...
svn:r1951
2004-06-06 18:00:59 +00:00
Nick Mathewson
184f4e6044
Rotate dnsworkers and cpuworkers on SIGHUP, so they get new config settings too
...
svn:r1950
2004-06-06 03:38:31 +00:00
Nick Mathewson
0d1b4b5024
Unbork windows whitespace
...
svn:r1949
2004-06-05 01:56:54 +00:00
Nick Mathewson
17b5b3685f
Make tor build on win32 again; handle locking for server
...
svn:r1948
2004-06-05 01:50:35 +00:00
Roger Dingledine
42569ffd0f
bump an info message down to a debug
...
svn:r1947
2004-06-03 05:57:27 +00:00
Nick Mathewson
dda75e8f09
Document new config options in torrc.sample.in
...
svn:r1944
2004-06-02 20:36:39 +00:00
Nick Mathewson
66881d5709
If we are a directory, we should trust ourself.
...
svn:r1943
2004-06-02 20:15:35 +00:00
Nick Mathewson
65e26bae3d
Check directory signatures based on name of signer, not on whom we got the directory from.
...
svn:r1940
2004-06-02 20:00:57 +00:00
Roger Dingledine
011ccbbf8d
crank up some of our constants, for better scalability
...
svn:r1938
2004-06-02 19:44:41 +00:00
Roger Dingledine
4db9e9aa8a
define FD_SETSIZE in all cases, not just win32
...
svn:r1937
2004-06-02 19:44:23 +00:00
Nick Mathewson
605e10a650
Stop multiplying logs on sighup.
...
svn:r1936
2004-06-02 19:18:37 +00:00
Roger Dingledine
69931106f8
be sure to detach streams from the circuit linked list before freeing them
...
also, don't bother marking a conn for close if you're about to free it
svn:r1935
2004-06-02 18:32:24 +00:00
Nick Mathewson
0932505829
Only connection_dns_remove resolving exit connections
...
svn:r1934
2004-06-02 18:12:49 +00:00
Roger Dingledine
fbbb4d01c3
bugfix: while closing a circuit, we were freeing the conns that were
...
pending resolve, but not removing them from the pending resolve list
svn:r1933
2004-06-02 18:11:28 +00:00
Nick Mathewson
0d20fee2fb
Add more asserts to dns-pending connections; fix a couple seeming bugs.
...
svn:r1931
2004-06-01 22:09:58 +00:00
Nick Mathewson
94782444f8
Check recommended-software string *early*, before actually parsing the directory.
...
svn:r1930
2004-06-01 18:19:01 +00:00
Roger Dingledine
4181d18b3d
declare the epipe bug a non-bug.
...
now we catch and ignore epipe signals, and when write returns epipe,
we simply return -1 and close the socket/connection.
svn:r1928
2004-06-01 17:31:13 +00:00
Roger Dingledine
1ef411fefd
use sys/param.h if it's there
...
svn:r1927
2004-06-01 17:03:01 +00:00
Roger Dingledine
8ca162c472
put a comment reminding us that we do hashes in software only
...
svn:r1925
2004-06-01 16:36:56 +00:00
Roger Dingledine
834ffa358f
bugfix: if the wedged dir conn has no bytes to flush, then we never
...
close it.
svn:r1924
2004-05-28 17:56:17 +00:00
Roger Dingledine
8064807896
dirservers try to reconnect periodically too, in case connections have failed
...
svn:r1922
2004-05-28 15:01:47 +00:00
Roger Dingledine
1841aa456b
rik's patch to not complain about freebsd's bug
...
svn:r1921
2004-05-26 20:27:54 +00:00
Nick Mathewson
9b4e8486ce
Keep temporary log in place while configuring logs
...
svn:r1919
2004-05-24 02:28:15 +00:00
Roger Dingledine
994c9cbd7e
commit two fixes from Thomas Themel
...
svn:r1918
2004-05-22 18:05:20 +00:00
Roger Dingledine
f875db1821
it looks like parse_log_level() was never taught about WARN?
...
svn:r1917
2004-05-21 12:38:52 +00:00
Roger Dingledine
c278ff3bc2
minor comment patch
...
svn:r1916
2004-05-21 12:30:07 +00:00
Roger Dingledine
f51061439b
when the dns resolve is cancelled, or fails, be sure to remove
...
conn from circ->resolving_streams
otherwise it gets freed and stays there, causing seg faults.
svn:r1915
2004-05-21 12:25:15 +00:00
Roger Dingledine
3532ba8177
a few instructions for hidden services
...
svn:r1914
2004-05-20 22:41:06 +00:00
Roger Dingledine
a8417dfac8
fix a double mark-for-close
...
svn:r1913
2004-05-20 22:39:01 +00:00
Nick Mathewson
ccb825128e
Tinker with log behavior: never send error messages about logs into the bitbucket
...
svn:r1912
2004-05-20 19:47:28 +00:00
Roger Dingledine
1c21a02b90
router_choose_random_node() was ignoring its routerlist argument.
...
so now we don't pass it one.
svn:r1911
2004-05-20 19:12:28 +00:00
Roger Dingledine
66dd21b7a4
some more patching
...
svn:r1910
2004-05-20 08:41:54 +00:00
Roger Dingledine
034110e761
bugfix: if no loglevel or logfile is specified, then we need to open
...
a default log to stdout.
svn:r1909
2004-05-20 08:15:28 +00:00
Roger Dingledine
faf2fdb1e0
don't ever expire dirserver routerinfos!
...
svn:r1908
2004-05-20 06:42:38 +00:00
Roger Dingledine
30a07b2ecd
non-dirservers expire routerinfo's that are more than a day old
...
svn:r1907
2004-05-20 05:10:30 +00:00
Roger Dingledine
b6faca2268
enable checking the socks policy
...
svn:r1906
2004-05-20 04:16:43 +00:00
Nick Mathewson
80365b9897
Allow multiple exit policy lines; mostly add support for AP policies
...
svn:r1905
2004-05-20 02:42:50 +00:00
Nick Mathewson
80be19d9da
Tighten assert_cpath_layer_ok assumptions
...
svn:r1904
2004-05-19 23:51:39 +00:00
Roger Dingledine
b37450ce55
do all the heavy lifting in connection_about_to_close_connection,
...
not in _connection_mark_for_close
this will hopefully clean up the huge cyclical function mess
svn:r1903
2004-05-19 23:32:20 +00:00
Nick Mathewson
b8f535a2d8
tor_assert, not assert. stdout, not stderr
...
svn:r1902
2004-05-19 21:40:44 +00:00
Nick Mathewson
d95f347b14
Add Port to *bindAddress.
...
svn:r1901
2004-05-19 20:25:44 +00:00
Nick Mathewson
9d2cd7fc6e
Allow multiple logfiles at different severity ranges
...
svn:r1899
2004-05-19 20:07:08 +00:00
Roger Dingledine
41c9b8230d
fix compile error in dirserv
...
(declare variables before the rest of the function)
svn:r1896
2004-05-19 19:42:50 +00:00
Nick Mathewson
ba14428d66
Fix segfault
...
svn:r1895
2004-05-19 19:28:24 +00:00
Nick Mathewson
1cfac90984
remove upper limit on number of descriptors/directories in dirserver; use smartlists instead of arrays
...
svn:r1894
2004-05-18 17:41:40 +00:00
Roger Dingledine
d2de7120fa
fix a seg fault, add another XXX for nick ;)
...
svn:r1892
2004-05-18 16:54:04 +00:00
Nick Mathewson
7511fbf993
Resolve some XXXs
...
svn:r1889
2004-05-18 15:35:21 +00:00
Nick Mathewson
a782b83c28
Only try to launch a fixed number of intro circuits for a service per 15-minute period or before all of the intro circuits succeed, whichever comes first
...
svn:r1883
2004-05-18 01:53:53 +00:00
Nick Mathewson
683d06bf44
Fix segfault and logic error in last patch.
...
svn:r1881
2004-05-17 20:41:40 +00:00
Nick Mathewson
50b7ebcf9e
Make directory functions update routerlist, not replace it. Add notion of OR-is-trusted-to-be-a-dirserver. Arma, please review: does this handle being a dirserver right?
...
svn:r1880
2004-05-17 20:31:01 +00:00
Roger Dingledine
6dc576bab7
bugfix: our integrity-checking digest was checking only the most
...
recent cell, not the previous cells like we'd thought.
this change is backward incompatible.
svn:r1868
2004-05-15 23:49:41 +00:00
Roger Dingledine
04bb8c8046
bugfix: if a circuit if borderline too old, then count it as too old.
...
bugfix: we were retrying the same circuit after getting a resolve
failure. so of course the next two tries would fail too. now we try
a new circuit each time (at most three times).
svn:r1867
2004-05-15 07:21:25 +00:00
Roger Dingledine
010ee5d0ba
having two example exitpolicy lines, when only one is allowed, was confusing
...
svn:r1865
2004-05-13 22:38:16 +00:00
Roger Dingledine
d7815e85a7
assert_cpath_ok has always been broken
...
re-disable it.
svn:r1864
2004-05-13 07:44:21 +00:00
Roger Dingledine
ef561c0e42
Break files apart into more modules
...
* \file circuitbuild.c
* \brief The actual details of building circuits.
* \file circuitlist.c
* \brief Manage the global circuit list.
* \file circuituse.c
* \brief Launch the right sort of circuits, attach streams to them.
* \file connection_edge.c
* \brief Handle edge streams.
* \file onion.c
* \brief Functions to queue create cells, and handle onionskin
* parsing and creation.
* \file relay.c
* \brief Handle relay cell encryption/decryption, plus packaging and
* receiving from circuits.
svn:r1863
2004-05-13 07:24:49 +00:00
Roger Dingledine
5ba9235873
clean up directory.c API
...
svn:r1860
2004-05-12 23:48:57 +00:00
Roger Dingledine
630e930799
don't flush the buf from inside connection_write_to_buf
...
svn:r1859
2004-05-12 22:56:26 +00:00
Roger Dingledine
1cf1836990
break connection_edge_end out of connection_mark_for_close
...
svn:r1858
2004-05-12 21:12:33 +00:00
Nick Mathewson
537fb82cbb
Make some functions static
...
svn:r1857
2004-05-12 20:58:27 +00:00
Roger Dingledine
32c42a0ee2
break rend_client_desc_fetched out of connection_mark_for_close
...
svn:r1856
2004-05-12 20:36:44 +00:00
Roger Dingledine
7ee6194f3a
break part of circuit.c into relay.c
...
svn:r1854
2004-05-12 19:49:48 +00:00
Nick Mathewson
9c3fba5c3b
Not every RSA decrypt should warn on failure.
...
svn:r1853
2004-05-12 19:30:28 +00:00
Nick Mathewson
f1bc7af9f5
Make "connected" a different case from "finished_flushing"; always close_immediate whhen connect() fails.
...
svn:r1852
2004-05-12 19:17:09 +00:00
Roger Dingledine
4c9138d640
calling flush_buf and not checking for return value is bad
...
svn:r1851
2004-05-12 18:41:32 +00:00
Roger Dingledine
df4be6a1f7
list in-points to command.c
...
svn:r1849
2004-05-11 03:21:18 +00:00
Nick Mathewson
3e2f889a29
Add an extra flush attempt when closing wedged dir conns, in an attempt to isolate the EPIPE bug
...
svn:r1848
2004-05-11 01:55:32 +00:00
Nick Mathewson
b45fafa3d0
Split directory/router parsing functionality into separate file from routerlist.c
...
svn:r1846
2004-05-10 17:30:51 +00:00
Roger Dingledine
83f06dcc97
always a bit more
...
svn:r1844
2004-05-10 10:31:48 +00:00
Roger Dingledine
3cdf2d67da
it's amazing what a bit of punctuation can do for appearances
...
svn:r1843
2004-05-10 10:27:54 +00:00
Roger Dingledine
6168b3222e
a few more pieces of markup
...
svn:r1841
2004-05-10 08:56:42 +00:00
Roger Dingledine
5dd9e60231
doxygen markup for common/*.h
...
svn:r1840
2004-05-10 07:54:13 +00:00
Roger Dingledine
341d6f2cab
more cleanup, including fleshing out or.h more
...
svn:r1839
2004-05-10 07:37:10 +00:00
Nick Mathewson
720281b32e
Close rogue <b>s
...
svn:r1838
2004-05-10 07:27:29 +00:00
Roger Dingledine
d9fa234fd9
comments and doxygen markup on circuit.c
...
svn:r1837
2004-05-10 07:02:58 +00:00
Nick Mathewson
3bf2c572ad
Doxygen most of or.h
...
svn:r1836
2004-05-10 06:52:01 +00:00
Nick Mathewson
ae2a2072b9
Doxygenate config.c
...
svn:r1834
2004-05-10 04:48:13 +00:00
Roger Dingledine
4845fe7197
comment and doxygenate connection_edge.c
...
svn:r1833
2004-05-10 04:42:22 +00:00
Nick Mathewson
81922a125c
More doxygenation.
...
svn:r1832
2004-05-10 04:34:48 +00:00
Roger Dingledine
397466a23d
give connection.c a skeletal file/brief header
...
svn:r1831
2004-05-10 03:56:58 +00:00
Roger Dingledine
658873eb01
tweak comment in connection_or
...
svn:r1830
2004-05-10 03:54:33 +00:00
Nick Mathewson
c0ea93337d
Doxygenate common.
...
svn:r1829
2004-05-10 03:53:24 +00:00
Roger Dingledine
9968f1da98
doxygen for tor_main.c
...
svn:r1828
2004-05-10 02:43:41 +00:00
Roger Dingledine
a26265c3cc
remove an orphan function declaration
...
svn:r1827
2004-05-10 02:39:48 +00:00
Roger Dingledine
21e094a5d3
function header comments for onion.c, including doxygen markup
...
svn:r1826
2004-05-10 02:36:04 +00:00
Roger Dingledine
8f6aa6688f
function header comments for connection.c, including doxygen markup
...
svn:r1825
2004-05-10 01:32:57 +00:00
Roger Dingledine
c6d4a00c5f
more doxygen markup
...
plenty more remains
svn:r1824
2004-05-09 16:47:25 +00:00
Roger Dingledine
b384c5a18d
bugfix: do directory_send_command only after we've established a socket
...
also many comments, cleaning, etc
svn:r1823
2004-05-09 16:33:04 +00:00
Nick Mathewson
93576d5289
Add doxygen markup for util and buffers
...
svn:r1820
2004-05-07 17:04:12 +00:00
Roger Dingledine
fa3db976df
comment the functions in connection_or.c
...
svn:r1818
2004-05-07 08:53:40 +00:00
Roger Dingledine
f1fc4ce22b
comment the functions in command.c
...
this is one of the files nick regarded as scary, so hopefully
these will help.
svn:r1817
2004-05-07 08:07:41 +00:00
Roger Dingledine
d4efa475a1
forward-port header-length-increase patch
...
svn:r1814
2004-05-06 22:47:48 +00:00
Roger Dingledine
e45fd6cec1
forward-port built-in dirservers string
...
svn:r1813
2004-05-06 22:47:15 +00:00
Roger Dingledine
f34b600764
forward-port dirservers file
...
svn:r1812
2004-05-06 22:46:42 +00:00
Nick Mathewson
6cfa2835a1
Fix bug in stream position adjustment
...
svn:r1801
2004-05-06 19:51:50 +00:00
Nick Mathewson
ebe8fa0d62
Use correct aes-ctr implementation in mainline, too.
...
svn:r1800
2004-05-06 19:41:33 +00:00
Roger Dingledine
9bf9ca4d09
bugfix: add a circ->resolving_streams field, and make dns resolving streams not actually in the connection_array until they're done resolving.
...
bugfix: actually complain if we duplicate mark-for-close a circuit
add more logging for relay ends that claim dns resolve failed, so we can
find out why they're not being retried.
svn:r1798
2004-05-06 11:08:04 +00:00
Nick Mathewson
e6477a8e16
Document the rest of main.c
...
svn:r1797
2004-05-05 21:35:12 +00:00
Nick Mathewson
682a805092
Comments for nearly all non-tricky files
...
svn:r1796
2004-05-05 21:32:43 +00:00
Nick Mathewson
6cfdc90d92
Use intptr_t when playing with void*s
...
svn:r1795
2004-05-05 20:27:20 +00:00
Nick Mathewson
8aebd83a0e
Add intptr_t and uintptr_t to torint.h
...
svn:r1794
2004-05-05 20:26:35 +00:00
Nick Mathewson
e6ac85a8cc
Fix compilation warnings on 64-bit platforms
...
svn:r1793
2004-05-05 20:09:06 +00:00
Nick Mathewson
44defa4b1a
Never list unapproved servers as recommended
...
svn:r1790
2004-05-05 04:55:00 +00:00
Nick Mathewson
924f60288a
More documentation; fix for compilation warning
...
svn:r1789
2004-05-05 02:50:38 +00:00
Nick Mathewson
2ba0776b02
Only connection_add connections once they have conn->s sett; refactor code around this. Should make stuff more bulletproof.
...
svn:r1788
2004-05-05 01:26:57 +00:00
Nick Mathewson
d49d3dcc7b
Make non-fake tor_poll robust against -1 fds
...
svn:r1787
2004-05-05 01:01:34 +00:00
Roger Dingledine
608c156820
must close marked connections at the end of run_scheduled_events.
...
otherwise they might have a socket -1, and if we leave them around
they'll muck up poll/select.
i think this was the cause of our win32 and os x fakepoll crashes,
and probably would cause other errors down the road.
svn:r1786
2004-05-05 00:59:42 +00:00
Nick Mathewson
efdb356a81
More documentation
...
svn:r1785
2004-05-05 00:30:43 +00:00
Roger Dingledine
fa6e9efcd0
accept port 81 by default also, since people have been asking for it
...
svn:r1784
2004-05-04 22:46:19 +00:00
Nick Mathewson
89275e7806
Comment router*.c
...
svn:r1783
2004-05-04 18:17:45 +00:00
Nick Mathewson
08ac3c7190
Fix mac compile
...
svn:r1782
2004-05-04 18:17:28 +00:00
Nick Mathewson
e6f3bf2a68
tor_assert(), not assert()
...
svn:r1777
2004-05-02 20:27:48 +00:00
Nick Mathewson
3dd1ef8783
Fix windows compile.
...
svn:r1776
2004-05-02 20:23:35 +00:00
Nick Mathewson
af08c4f878
Working strerror for windows socket errors, plus some snide comments.
...
svn:r1775
2004-05-02 20:18:21 +00:00
Nick Mathewson
a187d3e0b6
Assert that we never try to fakepoll on sock -1.
...
svn:r1774
2004-05-02 20:17:43 +00:00
Nick Mathewson
a16ec39800
Windows version is 0.0.6 too
...
svn:r1771
2004-05-02 19:29:59 +00:00
Nick Mathewson
d055ac4709
Bump windows version to 0.0.6rc4
...
svn:r1767
2004-05-02 03:38:31 +00:00
Roger Dingledine
bbbc063ed9
stop the circuit_receive_relay_cell warning
...
mark the circ for close if circuit_extend fails because the next
hop is not up yet; don't just return -1
svn:r1765
2004-05-02 03:32:00 +00:00
Roger Dingledine
25909c2c29
patches on patches
...
svn:r1763
2004-05-02 03:15:55 +00:00
Roger Dingledine
1558fb7650
some patches on the patches
...
svn:r1761
2004-05-01 23:29:20 +00:00
Nick Mathewson
f6fe336ad4
Documenmt buffers.c; remove function that nobody ever calls.
...
svn:r1760
2004-05-01 22:08:43 +00:00
Nick Mathewson
4dc30ea3c8
Remove bogus */ so util.c compiles
...
svn:r1759
2004-05-01 21:50:53 +00:00
Nick Mathewson
9a041591ac
Finish documenting the functions in common
...
svn:r1758
2004-05-01 21:41:23 +00:00
Nick Mathewson
6fa2ded74c
Fix windows compile
...
svn:r1757
2004-05-01 20:55:31 +00:00
Nick Mathewson
908ccb9dcd
Handle windows socket errors correctly; comment most of common.
...
svn:r1756
2004-05-01 20:46:28 +00:00
Roger Dingledine
ac4cb9bdd1
fix a seg fault (whoops)
...
svn:r1755
2004-04-30 16:35:48 +00:00
Roger Dingledine
2b5e6aef15
note another bug to be fixed sometime
...
svn:r1754
2004-04-30 05:42:52 +00:00
Roger Dingledine
18f250c364
update the built-in dirservers default
...
svn:r1750
2004-04-29 08:10:13 +00:00
Roger Dingledine
4b316b4a7d
some cosmetic fixes
...
svn:r1747
2004-04-29 02:52:49 +00:00
Nick Mathewson
5a9b144092
Oops -- the Windows function is closesocket, not socketclose
...
svn:r1746
2004-04-28 21:17:42 +00:00
Nick Mathewson
9322641710
Use socketclose on windows as appropriate; end pid files with newline
...
svn:r1745
2004-04-28 21:14:56 +00:00
Roger Dingledine
dd335d9bb2
use tor_lookup_hostname for binding local addresses too
...
svn:r1744
2004-04-28 20:57:03 +00:00
Nick Mathewson
3a66f523a1
Regenerate windows orconfig.h to match current autoheader generated orconfig.h
...
svn:r1743
2004-04-28 20:43:30 +00:00
Nick Mathewson
ddb15b8f67
Remove IVs from cipher code, since AES-ctr has none.
...
svn:r1742
2004-04-28 20:31:32 +00:00
Roger Dingledine
5d1510883e
use nick's _ARRAYSIZE abstraction
...
svn:r1741
2004-04-28 20:22:37 +00:00
Roger Dingledine
47dc5cd1c8
nick, is this what you meant?
...
svn:r1740
2004-04-28 20:18:22 +00:00
Nick Mathewson
7055f837ab
Make Tor build on win32 with VC6 without warnings.
...
svn:r1739
2004-04-28 20:13:21 +00:00
Roger Dingledine
ca8d50abeb
bug resolved (hopefully), so remove comment
...
svn:r1738
2004-04-28 20:12:44 +00:00
Roger Dingledine
22c0cd8a14
clean dns.c better
...
svn:r1737
2004-04-28 20:11:37 +00:00
Roger Dingledine
25d5425fdb
fix a bug in dns.c, note but don't fix another one
...
svn:r1735
2004-04-28 19:55:20 +00:00
Nick Mathewson
ac622d94dc
Workarounds for a couple of pieces of windows strangeness.
...
svn:r1734
2004-04-28 19:35:12 +00:00
Roger Dingledine
8cc9001391
clean some dead code (right?)
...
svn:r1733
2004-04-28 00:05:56 +00:00
Roger Dingledine
4e0dd5bd33
some compilers don't like an array of length zero
...
nick: should we remove support for IVs for now, since we don't
use them and don't plan to use them?
svn:r1732
2004-04-27 23:50:35 +00:00
Roger Dingledine
158e2cf536
set Content-Type on the directory and hidserv descriptor
...
svn:r1731
2004-04-27 21:48:37 +00:00
Roger Dingledine
9965bd8387
make my assumption explicit
...
svn:r1730
2004-04-27 11:28:45 +00:00
Roger Dingledine
505bb2f4a0
it was the second bug that was nailing us.
...
periodically we expire some circuits if we already have
enough, and we were counting rend circs in that number.
(the first one wasn't a bug after all)
svn:r1729
2004-04-27 11:23:56 +00:00
Roger Dingledine
8e8af6aaee
don't expire joined-rend circs that have an exit connection attached
...
and don't expire non-general excess circuits
svn:r1728
2004-04-27 10:16:31 +00:00
Nick Mathewson
873564ea9c
Some versions of openssl have an SSL_pending function that erroneously
...
returns bytes when there is a non-application record pending.
I have no idea when/why this would even happen, but let's catch it and
make sure tor_tls_get_pending_bytes stays correct.
svn:r1727
2004-04-26 23:19:21 +00:00
Nick Mathewson
06624df622
Log number of bytes pending after read.
...
svn:r1726
2004-04-26 23:05:58 +00:00
Roger Dingledine
d7f4b82373
rendmid says it drops but actually sends nack
...
fix log messages
svn:r1725
2004-04-26 23:02:20 +00:00
Nick Mathewson
d6d4b93863
Remove spurious semi
...
svn:r1724
2004-04-26 23:01:15 +00:00
Nick Mathewson
ad07c62938
Add a macro to catch unhandled openssl errors.
...
svn:r1723
2004-04-26 23:00:07 +00:00
Roger Dingledine
e34c201bb3
and other debugs
...
svn:r1722
2004-04-26 22:22:18 +00:00
Roger Dingledine
719bb5c0f3
log debug so nick can see it too
...
svn:r1721
2004-04-26 22:22:11 +00:00
Peter Palfrader
750211259b
The dots are there so you see test doing something. Therefore we should flush them after printing
...
svn:r1720
2004-04-26 22:12:13 +00:00
Roger Dingledine
80d0b634a4
add a debugging entry, to find the wants-to-read-but-can't bug
...
svn:r1719
2004-04-26 21:15:06 +00:00
Nick Mathewson
337f7a981f
Include strerror(errno) with tls syscall errors
...
svn:r1718
2004-04-26 18:11:58 +00:00
Nick Mathewson
f6dbe5a0d4
Refactor crypto error handling to be more like TLS error handling:
...
crypto_perror is a no-no, since an operation can set more than one
error.
Also, fix a bug in the unix crypto_seed_rng: mixing stdio with
/dev/urandom is a bad idea, since fopen can make all kinds of weird
extraneous syscalls (mmap, fcntl, stat64, etc.) and since fread tends
to buffer data in big chunks, thus depleting the entropy pool.
svn:r1717
2004-04-26 18:09:50 +00:00
Nick Mathewson
b410dff6c0
Log pending TLS errors in a couple more places, in case they are possible.
...
svn:r1716
2004-04-26 16:52:47 +00:00
Roger Dingledine
fff89216a9
tell us when we're rotating things
...
svn:r1712
2004-04-26 09:32:51 +00:00
Roger Dingledine
fb2279b90b
since we don't support truncateds much, don't bother sending them;
...
just close the circ.
(this wasn't relevant before, because we were mis-handling destroys.)
svn:r1711
2004-04-26 04:32:01 +00:00
Roger Dingledine
bd38df8472
fix a bug that's been lurking since 27 may 03 (!)
...
when passing back a destroy cell, we would use the wrong circ id.
how the heck did this work?
svn:r1710
2004-04-26 03:42:41 +00:00
Nick Mathewson
0355d29e12
Call tls_log_errors at a more appropriate location; we can remove the other calls in tor_tls_verify once we are sure they never happen.
...
svn:r1709
2004-04-26 03:09:17 +00:00
Nick Mathewson
75dc76eb3e
Better error msg on unknown circuit id.
...
svn:r1708
2004-04-26 03:00:33 +00:00
Nick Mathewson
cb465160da
Very blunt debugging code: log pending errors at start and end of tor_tls_verify
...
svn:r1707
2004-04-26 02:33:12 +00:00
Roger Dingledine
10f3b74cb9
tell us the nickname of the OR that hung up on us
...
svn:r1706
2004-04-26 01:50:08 +00:00
Nick Mathewson
568a4d187a
Check for machine/limits.h in addition to sys/limits.h
...
svn:r1705
2004-04-25 23:47:26 +00:00
Roger Dingledine
9e5d2ad91c
don't crash, if a conn that sent a begin has suddenly lost its circuit
...
svn:r1704
2004-04-25 22:48:47 +00:00
Roger Dingledine
482d7e7cd3
resolve a double-mark-for-close when things die inside connection_handle_write
...
svn:r1702
2004-04-25 22:23:54 +00:00
Roger Dingledine
dccbbaa88a
give us a new dirservers file
...
svn:r1700
2004-04-25 21:56:52 +00:00
Roger Dingledine
28f034e10a
now assume all routers support rendezvous cells
...
svn:r1699
2004-04-25 21:32:04 +00:00
Roger Dingledine
25d54257fb
use tor_assert
...
remove obsolete BUF_OK macro
svn:r1697
2004-04-25 20:37:37 +00:00
Roger Dingledine
37192bd25e
use tor_assert and PUBLIC_KEY_OK
...
but don't use tor_assert inside log.c, to avoid loops
svn:r1696
2004-04-25 19:59:38 +00:00
Nick Mathewson
e062ca046b
Add a tor_assert macro that logs failed assertions.
...
svn:r1695
2004-04-25 19:37:39 +00:00
Nick Mathewson
70bbd0cafa
Add assert on crypto_pk_write_private_key,and macros to make sure we have real keys
...
svn:r1694
2004-04-25 19:21:44 +00:00
Nick Mathewson
0fca143ea1
Remove onion_pkey from connection, since onion keys can change more often than connections. Also add more log messages
...
svn:r1693
2004-04-25 19:04:11 +00:00
Nick Mathewson
cb3897e5ab
remove spurious router_rebuild_descriptor
...
svn:r1692
2004-04-25 19:01:49 +00:00
Roger Dingledine
7fbc35c136
don't build and upload a new desc twice in a row
...
svn:r1691
2004-04-25 05:19:03 +00:00
Roger Dingledine
e355ed0e15
log correctly if decoding onion failed
...
svn:r1690
2004-04-25 04:49:11 +00:00
Roger Dingledine
6a45028ccb
don't warn when private_decrypt_hybrid fails
...
svn:r1689
2004-04-25 04:32:59 +00:00
Roger Dingledine
7e2a2a7f81
bugfix: when rotating onion key, do it (more) correctly
...
svn:r1688
2004-04-25 03:38:19 +00:00
Roger Dingledine
0b31d0d4e8
more touch-ups
...
svn:r1687
2004-04-24 23:32:24 +00:00
Nick Mathewson
3ace033c0c
Spurious link-key should not be an error
...
svn:r1686
2004-04-24 22:50:09 +00:00
Nick Mathewson
220e859912
Note router addr:port in log messages
...
svn:r1685
2004-04-24 22:40:32 +00:00
Nick Mathewson
2e47a0f009
Compare nicknames casei.
...
svn:r1684
2004-04-24 22:34:31 +00:00
Nick Mathewson
c44016e86e
Merge flagday into main branch.
...
svn:r1683
2004-04-24 22:17:50 +00:00
Roger Dingledine
3c250a2fed
only expire wedged dir conns that haven't already been expired
...
svn:r1676
2004-04-20 17:27:54 +00:00
Roger Dingledine
06a60c4fbb
use the real socketpair if we've got it
...
now it's just windows that has to use the kludged one
svn:r1675
2004-04-19 21:31:32 +00:00
Roger Dingledine
a3200f79cd
the socketpair bug is no longer a bug
...
now it is a documented behavior
svn:r1674
2004-04-19 21:25:48 +00:00
Roger Dingledine
5cfec379ae
expire wedged dir conns after 5min without write, not simply after 5min
...
svn:r1673
2004-04-19 20:08:42 +00:00
Roger Dingledine
d40e9f453f
give wedged dir conns a last chance to flush
...
svn:r1671
2004-04-19 01:59:20 +00:00
Roger Dingledine
c4b72a254f
tmp patch to also expire old clean rend_ready circs for now
...
will have to be fixed once we build-and-open rend circs preemptively
svn:r1668
2004-04-18 09:27:05 +00:00
Roger Dingledine
e9ebefc8bf
bugfix: you mean we're supposed to reuse fresh descriptors and
...
refetch stale ones, not reuse stale ones and refetch fresh ones?
svn:r1667
2004-04-18 09:04:37 +00:00
Roger Dingledine
bce1fc43a2
when you get an intro ack, don't also count it as an intro nack
...
svn:r1666
2004-04-18 08:38:40 +00:00
Roger Dingledine
3fa2925a6a
if an intro circ waiting for an ack dies before getting one, then
...
count it as a nack
svn:r1665
2004-04-18 07:37:16 +00:00
Roger Dingledine
8d86f8abf5
reverse the logic, captain
...
svn:r1664
2004-04-18 06:42:13 +00:00
Roger Dingledine
7a7baf0552
expire dir connections that live for more than 5 minutes
...
svn:r1663
2004-04-18 06:35:31 +00:00
Roger Dingledine
14c30fe9fa
bugfix: give dir_conn a state before building the bridge, so it has
...
a state if things fail
svn:r1660
2004-04-17 20:19:43 +00:00
Roger Dingledine
65d507b980
log n_circ_ids when attaching rend streams
...
svn:r1657
2004-04-17 10:25:38 +00:00
Roger Dingledine
26dd5c68b0
a ! goes a long way toward more helpful debug messages
...
svn:r1656
2004-04-17 10:04:00 +00:00
Roger Dingledine
bd4a776576
include sys/limits.h if it's found
...
svn:r1654
2004-04-17 06:35:18 +00:00
Roger Dingledine
a54ded2879
util.c uses LONG_MAX, needs another include on fbsd 5.x
...
svn:r1653
2004-04-17 06:35:03 +00:00
Roger Dingledine
01e594e512
clean up some warnings
...
svn:r1651
2004-04-17 06:34:20 +00:00
Roger Dingledine
0e94b9ff77
more useful logs to track weasel's bug
...
svn:r1649
2004-04-17 05:17:40 +00:00
Roger Dingledine
f5427463f5
more debugging to hunt for a bug
...
svn:r1647
2004-04-17 01:33:04 +00:00
Roger Dingledine
8d62a36256
bugfix: when you sleep your hidden-service laptop, as soon
...
as it wakes up it tries to upload a service descriptor, but
socketpair fails for some reason (localhost not up yet?)
now we simply give up on that upload, and we'll try again later.
svn:r1646
2004-04-17 00:46:05 +00:00
Roger Dingledine
f36d7b8fea
fix another rare bug: when we had tried all the intro
...
points for a hidden service, we fetched the descriptor
again, but we left our introcirc thinking it had already
sent an intro, so it kept waiting for a response...
svn:r1644
2004-04-16 14:35:28 +00:00
Roger Dingledine
ed24a4f807
fix a pair of duplicate mark-for-closes
...
svn:r1643
2004-04-16 14:26:23 +00:00
Roger Dingledine
f84fa39d87
when alice uses a port that the hidden service doesn't accept,
...
it now sends back an end cell (denied by exit policy). otherwise
alice would just have to wait to time out.
svn:r1642
2004-04-16 13:49:14 +00:00
Roger Dingledine
a0a6ed85d1
more useful logging for rend services and clients
...
svn:r1641
2004-04-16 11:48:03 +00:00
Roger Dingledine
359c1fb9aa
wait a minute, weasel said there was a memory-stomping bug here
...
let's see if we find it
svn:r1639
2004-04-16 08:49:14 +00:00
Roger Dingledine
9c1470840f
i was wrong about one of my invariants
...
now it's commented
this should fix asserts when you try an intro point, get a nack,
and try a second one and it works.
svn:r1637
2004-04-16 08:21:35 +00:00
Roger Dingledine
598d8b8f79
put in an extra assert, might find a bug these way
...
svn:r1636
2004-04-16 04:41:07 +00:00
Roger Dingledine
4c2de3a2b6
compress end-of-second summary into one line
...
svn:r1635
2004-04-15 22:09:14 +00:00
Roger Dingledine
4d380ea902
quiet a -l info that should be -l debug
...
svn:r1634
2004-04-15 22:08:37 +00:00
Nick Mathewson
880ffd8f64
Must detach before attaching, or else we infinite-loop
...
svn:r1632
2004-04-15 03:48:26 +00:00
Nick Mathewson
f6dd710aff
Strings need room for a NUL.
...
svn:r1630
2004-04-15 02:02:46 +00:00
Nick Mathewson
3f352719f3
Add a missing return -1
...
svn:r1629
2004-04-15 01:23:43 +00:00
Roger Dingledine
26c1c8f173
make unattached rend streams expire after a while (60s)
...
(they were darned persistent)
also make intro circs that are waiting for acks expire after a while (20s)
svn:r1628
2004-04-15 01:08:59 +00:00
Roger Dingledine
ac38746b3b
narrow in closer
...
svn:r1627
2004-04-15 00:03:48 +00:00
Roger Dingledine
b51561f7fb
prune abandoned circs better
...
add debugging info for the bug weasel found
svn:r1626
2004-04-14 23:52:29 +00:00
Nick Mathewson
37255d24bc
Retry non-final-hop rendezvous failures
...
svn:r1625
2004-04-14 21:40:50 +00:00
Nick Mathewson
94f126bca3
Never ever leave ri.platform unset.
...
svn:r1624
2004-04-14 19:51:57 +00:00
Roger Dingledine
cda782bac0
make rendezvous points work again
...
(yay. now time to mess them up again.)
svn:r1619
2004-04-14 05:18:21 +00:00
Roger Dingledine
49f5e5b4ae
handle more purposes in new_route_len
...
svn:r1618
2004-04-14 05:06:08 +00:00
Roger Dingledine
465f0e528a
call circuit_build_failed() even when the failure is immediate
...
svn:r1617
2004-04-14 04:32:49 +00:00
Nick Mathewson
ddd45a7c0a
Do not segfault on missing intro points.
...
svn:r1616
2004-04-14 04:19:12 +00:00
Roger Dingledine
f07d880f38
remove unused variable
...
svn:r1615
2004-04-13 23:01:10 +00:00
Roger Dingledine
1d7979b460
let introcircs receive acks. rend streams now deal correctly again.
...
(i think)
svn:r1614
2004-04-13 22:56:24 +00:00
Nick Mathewson
5514ad715b
Scan list of servers in directory after reloading fingerprint list; remove any servers that are no longer recognized.
...
svn:r1613
2004-04-13 20:06:08 +00:00
Nick Mathewson
baaf58fe1d
only consider uploading descriptors every 5 sec
...
svn:r1612
2004-04-13 19:53:25 +00:00
Nick Mathewson
867832cd07
or, not and
...
svn:r1610
2004-04-13 18:44:42 +00:00
Nick Mathewson
d19abb2402
Handle END_STREAM_REASON_{EXITPOLICY|RESOLVEFAILED}
...
svn:r1609
2004-04-13 17:49:41 +00:00
Nick Mathewson
11ca973d26
Mark service descriptors as dirty when we have lost an intro point
...
svn:r1608
2004-04-13 17:20:41 +00:00
Nick Mathewson
a2ece0fc08
Separate "start-establishing-introduction" from "upload descriptors"; only upload descriptors containing fully established intro points.
...
svn:r1607
2004-04-13 17:16:47 +00:00
Roger Dingledine
e0ce205a76
clean up circuit rebuilding some; fix some bugs we hadn't hit yet
...
svn:r1606
2004-04-13 05:20:52 +00:00
Nick Mathewson
c9b5ca39de
Handle the rendezvous-circ elements of retrying introductions.
...
svn:r1604
2004-04-13 03:19:58 +00:00
Nick Mathewson
a4d25bdbd9
<arma> you should make r and i and use r for r and i for i
...
svn:r1603
2004-04-13 02:36:37 +00:00
Nick Mathewson
e53ba59250
Handle introduce naks. Arma: Is this right?
...
svn:r1602
2004-04-13 02:31:52 +00:00
Nick Mathewson
8483bace65
Get the rest of intro-ack/nak handling in ... except for the tricky "pick a new intro and re-extend and re-try" part.
...
svn:r1601
2004-04-13 01:41:39 +00:00
Nick Mathewson
9cd163f6ff
Have find_intro_circuit return non-open circs
...
svn:r1600
2004-04-13 01:15:06 +00:00
Nick Mathewson
5af7e27c62
Re-number the new relay command so as to maintain backward compatibility. Doh!
...
svn:r1598
2004-04-13 00:38:16 +00:00
Nick Mathewson
a5bfe84509
ACK/NAK INTRODUCE1 requests. (We do no useful processing on them yet)
...
svn:r1597
2004-04-12 23:33:47 +00:00
Roger Dingledine
f4ff5a75c1
break circuit_build_needed_circs into its own func
...
svn:r1596
2004-04-12 22:47:12 +00:00
Roger Dingledine
c5052bec95
normal circs are 3 hops, but rend/intro circs are 4, because
...
the initiator doesn't get to choose the last hop
svn:r1595
2004-04-12 18:40:14 +00:00
Nick Mathewson
fc5a766298
Use service IDs in rendmid. (rendclient and common require no changes, it seems)
...
svn:r1594
2004-04-12 18:10:28 +00:00
Roger Dingledine
2321d21b3b
bump allowed rend desc skew from 60 mins to 90 mins
...
svn:r1593
2004-04-12 09:44:38 +00:00
Nick Mathewson
306adfc8bd
Fix two dumb leaks in crypto.c
...
svn:r1592
2004-04-12 05:27:38 +00:00
Nick Mathewson
1dbf61e7e6
Use service id instead of hex id in rendservice.c log messages. Rendcommon and rendclient will follow tomorrow.
...
svn:r1591
2004-04-12 05:12:50 +00:00
Nick Mathewson
c024745bd4
Cosmetic patch for arma's fix for The Bug: Don't set the state to
...
RESOLVEFAILED if the resolve didn't fail; set it to CONNECTING
instead.
svn:r1590
2004-04-11 17:07:45 +00:00
Roger Dingledine
d8c954e156
continue beating at pieces of The Bug
...
svn:r1588
2004-04-09 21:31:09 +00:00
Roger Dingledine
23c193c065
if dns resolve is valid, but our exit policy rejects it or
...
the connect attempt fails immediately, we were trying to
double-remove it from the dns pending list.
i think this might have been The Bug.
(thanks weasel!)
svn:r1587
2004-04-09 21:06:14 +00:00
Roger Dingledine
8f8d185f4b
give better instructions than just 'mail arma'
...
svn:r1586
2004-04-09 20:23:25 +00:00
Roger Dingledine
48e0228f1e
expire old CIRCUIT_PURPOSE_C_REND_READY circs too
...
svn:r1585
2004-04-09 20:08:13 +00:00
Nick Mathewson
4e1b65f53d
Dump introduction point status on kill -USR1
...
svn:r1584
2004-04-09 20:02:16 +00:00
Nick Mathewson
f9ade70cf9
Resolve init-services-in-do-hup issue
...
svn:r1583
2004-04-09 19:37:50 +00:00
Roger Dingledine
c80b42e17c
don't call rend_services_init right before we fetch the
...
dir, because we call it right after now.
svn:r1582
2004-04-09 19:34:55 +00:00
Roger Dingledine
c5bef32d95
call directory_has_arrived has arrived every time we get
...
a new directory, not just the first time
svn:r1581
2004-04-09 19:30:38 +00:00
Nick Mathewson
c256f2c3a1
Make comment more sensible. Still uncertain about when to call rend_services_init, though.
...
svn:r1580
2004-04-09 17:54:20 +00:00
Nick Mathewson
e6964ed7e6
set rend exit connection state _before_ calling rend_service_set_connection_addr_port and maybe eventually assert_connection_ok. This solves the other half of the bug weasel found.
...
svn:r1579
2004-04-09 17:51:57 +00:00
Nick Mathewson
facb5d4221
Reload rendezvous service keys on sighup; otherwise, we wind up with a
...
bunch of half-initialized services. This should solve half of
weasel's current bug. The crash is the other half.
(arma: should we also call rend_services_init on hup?)
svn:r1578
2004-04-09 17:48:09 +00:00
Peter Palfrader
a1a4c5be19
Update cvsignores
...
svn:r1577
2004-04-09 13:14:52 +00:00
Roger Dingledine
4011906b6b
get more serious about hunting The Bug
...
(it has been haunting us since the days of 0.0.2preX)
svn:r1576
2004-04-09 09:39:42 +00:00
Nick Mathewson
9b436c7f7a
remove a stray printf
...
svn:r1575
2004-04-08 20:59:48 +00:00
Nick Mathewson
aa7cfd93e5
Fix base32 implementation; make base32 implementation follow standard; add more tests for base32
...
svn:r1574
2004-04-08 20:56:33 +00:00
Nick Mathewson
d237692396
Fix unit tests (now that platform code works differently)
...
svn:r1573
2004-04-08 20:22:01 +00:00
Roger Dingledine
3b97a54226
when rend_cache_store warns, give more detail
...
svn:r1572
2004-04-08 20:13:28 +00:00
Nick Mathewson
aa2189b406
note which preexisting or connection we found.
...
svn:r1571
2004-04-08 19:49:55 +00:00
Roger Dingledine
eb9f5a561e
circuit-level sendmes weren't working, because the exit
...
thought it was an exit.
i overhauled the edge_type mechanism. hopefully this will help.
svn:r1570
2004-04-08 09:41:28 +00:00
Roger Dingledine
8e686d0c72
we added more AP conns, oops
...
svn:r1569
2004-04-08 07:25:54 +00:00
Roger Dingledine
4122e2de11
stop being so eager to have rend_cache_store reject the
...
service descriptor
svn:r1566
2004-04-08 05:08:27 +00:00
Nick Mathewson
bb46d782ab
Be endianly-correct for rendezvous functionality
...
svn:r1565
2004-04-08 04:47:39 +00:00
Roger Dingledine
15de201041
log which intro points we picked
...
svn:r1564
2004-04-08 04:36:13 +00:00
Nick Mathewson
2a01e3ad10
Launch intro services after launching connections; allow ORs to build circuits through as-yet-unconnectd ORs
...
svn:r1562
2004-04-08 03:53:39 +00:00
Roger Dingledine
299df7117c
don't try to circuit_log_path if you're at the exit edge of a circ
...
svn:r1561
2004-04-08 03:30:47 +00:00
Nick Mathewson
ede1d3e42d
Invert strcasecmp check for supports-rendezvous
...
svn:r1560
2004-04-08 03:21:15 +00:00
Roger Dingledine
3e7c8a40bc
bugfix: alice would crash if bob advertised 0 intro points
...
svn:r1559
2004-04-08 03:18:03 +00:00
Nick Mathewson
024c059fae
Force tor_malloc(0) to always be sane
...
svn:r1558
2004-04-08 03:05:08 +00:00
Nick Mathewson
40f7324eea
Allow service descriptors with no intro points
...
svn:r1557
2004-04-08 03:02:50 +00:00
Nick Mathewson
8351847afd
Nothing is good enough for you, is it?
...
svn:r1556
2004-04-08 02:50:34 +00:00
Nick Mathewson
14e31fbd71
Use CIRCUIT_IS_ORIGIN in favor of boolean circ->cpath
...
svn:r1555
2004-04-08 02:24:06 +00:00
Roger Dingledine
ad2192c90f
only call circuit_build_failed when we're circ's origin
...
svn:r1554
2004-04-08 02:22:26 +00:00
Roger Dingledine
36d7cc8529
make the max buf size 10 megabytes, not 1 megabyte
...
need to implement flexible buffer sizes soon
svn:r1553
2004-04-08 02:19:35 +00:00
Roger Dingledine
4d194ef13f
clean up rend_client_get_random_intro
...
svn:r1552
2004-04-08 02:11:49 +00:00
Nick Mathewson
46c82e7dbe
Set rend_query on exiting streams
...
svn:r1551
2004-04-08 02:10:43 +00:00
Roger Dingledine
584350feb8
don't log info when we asked for log warn
...
svn:r1548
2004-04-08 01:59:31 +00:00
Nick Mathewson
60772ec90c
Split out major functionality of circuit_get_best; rephrase a few booleans
...
svn:r1547
2004-04-08 01:55:21 +00:00
Nick Mathewson
eaf7c61ebc
Do not crash when no desc is found
...
svn:r1546
2004-04-08 01:54:02 +00:00
Roger Dingledine
9d38311ae3
allow for directories >8192 bytes
...
svn:r1545
2004-04-08 01:47:33 +00:00
Roger Dingledine
47488fa525
allow 90 minutes of clock skew, not 30
...
svn:r1544
2004-04-08 01:08:56 +00:00
Roger Dingledine
e32668ab13
clean up torrc.sample more
...
svn:r1543
2004-04-08 00:49:28 +00:00
Roger Dingledine
6cf584b765
clean up choose_good_exit_server()
...
svn:r1542
2004-04-07 23:31:29 +00:00
Roger Dingledine
63cde97253
don't try to build intro circs until you've fetched the directory
...
svn:r1541
2004-04-07 22:48:06 +00:00
Roger Dingledine
e79a578fec
if the rend desc cache entry was fetched more than 15 mins ago,
...
then try to fetch a new one. but if the new fetch fails, use the
old one.
svn:r1540
2004-04-07 22:41:00 +00:00
Nick Mathewson
09e66bbd14
Freeing the same variable twice in rapid succession can sometimes cause a double-free
...
svn:r1539
2004-04-07 22:25:37 +00:00
Nick Mathewson
6649645f09
Insert a *copy* of our routerinfo into the routerlist.
...
svn:r1538
2004-04-07 22:18:57 +00:00
Nick Mathewson
b1537e7943
Rebuild and re-upload service descriptors every 15 minutes
...
svn:r1537
2004-04-07 22:06:54 +00:00
Nick Mathewson
b07b2cef29
Remember when we received which service desc.
...
svn:r1536
2004-04-07 22:00:54 +00:00
Nick Mathewson
4d14b786da
Make sure we have our own keys before we initialize our routerlist
...
svn:r1535
2004-04-07 21:44:46 +00:00
Nick Mathewson
10b48fee28
Generating data does no good if you make no use of it
...
svn:r1534
2004-04-07 21:44:24 +00:00
Nick Mathewson
8169da5c30
Don't use Tor version 0.0.5 for intro/rendezvous points. (We don't need
...
to worry about 0.0.4 or earlier, because nobody is running them any more.)
svn:r1533
2004-04-07 21:36:03 +00:00
Roger Dingledine
93801ac40d
don't pick myself or my twins as hops when building circuits
...
svn:r1531
2004-04-07 21:12:54 +00:00
Nick Mathewson
2633d353d7
Carefully increment failure counts when appropriate
...
svn:r1530
2004-04-07 20:59:38 +00:00
Roger Dingledine
4df06ab5bb
let bob replenish his intro points and republish service desc
...
as necessary
svn:r1528
2004-04-07 20:47:50 +00:00
Roger Dingledine
505797e998
expire open-but-not-yet-acked circs if they're too old
...
svn:r1526
2004-04-07 20:38:23 +00:00
Roger Dingledine
650d483bea
convince ourselves that circuit_failed doesn't have to be any smarter
...
svn:r1525
2004-04-07 20:23:59 +00:00
Nick Mathewson
789df20e7d
There is no need to cast void* to other pointer types.
...
svn:r1524
2004-04-07 20:11:28 +00:00
Nick Mathewson
dfb009febb
Repair whitespace in windows orconfig.h
...
svn:r1523
2004-04-07 20:01:51 +00:00
Nick Mathewson
3d60cd1d61
Delete trailing whitespace and expand tabs; remove unused aes decrypt code
...
svn:r1522
2004-04-07 19:57:40 +00:00
Nick Mathewson
75c19716a8
Put ourself in router list; act accordingly.
...
svn:r1521
2004-04-07 19:46:27 +00:00
Roger Dingledine
4a9587a486
we were uploading our server descriptor to each the dirservers
...
when we boot, and then also on the first iteration of the main loop
svn:r1520
2004-04-07 19:30:22 +00:00
Roger Dingledine
3c683a9e7c
let alice reuse recent rendjoin circs
...
svn:r1519
2004-04-07 19:22:55 +00:00
Roger Dingledine
1f0769c470
mark a rend circ dirty when you attach to it
...
svn:r1518
2004-04-07 19:14:45 +00:00
Roger Dingledine
cf67520e95
when counting how many being-built circs will handle a stream,
...
don't count ones that are too old
svn:r1517
2004-04-07 19:14:33 +00:00
Roger Dingledine
90caa94662
routerinfo->addr is host order
...
svn:r1515
2004-04-07 06:17:27 +00:00
Nick Mathewson
fdb58e8ea3
Set routerinfo->addr properly for own routerinfo; do casei routerinfo compare
...
svn:r1514
2004-04-06 22:23:12 +00:00
Nick Mathewson
f24519e4b9
Set correct address and port mappings on outgoing rendezvous connections
...
svn:r1513
2004-04-06 22:05:49 +00:00
Roger Dingledine
95f0e36f08
alice just fetched bob's hidden webpage.
...
yay.
svn:r1512
2004-04-06 21:52:01 +00:00
Roger Dingledine
d473cf7ee9
set the circ windows on the middle hop of the rend circs
...
svn:r1511
2004-04-06 21:25:11 +00:00
Nick Mathewson
8b371c2aa5
router_choose_random_node wants a smartlist of routers, not of nicknames.
...
svn:r1510
2004-04-06 21:19:59 +00:00
Nick Mathewson
2fc106d210
Force hybrid encryption on for key negotiation
...
svn:r1509
2004-04-06 20:55:46 +00:00
Nick Mathewson
40a5d6055e
Stupid sizeof operator!
...
svn:r1508
2004-04-06 20:45:44 +00:00
Nick Mathewson
2446996f97
Remove vestigial variable
...
svn:r1507
2004-04-06 20:42:25 +00:00
Roger Dingledine
5eca39cdb4
checkpoint commit: rend closer to working, still not there yet
...
svn:r1506
2004-04-06 20:25:18 +00:00
Nick Mathewson
ef438b894c
Set handshake_state to NULL before appending cpath hops
...
svn:r1505
2004-04-06 20:23:58 +00:00
Nick Mathewson
6290d027c9
Continue attack on magic numbers; use new crypto wrappers where possible
...
svn:r1504
2004-04-06 20:16:12 +00:00
Nick Mathewson
ce51a30adc
Remove the last tab in non-contributed code
...
svn:r1503
2004-04-06 03:46:37 +00:00
Nick Mathewson
257d509b91
Document stuff, reduce magic numbers, add emacs magic
...
svn:r1502
2004-04-06 03:44:36 +00:00
Roger Dingledine
6e6cbaad95
fix the bob-can't-decode-relays bug
...
now alice can send the begin and bob can receive it.
svn:r1499
2004-04-05 23:40:59 +00:00
Roger Dingledine
077f133257
don't detach-and-retry rendezvous streams
...
svn:r1498
2004-04-05 22:43:01 +00:00
Nick Mathewson
0f74b68edd
make router_get_by_nickname consider this router.
...
svn:r1497
2004-04-05 22:22:42 +00:00
Roger Dingledine
2bb18e62cb
make rend apconn send to the right cpath layer
...
and fix circuit_log_path to know about rend circs
svn:r1496
2004-04-05 22:01:35 +00:00
Nick Mathewson
62b7ae6c9d
More symbolic constants for checking rendezvous1 cell lengths
...
svn:r1495
2004-04-05 21:40:22 +00:00
Nick Mathewson
283593ca1b
Use correct payload lengths when sending RENDEZVOUS1 cells
...
svn:r1494
2004-04-05 21:39:47 +00:00
Nick Mathewson
d371dda8f9
Spec conformance: KH|"INTRODUCE" is only for establishing intro pt
...
svn:r1493
2004-04-05 21:39:18 +00:00
Nick Mathewson
536a9b6c28
Add a missing offset
...
svn:r1492
2004-04-05 21:31:53 +00:00
Nick Mathewson
5033c366e1
Use symbolic constants; make padding types match.
...
svn:r1491
2004-04-05 21:15:14 +00:00
Nick Mathewson
04e8dc9026
Implement response to RENDEZVOUS2 cell.
...
svn:r1490
2004-04-05 20:53:50 +00:00
Nick Mathewson
b1a8b208ca
Make init_cpath_crypto able to handle both sides of handshake, by adding a "reverse" flag
...
svn:r1489
2004-04-05 20:53:04 +00:00
Nick Mathewson
34633c1122
add more constants
...
svn:r1488
2004-04-05 20:52:16 +00:00
Nick Mathewson
2d3aea40a4
It's amazing how wrong things look when you invert the booleans on your
...
sanity checks.
svn:r1487
2004-04-05 20:34:58 +00:00
Nick Mathewson
7b1939db2d
Slightly more helpful msg on mismatched service pk digest in INTRODUCE2 cell
...
svn:r1486
2004-04-05 20:33:29 +00:00
Nick Mathewson
eafb8186e5
Do first half of Alice-side of DH handshake.
...
svn:r1485
2004-04-05 20:30:53 +00:00
Roger Dingledine
27126e5007
oaep uses 42 more bytes -- stop clobbering buffers
...
also maybe fix some constants here and there -- nick?
svn:r1484
2004-04-05 18:22:00 +00:00
Roger Dingledine
92bb5b2860
strdup the intro point when you pick it, so you
...
don't free it and then return it
svn:r1483
2004-04-05 17:56:34 +00:00
Roger Dingledine
ac84512489
complain early if we get an unrecognized nickname from
...
bob's rend service descriptor
svn:r1482
2004-04-05 17:51:00 +00:00
Nick Mathewson
12ede0a2c4
use the right variable when comparing hashes; maybe fix "Hash of session" bug
...
svn:r1481
2004-04-05 17:36:30 +00:00
Nick Mathewson
41387bea08
Expect a 20-byte nul-padded-and-terminated nickname
...
svn:r1480
2004-04-05 17:28:48 +00:00
Nick Mathewson
1e2b008700
Add some temporary log calls to try to debug the "Hash of session info was not as expected" problem
...
svn:r1479
2004-04-05 17:20:57 +00:00
Nick Mathewson
84b9e90d5f
i2d_RSAPublicKey advances the pointer it receives past the ASN1-encoded string.
...
svn:r1478
2004-04-05 17:10:48 +00:00
Roger Dingledine
cebf16eaf0
if a rend stream has already been attached to a rend circ,
...
then don't attach it again (and again, and again, and...)
svn:r1477
2004-04-05 15:24:03 +00:00
Roger Dingledine
8a209bc4d3
send a destroy after we send an introduce
...
svn:r1476
2004-04-05 15:17:34 +00:00
Roger Dingledine
5b6099e8a2
more alice-side infrastructure
...
handle rendezvous acks,
do rend begin cells right,
send an introduction cell (sort of)
receive a rendezvous2 cell (sort of)
svn:r1475
2004-04-05 07:41:31 +00:00
Roger Dingledine
7793078dff
alice can now look up bob's service descriptor,
...
choose an intro point, connect to it,
choose a rend point, connect to it and establish a cookie,
get an ack from the rendezvous point,
and know when both circs are ready for her.
APConns don't use conn->purpose anymore
don't initiate a renddesc lookup if one is already in progress
also fix a buffer overflow in nickname parsing (only exploitable
by the operator though)
svn:r1471
2004-04-05 00:47:48 +00:00
Nick Mathewson
a9813f0210
Implement acks
...
svn:r1470
2004-04-03 04:55:22 +00:00
Nick Mathewson
3af1191023
Add func to generate,set,and send rend cookie
...
svn:r1469
2004-04-03 04:22:22 +00:00
Nick Mathewson
82cde03ddc
Make it build on linux
...
svn:r1468
2004-04-03 04:08:54 +00:00
Roger Dingledine
86f2ddc88d
nick, can you make and send the rendezvous cookie?
...
svn:r1467
2004-04-03 04:05:30 +00:00
Nick Mathewson
b3c2b62a14
Make "common" no longer depend on or.h
...
svn:r1466
2004-04-03 04:05:12 +00:00
Nick Mathewson
cb07e2ad27
Strdup hates finding 0 bytes.
...
svn:r1465
2004-04-03 03:39:31 +00:00
Nick Mathewson
d93ff0b82f
Handle rendezvous relay cells
...
svn:r1464
2004-04-03 03:37:11 +00:00