Skip to content

Commit

Permalink
Bug fix 4 mihomo
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Feb 18, 2024
1 parent 4af148f commit 4717b63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion v2rayN/v2rayN/Handler/LazyConfig.cs
Expand Up @@ -12,6 +12,7 @@ public sealed class LazyConfig
public static LazyConfig Instance => _instance.Value;

private int? _statePort;

public int StatePort
{
get
Expand Down Expand Up @@ -349,7 +350,7 @@ private void InitCoreInfo()
{
coreType = ECoreType.mihomo,
coreExes = new List<string> { $"mihomo-windows-amd64{(Avx2.X64.IsSupported ? "" : "-compatible")}", "mihomo-windows-amd64-compatible", "mihomo-windows-amd64", "mihomo-windows-386", "mihomo", "clash" },
arguments = "-f config.yaml",
arguments = "-f config.json",
coreUrl = Global.MihomoCoreUrl,
coreReleaseApiUrl = Global.MihomoCoreUrl.Replace(Global.GithubUrl, Global.GithubApiUrl),
match = "Mihomo",
Expand Down
4 changes: 3 additions & 1 deletion v2rayN/v2rayN/Handler/UpdateHandle.cs
Expand Up @@ -54,7 +54,7 @@ public void CheckUpdateGuiN(Config config, Action<bool, string> update, bool pre
StartInfo = new ProcessStartInfo
{
FileName = "v2rayUpgrade.exe",
Arguments = fileName.AppendQuotes(),
Arguments = fileName.AppendQuotes(),
WorkingDirectory = Utils.StartupPath()
}
};
Expand Down Expand Up @@ -392,6 +392,7 @@ private SemanticVersion getCoreVersion(ECoreType type)

case ECoreType.clash:
case ECoreType.clash_meta:
case ECoreType.mihomo:
version = Regex.Match(echo, $"v[0-9.]+").Groups[0].Value;
break;

Expand Down Expand Up @@ -453,6 +454,7 @@ private void responseHandler(ECoreType type, string gitHubReleaseApi, bool preRe
}
case ECoreType.clash:
case ECoreType.clash_meta:
case ECoreType.mihomo:
{
curVersion = getCoreVersion(type);
message = string.Format(ResUI.IsLatestCore, type, curVersion);
Expand Down

0 comments on commit 4717b63

Please sign in to comment.