summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-02-08 10:44:58 -0500
committerNick Mathewson <nickm@torproject.org>2021-02-08 10:44:58 -0500
commit576e248bc23c2dee24e92569c84ff06a8b53b13e (patch)
tree682659c9f19bf370c2bdbe5023ad8dd52857ac6b /src/app
parent90add50550f2e101de5383e926d1f2729d8987ce (diff)
parenta634f6b64c485dc2e4ff326e46340dbff2ad49d5 (diff)
downloadtor-576e248bc23c2dee24e92569c84ff06a8b53b13e.tar.gz
tor-576e248bc23c2dee24e92569c84ff06a8b53b13e.zip
Merge remote-tracking branch 'tor-gitlab/mr/278'
Diffstat (limited to 'src/app')
-rw-r--r--src/app/config/config.c13
-rw-r--r--src/app/config/or_options_st.h29
-rw-r--r--src/app/main/subsystem_list.c2
3 files changed, 2 insertions, 42 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 1a1f3a674b..a4dbac4b49 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -428,19 +428,6 @@ static const config_var_t option_vars_[] = {
V(DormantTimeoutDisabledByIdleStreams, BOOL, "1"),
V(DormantOnFirstStartup, BOOL, "0"),
V(DormantCanceledByStartup, BOOL, "0"),
- /* DoS circuit creation options. */
- V(DoSCircuitCreationEnabled, AUTOBOOL, "auto"),
- V(DoSCircuitCreationMinConnections, POSINT, "0"),
- V(DoSCircuitCreationRate, POSINT, "0"),
- V(DoSCircuitCreationBurst, POSINT, "0"),
- V(DoSCircuitCreationDefenseType, INT, "0"),
- V(DoSCircuitCreationDefenseTimePeriod, INTERVAL, "0"),
- /* DoS connection options. */
- V(DoSConnectionEnabled, AUTOBOOL, "auto"),
- V(DoSConnectionMaxConcurrentCount, POSINT, "0"),
- V(DoSConnectionDefenseType, INT, "0"),
- /* DoS single hop client options. */
- V(DoSRefuseSingleHopClientRendezvous, AUTOBOOL, "auto"),
V(DownloadExtraInfo, BOOL, "0"),
V(TestingEnableConnBwEvent, BOOL, "0"),
V(TestingEnableCellStatsEvent, BOOL, "0"),
diff --git a/src/app/config/or_options_st.h b/src/app/config/or_options_st.h
index 4364f145ed..714034b28d 100644
--- a/src/app/config/or_options_st.h
+++ b/src/app/config/or_options_st.h
@@ -1031,35 +1031,6 @@ struct or_options_t {
*/
int DisableSignalHandlers;
- /** Autobool: Is the circuit creation DoS mitigation subsystem enabled? */
- int DoSCircuitCreationEnabled;
- /** Minimum concurrent connection needed from one single address before any
- * defense is used. */
- int DoSCircuitCreationMinConnections;
- /** Circuit rate used to refill the token bucket. */
- int DoSCircuitCreationRate;
- /** Maximum allowed burst of circuits. Reaching that value, the address is
- * detected as malicious and a defense might be used. */
- int DoSCircuitCreationBurst;
- /** When an address is marked as malicious, what defense should be used
- * against it. See the dos_cc_defense_type_t enum. */
- int DoSCircuitCreationDefenseType;
- /** For how much time (in seconds) the defense is applicable for a malicious
- * address. A random time delta is added to the defense time of an address
- * which will be between 1 second and half of this value. */
- int DoSCircuitCreationDefenseTimePeriod;
-
- /** Autobool: Is the DoS connection mitigation subsystem enabled? */
- int DoSConnectionEnabled;
- /** Maximum concurrent connection allowed per address. */
- int DoSConnectionMaxConcurrentCount;
- /** When an address is reaches the maximum count, what defense should be
- * used against it. See the dos_conn_defense_type_t enum. */
- int DoSConnectionDefenseType;
-
- /** Autobool: Do we refuse single hop client rendezvous? */
- int DoSRefuseSingleHopClientRendezvous;
-
/** Interval: how long without activity does it take for a client
* to become dormant?
**/
diff --git a/src/app/main/subsystem_list.c b/src/app/main/subsystem_list.c
index cb79909e69..4b417f57e2 100644
--- a/src/app/main/subsystem_list.c
+++ b/src/app/main/subsystem_list.c
@@ -14,6 +14,7 @@
#include "lib/cc/torint.h"
#include "core/mainloop/mainloop_sys.h"
+#include "core/or/dos_sys.h"
#include "core/or/or_sys.h"
#include "feature/control/btrack_sys.h"
#include "lib/compress/compress_sys.h"
@@ -64,6 +65,7 @@ const subsys_fns_t *tor_subsystems[] = {
&sys_mainloop,
&sys_or,
+ &sys_dos,
&sys_relay,
&sys_hs,