Skip to content

Commit 3183c85

Browse files
committed
Updating tor
1 parent 70362d5 commit 3183c85

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/torcontrol.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -533,13 +533,13 @@ void TorController::auth_cb(TorControlConnection& _conn, const TorControlReply&
533533
}
534534

535535
// Finally - now create the service
536-
if (private_key.empty()) // No private key, generate one
537-
private_key = "NEW:RSA1024"; // Explicitly request RSA1024 - see issue #9214
538-
// Request hidden service, redirect port.
539-
// Note that the 'virtual' port doesn't have to be the same as our internal port, but this is just a convenient
540-
// choice. TODO; refactor the shutdown sequence some day.
541-
_conn.Command(strprintf("ADD_ONION %s Port=%i,127.0.0.1:%i", private_key, GetListenPort(), GetListenPort()),
542-
boost::bind(&TorController::add_onion_cb, this, _1, _2));
536+
if (private_key.empty()) { // No private key, generate one
537+
private_key = "NEW:ED25519-V3"; // Explicitly request key type - see issue #9214
538+
}
539+
// Request onion service, redirect port.
540+
// Note that the 'virtual' port is always the default port to avoid decloaking nodes using other ports.
541+
_conn.Command(strprintf("ADD_ONION %s Port=%i,%s", private_key, Params().GetDefaultPort(), m_target.ToStringIPPort()),
542+
std::bind(&TorController::add_onion_cb, this, std::placeholders::_1, std::placeholders::_2));
543543
} else {
544544
LogPrintf("tor: Authentication failed\n");
545545
}

0 commit comments

Comments
 (0)