Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mike Perry
Tor
Commits
40bcab1f
Commit
40bcab1f
authored
Sep 15, 2009
by
Roger Dingledine
Browse files
ConsensusParams config option lists key=value params
finishes the authority-operator interface side of proposal 167.
parent
56c6d785
Changes
4
Hide whitespace changes
Inline
Side-by-side
doc/tor.1.in
View file @
40bcab1f
.TH TOR 1 "
August
2009" "TOR"
.TH TOR 1 "
September
2009" "TOR"
.SH NAME
tor \- The second-generation onion router
.SH SYNOPSIS
...
...
@@ -1243,6 +1243,11 @@ When this is set then
\fBVersioningAuthoritativeDirectory\fP should be set too.
.LP
.TP
\fBConsensusParams \fR\fISTRING\fP
STRING is a space-separated list of key=value pairs that Tor will
include in the "params" line of its networkstatus vote.
.LP
.TP
\fBDirAllowPrivateAddresses \fR\fB0\fR|\fB1\fR\fP
If set to 1, Tor will accept router descriptors with arbitrary "Address"
elements. Otherwise, if the address is not an IP address or is a private
...
...
src/or/config.c
View file @
40bcab1f
...
...
@@ -168,6 +168,7 @@ static config_var_t _option_vars[] = {
V
(
CircuitIdleTimeout
,
INTERVAL
,
"1 hour"
),
V
(
ClientDNSRejectInternalAddresses
,
BOOL
,
"1"
),
V
(
ClientOnly
,
BOOL
,
"0"
),
V
(
ConsensusParams
,
STRING
,
NULL
),
V
(
ConnLimit
,
UINT
,
"1000"
),
V
(
ConstrainedSockets
,
BOOL
,
"0"
),
V
(
ConstrainedSockSize
,
MEMUNIT
,
"8192"
),
...
...
src/or/dirserv.c
View file @
40bcab1f
...
...
@@ -2553,6 +2553,13 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_env_t *private_key,
}
smartlist_sort_strings
(
v3_out
->
known_flags
);
if
(
options
->
ConsensusParams
)
{
v3_out
->
net_params
=
smartlist_create
();
smartlist_split_string
(
v3_out
->
net_params
,
options
->
ConsensusParams
,
NULL
,
0
,
0
);
smartlist_sort_strings
(
v3_out
->
net_params
);
}
voter
=
tor_malloc_zero
(
sizeof
(
networkstatus_voter_info_t
));
voter
->
nickname
=
tor_strdup
(
options
->
Nickname
);
memcpy
(
voter
->
identity_digest
,
identity_digest
,
DIGEST_LEN
);
...
...
src/or/or.h
View file @
40bcab1f
...
...
@@ -2587,6 +2587,10 @@ typedef struct {
/** Location of bandwidth measurement file */
char
*
V3BandwidthsFile
;
/** Authority only: key=value pairs that we add to our networkstatus
* consensus vote on the 'params' line. */
char
*
ConsensusParams
;
/** The length of time that we think an initial consensus should be fresh.
* Only altered on testing networks. */
int
TestingV3AuthInitialVotingInterval
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment