mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 12:34:37 +03:00
improve switch core
use different datastore for each core
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user