api页面功能增强 #69
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
针对最近更新的sh ps1自动替换加速域名,应该对api页面也实现自动替换加速域名:
如:https://hub.glowp.xyz/https://api.github.com/repos/umami-software/umami/releases/latest
把所有原始链接:
"tarball_url": "https://api.github.com/repos/umami-software/umami/tarball/v2.19.0",
"zipball_url": "https://api.github.com/repos/umami-software/umami/zipball/v2.19.0",
替换为
"tarball_url": "https://hub.glowp.xyz/https://api.github.com/repos/umami-software/umami/tarball/v2.19.0",
"zipball_url": "https://hub.glowp.xyz/https://api.github.com/repos/umami-software/umami/zipball/v2.19.0",
不然的话反代api好像意义不大。另外演示站好像挂了,时间:20250904,05:58
反代api只是为了某些脚本中查询上游版本的作用,并且github的api请求有严格的请求频率限制,并且大部分脚本中通过api查询上游版本后也都是通过直链下载,所以这个功能只是为了辅助作用,增加更多逻辑的话感觉收益不大,而且有性能损耗,实现倒是不难
别人sh脚本使用api获取最新版本下载链接,反代的api页面不修改的话,获取的也是GitHub直链吧,这样就加速不了了
大部分情况下主要是从api中获取版本号,分支等等信息,而
Releases下载链接基本不会从api.github中直接获取。虽然也能获取,但是很少有这么做的,大部分脚本是直接拼接 URL 下载的,不会通过 API 再去解析资源链接。因为通过api解析直链比较复杂,并且有速率限制,这样既能减少API调用次数,也容易维护。当然如果这个需求很多的话,后面会考虑加上去。