GitHub Proxy 支持 api.github.com

在使用GitHub Proxy代理 warp 脚本时,发现在调用api.github.com时报错。

经查, gh-proxy 没有加入对api.github.com的支持

https://github.com/hunshcn/gh-proxy/issues/44

那么就自己加一下吧。

修改内容很简单,前面部分,过滤格式增加一行

const exp7 = /^(?:https?:\/\/)?api\.github\.com\/.+?\/.+?\/.*$/i

后面部分,判断格式的地方加一个

|| path.search(exp7) === 0 


======

Github: https://github.com/crazypeace/gh-proxy


======

实例

bash <(curl https://github.crazypeace.workers.dev/https://raw.githubusercontent.com/P3TERX/warp.sh/main/warp.sh | perl -pe "$(curl -L https://github.crazypeace.workers.dev/https://github.com/crazypeace/gh-proxy/raw/master/perl-pe-para)") 4

评论

The Hot3 in Last 30 Days

无服务器 自建短链服务 Url-Shorten-Worker 完整的部署教程

ClouDNS .asia免费域名 托管到CloudFlare开CDN白嫖Websocket WS通道翻墙 / desec.io