summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-11-13 10:48:15 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-06 14:31:20 -0500
commit35efce1f3f517871aaa19d60976a9abb3a67bede (patch)
tree13560f7d67e4df1e4011f6f08ff42e371ed7f0a9 /src/or/config.c
parent5c813f6ca1d6e385cfad5219108f8ac00677cf35 (diff)
downloadtor-35efce1f3f517871aaa19d60976a9abb3a67bede.tar.gz
tor-35efce1f3f517871aaa19d60976a9abb3a67bede.zip
Add an ExitRelay option to override ExitPolicy
If we're not a relay, we ignore it. If it's set to 1, we obey ExitPolicy. If it's set to 0, we force ExitPolicy to 'reject *:*' And if it's set to auto, then we warn the user if they're running an exit, and tell them how they can stop running an exit if they didn't mean to do that. Fixes ticket 10067
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 4b8c6834e9..fd60d135ad 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -63,7 +63,6 @@ static config_abbrev_t option_abbrevs_[] = {
PLURAL(AuthDirBadExitCC),
PLURAL(AuthDirInvalidCC),
PLURAL(AuthDirRejectCC),
- PLURAL(ExitNode),
PLURAL(EntryNode),
PLURAL(ExcludeNode),
PLURAL(FirewallPort),
@@ -227,6 +226,7 @@ static config_var_t option_vars_[] = {
V(ExitPolicyRejectPrivate, BOOL, "1"),
V(ExitPortStatistics, BOOL, "0"),
V(ExtendAllowPrivateAddresses, BOOL, "0"),
+ V(ExitRelay, AUTOBOOL, "auto"),
VPORT(ExtORPort, LINELIST, NULL),
V(ExtORPortCookieAuthFile, STRING, NULL),
V(ExtORPortCookieAuthFileGroupReadable, BOOL, "0"),
@@ -3797,6 +3797,7 @@ options_transition_affects_descriptor(const or_options_t *old_options,
!opt_streq(old_options->Nickname,new_options->Nickname) ||
!opt_streq(old_options->Address,new_options->Address) ||
!config_lines_eq(old_options->ExitPolicy,new_options->ExitPolicy) ||
+ old_options->ExitRelay != new_options->ExitRelay ||
old_options->ExitPolicyRejectPrivate !=
new_options->ExitPolicyRejectPrivate ||
old_options->IPv6Exit != new_options->IPv6Exit ||