Commit Graph

782 Commits

Author SHA1 Message Date
Nick Mathewson
f38240435a r12001@catbus: nickm | 2007-02-28 15:24:12 -0500
Try to build without warnings on mingw with verbose warnings on.  First attempt.


svn:r9688
2007-02-28 20:24:27 +00:00
Roger Dingledine
522a97098b more cleanups; getting closer
svn:r9655
2007-02-26 05:36:02 +00:00
Roger Dingledine
d6c21ab8a7 tell the user if we're delaying his newnym request. also, pick
a different set of fenceposts.


svn:r9647
2007-02-24 21:21:38 +00:00
Roger Dingledine
50f22e858a doc pedant
svn:r9634
2007-02-24 07:50:38 +00:00
Roger Dingledine
9946bb7fbd cosmetic, comment, and todo fixes
svn:r9627
2007-02-24 01:12:53 +00:00
Nick Mathewson
b3392559d4 r11873@catbus: nickm | 2007-02-22 01:21:14 -0500
twiddle signewnym rate-limiting patch so every signal gets handled eventually.  document it in control-spec. add a changelog.


svn:r9615
2007-02-22 06:21:19 +00:00
Nick Mathewson
fe9224dabc r11872@catbus: nickm | 2007-02-22 01:08:46 -0500
patch from mwenge: rate-limit newnym.


svn:r9614
2007-02-22 06:21:16 +00:00
Nick Mathewson
d2893398f6 r11832@catbus: nickm | 2007-02-16 15:31:59 -0500
Fix 35 remaining DOCDOC comments. Yowza.


svn:r9596
2007-02-16 20:39:37 +00:00
Nick Mathewson
4a74812c70 r11812@catbus: nickm | 2007-02-14 11:22:08 -0500
Apply stream_bw patch from Robert Hogan.


svn:r9585
2007-02-14 16:46:49 +00:00
Nick Mathewson
b16c544509 r11779@catbus: nickm | 2007-02-12 16:52:29 -0500
Do not try to load advapi32.dll except when the user asks us to do something with NT services.  When we _do_ try, always treat failure to load service functions as an exit-worthy error.  Needs testing. (Fixes bug 389)


svn:r9571
2007-02-12 21:52:32 +00:00
Nick Mathewson
759c58151e r11775@catbus: nickm | 2007-02-12 16:39:09 -0500
Update copyright dates.


svn:r9570
2007-02-12 21:39:53 +00:00
Nick Mathewson
295f6d4e0f r11676@catbus: nickm | 2007-02-07 00:10:00 -0500
(Hopefully) final changes for 0.1.2.7-alpha: disable checking for whether the user account in question exists on --service install, since that seems to make windows go boom.  We can figure out why later.  Also, let the admin specify a password for the target user.


svn:r9506
2007-02-07 05:10:58 +00:00
Nick Mathewson
534baec4a1 r11674@catbus: nickm | 2007-02-06 17:00:22 -0500
Remove a now-bogus assert() from nt_service_command_line(), and change option handling.  (Now that we no longer force a -f, it is possible to have no command-line options for Tor-as-service.)


svn:r9503
2007-02-06 22:00:25 +00:00
Nick Mathewson
c4faebfa6d r11667@catbus: nickm | 2007-02-06 13:36:18 -0500
The --service install code can no longer default to adding an -f option for the appdata directory of the current user, since the target user probably will not be able to read it.  Instead, warn the user if no explicit torrc filename is given.


svn:r9502
2007-02-06 18:36:26 +00:00
Nick Mathewson
0c4ab00658 r11664@catbus: nickm | 2007-02-06 11:55:37 -0500
More win32 account flumdummery: when LocalService exists, you can't detect it via LookupAccountName.  The only good test is to see whether we're on win2k or earlier.
 Apparently, somebody wouldn't know where to draw the line between implementation and interface if you gave them tracing paper and a copy of Stevens.


svn:r9499
2007-02-06 16:55:42 +00:00
Roger Dingledine
da5cd33ab8 stop crashing on nt service install; but matt says still not right
svn:r9496
2007-02-06 04:58:56 +00:00
Nick Mathewson
e0acb45b86 r11650@catbus: nickm | 2007-02-05 17:02:54 -0500
Resolve (I hope) remaining nt service compilation issues.


svn:r9489
2007-02-05 22:02:58 +00:00
Nick Mathewson
d930440ae5 r11648@catbus: nickm | 2007-02-05 16:48:50 -0500
Fix bugs in last nt services patch: syntax, typename.


svn:r9488
2007-02-05 21:48:53 +00:00
Nick Mathewson
8b238404de r11646@catbus: nickm | 2007-02-05 16:15:48 -0500
Make default NT service user be LocalService.  Again, I have no idea if this compiles, let alone if it works.


svn:r9487
2007-02-05 21:15:52 +00:00
Nick Mathewson
337fdb7eb6 r11643@catbus: nickm | 2007-02-05 15:44:59 -0500
Fix bug 254, sort of: make the default NT service user NetworkService rather than NULL (system).  Also, add a --user argument to --service install so that admins can override this default: this latter point should take care of most of my objections to NetworkService.  I have no idea whether this even compiles.


svn:r9486
2007-02-05 20:45:02 +00:00
Nick Mathewson
fefba95363 r11629@catbus: nickm | 2007-02-02 15:06:17 -0500
Removing the last DOCDOC comment hurt so much that I had to use Doxygen to identify undocumented macros and comments, and add 150 more DOCDOCs to point out where they were.  Oops.  Hey, kids!  Fixing some of these could be your first Tor patch!


svn:r9477
2007-02-02 20:06:43 +00:00
Nick Mathewson
8507699256 r11624@catbus: nickm | 2007-02-01 13:17:35 -0500
Note a few questionable bits pointed out by RATS.  (And no, RATS, I'm not about to stop having fixed-sized local buffers for you.  I know how to use them, thankyouverymuch.)


svn:r9474
2007-02-01 18:33:02 +00:00
Nick Mathewson
84790d059f r9715@catbus: nickm | 2007-01-22 02:51:04 -0500
Document a few undocumented functions and arguments.


svn:r9385
2007-01-22 07:51:06 +00:00
Roger Dingledine
bcbd289af5 If our system clock jumps back in time, don't publish a negative
uptime in the descriptor. Also, don't let the global rate limiting
buckets go absurdly negative.


svn:r9377
2007-01-21 06:24:05 +00:00
Nick Mathewson
75eca91459 r11786@Kushana: nickm | 2007-01-02 14:32:54 -0500
Add a comment about a possible refactoring in main.c


svn:r9238
2007-01-02 20:07:54 +00:00
Nick Mathewson
26c0d6ec58 r11743@Kushana: nickm | 2006-12-28 23:13:21 -0500
Refactor _connection_controller_force_write back into conncetion_handle_write.  Again, the line count goes down: groovy!


svn:r9208
2006-12-29 05:06:47 +00:00
Nick Mathewson
d9f1f3533d r11724@Kushana: nickm | 2006-12-28 14:22:35 -0500
Refactor and unify my-ip-addr-changed logic.  Make change in IP address or in nameservers reset and relaunch DNS hijacking tests.


svn:r9200
2006-12-28 21:29:20 +00:00
Nick Mathewson
e5f5b96ca6 r11723@Kushana: nickm | 2006-12-28 13:52:48 -0500
Fix bug 364: check for whether popular hostnames (curently google, yahoo, mit, and slashdot) are getting wildcarded.  If they are, we are probably behind a DNS server that is useless: change our exit policy to reject *:*.


svn:r9199
2006-12-28 21:29:11 +00:00
Nick Mathewson
3ab84c5f48 r11711@Kushana: nickm | 2006-12-24 21:42:57 -0500
Stop counting 503s against the total number of failures allowed for a download.


svn:r9190
2006-12-25 02:47:37 +00:00
Nick Mathewson
a71a5d4bf2 r11706@Kushana: nickm | 2006-12-24 01:50:52 -0500
Fix 2 bugs in last patch.  (VS has weird ideas about const, and I have weird ideas about block structure.)


svn:r9186
2006-12-24 06:50:57 +00:00
Nick Mathewson
bae366eff0 r11702@Kushana: nickm | 2006-12-24 01:31:59 -0500
Patch from Edmanm, slightly modified.  Original change list:
   - Support running the Tor service with a torrc not in the
     same directory as tor.exe (Bug #356) and default to using the torrc
     located in the %appdata%\Tor\ of the user who installed the service
   - Removed the supposedly misleading error message mentioned in Bug #294
   - Fixed some CloseHandle()s that should've been CloseServiceHandle()s
   - Fixed some nt_service_foo() return values to be consistent
   - Resolved some nt_service_foo() DOCDOCs
   - Fixed one trivial typo that I happened to randomly notice
 
 Changes:
   - Make more comments into "imperative" house style.
   - Remove special handling for "-f"; only use --options.
   - Quote all options.
   - Clean up whitespace
 


svn:r9185
2006-12-24 06:32:24 +00:00
Roger Dingledine
04409f202d reenable write limiting. nick finally convinced me this was
a smart move.

more todo sub-items remain for it.


svn:r9101
2006-12-13 07:08:36 +00:00
Nick Mathewson
7c79495137 r11468@Kushana: nickm | 2006-12-07 14:56:57 -0500
Revise logic used to flush state to disk. Now, we try to batch non-urgent changes so that we do not do too many writes, and we save very-non-urgent changes every once in a rare while, and we never save more than once per second.


svn:r9047
2006-12-07 20:11:30 +00:00
Nick Mathewson
6c8075d8a0 r11462@Kushana: nickm | 2006-12-07 13:42:21 -0500
Make bandwidth accounting information get stored to the state file as well as bw_accounting.  Read from the state file if it is more recent than bw_accounting, or if bw_accounting is not there.


svn:r9044
2006-12-07 18:57:37 +00:00
Nick Mathewson
a91c12f2e7 r9855@Kushana: nickm | 2006-12-04 00:55:09 -0500
Merge circuit_about_to_close_connection and connection_about_to_close_connection.


svn:r9021
2006-12-04 05:55:40 +00:00
Roger Dingledine
c5b90daf86 cleanups, bump to 0.1.2.4-alpha
svn:r9015
2006-12-02 22:47:46 +00:00
Nick Mathewson
d1fdabf1c7 r9843@Kushana: nickm | 2006-11-30 17:22:25 -0500
Turn an xxxx0124 into an #ifdef; avoid leaking memory.


svn:r9013
2006-11-30 22:23:01 +00:00
Nick Mathewson
0f6402f17b r9309@totoro: nickm | 2006-11-13 19:05:41 -0500
Whitespace fixes, and clean up code from last natd patch.


svn:r8947
2006-11-14 00:06:45 +00:00
Nick Mathewson
5d7ca19b44 r9465@auth3-479: nickm | 2006-11-01 13:16:21 -0500
Add some temporary code to count  how many *distinct* router digests we verify.  (I have a sneaking suspicion that the numbers look way way high.)


svn:r8890
2006-11-01 18:16:44 +00:00
Nick Mathewson
1bf1f9d2fc r9449@Kushana: nickm | 2006-10-31 00:12:02 -0500
Dump breakdown of PK operations when we get a USR2 signal.  This should help us figure out of we are doing some of them for stupid reasons.


svn:r8881
2006-10-31 19:17:07 +00:00
Nick Mathewson
3fbb292bff r9389@Kushana: nickm | 2006-10-25 17:46:16 -0400
Add a CLEARDNSCACHE signal to clear the client-side DNS cache.


svn:r8829
2006-10-25 21:46:21 +00:00
Nick Mathewson
5c670a186c r9386@Kushana: nickm | 2006-10-25 17:35:38 -0400
Resolve bug 347: translate v0 controller signal numbers into internal signal numbers; leave v1 signal numbers alone.


svn:r8828
2006-10-25 21:39:42 +00:00
Roger Dingledine
77c8c0ee51 spec and implement some more status events. start to build
some conventions.


svn:r8805
2006-10-23 10:16:43 +00:00
Roger Dingledine
2a1c294717 implement a few status events, so we can make sure they work,
and so vidalia can start handling them if it wants.


svn:r8802
2006-10-23 05:51:46 +00:00
Nick Mathewson
b27cb38dee r9307@Kushana: nickm | 2006-10-20 13:53:54 -0400
Have connection_about_to_close use an end_reason field in edge_connection_t to tell what reason to tell the controller for closing the stream.  Set end_reason in connection_edge_end, connection_mark_unattached_ap, and everwhere we set edge_has_sent_end.  Add a changelog entry.


svn:r8779
2006-10-20 17:54:48 +00:00
Roger Dingledine
584d598e8a move the 'time jump' warning back to a higher threshold.
this still occurs on moria sometimes if it's swapping to death.
so be it.


svn:r8725
2006-10-15 02:32:16 +00:00
Roger Dingledine
86263acf95 Security bugfixes:
When the user sends a NEWNYM signal, clear the client-side DNS
  cache too. Otherwise we continue to act on previous information.


svn:r8679
2006-10-09 21:11:50 +00:00
Roger Dingledine
81dd9720f2 whitespace tweaks
svn:r8677
2006-10-09 20:54:51 +00:00
Nick Mathewson
829bf4dcd0 r8970@totoro: nickm | 2006-10-09 10:12:53 -0400
Win32 patch from Matt Edman: fix compilation bugs by casting to int; defining SSIZE_T; defining USE_TWOS_COMPLEMENT in windows orconfig.h; and using the proper names for win32 functions on GetProcAddress. Also fixes bug 295.


svn:r8669
2006-10-09 15:46:21 +00:00
Roger Dingledine
538c54e376 try dirport reachability testing five times less often.
it's already so darn thorough per test -- it chews through
like four circuits before giving up.


svn:r8646
2006-10-08 06:33:02 +00:00
Nick Mathewson
1c01797c16 r8932@totoro: nickm | 2006-10-07 20:29:03 -0400
Try to make mingw capable of producing a working tor binary for win98: make all NT-service-related functions get lazy-loaded on demand.  I have no idea if this even compiles.


svn:r8643
2006-10-08 00:33:35 +00:00
Roger Dingledine
1d4bd3990f fetch all the v1 directory stuff way less often. plus, move
around some housecleaning calls so they still occur often.
are some of these redundant or in the wrong order? there are
so many of them, maybe they should be put into a separate
function that has better documentation.


svn:r8607
2006-10-06 09:04:11 +00:00
Nick Mathewson
7d366f61cb r9025@Kushana: nickm | 2006-09-29 18:33:13 -0400
Differentiate more duplicated log entries


svn:r8542
2006-09-29 22:33:40 +00:00
Nick Mathewson
95132f836a r8750@totoro: nickm | 2006-09-27 20:52:01 -0400
Fix some warnings on mingw; hopefully this should let us build on mingw without warnings.


svn:r8509
2006-09-28 00:53:02 +00:00
Nick Mathewson
01f9e97d43 Minor fix: add code to eventdns so it can free memory on shutdown. This should help valgrind and dmalloc freak out less.
svn:r8503
2006-09-25 20:38:58 +00:00
Nick Mathewson
52e179b942 Trivial fix to make dmalloc happier: release memory held in static member of escaped().
svn:r8502
2006-09-25 18:46:29 +00:00
Nick Mathewson
7c21dabef1 r8878@Kushana: nickm | 2006-09-21 17:15:47 -0400
Trivial whitespace cleanups.


svn:r8443
2006-09-21 21:48:55 +00:00
Nick Mathewson
e4a9b4de4e r8875@Kushana: nickm | 2006-09-21 16:46:28 -0400
Resolve bug 330: detect ISPs that want to hijack failing DNS requests and basically domain-squat the entire internet.


svn:r8440
2006-09-21 21:48:22 +00:00
Nick Mathewson
65974f82fa r8839@Kushana: nickm | 2006-09-17 16:11:59 -0400
Add some client performance XXXXs; try to move some common case tests higher on their decision trees.


svn:r8410
2006-09-17 20:12:10 +00:00
Roger Dingledine
c22dc94fe6 make my bandwidth exercises actually happen
svn:r8400
2006-09-15 05:53:00 +00:00
Peter Palfrader
9d9e31dcf4 r9752@danube: weasel | 2006-09-14 07:06:49 +0200
Fix some dead code that is on occasion useful


svn:r8389
2006-09-14 05:07:26 +00:00
Peter Palfrader
984e8f6efb r9736@danube: weasel | 2006-09-14 05:53:06 +0200
Refactor dirserv_parse_fingerprint_file(fname) into dirserv_load_fingerprint_file():
 There is not need to put together the path to the approved-routers file in more than one place.


svn:r8386
2006-09-14 04:53:23 +00:00
Mike Chiussi
6ec9c1092a - made configure check if we are building for win32
- made configure link to required system dll's if building for win32
- added diffs for libevent 1.1b
- forced user to turn off eventdns if win32 is set 
- cleaned up tor_mmap_file()_win32 (not sure if it's stable)
- cleaned up some warnings and typos




svn:r8322
2006-09-06 01:49:55 +00:00
Roger Dingledine
2499d1db7c and make the comment better, while i'm at it
svn:r8273
2006-08-28 19:02:57 +00:00
Roger Dingledine
2a4d5782ef an even better check -- now servers hang up if they can't write
for a while, and clients hang up if they can't read for a while.


svn:r8272
2006-08-28 19:00:17 +00:00
Roger Dingledine
f75ef94f27 fix bug found by Adam J. Richter: directory clients shouldn't
hang up five minutes after they begin. but directory servers
should still hang up after 5 minutes of failing to deliver
any bytes.


svn:r8271
2006-08-28 18:51:36 +00:00
Nick Mathewson
54ca0387a5 r8608@Kushana: nickm | 2006-08-27 16:57:47 -0400
Make it possible to change nameserver options while Tor is running.


svn:r8255
2006-08-28 03:15:55 +00:00
Roger Dingledine
24ad1e06cf i'm guessing nick meant to check the return value of dns_init.
and revise some log severities to match the convention.


svn:r8234
2006-08-27 01:41:08 +00:00
Roger Dingledine
9ebaf01096 clean up logging conventions in do_list_fingerprint()
svn:r8222
2006-08-24 00:54:18 +00:00
Roger Dingledine
41d8d77c8b tor --verify-config now exits with -1(255) or 0 depending on whether
the config options are bad or good.


svn:r8221
2006-08-23 23:45:03 +00:00
Nick Mathewson
0f5bfc1521 r7411@Kushana: nickm | 2006-08-17 19:00:25 -0400
patch suggested by Karsten Loesing: respond to SIGNAL command before we execute the signal, in case the signal shuts us down.


svn:r7072
2006-08-17 23:00:32 +00:00
Roger Dingledine
5647e5c7e6 fix typo, add explanatory comment
svn:r7026
2006-08-11 07:31:16 +00:00
Nick Mathewson
09a895e222 r7324@Kushana: nickm | 2006-08-10 23:23:15 -0700
Add more warnings to the list of those we tolerate. Start using GCC attributes more, for better error checking and better code generation.


svn:r7020
2006-08-11 07:09:17 +00:00
Nick Mathewson
85f381153b r6949@Kushana: nickm | 2006-07-28 10:17:38 -0400
Shave another 8 bytes from connection_t: turn inbuf_reached_eof into a bit, and lower timestamp_lastempty to or_connection_t


svn:r6934
2006-07-28 15:11:20 +00:00
Nick Mathewson
5227395aba r6922@Kushana: nickm | 2006-07-26 16:32:24 -0400
Rename some fields, compress a bitfield, and document some structs and fields


svn:r6919
2006-07-27 05:03:57 +00:00
Nick Mathewson
ec82db6995 r6909@Kushana: nickm | 2006-07-26 13:05:58 -0400
Clean up wide lines from last patch.


svn:r6907
2006-07-26 19:07:37 +00:00
Nick Mathewson
4ff4577beb r6908@Kushana: nickm | 2006-07-26 12:38:52 -0400
Refactor connection_t into edge, or, dir, control, and base subtypes.  This might save some RAM on busy exit servers, but really matters most in terms of correctness.


svn:r6906
2006-07-26 19:07:26 +00:00
Roger Dingledine
c9b8458f59 publish a new descriptor after we hup. this is important if our
config has changed such that we'll want to start advertising our
dirport now, etc.


svn:r6819
2006-07-23 11:50:03 +00:00
Roger Dingledine
00aefaab6b think harder about my logic
svn:r6806
2006-07-22 07:19:11 +00:00
Roger Dingledine
2d6a4d283b i lied, that won't work at all. maybe this will.
svn:r6805
2006-07-22 07:15:34 +00:00
Roger Dingledine
444f096d2d more bulletproof reachability testing
svn:r6804
2006-07-22 05:29:31 +00:00
Roger Dingledine
2249180b60 bugfix: if you find yourself reachable, then don't ever make any client
requests (so you stop predicting circuits), then hup, then later your
IP changes, you won't think circuits are working so you won't try to
test reachability, so you won't publish.


svn:r6800
2006-07-21 07:55:35 +00:00
Nick Mathewson
7fcb267e24 Oh. And apparently, msvc6 doesnt think very much of doing u64-and-double arithmetic either.
svn:r6785
2006-07-18 02:24:01 +00:00
Roger Dingledine
42e2057d67 fix some more places where we shouldn't crash if we can't build
our own descriptor yet.


svn:r6775
2006-07-17 06:54:28 +00:00
Nick Mathewson
e572d5990c MSVC6 is apparently terrified of unnatural cross-breeding between uint64_t and double, and needs more persuasion than usual to cast one to the other. Issue identified by Frediano Ziglio; patch revised for minimal impact on non-MSVC6 compilers.
svn:r6768
2006-07-17 00:39:05 +00:00
Roger Dingledine
05d0b70573 Get rid of the router_retry_connections notion. Now routers no longer
try to rebuild long-term connections to directory authorities, and
directory authorities no longer try to rebuild long-term connections to
all servers.

We still don't hang up connections in these two cases though -- we need
to look at it more carefully to avoid flapping, and we likely need to
wait til 0.1.1.x is obsolete.


svn:r6712
2006-07-04 03:31:27 +00:00
Roger Dingledine
4e4cc9aa27 lower the number of seconds before we yell about clock jump.
and make the yelling only happen if you're a server.


svn:r6625
2006-06-15 09:03:15 +00:00
Roger Dingledine
0bfef523df simplify the tortls api: we only support being a "server", that
is, even tor clients do the same sort of handshake.

this has been true for years, so it's best to get rid of the
stale code.


svn:r6557
2006-06-07 06:10:54 +00:00
Nick Mathewson
853e2d99b6 Add a new warning to our "warn a lot" list: unused parameters. This means we have to explicitly "use" unuseds, but it can catch bugs. (It caught two coding mistakes so far.)
svn:r6532
2006-06-04 22:42:13 +00:00
Roger Dingledine
48be472e4f clean up a comment
svn:r6508
2006-05-28 16:07:44 +00:00
Roger Dingledine
27624a3024 stop telling people that "tor -h" will help them in any way.
svn:r6447
2006-05-08 04:28:49 +00:00
Roger Dingledine
3c86402cc2 petty cleanups
svn:r6421
2006-04-25 07:00:04 +00:00
Roger Dingledine
07ff409876 no need to escape the address for our connections -- they are
always IP addresses.


svn:r6389
2006-04-16 22:34:00 +00:00
Peter Palfrader
beb9e0721a Stop assuming every authority is a v1 authority
svn:r6377
2006-04-10 21:29:29 +00:00
Roger Dingledine
12d461a245 make DirFetchPeriod and StatusFetchPeriod truly obsolete.
svn:r6373
2006-04-10 20:16:46 +00:00
Roger Dingledine
6f08d121d9 Refactor and consolidate addr/exit policies into a new policies.c.
Fix some minor bugs and memory leaks along the way.


svn:r6246
2006-03-27 02:25:34 +00:00
Roger Dingledine
51a3981d10 stop caching the v1 directory so often.
svn:r6226
2006-03-22 06:18:27 +00:00
Roger Dingledine
1db263ac3c stop writing the "router.desc" file, ever. nothing uses it anymore.
svn:r6224
2006-03-22 03:45:17 +00:00
Roger Dingledine
a3329036a8 Bugfix: looks like clients since 0.1.1.10-alpha have been
expiring connections whenever 5 minutes pass and they *do*
have circuits on them.


svn:r6213
2006-03-21 21:58:00 +00:00
Roger Dingledine
d1d0813cf3 Allow non-printable characters for exit streams (both for
connecting and for resolving). Now we tolerate applications
that don't follow the RFCs. But continue to block malformed
names at the socks side.


svn:r6193
2006-03-19 03:55:48 +00:00