├── nginx.conf ├── vercel.json ├── netlify.toml ├── LICENSE ├── README.md ├── index.html └── index-en.html /nginx.conf: -------------------------------------------------------------------------------- 1 | 、删了 -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "routes": [ 4 | { "src": "/", "dest": "/index.html" }, 5 | {"src": "/en","dest": "/index-en.html"}, 6 | {"src": "/(.*)(.pdf$)", "dest": "/", "status": 403}, 7 | { "src": "/(.*)", "dest": "https://cdn.jsdelivr.net" } 8 | ] 9 | } -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [[redirects]] 2 | from = "/" 3 | to = "/index.html" 4 | status = 200 5 | force = true 6 | 7 | [[redirects]] 8 | from = "/en" 9 | to = "/index-en.html" 10 | status = 200 11 | 12 | [[redirects]] 13 | pattern = "/(.*)(.pdf$)" 14 | to = "/" 15 | status = 403 16 | force = true 17 | 18 | [[redirects]] 19 | from = "/gemini" 20 | to = "https://generativelanguage.googleapis.com/" 21 | status = 200 22 | force = true 23 | 24 | [[redirects]] 25 | from = "/turbofely" 26 | to = "/npm/turbofely@1.0.0/src/turbofely.js" 27 | status = 200 28 | 29 | [[redirects]] 30 | from = "/*" 31 | to = "https://cdn.jsdelivr.net/:splat" 32 | status = 200 33 | force = true -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 云深 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Jsdelivr-Proxy 2 | 3 | > [!TIP] 4 | > 🚀 JsDeliv-CN 项目已上线!使用本套源码,提供长期免费的 JsDelivr 中国加速服务: 5 | > **[立即访问](https://cdn.mengze.vip/) ➡️** 6 | 7 | 基于 Serverless 架构编写的 Jsdelivr 反向代理解决方案模板仓库,提供零成本、高可用的 CDN 加速服务,解决中国内陆地区因GFW拦截,Jsdelivr官方节点访问受限问题。 8 | 9 | ![License](https://img.shields.io/badge/license-MIT-green) 10 | 11 | [![Star History Chart](https://api.star-history.com/svg?repos=JanePHPDev/Vercel-Netlify-Jsdelivr-Mirror&type=Date)](https://star-history.com/#JanePHPDev/Vercel-Netlify-Jsdelivr-Mirror&Date) 12 | 13 | 14 | ## 🚀 快速部署 15 | 16 | ### Vercel 一键部署 17 | [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/JanePHPDev/Vercel-Netlify-JsDelivr-Mirror&project-name=jsd-mirror&repository-name=jsd-mirror) 18 | 19 | ### Netlify 一键部署 20 | [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/JanePHPDev/Vercel-Netlify-JsDelivr-Mirror) 21 | 22 | > [!WARNING] 23 | > **重要安全提醒** 24 | > 1. 必须绑定自定义域名!Vercel 默认 `*.vercel.app` 域名在中国大陆无法访问 25 | > 2. 推荐使用未被污染的域名(建议注册时间 >6 个月) 26 | > 3. 新域名建议先进行 DNS 污染检测(可使用 [DNS Checker](https://dnschecker.org/)) 27 | 28 | ## 🔧 配置指南 29 | 30 | ### 域名解析设置 31 | 32 | | 平台 | 记录类型 | 主机名 | 指向地址 | 33 | |---------|----------|--------------|-----------------------------| 34 | | Vercel | CNAME | @ 或 www | `cname-china.vercel-dns.com`| 35 | | Netlify | CNAME | @ 或 www | 自动分配的 xxx.netlify.app | 36 | 37 | ### 平台配置步骤 38 | 39 | **Vercel 配置流程**: 40 | 1. 登录 [Vercel Dashboard](https://vercel.com/dashboard) 41 | 2. 进入项目 → Settings → Domains 42 | 3. 添加已解析的域名(如 `cdn.yourdomain.com`) 43 | 4. 等待 SSL 证书自动签发(约2分钟) 44 | 45 | **Netlify 配置流程**: 46 | 1. 登录 [Netlify 控制台](https://app.netlify.com/) 47 | 2. 进入 Site configuration → Domain management 48 | 3. 添加自定义域名并验证所有权 49 | 4. 开启 [HTTPS 强制跳转](https://docs.netlify.com/domains-https/https-ssl/#automatic-https) 50 | 51 | ## 💡 使用示例 52 | 53 | 将原 jsDelivr 链接中的域名替换为你的镜像域名: 54 | 55 | ```bash 56 | # 原链接 57 | https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.js 58 | 59 | # 替换后 60 | https://cdn.yourdomain.com/npm/vue@3/dist/vue.global.js 61 | ``` 62 | 63 | 支持所有 jsDelivr 资源类型: 64 | - npm 包:`/npm/包名@版本/文件路径` 65 | - GitHub 资源:`/gh/用户/仓库@版本/文件路径` 66 | - 组合加速:`/combine/...` 67 | 68 | ## 🤝 参与贡献 69 | 70 | 欢迎通过以下方式参与项目: 71 | 1. 提交 [Issue](https://github.com/JanePHPDev/Vercel-Netlify-Jsdelivr-Mirror/issues) 反馈问题 72 | 2. Fork 项目并提交 Pull Request 73 | 74 | 贡献者名单: 75 | ![Contributors](https://contrib.rocks/image?repo=JanePHPDev/Vercel-Netlify-Jsdelivr-Mirror) 76 | 77 | ## 📜 开源协议 78 | 79 | 本项目采用 [MIT License](LICENSE) 开源 80 | 81 | --- 82 | 83 | > 如果本项目对您有帮助,请点亮 ⭐ Star 支持!您的认可是我们持续优化的动力! 84 | 85 | [![mm_reward_qrcode_1743497808845.png](https://cdn.mengze.vip/gh/YShenZe/Blog-Static-Resource@main/images/mm_reward_qrcode_1743497808845.png)](https://cdn.mengze.vip/gh/JanePHPDev/Blog-Static-Resource@main/images/mm_reward_qrcode_1743497808845.png) -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JsDelivr中国镜像站 7 | 8 | 9 | 10 | 304 | 305 | 306 |
307 | 322 |
323 | 站长博客 324 | LineXic博客 325 | English 326 | 联系站长 327 | 328 | 329 |
330 |
331 | 332 |
333 |
334 |

JsDelivr China Proxy

335 |

336 | 中国大陆地区优化的 jsDelivr CDN 加速服务
337 | 由 @梦泽提供 338 |

339 | 立即使用 340 |
341 |
342 | 343 |
344 |
345 |

如何使用本镜像站?

346 |

若您需要使用加速服务,只需将 jsDelivr 链接中的 cdn.jsdelivr.net 替换为 cdn.mengze.vip即可。比如:

347 |

https://cdn.jsdelivr.net/npm/jquery@4.0.0-beta.2/dist/jquery.min.js

348 |

替换后变为:

349 |

https://cdn.mengze.vip/npm/jquery@4.0.0-beta.2/dist/jquery.min.js

350 |

若想访问项目文件夹,请使用如下格式:

351 |

https://cdn.mengze.vip/npm/包名@版本/

352 |

示例:

353 |

https://cdn.mengze.vip/npm/jquery@4.0.0-beta.2/

354 |
355 |
356 |

为了确保服务的稳定性与合规性,使用本镜像站时请遵守以下规定:

357 | 362 |

项目开源地址:GitHub 仓库

363 |
364 | 365 |
366 | 367 | 370 | 371 | 402 | 403 | 404 | -------------------------------------------------------------------------------- /index-en.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JsDelivr China Proxy 7 | 8 | 9 | 10 | 304 | 305 | 306 |
307 | 323 |
324 | Owner's Blog 325 | LineXic Blog 326 | BlogEcho 327 | Chinese 328 | Contact Owner 329 | 330 |
331 |
332 | 333 |
334 |
335 |

JsDelivr China Proxy

336 |

337 | Optimized jsDelivr CDN acceleration service for Mainland China
338 | Provided by @Mengze 339 |

340 | Use Now 341 |
342 |
343 | 344 |
345 |
346 |

How to Use This Mirror Site?

347 |

If you want to use the acceleration service, simply replace cdn.jsdelivr.net with cdn.mengze.vip in the jsDelivr link. For example:

348 |

https://cdn.jsdelivr.net/npm/jquery@4.0.0-beta.2/dist/jquery.min.js

349 |

After replacement, it becomes:

350 |

https://cdn.mengze.vip/npm/jquery@4.0.0-beta.2/dist/jquery.min.js

351 |

To access the project folder, use the following format:

352 |

https://cdn.mengze.vip/npm/package-name@version/

353 |

Example:

354 |

https://cdn.mengze.vip/npm/jquery@4.0.0-beta.2/

355 |
356 |
357 |

To ensure the stability and compliance of the service, please adhere to the following regulations when using this mirror site:

358 | 363 |

Project source code: GitHub Repository

364 |
365 | 366 |
367 | 368 | 371 | 372 | 403 | 404 | 405 | 406 | --------------------------------------------------------------------------------