Skip to content

Commit

Permalink
1.1.0 更新
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceTimee committed Apr 17, 2024
1 parent 0e5ed26 commit 714a4d2
Show file tree
Hide file tree
Showing 11 changed files with 138 additions and 354 deletions.
5 changes: 3 additions & 2 deletions App.xaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<Application x:Class="Sheas_Cealer.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DispatcherUnhandledException="App_DispatcherUnhandledException">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<materialDesign:BundledTheme BaseTheme="Light" PrimaryColor="Red" SecondaryColor="Orange" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign3.Defaults.xaml" />
</ResourceDictionary.MergedDictionaries>

<Style x:Key="CommonWindow" TargetType="{x:Type Window}">
Expand Down
7 changes: 7 additions & 0 deletions App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
using System.Windows;
using System.Windows.Threading;

namespace Sheas_Cealer
{
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e) => new MainWindow(e.Args).Show();

private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{
MessageBox.Show("Error: " + e.Exception.Message);
e.Handled = true;
}
}
}
23 changes: 0 additions & 23 deletions Commons/Clash.cs

This file was deleted.

23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,28 @@
</br>

## 自我介绍
**Sheas Cealer**: 一只基于 **WPF(.Net5)** 的 SNI 伪造工具
**Sheas Cealer**: 一只基于 **WPF(.Net8)** 的 SNI 伪造工具

* 适用平台: Windows x64

## 词汇解释
**[Sheas Cealer Dictionary](https://github.com/SpaceTimee/Sheas-Cealer/wiki/Sheas-Cealer-Dictionary)**

## 注意事项
1. 最新的 **Cealing-Host.json** 内置伪造规则可在 [Cealing Host 存储库](https://github.com/SpaceTimee/Cealing-Host) 获取
2. 其他所有配置文件的获取请参考 [Sheas Cealer Archive](https://github.com/SpaceTimee/Sheas-Cealer/wiki/Sheas-Cealer-Archive)
3. 自动更新时不会覆盖已有的 **Cealing-Host.json****config.yaml** 配置文件,如有需要应**手动覆盖或修改**
4. 本项目仅供**学习参考**,无意绕过任何审查设备的审查
5. 为避免不必要的麻烦,食用前请先阅读**注意事项****用户协议**
6. Sheas Cealer 仍处于**开发阶段**,但每个正式版发布前会尽量确保其**稳定可用**
7. Github Release 中会保留目前能够使用的**所有版本**,但强烈推荐使用**最新版**
1. **Cealing-Host.json** 内置伪造规则在 [Cealing Host 存储库](https://github.com/SpaceTimee/Cealing-Host) 持续更新
2. Sheas Cealer 更新时不会覆盖已有的 **Cealing-Host.json** 配置文件,如需与上游同步,需点击**更新规则**按钮 (>= 1.1.0),或**手动修改覆盖**
3. 本项目仅供**学习参考**,无意绕过任何审查设备的审查
4. 为避免不必要的麻烦,食用前请先阅读**注意事项****用户协议**
5. Sheas Cealer 仍处于**开发阶段**,但每个正式版发布前会尽量确保其**稳定可用**
6. Github Release 中会保留目前能够使用的**所有版本**,但强烈推荐使用**最新版**

## 用户协议
1. [隐私政策](https://thoughts.teambition.com/share/6264eda98adeb10041b92fda#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)
2. 蓝奏云 (密码3wnj) (大陆推荐): [https://spacetime.lanzouu.com/b017hp0lc](https://spacetime.lanzouu.com/b017hp0lc)
2. 蓝奏云 (密码 3wnj) (大陆推荐): [https://spacetime.lanzouu.com/b017hp0lc](https://spacetime.lanzouu.com/b017hp0lc)

## 安装方式
1. Setup 安装器 (首选): 下载 Sheas Cealer Setup.exe 并运行 -> 按照提示设置即可安装
Expand All @@ -43,14 +42,14 @@
## 致谢名单
* **kit: 为本项目提供全部的原理基础**
* **NiceBowl: 为本项目提供详细的原理说明**
* **Clash: 为本项目解决 SSL 证书匹配问题**
* **Clash: 为本项目解决过一段时间的 SSL 证书匹配问题**

## 开发者
**Space Time**

## 联系方式
1. **QQ 群 (主群): 338919498**
2. TG 群 (分群) (宽松管理): [PixCealerChat](https://t.me/PixCealerChat)
1. **QQ 群 (主群): 338919498**
2. TG 群 (分群) (宽松管理): [PixCealerChat](https://t.me/PixCealerChat)
3. **邮箱: [email protected]**

## 许可证
Expand Down
22 changes: 10 additions & 12 deletions Sheas-Cealer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<PackageReleaseNotes>Just Ceal It</PackageReleaseNotes>
<Authors>Space Time</Authors>
<Company>Space Time</Company>
<AssemblyVersion>1.0.5</AssemblyVersion>
<Version>1.0.5</Version>
<FileVersion>1.0.5</FileVersion>
<InformationalVersion>1.0.5</InformationalVersion>
<AssemblyVersion>1.1.0</AssemblyVersion>
<Version>1.1.0</Version>
<FileVersion>1.1.0</FileVersion>
<InformationalVersion>1.1.0</InformationalVersion>
<PackageTags>Tool;Sheas;Cealer;Sni</PackageTags>
<ApplicationIcon>Sheas-Cealer-Logo.ico</ApplicationIcon>
<PackageIcon>Sheas Cealer Logo.png</PackageIcon>
Expand All @@ -21,7 +21,7 @@
<RepositoryType>git</RepositoryType>
<Copyright>Copyright © 2077</Copyright>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows10.0.22000.0</TargetFramework>
<TargetFramework>net8.0-windows10.0.22000.0</TargetFramework>
<SupportedOSPlatformVersion>10.0.17763.0</SupportedOSPlatformVersion>
<RootNamespace>Sheas_Cealer</RootNamespace>
<Nullable>enable</Nullable>
Expand All @@ -30,7 +30,7 @@
<IsPublishable>True</IsPublishable>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<ErrorReport>none</ErrorReport>
<ApplicationManifest>app.manifest</ApplicationManifest>
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -55,7 +55,6 @@
<ItemGroup>
<None Remove=".gitattributes" />
<None Remove=".gitignore" />
<None Remove="app.manifest" />
<None Remove="README.md" />
<None Remove="Sheas-Cealer-Logo.ico" />
</ItemGroup>
Expand All @@ -73,17 +72,16 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="MaterialDesignThemes" Version="4.5.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="YamlDotNet" Version="11.2.1" />
<PackageReference Include="MaterialDesignThemes" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<ItemGroup>
<Reference Include="Ona-Core">
<HintPath>..\Ona-Core\bin\Release\net5.0-windows10.0.22000.0\Ona-Core.dll</HintPath>
<HintPath>..\Ona-Core\bin\Release\net8.0-windows10.0.22000.0\Ona-Core.dll</HintPath>
</Reference>
<Reference Include="Sheas-Core">
<HintPath>D:\Git-Repository\Sheas-Core\bin\Release\Sheas-Core.dll</HintPath>
<HintPath>..\Sheas-Core\bin\Release\Sheas-Core.dll</HintPath>
</Reference>
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions Commons/Cmd.cs → Utilities/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Sheas_Cealer
{
internal class Cmd : Proc
internal class Command : Proc
{
internal Cmd() : base("Cmd.exe")
internal Command() : base("Cmd.exe")
{
}

Expand Down
19 changes: 10 additions & 9 deletions Commons/IconRemover.cs → Utilities/IconRemover.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Sheas_Cealer
{
//定义IconRemover
internal static class IconRemover
internal static partial class IconRemover
{
private const int GWL_EXSTYLE = -20;
private const int WS_EX_DLGMODALFRAME = 0x0001;
Expand All @@ -16,14 +16,15 @@ internal static class IconRemover
private const int SWP_FRAMECHANGED = 0x0020;
private const uint WM_SETICON = 0x0080;

[DllImport("user32.dll")]
private static extern int GetWindowLong(IntPtr hwnd, int index);
[DllImport("user32.dll")]
private static extern int SetWindowLong(IntPtr hwnd, int index, int newStyle);
[DllImport("user32.dll")]
private static extern bool SetWindowPos(IntPtr hwnd, IntPtr hwndInsertAfter, int x, int y, int width, int height, uint flags);
[DllImport("user32.dll")]
private static extern IntPtr SendMessage(IntPtr hwnd, uint msg, IntPtr wParam, IntPtr lParam);
[LibraryImport("user32.dll", EntryPoint = "GetWindowLongW")]
private static partial int GetWindowLong(IntPtr hwnd, int index);
[LibraryImport("user32.dll", EntryPoint = "SetWindowLongW")]
private static partial int SetWindowLong(IntPtr hwnd, int index, int newStyle);
[LibraryImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
private static partial bool SetWindowPos(IntPtr hwnd, IntPtr hwndInsertAfter, int x, int y, int width, int height, uint flags);
[LibraryImport("user32.dll", EntryPoint = "SendMessageW")]
private static partial IntPtr SendMessage(IntPtr hwnd, uint msg, IntPtr wParam, IntPtr lParam);

internal static void RemoveIcon(Window window)
{
Expand Down
17 changes: 6 additions & 11 deletions Windows/AboutWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Diagnostics;
using System.Diagnostics;
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
Expand All @@ -17,18 +16,14 @@ internal AboutWindow()

private void AboutButton_Click(object sender, RoutedEventArgs e)
{
try
{
if (sender == UpdateButton)
MessageBox.Show("密码: 3wnj");
if (sender == UpdateButton)
MessageBox.Show("密码: 3wnj");

ProcessStartInfo processStartInfo = new(sender == EmailButton ? "mailto:" : string.Empty + ((Button)sender).ToolTip) { UseShellExecute = true };
Process.Start(processStartInfo);
}
catch (Exception ex) { MessageBox.Show("Error: " + ex.Message); return; }
ProcessStartInfo processStartInfo = new(sender == EmailButton ? "mailto:" : string.Empty + ((Button)sender).ToolTip) { UseShellExecute = true };
Process.Start(processStartInfo);
}

private void AboutWin_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
private void AboutWin_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Escape)
Close();
Expand Down
23 changes: 7 additions & 16 deletions Windows/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,21 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox x:Name="ShowBox" Text="(填入任意以 Chromium 为内核的浏览器的路径)" Foreground="#FFBFCDDB" Grid.Column="0" Margin="0,0,10,0" VerticalContentAlignment="Center" GotFocus="ShowBox_GotFocus" LostFocus="ShowBox_LostFocus" TextChanged="ShowBox_TextChanged" PreviewDragOver="MainWin_DragEnter" />
<Button x:Name="ViewButton" Grid.Column="2" Content="浏览" Click="ViewButton_Click" />
<TextBox x:Name="PathBox" Text="(填入任意以 Chromium 为内核的浏览器的路径)" Foreground="#FFBFCDDB" Grid.Column="0" Margin="0,0,10,0" VerticalContentAlignment="Center" GotFocus="PathBox_GotFocus" LostFocus="PathBox_LostFocus" TextChanged="PathBox_TextChanged" PreviewDragOver="MainWin_DragEnter" />
<Button x:Name="BrowseButton" Grid.Column="2" Content="浏览" Click="BrowseButton_Click" />
</Grid>

<Grid Grid.Row="1" Margin="0,5,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button x:Name="ClashButton" Content="启动代理" Grid.Column="0" Margin="5,0,5,0" Click="ClashButton_Click" />
<Button x:Name="OpenButton" Content="启动伪造" Grid.Column="1" Margin="5,0,5,0" IsDefault="True" IsEnabled="False" Click="OpenButton_Click" />
</Grid>
<Button x:Name="StartButton" Content="启动伪造" Grid.Row="1" Margin="5" IsDefault="True" IsEnabled="False" Click="StartButton_Click" />

<Grid Grid.Row="2" Margin="0,5,0,5">
<Grid Grid.Row="2" Margin="0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button x:Name="ConfigButton" Content="代理规则" Grid.Column="0" Margin="5,0,5,0" Click="ConfigOpenButton_Click" />
<Button x:Name="HostMenuButton" Content="伪造规则🔺" Grid.Column="1" Margin="5,0,5,0" Panel.ZIndex="1" MouseEnter="HostMenuButton_MouseEnter" MouseLeave="HostMenuButton_MouseLeave" Click="HostMenuButton_Click" />
<Button x:Name="HostOpenButton" Content="打开伪造规则" Grid.Column="1" Margin="5,0,5,0" Background="Orange" MouseEnter="HostMenuButton_MouseEnter" MouseLeave="HostMenuButton_MouseLeave" Click="HostOpenButton_Click" />
<Button x:Name="HostUpdateButton" Content="更新伪造规则" Grid.Column="1" Margin="5,0,5,0" Background="Orange" MouseEnter="HostMenuButton_MouseEnter" MouseLeave="HostMenuButton_MouseLeave" Click="HostUpdateButton_Click" />
<Button x:Name="AboutButton" Content="关于项目" Grid.Column="2" Margin="5,0,5,0" Click="AboutButton_Click" Cursor="Hand" />
<Button x:Name="HostEditButton" Content="编辑规则" Grid.Column="0" Margin="5,0" Click="HostEditButton_Click" />
<Button x:Name="HostUpdateButton" Content="更新规则" Grid.Column="1" Margin="5,0" Click="HostUpdateButton_Click" />
<Button x:Name="AboutButton" Content="关于项目" Grid.Column="2" Margin="5,0" Click="AboutButton_Click" />
</Grid>
</Grid>
</Window>
Loading

0 comments on commit 714a4d2

Please sign in to comment.