mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 05:30:06 +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 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);
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user