修复: - 检查更新不再内置回退地址:只读取 config.json 的 update_url,未配置时检查更新直接失败并记录日志

This commit is contained in:
RoyirinRosmontis
2026-08-31 16:25:48 +08:00
parent 59393b9ae9
commit 53e9d1e31a
+2 -3
View File
@@ -2472,11 +2472,10 @@ class MainWindow(QWidget):
if _skip_update_check() and not manual:
return # 设置跳过(仅自动检查):不检查也不打日志
import json, urllib.request
# 基于 Gitea 仓库 releases API 检查更新;config.json 无 update_url 时用默认地址
# 基于 Gitea 仓库 releases API 检查更新;地址只取 config.json 的 update_url
url = str(_config_val("update_url", "") or "").strip()
if not url:
url = ("https://git.rrrosmontis.icu/api/v1/repos/RoyirinRosmontis/"
"Private-Proxy/releases/latest")
raise RuntimeError("config.json 未配置 update_url")
log("正在检查更新...")
if _update_via_proxy():
# 走节点隧道(CONNECT,设置「使用代理更新」开启时);显式代理避免残留干扰