mirror of
https://github.com/lush2020/edgetunnel.git
synced 2026-03-21 17:12:33 +08:00
fix: 更新ECH链接生成逻辑,使用cloudflare-ech.com前缀替代原有配置
This commit is contained in:
@@ -6,13 +6,15 @@
|
||||
[](https://github.com/cmliu/edgetunnel/blob/main/LICENSE)
|
||||
[](https://t.me/CMLiussss)
|
||||
[](https://www.youtube.com/watch?v=LeT4jQUh8ok)
|
||||
[](https://deepwiki.com/cmliu/edgetunnel)
|
||||
[](https://deepwiki.com/cmliu/edgetunnel)
|
||||
---
|
||||
|
||||
## 📖 项目简介
|
||||
|
||||
**edgetunnel** 是一个基于 CF Workers/Pages 平台的边缘计算隧道解密方案。它能够高效地处理网络流量,并提供强大的管理面板和灵活的节点配置能力。
|
||||
|
||||
- 🖥️ **Demo 演示站点**:[https://EDT-Pages.github.io/admin](https://EDT-Pages.github.io/admin)
|
||||
|
||||
### ✨ 核心特性
|
||||
|
||||
- 🛡️ **协议支持**:支持 VLESS、Trojan 等主流协议,深度集成加密传输。
|
||||
@@ -27,7 +29,6 @@
|
||||
## 💡 快速部署
|
||||
>[!TIP]
|
||||
> 📖 **详尽图文教程**:[edgetunnel 部署指南](https://cmliussss.com/p/edt2/)
|
||||
> 🖥️ **Demo 演示站点**:[https://EDT-Pages.github.io/admin](https://EDT-Pages.github.io/admin)
|
||||
|
||||
>[!WARNING]
|
||||
> ⚠️ **Error 1101问题**:[视频解析](https://www.youtube.com/watch?v=r4uVTEJptdE)
|
||||
|
||||
@@ -280,7 +280,7 @@ export default {
|
||||
return new Response('优选订阅生成器异常:' + error.message, { status: 403 });
|
||||
}
|
||||
}
|
||||
const ECHLINK参数 = config_JSON.ECH ? `&ech=${encodeURIComponent(ECH_DOH)}` : '';
|
||||
const ECHLINK参数 = config_JSON.ECH ? `&ech=${encodeURIComponent('cloudflare-ech.com+' + ECH_DOH)}` : '';
|
||||
订阅内容 = 其他节点LINK + 完整优选IP.map(原始地址 => {
|
||||
// 统一正则: 匹配 域名/IPv4/IPv6地址 + 可选端口 + 可选备注
|
||||
// 示例:
|
||||
@@ -1376,7 +1376,7 @@ async function 读取config_JSON(env, hostname, userID, path, 重置配置 = fal
|
||||
if (!config_JSON.Fingerprint) config_JSON.Fingerprint = "chrome";
|
||||
if (!config_JSON.ECH) config_JSON.ECH = false;
|
||||
else config_JSON.优选订阅生成.SUBUpdateTime = 1; // 启用 ECH 时强制将订阅更新时间改为 1 小时
|
||||
const ECHLINK参数 = config_JSON.ECH ? `&ech=${encodeURIComponent(ECH_DOH)}` : '';
|
||||
const ECHLINK参数 = config_JSON.ECH ? `&ech=${encodeURIComponent('cloudflare-ech.com+' + ECH_DOH)}` : '';
|
||||
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)}`;
|
||||
config_JSON.优选订阅生成.TOKEN = await MD5MD5(hostname + userID);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user