improve switch core

use different datastore for each core
This commit is contained in:
arm64v8a
2022-10-08 12:57:16 +08:00
parent 8f4dfbbc00
commit 26c3914ef2
8 changed files with 54 additions and 37 deletions

View File

@@ -724,17 +724,17 @@ namespace NekoRay {
});
// api
result->coreConfig.insert("experimental", QJsonObject{
{"v2ray_api", QJsonObject{
{"listen", "127.0.0.1:" + Int2String(dataStore->inbound_socks_port + 10)},
{"stats", QJsonObject{
{"enabled", true},
{"outbounds", QJsonArray{
tagProxy, "bypass", "block"
}},
}}
}},
});
if (dataStore->traffic_loop_interval > 0) {
result->coreConfig.insert("experimental", QJsonObject{
{"v2ray_api", QJsonObject{
{"listen", "127.0.0.1:" + Int2String(dataStore->inbound_socks_port + 10)},
{"stats", QJsonObject{
{"enabled", true},
{"outbounds", QJsonArray{tagProxy, "bypass"}},
}}
}},
});
}
return result;
}