forked from xmrig/xmrig
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
171 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
:: Example batch file for mining Monero at a pool | ||
:: | ||
:: Format: | ||
:: xmrig.exe -o <pool address>:<pool port> -u <pool username/wallet> -p <pool password> | ||
:: | ||
:: Fields: | ||
:: pool address The host name of the pool stratum or its IP address, for example pool.hashvault.pro | ||
:: pool port The port of the pool's stratum to connect to, for example 3333. Check your pool's getting started page. | ||
:: pool username/wallet For most pools, this is the wallet address you want to mine to. Some pools require a username | ||
:: pool password For most pools this can be just 'x'. For pools using usernames, you may need to provide a password as configured on the pool. | ||
:: | ||
:: List of Monero mining pools: | ||
:: https://miningpoolstats.stream/monero | ||
:: | ||
:: Choose pools outside of top 5 to help Monero network be more decentralized! | ||
:: Smaller pools also often have smaller fees/payout limits. | ||
|
||
xmrig.exe -o pool.hashvault.pro:3333 -u 48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD -p x | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
:: Example batch file for mining Monero solo | ||
:: | ||
:: Format: | ||
:: xmrig.exe -o <node address>:<node port> -a rx/0 -u <wallet address> --daemon | ||
:: | ||
:: Fields: | ||
:: node address The host name of your monerod node or its IP address. It can also be a public node with RPC enabled, for example node.xmr.to | ||
:: node port The RPC port of your monerod node to connect to, usually 18081. | ||
:: wallet address Check your Monero CLI or GUI wallet to see your wallet's address. | ||
:: | ||
:: Mining solo is the best way to help Monero network be more decentralized! | ||
:: But you will only get a payout when you find a block which can take more than a year for a single low-end PC. | ||
|
||
xmrig.exe -o node.xmr.to:18081 -a rx/0 -u 48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD --daemon | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
/* XMRig | ||
* Copyright 2010 Jeff Garzik <[email protected]> | ||
* Copyright 2012-2014 pooler <[email protected]> | ||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones> | ||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> | ||
* Copyright 2016 Jay D Dee <[email protected]> | ||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> | ||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -72,7 +66,7 @@ static void createVariables() | |
} // namespace xmrig | ||
|
||
|
||
xmrig::String xmrig::Env::expand(const char *in) | ||
xmrig::String xmrig::Env::expand(const char *in, const std::map<String, String> &extra) | ||
{ | ||
# ifdef XMRIG_FEATURE_ENV | ||
if (in == nullptr) { | ||
|
@@ -96,7 +90,7 @@ xmrig::String xmrig::Env::expand(const char *in) | |
continue; | ||
} | ||
|
||
vars.insert({ var, get(m[1].str().c_str()) }); | ||
vars.insert({ var, get(m[1].str().c_str(), extra) }); | ||
} | ||
|
||
for (const auto &kv : vars) { | ||
|
@@ -118,15 +112,23 @@ xmrig::String xmrig::Env::expand(const char *in) | |
} | ||
|
||
|
||
xmrig::String xmrig::Env::get(const String &name) | ||
xmrig::String xmrig::Env::get(const String &name, const std::map<String, String> &extra) | ||
{ | ||
# ifdef XMRIG_FEATURE_ENV | ||
if (variables.empty()) { | ||
createVariables(); | ||
} | ||
|
||
if (variables.count(name)) { | ||
return variables.at(name); | ||
const auto it = variables.find(name); | ||
if (it != variables.end()) { | ||
return it->second; | ||
} | ||
|
||
if (!extra.empty()) { | ||
const auto it = extra.find(name); | ||
if (it != extra.end()) { | ||
return it->second; | ||
} | ||
} | ||
# endif | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
/* XMRig | ||
* Copyright 2010 Jeff Garzik <[email protected]> | ||
* Copyright 2012-2014 pooler <[email protected]> | ||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones> | ||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> | ||
* Copyright 2016 Jay D Dee <[email protected]> | ||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> | ||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* | ||
* 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,14 +23,17 @@ | |
#include "base/tools/String.h" | ||
|
||
|
||
#include <map> | ||
|
||
|
||
namespace xmrig { | ||
|
||
|
||
class Env | ||
{ | ||
public: | ||
static String expand(const char *in); | ||
static String get(const String &name); | ||
static String expand(const char *in, const std::map<String, String> &extra = {}); | ||
static String get(const String &name, const std::map<String, String> &extra = {}); | ||
static String hostname(); | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
/* XMRig | ||
* Copyright 2010 Jeff Garzik <[email protected]> | ||
* Copyright 2012-2014 pooler <[email protected]> | ||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones> | ||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> | ||
* Copyright 2016 Jay D Dee <[email protected]> | ||
* 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>, <[email protected]> | ||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* | ||
* 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
/* XMRig | ||
* Copyright 2010 Jeff Garzik <[email protected]> | ||
* Copyright 2012-2014 pooler <[email protected]> | ||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones> | ||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> | ||
* Copyright 2016 Jay D Dee <[email protected]> | ||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> | ||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -52,7 +46,7 @@ class Platform | |
static void setProcessPriority(int priority); | ||
static void setThreadPriority(int priority); | ||
|
||
static inline const char *userAgent() { return m_userAgent; } | ||
static inline const String &userAgent() { return m_userAgent; } | ||
|
||
static bool isOnBatteryPower(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
/* XMRig | ||
* Copyright 2010 Jeff Garzik <[email protected]> | ||
* Copyright 2012-2014 pooler <[email protected]> | ||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones> | ||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> | ||
* Copyright 2016 Jay D Dee <[email protected]> | ||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> | ||
* Copyright 2018 Lee Clagett <https://github.com/vtnerd> | ||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* | ||
* 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
/* XMRig | ||
* Copyright 2010 Jeff Garzik <[email protected]> | ||
* Copyright 2012-2014 pooler <[email protected]> | ||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones> | ||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> | ||
* Copyright 2016 Jay D Dee <[email protected]> | ||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* | ||
* 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
/* XMRig | ||
* Copyright 2010 Jeff Garzik <[email protected]> | ||
* Copyright 2012-2014 pooler <[email protected]> | ||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones> | ||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> | ||
* Copyright 2016 Jay D Dee <[email protected]> | ||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* | ||
* 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
/* XMRig | ||
* Copyright 2010 Jeff Garzik <[email protected]> | ||
* Copyright 2012-2014 pooler <[email protected]> | ||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones> | ||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> | ||
* Copyright 2016 Jay D Dee <[email protected]> | ||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* | ||
* 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
/* XMRig | ||
* Copyright 2010 Jeff Garzik <[email protected]> | ||
* Copyright 2012-2014 pooler <[email protected]> | ||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones> | ||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> | ||
* Copyright 2016 Jay D Dee <[email protected]> | ||
* 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>, <[email protected]> | ||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -26,12 +20,18 @@ | |
#define XMRIG_ICONSOLELISTENER_H | ||
|
||
|
||
#include "base/tools/Object.h" | ||
|
||
|
||
namespace xmrig { | ||
|
||
|
||
class IConsoleListener | ||
{ | ||
public: | ||
XMRIG_DISABLE_COPY_MOVE(IConsoleListener) | ||
|
||
IConsoleListener() = default; | ||
virtual ~IConsoleListener() = default; | ||
|
||
virtual void onConsoleCommand(char command) = 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
/* XMRig | ||
* Copyright 2010 Jeff Garzik <[email protected]> | ||
* Copyright 2012-2014 pooler <[email protected]> | ||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones> | ||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> | ||
* Copyright 2016 Jay D Dee <[email protected]> | ||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> | ||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -26,6 +20,9 @@ | |
#define XMRIG_IDNSLISTENER_H | ||
|
||
|
||
#include "base/tools/Object.h" | ||
|
||
|
||
namespace xmrig { | ||
|
||
|
||
|
@@ -35,6 +32,9 @@ class Dns; | |
class IDnsListener | ||
{ | ||
public: | ||
XMRIG_DISABLE_COPY_MOVE(IDnsListener) | ||
|
||
IDnsListener() = default; | ||
virtual ~IDnsListener() = default; | ||
|
||
virtual void onResolved(const Dns &dns, int status) = 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
/* XMRig | ||
* Copyright 2010 Jeff Garzik <[email protected]> | ||
* Copyright 2012-2014 pooler <[email protected]> | ||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones> | ||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> | ||
* Copyright 2016 Jay D Dee <[email protected]> | ||
* 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>, <[email protected]> | ||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -26,6 +20,9 @@ | |
#define XMRIG_IHTTPLISTENER_H | ||
|
||
|
||
#include "base/tools/Object.h" | ||
|
||
|
||
namespace xmrig { | ||
|
||
|
||
|
@@ -36,7 +33,10 @@ class HttpResponse; | |
class IHttpListener | ||
{ | ||
public: | ||
virtual ~IHttpListener() = default; | ||
XMRIG_DISABLE_COPY_MOVE(IHttpListener) | ||
|
||
IHttpListener() = default; | ||
virtual ~IHttpListener() = default; | ||
|
||
virtual void onHttpData(const HttpData &data) = 0; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
/* XMRig | ||
* Copyright 2010 Jeff Garzik <[email protected]> | ||
* Copyright 2012-2014 pooler <[email protected]> | ||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones> | ||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> | ||
* Copyright 2016 Jay D Dee <[email protected]> | ||
* 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>, <[email protected]> | ||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> | ||
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -26,6 +20,9 @@ | |
#define XMRIG_ISIGNALLISTENER_H | ||
|
||
|
||
#include "base/tools/Object.h" | ||
|
||
|
||
namespace xmrig { | ||
|
||
|
||
|
@@ -35,7 +32,10 @@ class String; | |
class ISignalListener | ||
{ | ||
public: | ||
virtual ~ISignalListener() = default; | ||
XMRIG_DISABLE_COPY_MOVE(ISignalListener) | ||
|
||
ISignalListener() = default; | ||
virtual ~ISignalListener() = default; | ||
|
||
virtual void onSignal(int signum) = 0; | ||
}; | ||
|
Oops, something went wrong.