mirror of
https://github.com/xmrig/xmrig-proxy.git
synced 2026-02-09 02:59:17 +08:00
Rename Tls.* to MinerTls.*
This commit is contained in:
@@ -16,14 +16,14 @@ if (WITH_TLS)
|
||||
set(TLS_SOURCES
|
||||
src/base/net/stratum/Tls.cpp
|
||||
src/base/net/stratum/Tls.h
|
||||
src/proxy/tls/Tls.cpp
|
||||
src/proxy/tls/Tls.h
|
||||
src/base/net/tls/TlsConfig.cpp
|
||||
src/base/net/tls/TlsConfig.h
|
||||
src/base/net/tls/TlsContext.cpp
|
||||
src/base/net/tls/TlsContext.h
|
||||
src/base/net/tls/TlsGen.cpp
|
||||
src/base/net/tls/TlsGen.h
|
||||
src/proxy/tls/MinerTls.cpp
|
||||
src/proxy/tls/MinerTls.h
|
||||
)
|
||||
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
|
||||
|
||||
#ifdef XMRIG_FEATURE_TLS
|
||||
# include "proxy/tls/Tls.h"
|
||||
# include "base/net/tls/TlsContext.h"
|
||||
# include "proxy/tls/MinerTls.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
namespace xmrig {
|
||||
static int64_t nextId = 0;
|
||||
char Miner::m_sendBuf[2048] = { 0 };
|
||||
char Miner::m_sendBuf[16384] = { 0 };
|
||||
Storage<Miner> Miner::m_storage;
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ private:
|
||||
uv_buf_t m_recvBuf{};
|
||||
uv_tcp_t *m_socket;
|
||||
|
||||
static char m_sendBuf[2048];
|
||||
static char m_sendBuf[16384];
|
||||
static Storage<Miner> m_storage;
|
||||
};
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
|
||||
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -24,18 +24,14 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
#include <cassert>
|
||||
|
||||
|
||||
#include "proxy/tls/Tls.h"
|
||||
#include "proxy/tls/MinerTls.h"
|
||||
|
||||
|
||||
xmrig::Miner::Tls::Tls(SSL_CTX *ctx, Miner *miner) :
|
||||
m_ready(false),
|
||||
m_buf(),
|
||||
m_fingerprint(),
|
||||
m_miner(miner),
|
||||
m_ssl(nullptr),
|
||||
m_ctx(ctx)
|
||||
{
|
||||
m_writeBio = BIO_new(BIO_s_mem());
|
||||
@@ -5,8 +5,8 @@
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -29,12 +29,15 @@
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
|
||||
#include "base/tools/Object.h"
|
||||
#include "proxy/Miner.h"
|
||||
|
||||
|
||||
class xmrig::Miner::Tls
|
||||
{
|
||||
public:
|
||||
XMRIG_DISABLE_COPY_MOVE_DEFAULT(Tls)
|
||||
|
||||
Tls(SSL_CTX *ctx, Miner *miner);
|
||||
~Tls();
|
||||
|
||||
@@ -51,11 +54,11 @@ private:
|
||||
|
||||
BIO *m_readBio;
|
||||
BIO *m_writeBio;
|
||||
bool m_ready;
|
||||
char m_buf[1024 * 1];
|
||||
char m_fingerprint[32 * 2 + 8];
|
||||
bool m_ready = false;
|
||||
char m_buf[1024 * 1]{};
|
||||
char m_fingerprint[32 * 2 + 8]{};
|
||||
Miner *m_miner;
|
||||
SSL *m_ssl;
|
||||
SSL *m_ssl = nullptr;
|
||||
SSL_CTX *m_ctx;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user