Cleanup
This commit is contained in:
parent
9522e09c3d
commit
246f6bcebd
7 changed files with 38 additions and 25 deletions
|
@ -83,6 +83,7 @@ Options:\n"
|
|||
--max-cpu-usage=N maximum CPU usage for automatic threads mode (default 75)\n\
|
||||
--safe safe adjust threads and av settings for current CPU\n\
|
||||
--nicehash enable nicehash/xmrig-proxy support\n\
|
||||
--use-tls enable tls on pool communication\n\
|
||||
--print-time=N print hashrate report every N seconds\n\
|
||||
--api-port=N port for the miner API\n\
|
||||
--api-access-token=T access token for API\n\
|
||||
|
@ -90,7 +91,7 @@ Options:\n"
|
|||
# ifndef XMRIG_NO_CC
|
||||
"\
|
||||
--cc-url=URL url of the CC Server\n\
|
||||
--cc-use-tls turn on tls encryption for CC communication\
|
||||
--cc-use-tls enable tls encryption for CC communication\
|
||||
--cc-access-token=T access token for CC Server\n\
|
||||
--cc-worker-id=ID custom worker-id for CC Server\n\
|
||||
--cc-update-interval-s status update interval in seconds (default: 10 min: 1)\n"
|
||||
|
@ -103,7 +104,7 @@ Options:\n"
|
|||
--cc-pass=PASSWORD CC Server admin pass\n\
|
||||
--cc-access-token=T CC Server access token for CC Client\n\
|
||||
--cc-port=N CC Server port\n\
|
||||
--cc-use-tls turn on tls encryption for CC communication \
|
||||
--cc-use-tls enable tls encryption for CC communication \
|
||||
--cc-cert-file=FILE when tls is turned on, use this to point to the right cert file (default: server.pem) \
|
||||
--cc-key-file when tls is turned on, use this to point to the right key file (default: server.key) \
|
||||
--cc-client-config-folder=FOLDER Folder contains the client config files\n\
|
||||
|
@ -131,7 +132,7 @@ static struct option const options[] = {
|
|||
{ "algo", 1, nullptr, 'a' },
|
||||
{ "av", 1, nullptr, 'v' },
|
||||
{ "aesni", 1, nullptr, 'A' },
|
||||
{ "multihash-factor", 1, nullptr, 'm' },
|
||||
{ "multihash-factor", 1, nullptr, 'm' },
|
||||
{ "background", 0, nullptr, 'B' },
|
||||
{ "config", 1, nullptr, 'c' },
|
||||
{ "cpu-affinity", 1, nullptr, 1020 },
|
||||
|
@ -156,6 +157,7 @@ static struct option const options[] = {
|
|||
{ "user-agent", 1, nullptr, 1008 },
|
||||
{ "userpass", 1, nullptr, 'O' },
|
||||
{ "version", 0, nullptr, 'V' },
|
||||
{ "use-tls", 1, nullptr, 1015 },
|
||||
{ "api-port", 1, nullptr, 4000 },
|
||||
{ "api-access-token", 1, nullptr, 4001 },
|
||||
{ "api-worker-id", 1, nullptr, 4002 },
|
||||
|
@ -170,7 +172,7 @@ static struct option const options[] = {
|
|||
{ "cc-custom-dashboard", 1, nullptr, 4010 },
|
||||
{ "cc-cert-file", 1, nullptr, 4014 },
|
||||
{ "cc-key-file", 1, nullptr, 4015 },
|
||||
{ "cc-use-tls", 1, nullptr, 4016 },
|
||||
{ "cc-use-tls", 0, nullptr, 4016 },
|
||||
{ "daemonized", 0, nullptr, 4011 },
|
||||
{ "doublehash-thread-mask", 1, nullptr, 4013 },
|
||||
{ "multihash-thread-mask", 1, nullptr, 4013 },
|
||||
|
@ -211,6 +213,7 @@ static struct option const pool_options[] = {
|
|||
{ "userpass", 1, nullptr, 'O' },
|
||||
{ "keepalive", 0, nullptr ,'k' },
|
||||
{ "nicehash", 0, nullptr, 1006 },
|
||||
{ "use-tls", 0, nullptr, 1015 },
|
||||
{ nullptr, 0, nullptr, 0 }
|
||||
};
|
||||
|
||||
|
@ -240,7 +243,7 @@ static struct option const cc_server_options[] = {
|
|||
{ "custom-dashboard", 1, nullptr, 4010 },
|
||||
{ "cert-file", 1, nullptr, 4014 },
|
||||
{ "key-file", 1, nullptr, 4015 },
|
||||
{ "use-tls", 1, nullptr, 4016 },
|
||||
{ "use-tls", 0, nullptr, 4016 },
|
||||
{ nullptr, 0, nullptr, 0 }
|
||||
};
|
||||
|
||||
|
@ -534,7 +537,10 @@ bool Options::parseArg(int key, const char *arg)
|
|||
case 1009: /* --no-huge-pages */
|
||||
return parseBoolean(key, false);
|
||||
|
||||
case 4016: /* --use-tls */
|
||||
case 1015: /* --use-tls */
|
||||
return parseBoolean(key, true);
|
||||
|
||||
case 4016: /* --cc-use-tls */
|
||||
return parseBoolean(key, true);
|
||||
|
||||
case 't': /* --threads */
|
||||
|
@ -741,12 +747,15 @@ bool Options::parseBoolean(int key, bool enable)
|
|||
m_hugePages = enable;
|
||||
break;
|
||||
|
||||
case 1015: /* --use-tls */
|
||||
m_pools.back()->setUseTls(enable);
|
||||
break;
|
||||
|
||||
case 2000: /* --colors */
|
||||
m_colors = enable;
|
||||
break;
|
||||
|
||||
case 4016: /* --use-tls */
|
||||
m_pools.back()->setUseTls(enable);
|
||||
case 4016: /* --cc-use-tls */
|
||||
m_ccUseTls = enable;
|
||||
break;
|
||||
|
||||
|
|
|
@ -147,10 +147,11 @@ static void print_pools()
|
|||
const std::vector<Url*> &pools = Options::i()->pools();
|
||||
|
||||
for (size_t i = 0; i < pools.size(); ++i) {
|
||||
Log::i()->text(Options::i()->colors() ? "\x1B[01;32m * \x1B[01;37mPOOL #%d: \x1B[01;36m%s:%d" : " * POOL #%d: %s:%d",
|
||||
i + 1,
|
||||
pools[i]->host(),
|
||||
pools[i]->port());
|
||||
Log::i()->text(Options::i()->colors() ? "\x1B[01;32m * \x1B[01;37mPOOL #%d: \x1B[01;36m%s:%d %s" : " * POOL #%d: %s:%d %s",
|
||||
i + 1,
|
||||
pools[i]->host(),
|
||||
pools[i]->port(),
|
||||
pools[i]->useTls() ? "(TLS)" : "");
|
||||
}
|
||||
|
||||
# ifdef APP_DEBUG
|
||||
|
@ -179,7 +180,10 @@ static void print_cc()
|
|||
return;
|
||||
}
|
||||
|
||||
Log::i()->text(Options::i()->colors() ? "\x1B[01;32m * \x1B[01;37mCC Server: \x1B[01;36m%s:%d" : " * CC Server: %s:%d", Options::i()->ccHost(), Options::i()->ccPort());
|
||||
Log::i()->text(Options::i()->colors() ? "\x1B[01;32m * \x1B[01;37mCC Server: \x1B[01;36m%s:%d %s" : " * CC Server: %s:%d %s",
|
||||
Options::i()->ccHost(),
|
||||
Options::i()->ccPort(),
|
||||
Options::i()->ccUseTls() ? "(TLS)" : "");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ bool Httpd::start()
|
|||
LOG_ERR("HTTP Daemon failed to start.");
|
||||
return false;
|
||||
} else {
|
||||
LOG_INFO("%s Server started on Port: %d", APP_NAME, m_options->ccPort());
|
||||
LOG_INFO("%s Server started on Port: %d %s", APP_NAME, m_options->ccPort(), m_options->ccUseTls() ? "with TLS" : "");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"url": "", // URL of mining server
|
||||
"user": "", // username for mining server
|
||||
"pass": "x", // password for mining server
|
||||
"useTls" : false, // use tls for pool communication (need pool support)
|
||||
"use-tls" : false, // enable tls for pool communication (need pool support)
|
||||
"keepalive": true, // send keepalived for prevent timeout (need pool support)
|
||||
"nicehash": false // enable nicehash/xmrig-proxy support
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
|||
},
|
||||
"cc-client": {
|
||||
"url": "localhost:3344", // url of the CC Server (ip:port)
|
||||
"useTls" : false, // use tls for CC communication (needs to be enabled on CC Server too)
|
||||
"use-tls" : false, // enable tls for CC communication (needs to be enabled on CC Server too)
|
||||
"access-token": "mySecret", // access token for CC Server (has to be the same in config_cc.json)
|
||||
"worker-id": null, // custom worker-id for CC Server (otherwise hostname is used)
|
||||
"update-interval-s": 10 // status update interval in seconds (default: 10 min: 1)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"syslog": false, // use system log for output messages
|
||||
"cc-server": {
|
||||
"port": 3344, // port the CC Server will listens on
|
||||
"useTls" : false, // use tls for CC communication (needs to be enabled on miners too)
|
||||
"use-tls" : false, // use tls for CC communication (needs to be enabled on miners too)
|
||||
"cert-file" : "server.pem", // when tls is turned on, use this to point to the right cert file
|
||||
"key-file" : "server.key", // when tls is turned on, use this to point to the right key file
|
||||
"access-token": "mySecret", // access token for CC Clients (should be set!!!)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"algo": "cryptonight", // cryptonight (default) or cryptonight-lite
|
||||
"av": null, // DEPRECATED: algorithm variation, (0 auto,
|
||||
// 1 -> (aesni=1, multihash-factor=1),
|
||||
// 2 -> (aesni=1, multihash-factor=2),
|
||||
// 3 -> (aesni=2, multihash-factor=1),
|
||||
// 4 -> (aesni=2, multihash-factor=2))
|
||||
// 1 -> (aesni=1, multihash-factor=1),
|
||||
// 2 -> (aesni=1, multihash-factor=2),
|
||||
// 3 -> (aesni=2, multihash-factor=1),
|
||||
// 4 -> (aesni=2, multihash-factor=2))
|
||||
"aesni": 0, // selection of AES-NI mode (0 auto, 1 on, 2 off)
|
||||
"threads": 0, // number of miner threads (not set or 0 enables automatic selection of optimal thread count)
|
||||
"multihash-factor": 0, // number of hash blocks to process at a time (not set or 0 enables automatic selection of optimal number of hash blocks)
|
||||
|
@ -26,7 +26,7 @@
|
|||
"url": "", // URL of mining server
|
||||
"user": "", // username for mining server
|
||||
"pass": "x", // password for mining server
|
||||
"useTls" : false, // use tls for pool communication (need pool support)
|
||||
"use-tls" : false, // enable tls for pool communication (need pool support)
|
||||
"keepalive": true, // send keepalived for prevent timeout (need pool support)
|
||||
"nicehash": false // enable nicehash/xmrig-proxy support
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
|||
},
|
||||
"cc-client": {
|
||||
"url": "localhost:3344", // url of the CC Server (ip:port)
|
||||
"useTls" : false, // use tls for CC communication (needs to be enabled on CC Server too)
|
||||
"use-tls" : false, // enable tls for CC communication (needs to be enabled on CC Server too)
|
||||
"access-token": "mySecret", // access token for CC Server (has to be the same in config_cc.json)
|
||||
"worker-id": null, // custom worker-id for CC Server (otherwise hostname is used)
|
||||
"update-interval-s": 10 // status update interval in seconds (default: 10 min: 1)
|
||||
|
|
|
@ -36,13 +36,13 @@
|
|||
#define APP_DESC "XMRigCC CPU miner"
|
||||
#define APP_COPYRIGHT "Copyright (C) 2017- BenDr0id"
|
||||
#endif
|
||||
#define APP_VERSION "1.4.0 (based on XMRig 2.4.4)"
|
||||
#define APP_VERSION "1.5.0 (based on XMRig 2.4.4)"
|
||||
#define APP_DOMAIN ""
|
||||
#define APP_SITE "https://github.com/Bendr0id/xmrigCC"
|
||||
#define APP_KIND "cpu"
|
||||
|
||||
#define APP_VER_MAJOR 1
|
||||
#define APP_VER_MINOR 4
|
||||
#define APP_VER_MINOR 5
|
||||
#define APP_VER_BUILD 0
|
||||
#define APP_VER_REV 0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue