From 37282b6fab289d5f1be550634de280230162e941 Mon Sep 17 00:00:00 2001 From: hex2077 Date: Sun, 11 Jan 2026 19:43:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(update):=20=E4=BD=BF=E7=94=A8gh-proxy?= =?UTF-8?q?=E4=BB=A3=E7=90=86GitHub=20API=E5=92=8C=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改GitHub API和tarball下载链接,通过gh-proxy.org代理访问,解决国内可能存在的网络访问问题 --- src/ui-modules/update-api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui-modules/update-api.js b/src/ui-modules/update-api.js index ef2329f..2b1d6e7 100644 --- a/src/ui-modules/update-api.js +++ b/src/ui-modules/update-api.js @@ -39,7 +39,7 @@ function compareVersions(v1, v2) { */ async function getLatestVersionFromGitHub() { const GITHUB_REPO = 'justlovemaki/AIClient-2-API'; - const apiUrl = `https://api.github.com/repos/${GITHUB_REPO}/tags`; + const apiUrl = `https://gh-proxy.org/https://api.github.com/repos/${GITHUB_REPO}/tags`; try { console.log('[Update] Fetching latest version from GitHub API...'); @@ -291,7 +291,7 @@ export async function performUpdate() { */ async function performTarballUpdate(localVersion, latestTag) { const GITHUB_REPO = 'justlovemaki/AIClient-2-API'; - const tarballUrl = `https://github.com/${GITHUB_REPO}/archive/refs/tags/${latestTag}.tar.gz`; + const tarballUrl = `https://gh-proxy.org/https://github.com/${GITHUB_REPO}/archive/refs/tags/${latestTag}.tar.gz`; const appDir = process.cwd(); const tempDir = path.join(appDir, '.update_temp'); const tarballPath = path.join(tempDir, 'update.tar.gz');