Mining/miner/proxy/src/core/config/Config.h
snider 69376b886f feat: Rebrand xmrig to miner and vendor XMRig ecosystem
Complete rebranding of all components:
- Core miner: xmrig -> miner (binary, version.h, CMakeLists.txt)
- Proxy: xmrig-proxy -> miner-proxy
- CUDA plugin: xmrig-cuda -> miner-cuda
- Heatmap: xmrig-nonces-heatmap -> miner-nonces-heatmap
- Go CLI wrapper: miner-cli -> miner-ctrl

Vendored XMRig ecosystem into miner/ directory:
- miner/core - XMRig CPU/GPU miner
- miner/proxy - Stratum proxy
- miner/cuda - NVIDIA CUDA plugin
- miner/heatmap - Nonce visualization tool
- miner/config - Configuration UI
- miner/deps - Pre-built dependencies

Updated dev fee to use project wallet with opt-out (kMinimumDonateLevel=0)
Updated branding to Lethean (domain, copyright, version 0.1.0)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 19:43:02 +00:00

94 lines
3.1 KiB
C++

/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef XMRIG_CONFIG_H
#define XMRIG_CONFIG_H
#include "3rdparty/rapidjson/fwd.h"
#include "base/kernel/config/BaseConfig.h"
#include "base/tools/String.h"
#include "proxy/BindHost.h"
#include "proxy/workers/Workers.h"
#include <cstdint>
#include <vector>
namespace xmrig {
class ConfigLoader;
class IConfigListener;
class Process;
class Config : public BaseConfig
{
public:
enum Mode {
NICEHASH_MODE,
SIMPLE_MODE,
EXTRA_NONCE_MODE,
};
Config() = default;
const char *modeName() const;
bool isVerbose() const;
bool read(const IJsonReader &reader, const char *fileName) override;
void getJSON(rapidjson::Document &doc) const override;
void toggleVerbose();
inline bool hasAlgoExt() const { return isDonateOverProxy() ? m_algoExt : true; }
inline bool isCustomDiffStats() const { return m_customDiffStats; }
inline bool isDebug() const { return m_debug; }
inline bool isDonateOverProxy() const { return m_pools.donateLevel() == 0 || m_mode == SIMPLE_MODE; }
inline bool isShouldSave() const { return m_upgrade && isAutoSave(); }
inline const BindHosts &bind() const { return m_bind; }
inline const String &accessLog() const { return m_accessLog; }
inline const String &password() const { return m_password; }
inline int mode() const { return m_mode; }
inline int reuseTimeout() const { return m_reuseTimeout; }
inline static IConfig *create() { return new Config(); }
inline uint64_t diff() const { return m_diff; }
inline Workers::Mode workersMode() const { return m_workersMode; }
private:
void setCustomDiff(uint64_t diff);
void setMode(const char *mode);
void setWorkersMode(const rapidjson::Value &value);
BindHosts m_bind;
bool m_algoExt = true;
bool m_customDiffStats = false;
bool m_debug = false;
int m_mode = NICEHASH_MODE;
int m_reuseTimeout = 0;
String m_accessLog;
String m_password;
uint64_t m_diff = 0;
Workers::Mode m_workersMode = Workers::RigID;
};
} /* namespace xmrig */
#endif /* XMRIG_CONFIG_H */