feat(dcauth): 新增常驻托盘客户端与版本显示

Windows 改为单实例托盘常驻,协议唤起只弹一个确认窗口;补充 macOS 后台守护进程
与客户端版本显示。
This commit is contained in:
yml2213
2026-10-21 20:46:25 +08:00
parent 040100f290
commit cb916d7750
12 changed files with 1087 additions and 73 deletions
+8 -4
View File
@@ -26,13 +26,15 @@ $disk = Get-CimInstance Win32_DiskDrive | Where-Object { $_.Index -eq 0 } | Sele
systemDiskSerial = [string]$disk.SerialNumber
} | ConvertTo-Json -Compress
`
output, err := exec.Command(
command := exec.Command(
"powershell.exe",
"-NoProfile",
"-NonInteractive",
"-ExecutionPolicy", "Bypass",
"-Command", script,
).Output()
)
hideCommandWindow(command)
output, err := command.Output()
if err == nil {
var payload map[string]string
if json.Unmarshal([]byte(strings.TrimSpace(string(output))), &payload) == nil {
@@ -54,9 +56,11 @@ $disk = Get-CimInstance Win32_DiskDrive | Where-Object { $_.Index -eq 0 } | Sele
}
func readMachineGUID() string {
output, err := exec.Command(
command := exec.Command(
"reg", "query", `HKLM\SOFTWARE\Microsoft\Cryptography`, "/v", "MachineGuid",
).Output()
)
hideCommandWindow(command)
output, err := command.Output()
if err != nil {
return ""
}