Added "-x" and "--proxy" command line options.

This commit is contained in:
XMRig
2020-02-18 21:42:01 +07:00
parent 8497e9c54f
commit 2bc5fb10a7
5 changed files with 12 additions and 5 deletions

View File

@ -38,6 +38,7 @@ Network:
-u, --user=USERNAME username for mining server
-p, --pass=PASSWORD password for mining server
-O, --userpass=U:P username:password pair for mining server
-x, --proxy=HOST:PORT connect through a SOCKS5 proxy
-k, --keepalive send keepalive packet for prevent timeout (needs pool support)
--nicehash enable nicehash.com support
--rig-id=ID rig identifier for pool-side statistics (needs pool support)

View File

@ -176,6 +176,9 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch
case IConfig::SelfSelectKey: /* --self-select */
return add(doc, Pools::kPools, Pool::kSelfSelect, arg);
case IConfig::ProxyKey: /* --proxy */
return add(doc, Pools::kPools, Pool::kSOCKS5, arg);
case IConfig::LogFileKey: /* --log-file */
return set(doc, BaseConfig::kLogFile, arg);

View File

@ -66,6 +66,7 @@ public:
UserAgentKey = 1008,
UserKey = 'u',
UserpassKey = 'O',
ProxyKey = 'x',
VerboseKey = 1100,
TlsKey = 1013,
FingerprintKey = 1014,

View File

@ -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
@ -40,7 +40,7 @@
namespace xmrig {
static const char short_options[] = "a:c:kBp:Px:r:R:s:t:T:o:u:O:v:l:S";
static const char short_options[] = "a:c:kBp:Px:r:R:s:t:T:o:u:O:v:l:Sx:";
static const option options[] = {
@ -88,6 +88,7 @@ static const option options[] = {
{ "cpu-memory-pool", 1, nullptr, IConfig::MemoryPoolKey },
{ "cpu-no-yield", 0, nullptr, IConfig::YieldKey },
{ "verbose", 0, nullptr, IConfig::VerboseKey },
{ "proxy", 1, nullptr, IConfig::ProxyKey },
# ifdef XMRIG_FEATURE_TLS
{ "tls", 0, nullptr, IConfig::TlsKey },
{ "tls-fingerprint", 1, nullptr, IConfig::FingerprintKey },

View File

@ -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
@ -50,6 +50,7 @@ static inline const std::string &usage()
u += " -u, --user=USERNAME username for mining server\n";
u += " -p, --pass=PASSWORD password for mining server\n";
u += " -O, --userpass=U:P username:password pair for mining server\n";
u += " -x, --proxy=HOST:PORT connect through a SOCKS5 proxy";
u += " -k, --keepalive send keepalived packet for prevent timeout (needs pool support)\n";
u += " --nicehash enable nicehash.com support\n";
u += " --rig-id=ID rig identifier for pool-side statistics (needs pool support)\n";