Skip to content

Commit 05d6bb8

Browse files
authored
Merge pull request cmliu#923 from cmliu/beta2.0
Beta2.0
2 parents 210282b + b367a81 commit 05d6bb8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

_worker.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ function Clash订阅配置文件热补丁(Clash_原始订阅内容, uuid = null,
824824
// 如果 ECH 启用且 HOSTS 有效,添加 nameserver-policy
825825
if (ECH启用 && HOSTS.length > 0) {
826826
// 生成 HOSTS 的 nameserver-policy 条目
827-
const hostsEntries = HOSTS.map(host => ` "${host}":\n - tls://8.8.8.8\n - https://doh.cmliussss.com/CMLiussss\n - ${ECH_DOH}`).join('\n');
827+
const hostsEntries = HOSTS.map(host => ` "${host}":\n - tls://223.5.5.5\n - tls://8.8.8.8\n - https://doh.cmliussss.com/CMLiussss\n - ${ECH_DOH}`).join('\n');
828828

829829
// 检查是否存在 nameserver-policy:
830830
const hasNameserverPolicy = /^\s{2}nameserver-policy:\s*(?:\n|$)/m.test(clash_yaml);
@@ -998,7 +998,8 @@ function Clash订阅配置文件热补丁(Clash_原始订阅内容, uuid = null,
998998
return processedLines.join('\n');
999999
}
10001000

1001-
function Singbox订阅配置文件热补丁(sb_json_text, uuid = null, fingerprint = "chrome", ech_config = null) {
1001+
function Singbox订阅配置文件热补丁(SingBox_原始订阅内容, uuid = null, fingerprint = "chrome", ech_config = null) {
1002+
const sb_json_text = SingBox_原始订阅内容.replace('1.1.1.1', '8.8.8.8').replace('1.0.0.1', '8.8.4.4');
10021003
try {
10031004
let config = JSON.parse(sb_json_text);
10041005

@@ -1165,6 +1166,7 @@ function Singbox订阅配置文件热补丁(sb_json_text, uuid = null, fingerpri
11651166
if (ech_config) {
11661167
outbound.tls.ech = {
11671168
enabled: true,
1169+
//query_server_name: "cloudflare-ech.com",// 等待 1.13.0+ 版本上线
11681170
config: `-----BEGIN ECH CONFIGS-----\n${ech_config}\n-----END ECH CONFIGS-----`
11691171
};
11701172
}

0 commit comments

Comments
 (0)