summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-01-20 05:54:15 +0000
committerRoger Dingledine <arma@torproject.org>2008-01-20 05:54:15 +0000
commitff62154ba3cb79b4b38f937552fdced04d2d950d (patch)
tree537dc1c42f159314af9e97a848bffab12840a3e9 /src/or/config.c
parenta1f2817307ee2d4b4754db1d76f96f8019f5e857 (diff)
downloadtor-ff62154ba3cb79b4b38f937552fdced04d2d950d.tar.gz
tor-ff62154ba3cb79b4b38f937552fdced04d2d950d.zip
New config options WarnPlaintextPorts and RejectPlaintextPorts so
Tor can warn and/or refuse connections to ports commonly used with vulnerable-plaintext protocols. We still need to figure out some good defaults for them. svn:r13198
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 18264a4c4e..39ad4be4bb 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -253,6 +253,7 @@ static config_var_t _option_vars[] = {
V(RecommendedClientVersions, LINELIST, NULL),
V(RecommendedServerVersions, LINELIST, NULL),
V(RedirectExit, LINELIST, NULL),
+ V(RejectPlaintextPorts, CSV, ""),
V(RelayBandwidthBurst, MEMUNIT, "0"),
V(RelayBandwidthRate, MEMUNIT, "0"),
V(RendExcludeNodes, STRING, NULL),
@@ -300,6 +301,7 @@ static config_var_t _option_vars[] = {
V(V3AuthNIntervalsValid, UINT, "3"),
VAR("VersioningAuthoritativeDirectory",BOOL,VersioningAuthoritativeDir, "0"),
V(VirtualAddrNetwork, STRING, "127.192.0.0/10"),
+ V(WarnPlaintextPorts, CSV, "23,109,110,143"),
VAR("__AllDirActionsPrivate", BOOL, AllDirActionsPrivate, "0"),
VAR("__DisablePredictedCircuits",BOOL,DisablePredictedCircuits, "0"),
VAR("__LeaveStreamsUnattached",BOOL, LeaveStreamsUnattached, "0"),
@@ -2898,6 +2900,14 @@ options_validate(or_options_t *old_options, or_options_t *options,
if (validate_ports_csv(options->LongLivedPorts, "LongLivedPorts", msg) < 0)
return -1;
+ if (validate_ports_csv(options->RejectPlaintextPorts,
+ "RejectPlaintextPorts", msg) < 0)
+ return -1;
+
+ if (validate_ports_csv(options->WarnPlaintextPorts,
+ "WarnPlaintextPorts", msg) < 0)
+ return -1;
+
if (options->FascistFirewall && !options->ReachableAddresses) {
if (options->FirewallPorts && smartlist_len(options->FirewallPorts)) {
/* We already have firewall ports set, so migrate them to