1.1.1 -> 1.1.2 第50次更新

This commit is contained in:
Space Time 2024-10-07 13:38:48 +08:00
parent 605c6e61a3
commit 56cbb7ec09
4 changed files with 22 additions and 1 deletions

View File

@ -159,6 +159,15 @@ namespace Sheas_Cealer.Consts {
} }
} }
/// <summary>
/// 查找类似 Warning: The proxy core is under attack and cannot forge SNI. The SNI removal mode has been turned on urgently. Do you want to continue? 的本地化字符串。
/// </summary>
public static string _LaunchNginxFlashingPrompt {
get {
return ResourceManager.GetString("_LaunchNginxFlashingPrompt", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Please remember to come back and stop the proxy manually after use. Do you want to continue? 的本地化字符串。 /// 查找类似 Please remember to come back and stop the proxy manually after use. Do you want to continue? 的本地化字符串。
/// </summary> /// </summary>

View File

@ -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="_LaunchNginxFlashingPrompt" xml:space="preserve">
<value>Warning: The proxy core is under attack and cannot forge SNI. The SNI removal mode has been turned on urgently. Do you want to continue?</value>
</data>
<data name="_LaunchProxyPrompt" xml:space="preserve"> <data name="_LaunchProxyPrompt" xml:space="preserve">
<value>Please remember to come back and stop the proxy manually after use. Do you want to continue?</value> <value>Please remember to come back and stop the proxy manually after use. Do you want to continue?</value>
</data> </data>

View File

@ -285,6 +285,9 @@
<data name="_KillBrowserProcessPrompt" xml:space="preserve"> <data name="_KillBrowserProcessPrompt" xml:space="preserve">
<value>启动前将关闭所选浏览器的所有进程,是否继续?</value> <value>启动前将关闭所选浏览器的所有进程,是否继续?</value>
</data> </data>
<data name="_LaunchNginxFlashingPrompt" xml:space="preserve">
<value>Warning: 代理核心正在遭受攻击,无法伪造 SNI已紧急开启 SNI 拔除模式,是否继续?</value>
</data>
<data name="_LaunchProxyPrompt" xml:space="preserve"> <data name="_LaunchProxyPrompt" xml:space="preserve">
<value>使用完请务必记得回来手动关闭代理,是否继续?</value> <value>使用完请务必记得回来手动关闭代理,是否继续?</value>
</data> </data>

View File

@ -182,8 +182,12 @@ public partial class MainWin : Window
if (!MainPres!.IsNginxRunning) if (!MainPres!.IsNginxRunning)
{ {
if (string.IsNullOrWhiteSpace(CealArgs))
throw new Exception(MainConst._HostErrorMsg);
if (MessageBox.Show(MainConst._LaunchProxyPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes) if (MessageBox.Show(MainConst._LaunchProxyPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes)
return; return;
if (MainPres.IsFlashing && MessageBox.Show(MainConst._LaunchNginxFlashingPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes)
return;
if (!File.Exists(MainConst.NginxConfPath)) if (!File.Exists(MainConst.NginxConfPath))
File.Create(MainConst.NginxConfPath).Dispose(); File.Create(MainConst.NginxConfPath).Dispose();
@ -429,6 +433,7 @@ public partial class MainWin : Window
{ {
MessageBox.Show(MainConst._GameStartMsg); MessageBox.Show(MainConst._GameStartMsg);
MainPres.IsFlashing = true; MainPres.IsFlashing = true;
NginxConfWatcher_Changed(null!, null!);
Random random = new(); Random random = new();
@ -451,6 +456,7 @@ public partial class MainWin : Window
} }
MainPres.IsFlashing = false; MainPres.IsFlashing = false;
NginxConfWatcher_Changed(null!, null!);
MessageBox.Show(MainConst._GameEndingMsg); MessageBox.Show(MainConst._GameEndingMsg);
} }
else else
@ -552,7 +558,7 @@ public partial class MainWin : Window
.AddOrUpdate("worker_processes", "auto") .AddOrUpdate("worker_processes", "auto")
.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", "on") .AddOrUpdate("http:proxy_ssl_server_name", !MainPres.IsFlashing ? "on" : "off")
.AddOrUpdate("http:server:return", "https://$host$request_uri"); .AddOrUpdate("http:server:return", "https://$host$request_uri");
foreach (List<(List<(string hostIncludeDomain, string hostExcludeDomain)> hostDomainPairs, string hostSni, string hostIp)> hostRules in HostRulesDict.Values) foreach (List<(List<(string hostIncludeDomain, string hostExcludeDomain)> hostDomainPairs, string hostSni, string hostIp)> hostRules in HostRulesDict.Values)