mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Add TestingDirAuthVoteGuard option for specifying relays to vote Guard on.
Addresses ticket 9206.
This commit is contained in:
parent
a6b4934037
commit
fab8fd2c18
6
changes/bug9206
Normal file
6
changes/bug9206
Normal file
@ -0,0 +1,6 @@
|
||||
o Minor features (testing):
|
||||
|
||||
- When bootstrapping a test network, few relays get the Guard
|
||||
flag. There is now a new option, TestingDirAuthVoteGuard, which
|
||||
can be used to specify a set of relays which should be voted
|
||||
Guard regardless of uptime or bandwidth. Addresses ticket 9206.
|
@ -2141,6 +2141,15 @@ The following options are used for running a testing Tor network.
|
||||
Try this often to download a v3 authority certificate before giving up.
|
||||
Changing this requires that **TestingTorNetwork** is set. (Default: 8)
|
||||
|
||||
**TestingDirAuthVoteGuard** __node__,__node__,__...__::
|
||||
A list of identity fingerprints, nicknames, country codes and
|
||||
address patterns of nodes to vote Guard for regardless of their
|
||||
uptime and bandwidth. See the **ExcludeNodes** option for more
|
||||
information on how to specify nodes.
|
||||
+
|
||||
In order for this option to have any effect, **TestingTorNetwork**
|
||||
has to be set.
|
||||
|
||||
SIGNALS
|
||||
-------
|
||||
|
||||
|
@ -458,6 +458,7 @@ static config_var_t option_vars_[] = {
|
||||
V(TestingDescriptorMaxDownloadTries, UINT, "8"),
|
||||
V(TestingMicrodescMaxDownloadTries, UINT, "8"),
|
||||
V(TestingCertMaxDownloadTries, UINT, "8"),
|
||||
V(TestingDirAuthVoteGuard, ROUTERSET, NULL),
|
||||
VAR("___UsingTestNetworkDefaults", BOOL, UsingTestNetworkDefaults_, "0"),
|
||||
|
||||
{ NULL, CONFIG_TYPE_OBSOLETE, 0, NULL }
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "router.h"
|
||||
#include "routerlist.h"
|
||||
#include "routerparse.h"
|
||||
#include "routerset.h"
|
||||
|
||||
/**
|
||||
* \file dirserv.c
|
||||
@ -2705,6 +2706,11 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs,
|
||||
} else {
|
||||
rs->is_possible_guard = 0;
|
||||
}
|
||||
if (options->TestingTorNetwork &&
|
||||
routerset_contains_routerstatus(options->TestingDirAuthVoteGuard,
|
||||
rs, 0)) {
|
||||
rs->is_possible_guard = 1;
|
||||
}
|
||||
|
||||
rs->is_bad_directory = listbaddirs && node->is_bad_directory;
|
||||
rs->is_bad_exit = listbadexits && node->is_bad_exit;
|
||||
|
@ -4065,6 +4065,10 @@ typedef struct {
|
||||
/** Minimum value for the Fast flag threshold on testing networks. */
|
||||
uint64_t TestingMinFastFlagThreshold;
|
||||
|
||||
/** Relays in a testing network which should be voted Guard
|
||||
* regardless of uptime and bandwidth. */
|
||||
routerset_t *TestingDirAuthVoteGuard;
|
||||
|
||||
/** If true, and we have GeoIP data, and we're a bridge, keep a per-country
|
||||
* count of how many client addresses have contacted us so that we can help
|
||||
* the bridge authority guess which countries have blocked access to us. */
|
||||
|
Loading…
Reference in New Issue
Block a user