Skip to content

Commit 16a7101

Browse files
authored
Merge pull request cmliu#928 from cmliu/beta2.0
Beta2.0
2 parents 11ea2f8 + be0de65 commit 16a7101

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

_worker.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -799,9 +799,8 @@ function Clash订阅配置文件热补丁(Clash_原始订阅内容, uuid = null,
799799
nameserver:
800800
- https://sm2.doh.pub/dns-query
801801
- https://dns.alidns.com/dns-query
802-
fallback:
802+
fallback:${ECH_DNS ? `\n - ${ECH_DNS}` : ''}
803803
- 8.8.4.4
804-
- 101.101.101.101
805804
- 208.67.220.220
806805
fallback-filter:
807806
geoip: true
@@ -826,7 +825,7 @@ function Clash订阅配置文件热补丁(Clash_原始订阅内容, uuid = null,
826825
// 如果 ECH 启用且 HOSTS 有效,添加 nameserver-policy
827826
if (ECH启用 && HOSTS.length > 0) {
828827
// 生成 HOSTS 的 nameserver-policy 条目
829-
const hostsEntries = HOSTS.map(host => ` "${host}":\n - tls://223.5.5.5\n - tls://8.8.8.8\n - https://doh.090227.xyz/CMLiussss${ECH_DNS ? `\n - ${ECH_DNS}` : ''}`).join('\n');
828+
const hostsEntries = HOSTS.map(host => ` "${host}":${ECH_DNS ? `\n - ${ECH_DNS}` : ''}\n - https://doh.cm.edu.kg/CMLiussss`).join('\n');
830829

831830
// 检查是否存在 nameserver-policy:
832831
const hasNameserverPolicy = /^\s{2}nameserver-policy:\s*(?:\n|$)/m.test(clash_yaml);
@@ -1437,7 +1436,10 @@ async function 读取config_JSON(env, hostname, userID, path, 重置配置 = fal
14371436
if (!config_JSON.HOSTS) config_JSON.HOSTS = [hostname];
14381437
if (env.HOST) config_JSON.HOSTS = (await 整理成数组(env.HOST)).map(h => h.toLowerCase().replace(/^https?:\/\//, '').split('/')[0].split(':')[0]);
14391438
config_JSON.UUID = userID;
1439+
if (!config_JSON.随机路径) config_JSON.随机路径 = false;
1440+
if (!config_JSON.启用0RTT) config_JSON.启用0RTT = false;
14401441
config_JSON.PATH = path ? (path.startsWith('/') ? path : '/' + path) : (config_JSON.反代.SOCKS5.启用 ? ('/' + config_JSON.反代.SOCKS5.启用 + (config_JSON.反代.SOCKS5.全局 ? '://' : '=') + config_JSON.反代.SOCKS5.账号) : (config_JSON.反代.PROXYIP === 'auto' ? '/' : `/proxyip=${config_JSON.反代.PROXYIP}`));
1442+
if (!config_JSON.TLS分片 && config_JSON.TLS分片 !== null) config_JSON.TLS分片 = null;
14411443
const TLS分片参数 = config_JSON.TLS分片 == 'Shadowrocket' ? `&fragment=${encodeURIComponent('1,40-60,30-50,tlshello')}` : config_JSON.TLS分片 == 'Happ' ? `&fragment=${encodeURIComponent('3,1,tlshello')}` : '';
14421444
if (!config_JSON.Fingerprint) config_JSON.Fingerprint = "chrome";
14431445
if (!config_JSON.ECH) config_JSON.ECH = false;

0 commit comments

Comments
 (0)