add extra core process path to direct

This commit is contained in:
Nova 2025-05-15 12:23:20 +03:30
parent 417d5153dc
commit b3962066da
3 changed files with 14 additions and 0 deletions

View File

@ -81,6 +81,7 @@ namespace NekoGui {
static QStringList get_attributes();
static inputType get_input_type(const QString& fieldName);
static QStringList get_values_for_field(const QString& fieldName);
static std::shared_ptr<RouteRule> get_processPath_direct_rule(QString processPath);
QStringList get_current_value_string(const QString& fieldName);
[[nodiscard]] QString get_current_value_bool(const QString& fieldName) const;
void set_field_value(const QString& fieldName, const QStringList& value);

View File

@ -437,6 +437,7 @@ namespace NekoGui {
status->result->extraCoreData->config = bean->extraCoreConf;
status->result->extraCoreData->configDir = GetBasePath();
status->result->extraCoreData->noLog = bean->noLogs;
routeChain->Rules << RouteRule::get_processPath_direct_rule(bean->extraCorePath);
}
// Direct domains

View File

@ -443,6 +443,18 @@ namespace NekoGui {
return false;
}
std::shared_ptr<RouteRule> RouteRule::get_processPath_direct_rule(QString processPath)
{
auto res = std::make_shared<RouteRule>();
res->name = "AutoGenerated direct extra core";
res->action = "route";
res->outboundID = -2;
res->process_path = {processPath};
return res;
}
bool isOutboundIDValid(int id) {
switch (id) {
case -1: