Commit Graph

550 Commits

Author SHA1 Message Date
Nick Mathewson
f1b91924b2 Keep running if we ask for an impossible stdout log; just warn.
svn:r5964
2006-02-11 21:56:03 +00:00
Nick Mathewson
91847124bf Warn if running obsolete windows as a server.
svn:r5961
2006-02-11 21:26:40 +00:00
Roger Dingledine
5f051574d5 Happy new year!
svn:r5949
2006-02-09 05:46:49 +00:00
Nick Mathewson
97bff8edaa Fix a const-non-const warning
svn:r5923
2006-02-06 04:55:27 +00:00
Roger Dingledine
92ef9e37e7 Add a new config option ExitPolicyRejectPrivate which defaults to 1.
This means all exit policies will begin with rejecting private addresses,
unless the server operator explicitly turns it off.

Also, make our code to remove redundancies in the exit policy smarter,
so it can detect "reject foo, reject bar, reject *" patterns.

Lastly, we can get rid of the "exit policy implicitly accepts" code,
since we make everything more explicit now.


svn:r5888
2006-02-01 03:53:52 +00:00
Roger Dingledine
f8b9a8d457 bump the default bandwidthrate to 3 MB, and burst to 6 MB
svn:r5874
2006-01-28 08:28:15 +00:00
Roger Dingledine
21be9dc3c0 when you tried to set orport through the controller, it would
trigger an assert because you hadn't made your onion keys yet
you wanted to launch cpu workers.

now init keys first, reset uptime, and tell the user that we're
starting the reachability testing.


svn:r5835
2006-01-17 04:01:32 +00:00
Roger Dingledine
f0d4b3d18f turn crypto hardware acceleration off by default, until we find
somebody smart who can test it for us.


svn:r5829
2006-01-16 20:08:33 +00:00
Nick Mathewson
c562ca494a add missing warning
svn:r5806
2006-01-11 20:09:37 +00:00
Nick Mathewson
fefa34d525 Fix double-free of torrc_fname
svn:r5805
2006-01-11 20:01:47 +00:00
Nick Mathewson
adbe0f0ada Fix bug 240: dont dump descriptions when not dumping actual config lines.
svn:r5804
2006-01-11 19:43:14 +00:00
Nick Mathewson
099b9ce2f9 Fix bug 230: add a rollback function to reverse all changes since the last mark_logs_temp(), and move log initialization into the two-phase part of option setting.
svn:r5803
2006-01-11 19:40:14 +00:00
Nick Mathewson
d60faa7c93 Fix another memleak. I love you, valgrind!
svn:r5794
2006-01-11 04:09:40 +00:00
Roger Dingledine
d1baa0c4a6 we were leaking 3KB every time the entry guards changed, every time
the controller called saveconf, and every 20 minutes.


svn:r5788
2006-01-11 03:20:53 +00:00
Roger Dingledine
8f271f2f5a we changed the name of AccountingBytesReadInInterval
change its state file description too


svn:r5785
2006-01-10 23:26:59 +00:00
Roger Dingledine
7d1f675c85 entry nodes are now entry guards.
this is our last easy chance for a wholesale change. heave ho.


svn:r5782
2006-01-10 22:42:44 +00:00
Roger Dingledine
b2d79f278b or_state_validate() needs an extra arg too or it will crash
svn:r5772
2006-01-10 20:38:33 +00:00
Roger Dingledine
f4299f0f44 hack to address bug 238.
needs a better fix, but not for 0.1.1.11.


svn:r5771
2006-01-10 20:27:47 +00:00
Roger Dingledine
f71273c216 fix bug 235
svn:r5768
2006-01-10 20:06:24 +00:00
Nick Mathewson
7fc62029d4 Refuse to use RunAsDaemon when torrc is a relative path. Fixes bug 229.
svn:r5767
2006-01-10 20:00:20 +00:00
Roger Dingledine
f88fa3efc1 helper nodes are dead
svn:r5743
2006-01-07 00:41:50 +00:00
Nick Mathewson
65f76bad4f Add descriptions for state variables; rename AccountingBytesRead{In}Interval; remove extraneous and unused struct member.
svn:r5739
2006-01-06 15:43:03 +00:00
Roger Dingledine
c5a5161fb5 prevent auth dir servers from enabling entry nodes.
svn:r5702
2006-01-02 08:40:58 +00:00
Roger Dingledine
358052416d bugfix: only try to use the EntryNodes config option if it is set.
svn:r5701
2006-01-02 05:14:21 +00:00
Roger Dingledine
ea6ea8ec22 Make UseEntryNodes true by default. Let the fun begin.
svn:r5698
2006-01-02 05:00:03 +00:00
Roger Dingledine
aa604ef2c2 bugfix: only try to parse the TorVersion if there is one.
svn:r5697
2006-01-02 04:58:12 +00:00
Roger Dingledine
839111b85a tolerate a mal-formed or unrecognized tor version in the state file.
svn:r5696
2006-01-02 04:45:18 +00:00
Roger Dingledine
0bd25f5d43 save and validate TorVersion in the state file.
svn:r5694
2006-01-02 04:14:52 +00:00
Roger Dingledine
6c693dbda6 add a TorVersion state string.
not yet set to anything.


svn:r5687
2005-12-31 08:16:07 +00:00
Roger Dingledine
5947388968 Finish implementing config's EntryNodes and StrictEntryNodes option.
The logging is way verbose for now.


svn:r5683
2005-12-31 06:32:57 +00:00
Roger Dingledine
dbd7b97eff helper nodes are dead. long live entry nodes.
(config options EntryNodes and StrictEntryNodes still not
implemented.)


svn:r5673
2005-12-28 09:07:31 +00:00
Roger Dingledine
94bff33357 and compiling would be good too
svn:r5657
2005-12-27 02:48:35 +00:00
Roger Dingledine
370dcbc7ba and some comments
svn:r5656
2005-12-27 02:48:02 +00:00
Roger Dingledine
5807bd0635 make it clearer in the auto-generated config file that you
probably shouldn't be editing this one yourself.


svn:r5655
2005-12-27 02:46:53 +00:00
Peter Palfrader
4bd65f0f98 Keep bandwidth history accross restarts/crashes
svn:r5637
2005-12-23 23:56:42 +00:00
Nick Mathewson
89eded7b17 Add "panic" option to reject all servers not in fingerprint list.
svn:r5601
2005-12-15 21:39:38 +00:00
Nick Mathewson
1af630d32c Bite the bullet and limit all our source lines to 80 characters, the way IBM intended.
svn:r5582
2005-12-14 20:40:40 +00:00
Roger Dingledine
77c0f6d456 a first go at fixing a bug matt edman reported: when he tries
to "setconf log" via the controller, it is friendly and gives
him a log to stdout, even though he didn't ask for one.


svn:r5562
2005-12-11 10:01:21 +00:00
Roger Dingledine
46d563fe00 whenever we hupped or did a controller setconf, we were prepending
another reachableaddresses *:80,*:443 if fascistfirewall was set,
and we were appending another reject *:* regardless.


svn:r5560
2005-12-11 09:18:25 +00:00
Roger Dingledine
a4e1014f4d i think fascistfirewall still has its uses. it's a synonym
for a certain reachableaddresses line, but it's easier to
remember and people already understand it. i think we should
think about undeprecating it.


svn:r5559
2005-12-11 08:59:02 +00:00
Roger Dingledine
58366ffd24 when we changed from log_fn to debug/info/notice/warn/err,
we screwed up the formatting in wild and unpredictable ways.

fix it before it becomes convention to format logs in wild and
unpredictable ways.

still need to do src/common/ someday.


svn:r5551
2005-12-10 09:36:26 +00:00
Roger Dingledine
9b0a40ec78 crank the max line limit down to 150 chars.
svn:r5550
2005-12-10 08:27:01 +00:00
Nick Mathewson
39265dd72e In my private little universe, terminals are still 80 columns. Impose a 160-character-per-line limit; this will creep down.
svn:r5548
2005-12-09 05:37:26 +00:00
Nick Mathewson
95e471c9a6 Normalize whitespace
svn:r5547
2005-12-09 05:22:15 +00:00
Nick Mathewson
33c4445846 For some bizarre reason, MSVC does not implement GCC extensions. Who would have thought?
svn:r5546
2005-12-09 05:20:02 +00:00
Roger Dingledine
a438f2abcd let the user configure a sockslistenaddress on other private IPs
besides 127.x.y.z without complaining.
and give a better message in the log.


svn:r5544
2005-12-09 02:46:46 +00:00
Nick Mathewson
d57029ffe8 Make code to handle "private" alias work when assume_action is set.
svn:r5542
2005-12-08 23:58:23 +00:00
Nick Mathewson
338f23114f Oops. 0.0.0.0/8 and 169.254.0.0/16 are also special.
svn:r5536
2005-12-08 19:58:14 +00:00
Nick Mathewson
1b770817c0 Add private:* as an alias in configuration for policies.
svn:r5534
2005-12-08 19:40:24 +00:00
Nick Mathewson
898968b3ac Warn when binding to a public address for socks. This warning needs to be improved. Also, make options_validate() only warn when an option is changed to a bad value.. (Previously, it warned when an option was bad and any option was changed.)
svn:r5532
2005-12-08 18:56:32 +00:00
Nick Mathewson
f031ee8246 Make clients use CREATE_FAST cells. add an option to disable this.
svn:r5524
2005-12-07 22:09:02 +00:00
Roger Dingledine
5c949fce51 Start obeying our firewall options more rigorously:
- If we can't get to a dirserver directly, try going via Tor.
  - Don't ever try to connect (as a client) to a place our firewall
    options forbid.
  - If we specify a proxy and also firewall options, obey the firewall
    options even when we're using the proxy: some proxies can only proxy
    to certain destinations.


svn:r5431
2005-11-19 10:12:10 +00:00
Roger Dingledine
afb1c79879 Leave options->DirServers alone -- if the user didn't specify any,
just add the default ones directly to the trusted dirserver list.
This fixes a bug where people running controllers would setconf or
the equivalent, and Tor would start yelling at them about setting
their own DirServer lines.


svn:r5418
2005-11-18 02:47:09 +00:00
Roger Dingledine
c4aa9e7941 Add a new config option TestSocks so people can see if their
applications are using socks4, socks4a, socks5-with-ip, or
socks5-with-hostname. This way they don't have to keep mucking
with tcpdump and wondering if something got cached somewhere.


svn:r5399
2005-11-16 23:37:35 +00:00
Roger Dingledine
014c6bfe00 We were refusing to start if you define SocksListenAddress
but define SocksPort to be 0. But this is a standard configuration!
So don't fail.


svn:r5361
2005-11-11 22:41:07 +00:00
Roger Dingledine
c136bbe505 stop discouraging the old *BindAddress config options. we will
just confuse our users when they upgrade.


svn:r5354
2005-11-11 17:04:14 +00:00
Peter Palfrader
43c253958e Tor26's IP has changed to 86.59.21.38
svn:r5350
2005-11-05 20:20:51 +00:00
Nick Mathewson
35f1b7fa26 fix minor memory leak in config
svn:r5318
2005-10-25 18:06:29 +00:00
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
932106f54c Efficiency hack: call tor_fix_source_file late, not early. Add "BUG" domain. Domains are now bitmasks... just in case. Make some err msgs non-general.
svn:r5309
2005-10-25 07:05:03 +00:00
Nick Mathewson
27fcbf87f3 Add a missing struct initializer field
svn:r5264
2005-10-17 23:00:08 +00:00
Roger Dingledine
fd165329b8 start calling it *ListenAddress rather than *BindAddress,
since none of our users know what it means to bind an address or port.


svn:r5260
2005-10-17 03:17:29 +00:00
Nick Mathewson
22c72bd9c5 Add ability to warn when using abbrev mechanism to deprecate option names
svn:r5259
2005-10-17 03:06:00 +00:00
Roger Dingledine
03dcef4c78 start the process of reducing clutter in server logs
svn:r5253
2005-10-17 00:35:53 +00:00
Nick Mathewson
905ef987e2 Make --hash-password not craash on exit.
svn:r5243
2005-10-12 19:08:48 +00:00
Nick Mathewson
9a1d204318 Avoid warning on end-of-function
svn:r5242
2005-10-12 18:43:03 +00:00
Nick Mathewson
fd9bfef13b Funny. I could have sworn it compiled this morning when I checked it in.
svn:r5239
2005-10-12 17:16:25 +00:00
Nick Mathewson
a7ca56b537 More work towards a sane digest-based liveness testing.
svn:r5238
2005-10-12 13:49:13 +00:00
Nick Mathewson
2f49e058d0 Now that directory admins assure me they have adjested teir configs, it is safe to make authorities be non-versioning, non-naming by default.
svn:r5230
2005-10-08 05:47:58 +00:00
Roger Dingledine
0e5b6a84eb without braces, what will hold up the code?
svn:r5209
2005-10-06 05:08:00 +00:00
Nick Mathewson
ba24193ab5 Make doxygen marginally happier
svn:r5208
2005-10-06 04:33:40 +00:00
Nick Mathewson
ba67d14d40 On sighup, if usehelpernodes changed to 1, use new circuits.
svn:r5203
2005-10-05 23:02:40 +00:00
Nick Mathewson
2d203fdcf3 link nicknames to trusted directory servers; log these nicknames when mentioning servers; also, when we get a naming conflict; log which nicknames or keys are supposed to bind.
svn:r5184
2005-10-04 21:21:09 +00:00
Nick Mathewson
e4a6a03249 switch semantics of authdirinvalid/reject
svn:r5182
2005-10-04 19:52:58 +00:00
Nick Mathewson
80f2e10228 Stop leaking or_state_t on shutdown.
svn:r5171
2005-09-30 21:16:47 +00:00
Nick Mathewson
92451f74a8 Reformat inconsistent function declarations.
svn:r5160
2005-09-30 01:09:52 +00:00
Nick Mathewson
ebf6476e8e Provide dire warnings to any users who set DirServer; move it out of torrc.sample and into torrc.complete.
svn:r5132
2005-09-23 20:44:22 +00:00
Nick Mathewson
20b9111266 Implement new version handling code.
svn:r5100
2005-09-21 00:41:06 +00:00
Nick Mathewson
e72e76cad6 Make authdirs smarter. Reject/invalidate by key and IP. Remember that not every authdir has to be a naming authdir.
svn:r5074
2005-09-15 14:39:05 +00:00
Nick Mathewson
922cee3d0c Clean up a few warnings that make gcc twig out a bit.
svn:r5062
2005-09-14 20:59:25 +00:00
Nick Mathewson
7c6679d8dc Add new config.c function to set options that can fail, and roll back if they do. This should solve the setconf-an-impossible-port bug.
svn:r5046
2005-09-14 02:36:29 +00:00
Roger Dingledine
93be26a74a stop the call duplication inside config_assign()
svn:r5045
2005-09-14 02:35:06 +00:00
Roger Dingledine
10893e7254 simplify
svn:r5043
2005-09-14 02:18:28 +00:00
Roger Dingledine
c78aafe4b5 and take the bang out
svn:r5042
2005-09-14 02:13:35 +00:00
Roger Dingledine
62fe24c40c ok, ok, csv's get replaced even when we assign them from the torrc.
svn:r5041
2005-09-14 02:12:29 +00:00
Roger Dingledine
1f930a9a70 checkpoint: clean up and document the three ways to call config_assign()
and reduce code duplication in config_free() and option_is_same().


svn:r5040
2005-09-14 02:07:35 +00:00
Roger Dingledine
cfe34812eb bugfix: if you gave tor an odd number of command-line arguments,
we were silently ignoring the last one. now we complain and fail.


svn:r4988
2005-09-10 04:40:27 +00:00
Roger Dingledine
9b54cd349d break out a new function config_assign_value() that just assigns the
value it's given, and doesn't do any of their weird clearing or resetting
stuff. use that when we're trying to clear or reset values.


svn:r4984
2005-09-10 02:42:32 +00:00
Roger Dingledine
cfa321374d reject ports 465 and 587 by default now too
svn:r4974
2005-09-09 22:46:43 +00:00
Nick Mathewson
047e105daf Fix a bug in config_dump: we want to run options_validate on the defaults, not (again, uselessly) on the configuration. This was introduced when we made the config code more generic.
svn:r4965
2005-09-09 20:08:26 +00:00
Roger Dingledine
587b513ec0 remove obsolete kludge
svn:r4953
2005-09-08 21:36:27 +00:00
Roger Dingledine
4633b271f9 fix spacing
svn:r4932
2005-09-08 18:15:57 +00:00
Roger Dingledine
dbeb8e7863 it really does help with the functions end.
svn:r4927
2005-09-08 06:59:58 +00:00
Roger Dingledine
74fb086210 if you give a config option in the torrc or the commandline with no
value, and reset is false, then it clears it entirely.


svn:r4926
2005-09-08 06:55:53 +00:00
Nick Mathewson
8f37357193 Make GCC v4 happy with heavy warnings enabled.
svn:r4922
2005-09-08 06:37:50 +00:00
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