11/* XMRig
2- * Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
3- * Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
2+ * Copyright (c) 2018-2025 SChernykh <https://github.com/SChernykh>
3+ * Copyright (c) 2016-2025 XMRig <https://github.com/xmrig>, <support@xmrig.com>
44 *
55 * This program is free software: you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License as published by
1818
1919#include < cstdio>
2020
21-
2221#ifdef _MSC_VER
2322# include " getopt/getopt.h"
2423#else
2524# include < getopt.h>
2625#endif
2726
28-
2927#include " base/kernel/config/BaseTransform.h"
3028#include " base/io/json/JsonChain.h"
3129#include " base/io/log/Log.h"
3735#include " base/net/stratum/Pools.h"
3836#include " core/config/Config_platform.h"
3937
40-
4138#ifdef XMRIG_FEATURE_TLS
4239# include " base/net/tls/TlsConfig.h"
4340#endif
@@ -47,9 +44,9 @@ void xmrig::BaseTransform::load(JsonChain &chain, Process *process, IConfigTrans
4744{
4845 using namespace rapidjson ;
4946
50- int key = 0 ;
51- int argc = process->arguments ().argc ();
52- char **argv = process->arguments ().argv ();
47+ int key = 0 ;
48+ const int argc = process->arguments ().argc ();
49+ char **argv = process->arguments ().argv ();
5350
5451 Document doc (kObjectType );
5552
@@ -262,7 +259,8 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch
262259 case IConfig::DaemonKey: /* --daemon */
263260 case IConfig::SubmitToOriginKey: /* --submit-to-origin */
264261 case IConfig::VerboseKey: /* --verbose */
265- case IConfig::DnsIPv6Key: /* --dns-ipv6 */
262+ case IConfig::DnsIPv4Key: /* --ipv4 */
263+ case IConfig::DnsIPv6Key: /* --ipv6 */
266264 return transformBoolean (doc, key, true );
267265
268266 case IConfig::ColorKey: /* --no-color */
@@ -323,8 +321,11 @@ void xmrig::BaseTransform::transformBoolean(rapidjson::Document &doc, int key, b
323321 case IConfig::NoTitleKey: /* --no-title */
324322 return set (doc, BaseConfig::kTitle , enable);
325323
326- case IConfig::DnsIPv6Key: /* --dns-ipv6 */
327- return set (doc, DnsConfig::kField , DnsConfig::kIPv6 , enable);
324+ case IConfig::DnsIPv4Key: /* --ipv4 */
325+ return set (doc, DnsConfig::kField , DnsConfig::kIPv , 4 );
326+
327+ case IConfig::DnsIPv6Key: /* --ipv6 */
328+ return set (doc, DnsConfig::kField , DnsConfig::kIPv , 6 );
328329
329330 default :
330331 break ;
0 commit comments