Changeset View
Changeset View
Standalone View
Standalone View
src/torcontrol.cpp
// Copyright (c) 2015-2016 The Bitcoin Core developers | // Copyright (c) 2015-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "torcontrol.h" | #include <torcontrol.h> | ||||
#include "crypto/hmac_sha256.h" | |||||
#include "net.h" | |||||
#include "netbase.h" | |||||
#include "util.h" | |||||
#include "utilstrencodings.h" | |||||
#include <cstdlib> | #include <crypto/hmac_sha256.h> | ||||
#include <deque> | #include <net.h> | ||||
#include <set> | #include <netbase.h> | ||||
#include <vector> | #include <util.h> | ||||
#include <utilstrencodings.h> | |||||
#include <boost/algorithm/string/classification.hpp> | #include <boost/algorithm/string/classification.hpp> | ||||
#include <boost/algorithm/string/predicate.hpp> | #include <boost/algorithm/string/predicate.hpp> | ||||
#include <boost/algorithm/string/replace.hpp> | #include <boost/algorithm/string/replace.hpp> | ||||
#include <boost/algorithm/string/split.hpp> | #include <boost/algorithm/string/split.hpp> | ||||
#include <boost/bind.hpp> | #include <boost/bind.hpp> | ||||
#include <boost/signals2/signal.hpp> | #include <boost/signals2/signal.hpp> | ||||
#include <event2/buffer.h> | #include <event2/buffer.h> | ||||
#include <event2/bufferevent.h> | #include <event2/bufferevent.h> | ||||
#include <event2/event.h> | #include <event2/event.h> | ||||
#include <event2/thread.h> | #include <event2/thread.h> | ||||
#include <event2/util.h> | #include <event2/util.h> | ||||
#include <cstdlib> | |||||
#include <deque> | |||||
#include <set> | |||||
#include <vector> | |||||
/** Default control port */ | /** Default control port */ | ||||
const std::string DEFAULT_TOR_CONTROL = "127.0.0.1:9051"; | const std::string DEFAULT_TOR_CONTROL = "127.0.0.1:9051"; | ||||
/** Tor cookie size (from control-spec.txt) */ | /** Tor cookie size (from control-spec.txt) */ | ||||
static const int TOR_COOKIE_SIZE = 32; | static const int TOR_COOKIE_SIZE = 32; | ||||
/** Size of client/server nonce for SAFECOOKIE */ | /** Size of client/server nonce for SAFECOOKIE */ | ||||
static const int TOR_NONCE_SIZE = 32; | static const int TOR_NONCE_SIZE = 32; | ||||
/** For computing serverHash in SAFECOOKIE */ | /** For computing serverHash in SAFECOOKIE */ | ||||
static const std::string TOR_SAFE_SERVERKEY = | static const std::string TOR_SAFE_SERVERKEY = | ||||
▲ Show 20 Lines • Show All 776 Lines • Show Last 20 Lines |