1如何使用
将GitHub仓库URL中的 github.com 替换为代理地址即可:
原始URL: https://github.com/username/repository.git
代理URL: https://git.onwz.dpdns.org/username/repository.git
2Git Clone 示例
# 原始命令
git clone https://github.com/username/repository.git
# 使用代理
git clone https://git.onwz.dpdns.org/username/repository.git
实际示例:
git clone https://git.onwz.dpdns.org/torvalds/linux.git
5自定义配置
如需修改配置,编辑Worker代码中的 config 对象:
// 修改GitHub镜像源(如使用国内镜像)
githubHost: 'github.com.cnpmjs.org'
// 设置允许的域名
allowedOrigins: ['https://yourdomain.com']
// 修改缓存时间
cache: {
staticTTL: 86400, // 静态资源缓存24小时
apiTTL: 300 // API响应缓存5分钟
}