Skip to content

知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.

fix(windows): a server on the local network that can't be reached no longer gets advice to turn on a proxy

wquguru9bbf2f78f0f9
diff --git a/windows/src/Cicada.Core/AICheck.cs b/windows/src/Cicada.Core/AICheck.cs
index da770dc..5d4b216 100644
--- a/windows/src/Cicada.Core/AICheck.cs
+++ b/windows/src/Cicada.Core/AICheck.cs
@@ -272,7 +272,8 @@ public sealed class AICheck
/// The proxy line under "can't reach": what this computer's proxy looks like, and what to do.
public string? ProxyLine(string service, string host)
{
- if (Failure?.Why != Reason.Unreachable || Proxy is not { } p) return null;
+ // A server on this PC or the local network: a proxy has nothing to do with it.
+ if (Failure?.Why != Reason.Unreachable || Proxy is not { } p || AIProvider.IsNearby(host)) return null;
return p.Kind switch
{
ProxyKind.SystemOn => Strings.LF("开了代理也连不上:换一个节点,或检查代理软件是否放过 %@。", host),
diff --git a/windows/src/Cicada/AICheckView.cs b/windows/src/Cicada/AICheckView.cs
index 4e42a17..6b8056f 100644
--- a/windows/src/Cicada/AICheckView.cs
+++ b/windows/src/Cicada/AICheckView.cs
@@ -98,6 +98,8 @@ static class AICheckView
switch (f.Why)
{
case AICheck.Reason.Unreachable:
+ // A proxy has nothing to do with a server on this PC or the local network.
+ if (AIProvider.IsNearby(ling.ServiceHost)) return recheck;
return [(L("怎么设置代理"), () => Open(AICheck.HelpUrl)), .. recheck];
case AICheck.Reason.InvalidKey or AICheck.Reason.MgmtKey:
return p.Site is { } site ? [(L("更换 key"), changeKey), (LF("打开 %@", ling.ServiceName), () => Open(site))] : [(L("更换 key"), changeKey)];