mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-27 15:45:06 +03:00
Add process to routing domains
https://github.com/2dust/v2rayN/issues/8757
This commit is contained in:
@@ -277,7 +277,7 @@ public partial class CoreConfigSingboxService
|
||||
}
|
||||
}
|
||||
|
||||
if (_config.TunModeItem.EnableTun && item.Process?.Count > 0)
|
||||
if (item.Process?.Count > 0)
|
||||
{
|
||||
var ruleProcName = JsonUtils.DeepCopy(rule3);
|
||||
ruleProcName.process_name ??= [];
|
||||
@@ -304,11 +304,7 @@ public partial class CoreConfigSingboxService
|
||||
}
|
||||
|
||||
// sing-box strictly matches the exe suffix on Windows
|
||||
var procName = process;
|
||||
if (Utils.IsWindows() && !procName.EndsWith(".exe", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
procName += ".exe";
|
||||
}
|
||||
var procName = Utils.GetExeName(process);
|
||||
|
||||
ruleProcName.process_name.Add(procName);
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ public partial class CoreConfigV2rayService
|
||||
v2rayConfig.routing.rules.Add(it);
|
||||
hasDomainIp = true;
|
||||
}
|
||||
if (_config.TunModeItem.EnableTun && rule.process?.Count > 0)
|
||||
if (rule.process?.Count > 0)
|
||||
{
|
||||
var it = JsonUtils.DeepCopy(rule);
|
||||
it.domain = null;
|
||||
|
||||
Reference in New Issue
Block a user