Commit Graph

346 Commits

Author SHA1 Message Date
Roger Dingledine
cd1f50d2f0 new config option DirAllowPrivateAddresses for authdirservers.
now by default they refuse router descriptors that have non-IP
or private-IP addresses.


svn:r3321
2005-01-06 21:03:27 +00:00
Nick Mathewson
b4fedc7f14 Stop reversing and re-reversing config lines: keep them in order all the time. Removes needless confusion and fixes bug #50.
svn:r3305
2005-01-05 06:05:37 +00:00
Nick Mathewson
e99f79fa4d Remove broken and undocumented wart where multiple CSV config lines are appended rather than replaced. Resolves bug #49
svn:r3301
2005-01-05 02:51:04 +00:00
Roger Dingledine
e6c1ab2daf post 0.0.9.x, demand that servers declare at least 20000 bytes/s
for bandwidthrate


svn:r3277
2005-01-04 03:46:50 +00:00
Nick Mathewson
4d30e2f4b8 Make sequence of log messages when starting on win32 with no config file more reasonable.
svn:r3275
2005-01-04 02:25:36 +00:00
Roger Dingledine
d7a0f1a629 update print_usage to use new url
svn:r3267
2005-01-03 23:21:32 +00:00
Nick Mathewson
fca7ba9777 Resolve task 42: find where 19-char nicknames were getting truncated when read from certs, and fix it. Also audit use of MAX_NICKNAME_LEN; no other badness found, but some docs/code cleaned up a touch.
svn:r3244
2005-01-03 17:53:20 +00:00
Roger Dingledine
e29d7329b3 ...but only if you're a server
svn:r3233
2004-12-31 21:49:20 +00:00
Roger Dingledine
95f3e6161b require BandwidthRate to be at least 10kB/s
svn:r3232
2004-12-31 21:47:54 +00:00
Roger Dingledine
53105cdae5 when you're loading the rendezvous service keys in options_act(),
don't call it 'reloading'.


svn:r3225
2004-12-24 20:45:45 +00:00
Nick Mathewson
bbc10c2ea1 Make split(..., NULL) split on horizontal space; fix bug with tabs in config file.
svn:r3155
2004-12-16 21:10:51 +00:00
Nick Mathewson
1e71b83890 Fix a bug in parsing HashedControlPassword.
svn:r3143
2004-12-13 18:32:29 +00:00
Nick Mathewson
fe6eb34a10 Solaris CC freaks out if isspace and friends get anything other than an int. We learned that, so we casted. But it is also a bad idea to cast a signed char to an int and expect things to work on win32. Now we cast to unsigned char, then to int, then pass to isspace. Ug
svn:r3120
2004-12-08 00:42:50 +00:00
Roger Dingledine
41b809d2aa salvage another 300 bytes per hup
svn:r3106
2004-12-07 09:11:38 +00:00
Roger Dingledine
8f01b643c3 ORPort must be defined if ORBindAddress is defined.
svn:r3100
2004-12-07 06:51:46 +00:00
Roger Dingledine
2ff38fdf83 when recommending new-format log lines, if the upper bound is LOG_ERR,
leave it implicit.


svn:r3097
2004-12-07 06:27:39 +00:00
Nick Mathewson
fc87758ff3 Add function to check that addr_policy_t is okay; change struct addr_policy_t to addr_policy_t.
svn:r3070
2004-12-04 01:14:36 +00:00
Roger Dingledine
f79a7d8d62 while hibernating, hup should not regrow our listeners.
svn:r3067
2004-12-03 23:53:35 +00:00
Roger Dingledine
82f3ebf195 move StatusFetchPeriod to 15 minutes so it's within bounds by default
svn:r3055
2004-12-01 04:27:11 +00:00
Nick Mathewson
b457cfb5eb Spell-check strings and comments
svn:r3052
2004-12-01 03:48:14 +00:00
Roger Dingledine
bde1d5bfb2 do even less inside our signal handler,
just to be extra paranoidly safe


svn:r3050
2004-12-01 02:54:13 +00:00
Roger Dingledine
19ada3f7fa write down our "how to have two defaults for dirfetchperiod"
issue, so we don't forget about it.


svn:r3040
2004-11-30 08:44:19 +00:00
Nick Mathewson
bec7a1c6e8 use shorter minimum key lifetime until 008 is dead
svn:r3035
2004-11-30 06:44:07 +00:00
Nick Mathewson
f19e9b8577 doxygen uses backslashes, not forward-slashes
svn:r3033
2004-11-30 06:17:35 +00:00
Nick Mathewson
e764d00e15 If anybody set DirFetchPostPeriod, give them StatuFetchPeriod instead. Impose minima and maxima for all *Period options; impose even tighter maxima for fetching if we are a caching dirserver. Clip rather than rejecting. arma: are these good?
svn:r3024
2004-11-30 02:23:51 +00:00
Nick Mathewson
7fbd297532 Suggestion from weasel: Make tor --version --version dump the cvs Id of every file.
svn:r3019
2004-11-29 22:25:31 +00:00
Nick Mathewson
6f5dbefa7e Normalize space: add one between every control keyword and control clause.
svn:r3003
2004-11-28 09:05:49 +00:00
Roger Dingledine
7c9a707900 remove emacs droppings, since nick says he doesn't need them anymore
svn:r2989
2004-11-26 04:00:55 +00:00
Roger Dingledine
179ad27b34 call set_max_file_descriptors() after we configure logs, so
it doesn't always do loglevel info logs on windows.


svn:r2987
2004-11-26 03:05:55 +00:00
Nick Mathewson
5fa55c8317 Bugfix: when no units are given, default to seconds or bytes.
svn:r2960
2004-11-23 10:52:27 +00:00
Roger Dingledine
7ed738b34c fix some typos; move to 0.0.9rc1
svn:r2951
2004-11-23 07:37:25 +00:00
Nick Mathewson
fe32c2d141 Fix sign-related warnings
svn:r2942
2004-11-22 22:50:17 +00:00
Nick Mathewson
d4754b334c Compile cleanly on windows; prevent some insane bandwidth cases (e.g., "BandwidthBurst 1000 TB" from occuring.
svn:r2941
2004-11-22 22:24:10 +00:00
Nick Mathewson
956b463dfe Implement weekly/monthly/daily accounting
svn:r2936
2004-11-22 21:56:51 +00:00
Nick Mathewson
805c9e3673 Absolutely never call close_temp_logs while validating log options.
svn:r2934
2004-11-22 20:08:07 +00:00
Roger Dingledine
6a516dfdd3 be more greedy about filling up all relay cells.
this may have some bugs in it still.
and it may end up not being what we want to do.


svn:r2928
2004-11-21 07:43:12 +00:00
Roger Dingledine
a4b1eb5630 allow StrictEntryNode and StrictExitNode to be singular
svn:r2922
2004-11-20 23:16:03 +00:00
Roger Dingledine
dd19cf6ba3 kill -USR2 now moves all logs to loglevel debug
plus fix some typos


svn:r2914
2004-11-20 07:33:55 +00:00
Nick Mathewson
8acaf8e187 Add "MEMUNIT" and "INTERVAL" types to configuration. Also tweak Accounting setup. More docs needed
svn:r2911
2004-11-20 00:37:00 +00:00
Roger Dingledine
4b76fe8036 Break DirFetchPostPeriod into:
- DirFetchPeriod for fetching full directory,
  - StatusFetchPeriod for fetching running-routers,
  - DirPostPeriod for posting server descriptor,
  - RendPostPeriod for posting hidden service descriptors.

Also make sure the hidden service descriptors are at a random
offset from each other, to hinder linkability.


svn:r2889
2004-11-15 09:05:54 +00:00
Roger Dingledine
72dd656b88 a first cut at a print_usage()
svn:r2887
2004-11-15 07:29:27 +00:00
Roger Dingledine
ee591be3f2 fix a bug in configuring accounting in options_act()
svn:r2881
2004-11-15 04:01:31 +00:00
Roger Dingledine
47993ae6fb some fixes so far
svn:r2880
2004-11-15 03:53:03 +00:00
Nick Mathewson
3e6edf20cc Resolve some hibernating-related XXXX009s.
svn:r2875
2004-11-14 22:21:23 +00:00
Nick Mathewson
a732727a2b Add simpler option_is_same, as suggested by arma. Finish implementing SAVECONF
svn:r2868
2004-11-14 20:51:28 +00:00
Nick Mathewson
26973578bf Fix windows whitespace
svn:r2860
2004-11-14 18:21:17 +00:00
Nick Mathewson
aba71028be Add an unreachable return 0.
svn:r2859
2004-11-14 18:20:12 +00:00
Nick Mathewson
ed4fa18699 normalize whitespace
svn:r2839
2004-11-13 23:34:01 +00:00
Nick Mathewson
dc48e7aeed Document remaining configuration options; add a ccheck for redundant authentication mechanisms in options_validate; add TODO items for post-009 hibernation features
svn:r2833
2004-11-13 17:17:04 +00:00
Nick Mathewson
08627d5d87 Track whether descriptor is dirty/uploaded. When any options are set, mark it dirty. Once a minute, regenerate and upload the server descriptor if it is dirty.
svn:r2832
2004-11-13 16:53:48 +00:00
Nick Mathewson
eabcf6618e Write most of the implementation for SAVECONF.
svn:r2820
2004-11-12 20:09:54 +00:00
Nick Mathewson
5109de5626 Rename exit_policy to addr_policy, since it gets used for SOCKS and directory connections too. Make all policies get validated in options_validate, and make SOCKS/directory policies get set in options_act.
svn:r2819
2004-11-12 19:39:13 +00:00
Nick Mathewson
60880cda84 Resolve a bunch of FIXME items; mark a lot more for attention; ask for clarification on some. Turn all XXXX008 ("showstopper for 0.0.8 release") items into XXXX009 or XXXX, since plainly they were not showstoppers for 0.0.8. Add/clean some docs.
svn:r2808
2004-11-12 16:39:03 +00:00
Nick Mathewson
9c22b428bf Clarify a warning about /.tor
svn:r2794
2004-11-10 14:29:18 +00:00
Nick Mathewson
1013abd27f Validate log options during options_validate(). Reject unrecognized log types like "Log notice magic-twanger". Also, make sure User and Group stay the same, and do not crash when somebody tries to change PidFile to NULL.
svn:r2778
2004-11-10 03:40:30 +00:00
Roger Dingledine
af9683501c make abbreviations case-insensitive (thanks weasel)
svn:r2773
2004-11-10 03:22:49 +00:00
Roger Dingledine
d9a74cd0af make it more obvious that we have just told them their new torrc log line.
svn:r2772
2004-11-10 03:08:03 +00:00
Roger Dingledine
7528e8b86a don't check permissions on our datadirectory until we switch uid/gid
svn:r2759
2004-11-10 00:11:37 +00:00
Nick Mathewson
5a5be93f80 Normalize whitespace; add a "tell me about all the unnormalized whitespace" target; fix a braino in dirserv.c
svn:r2758
2004-11-09 20:04:00 +00:00
Nick Mathewson
cd753df7bf Resolve many XXXs and all DOCDOCs
svn:r2755
2004-11-09 18:22:17 +00:00
Nick Mathewson
b960574556 Change interface to config_trial_assign even more; have it use get_options() instead
svn:r2754
2004-11-09 17:15:17 +00:00
Roger Dingledine
3235c72f6c control event logs include loglevel notice
svn:r2746
2004-11-09 10:32:02 +00:00
Roger Dingledine
a972589bdb allow BandwidthRate and Burst to be abbrevs in the torrc too
svn:r2744
2004-11-09 10:30:06 +00:00
Roger Dingledine
6a504efdd3 mark_logs_temp() before init'ing new ones.
we were seeing double, triple, etc each time we setconf'ed.


svn:r2738
2004-11-09 08:01:39 +00:00
Roger Dingledine
3901473bf3 change the interface to config_trial_assign()
svn:r2737
2004-11-09 07:55:48 +00:00
Roger Dingledine
2d18d9eefb when you try a new set of options, and you like them, make sure they stick
svn:r2736
2004-11-09 07:45:24 +00:00
Roger Dingledine
cad26b343d once normalized, DataDirectory is always defined
svn:r2734
2004-11-09 07:20:21 +00:00
Nick Mathewson
180e0a9326 Make check_private_dir trimodal (check/create/ignore), not bimodal (create/ignore).
svn:r2733
2004-11-09 07:12:31 +00:00
Roger Dingledine
6521c2ce51 Stop using the wrong DataDirectory when we're validating.
Also validate/normalize the DataDirectory better.


svn:r2732
2004-11-09 07:05:53 +00:00
Nick Mathewson
48a0b6c476 Separate is-recognized-option from get-option-value, since NULL is ambiguous and returning "" misrepresents.
svn:r2731
2004-11-09 06:40:32 +00:00
Roger Dingledine
677124fd0c During options_dup, don't copy LINELIST_S or OBSOLETE options.
And recognize obsolete options now in config_get_assigned_option().


svn:r2729
2004-11-09 06:18:17 +00:00
Roger Dingledine
94b9525f6e EntryNodess is not the plural of EntryNodes
svn:r2728
2004-11-09 06:09:06 +00:00
Roger Dingledine
3c6b6a53a9 and another
svn:r2727
2004-11-09 06:03:20 +00:00
Roger Dingledine
5c2278aea8 fix some dereferences
svn:r2726
2004-11-09 05:59:22 +00:00
Roger Dingledine
ef6bdd6c1e make datadirectory work again
svn:r2724
2004-11-09 05:35:49 +00:00
Nick Mathewson
2677395aaf Normalize DataDirectory in options_validate, making SIGHUP survivable.
svn:r2722
2004-11-09 05:26:49 +00:00
Nick Mathewson
a5903b737a Document accounting
svn:r2721
2004-11-09 05:18:15 +00:00
Nick Mathewson
929b172955 Stop DataDirectory from changing; also stop using new as an identifier?
svn:r2717
2004-11-09 04:46:24 +00:00
Roger Dingledine
90b47172bd Make an options_act() where we do all the things a new options set
needs.
Still needs more work.


svn:r2716
2004-11-09 04:28:18 +00:00
Roger Dingledine
3805221262 stop breaking the get_options() abstraction in config.c
svn:r2715
2004-11-09 02:12:55 +00:00
Roger Dingledine
8c7b2ff7ed various fixes
svn:r2712
2004-11-09 01:24:10 +00:00
Nick Mathewson
cb5de85585 Separate validate from activate. Document undocumented stuff in config.c.
svn:r2711
2004-11-08 23:12:40 +00:00
Nick Mathewson
f9c85c4d1c Make set-option functions distinguish between bad keys and bad values, in case the caller cares
svn:r2707
2004-11-07 22:59:30 +00:00
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
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
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
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
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
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
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
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