A: 添加网络相关工具类 (NetUtils, SysInfoUtils) 及模型 (NetInfo)

A: 新增网络事件捕获及诊断功能支持 (TCP/UDP 连接、进程信息获取)
U: 更新项目引用,Shell 添加对 Infrastructure 的依赖
U: 优化 WebPanel 消息处理逻辑,支持多种新指令 (GetNetInfo 等)
U: 调整 ClientApp 中 WinDivertCommand.vue 的接口调用逻辑
D: 移除 Core 项目及相关配置
This commit is contained in:
jimmy committed 2025-05-10 22:46:59 +08:00
1 parent b14594ffb3
commit 0feeb00fae
11 files changed
+556 -29

No files matched your search

+2 -2
View File
@@ -7,6 +7,6 @@ namespace Shell;
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
public partial class App : System.Windows.Application
{
}
}
+6
View File
@@ -16,4 +16,10 @@
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3240.44" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Application\Application.csproj" />
<ProjectReference Include="..\Data\Data.csproj" />
<ProjectReference Include="..\Infrastructure\Infrastructure.csproj" />
</ItemGroup>
</Project>
+23 -3
View File
@@ -2,6 +2,7 @@ using System.Windows.Controls;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Windows;
using Infrastructure.utils;
namespace Shell.Views;
@@ -35,10 +36,29 @@ public partial class WebPanel : UserControl
Console.WriteLine(json);
Console.WriteLine(msg?.Channel);
if (msg?.Channel == "showMessage")
switch (msg?.Channel)
{
MessageBox.Show(msg.Payload?.Content ?? "无内容", msg.Payload?.Title ?? "提示");
InitWebView1();
case "showMessage":
MessageBox.Show(msg.Payload?.Content ?? "无内容", msg.Payload?.Title ?? "提示");
InitWebView1();
break;
case "GetNetInfo":
NetUtils.GetNetInfo();
break;
case "GetProgramDiagnostics":
var programDiagnostics = SysInfoUtils.GetProgramDiagnostics();
Console.WriteLine(programDiagnostics);
break;
case "InspectProcess":
SysInfoUtils.InspectProcess(23192);
break;
case "GetAllTcpConnections":
NetUtils.GetAllTcpConnections();
break;
default:
Console.WriteLine("没有任何函数被触发...");
break;
}
};
}