黑海洋 黑海洋 WIKI

Cloudflare Worker Proxy 反向代理(jsdelivr加速)

开发 更新于 02-18 16:24 · 约 2 分钟 · 黑海洋 · 11.8万 · 4 条评论

cloudflare-reverse-proxy

Cloudflare Worker Proxy 反向代理,可以把github、githubusercontent、jsdelivr等流量加速。

本项目是cloudflare反向代理。在cloudflare网站中新建worker,把worker.js文件中的内容复制进去即可使用。

代码地址:https://github.com/hadis898/gh-proxy/blob/master/worker.js

使用方法为在任意url前面加上https://你的域名/proxy/ 即可使用cloudflare加速。

使用方法示例:https://pic.7761.cf/https://raw.githubusercontent.com/hadis898/Linux-tools/main/vps.sh

本人另外一个项目是基于vercel的反向代理,仓库地址https://github.com/gaboolic/vercel-reverse-proxy 供大家参考

详细步骤

0 登录https://www.cloudflare.com/

1 创建应用程序 创建应用程序 2 创建worker(pages也一样) 创建worker 3 点"部署"按钮 创建worker 4 编辑代码 编辑代码 4 编辑代码 编辑代码 5 把worker.js文件中的内容复制进去,点"保存并部署" 保存并部署 6 (可选) 添加自定义域

绑定自己的域名。CloudFlare Workers 设置使用自定义域名教程

使用方法

在任意url前面加上https://你的域名/proxy/ 即可使用cloudflare加速。

相关文档

评论与补充4

有问题或想补充的,写在下面 · 选中正文文字再点「报告错误」会自动引用
  • 解决cdn.jsdelivr.net无法访问(国内加速)#4
    [...]使用案例:https://raw.githubusercontent.com/FongMi/CatVodSpider/main/json/config.json拼接成下面的样子https://cdn.jsdelivr.us/gh/FongMi/CatVodSpider@main/json/config.json那么这就简单了,只需要把网站文件中的所有“cdn.jsdelivr.net&[...]
  • jsdelivr cdn报错无法访问 - 偶遇你#3
    [...]jsdelivr.b-cdn.net (台湾 CDN)使用案例://cdn.jsdelivr.us/gh/LWingYan/仓库名@latest/xx.png拼接成下面的样子//jsdelivr.b-cdn.net/gh/LWingYan/仓库名@latest/xx.png那么这就简单了,只需要把网站文件中的所有cdn.jsdelivr.net都替换成上方的任意一个域名就可以了有财力又有能力的 最[...]
  • 解决cdn.jsdelivr.net无法访问(国内加速)#2
    [...]使用案例:https://raw.githubusercontent.com/FongMi/CatVodSpider/main/json/config.json拼接成下面的样子https://cdn.jsdelivr.us/gh/FongMi/CatVodSpider@main/json/config.json那么这就简单了,只需要把网站文件中的所有“cdn.jsdelivr.net&[...]
  • 反代Github和jsdelivr进行加速#1
    [...]使用方法在PHP安装“fileinfo”扩展,然后在网站目录新建一个名为gh.php的文件,将下面的代码复制粘贴进去。然后访问:你的域名/gh.php?url=你要代理的URL地址使用方法示例:https://wiki.upx8.com/pic.php?url=https://cdn.jsdelivr.net/gh/notetoday/img/usr/uploads/202[...]
就事论事,别发广告 · 正常评论