mirror of
https://github.com/SpaceTimee/Sheas-Cealer.git
synced 2025-07-13 12:52:08 +08:00
1.1.5 (alpha) 更新
This commit is contained in:
parent
f428de3fd7
commit
d748976aa9
9
Consts/MainMultilangConst.Designer.cs
generated
9
Consts/MainMultilangConst.Designer.cs
generated
@ -150,6 +150,15 @@ namespace Sheas_Cealer.Consts {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 You are using hosts-based non-wildcard domain global cealing. Do you want to continue? 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string _LaunchHostsNginxPrompt {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("_LaunchHostsNginxPrompt", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Mihomo failed to launch 的本地化字符串。
|
/// 查找类似 Mihomo failed to launch 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -285,6 +285,9 @@
|
|||||||
<data name="_KillBrowserProcessPrompt" xml:space="preserve">
|
<data name="_KillBrowserProcessPrompt" xml:space="preserve">
|
||||||
<value>All processes of the selected browser will be closed before launching. Do you want to continue?</value>
|
<value>All processes of the selected browser will be closed before launching. Do you want to continue?</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="_LaunchHostsNginxPrompt" xml:space="preserve">
|
||||||
|
<value>You are using hosts-based non-wildcard domain global cealing. Do you want to continue?</value>
|
||||||
|
</data>
|
||||||
<data name="_LaunchMihomoErrorMsg" xml:space="preserve">
|
<data name="_LaunchMihomoErrorMsg" xml:space="preserve">
|
||||||
<value>Mihomo failed to launch</value>
|
<value>Mihomo failed to launch</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -285,6 +285,9 @@
|
|||||||
<data name="_KillBrowserProcessPrompt" xml:space="preserve">
|
<data name="_KillBrowserProcessPrompt" xml:space="preserve">
|
||||||
<value>启动前将关闭所选浏览器的所有进程,是否继续?</value>
|
<value>启动前将关闭所选浏览器的所有进程,是否继续?</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="_LaunchHostsNginxPrompt" xml:space="preserve">
|
||||||
|
<value>正在使用基于 Hosts 的非泛域名全局伪造,是否继续?</value>
|
||||||
|
</data>
|
||||||
<data name="_LaunchMihomoErrorMsg" xml:space="preserve">
|
<data name="_LaunchMihomoErrorMsg" xml:space="preserve">
|
||||||
<value>Mihomo 启动失败</value>
|
<value>Mihomo 启动失败</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -12,7 +12,7 @@ internal class AboutVersionButtonContentConv : IMultiValueConverter
|
|||||||
string versionButtonVersionContent = (string)values[1];
|
string versionButtonVersionContent = (string)values[1];
|
||||||
bool isSheasCealerUtd = (bool)values[2];
|
bool isSheasCealerUtd = (bool)values[2];
|
||||||
|
|
||||||
return $"{versionButtonLabelContent} {versionButtonVersionContent}" + (isSheasCealerUtd ? string.Empty : " *");
|
return $"{versionButtonVersionContent} (alpha)" + (isSheasCealerUtd ? string.Empty : " *");
|
||||||
}
|
}
|
||||||
|
|
||||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) => throw new NotImplementedException();
|
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) => throw new NotImplementedException();
|
||||||
|
@ -85,8 +85,6 @@ public partial class MainWin : Window
|
|||||||
foreach (string cealHostPath in Directory.GetFiles(CealHostWatcher.Path, CealHostWatcher.Filter))
|
foreach (string cealHostPath in Directory.GetFiles(CealHostWatcher.Path, CealHostWatcher.Filter))
|
||||||
CealHostWatcher_Changed(null!, new(new(), Path.GetDirectoryName(cealHostPath)!, Path.GetFileName(cealHostPath)));
|
CealHostWatcher_Changed(null!, new(new(), Path.GetDirectoryName(cealHostPath)!, Path.GetFileName(cealHostPath)));
|
||||||
|
|
||||||
MihomoConfWatcher_Changed(null!, null!);
|
|
||||||
|
|
||||||
if (MainConst.IsAdmin && !MainPres.IsConginxRunning && !MainPres.IsNginxRunning)
|
if (MainConst.IsAdmin && !MainPres.IsConginxRunning && !MainPres.IsNginxRunning)
|
||||||
await NginxCleaner.Clean();
|
await NginxCleaner.Clean();
|
||||||
|
|
||||||
@ -217,6 +215,7 @@ public partial class MainWin : Window
|
|||||||
(CealHostRulesDict.ContainsValue(null!) && MessageBox.Show(MainConst._CealHostErrorPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes) ||
|
(CealHostRulesDict.ContainsValue(null!) && MessageBox.Show(MainConst._CealHostErrorPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes) ||
|
||||||
(NginxHttpsPort != 443 && MessageBox.Show(string.Format(MainConst._NginxHttpsPortOccupiedPrompt, NginxHttpsPort), string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes) ||
|
(NginxHttpsPort != 443 && MessageBox.Show(string.Format(MainConst._NginxHttpsPortOccupiedPrompt, NginxHttpsPort), string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes) ||
|
||||||
(NginxHttpPort != 80 && MessageBox.Show(string.Format(MainConst._NginxHttpPortOccupiedPrompt, NginxHttpPort), string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes) ||
|
(NginxHttpPort != 80 && MessageBox.Show(string.Format(MainConst._NginxHttpPortOccupiedPrompt, NginxHttpPort), string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes) ||
|
||||||
|
(sender != null && MessageBox.Show(MainConst._LaunchHostsNginxPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes) ||
|
||||||
(MessageBox.Show(MainConst._LaunchProxyPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes) ||
|
(MessageBox.Show(MainConst._LaunchProxyPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes) ||
|
||||||
(MainPres.IsFlashing && MessageBox.Show(MainConst._LaunchNginxFlashingPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes))
|
(MainPres.IsFlashing && MessageBox.Show(MainConst._LaunchNginxFlashingPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes))
|
||||||
return;
|
return;
|
||||||
@ -755,6 +754,7 @@ public partial class MainWin : Window
|
|||||||
CealArgs = @$"--host-rules=""{hostRules.TrimEnd(',')}"" --host-resolver-rules=""{hostResolverRules.TrimEnd(',')}"" --test-type --ignore-certificate-errors";
|
CealArgs = @$"--host-rules=""{hostRules.TrimEnd(',')}"" --host-resolver-rules=""{hostResolverRules.TrimEnd(',')}"" --test-type --ignore-certificate-errors";
|
||||||
|
|
||||||
NginxConfWatcher_Changed(null!, null!);
|
NginxConfWatcher_Changed(null!, null!);
|
||||||
|
MihomoConfWatcher_Changed(null!, null!);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private async void NginxConfWatcher_Changed(object sender, FileSystemEventArgs e)
|
private async void NginxConfWatcher_Changed(object sender, FileSystemEventArgs e)
|
||||||
@ -799,7 +799,7 @@ public partial class MainWin : Window
|
|||||||
.AddOrUpdate("events:worker_connections", "65536")
|
.AddOrUpdate("events:worker_connections", "65536")
|
||||||
.AddOrUpdate("http:proxy_set_header", "Host $http_host")
|
.AddOrUpdate("http:proxy_set_header", "Host $http_host")
|
||||||
.AddOrUpdate("http:proxy_ssl_server_name", !MainPres.IsFlashing ? "on" : "off")
|
.AddOrUpdate("http:proxy_ssl_server_name", !MainPres.IsFlashing ? "on" : "off")
|
||||||
.AddOrUpdate("http:proxy_buffer_size", "8k")
|
.AddOrUpdate("http:proxy_buffer_size", "14k")
|
||||||
.AddOrUpdate($"http:server[{serverIndex}]:listen", $"{NginxHttpPort} default_server")
|
.AddOrUpdate($"http:server[{serverIndex}]:listen", $"{NginxHttpPort} default_server")
|
||||||
.AddOrUpdate($"http:server[{serverIndex}]:return", "https://$host$request_uri");
|
.AddOrUpdate($"http:server[{serverIndex}]:return", "https://$host$request_uri");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user