summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorMicah Elizabeth Scott <beth@torproject.org>2023-05-28 19:45:41 -0700
committerMicah Elizabeth Scott <beth@torproject.org>2023-05-28 20:02:03 -0700
commit415c0354b2e495f236ddf8f67accb3cba4249e21 (patch)
tree9d23499ebbb127ea3bd6636c725dcf423c61b483 /src/app
parenta397a92be2032e781479fa4d53a04f9b369ea1ac (diff)
downloadtor-415c0354b2e495f236ddf8f67accb3cba4249e21.tar.gz
tor-415c0354b2e495f236ddf8f67accb3cba4249e21.zip
hs_pow: Add CompiledProofOfWorkHash torrc option
This exposes the new fallback behavior in hashx via a new AUTOBOOL configuration option, available to both clients and services. The default should be fine for nearly everyone, but it might be necessary to enable or disable the compiler manually for diagnostic purposes. Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/config/config.c1
-rw-r--r--src/app/config/or_options_st.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 10090f273d..4a703abaa3 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -380,6 +380,7 @@ static const config_var_t option_vars_[] = {
V(ClientTransportPlugin, LINELIST, NULL),
V(ClientUseIPv6, BOOL, "1"),
V(ClientUseIPv4, BOOL, "1"),
+ V(CompiledProofOfWorkHash, AUTOBOOL, "auto"),
V(ConfluxEnabled, AUTOBOOL, "auto"),
VAR("ConfluxClientUX", STRING, ConfluxClientUX_option,
"throughput"),
diff --git a/src/app/config/or_options_st.h b/src/app/config/or_options_st.h
index c8680bb49e..36b00662b5 100644
--- a/src/app/config/or_options_st.h
+++ b/src/app/config/or_options_st.h
@@ -723,6 +723,11 @@ struct or_options_t {
* accessing this value directly. */
int ClientPreferIPv6DirPort;
+ /** If true, always use the compiled hash implementation. If false, always
+ * the interpreter. Default of "auto" allows a dynamic fallback from
+ * copmiler to interpreter. */
+ int CompiledProofOfWorkHash;
+
/** If true, the tor client will use conflux for its general purpose
* circuits which excludes onion service traffic. */
int ConfluxEnabled;