supported at the moment. Default value is set to "auto" meaning the
consensus is used to decide unless set. (Default: auto)
+[[ConfluxClientUX]] **ConfluxClientUX** **throughput**|**latency**|**throughput_lowmem**|**latency_lowmem**::
+ This option configures the user experience that the client requests from
+ the exit, for data that the exit sends to the client. The default is
+ "throughput", which maximizes throughput. "Latency" will tell the exit to
+ only use the circuit with lower latency for all data. The lowmem versions
+ minimize queue usage memory at the client. (Default: "throughput")
+
[[ConnLimit]] **ConnLimit** __NUM__::
The minimum number of file descriptors that must be available to the Tor
process before it will start. Tor will ask the OS for as many file
#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"
V(ClientUseIPv6, BOOL, "0"),
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"),
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;
* circuits which excludes onion service traffic. */
int ConfluxEnabled;
+ /** Has the UX integer value that the client will request from the exit. */
+ char *ConfluxClientUX_option;
+ int ConfluxClientUX;
+
/** The length of time that we think a consensus should be fresh. */
int V3AuthVotingInterval;
/** The length of time we think it will take to distribute votes. */
#include "feature/nodelist/nodelist.h"
#include "feature/client/bridges.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
return exit;
}
+/**
+ * Return the currently configured client UX.
+ */
+static uint8_t
+get_client_ux(void)
+{
+#ifdef TOR_UNIT_TESTS
+ return DEFAULT_CLIENT_UX;
+#else
+ const or_options_t *opt = get_options();
+ tor_assert(opt);
+ (void)DEFAULT_CLIENT_UX;
+
+ /* Return the UX */
+ return opt->ConfluxClientUX;
+#endif
+}
+
/** Return true iff the given conflux object is allowed to launch a new leg. If
* the cfx object is NULL, then it is always allowed to launch a new leg. */
static bool
// arti-relay could (if resumption seems worthwhile; it may not be worth the
// memory storage there, either).
- /* We have a circuit, create the new leg and attach it to the set.
- * TODO-329-TUNING: Should we make a torrc option to request min latency? */
+ /* We have a circuit, create the new leg and attach it to the set. */
leg_t *leg = leg_new(TO_CIRCUIT(circ),
conflux_cell_new_link(nonce,
last_seq_sent, last_seq_recv,
- DEFAULT_CLIENT_UX));
+ get_client_ux()));
/* Increase the retry count for this conflux object as in this nonce. */
unlinked->cfx->num_leg_launch++;