Browse Source

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

pull/1563/head
XMRig 4 years ago
parent
commit
2bc5fb10a7
No known key found for this signature in database GPG Key ID: 446A53638BE94409
  1. 1
      README.md
  2. 3
      src/base/kernel/config/BaseTransform.cpp
  3. 1
      src/base/kernel/interfaces/IConfig.h
  4. 7
      src/core/config/Config_platform.h
  5. 5
      src/core/config/usage.h

1
README.md

@ -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)

3
src/base/kernel/config/BaseTransform.cpp

@ -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);

1
src/base/kernel/interfaces/IConfig.h

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

7
src/core/config/Config_platform.h

@ -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 },

5
src/core/config/usage.h

@ -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";

Loading…
Cancel
Save