Skip to content

Commit 774ea2d

Browse files
committed
修改ech参数值为workerDomain+https://v.recipes/dns/dns.google/dns-query
1 parent 32592cf commit 774ea2d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

明文源吗

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@
12211221
try {
12221222
// 优先使用 Google DNS 查询 cloudflare-ech.com 的 ECH 配置
12231223
debugSteps.push('尝试使用 Google DNS 查询 cloudflare-ech.com...');
1224-
const echDomainUrl = `https://dns.google/resolve?name=cloudflare-ech.com&type=65`;
1224+
const echDomainUrl = `https://v.recipes/dns/dns.google/dns-query?name=cloudflare-ech.com&type=65`;
12251225
const echResponse = await fetch(echDomainUrl, {
12261226
headers: {
12271227
'Accept': 'application/json'
@@ -1271,7 +1271,7 @@
12711271

12721272
// 如果 cloudflare-ech.com 查询失败,尝试使用 Google DNS 查询目标域名的 HTTPS 记录
12731273
debugSteps.push(`尝试使用 Google DNS 查询目标域名 ${domain}...`);
1274-
const dohUrl = `https://dns.google/resolve?name=${encodeURIComponent(domain)}&type=65`;
1274+
const dohUrl = `https://v.recipes/dns/dns.google/dns-query?name=${encodeURIComponent(domain)}&type=65`;
12751275
const response = await fetch(dohUrl, {
12761276
headers: {
12771277
'Accept': 'application/json'
@@ -1598,7 +1598,7 @@
15981598
// 如果启用了ECH且有ECH配置,添加ech参数(ECH需要伪装成Chrome浏览器)
15991599
if (enableECH && echConfig) {
16001600
wsParams.set('alpn', 'h3,h2,http/1.1');
1601-
wsParams.set('ech', echConfig);
1601+
wsParams.set('ech', `${workerDomain}+https://v.recipes/dns/dns.google/dns-query`);
16021602
}
16031603

16041604
links.push(`${proto}://${user}@${safeIP}:${port}?${wsParams.toString()}#${encodeURIComponent(wsNodeName)}`);
@@ -1677,7 +1677,7 @@
16771677
// 如果启用了ECH且有ECH配置,添加ech参数(ECH需要伪装成Chrome浏览器)
16781678
if (enableECH && echConfig) {
16791679
wsParams.set('alpn', 'h3,h2,http/1.1');
1680-
wsParams.set('ech', echConfig);
1680+
wsParams.set('ech', `${workerDomain}+https://v.recipes/dns/dns.google/dns-query`);
16811681
}
16821682

16831683
links.push(`${atob('dHJvamFuOi8v')}${password}@${safeIP}:${port}?${wsParams.toString()}#${encodeURIComponent(wsNodeName)}`);
@@ -5302,7 +5302,7 @@
53025302

53035303
// 如果启用了ECH且有ECH配置,添加ech参数(ECH需要伪装成Chrome浏览器)
53045304
if (enableECH && echConfig) {
5305-
link += `&alpn=h3%2Ch2%2Chttp%2F1.1&ech=${encodeURIComponent(echConfig)}`;
5305+
link += `&alpn=h3%2Ch2%2Chttp%2F1.1&ech=${encodeURIComponent(`${workerDomain}+https://v.recipes/dns/dns.google/dns-query`)}`;
53065306
}
53075307

53085308
link += `#${encodeURIComponent(wsNodeName)}`;
@@ -5321,7 +5321,7 @@
53215321

53225322
// 如果启用了ECH且有ECH配置,添加ech参数(ECH需要伪装成Chrome浏览器)
53235323
if (enableECH && echConfig) {
5324-
link += `&alpn=h3%2Ch2%2Chttp%2F1.1&ech=${encodeURIComponent(echConfig)}`;
5324+
link += `&alpn=h3%2Ch2%2Chttp%2F1.1&ech=${encodeURIComponent(`${workerDomain}+https://v.recipes/dns/dns.google/dns-query`)}`;
53255325
}
53265326

53275327
link += `#${encodeURIComponent(wsNodeName)}`;
@@ -5358,7 +5358,7 @@
53585358
// 如果启用了ECH且有ECH配置,添加ech参数(ECH需要伪装成Chrome浏览器)
53595359
if (enableECH && echConfig) {
53605360
params.set('alpn', 'h3,h2,http/1.1');
5361-
params.set('ech', echConfig);
5361+
params.set('ech', `${workerDomain}+https://v.recipes/dns/dns.google/dns-query`);
53625362
}
53635363

53645364
links.push(`vless://${user}@${safeIP}:${port}?${params.toString()}#${encodeURIComponent(wsNodeName)}`);
@@ -5388,7 +5388,7 @@
53885388

53895389
// 如果启用了ECH且有ECH配置,添加ech参数(ECH需要伪装成Chrome浏览器)
53905390
if (enableECH && echConfig) {
5391-
link += `&alpn=h3%2Ch2%2Chttp%2F1.1&ech=${encodeURIComponent(echConfig)}`;
5391+
link += `&alpn=h3%2Ch2%2Chttp%2F1.1&ech=${encodeURIComponent(`${workerDomain}+https://v.recipes/dns/dns.google/dns-query`)}`;
53925392
}
53935393

53945394
link += `#${encodeURIComponent(wsNodeName)}`;
@@ -5407,7 +5407,7 @@
54075407

54085408
// 如果启用了ECH且有ECH配置,添加ech参数(ECH需要伪装成Chrome浏览器)
54095409
if (enableECH && echConfig) {
5410-
link += `&alpn=h3%2Ch2%2Chttp%2F1.1&ech=${encodeURIComponent(echConfig)}`;
5410+
link += `&alpn=h3%2Ch2%2Chttp%2F1.1&ech=${encodeURIComponent(`${workerDomain}+https://v.recipes/dns/dns.google/dns-query`)}`;
54115411
}
54125412

54135413
link += `#${encodeURIComponent(wsNodeName)}`;

0 commit comments

Comments
 (0)