Compare commits

...

2 Commits

Author SHA1 Message Date
dependabot[bot] 9272711dfb Bump TUnit from 1.73.19 to 1.75.0
---
updated-dependencies:
- dependency-name: TUnit
  dependency-version: 1.75.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-14 00:30:15 +00:00
DHR60 f1023e08e1 Fix (#10344)
* chore. update core urls

* Fix clash delay
2026-10-13 20:36:41 +08:00
3 changed files with 30 additions and 10 deletions
+1 -1
View File
@@ -27,7 +27,7 @@
<PackageVersion Include="sqlite-net-e" Version="1.11.285" />
<PackageVersion Include="Repobot.SQLite.Unofficial" Version="3.53.4.1" />
<PackageVersion Include="TaskScheduler" Version="2.12.2" />
<PackageVersion Include="TUnit" Version="1.73.19" />
<PackageVersion Include="TUnit" Version="1.75.0" />
<PackageVersion Include="TUnit.Assertions.Should" Version="1.72.16-beta" />
<PackageVersion Include="WebDav.Client" Version="2.9.0" />
<PackageVersion Include="YamlDotNet" Version="18.1.0" />
+3 -3
View File
@@ -656,10 +656,10 @@ public class Global
{ ECoreType.Xray, "XTLS/Xray-core" },
{ ECoreType.sing_box, "SagerNet/sing-box" },
{ ECoreType.mihomo, "MetaCubeX/mihomo" },
{ ECoreType.hysteria, "apernet/hysteria" },
{ ECoreType.hysteria2, "apernet/hysteria" },
{ ECoreType.hysteria, "HyNetworks/hysteria" },
{ ECoreType.hysteria2, "HyNetworks/hysteria" },
{ ECoreType.naiveproxy, "klzgrad/naiveproxy" },
{ ECoreType.tuic, "EAimTY/tuic" },
{ ECoreType.tuic, "tuic-protocol/tuic" },
{ ECoreType.juicity, "juicity/juicity" },
{ ECoreType.brook, "txthinking/brook" },
{ ECoreType.overtls, "ShadowsocksR-Live/overtls" },
@@ -2,7 +2,7 @@ namespace ServiceLib.ViewModels;
public partial class ClashProxiesViewModel : MyReactiveObject
{
private readonly int _delayTimeout = 99999999;
private const int _delayTimeout = 99999999;
private ClashItem _clashItem = new();
public ClashProxiesViewModel()
@@ -235,6 +235,11 @@ public partial class ClashProxiesViewModel : MyReactiveObject
{
return;
}
var dicCurrentDetails = new Dictionary<string, ClashProxyModel>();
foreach (var item in ProxyDetails)
{
dicCurrentDetails.TryAdd(item.Name, item);
}
var lstDetails = new List<ClashProxyModel>();
foreach (var item in proxy.all)
{
@@ -243,15 +248,29 @@ public partial class ClashProxiesViewModel : MyReactiveObject
{
continue;
}
var delay = proxy2.history?.Count > 0 ? proxy2.history.Last().delay : -1;
var delay = -1;
var hasData = false;
if (proxy2.history is { Count: > 0 })
{
delay = proxy2.history.Last().delay;
hasData = true;
}
else if (dicCurrentDetails.TryGetValue(item, out var detail))
{
delay = detail.Delay;
hasData = true;
}
var isValidDelay = delay is > 0 and not _delayTimeout;
lstDetails.Add(new ClashProxyModel
{
IsActive = item == proxy.now,
Name = item,
Type = proxy2.type,
Delay = delay <= 0 ? _delayTimeout : delay,
DelayName = delay <= 0 ? string.Empty : $"{delay}ms",
Delay = isValidDelay ? delay : _delayTimeout,
DelayName = !hasData ? string.Empty : (isValidDelay ? $"{delay}ms" : "-1"),
});
}
// sort
@@ -362,8 +381,9 @@ public partial class ClashProxiesViewModel : MyReactiveObject
{
return;
}
detail.Delay = Convert.ToInt32(result.Delay);
detail.DelayName = $"{detail.Delay}ms";
var isValid = int.TryParse(result.Delay, out var delay) && delay > 0 && delay != _delayTimeout;
detail.Delay = isValid ? delay : _delayTimeout;
detail.DelayName = isValid ? $"{delay}ms" : "-1";
await Task.CompletedTask;
}