summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-04-30 17:46:13 +0000
committerNick Mathewson <nickm@torproject.org>2007-04-30 17:46:13 +0000
commit18ba9fe81f159c3df0bbdcff4fe0efbcf3a0db56 (patch)
tree7e48242fd20edc47a1790b562c7a93c6c90072d8 /src/or/config.c
parent6875559c4969462d4f0969e6841c3badf9352de0 (diff)
downloadtor-18ba9fe81f159c3df0bbdcff4fe0efbcf3a0db56.tar.gz
tor-18ba9fe81f159c3df0bbdcff4fe0efbcf3a0db56.zip
r12580@catbus: nickm | 2007-04-30 13:29:05 -0400
Initial version of patch from Karsten Loesing: Add an HSAuthorityRecordStats option to track statistics of overall hidden service usage without logging information that would be useful to an attacker. svn:r10067
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 3a11b7d787..82b684eedb 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -174,6 +174,7 @@ static config_var_t _option_vars[] = {
VAR("HiddenServiceOptions",LINELIST_V, RendConfigLines, NULL),
VAR("HiddenServicePort", LINELIST_S, RendConfigLines, NULL),
VAR("HSAuthoritativeDir", BOOL, HSAuthoritativeDir, "0"),
+ VAR("HSAuthorityRecordStats",BOOL, HSAuthorityRecordStats,"0"),
VAR("HttpProxy", STRING, HttpProxy, NULL),
VAR("HttpProxyAuthenticator",STRING, HttpProxyAuthenticator,NULL),
VAR("HttpsProxy", STRING, HttpsProxy, NULL),
@@ -2497,6 +2498,10 @@ options_validate(or_options_t *old_options, or_options_t *options,
if (options->AuthoritativeDir && options->ClientOnly)
REJECT("Running as authoritative directory, but ClientOnly also set.");
+ if (options->HSAuthorityRecordStats && !options->HSAuthoritativeDir)
+ REJECT("HSAuthorityRecordStats is set but we're not running as "
+ "a hidden service authority.");
+
if (options->ConnLimit <= 0) {
r = tor_snprintf(buf, sizeof(buf),
"ConnLimit must be greater than 0, but was set to %d",