托盘和服务更新

This commit is contained in:
snltty
2024-07-24 09:58:57 +08:00
parent 9a2f8073a1
commit b13edd2914
10 changed files with 55 additions and 20 deletions

View File

@@ -100,6 +100,19 @@ namespace linker.service
proc?.Dispose();
foreach (var item in Process.GetProcessesByName(mainExeName))
{
try
{
item.Close();
item.WaitForExit(TimeSpan.FromMilliseconds(2000));
item.Kill();
}
catch (Exception)
{
}
}
foreach (var item in Process.GetProcessesByName("tun2socks"))
{
item.Kill();
}