summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2018-10-23 21:02:31 +0000
committerGeorge Kadianakis <desnacked@riseup.net>2019-01-02 15:25:55 +0200
commit8ad497bb578b13c66489843905764a60545e6388 (patch)
treed0ec9e5259c5beb6d882f461f5506c83df009018 /src/app
parenta336d816a68e5eaddd9d80f7179699274b367a1d (diff)
downloadtor-8ad497bb578b13c66489843905764a60545e6388.tar.gz
tor-8ad497bb578b13c66489843905764a60545e6388.zip
Config option to specify specific MiddleNodes.
Hope is this will make it easier to test on the live tor network. Does not need to be merged if we don't want to, but will come in handy for researchers. Co-authored-by: George Kadianakis <desnacked@riseup.net>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/config/config.c6
-rw-r--r--src/app/config/or_options_st.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 32b487dd24..728b7ff65f 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -418,6 +418,10 @@ static config_var_t option_vars_[] = {
V(ExcludeExitNodes, ROUTERSET, NULL),
OBSOLETE("ExcludeSingleHopRelays"),
V(ExitNodes, ROUTERSET, NULL),
+ /* Researchers need a way to tell their clients to use specific
+ * middles that they also control, to allow safe live-network
+ * experimentation with new padding machines. */
+ V(MiddleNodes, ROUTERSET, NULL),
V(ExitPolicy, LINELIST, NULL),
V(ExitPolicyRejectPrivate, BOOL, "1"),
V(ExitPolicyRejectLocalInterfaces, BOOL, "0"),
@@ -1690,6 +1694,7 @@ options_need_geoip_info(const or_options_t *options, const char **reason_out)
int routerset_usage =
routerset_needs_geoip(options->EntryNodes) ||
routerset_needs_geoip(options->ExitNodes) ||
+ routerset_needs_geoip(options->MiddleNodes) ||
routerset_needs_geoip(options->ExcludeExitNodes) ||
routerset_needs_geoip(options->ExcludeNodes) ||
routerset_needs_geoip(options->HSLayer2Nodes) ||
@@ -2129,6 +2134,7 @@ options_act(const or_options_t *old_options)
options->HSLayer2Nodes) ||
!routerset_equal(old_options->HSLayer3Nodes,
options->HSLayer3Nodes) ||
+ !routerset_equal(old_options->MiddleNodes, options->MiddleNodes) ||
options->StrictNodes != old_options->StrictNodes) {
log_info(LD_CIRC,
"Changed to using entry guards or bridges, or changed "
diff --git a/src/app/config/or_options_st.h b/src/app/config/or_options_st.h
index c2bc1079a5..63a17c9771 100644
--- a/src/app/config/or_options_st.h
+++ b/src/app/config/or_options_st.h
@@ -72,6 +72,9 @@ struct or_options_t {
routerset_t *ExitNodes; /**< Structure containing nicknames, digests,
* country codes and IP address patterns of ORs to
* consider as exits. */
+ routerset_t *MiddleNodes; /**< Structure containing nicknames, digests,
+ * country codes and IP address patterns of ORs to
+ * consider as middles. */
routerset_t *EntryNodes;/**< Structure containing nicknames, digests,
* country codes and IP address patterns of ORs to
* consider as entry points. */