mirror of
https://github.com/wownero/wowlet.git
synced 2026-12-04 14:03:59 +01:00
Xmrig: add support for TLS. Tor default off. Save username/password in wallet cache.
Signed-off-by: dsc <dsc@xmr.pm>
This commit is contained in:
@@ -35,7 +35,7 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
||||
{Config::autoOpenWalletPath,{QS("autoOpenWalletPath"), ""}},
|
||||
{Config::walletPath,{QS("walletPath"), ""}},
|
||||
{Config::xmrigPath,{QS("xmrigPath"), ""}},
|
||||
{Config::xmrigPool,{QS("xmrigPool"), "pool.xmr.pt:5555"}},
|
||||
{Config::xmrigPool,{QS("xmrigPool"), "pool.xmr.pt:9000"}},
|
||||
{Config::nodes,{QS("nodes"), "{}"}},
|
||||
{Config::websocketEnabled,{QS("websocketEnabled"), true}},
|
||||
{Config::nodeSource,{QS("nodeSource"), 0}},
|
||||
|
||||
+9
-3
@@ -33,7 +33,11 @@ void XMRig::terminate() {
|
||||
m_process.terminate();
|
||||
}
|
||||
|
||||
void XMRig::start(unsigned int threads, const QString &pool_name, const QString &receiving_address, bool tor) {
|
||||
void XMRig::start(unsigned int threads,
|
||||
const QString &pool_name,
|
||||
const QString &username,
|
||||
const QString &password,
|
||||
bool tor, bool tls) {
|
||||
auto state = m_process.state();
|
||||
if (state == QProcess::ProcessState::Running || state == QProcess::ProcessState::Starting) {
|
||||
emit error("Can't start XMRig, already running or starting");
|
||||
@@ -54,12 +58,14 @@ void XMRig::start(unsigned int threads, const QString &pool_name, const QString
|
||||
QStringList arguments;
|
||||
arguments << "-o" << pool_name;
|
||||
arguments << "-a" << "rx/0";
|
||||
arguments << "-u" << receiving_address;
|
||||
arguments << "-p" << "featherwallet";
|
||||
arguments << "-u" << username;
|
||||
arguments << "-p" << password;
|
||||
arguments << "--no-color";
|
||||
arguments << "-t" << QString::number(threads);
|
||||
if(tor)
|
||||
arguments << "-x" << QString("%1:%2").arg(Tor::torHost).arg(Tor::torPort);
|
||||
if(tls)
|
||||
arguments << "--tls";
|
||||
|
||||
QString cmd = QString("%1 %2").arg(path, arguments.join(" "));
|
||||
emit output(cmd.toUtf8());
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ Q_OBJECT
|
||||
public:
|
||||
explicit XMRig(QObject *parent = nullptr);
|
||||
|
||||
void start(unsigned int threads, const QString &pool_name, const QString &receiving_address, bool tor = false);
|
||||
void start(unsigned int threads, const QString &pool_name, const QString &username, const QString &password, bool tor = false, bool tls = true);
|
||||
void stop();
|
||||
void terminate();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user