aboutsummaryrefslogtreecommitdiff
path: root/src/torcontrol.cpp
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2020-09-14 14:30:15 +0200
committerVasil Dimov <vd@FreeBSD.org>2020-10-09 16:42:50 +0200
commitdcf0cb477699d11afd0ff37c8bfb2b1b4f7f1ee5 (patch)
tree0aa35085ba830cf29850697bf93dc85953a53217 /src/torcontrol.cpp
parent353a3fdaad055eea42a0baf7326bdd591f541170 (diff)
tor: make a TORv3 hidden service instead of TORv2
TORv2 is deprecated [1], thus whenever we create the hidden service ourselves create a TORv3 one instead. [1] https://blog.torproject.org/v2-deprecation-timeline
Diffstat (limited to 'src/torcontrol.cpp')
-rw-r--r--src/torcontrol.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp
index 5d56d1ff89..e25d4ce2b8 100644
--- a/src/torcontrol.cpp
+++ b/src/torcontrol.cpp
@@ -532,8 +532,9 @@ void TorController::auth_cb(TorControlConnection& _conn, const TorControlReply&
}
// Finally - now create the service
- if (private_key.empty()) // No private key, generate one
- private_key = "NEW:RSA1024"; // Explicitly request RSA1024 - see issue #9214
+ if (private_key.empty()) { // No private key, generate one
+ private_key = "NEW:ED25519-V3"; // Explicitly request key type - see issue #9214
+ }
// Request onion service, redirect port.
// Note that the 'virtual' port is always the default port to avoid decloaking nodes using other ports.
_conn.Command(strprintf("ADD_ONION %s Port=%i,127.0.0.1:%i", private_key, Params().GetDefaultPort(), GetListenPort()),
@@ -718,7 +719,7 @@ void TorController::Reconnect()
fs::path TorController::GetPrivateKeyFile()
{
- return GetDataDir() / "onion_private_key";
+ return GetDataDir() / "onion_v3_private_key";
}
void TorController::reconnect_cb(evutil_socket_t fd, short what, void *arg)