Skip to content

Commit c87f190

Browse files
authored
Merge pull request cmliu#914 from cmliu/beta2.0
fix: 调整订阅更新时间,启用ECH时强制将更新时间改为1小时
2 parents 35abebe + a47ae86 commit c87f190

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

_worker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ async function 读取config_JSON(env, hostname, userID, path, 重置配置 = fal
12951295
},
12961296
SUB: null,
12971297
SUBNAME: "edge" + "tunnel",
1298-
SUBUpdateTime: 6, // 订阅更新时间(小时)
1298+
SUBUpdateTime: 3, // 订阅更新时间(小时)
12991299
TOKEN: await MD5MD5(hostname + userID),
13001300
},
13011301
订阅转换配置: {
@@ -1354,6 +1354,7 @@ async function 读取config_JSON(env, hostname, userID, path, 重置配置 = fal
13541354
const TLS分片参数 = config_JSON.TLS分片 == 'Shadowrocket' ? `&fragment=${encodeURIComponent('1,40-60,30-50,tlshello')}` : config_JSON.TLS分片 == 'Happ' ? `&fragment=${encodeURIComponent('3,1,tlshello')}` : '';
13551355
if (!config_JSON.Fingerprint) config_JSON.Fingerprint = "chrome";
13561356
if (!config_JSON.ECH) config_JSON.ECH = false;
1357+
else config_JSON.优选订阅生成.SUBUpdateTime = 1; // 启用 ECH 时强制将订阅更新时间改为 1 小时
13571358
const ECHLINK参数 = config_JSON.ECH ? '&ech=' + encodeURIComponent(await getECH(config_JSON.HOST)) : '';
13581359
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)}`;
13591360
config_JSON.优选订阅生成.TOKEN = await MD5MD5(hostname + userID);

0 commit comments

Comments
 (0)