mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-23 22:47:12 +01:00
Add a new config option TestVia, that lets you specify preferred middle
hops to use for testing circuits. Perhaps this will let me debug the reachability problem better. svn:r6581
This commit is contained in:
parent
1f585987c4
commit
889b8d5bac
3 changed files with 8 additions and 2 deletions
|
@ -1481,6 +1481,7 @@ choose_good_middle_server(uint8_t purpose,
|
|||
routerinfo_t *r, *choice;
|
||||
crypt_path_t *cpath;
|
||||
smartlist_t *excluded;
|
||||
or_options_t *options = get_options();
|
||||
tor_assert(_CIRCUIT_PURPOSE_MIN <= purpose &&
|
||||
purpose <= _CIRCUIT_PURPOSE_MAX);
|
||||
|
||||
|
@ -1501,9 +1502,10 @@ choose_good_middle_server(uint8_t purpose,
|
|||
}
|
||||
}
|
||||
choice = router_choose_random_node(
|
||||
NULL, get_options()->ExcludeNodes, excluded,
|
||||
purpose == CIRCUIT_PURPOSE_TESTING ? options->TestVia : NULL,
|
||||
options->ExcludeNodes, excluded,
|
||||
state->need_uptime, state->need_capacity, 0,
|
||||
get_options()->_AllowInvalid & ALLOW_INVALID_MIDDLE, 0);
|
||||
options->_AllowInvalid & ALLOW_INVALID_MIDDLE, 0);
|
||||
smartlist_free(excluded);
|
||||
return choice;
|
||||
}
|
||||
|
|
|
@ -233,6 +233,7 @@ static config_var_t _option_vars[] = {
|
|||
VAR("StrictExitNodes", BOOL, StrictExitNodes, "0"),
|
||||
VAR("SysLog", LINELIST_S, OldLogOptions, NULL),
|
||||
VAR("TestSocks", BOOL, TestSocks, "0"),
|
||||
VAR("TestVia", STRING, TestVia, NULL),
|
||||
VAR("TrackHostExits", CSV, TrackHostExits, NULL),
|
||||
VAR("TrackHostExitsExpire",INTERVAL, TrackHostExitsExpire, "30 minutes"),
|
||||
OBSOLETE("TrafficShaping"),
|
||||
|
@ -2378,6 +2379,8 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||
return -1;
|
||||
if (check_nickname_list(options->RendNodes, "RendExcludeNodes", msg))
|
||||
return -1;
|
||||
if (check_nickname_list(options->TestVia, "TestVia", msg))
|
||||
return -1;
|
||||
if (check_nickname_list(options->MyFamily, "MyFamily", msg))
|
||||
return -1;
|
||||
for (cl = options->NodeFamilies; cl; cl = cl->next) {
|
||||
|
|
|
@ -1327,6 +1327,7 @@ typedef struct {
|
|||
int NumCpus; /**< How many CPUs should we try to use? */
|
||||
int RunTesting; /**< If true, create testing circuits to measure how well the
|
||||
* other ORs are running. */
|
||||
char *TestVia; /**< When reachability testing, use these as middle hop. */
|
||||
config_line_t *RendConfigLines; /**< List of configuration lines
|
||||
* for rendezvous services. */
|
||||
char *ContactInfo; /**< Contact info to be published in the directory */
|
||||
|
|
Loading…
Add table
Reference in a new issue