Changeset View
Changeset View
Standalone View
Standalone View
src/torcontrol.cpp
Show First 20 Lines • Show All 514 Lines • ▼ Show 20 Lines | void TorController::auth_cb(TorControlConnection &_conn, | ||||
if (reply.code == 250) { | if (reply.code == 250) { | ||||
LogPrint(BCLog::TOR, "tor: Authentication successful\n"); | LogPrint(BCLog::TOR, "tor: Authentication successful\n"); | ||||
// Now that we know Tor is running setup the proxy for onion addresses | // Now that we know Tor is running setup the proxy for onion addresses | ||||
// if -onion isn't set to something else. | // if -onion isn't set to something else. | ||||
if (gArgs.GetArg("-onion", "") == "") { | if (gArgs.GetArg("-onion", "") == "") { | ||||
CService resolved(LookupNumeric("127.0.0.1", 9050)); | CService resolved(LookupNumeric("127.0.0.1", 9050)); | ||||
proxyType addrOnion = proxyType(resolved, true); | proxyType addrOnion = proxyType(resolved, true); | ||||
SetProxy(NET_TOR, addrOnion); | SetProxy(NET_ONION, addrOnion); | ||||
SetLimited(NET_TOR, false); | SetLimited(NET_ONION, false); | ||||
} | } | ||||
// Finally - now create the service | // Finally - now create the service | ||||
// No private key, generate one | // No private key, generate one | ||||
if (private_key.empty()) { | if (private_key.empty()) { | ||||
// Explicitly request RSA1024 - see issue #9214 | // Explicitly request RSA1024 - see issue #9214 | ||||
private_key = "NEW:RSA1024"; | private_key = "NEW:RSA1024"; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 281 Lines • Show Last 20 Lines |