Compare commits

...

2 commits

Author SHA1 Message Date
2dust
2ab1b9068f up 7.12.4
Some checks failed
release Linux / build (Release) (push) Has been cancelled
release macOS / build (Release) (push) Has been cancelled
release Windows desktop (Avalonia UI) / build (Release) (push) Has been cancelled
release Windows / build (Release) (push) Has been cancelled
2025-05-21 20:00:41 +08:00
DHR60
b9613875ce
Determine .exe suffix based on OS in GenRoutingDirectExe (#7322)
* Determine .exe suffix based on OS in GenRoutingDirectExe

* Uses Utils.GetExeName
2025-05-21 19:57:23 +08:00
2 changed files with 16 additions and 14 deletions

View file

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<Version>7.12.3</Version>
<Version>7.12.4</Version>
</PropertyGroup>
<PropertyGroup>

View file

@ -1048,28 +1048,30 @@ public class CoreConfigSingboxService
private void GenRoutingDirectExe(out List<string> lstDnsExe, out List<string> lstDirectExe)
{
lstDnsExe = new();
lstDirectExe = new();
var coreInfo = CoreInfoHandler.Instance.GetCoreInfo();
foreach (var it in coreInfo)
var dnsExeSet = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
var directExeSet = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
var coreInfoResult = CoreInfoHandler.Instance.GetCoreInfo();
foreach (var coreConfig in coreInfoResult)
{
if (it.CoreType == ECoreType.v2rayN)
if (coreConfig.CoreType == ECoreType.v2rayN)
{
continue;
}
foreach (var it2 in it.CoreExes)
foreach (var baseExeName in coreConfig.CoreExes)
{
if (!lstDnsExe.Contains(it2) && it.CoreType != ECoreType.sing_box)
if (coreConfig.CoreType != ECoreType.sing_box)
{
lstDnsExe.Add($"{it2}.exe");
dnsExeSet.Add(Utils.GetExeName(baseExeName));
}
directExeSet.Add(Utils.GetExeName(baseExeName));
}
}
if (!lstDirectExe.Contains(it2))
{
lstDirectExe.Add($"{it2}.exe");
}
}
}
lstDnsExe = new List<string>(dnsExeSet);
lstDirectExe = new List<string>(directExeSet);
}
private async Task<int> GenRoutingUserRule(RulesItem item, List<Rule4Sbox> rules)