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);
}
}
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;
}
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"),
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) {
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 */