mirror of
https://github.com/SpaceTimee/Sheas-Cealer.git
synced 2025-07-13 12:52:08 +08:00
Compare commits
2 Commits
f428de3fd7
...
8a81ba59dc
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8a81ba59dc | ||
![]() |
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>
|
||||
/// 查找类似 Mihomo failed to launch 的本地化字符串。
|
||||
/// </summary>
|
||||
|
@ -285,6 +285,9 @@
|
||||
<data name="_KillBrowserProcessPrompt" xml:space="preserve">
|
||||
<value>All processes of the selected browser will be closed before launching. Do you want to continue?</value>
|
||||
</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">
|
||||
<value>Mihomo failed to launch</value>
|
||||
</data>
|
||||
|
@ -285,6 +285,9 @@
|
||||
<data name="_KillBrowserProcessPrompt" xml:space="preserve">
|
||||
<value>启动前将关闭所选浏览器的所有进程,是否继续?</value>
|
||||
</data>
|
||||
<data name="_LaunchHostsNginxPrompt" xml:space="preserve">
|
||||
<value>正在使用基于 Hosts 的非泛域名全局伪造,是否继续?</value>
|
||||
</data>
|
||||
<data name="_LaunchMihomoErrorMsg" xml:space="preserve">
|
||||
<value>Mihomo 启动失败</value>
|
||||
</data>
|
||||
|
@ -85,8 +85,6 @@ public partial class MainWin : Window
|
||||
foreach (string cealHostPath in Directory.GetFiles(CealHostWatcher.Path, CealHostWatcher.Filter))
|
||||
CealHostWatcher_Changed(null!, new(new(), Path.GetDirectoryName(cealHostPath)!, Path.GetFileName(cealHostPath)));
|
||||
|
||||
MihomoConfWatcher_Changed(null!, null!);
|
||||
|
||||
if (MainConst.IsAdmin && !MainPres.IsConginxRunning && !MainPres.IsNginxRunning)
|
||||
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) ||
|
||||
(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) ||
|
||||
(sender != null && MessageBox.Show(MainConst._LaunchHostsNginxPrompt, 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))
|
||||
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";
|
||||
|
||||
NginxConfWatcher_Changed(null!, null!);
|
||||
MihomoConfWatcher_Changed(null!, null!);
|
||||
}
|
||||
}
|
||||
private async void NginxConfWatcher_Changed(object sender, FileSystemEventArgs e)
|
||||
@ -799,7 +799,7 @@ public partial class MainWin : Window
|
||||
.AddOrUpdate("events:worker_connections", "65536")
|
||||
.AddOrUpdate("http:proxy_set_header", "Host $http_host")
|
||||
.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}]:return", "https://$host$request_uri");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user