Bitcoin ABC 0.30.6
P2P Digital Currency
|
Controller that connects to Tor control socket, authenticate, then create and maintain an ephemeral onion service. More...
Public Member Functions | |
TorController (struct event_base *base, const std::string &tor_control_center, const CService &target) | |
~TorController () | |
fs::path | GetPrivateKeyFile () |
Get name fo file to store private key in. More... | |
void | Reconnect () |
Reconnect, after getting disconnected. More... | |
Private Member Functions | |
void | add_onion_cb (TorControlConnection &conn, const TorControlReply &reply) |
Callback for ADD_ONION result. More... | |
void | auth_cb (TorControlConnection &conn, const TorControlReply &reply) |
Callback for AUTHENTICATE result. More... | |
void | authchallenge_cb (TorControlConnection &conn, const TorControlReply &reply) |
Callback for AUTHCHALLENGE result. More... | |
void | protocolinfo_cb (TorControlConnection &conn, const TorControlReply &reply) |
Callback for PROTOCOLINFO result. More... | |
void | connected_cb (TorControlConnection &conn) |
Callback after successful connection. More... | |
void | disconnected_cb (TorControlConnection &conn) |
Callback after connection lost or failed connection attempt. More... | |
Static Private Member Functions | |
static void | reconnect_cb (evutil_socket_t fd, short what, void *arg) |
Callback for reconnect timer. More... | |
Private Attributes | |
struct event_base * | base |
const std::string | m_tor_control_center |
TorControlConnection | conn |
std::string | private_key |
std::string | service_id |
bool | reconnect |
struct event * | reconnect_ev |
float | reconnect_timeout |
CService | service |
const CService | m_target |
std::vector< uint8_t > | cookie |
Cookie for SAFECOOKIE auth. More... | |
std::vector< uint8_t > | clientNonce |
ClientNonce for SAFECOOKIE auth. More... | |
Controller that connects to Tor control socket, authenticate, then create and maintain an ephemeral onion service.
Definition at line 416 of file torcontrol.cpp.
TorController::TorController | ( | struct event_base * | base, |
const std::string & | tor_control_center, | ||
const CService & | target | ||
) |
TorController::~TorController | ( | ) |
|
private |
Callback for ADD_ONION result.
Definition at line 503 of file torcontrol.cpp.
|
private |
Callback for AUTHENTICATE result.
Definition at line 546 of file torcontrol.cpp.
|
private |
Callback for AUTHCHALLENGE result.
Definition at line 609 of file torcontrol.cpp.
|
private |
Callback after successful connection.
Definition at line 766 of file torcontrol.cpp.
|
private |
Callback after connection lost or failed connection attempt.
Definition at line 778 of file torcontrol.cpp.
fs::path TorController::GetPrivateKeyFile | ( | ) |
Get name fo file to store private key in.
Definition at line 815 of file torcontrol.cpp.
|
private |
Callback for PROTOCOLINFO result.
Definition at line 658 of file torcontrol.cpp.
void TorController::Reconnect | ( | ) |
Reconnect, after getting disconnected.
Definition at line 800 of file torcontrol.cpp.
|
staticprivate |
Callback for reconnect timer.
Definition at line 819 of file torcontrol.cpp.
|
private |
Definition at line 430 of file torcontrol.cpp.
|
private |
ClientNonce for SAFECOOKIE auth.
Definition at line 443 of file torcontrol.cpp.
|
private |
Definition at line 432 of file torcontrol.cpp.
|
private |
Cookie for SAFECOOKIE auth.
Definition at line 441 of file torcontrol.cpp.
|
private |
Definition at line 439 of file torcontrol.cpp.
|
private |
Definition at line 431 of file torcontrol.cpp.
|
private |
Definition at line 433 of file torcontrol.cpp.
|
private |
Definition at line 435 of file torcontrol.cpp.
|
private |
Definition at line 436 of file torcontrol.cpp.
|
private |
Definition at line 437 of file torcontrol.cpp.
|
private |
Definition at line 438 of file torcontrol.cpp.
|
private |
Definition at line 434 of file torcontrol.cpp.