Commit Graph

455 Commits

Author SHA1 Message Date
Roger Dingledine
2f6664ce80 MonthlyAccountingStart is dead.
svn:r4920
2005-09-08 05:38:47 +00:00
Nick Mathewson
5c6c88e76d More stuff for new directories.
- Distinguish v1 authorities (all currently trusted directories) from
  v2 authorities (all trusted directories).
    - Add configuration option for which dirs are v1 authories.
    - Add configuration option for whether to be a v1 authority.
    - Make trusted dirserver selection functions take options to
      choose which functionality we need.
    - Remove option when getting directory cache to see whether they
      support running-routers; they all do now.  Replace it with one
      to see whether caches support v2 stuff.

- Parse, cache, and serve network-status objects properly.

- Serve compressed groups of router descriptors.  The compression logic
  here could be more memory-efficient.

-


svn:r4911
2005-09-07 16:42:53 +00:00
Nick Mathewson
09e8521236 Make ContactInfo mandatory for authoritative directories.
svn:r4896
2005-09-02 20:29:29 +00:00
Nick Mathewson
26d2301c76 Make unit tests (and others) run without launching listeners, creating subdirectories, and so on.
svn:r4876
2005-08-26 23:22:27 +00:00
Nick Mathewson
3cc960c7dd Make sure that cached-status directory exists.
svn:r4865
2005-08-26 22:03:57 +00:00
Roger Dingledine
a47765a16d stop freeing the new global options list whenever we update it.
svn:r4853
2005-08-26 20:26:20 +00:00
Roger Dingledine
61f728f4fe fix an infinite loop at hup
svn:r4850
2005-08-26 20:07:55 +00:00
Nick Mathewson
cf90a36dd1 Add quotes around filenames in src/or
svn:r4845
2005-08-26 18:44:26 +00:00
Roger Dingledine
893acb3acc Make a new AssumeReachable config option that will publish anyway.
Also, let authdirservers start without setting their Address field.
Something is still not working though. Will fix in morning.


svn:r4839
2005-08-26 07:41:19 +00:00
Nick Mathewson
54a6a8f0ef Start implementing the server side of the new directory protocol.
Probably very buggy, since I can't actually run an authdir.

Features
- Generate and publish new network-status format
- Code to cache and re-serve network-status objects generated by others.
- Publish individual descriptors (by fingerprint, by "all", and by
  "tell me yours.")  [Still needs compression logic]
- Publish client and server recommended versions seprately.
- Add digest of descriptor to routerinfo_t, so we can track them better, and
  length, so we can server them more easily.

Cleanups
- Unify code to sign directory-like things
- Make resolve_my_address() able to tell you which name it wound up resolving.
- Unify code to store and serve directory-like things so it all uses
  cached_dir_t.
- Unify code to set the value of cached_dir_t objects.


svn:r4835
2005-08-25 20:33:17 +00:00
Roger Dingledine
676b330eb2 Make DirPostPeriod config option obsolete.
Force new descriptor upload every 18 hours, not 24, to avoid races.
Change rate-limiting on new descriptors due to bandwidth changes, from
45 minutes to 20 minutes.


svn:r4814
2005-08-22 21:53:12 +00:00
Roger Dingledine
fa64d73fc7 fix function headers from the descriptor-frequency commit
svn:r4809
2005-08-22 06:45:18 +00:00
Nick Mathewson
7a442c2c48 Make set_options a little smarter: have options_act handle transitions on its own, and only dirty our descriptor when we really want to.
svn:r4802
2005-08-22 00:18:45 +00:00
Roger Dingledine
04d42ea433 rotate dns and cpu workers if the controller changes options that
will affect them.


svn:r4787
2005-08-15 23:46:18 +00:00
Roger Dingledine
b1d3f124c4 Permit transitioning from ORPort=0 to ORPort!=0, and back.
This is actually a bit more subtle, because we need to rotate
the dnsworkers and cpuworkers if certain options (logs, orport, etc)
change. Maybe set_options() should detect this and notify the caller
that it should rotate them.

Expect some mysterious crashes.


svn:r4786
2005-08-15 10:30:45 +00:00
Roger Dingledine
10ff723938 initialize the dns worker cache tree whether or not we start
out as a server.


svn:r4785
2005-08-15 10:27:37 +00:00
Roger Dingledine
00c2ba4841 resolve a XXX
svn:r4783
2005-08-15 09:19:55 +00:00
Roger Dingledine
11bc97801d clean up some confusing logs.
make MonthlyAccountingStart truly obsolete now.


svn:r4782
2005-08-15 09:17:47 +00:00
Roger Dingledine
79e3f5600a hey, we have a function for that
svn:r4781
2005-08-15 08:51:20 +00:00
Nick Mathewson
789374dbbd Make GCC very happy, even with lots of warnings set. Also, try to fix some reported Solaris x86 warnings.
svn:r4770
2005-08-12 17:24:53 +00:00
Nick Mathewson
16528aa070 Add a config-file GETINFO entry; fix a minor memory leak on some SAVECONF calls.
svn:r4761
2005-08-10 18:05:20 +00:00
Nick Mathewson
c031d14633 Fix segfault in unit tests
svn:r4760
2005-08-09 18:49:43 +00:00
Nick Mathewson
249b72f53e Replace (Fascist)Firewall* with a new ReachableAddresses option that understands address policies.
svn:r4751
2005-08-08 21:58:48 +00:00
Roger Dingledine
3ac34ae329 get rid of IgnoreVersion and the forced auto-exit mis-feature
svn:r4746
2005-08-08 21:52:57 +00:00
Roger Dingledine
2e918af35d a few typo fixes
svn:r4738
2005-08-07 21:58:23 +00:00
Nick Mathewson
01d0788950 Generalize FirewallPorts to FirewallIPs so I can run happily when locked in net 18.
svn:r4737
2005-08-07 21:24:00 +00:00
Nick Mathewson
52475ee19b Alphebetize config variables
svn:r4714
2005-08-05 01:35:43 +00:00
Nick Mathewson
4cb89fd557 Implement some more GETINFO goodness: expose helper nodes, config options, getinfo keys.
svn:r4694
2005-08-04 19:56:41 +00:00
Nick Mathewson
ceb02cee2c If they havent told us by now, they probably never will.
svn:r4687
2005-08-03 20:37:13 +00:00
Nick Mathewson
299af3d393 Possibly broken implementation of persistant state; handles helper nodes; does not handle accounting info yet.
svn:r4680
2005-07-28 19:01:48 +00:00
Roger Dingledine
1e0fdcae98 parameterize RephistTrackTime
svn:r4673
2005-07-25 10:29:21 +00:00
Nick Mathewson
2bd6040f62 Rename cross-format config.c stuff to config_* and or_options_t-specific stuff to option[s]_*
svn:r4641
2005-07-23 01:58:05 +00:00
Nick Mathewson
18c11eb3bc Be consistent about preferring foo* to struct foo*
svn:r4637
2005-07-22 21:12:10 +00:00
Nick Mathewson
c252a76f0b Parameterize configuration parsing functions
svn:r4635
2005-07-22 20:37:42 +00:00
Nick Mathewson
c3a62c1739 Initial, somewhat dodgy implementation of helper nodes. It has too many XXXXs, it logs too verbosely, and it doesnt do persistence.
svn:r4633
2005-07-22 17:32:25 +00:00
Nick Mathewson
5b4e11fa5d Add getinfo logic for accounting; add options for helper nodes
svn:r4632
2005-07-22 14:55:09 +00:00
Roger Dingledine
ceae96a3a0 put in tor26's new IP address
svn:r4560
2005-07-14 22:37:52 +00:00
Roger Dingledine
19810ba38e make it more pleasant to be told you're using libevent
svn:r4548
2005-07-13 21:22:34 +00:00
Nick Mathewson
cf13b3e4a6 Macro-fu to get DEBUG events working.
svn:r4539
2005-07-13 05:14:42 +00:00
Nick Mathewson
50a206e800 Do not reverse command-line configuration options; Use new minimal-listener-close code; Add code to canonicalize configuration names.
svn:r4529
2005-07-11 17:35:36 +00:00
Nick Mathewson
2aff87caae Load hardware acceleration options when/where available. Can anybody test this?
svn:r4467
2005-06-20 18:56:35 +00:00
Nick Mathewson
d4972bd2e1 Remove code that has been #if-0ed for a long time.
svn:r4435
2005-06-15 18:34:46 +00:00
Nick Mathewson
2b8fd9ceda Allow a few EINVALs from libevent before dying. Warn on kqueue with libevent before 1.1a
svn:r4419
2005-06-13 00:35:19 +00:00
Nick Mathewson
44107b6b13 fix typo in last patch
svn:r4413
2005-06-11 18:56:16 +00:00
Nick Mathewson
232861ba42 Docment or add DOCDOC comments to undocumented functions in src/or. Make function definition format uniform.
svn:r4411
2005-06-11 18:52:12 +00:00
Roger Dingledine
fcd0fc3364 flesh out the source file descriptions for doxygen
svn:r4404
2005-06-11 05:31:17 +00:00
Nick Mathewson
0831823763 Change end-of-file NLNL convention. It turns out arma I and I agree.
svn:r4382
2005-06-09 19:03:31 +00:00
Roger Dingledine
43709a9c3d clean up the log warn a bit
svn:r4357
2005-06-08 20:45:29 +00:00
Nick Mathewson
c45845204a Fix warning about unused function when compiling with ancient libevent
svn:r4355
2005-06-08 20:35:28 +00:00
Roger Dingledine
44e85544e4 absolutely refuse to let people pick internal IP addresses if
they're using the default dirservers.

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


svn:r4354
2005-06-08 20:32:22 +00:00
Nick Mathewson
be1c81a767 Fix syntax error.
svn:r4346
2005-06-08 16:26:44 +00:00
Nick Mathewson
ec07e1195f add patch for 143 and code to check for known-bad/slow libevent versions. Needs more testing.
svn:r4344
2005-06-08 13:53:19 +00:00
Nick Mathewson
751db63a17 Always disable kqueue on OSX. It seems linked to kernel panics
svn:r4282
2005-05-23 04:28:58 +00:00
Nick Mathewson
11a64692c3 Make hashed controller password encoding use hex not base64; this makes it possible to write a controller without base64
svn:r4279
2005-05-23 02:31:53 +00:00
Roger Dingledine
f0e309e5bd add HttpProxyAuthenticator config option too
svn:r4272
2005-05-20 08:51:45 +00:00
Roger Dingledine
b7d6b8a397 doxygeny goodness from tyranix
svn:r4262
2005-05-17 17:01:36 +00:00
Roger Dingledine
ec1331d49e fix a comment that tyranix noticed
svn:r4239
2005-05-17 01:55:53 +00:00
Nick Mathewson
530da0e772 Normalize whitespace
svn:r4233
2005-05-16 01:04:28 +00:00
Roger Dingledine
28195a0eb1 clean up some log entries
svn:r4228
2005-05-15 05:00:24 +00:00
Nick Mathewson
9bc6e3aa6c Add an explanatory comment
svn:r4222
2005-05-15 02:05:45 +00:00
Roger Dingledine
3c9ec416f6 fix a case error in suppressing a bogus libevent warning.
nick, was this lower-case for a reason? have both cases
appeared? or was this just a typo.


svn:r4206
2005-05-14 05:14:36 +00:00
Nick Mathewson
00f2a09380 Append default exit policy before checking for implicit internal addresses: fix bug 129.
svn:r4201
2005-05-14 00:13:17 +00:00
Nick Mathewson
13126eeb0f Patch from goodell for task 131: Do not die on internal address if we are not publishing.
svn:r4186
2005-05-09 04:31:00 +00:00
Nick Mathewson
bc51c8b074 Implement --verify-config command-line option to fix bug 69.
svn:r4182
2005-05-07 04:49:09 +00:00
Roger Dingledine
1f263bf6f5 whine at you if you're a server and you don't set your contactinfo
svn:r4178
2005-05-04 20:45:38 +00:00
Roger Dingledine
5265bbd2b8 first iteration of scrubbing sensitive strings from logs.
also generally clean up log messages.


svn:r4174
2005-05-03 10:04:08 +00:00
Nick Mathewson
4666b801fa If DataDir is ~/.tor, and that expands to /.tor, then default to LOCALSTATEDIR/tor instead.
svn:r4170
2005-05-03 00:36:57 +00:00
Roger Dingledine
729e720095 workaround for user error: some people were putting "Address " in their
torrc, and they had a buggy resolver that resolved " " to 0.0.0.0. Oops.


svn:r4150
2005-04-29 18:52:05 +00:00
Roger Dingledine
543d31c89a bump the default bandwidthrate from 1mb to 2mb
svn:r4131
2005-04-27 04:13:59 +00:00
Roger Dingledine
5e86e87124 Add basic HttpsProxyAuthenticator support, based on patch
from Adam Langley.


svn:r4115
2005-04-26 18:33:33 +00:00
Roger Dingledine
6128cdead0 let NumCpus be singular without whining
svn:r4097
2005-04-23 19:29:09 +00:00
Roger Dingledine
ad4eca60ec add geoff's NoPublish patch
svn:r4084
2005-04-21 10:40:48 +00:00
Roger Dingledine
652dde72f1 bugfix: chdir to your datadirectory at the *end* of the
daemonize process, not the beginning. this was a problem
because the first time you run tor, if your datadir isn't
there, and you have runasdaemon set to 1, it will try to
chdir to it before it tries to create it. oops.


svn:r4033
2005-04-06 19:07:38 +00:00
Nick Mathewson
4991290935 Revise control spec and implementation to allow all log messages to be sent to controller with their severities intact.
svn:r4010
2005-04-05 22:56:17 +00:00
Nick Mathewson
0e81265359 update copyright notices.
svn:r3982
2005-04-01 20:15:56 +00:00
Nick Mathewson
73f6c1531e fix typo in earlier libevent mmessage suppress patch
svn:r3950
2005-04-01 07:16:52 +00:00
Nick Mathewson
410ecfcc71 Add code to suppress spurious libevent log msgs; use it to resolve bug 68.
svn:r3948
2005-04-01 07:05:21 +00:00
Nick Mathewson
efe9ca659a Use recent libevent features when possible
svn:r3940
2005-04-01 02:37:40 +00:00
Nick Mathewson
ce854906db Rename ManageConnections to LeaveStreamsUnattached. Apparently, there was a missing "TorShould" that was mistaken for an "IWantTo".
svn:r3894
2005-03-27 06:25:33 +00:00
Nick Mathewson
ec81f87018 Implement an option to cap bandwidth-to-advertise. Arma: can you improve the manpage entry by explaining why you would want to do this?
svn:r3813
2005-03-22 19:01:46 +00:00
Nick Mathewson
df9c8feac7 Commit fixes for several pending tor core tasks: document all DOCDOCed functions; time out uncontrolled unattached streams; feed reasons to SOCKS5 (refactoring connection_ap_handshake_socks_reply in the process); change DirFetchPeriod/StatusFetchPeriod to have a special "Be smart" value.
svn:r3769
2005-03-17 12:38:37 +00:00
Nick Mathewson
0197b47ce9 Fix some more obscure compiler warnings
svn:r3758
2005-03-14 03:28:46 +00:00
Roger Dingledine
01f0b31432 ShutdownWaitLength should be an interval, not a uint
svn:r3753
2005-03-12 20:16:52 +00:00
Roger Dingledine
fe768d1d2a change SHUTDOWN_WAIT_LENGTH from a fixed 30 secs to a config option
svn:r3752
2005-03-12 20:13:38 +00:00
Nick Mathewson
115271f65e Implement the common case of ATTACHSTREAM.
svn:r3751
2005-03-12 04:22:01 +00:00
Nick Mathewson
777d3dde0c Get address map resetting implemented.
svn:r3745
2005-03-11 21:39:39 +00:00
Roger Dingledine
a1f1fa6ab2 Checkpoint in-progress fixes:
Add 'testing' circuit purpose, for reachability testing.
Notice when our IP changes, and reset stats.
Try to pull down a directory via Tor to see if our DirPort is working.
Try to extend a circuit back to us to see if our ORPort is working.
Only publish a descriptor if they're both reachable.

These mostly work, and I'd better get them in before I cause conflicts.


svn:r3703
2005-02-27 09:47:01 +00:00
Nick Mathewson
bbaa3c7792 Implement more control spec functionality
- Mapaddress
- Postdescriptor
- GetInfo on descriptors

Required changes elsewhere:
- Keep the most recent running_routers_t in the routerlist_t. That way we
  can learn about new routers and remember whether we were last told that
  they were up or down.  Also enables more simplifications.
- Keep the signed descriptor inside routerinfo_t.  This makes
  descriptor_entry_t in dirservers.c unneeded.
- Rename AddressMap (the verb) to MapAddress. Keep AddressMap as a noun.
- Check addresses for plausibility before mapping them.


svn:r3696
2005-02-25 20:46:13 +00:00
Roger Dingledine
6faaac2706 add support for CONNECTing through https proxies.
not sure if it works. i don't have an https proxy.


svn:r3682
2005-02-24 10:56:55 +00:00
Roger Dingledine
55c3f15ed1 Forward-port the trick to bump up ConnLimit as far as it can
go, but not past MAXCONNECTIONS. Also throw away the FAKE_POLL
caveats since 0.1.0 doesn't need it any more.


svn:r3657
2005-02-22 23:52:44 +00:00
Nick Mathewson
6e6d95b3db Change from inet_ntoa to a threadproof tor_inet_ntoa.
svn:r3656
2005-02-22 08:18:36 +00:00
Nick Mathewson
d01718841e Remove assumptions that maximum path length is anything like 1024. From comments by Chris Palmer
svn:r3652
2005-02-22 06:38:39 +00:00
Roger Dingledine
8727acf2f1 Add a new AddressMap directive to rewrite incoming socks addresses.
Add a new TrackHostExits directive to trigger addressmaps for
certain incoming socks addresses, for sites that break when your exit
keeps changing.
Redo the client-side dns cache so it's just an addressmap too.


svn:r3641
2005-02-22 00:53:08 +00:00
Nick Mathewson
f672577bc6 Free even more things on shutdown. Temporarily move tor_free_all out from #ifdef so it gets tested more.
svn:r3614
2005-02-11 01:26:47 +00:00
Nick Mathewson
bb32fa86d7 Re-normalize whitespace; make "make check-spaces" happy
svn:r3566
2005-02-05 21:42:46 +00:00
Nick Mathewson
24ad6542c9 forward-port NT service patch
svn:r3565
2005-02-05 21:40:25 +00:00
Roger Dingledine
efa9bb5535 fix the latest bug: don't explode when some router declares a
bandwidthburst of 500 gigabytes.

this bug seems to have taken down most of the network. oops.


svn:r3523
2005-02-03 22:58:22 +00:00
Roger Dingledine
976bee4a3f only check if exit_policy_implicitly_allows if you're a server.
also, put a comment next to an interesting undocumented 'feature'.


svn:r3499
2005-02-02 01:59:16 +00:00
Roger Dingledine
850c300e46 bump the default rate limit to 1 MB
svn:r3494
2005-02-01 13:44:10 +00:00
Roger Dingledine
e7e77d6d8e fix an edge case in parsing config options (thanks weasel)
svn:r3486
2005-02-01 00:05:57 +00:00