之前写了 免费开源的GitHub图床管理工具-PicX ,结果用着用着,内置的几个 CDN 加速提供商不是今天这个不行了就是明天那个不行了,搜索了一下 Cloudflare 加速,找到一个开源项目: https://github.com/hunshcn/gh-proxy 使用 Cloudflare Workers 无服务器版本部署 登录 https://workers.cloudflare.com ,创建应用程序->创建 worker。 打开 https://github.com/hunshcn/gh-proxy 复制 index.js 的代码到左侧代码框,保存并部署。 如果正常,右侧预览应显示首页。 index.js 代码前面几行为自定义配置,注释很清楚。 如果防止他人滥用,可将 GitHub 登录名加进去白名单 ['/username/'] 。 私有仓库加速格式如下: https://user:[email protected]/https://github.com/xxxxxx/xxxxxx GitHub 创建 TOKEN ,替换上面的 ghp_xxxxx 部署的链接替换 ghproxy.com user 不用替换 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 13