mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-18 15:16:17 +00:00
* Added 'network.http.ssl_verify_peer.set' used to disable checking of self-signed certificates.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1206 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+1
-5
@@ -25,9 +25,7 @@ set format x "%H:%M"
|
|||||||
set format y "%.0s %cb"
|
set format y "%.0s %cb"
|
||||||
set format y2 "%.0f"
|
set format y2 "%.0f"
|
||||||
set y2tics
|
set y2tics
|
||||||
set autoscale x
|
set autoscale xfix
|
||||||
|
|
||||||
#set multiplot
|
|
||||||
|
|
||||||
grab(x)=(x<min)?min=x:(x>max)?max=x:0;
|
grab(x)=(x<min)?min=x:(x>max)?max=x:0;
|
||||||
|
|
||||||
@@ -37,8 +35,6 @@ plot "bandwidth_stats.$1" using 1:2 smooth bezier with lines lw 4 title 'Upload
|
|||||||
"bandwidth_stats.$1" using 1:6 smooth bezier with lines lw 2 title 'Upload unchoked' axis x1y2,\
|
"bandwidth_stats.$1" using 1:6 smooth bezier with lines lw 2 title 'Upload unchoked' axis x1y2,\
|
||||||
"bandwidth_stats.$1" using 1:7 smooth bezier with lines lw 2 title 'Download unchoked' axis x1y2
|
"bandwidth_stats.$1" using 1:7 smooth bezier with lines lw 2 title 'Download unchoked' axis x1y2
|
||||||
|
|
||||||
set autoscale xfix
|
|
||||||
|
|
||||||
set output "output_$1_memory.png"
|
set output "output_$1_memory.png"
|
||||||
plot "bandwidth_stats.$1" using 1:9 smooth bezier with lines lw 4 title 'Memory usage' axis x1y1,\
|
plot "bandwidth_stats.$1" using 1:9 smooth bezier with lines lw 4 title 'Memory usage' axis x1y1,\
|
||||||
"bandwidth_stats.$1" using 1:6 smooth bezier with lines lw 2 title 'Upload unchoked' axis x1y2,\
|
"bandwidth_stats.$1" using 1:6 smooth bezier with lines lw 2 title 'Upload unchoked' axis x1y2,\
|
||||||
|
|||||||
@@ -682,6 +682,8 @@ initialize_command_network() {
|
|||||||
CMD2_ANY_STRING_V("network.http.proxy_address.set", std::bind(&core::CurlStack::set_http_proxy, httpStack, std::placeholders::_2));
|
CMD2_ANY_STRING_V("network.http.proxy_address.set", std::bind(&core::CurlStack::set_http_proxy, httpStack, std::placeholders::_2));
|
||||||
CMD2_ANY ("network.http.max_open", std::bind(&core::CurlStack::max_active, httpStack));
|
CMD2_ANY ("network.http.max_open", std::bind(&core::CurlStack::max_active, httpStack));
|
||||||
CMD2_ANY_VALUE_V ("network.http.max_open.set", std::bind(&core::CurlStack::set_max_active, httpStack, std::placeholders::_2));
|
CMD2_ANY_VALUE_V ("network.http.max_open.set", std::bind(&core::CurlStack::set_max_active, httpStack, std::placeholders::_2));
|
||||||
|
CMD2_ANY ("network.http.ssl_verify_peer", std::bind(&core::CurlStack::ssl_verify_peer, httpStack));
|
||||||
|
CMD2_ANY_VALUE_V ("network.http.ssl_verify_peer.set", std::bind(&core::CurlStack::set_ssl_verify_peer, httpStack, std::placeholders::_2));
|
||||||
|
|
||||||
CMD2_ANY ("network.send_buffer.size", std::bind(&torrent::ConnectionManager::send_buffer_size, cm));
|
CMD2_ANY ("network.send_buffer.size", std::bind(&torrent::ConnectionManager::send_buffer_size, cm));
|
||||||
CMD2_ANY_VALUE_V ("network.send_buffer.size.set", std::bind(&torrent::ConnectionManager::set_send_buffer_size, cm, std::placeholders::_2));
|
CMD2_ANY_VALUE_V ("network.send_buffer.size.set", std::bind(&torrent::ConnectionManager::set_send_buffer_size, cm, std::placeholders::_2));
|
||||||
|
|||||||
@@ -51,7 +51,8 @@ namespace core {
|
|||||||
CurlStack::CurlStack() :
|
CurlStack::CurlStack() :
|
||||||
m_handle((void*)curl_multi_init()),
|
m_handle((void*)curl_multi_init()),
|
||||||
m_active(0),
|
m_active(0),
|
||||||
m_maxActive(32) {
|
m_maxActive(32),
|
||||||
|
m_ssl_verify_peer(true) {
|
||||||
|
|
||||||
m_taskTimeout.set_slot(rak::mem_fn(this, &CurlStack::receive_timeout));
|
m_taskTimeout.set_slot(rak::mem_fn(this, &CurlStack::receive_timeout));
|
||||||
|
|
||||||
@@ -164,6 +165,9 @@ CurlStack::add_get(CurlGet* get) {
|
|||||||
if (!m_httpCaCert.empty())
|
if (!m_httpCaCert.empty())
|
||||||
curl_easy_setopt(get->handle(), CURLOPT_CAINFO, m_httpCaCert.c_str());
|
curl_easy_setopt(get->handle(), CURLOPT_CAINFO, m_httpCaCert.c_str());
|
||||||
|
|
||||||
|
if (!m_ssl_verify_peer)
|
||||||
|
curl_easy_setopt(get->handle(), CURLOPT_SSL_VERIFYPEER, 0);
|
||||||
|
|
||||||
base_type::push_back(get);
|
base_type::push_back(get);
|
||||||
|
|
||||||
if (m_active >= m_maxActive)
|
if (m_active >= m_maxActive)
|
||||||
|
|||||||
@@ -104,6 +104,9 @@ class CurlStack : std::deque<CurlGet*> {
|
|||||||
const std::string& http_cacert() const { return m_httpCaCert; }
|
const std::string& http_cacert() const { return m_httpCaCert; }
|
||||||
void set_http_cacert(const std::string& s) { m_httpCaCert = s; }
|
void set_http_cacert(const std::string& s) { m_httpCaCert = s; }
|
||||||
|
|
||||||
|
bool ssl_verify_peer() const { return m_ssl_verify_peer; }
|
||||||
|
void set_ssl_verify_peer(bool s) { m_ssl_verify_peer = s; }
|
||||||
|
|
||||||
static void global_init();
|
static void global_init();
|
||||||
static void global_cleanup();
|
static void global_cleanup();
|
||||||
|
|
||||||
@@ -135,6 +138,7 @@ class CurlStack : std::deque<CurlGet*> {
|
|||||||
std::string m_bindAddress;
|
std::string m_bindAddress;
|
||||||
std::string m_httpCaPath;
|
std::string m_httpCaPath;
|
||||||
std::string m_httpCaCert;
|
std::string m_httpCaCert;
|
||||||
|
bool m_ssl_verify_peer;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user