fix: redact tunnel keys, preserve cached login and correct HIP handling

This commit is contained in:
Kevin Yue committed 2026-11-18 18:08:01 +08:00
1 parent 65fce7bcf0
commit 9a43880c4d
18 files changed
+412 -196

No files matched your search

+7 -1
View File
@@ -18,6 +18,13 @@ if ($process.ExitCode -ne 0) {
if (Test-Path $log) { Get-Content $log -Tail 80 | Write-Host }
throw "The installer failed with exit code $($process.ExitCode)."
}
$shortcut = Join-Path $env:ProgramData 'Microsoft\Windows\Start Menu\Programs\GP Connect.lnk'
$shell = New-Object -ComObject Shell.Application
$folder = $shell.Namespace((Split-Path $shortcut))
$link = $folder.ParseName((Split-Path $shortcut -Leaf))
if (!$link -or $link.ExtendedProperty('System.AppUserModel.ID') -ne 'com.yuezk.gpgui') {
throw 'The Start menu shortcut is missing the GP Connect notification identity.'
}
$info = Get-Content (Join-Path $destination 'build-info.json') -Raw | ConvertFrom-Json
if ($info.architecture -ne $Architecture -or [string]$info.build_version -ne $Build) { throw 'The installed package identity does not match.' }
$service = Get-CimInstance Win32_Service -Filter "Name='GPConnect'"
@@ -44,7 +51,6 @@ if ($process.ExitCode -ne 0) { throw 'The uninstaller failed.' }
if ((Get-Service GPConnect -ErrorAction SilentlyContinue) -or (Test-Path $destination) -or (Test-Path ($destination + '.previous'))) {
throw 'The uninstaller left service registration or runtime files.'
}
$shortcut = Join-Path $env:ProgramData 'Microsoft\Windows\Start Menu\Programs\GP Connect.lnk'
if ((Test-Path $shortcut) -or (Test-Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GPConnect')) {
throw 'The uninstaller left its shortcut or registration.'
}