review fix: 独立h5-manifest + 域名校验 + 恢复APK manifest

- ota/h5/manifest-{channel}.json — 独立于APK manifest
- ota/manifest-*.json — 恢复gen-manifest.sh格式
- v6 HTML: h5_sha256缺失拒绝 + h5_url域名校验
This commit is contained in:
LukeMackin
2026-07-21 21:20:59 +08:00
parent b4ddb0b5c7
commit cdf9b9d499
7 changed files with 9 additions and 5 deletions

View File

@@ -44,13 +44,14 @@ function selectCh(el,ch){
}
function log(m){document.getElementById('log').innerText+=m+'\n'}
function checkUpdate(){
var manFile='/manifest-'+channel+'.json';
var manFile='/h5/manifest-'+channel+'.json';
log('checking '+manFile+' ...');
fetch(BASE+manFile+'?t='+Date.now(),{cache:'no-store'})
.then(function(r){if(!r.ok)throw Error('HTTP '+r.status);return r.json()})
.then(function(j){log('remote: '+j.h5_version);
dlUrl=j.h5_url;dlSha=j.h5_sha256||'';
if(!dlUrl){log('ERR: no h5_url');return}
if(!dlSha){log('ERR: manifest missing h5_sha256');return}
if(!dlUrl||dlUrl.indexOf(BASE)!==0){log('ERR: invalid h5_url domain');return}
if(j.h5_version!=='0.1.0-dav-android-6'){dlVer=j.h5_version;
log('*** NEW VERSION ***');document.getElementById('btnApply').disabled=false}
else log('up to date')})

View File

@@ -0,0 +1 @@
{"h5_version":"0.1.0-dav-android-6","h5_sha256":"779e291531062e916cad5e33ee51d6783a30e9e96babee37ae829b491a354413","h5_url":"https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/raw/branch/main/ota/h5/index-v6.html"}

View File

@@ -0,0 +1 @@
{"h5_version":"0.1.0-dav-android-6","h5_sha256":"779e291531062e916cad5e33ee51d6783a30e9e96babee37ae829b491a354413","h5_url":"https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/raw/branch/main/ota/h5/index-v6.html"}

View File

@@ -0,0 +1 @@
{"h5_version":"0.1.0-dav-android-6","h5_sha256":"779e291531062e916cad5e33ee51d6783a30e9e96babee37ae829b491a354413","h5_url":"https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/raw/branch/main/ota/h5/index-v6.html"}

View File

@@ -1 +1 @@
{"h5_version":"0.1.0-dav-android-6","h5_sha256":"6a25c8c5c1e2bacdac416885a0cd4754debf699344d63673cffcc91b5d646295","h5_url":"https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/raw/branch/main/ota/h5/index-v6.html"}
{"version":"0.1.0","builds":{}}

View File

@@ -1 +1 @@
{"h5_version":"0.1.0-dav-android-6","h5_sha256":"6a25c8c5c1e2bacdac416885a0cd4754debf699344d63673cffcc91b5d646295","h5_url":"https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/raw/branch/main/ota/h5/index-v6.html"}
{"version":"0.1.0","builds":{"android":{"type":"apk","tag":"v0.1.0-dav-android-8","url":"https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/releases/download/v0.1.0-dav-android-8/v0.1.0-dav-android-8-debug.apk","sha256":"b2451a398ea2dd34e585c5ec4529d6654451c9b9ab4ddf4a25ec9b032f0ac2bf","size":3506569,"channel":"nightly","minVersion":"0.1.0"}}}

View File

@@ -1 +1 @@
{"h5_version":"0.1.0-dav-android-6","h5_sha256":"6a25c8c5c1e2bacdac416885a0cd4754debf699344d63673cffcc91b5d646295","h5_url":"https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/raw/branch/main/ota/h5/index-v6.html"}
{"version":"0.1.0","builds":{}}