aboutsummaryrefslogtreecommitdiff
path: root/src/app/config/config.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2023-05-24 11:37:05 -0400
committerDavid Goulet <dgoulet@torproject.org>2023-05-24 11:37:05 -0400
commit9976da93679acc422c174f5e5b5bf890e387f1b1 (patch)
tree98410ddc3c152b3bb4f3c505374dd7fe16a99491 /src/app/config/config.c
parent0781c2968d26fba999a00c3989c10964f492f9dc (diff)
parent032d850a2c48a1d4c767accc50ad92907309e9fc (diff)
downloadtor-9976da93679acc422c174f5e5b5bf890e387f1b1.tar.gz
tor-9976da93679acc422c174f5e5b5bf890e387f1b1.zip
Merge branch 'tor-gitlab/mr/709'
Diffstat (limited to 'src/app/config/config.c')
-rw-r--r--src/app/config/config.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index fff82be1b7..10090f273d 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -77,6 +77,7 @@
#include "core/or/circuitmux_ewma.h"
#include "core/or/circuitstats.h"
#include "core/or/connection_edge.h"
+#include "trunnel/conflux.h"
#include "core/or/dos.h"
#include "core/or/policies.h"
#include "core/or/relay.h"
@@ -380,6 +381,8 @@ static const config_var_t option_vars_[] = {
V(ClientUseIPv6, BOOL, "1"),
V(ClientUseIPv4, BOOL, "1"),
V(ConfluxEnabled, AUTOBOOL, "auto"),
+ VAR("ConfluxClientUX", STRING, ConfluxClientUX_option,
+ "throughput"),
V(ConnLimit, POSINT, "1000"),
V(ConnDirectionStatistics, BOOL, "0"),
V(ConstrainedSockets, BOOL, "0"),
@@ -3545,6 +3548,21 @@ options_validate_cb(const void *old_options_, void *options_, char **msg)
return -1;
}
+ options->ConfluxClientUX = CONFLUX_UX_HIGH_THROUGHPUT;
+ if (options->ConfluxClientUX_option) {
+ if (!strcmp(options->ConfluxClientUX_option, "latency"))
+ options->ConfluxClientUX = CONFLUX_UX_MIN_LATENCY;
+ else if (!strcmp(options->ConfluxClientUX_option, "throughput"))
+ options->ConfluxClientUX = CONFLUX_UX_HIGH_THROUGHPUT;
+ else if (!strcmp(options->ConfluxClientUX_option, "latency_lowmem"))
+ options->ConfluxClientUX = CONFLUX_UX_LOW_MEM_LATENCY;
+ else if (!strcmp(options->ConfluxClientUX_option, "throughput_lowmem"))
+ options->ConfluxClientUX = CONFLUX_UX_LOW_MEM_THROUGHPUT;
+ else
+ REJECT("ConfluxClientUX must be 'latency', 'throughput, "
+ "'latency_lowmem', or 'throughput_lowmem'");
+ }
+
if (options_validate_publish_server(old_options, options, msg) < 0)
return -1;