Windows 0.3.6 runtime preflight and update download reliability source delta; connection fixes retained; no private history or other platform changes

This commit is contained in:
2026-11-06 15:28:10 +00:00
parent 23a87387b8
commit ac40dd3a6c
18 changed files with 599 additions and 58 deletions
+10 -7
View File
@@ -54,7 +54,7 @@ internal static class NodeTransportConnector
diagnostic?.Invoke(new("rebind_selected", tailnet ? "tailnet_verified" : "public_ingress", ""));
return selected;
}
catch (Exception e) when (tailnet && e is not LocalNetworkException && !token.IsCancellationRequested)
catch (Exception e) when (tailnet && e is not LocalNetworkException && e is not ClientRuntimeException && !token.IsCancellationRequested)
{
await stop(); // Full cleanup before same-node fallback; failure aborts.
token.ThrowIfCancellationRequested();
@@ -88,7 +88,7 @@ internal static class NodeTransportConnector
requireRoute(TailnetTransport.Address(tailnet)!);
token.ThrowIfCancellationRequested();
}
catch (Exception e) when (e is not OperationCanceledException)
catch (Exception e) when (e is not OperationCanceledException && e is not ClientRuntimeException)
{
preference.Failed(response.Node.Slug, ticks());
tailnet = null;
@@ -106,7 +106,7 @@ internal static class NodeTransportConnector
throw new IOException("代理内网 IP Ping 不通。");
token.ThrowIfCancellationRequested();
}
catch (Exception e) when (e is not OperationCanceledException)
catch (Exception e) when (e is not OperationCanceledException && e is not ClientRuntimeException)
{
preference.Failed(response.Node.Slug, ticks());
tailnet = null;
@@ -132,6 +132,7 @@ internal static class NodeTransportConnector
return true;
}
catch (LocalNetworkException) { throw; }
catch (ClientRuntimeException) { throw; }
catch (OperationCanceledException) when (token.IsCancellationRequested) { throw; }
catch (Exception)
{
@@ -147,11 +148,13 @@ internal static class NodeTransportConnector
// Automatic selection can test ALL authorized Tailnet nodes first. A
// failed alternate must not launch public ingress before that pass ends.
if (tailnetOnly) throw new TailnetUnavailableException(reason);
if (response.ConnectionScope != PrivateAuxiliaryRouting.Scope && response.RouteMode is "smart" or "global")
preference.CommitDomainFallback();
Report("selected", "public_ingress");
await start(response.GetRuntimeConfigJson(), token);
var commitDomain = response.ConnectionScope != PrivateAuxiliaryRouting.Scope && response.RouteMode is "smart" or "global";
try { await start(response.GetRuntimeConfigJson(), token); }
catch (ClientRuntimeException) { throw; }
catch { if (commitDomain) preference.CommitDomainFallback(); throw; }
if (commitDomain) preference.CommitDomainFallback();
token.ThrowIfCancellationRequested();
Report("selected", "public_ingress");
return false;
}
}