Roger Dingledine
394554cfbf
Clean up copyrights.
...
Break connection_consider_empty_buckets() out of
connection_read_bucket_decrement().
svn:r2698
2004-11-07 01:33:06 +00:00
Roger Dingledine
efad93feb4
tor --list-fingerprint as a client shouldn't try to print null
...
svn:r2697
2004-11-06 09:22:08 +00:00
Roger Dingledine
53a2b22742
fix the next subtle memory-crunching bug
...
now hup works
svn:r2696
2004-11-06 08:55:22 +00:00
Roger Dingledine
e2e6d19e76
fix subtle bug that was causing logs to not show anything
...
svn:r2695
2004-11-06 07:40:20 +00:00
Roger Dingledine
28a297ebe7
only play the accounting game if it's possible you'll choose to hibernate
...
svn:r2694
2004-11-06 06:56:28 +00:00
Roger Dingledine
865f341708
parse_line_from_file is obsolete.
...
svn:r2693
2004-11-06 05:18:29 +00:00
Roger Dingledine
6c61ed4fb5
Make options no longer a global variable.
...
Now we can try setting an option but back out if it fails to parse, or
if it's disallowed (e.g. changing RunAsDaemon from 1 to 0).
Use parse_line_from_str rather than parse_line_from_file.
svn:r2692
2004-11-06 05:18:11 +00:00
Nick Mathewson
f490e5cdb6
Update log documentation
...
svn:r2691
2004-11-05 21:22:38 +00:00
Nick Mathewson
7c0792d89a
Write hibernation code. Needs docs and tests.
...
svn:r2689
2004-11-05 17:55:34 +00:00
Nick Mathewson
38ed0ce5e6
Unify tor_parse_(numeric); make sure MAX_UINT32 and MAX_UINT64 are defined
...
svn:r2688
2004-11-05 17:54:50 +00:00
Roger Dingledine
0c583a6cf2
clarify it even better
...
svn:r2687
2004-11-05 11:58:34 +00:00
Roger Dingledine
0ab8b8a4e4
resolve misleading torrc comments
...
svn:r2686
2004-11-05 11:55:35 +00:00
Nick Mathewson
2e8353e2f4
Use new log format; convert old format to new format.
...
svn:r2684
2004-11-05 05:50:35 +00:00
Roger Dingledine
2ba3a9de16
make the default default options.FirewallPorts be the default
...
svn:r2683
2004-11-04 23:39:57 +00:00
Nick Mathewson
b56ef496d9
Twiddle header order to compile on OS X again
...
svn:r2681
2004-11-04 22:33:20 +00:00
Nick Mathewson
19868fe968
Move accounting code into hibernate; start adding logic to track bandwidth-per-seconds-active
...
svn:r2680
2004-11-04 22:33:06 +00:00
Nick Mathewson
1b49198081
Support code for resettable options, and option sets. Still needs validate-and-then-replace logic
...
svn:r2679
2004-11-04 22:31:50 +00:00
Nick Mathewson
d9e0f3f9bc
Make sure control command bodies are always followed by a NUL
...
svn:r2678
2004-11-04 22:30:49 +00:00
Nick Mathewson
9d604ec615
Add code to read configuration lines from a string as well as a file
...
svn:r2676
2004-11-04 22:29:45 +00:00
Nick Mathewson
831c988ea1
fix problems introduced by rpm spec patch.
...
svn:r2675
2004-11-04 15:34:04 +00:00
Nick Mathewson
69e5e8d0ad
Merge RPM spec patch from jbash
...
svn:r2674
2004-11-04 15:17:22 +00:00
Roger Dingledine
f7a30fa73e
break out validate_options
...
leave options.FirewallPorts NULL if it's NULL
svn:r2673
2004-11-04 10:23:30 +00:00
Roger Dingledine
cadbae6aa5
make free_options() and init_options() use the big array.
...
also remove obsolete config_assign_defaults().
svn:r2672
2004-11-04 08:26:34 +00:00
Roger Dingledine
59453ac6ef
add a ControlPort and control listener conn.
...
note that print_usage is obsolete.
svn:r2671
2004-11-04 06:41:49 +00:00
Nick Mathewson
b74b72a5ce
Fix windows build
...
svn:r2670
2004-11-04 04:01:19 +00:00
Roger Dingledine
d0c158c8d6
clarify the bandwidthburst and bandwidthrate are in bytes
...
(niels had thought they were in bits, or kb, or something)
svn:r2669
2004-11-04 03:25:43 +00:00
Roger Dingledine
a4753283dd
better interface for connection_ap_handshake_socks_reply()
...
make --list-fingerprint print the fingerprint again
svn:r2668
2004-11-03 23:13:28 +00:00
Nick Mathewson
5b312541d7
fix windows warnings
...
svn:r2667
2004-11-03 21:53:54 +00:00
Nick Mathewson
70f7e32ec6
fix typos
...
svn:r2666
2004-11-03 21:53:12 +00:00
Nick Mathewson
cea9125d71
Implement two flavors of authentication for control connections: one for trusted FS, one for untrusted FS.
...
svn:r2664
2004-11-03 19:49:03 +00:00
Nick Mathewson
871bf904ae
Remove extraneous local
...
svn:r2663
2004-11-03 19:15:38 +00:00
Nick Mathewson
d5244e3872
Add a write_bytes_to_file so we can have files with NULs in them.
...
svn:r2662
2004-11-03 19:02:48 +00:00
Nick Mathewson
451f8b5045
- Implement all of control interface except authentication, setconfig,
...
and actually making the sockets.
- Make sure that identity-based nicknames start with $.
- Use new string_join interface.
svn:r2661
2004-11-03 18:33:07 +00:00
Nick Mathewson
86ba00290b
Add function to generate/copy the config_lines, given the name of an option
...
svn:r2660
2004-11-03 18:29:29 +00:00
Nick Mathewson
11de62aa60
Add a slightly trickier string-join interface for making NUL-terminated string messages
...
svn:r2659
2004-11-03 18:28:00 +00:00
Nick Mathewson
11979dc1f5
Add a callback log handler type
...
svn:r2658
2004-11-03 18:27:19 +00:00
Nick Mathewson
4fdaa5de51
Streamline the two redundant "Has the second rolled over?" checks in prepare_for_poll and connection_bucket_refill; also, generate BANDWIDTH control events
...
svn:r2657
2004-11-03 16:38:04 +00:00
Roger Dingledine
12e92eb82f
connection_read_bucket_decrement() has a side-effect that
...
we need to get even if we just read 0 bytes
svn:r2656
2004-11-03 10:18:31 +00:00
Roger Dingledine
e541319dcb
lay the groundwork for a default value for each config option.
...
tolerate null exitnodes, entrynodes, etc config options.
svn:r2655
2004-11-03 10:08:44 +00:00
Roger Dingledine
e761cc9750
my assert.h takes extra pains to be certain to _re-include_
...
itself if you include it twice. this is dumb, but hey.
svn:r2653
2004-11-03 07:29:03 +00:00
Nick Mathewson
347d3f9d62
Start implementing control interface.
...
svn:r2652
2004-11-03 01:32:26 +00:00
Nick Mathewson
d63d420930
Fix another typo
...
svn:r2651
2004-11-03 01:31:42 +00:00
Nick Mathewson
3e16515343
The spelling is "d-e-f-i-n-e".
...
svn:r2650
2004-11-03 00:02:17 +00:00
Nick Mathewson
8db0abb687
First attempt at hibernation code. It needs more work around the XXXXs, but first I want arma to review the basic approach while I meditate on how to fix them.
...
svn:r2649
2004-11-02 23:47:32 +00:00
Nick Mathewson
a2f6210b3e
Add compatibility macros for printf and scanf-ing 64-bit unsigned ints
...
svn:r2648
2004-11-02 22:14:34 +00:00
Nick Mathewson
67f14032b1
Handle strlcat/strlcpy correctly on platforms that have them.
...
svn:r2647
2004-11-02 19:25:52 +00:00
Nick Mathewson
509c0bdc22
untabify. This should hold it.
...
svn:r2646
2004-11-02 03:11:01 +00:00
Nick Mathewson
ad4dc74482
Use a stricter set of warnings; make them all pass.
...
svn:r2645
2004-11-02 03:02:17 +00:00
Roger Dingledine
85c79ffbc7
canonicalize "src" and "dest" arg order in crypto.c (and others)
...
svn:r2644
2004-11-02 02:28:51 +00:00
Nick Mathewson
1433a0b26f
Fix signed/unsigned comparison warning
...
svn:r2643
2004-11-01 22:41:32 +00:00
Roger Dingledine
037fba7595
util.c needs ctype.h for tolower and isspace
...
svn:r2642
2004-11-01 21:54:12 +00:00
Roger Dingledine
b390786582
Hidden service operators had a bug in version 1 style INTRODUCE cells
...
that made them fail. Fix the bug, and revert clients to use version 0
until 0.0.9pre4 is obsolete.
svn:r2641
2004-11-01 21:46:27 +00:00
Nick Mathewson
ce79bab7f1
Split util into util (general utilities), container (smartlist and strmap), and compat (cross-platform compatability).
...
svn:r2640
2004-11-01 20:41:47 +00:00
Roger Dingledine
4689243242
make sure options.MaxConn can be reached
...
svn:r2638
2004-11-01 08:24:34 +00:00
Roger Dingledine
282816b498
change min required number of fd's to 1024
...
svn:r2636
2004-11-01 08:09:59 +00:00
Roger Dingledine
790349c645
oh, and add the actual file too
...
svn:r2631
2004-10-31 20:29:25 +00:00
Roger Dingledine
984ffec105
implement first piece of hibernation
...
still need to track bandwidth, and make decisions based on bandwidth
svn:r2630
2004-10-31 20:28:41 +00:00
Nick Mathewson
ae7495dd55
Only tor and test binaries need to link against openssl and zlib; tor-resolve can be smaller.
...
svn:r2629
2004-10-30 19:27:06 +00:00
Nick Mathewson
5bc0dba933
Move all util functions that need openssl into crypto.c; make non-openssl functions that util needs into util. Now openssl can be separated.
...
svn:r2628
2004-10-30 19:26:31 +00:00
Nick Mathewson
9510d9a792
tor --list-fingerprint to print fingerprint and exit
...
svn:r2627
2004-10-30 19:18:37 +00:00
Roger Dingledine
51e16233cb
Fix paul gardner's assert bug. Turns out when circuit_launch_by_nickname()
...
failed at the first hop, it would try to relaunch another circ right
then, even though the first circuit hadn't been populated yet with its
pending_final_cpath.
svn:r2624
2004-10-30 05:04:52 +00:00
Nick Mathewson
5c68db8b3d
Link tools directory into rest of build system
...
svn:r2623
2004-10-28 20:31:15 +00:00
Nick Mathewson
54b8f7e503
Add a pure-C tor-resolve implementation
...
svn:r2620
2004-10-28 20:28:13 +00:00
Nick Mathewson
11d330be5e
Tweaks to prevent obsolete restarting tors from hammering the dirservers. (1) Cache a received directory as soon as the signature checks out. (2) Treat a cached directory as "recent" based on its mtime. (3) If we have a recent directory, we dont need to fetch a newer one for DirFetchPostPeriod. This needs review!
...
svn:r2618
2004-10-28 18:37:52 +00:00
Nick Mathewson
36bbab2f2b
Fix in warning fix
...
svn:r2617
2004-10-27 21:54:44 +00:00
Nick Mathewson
f8771625c6
Check return of tor_snprintf
...
svn:r2616
2004-10-27 21:30:47 +00:00
Nick Mathewson
2fbf31533b
Tricksy compiler warnings! We hates them, hates them forever, my precious!
...
svn:r2615
2004-10-27 21:14:11 +00:00
Nick Mathewson
ce5709184b
Pass with -Wstrict-prototypes
...
svn:r2614
2004-10-27 18:16:37 +00:00
Nick Mathewson
6874c39904
Fix windows build
...
svn:r2613
2004-10-27 18:14:38 +00:00
Nick Mathewson
c5eb95b644
Add ability for some-but-not-all abbrevs to work in config file. Add a bunch of singular/plural abbrevs suggested by arma
...
svn:r2612
2004-10-27 17:37:01 +00:00
Roger Dingledine
75ad4615d1
stop freeing arbitrary memory
...
fix a couple of memory leaks
svn:r2611
2004-10-27 12:34:02 +00:00
Nick Mathewson
6980929e64
Use strlcpy, not strcpy.
...
svn:r2610
2004-10-27 06:48:16 +00:00
Nick Mathewson
44d4516155
Use tor_snprintf, not snprintf
...
svn:r2609
2004-10-27 06:37:34 +00:00
Nick Mathewson
22dc19b590
snprintf wrapper with consistant (though not C99) overflow behavior
...
svn:r2606
2004-10-27 06:26:23 +00:00
Nick Mathewson
06fa8fc05f
Avoid strcat; use snprintf or strlcat instead
...
svn:r2605
2004-10-27 06:25:29 +00:00
Nick Mathewson
f67f83b1fa
Use strlcpy, not strncpy
...
svn:r2603
2004-10-27 06:03:28 +00:00
Nick Mathewson
bc62f8e983
Replace sprintf with snprintf
...
svn:r2602
2004-10-27 05:53:07 +00:00
Nick Mathewson
5369ee921e
Make it compile on Linux
...
svn:r2600
2004-10-27 03:42:09 +00:00
Nick Mathewson
8cefc861d6
Add cvsignore in win32 directory
...
svn:r2599
2004-10-27 03:38:42 +00:00
Nick Mathewson
482c309db9
Document new config code
...
svn:r2596
2004-10-27 03:08:04 +00:00
Nick Mathewson
a24eb4db91
Re-write configuration option lookup code: use a table, not a big if( || || || ||). Deprecate unoffical abbrevs and abbrevs not on the command line.
...
svn:r2594
2004-10-27 02:30:28 +00:00
Nick Mathewson
b90b2bb848
Add and document router-status line using new unified liveness/verifiedness format; continue to generate running-routers; continue to parse running-routers when no router-status line is found
...
svn:r2592
2004-10-27 00:48:51 +00:00
Nick Mathewson
26f3cb8652
Add SysLog option to direct log messages to the system log instead of a FILE*.
...
svn:r2591
2004-10-26 21:48:41 +00:00
Roger Dingledine
0113a643a2
quick-and-dirty dir policy since the dirservers are getting hammered
...
nick, could you abstract this sometime so we don't repeat the
sockspolicy code twice?
svn:r2589
2004-10-25 06:16:26 +00:00
Roger Dingledine
20cdc0a517
fix a memory leak
...
svn:r2587
2004-10-24 23:09:48 +00:00
Roger Dingledine
defe1e5f3c
start generating new version of introduce1 cells
...
svn:r2586
2004-10-24 19:08:07 +00:00
Roger Dingledine
0b36c29c4d
fix wrong comment
...
svn:r2585
2004-10-24 17:11:44 +00:00
Nick Mathewson
ef4ac65f5e
Document the swiss-army-knife that retry_listeners has become
...
svn:r2584
2004-10-24 01:50:33 +00:00
Nick Mathewson
0df2d383d1
Many non-native speakers use Tor. It is our duty to ensure that our log messages set an example of good English spelling.
...
svn:r2583
2004-10-24 01:29:01 +00:00
Nick Mathewson
57f09573f5
Every 60 seconds, check whether the listeners are still alive, and relaunch the dead ones.
...
svn:r2581
2004-10-24 01:22:40 +00:00
Nick Mathewson
04ca660b2a
Fix typo in last windows patch
...
svn:r2580
2004-10-24 00:58:29 +00:00
Nick Mathewson
5d53828c57
Handle more errnos from accept() without closing the connection. This may fix a bug that could close OR listeners when (a) TCP connections were hung up before accept() could be called, or (b) during FD exhaustion.
...
svn:r2579
2004-10-24 00:55:18 +00:00
Nick Mathewson
78a2c3aa39
Make windows fall back to CWD if SHGetSpecialFolderLocation is borked
...
svn:r2578
2004-10-24 00:52:10 +00:00
Roger Dingledine
54c432bd93
pay attention to the return value of do_hup, and exit
...
when it fails
svn:r2577
2004-10-23 17:06:25 +00:00
Roger Dingledine
9cc0c3620f
ship src/win32/ in the tarball
...
svn:r2576
2004-10-21 00:49:17 +00:00
Nick Mathewson
6899b8001a
Check for low _MSC_VER, not high. On windows, always use winsock.
...
svn:r2575
2004-10-20 23:30:38 +00:00
Roger Dingledine
c4c6ee7d61
add winsock if you've got it, regardless of whether you're msv
...
svn:r2573
2004-10-20 23:23:53 +00:00
Nick Mathewson
88cffc3c5f
Use bitwise masking to turn off bits, not compare-and-subtract
...
svn:r2572
2004-10-20 23:15:49 +00:00
Roger Dingledine
c3a15d1c74
bcc win32 compiler has no timeval tv_sec
...
svn:r2571
2004-10-20 23:12:37 +00:00
Nick Mathewson
e5049d5aa3
Remove routerinfo_t->is_trusted_dir, and all the twisted machinery used to
...
maintain it.
Have clients default to the nickname "client" in their certificates.
Give a less frightening warning on obsolete (pre-0.0.8) routerinfo_t's.
svn:r2568
2004-10-19 18:19:59 +00:00
Nick Mathewson
62094ebd32
Tolerate NULL nicknames better
...
svn:r2567
2004-10-19 18:17:12 +00:00
Nick Mathewson
c7151d8bed
Add "pass" target for RedirectExit, to make it easier to break out of a sequence of rules
...
svn:r2566
2004-10-19 17:46:06 +00:00
Roger Dingledine
97a0a43511
start the process of making 0.0.7* obsolete
...
svn:r2565
2004-10-17 21:51:20 +00:00
Roger Dingledine
640544ae3e
use connection_edge_is_rendezvous_stream() more
...
svn:r2564
2004-10-17 21:10:41 +00:00
Roger Dingledine
695cdb10fe
whoops, resolve cells were probably broken
...
svn:r2562
2004-10-17 20:31:19 +00:00
Nick Mathewson
b130aa3c8f
Fix segfault in unit tests. (Main program is unaffected)
...
svn:r2559
2004-10-17 15:45:54 +00:00
Roger Dingledine
e66d5f897a
fix a seg fault with exitredirect
...
svn:r2555
2004-10-17 04:44:02 +00:00
Roger Dingledine
560a4a1407
switch conn->addr and conn->dir_port to reflect the final destination,
...
not the http proxy
svn:r2553
2004-10-17 04:06:48 +00:00
Nick Mathewson
6d1e1b7f46
Unify windows special-dir handling
...
svn:r2552
2004-10-17 03:38:02 +00:00
Nick Mathewson
8d27385c23
Implement RedirectExit.
...
svn:r2550
2004-10-17 01:57:34 +00:00
Roger Dingledine
5efc49600a
fix comment that makes no sense
...
svn:r2549
2004-10-16 23:18:58 +00:00
Roger Dingledine
7c3ab346f6
various tweaks and fixes
...
svn:r2548
2004-10-16 22:56:46 +00:00
Roger Dingledine
e9e9a25881
i take back everything i've said about unit tests
...
svn:r2547
2004-10-16 22:56:03 +00:00
Nick Mathewson
a1bf39f698
Code to parse (but not yet actually use) RedirectExit lines
...
svn:r2546
2004-10-16 22:37:08 +00:00
Roger Dingledine
6d873e5743
don't assert multiple things in the same tor_assert()
...
svn:r2545
2004-10-16 22:28:11 +00:00
Roger Dingledine
de65052312
don't assert multiple things in the same tor_assert()
...
svn:r2544
2004-10-16 22:14:52 +00:00
Nick Mathewson
25a046df74
Fix unit tests, make it compile
...
svn:r2543
2004-10-16 21:57:24 +00:00
Nick Mathewson
47dc024f7e
Change interface of parse_addr_port() to return address in host order, since most users seem to want that.
...
svn:r2542
2004-10-16 21:53:30 +00:00
Nick Mathewson
8300c4ae6a
Make unit tests pass; refactor most of exit policy parfsing out into new function
...
svn:r2541
2004-10-16 21:42:09 +00:00
Nick Mathewson
69d7b468b4
Refactor parse-addr-mask-and-port-range into a separate function
...
svn:r2540
2004-10-16 21:41:12 +00:00
Nick Mathewson
a42adce362
fix memory leak in router.c; start relying on NULL==(zero bytes)
...
svn:r2538
2004-10-16 20:38:57 +00:00
Nick Mathewson
f619c4603e
Add an autoconf test to make sure that memset(&ptr, 0, sizeof(ptr)) and ptr=NULL are equivalent
...
svn:r2536
2004-10-16 20:26:12 +00:00
Nick Mathewson
56a592dbe3
Fix memory leak
...
svn:r2535
2004-10-16 08:39:56 +00:00
Nick Mathewson
9d5831341e
Implement user-declared node families.
...
svn:r2534
2004-10-15 20:52:09 +00:00
Nick Mathewson
f882bd92ed
Remove unused locals
...
svn:r2533
2004-10-15 20:50:43 +00:00
Nick Mathewson
f359389866
Oops; make sure that break; and continue; work within SMARTLIST_FOREACH
...
svn:r2532
2004-10-15 20:49:31 +00:00
Nick Mathewson
99f7955372
Use the real default exit policy, not reject *:*
...
svn:r2531
2004-10-15 19:18:08 +00:00
Nick Mathewson
fa9c121343
Add a comment
...
svn:r2530
2004-10-15 19:17:36 +00:00
Nick Mathewson
28dd458eaf
Upload to trusted dir servers based on DirServer config options, not on routerinfos.
...
svn:r2529
2004-10-15 19:04:38 +00:00
Nick Mathewson
01eacbca9e
Make RecommendedVersions a CONFIG_TYPE_LINELIST option, and have it tolerate whitespace a little better.
...
svn:r2528
2004-10-15 05:09:48 +00:00
Nick Mathewson
88e0c080cf
Ignore fascistfirewall when dealing with service descriptors; obey fascistfirewall when posting server descriptors; ignore fascistfirewall on directory connections when httpproxy is set.
...
svn:r2527
2004-10-15 04:57:36 +00:00
Nick Mathewson
5e80944c52
Use token-pasting magic to make nested SMARTLIST_FOREACH work.
...
svn:r2526
2004-10-15 04:45:47 +00:00
Nick Mathewson
ff38cc06e1
Fix search-and-replace in comments: Friends->family does not imply friendship->familyhip.
...
svn:r2525
2004-10-15 03:55:53 +00:00
Nick Mathewson
2fb08fe46c
add documentation for smartlist_join_strings
...
svn:r2524
2004-10-15 03:55:02 +00:00
Nick Mathewson
7fa5d224d4
Implement "families" of coadministered nodes; prevent them all from appearing on the same circuit.
...
svn:r2523
2004-10-15 01:58:11 +00:00
Nick Mathewson
c5964d6738
Basic string-join functionality
...
svn:r2521
2004-10-14 19:51:47 +00:00
Nick Mathewson
9e8e006c1e
Update windows ver to 009pre3
...
svn:r2519
2004-10-14 15:42:13 +00:00
Nick Mathewson
0f144d6a04
fix warning on win32
...
svn:r2518
2004-10-14 15:41:41 +00:00
Roger Dingledine
56e151eb41
advertise moria2's dirport as 18.244.0.114:80
...
svn:r2511
2004-10-14 10:05:22 +00:00
Roger Dingledine
cf9664151d
bugfix on a really old bug:
...
if read() fails on a stream, send back an end cell before you
close it down.
svn:r2509
2004-10-14 09:28:31 +00:00
Roger Dingledine
572714a458
bugfix: parse_addr_port() bites us again -- it returns addr in network order.
...
svn:r2508
2004-10-14 08:45:07 +00:00
Roger Dingledine
95644480c5
better warn message for the Content-Length attack
...
svn:r2495
2004-10-14 04:50:33 +00:00
Nick Mathewson
55b811a259
Improve warnings for old-style directories.
...
svn:r2494
2004-10-14 04:31:40 +00:00
Nick Mathewson
100b10473a
fix tab/space in torgzip.h
...
svn:r2493
2004-10-14 04:31:16 +00:00
Nick Mathewson
a4ef916b8e
fix tab/space in torgzip.c
...
svn:r2492
2004-10-14 04:24:42 +00:00
Nick Mathewson
08c33f0b46
Compile without warnings on windows
...
svn:r2491
2004-10-14 04:06:24 +00:00
Nick Mathewson
bd10bf4b5b
Try to always dtrt if routerlist==NULL
...
svn:r2489
2004-10-14 03:44:45 +00:00
Roger Dingledine
89280e6c20
rename addr to address to we avoid this bug later
...
svn:r2488
2004-10-14 03:31:40 +00:00
Nick Mathewson
1c9426d6e0
Build without warnings on mac gcc 3.3
...
svn:r2487
2004-10-14 03:18:14 +00:00
Roger Dingledine
3737566465
make it build on amd64
...
svn:r2486
2004-10-14 03:13:08 +00:00
Roger Dingledine
892269bca3
reformat comment and fix typo
...
svn:r2485
2004-10-14 03:01:43 +00:00
Roger Dingledine
69830afc16
and another one
...
svn:r2484
2004-10-14 02:49:48 +00:00
Roger Dingledine
5f4a390b33
oh, and some more in common/
...
svn:r2483
2004-10-14 02:48:57 +00:00
Roger Dingledine
aebc3a03ba
more int to size_t conversions, fixing one or more amd64 bugs
...
plus a whitespace patch on config.c from vicman
svn:r2482
2004-10-14 02:47:09 +00:00
Nick Mathewson
92bb360ad7
Add missing line; add similar check
...
svn:r2481
2004-10-14 02:29:03 +00:00
Nick Mathewson
8b325c142e
Patch from "J Doe": Use SHGetSpecialFolderLocation instead of
...
SHGetSpecialFolderPath in order to find application data folder.
Apparently, until IE 4 (!?) came out, nobody realized that programmers
might like to get paths as strings. Clearly, a fancy pseudo-OO list
of "identifiers" is a far more convenient way to deal with these
things. And while we're being OO, why return object that you can free
with free()? Instead, let's make the user get a handle to an abstract
allocation object, and ask it to free the fancy list, and then ask it
to release itself. Won't that be fun and convenient?
Navigating ancient Win32 APIs is like bikini-waxing creatures from HP
Lovecraft: to do a good job you must understand what's going on... but
the understanding itself can blast your sanity.
svn:r2480
2004-10-14 02:04:43 +00:00
Nick Mathewson
0d5a847f12
Remove need for dirservers file: now, we note trusted dirservers in configuration options, and only need to remember addr:port and key digest for each one.
...
svn:r2479
2004-10-14 01:44:32 +00:00
Nick Mathewson
55634e4eec
Fix comment in dirserv.c
...
svn:r2470
2004-10-13 20:28:46 +00:00
Roger Dingledine
2b7b86f5e6
stop trying to print a NULL
...
plus make router_nickname_is_approved() more obviously unused
svn:r2469
2004-10-13 20:17:45 +00:00
Nick Mathewson
e0cce8fba8
Unify tests for "did I originate this nonopen OR connection?"
...
svn:r2468
2004-10-13 20:05:57 +00:00
Nick Mathewson
30dd1c87a5
Add default trusted-dir-server entries only when no dirserver lines are given in the config file
...
svn:r2467
2004-10-13 19:56:42 +00:00
Nick Mathewson
508970f85d
fix typo
...
svn:r2466
2004-10-13 19:55:40 +00:00
Nick Mathewson
f14117bffd
fix warning about always-false comparison; detect too-large realport better
...
svn:r2465
2004-10-13 19:53:34 +00:00
Nick Mathewson
149f57bdef
answer question about rep_hist_note_connect_failed
...
svn:r2464
2004-10-13 19:42:36 +00:00
Nick Mathewson
afd8b650ee
hex-to-hex compare makes more sense than hex-to-bin.
...
svn:r2463
2004-10-13 19:17:27 +00:00
Nick Mathewson
df3098367c
Make directories get generated properly again; debug key lookup. Also, it is hard to find entries in a table when you never put them there.
...
svn:r2462
2004-10-13 18:28:39 +00:00
Roger Dingledine
918ce7a084
a few more ints to size_ts
...
svn:r2461
2004-10-13 05:54:58 +00:00
Roger Dingledine
a1041154eb
fix const char * vs char * issue
...
plus unshadow some variables
svn:r2460
2004-10-13 04:44:37 +00:00
Nick Mathewson
9dc72de41f
Omit any exit rules that follow a catch-all rule when writing a router descriptor.
...
svn:r2459
2004-10-13 01:25:42 +00:00
Nick Mathewson
9c49947163
Check fingerprint list before generating running-routers lists; also add as-yet-uncalled function to update an OR connection nickname on the fly
...
svn:r2458
2004-10-13 01:13:37 +00:00
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