CF Worker搭建通用反代Emby教程
## CF Worker搭建通用反代Emby教程
这篇帖子介绍了如何使用CF Worker搭建通用反代Emby的教程,适合需要此功能的用户,可以直接使用提供的配置。
### 部署方法
可以参考以前的旧帖子:[【教程】cloudflare优选IP反代emby](https://www.nodeseek.com/post-625516-1)。
### 反代地址
以下是我搭建的反代地址:
- 电信:[https://ct.v2go.cc.cd:443](https://ct.v2go.cc.cd:443)
- 移动:[https://cm.v2go.cc.cd:443](https://cm.v2go.cc.cd:443)
- 联通:[https://cu.v2go.cc.cd:443](https://cu.v2go.cc.cd:443)
使用方法:只需在URL后添加/Emby服务器地址参数,比如:
- [`https://ct.v2go.cc.cd/https://emby.com`](https://ct.v2go.cc.cd/https://emby.com)
- [`https://ct.v2go.cc.cd/emby.com`](https://ct.v2go.cc.cd/emby.com)
如果不是标准端口(80或443),需要在拼接的地址后面添加完整端口,例如:
- [`https://ct.v2go.cc.cd/http://emby.com:8080`](https://ct.v2go.cc.cd/http://emby.com:8080)
### 性能测试
我的电信用户测试速度良好,实际流量情况如下:
- 基本上每天都能达到10万+的访问量。
- 有记录的最高峰被访问达到了200万。
### 代码优化
优化后的代码如下:
```javascript
/**
* ============================================================
* Emby / Jellyfin Worker v4.5 Final
* 功能:
* 1. 动态反向代理
* 2. Emby / Jellyfin 播放优化
* 3. 视频流不缓存
* 4. 静态资源缓存
* 5. Range断点播放
* 6. WebSocket支持
* 7. 防止源站跳转泄露
* ============================================================ */
addEventListener("fetch", e=>e.respondWith(proxy(e.request,e)));
async function proxy(req,event){
// ...
}
```
---
原文链接:[点击查看](https://www.nodeseek.com/post-812298-1)
这篇帖子介绍了如何使用CF Worker搭建通用反代Emby的教程,适合需要此功能的用户,可以直接使用提供的配置。
### 部署方法
可以参考以前的旧帖子:[【教程】cloudflare优选IP反代emby](https://www.nodeseek.com/post-625516-1)。
### 反代地址
以下是我搭建的反代地址:
- 电信:[https://ct.v2go.cc.cd:443](https://ct.v2go.cc.cd:443)
- 移动:[https://cm.v2go.cc.cd:443](https://cm.v2go.cc.cd:443)
- 联通:[https://cu.v2go.cc.cd:443](https://cu.v2go.cc.cd:443)
使用方法:只需在URL后添加/Emby服务器地址参数,比如:
- [`https://ct.v2go.cc.cd/https://emby.com`](https://ct.v2go.cc.cd/https://emby.com)
- [`https://ct.v2go.cc.cd/emby.com`](https://ct.v2go.cc.cd/emby.com)
如果不是标准端口(80或443),需要在拼接的地址后面添加完整端口,例如:
- [`https://ct.v2go.cc.cd/http://emby.com:8080`](https://ct.v2go.cc.cd/http://emby.com:8080)
### 性能测试
我的电信用户测试速度良好,实际流量情况如下:
- 基本上每天都能达到10万+的访问量。
- 有记录的最高峰被访问达到了200万。
### 代码优化
优化后的代码如下:
```javascript
/**
* ============================================================
* Emby / Jellyfin Worker v4.5 Final
* 功能:
* 1. 动态反向代理
* 2. Emby / Jellyfin 播放优化
* 3. 视频流不缓存
* 4. 静态资源缓存
* 5. Range断点播放
* 6. WebSocket支持
* 7. 防止源站跳转泄露
* ============================================================ */
addEventListener("fetch", e=>e.respondWith(proxy(e.request,e)));
async function proxy(req,event){
// ...
}
```
---
原文链接:[点击查看](https://www.nodeseek.com/post-812298-1)
评论
暂无评论。