mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-15 05:40:47 +08:00
* feat(service): hand upgraded cores to the service through the installer The service now only executes administrator-staged core copies, so an in-app core upgrade has to deliver the new bytes there before the restart asks for them; otherwise a service-mode restart keeps running the previous core while the UI reports the new version. After publishing the downloaded core, service-mode upgrades invoke the elevated service installer with --install-core <path> --sha256 <hex>. The digest is computed over the published file and rides the elevated command line, which no other local account can alter, so a file swapped after hashing is refused rather than staged. Sidecar-mode upgrades run the file directly and prompt for nothing. Rollback distinguishes staging that never ran, was refused, or succeeded: only a successful staging obliges the rollback to restore the approved copy too (deliberately not gated on the running mode, which reads NotRunning after the very crash being rolled back), and a refused staging restores the file so a retry does not see the new version on disk and conclude there is nothing to do. Requires clash-verge-service-ipc >= 2.6.7. The pinned dependency and the packaged service release must move together with this change, or the old installer silently treats --install-core as a plain install. * feat(installer): attest bundled cores to the service at install time prebuild computes sha256 digests of the downloaded mihomo sidecars into packages/windows/core-hashes.nsh (gitignored), included through the NSIS installerHooks path. After unpacking and before starting the service, the installer stages both cores into the service's approved directory with those digests, so what gets attested is exactly what this installer shipped: a core swapped on disk in a user-writable install directory is refused, not published. Failure is logged and does not abort the install; a later elevated service install can stage the cores again. * chore(deps): require clash-verge-service-ipc v2.6.8 v2.6.8 is the first service whose installer understands --install-core --sha256; the staging this branch introduces is inert against anything older, because the old installer treats the flag as a plain service installation and reports success. The service release and this pin therefore have to ship in the same app release. * fix(service): heap-allocate the core hashing buffer clippy::large_stack_arrays denies the 64 KiB stack array.
36 lines
1.3 KiB
JSON
36 lines
1.3 KiB
JSON
{
|
|
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
|
"identifier": "io.github.clash-verge-rev.clash-verge-rev",
|
|
"bundle": {
|
|
"targets": ["nsis"],
|
|
"windows": {
|
|
"certificateThumbprint": null,
|
|
"digestAlgorithm": "sha256",
|
|
"timestampUrl": "",
|
|
"webviewInstallMode": {
|
|
"type": "fixedRuntime",
|
|
"path": "./Microsoft.WebView2.FixedVersionRuntime.133.0.3065.92.arm64/"
|
|
},
|
|
"nsis": {
|
|
"displayLanguageSelector": true,
|
|
"installerIcon": "icons/icon.ico",
|
|
"languages": ["SimpChinese", "English", "Russian"],
|
|
"installMode": "perMachine",
|
|
"installerHooks": "./packages/windows/core-hashes.nsh",
|
|
"template": "./packages/windows/installer.nsi"
|
|
}
|
|
}
|
|
},
|
|
"plugins": {
|
|
"updater": {
|
|
"active": true,
|
|
"dialog": false,
|
|
"endpoints": [
|
|
"https://update.hwdns.net/https://github.com/clash-verge-rev/clash-verge-rev/releases/download/updater/update-fixed-webview2-proxy.json",
|
|
"https://github.com/clash-verge-rev/clash-verge-rev/releases/download/updater/update-fixed-webview2.json"
|
|
],
|
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQyOEMyRjBCQkVGOUJEREYKUldUZnZmbStDeStNMHU5Mmo1N24xQXZwSVRYbXA2NUpzZE5oVzlqeS9Bc0t6RVV4MmtwVjBZaHgK"
|
|
}
|
|
}
|
|
}
|