Skip to content

Commit 66c5e90

Browse files
committed
fix: 更新ECH链接生成逻辑,使用cloudflare-ech.com前缀替代原有配置
1 parent 6fb9ab0 commit 66c5e90

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
[![License](https://img.shields.io/github/license/cmliu/edgetunnel?style=flat-square)](https://github.com/cmliu/edgetunnel/blob/main/LICENSE)
77
[![Telegram](https://img.shields.io/badge/Telegram-Group-blue?style=flat-square&logo=telegram)](https://t.me/CMLiussss)
88
[![YouTube](https://img.shields.io/badge/YouTube-Channel-red?style=flat-square&logo=youtube)](https://www.youtube.com/watch?v=LeT4jQUh8ok)
9-
[![DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/cmliu/edgetunnel)
9+
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/cmliu/edgetunnel)
1010
---
1111

1212
## 📖 项目简介
1313

1414
**edgetunnel** 是一个基于 CF Workers/Pages 平台的边缘计算隧道解密方案。它能够高效地处理网络流量,并提供强大的管理面板和灵活的节点配置能力。
1515

16+
- 🖥️ **Demo 演示站点**[https://EDT-Pages.github.io/admin](https://EDT-Pages.github.io/admin)
17+
1618
### ✨ 核心特性
1719

1820
- 🛡️ **协议支持**:支持 VLESS、Trojan 等主流协议,深度集成加密传输。
@@ -27,7 +29,6 @@
2729
## 💡 快速部署
2830
>[!TIP]
2931
> 📖 **详尽图文教程**[edgetunnel 部署指南](https://cmliussss.com/p/edt2/)
30-
> 🖥️ **Demo 演示站点**[https://EDT-Pages.github.io/admin](https://EDT-Pages.github.io/admin)
3132
3233
>[!WARNING]
3334
> ⚠️ **Error 1101问题**[视频解析](https://www.youtube.com/watch?v=r4uVTEJptdE)

_worker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ export default {
280280
return new Response('优选订阅生成器异常:' + error.message, { status: 403 });
281281
}
282282
}
283-
const ECHLINK参数 = config_JSON.ECH ? `&ech=${encodeURIComponent(ECH_DOH)}` : '';
283+
const ECHLINK参数 = config_JSON.ECH ? `&ech=${encodeURIComponent('cloudflare-ech.com+' + ECH_DOH)}` : '';
284284
订阅内容 = 其他节点LINK + 完整优选IP.map(原始地址 => {
285285
// 统一正则: 匹配 域名/IPv4/IPv6地址 + 可选端口 + 可选备注
286286
// 示例:
@@ -1376,7 +1376,7 @@ async function 读取config_JSON(env, hostname, userID, path, 重置配置 = fal
13761376
if (!config_JSON.Fingerprint) config_JSON.Fingerprint = "chrome";
13771377
if (!config_JSON.ECH) config_JSON.ECH = false;
13781378
else config_JSON.优选订阅生成.SUBUpdateTime = 1; // 启用 ECH 时强制将订阅更新时间改为 1 小时
1379-
const ECHLINK参数 = config_JSON.ECH ? `&ech=${encodeURIComponent(ECH_DOH)}` : '';
1379+
const ECHLINK参数 = config_JSON.ECH ? `&ech=${encodeURIComponent('cloudflare-ech.com+' + ECH_DOH)}` : '';
13801380
config_JSON.LINK = `${config_JSON.协议类型}://${userID}@${host}:443?security=tls&type=${config_JSON.传输协议 + ECHLINK参数}&host=${host}&fp=${config_JSON.Fingerprint}&sni=${host}&path=${encodeURIComponent(config_JSON.启用0RTT ? config_JSON.PATH + '?ed=2560' : config_JSON.PATH) + TLS分片参数}&encryption=none${config_JSON.跳过证书验证 ? '&insecure=1&allowInsecure=1' : ''}#${encodeURIComponent(config_JSON.优选订阅生成.SUBNAME)}`;
13811381
config_JSON.优选订阅生成.TOKEN = await MD5MD5(hostname + userID);
13821382

0 commit comments

Comments
 (0)