mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-24 10:33:15 +08:00
add extra core process path to direct
This commit is contained in:
parent
417d5153dc
commit
b3962066da
@ -81,6 +81,7 @@ namespace NekoGui {
|
|||||||
static QStringList get_attributes();
|
static QStringList get_attributes();
|
||||||
static inputType get_input_type(const QString& fieldName);
|
static inputType get_input_type(const QString& fieldName);
|
||||||
static QStringList get_values_for_field(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);
|
QStringList get_current_value_string(const QString& fieldName);
|
||||||
[[nodiscard]] QString get_current_value_bool(const QString& fieldName) const;
|
[[nodiscard]] QString get_current_value_bool(const QString& fieldName) const;
|
||||||
void set_field_value(const QString& fieldName, const QStringList& value);
|
void set_field_value(const QString& fieldName, const QStringList& value);
|
||||||
|
|||||||
@ -437,6 +437,7 @@ namespace NekoGui {
|
|||||||
status->result->extraCoreData->config = bean->extraCoreConf;
|
status->result->extraCoreData->config = bean->extraCoreConf;
|
||||||
status->result->extraCoreData->configDir = GetBasePath();
|
status->result->extraCoreData->configDir = GetBasePath();
|
||||||
status->result->extraCoreData->noLog = bean->noLogs;
|
status->result->extraCoreData->noLog = bean->noLogs;
|
||||||
|
routeChain->Rules << RouteRule::get_processPath_direct_rule(bean->extraCorePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Direct domains
|
// Direct domains
|
||||||
|
|||||||
@ -443,6 +443,18 @@ namespace NekoGui {
|
|||||||
return false;
|
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) {
|
bool isOutboundIDValid(int id) {
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case -1:
|
case -1:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user