Compare commits

...

14 Commits

Author SHA1 Message Date
Space Time
e1b1c606e1 1.1.4 -> 1.1.5 第29次更新 2025-06-26 13:03:30 +08:00
Space Time
46de61c4f2 1.1.4 -> 1.1.5 第28次更新 2025-06-25 22:15:17 +08:00
Space Time
479c16c2a1 1.1.4 -> 1.1.5 第27次更新 2025-06-06 10:35:25 +08:00
Space Time
938ca77fc1 1.1.4 -> 1.1.5 第26次更新 2025-06-05 09:27:48 +08:00
Space Time
d9e307e647 1.1.4 -> 1.1.5 第25次更新 2025-06-05 09:09:16 +08:00
Space Time
85213b61da 1.1.4 -> 1.1.5 第24次更新 2025-06-05 08:54:06 +08:00
Space Time
bf7772a35f 1.1.4 -> 1.1.5 第23次更新 2025-06-04 21:59:22 +08:00
Space Time
188e56b57b 1.1.4 -> 1.1.5 第22次更新 2025-05-25 13:48:04 +08:00
Space Time
0150440de4 1.1.4 -> 1.1.5 第21次更新 2025-03-18 15:56:27 +08:00
Space Time
c25888bd5a 1.1.4 -> 1.1.5 第20次更新 2025-03-10 17:17:34 +08:00
Space Time
a97b04e5d9 1.1.4 -> 1.1.5 第19次更新 2025-03-03 17:03:23 +08:00
Space Time
b3dc94eb2b 1.1.4 -> 1.1.5 第18次更新 2025-03-01 12:44:47 +08:00
Space Time
597e441af5 1.1.4 -> 1.1.5 第17次更新 2025-02-25 16:30:10 +08:00
Space Time
8a81ba59dc 1.1.4 -> 1.1.5 第16次更新 2024-12-30 18:50:41 +08:00
11 changed files with 78 additions and 113 deletions

View File

@ -10,7 +10,7 @@ internal abstract class AboutConst : AboutMultilangConst
public static string DeveloperButtonUrl => "https://www.spacetimee.xyz"; public static string DeveloperButtonUrl => "https://www.spacetimee.xyz";
public static string VersionButtonVersionContent => Assembly.GetExecutingAssembly().GetName().Version!.ToString()[..^2]; public static string VersionButtonVersionContent => Assembly.GetExecutingAssembly().GetName().Version!.ToString()[..^2];
public static string VersionButtonUrl => "https://spacetime.lanzouu.com/b017hp0lc"; public static string VersionButtonUrl => "https://github.com/SpaceTimee/Sheas-Cealer/releases/latest";
public static string EmailButtonUrl => "Zeus6_6@163.com"; public static string EmailButtonUrl => "Zeus6_6@163.com";
public static string DocumentationButtonUrl => "https://github.com/SpaceTimee/Sheas-Cealer/wiki/Sheas-Cealer-Documentation"; public static string DocumentationButtonUrl => "https://github.com/SpaceTimee/Sheas-Cealer/wiki/Sheas-Cealer-Documentation";

View File

@ -40,10 +40,13 @@ internal abstract partial class MainConst : MainMultilangConst
internal static string ComihomoPath => Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "Cealing-Comihomo.exe"); internal static string ComihomoPath => Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "Cealing-Comihomo.exe");
internal static string MihomoPath => Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "Cealing-Mihomo.exe"); internal static string MihomoPath => Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "Cealing-Mihomo.exe");
internal static string MihomoConfPath => Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "config.yaml"); internal static string MihomoConfPath => Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "config.yaml");
internal static string[] MihomoNameServers => ["https://doh.apad.pro/dns-query", "https://ns.net.kg/dns-query"]; internal static string[] MihomoNameServers => ["https://ns.net.kg/dns-query", "https://dnschina1.soraharu.com/dns-query", "https://0ms.dev/dns-query"];
internal static string NotifyIconText => "Sheas Cealer"; internal static string NotifyIconText => "Sheas Cealer";
[GeneratedRegex("^Cealing-Host-")]
internal static partial Regex CealHostPrefixRegex();
[GeneratedRegex(@"^(https?:\/\/)?[a-zA-Z0-9](-*[a-zA-Z0-9])*(\.[a-zA-Z0-9](-*[a-zA-Z0-9])*)*(:\d{1,5})?(\/[a-zA-Z0-9.\-_\~\!\$\&\'\(\)\*\+\,\;\=\:\@\%]*)*$")] [GeneratedRegex(@"^(https?:\/\/)?[a-zA-Z0-9](-*[a-zA-Z0-9])*(\.[a-zA-Z0-9](-*[a-zA-Z0-9])*)*(:\d{1,5})?(\/[a-zA-Z0-9.\-_\~\!\$\&\'\(\)\*\+\,\;\=\:\@\%]*)*$")]
internal static partial Regex UpstreamUrlRegex(); internal static partial Regex UpstreamUrlRegex();

View File

@ -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 $"{versionButtonVersionContent} (alpha)" + (isSheasCealerUtd ? string.Empty : " *"); return $"{versionButtonLabelContent} {versionButtonVersionContent}" + (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();

View File

@ -8,12 +8,7 @@ internal class BrowserProc : Proc
{ {
private readonly bool ShutDownAppOnProcessExit; private readonly bool ShutDownAppOnProcessExit;
internal BrowserProc(string browserPath, bool shutDownAppOnProcessExit) : base(browserPath) internal BrowserProc(string browserPath, bool shutDownAppOnProcessExit) : base(browserPath) => ShutDownAppOnProcessExit = shutDownAppOnProcessExit;
{
ShutDownAppOnProcessExit = shutDownAppOnProcessExit;
Process_Exited(null, EventArgs.Empty);
}
protected sealed override void Process_Exited(object? sender, EventArgs e) protected sealed override void Process_Exited(object? sender, EventArgs e)
{ {

View File

@ -6,9 +6,9 @@
[English README](README_EN.md) [English README](README_EN.md)
## 自我介绍 ## 自我介绍
**Sheas Cealer**: 一只基于 **WPF(.Net8)** 的 SNI 伪造工具 **Sheas Cealer**: 一只基于 **WPF(.Net8)**桌面端 SNI 伪造工具
* 适用平台: Windows (Win10 之前的系统版本请使用 [1.1.0](https://github.com/SpaceTimee/Sheas-Cealer/releases/tag/1.1.0)) * 适用平台: Windows (Win10 之前的系统版本请使用 [1.1.0](https://github.com/SpaceTimee/Sheas-Cealer/releases/tag/1.1.0)) (其他平台请参考[相关项目](https://github.com/SpaceTimee/Sheas-Cealer#相关项目))
## 词汇解释 ## 词汇解释
**[Sheas Cealer Dictionary](https://github.com/SpaceTimee/Sheas-Cealer/wiki/Sheas-Cealer-Dictionary)** **[Sheas Cealer Dictionary](https://github.com/SpaceTimee/Sheas-Cealer/wiki/Sheas-Cealer-Dictionary)**
@ -17,24 +17,24 @@
1. 内置伪造规则在 [Cealing Host 存储库](https://github.com/SpaceTimee/Cealing-Host) 持续更新 1. 内置伪造规则在 [Cealing Host 存储库](https://github.com/SpaceTimee/Cealing-Host) 持续更新
2. Sheas Cealer 更新时不会覆盖已有的伪造规则,如需与上游同步,需点击**更新上游规则**按钮,或**手动修改覆盖** 2. Sheas Cealer 更新时不会覆盖已有的伪造规则,如需与上游同步,需点击**更新上游规则**按钮,或**手动修改覆盖**
3. 本项目及所有相关资源仅供**抵御网络非法监听**和**开展网络安全研究**使用,无意绕过任何国家审查设备的审查 3. 本项目及所有相关资源仅供**抵御网络非法监听**和**开展网络安全研究**使用,无意绕过任何国家审查设备的审查
4. 为避免不必要的麻烦,使用前请先阅读**注意事项**和**用户协议** 4. 为避免不必要的麻烦,使用前请先阅读[**用户协议**](https://github.com/SpaceTimee/Sheas-Cealer#用户协议)
5. Sheas Cealer 仍处于**开发阶段**,但每个正式版发布前会尽量确保其**稳定可用** 5. Sheas Cealer 仍处于**开发阶段**,但每个正式版发布前会尽量确保其**稳定可用**
6. Github Release 中会保留目前能够使用的**所有版本**,但强烈推荐使用**最新版**
7. 注意事项第 3 条将从 2024.12.31 起正式严格执行
## 用户协议 ## 用户协议
1. [隐私政策](https://thoughts.teambition.com/share/6264eda98adeb10041b92fda#title=Sheas_Cealer_隐私政策) 1. [隐私政策](https://thoughts.teambition.com/share/6264eda98adeb10041b92fda#title=Sheas_Cealer_隐私政策)
2. [使用协议](https://thoughts.teambition.com/share/6264edd78adeb10041b92fdb#title=Sheas_Cealer_使用协议) 2. [使用协议](https://thoughts.teambition.com/share/6264edd78adeb10041b92fdb#title=Sheas_Cealer_使用协议)
## 下载地址 ## 下载地址
1. Github (首选): [https://github.com/SpaceTimee/Sheas-Cealer/releases](https://github.com/SpaceTimee/Sheas-Cealer/releases) 1. Github: [https://github.com/SpaceTimee/Sheas-Cealer/releases](https://github.com/SpaceTimee/Sheas-Cealer/releases)
2. 蓝奏云 (密码 3wnj) (大陆推荐): [https://spacetime.lanzouu.com/b017hp0lc](https://spacetime.lanzouu.com/b017hp0lc) 2. 群文件 (参与内测): 参考[联系方式](https://github.com/SpaceTimee/Sheas-Cealer#联系方式)
> 出于不可抗力因素Sheas Cealer 暂时无法再提供蓝奏云下载地址,在此依旧感谢蓝奏云一直以来的免费分发服务
## 安装方式 ## 安装方式
1. Setup 安装器 (首选): 下载 Sheas Cealer Setup.exe 并运行 -> 按照提示设置即可安装 1. Setup 安装器 (首选): 下载 Sheas Cealer Setup.exe 并运行 -> 按照提示设置即可安装
2. Zip 压缩包 (免安装): 下载 Sheas Cealer Zip.zip 并解压 -> 完成后即可直接使用 2. Zip 压缩包 (免安装): 下载 Sheas Cealer Zip.zip 并解压 -> 完成后即可直接使用
> Scd 版本: Scd 版本内置 .Net 运行时,可在缺乏 .Net 运行时的环境下运行,但代价是更大的文件体积以及更差跨平台能力,如果没有特殊原因,不建议使用 Scd 版本 > Scd 版本: Scd 版本内置 .Net 运行时,可在缺乏 .Net 运行时的环境下运行,但代价是更大的文件体积以及更差跨平台能力,如果没有特殊原因,不建议使用 Scd 版本
## 食用文档 ## 食用文档
**[Sheas Cealer Documentation](https://github.com/SpaceTimee/Sheas-Cealer/wiki/Sheas-Cealer-Documentation)** **[Sheas Cealer Documentation](https://github.com/SpaceTimee/Sheas-Cealer/wiki/Sheas-Cealer-Documentation)**
@ -53,20 +53,19 @@
**Space Time** **Space Time**
## 联系方式 ## 联系方式
1. **QQ 群 (主群): 716266896338919498** 1. **QQ 群: 1034315671716266896338919498**
2. TG 群 (分群): [PixCealerChat](https://t.me/PixCealerChat) 2. **TG 群: [PixCealerChat](https://t.me/PixCealerChat)**
3. **邮箱: Zeus6_6@163.com** 3. 邮箱: Zeus6_6@163.com
## 相关项目 ## 相关项目
1. [Cealing Host](https://github.com/SpaceTimee/Cealing-Host): 最新的 Sheas Cealer 内置伪造规则 1. [Sheas Cealer Droid](https://github.com/SpaceTimee/Sheas-Cealer-Droid): Sheas Cealer 安卓端
2. [Sheas Dop](https://github.com/SpaceTimee/Sheas-Dop): DNS 抗污染解析工具 (Sheas Cealer 全局净化子项目) 2. [Sheas Cealer Nix](https://github.com/SpaceTimee/Sheas-Cealer/tree/nix): Sheas Cealer 跨平台桌面端
3. [Sheas Nginx](https://github.com/SpaceTimee/Sheas-Nginx): Pixiv Nginx 启动器 (Sheas Cealer 全局伪造 × Pixiv Nginx 合作子项目) 3. [Cealing Host](https://github.com/SpaceTimee/Cealing-Host): 最新的 Sheas Cealer 内置伪造规则
4. [Bot CealingCat](https://github.com/SpaceTimee/Bot-CealingCat): 提供 Sheas Cealer 相关服务的 Telegram Bot 4. [Sheas Dop](https://github.com/SpaceTimee/Sheas-Dop): DNS 抗污染解析工具 (Sheas Cealer 全局净化子项目)
5. [Console HostChecker](https://github.com/SpaceTimee/Console-HostChecker): Cealing Host 自动化检查脚本 5. [Sheas Nginx](https://github.com/SpaceTimee/Sheas-Nginx): Pixiv Nginx 启动器 (Sheas Cealer 全局伪造 × Pixiv Nginx 合作子项目)
6. [Console HostGenerator](https://github.com/SpaceTimee/Console-HostGenerator): Cealing Host 自动化生成脚本 6. [Bot CealingCat](https://github.com/SpaceTimee/Bot-CealingCat): 提供 Sheas Cealer 相关服务的 Telegram Bot
7. [Console HostChecker](https://github.com/SpaceTimee/Console-HostChecker): Cealing Host 自动化检查脚本
## 推广合作 8. [Console HostGenerator](https://github.com/SpaceTimee/Console-HostGenerator): Cealing Host 自动化生成脚本
[产品社区营](https://mp.weixin.qq.com/s?__biz=MzI3MTQ0ODQ3Ng==&mid=2247487284&idx=1&sn=94fcb19438ddba204c4fbe4803edc062&chksm=eb6ebe23f78ca1c3a360e8b46558c14cb8360ad199a19cbc1b4b4b8e2379c98699f2d6eca5da)
## 许可证 ## 许可证
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSpaceTimee%2FSheas-Cealer.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FSpaceTimee%2FSheas-Cealer?ref=badge_large) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSpaceTimee%2FSheas-Cealer.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FSpaceTimee%2FSheas-Cealer?ref=badge_large)

View File

@ -6,9 +6,9 @@
[中文 README](README.md) [中文 README](README.md)
## About ## About
**Sheas Cealer**: A SNI concealing tool based on **WPF(.Net8)** **Sheas Cealer**: A desktop SNI concealing tool based on **WPF(.Net8)**
* Applicable platform: Windows (For system versions before Win10, please use [1.1.0](https://github.com/SpaceTimee/Sheas-Cealer/releases/tag/1.1.0)) * Applicable platform: Windows (For system versions before Win10, please use [1.1.0](https://github.com/SpaceTimee/Sheas-Cealer/releases/tag/1.1.0)) (For more platforms, please refer to [Projects](https://github.com/SpaceTimee/Sheas-Cealer#Projects))
## Vocabulary ## Vocabulary
**[Sheas Cealer Dictionary](https://github.com/SpaceTimee/Sheas-Cealer/wiki/Sheas-Cealer-Dictionary)** **[Sheas Cealer Dictionary](https://github.com/SpaceTimee/Sheas-Cealer/wiki/Sheas-Cealer-Dictionary)**
@ -17,10 +17,8 @@
1. The Built-in Cealing Host is continuously updated in the [Cealing Host repository](https://github.com/SpaceTimee/Cealing-Host) 1. The Built-in Cealing Host is continuously updated in the [Cealing Host repository](https://github.com/SpaceTimee/Cealing-Host)
2. When Sheas Cealer is updated, it will not overwrite the existing configs. If you need to synchronize with the upstream, you need to click the **Update Upstream Host** button, or **manually overwrite** 2. When Sheas Cealer is updated, it will not overwrite the existing configs. If you need to synchronize with the upstream, you need to click the **Update Upstream Host** button, or **manually overwrite**
3. This project and all its resources are for the sole purpose of **defending against illegal network monitoring** and **conducting network security research**, and are not intended to bypass the censorship of any country 3. This project and all its resources are for the sole purpose of **defending against illegal network monitoring** and **conducting network security research**, and are not intended to bypass the censorship of any country
4. Please read the **Notes** and **Agreements** before use 4. Please read the [**Agreements**](https://github.com/SpaceTimee/Sheas-Cealer#Agreements) before use
5. Sheas Cealer is still in the **development stage**, but each production version will be **stable and available** before release 5. Sheas Cealer is still in the **development stage**, but each production version will be **stable and available** before release
6. Github Release will retain **all versions** that can be used currently, but it is strongly recommended to use the **latest version**
7. Note 3 will be officially and strictly implemented from 2024.12.31
## Agreements ## Agreements
1. [Privacy Policy](https://thoughts.teambition.com/share/6264eda98adeb10041b92fda#title=Sheas_Cealer_隐私政策) 1. [Privacy Policy](https://thoughts.teambition.com/share/6264eda98adeb10041b92fda#title=Sheas_Cealer_隐私政策)
@ -28,14 +26,16 @@
## Download ## Download
1. Github (preferred): [https://github.com/SpaceTimee/Sheas-Cealer/releases](https://github.com/SpaceTimee/Sheas-Cealer/releases) 1. Github (preferred): [https://github.com/SpaceTimee/Sheas-Cealer/releases](https://github.com/SpaceTimee/Sheas-Cealer/releases)
2. Lanzou (password 3wnj) (recommended in mainland China): [https://spacetime.lanzouu.com/b017hp0lc](https://spacetime.lanzouu.com/b017hp0lc) 2. Group File (participate in internal testing): Please refer to [Contacts](https://github.com/SpaceTimee/Sheas-Cealer#Contacts)
> Scd version: The Scd version has a built-in .Net runtime and can run in an environment without a .Net runtime, but the cost is a larger file size and worse cross-platform capabilities. If there is no special reason, it is not recommended to use the Scd version > Due to force majeure, Sheas Cealer is temporarily unable to provide the download address of Lanzou Cloud. We would like to thank Lanzou Cloud for its free distribution service
## Installation ## Installation
1. Setup Installer (preferred): Download Sheas Cealer Setup.exe and run -> Then follow the prompts to install 1. Setup Installer (preferred): Download Sheas Cealer Setup.exe and run -> Then follow the prompts to install
2. Zip Package (installation-free): Download Sheas Cealer Zip.zip and unzip -> Then you can use it directly 2. Zip Package (installation-free): Download Sheas Cealer Zip.zip and unzip -> Then you can use it directly
> Scd version: The Scd version has a built-in .Net runtime and can run in an environment without a .Net runtime, but the cost is a larger file size and worse cross-platform capabilities. If there is no special reason, it is not recommended to use the Scd version
## Documentation ## Documentation
**[Sheas Cealer Documentation](https://github.com/SpaceTimee/Sheas-Cealer/wiki/Sheas-Cealer-Documentation)** **[Sheas Cealer Documentation](https://github.com/SpaceTimee/Sheas-Cealer/wiki/Sheas-Cealer-Documentation)**
@ -53,17 +53,19 @@ Using the startup parameter feature of the Chromium kernel to conceal SNI. For m
**Space Time** **Space Time**
## Contacts ## Contacts
1. **QQ Group (Main Group): 716266896, 338919498** 1. **QQ Group: 1034315671, 716266896, 338919498**
2. TG Group (Sub Group): [PixCealerChat](https://t.me/PixCealerChat) 2. **TG Group: [PixCealerChat](https://t.me/PixCealerChat)**
3. **Email: Zeus6_6@163.com** 3. Email: Zeus6_6@163.com
## Projects ## Projects
1. [Cealing Host](https://github.com/SpaceTimee/Cealing-Host): The latest Built-in Cealing Host 1. [Sheas Cealer Droid](https://github.com/SpaceTimee/Sheas-Cealer-Droid): Sheas Cealer for Android
2. [Sheas Dop](https://github.com/SpaceTimee/Sheas-Dop): DNS anti-pollution resolution tool (Sheas Cealer Global Cealing subproject) 2. [Sheas Cealer Nix](https://github.com/SpaceTimee/Sheas-Cealer/tree/nix): Sheas Cealer cross-platform for desktop
3. [Sheas Nginx](https://github.com/SpaceTimee/Sheas-Nginx): Pixiv Nginx launcher (Sheas Cealer Global Purging × Pixiv Nginx cooperative subproject) 3. [Cealing Host](https://github.com/SpaceTimee/Cealing-Host): The latest Built-in Cealing Host
4. [Bot CealingCat](https://github.com/SpaceTimee/Bot-CealingCat): Telegram Bot providing Sheas Cealer related services 4. [Sheas Dop](https://github.com/SpaceTimee/Sheas-Dop): DNS anti-pollution resolution tool (Sheas Cealer Global Cealing subproject)
5. [Console HostChecker](https://github.com/SpaceTimee/Console-HostChecker): Cealing Host automated checking script 5. [Sheas Nginx](https://github.com/SpaceTimee/Sheas-Nginx): Pixiv Nginx launcher (Sheas Cealer Global Purging × Pixiv Nginx cooperative subproject)
6. [Console HostGenerator](https://github.com/SpaceTimee/Console-HostGenerator): Cealing Host automated generation script 6. [Bot CealingCat](https://github.com/SpaceTimee/Bot-CealingCat): Telegram Bot providing Sheas Cealer related services
7. [Console HostChecker](https://github.com/SpaceTimee/Console-HostChecker): Cealing Host automated checking script
8. [Console HostGenerator](https://github.com/SpaceTimee/Console-HostGenerator): Cealing Host automated generation script
## License ## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSpaceTimee%2FSheas-Cealer.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FSpaceTimee%2FSheas-Cealer?ref=badge_large) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSpaceTimee%2FSheas-Cealer.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FSpaceTimee%2FSheas-Cealer?ref=badge_large)

View File

@ -30,20 +30,13 @@
<UseWindowsForms>True</UseWindowsForms> <UseWindowsForms>True</UseWindowsForms>
<IsPublishable>True</IsPublishable> <IsPublishable>True</IsPublishable>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks> <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<ErrorReport>none</ErrorReport> <ErrorReport>none</ErrorReport>
<NoWin32Manifest>true</NoWin32Manifest> <NoWin32Manifest>true</NoWin32Manifest>
<AppDesignerFolder>Props</AppDesignerFolder> <AppDesignerFolder>Props</AppDesignerFolder>
<NeutralLanguage>en</NeutralLanguage> <NeutralLanguage>en</NeutralLanguage>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="bin\**" /> <Compile Remove="bin\**" />
<EmbeddedResource Remove="bin\**" /> <EmbeddedResource Remove="bin\**" />
@ -51,10 +44,6 @@
<Page Remove="bin\**" /> <Page Remove="bin\**" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<AdditionalFiles Remove="app.manifest" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Remove=".filenesting.json" /> <None Remove=".filenesting.json" />
<None Remove=".gitattributes" /> <None Remove=".gitattributes" />
@ -73,44 +62,37 @@
<ItemGroup> <ItemGroup>
<Reference Include="Ona-Core"> <Reference Include="Ona-Core">
<HintPath>..\Ona-Core\bin\Release\net8.0-windows10.0.26100.0\Ona-Core.dll</HintPath> <HintPath>..\Ona-Core\bin\Release\net8.0\Ona-Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="Sheas-Core"> <Reference Include="Sheas-Core">
<HintPath>..\Sheas-Core\bin\Release\net8.0-windows10.0.26100.0\Sheas-Core.dll</HintPath> <HintPath>..\Sheas-Core\bin\Release\net8.0\Sheas-Core.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Update="Consts\AboutMultilangConst.Designer.cs"> <Compile Update="Consts\MainMultilangConst.Designer.cs">
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>AboutMultilangConst.resx</DependentUpon> <DependentUpon>MainMultilangConst.resx</DependentUpon>
</Compile> </Compile>
<Compile Update="Consts\SettingsMultilangConst.Designer.cs"> <Compile Update="Consts\SettingsMultilangConst.Designer.cs">
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>SettingsMultilangConst.resx</DependentUpon> <DependentUpon>SettingsMultilangConst.resx</DependentUpon>
</Compile> </Compile>
<Compile Update="Consts\AboutMultilangConst.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>AboutMultilangConst.resx</DependentUpon>
</Compile>
<Compile Update="Props\Settings.Designer.cs"> <Compile Update="Props\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
</Compile> </Compile>
<Compile Update="Consts\MainMultilangConst.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>MainMultilangConst.resx</DependentUpon>
</Compile>
<Compile Update="Wins\SettingsWin.xaml.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Update="Consts\AboutMultilangConst.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>AboutMultilangConst.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Consts\MainMultilangConst.resx"> <EmbeddedResource Update="Consts\MainMultilangConst.resx">
<Generator>PublicResXFileCodeGenerator</Generator> <Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>MainMultilangConst.Designer.cs</LastGenOutput> <LastGenOutput>MainMultilangConst.Designer.cs</LastGenOutput>
@ -119,9 +101,10 @@
<Generator>PublicResXFileCodeGenerator</Generator> <Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>SettingsMultilangConst.Designer.cs</LastGenOutput> <LastGenOutput>SettingsMultilangConst.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> <EmbeddedResource Update="Consts\AboutMultilangConst.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<ItemGroup> <LastGenOutput>AboutMultilangConst.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Update="Props\Settings.settings"> <None Update="Props\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>

View File

@ -2,44 +2,34 @@
using System; using System;
using System.IO; using System.IO;
using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.X509Certificates;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Sheas_Cealer.Utils; namespace Sheas_Cealer.Utils;
internal static class NginxCleaner internal static class NginxCleaner
{ {
internal static readonly SemaphoreSlim IsNginxCleaningSemaphore = new(1);
internal static async Task Clean() internal static async Task Clean()
{ {
if (!await IsNginxCleaningSemaphore.WaitAsync(0)) string hostsContent = await File.ReadAllTextAsync(MainConst.HostsConfPath);
return; int hostsConfStartIndex = hostsContent.IndexOf(MainConst.HostsConfStartMarker, StringComparison.Ordinal);
int hostsConfEndIndex = hostsContent.LastIndexOf(MainConst.HostsConfEndMarker, StringComparison.Ordinal);
try if (hostsConfStartIndex != -1 && hostsConfEndIndex != -1)
{ await File.WriteAllTextAsync(MainConst.HostsConfPath, hostsContent.Remove(hostsConfStartIndex, hostsConfEndIndex - hostsConfStartIndex + MainConst.HostsConfEndMarker.Length));
string hostsContent = await File.ReadAllTextAsync(MainConst.HostsConfPath);
int hostsConfStartIndex = hostsContent.IndexOf(MainConst.HostsConfStartMarker, StringComparison.Ordinal);
int hostsConfEndIndex = hostsContent.LastIndexOf(MainConst.HostsConfEndMarker, StringComparison.Ordinal);
if (hostsConfStartIndex != -1 && hostsConfEndIndex != -1) using X509Store certStore = new(StoreName.Root, StoreLocation.LocalMachine, OpenFlags.ReadWrite);
await File.WriteAllTextAsync(MainConst.HostsConfPath, hostsContent.Remove(hostsConfStartIndex, hostsConfEndIndex - hostsConfStartIndex + MainConst.HostsConfEndMarker.Length));
using X509Store certStore = new(StoreName.Root, StoreLocation.CurrentUser, OpenFlags.ReadWrite); foreach (X509Certificate2 storedCert in certStore.Certificates)
if (storedCert.Subject == MainConst.NginxRootCertSubjectName)
while (true)
try
{
certStore.Remove(storedCert);
foreach (X509Certificate2 storedCert in certStore.Certificates) break;
if (storedCert.Subject == MainConst.NginxRootCertSubjectName) }
while (true) catch { }
try
{
certStore.Remove(storedCert);
break; certStore.Close();
}
catch { }
certStore.Close();
}
finally { IsNginxCleaningSemaphore.Release(); }
} }
} }

View File

@ -29,8 +29,7 @@
Content="{x:Static consts:AboutConst.DeveloperButtonContent}" Content="{x:Static consts:AboutConst.DeveloperButtonContent}"
ToolTip="{x:Static consts:AboutConst.DeveloperButtonUrl}" ToolTip="{x:Static consts:AboutConst.DeveloperButtonUrl}"
Click="AboutButton_Click" /> Click="AboutButton_Click" />
<Button x:Name="VersionButton" <Button Grid.Row="1" Grid.Column="0" Margin="5" d:Content="# # #: #.#.#"
Grid.Row="1" Grid.Column="0" Margin="5" d:Content="# # #: #.#.#"
d:Foreground="{Binding Source={x:Static consts:AboutConst.AccentBlueColor}, Converter={x:Static convs:AboutConv.AboutAccentButtonForegroundConv}}" d:Foreground="{Binding Source={x:Static consts:AboutConst.AccentBlueColor}, Converter={x:Static convs:AboutConv.AboutAccentButtonForegroundConv}}"
Foreground="{Binding AccentForegroundColor, Converter={x:Static convs:AboutConv.AboutAccentButtonForegroundConv}}" Foreground="{Binding AccentForegroundColor, Converter={x:Static convs:AboutConv.AboutAccentButtonForegroundConv}}"
ToolTip="{x:Static consts:AboutConst.VersionButtonUrl}" ToolTip="{x:Static consts:AboutConst.VersionButtonUrl}"

View File

@ -53,9 +53,6 @@ public partial class AboutWin : Window
{ {
Button senderButton = (Button)sender; Button senderButton = (Button)sender;
if (senderButton == VersionButton)
MessageBox.Show($"{AboutConst._ReleasePagePasswordLabel} 3wnj");
ProcessStartInfo processStartInfo = new(senderButton == EmailButton ? "mailto:" : string.Empty + senderButton.ToolTip) { UseShellExecute = true }; ProcessStartInfo processStartInfo = new(senderButton == EmailButton ? "mailto:" : string.Empty + senderButton.ToolTip) { UseShellExecute = true };
try { Process.Start(processStartInfo); } try { Process.Start(processStartInfo); }

View File

@ -185,7 +185,7 @@ public partial class MainWin : Window
{ {
HoldButtonTimer?.Stop(); HoldButtonTimer?.Stop();
if ((CealHostRulesDict.ContainsValue(null!) && MessageBox.Show(MainConst._CealHostErrorPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes) || if ((CealHostRulesDict.ContainsValue(null) && MessageBox.Show(MainConst._CealHostErrorPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes) ||
(sender is not true && MessageBox.Show(MainConst._KillBrowserProcessPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes)) (sender is not true && MessageBox.Show(MainConst._KillBrowserProcessPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes))
return; return;
@ -206,9 +206,6 @@ public partial class MainWin : Window
if (!MainPres.IsConginxRunning && !MainPres.IsNginxRunning) if (!MainPres.IsConginxRunning && !MainPres.IsNginxRunning)
{ {
if (NginxCleaner.IsNginxCleaningSemaphore.CurrentCount == 0 || !await IsNginxLaunchingSemaphore.WaitAsync(0))
return;
try try
{ {
if ((!MainPres.IsConginxExist && !MainPres.IsNginxExist) || if ((!MainPres.IsConginxExist && !MainPres.IsNginxExist) ||
@ -238,7 +235,7 @@ public partial class MainWin : Window
rootCertRequest.CertificateExtensions.Add(new X509BasicConstraintsExtension(true, false, 0, false)); rootCertRequest.CertificateExtensions.Add(new X509BasicConstraintsExtension(true, false, 0, false));
using X509Certificate2 rootCert = rootCertRequest.CreateSelfSigned(DateTimeOffset.UtcNow, DateTimeOffset.UtcNow.AddYears(100)); using X509Certificate2 rootCert = rootCertRequest.CreateSelfSigned(DateTimeOffset.UtcNow, DateTimeOffset.UtcNow.AddYears(100));
using X509Store certStore = new(StoreName.Root, StoreLocation.CurrentUser, OpenFlags.ReadWrite); using X509Store certStore = new(StoreName.Root, StoreLocation.LocalMachine, OpenFlags.ReadWrite);
certStore.Add(rootCert); certStore.Add(rootCert);
certStore.Close(); certStore.Close();
@ -690,7 +687,7 @@ public partial class MainWin : Window
} }
private async void CealHostWatcher_Changed(object sender, FileSystemEventArgs e) private async void CealHostWatcher_Changed(object sender, FileSystemEventArgs e)
{ {
string cealHostName = e.Name!.TrimStart("Cealing-Host-".ToCharArray()).TrimEnd(".json".ToCharArray()); string cealHostName = MainConst.CealHostPrefixRegex().Replace(Path.GetFileNameWithoutExtension(e.Name!), string.Empty);
try try
{ {