feat(update): publish fork releases for online self-update

This commit is contained in:
ji ruo committed 2026-10-09 08:45:33 +08:00
1 parent e6ec569991
commit 714b00cccb
4 files changed
+173 -13

No files matched your search

+2 -2
View File
@@ -12,7 +12,7 @@ import (
// Repo 是发布源。写死而不是做成配置项:更新源可配等于给任何能改配置的人一条
// 远程代码执行通道,对一个渗透测试平台来说这个口子开不得。
const Repo = "Autumn-27/artex"
const Repo = "RuoJi6/ARTEX"
// latestURL 是 GitHub 的"最新正式版"接口。它会自动跳过 prerelease 和 draft。
const latestURL = "https://api.github.com/repos/" + Repo + "/releases/latest"
@@ -107,7 +107,7 @@ func FetchLatest(ctx context.Context, c *http.Client) (*Release, error) {
// 未认证的 GitHub API 是每 IP 每小时 60 次,共用出口 IP 时很容易撞上。
return nil, fmt.Errorf("GitHub 接口限流(每小时 60 次),请稍后再试")
case resp.StatusCode == http.StatusNotFound:
return nil, fmt.Errorf("仓库 %s 尚未发布任何正式版本", Repo)
return nil, fmt.Errorf("仓库 %s 不可访问或尚未发布正式版本", Repo)
case resp.StatusCode != http.StatusOK:
return nil, fmt.Errorf("GitHub 返回 %d", resp.StatusCode)
}