From 90afbbedb029bd552a825158532a6336323ed441 Mon Sep 17 00:00:00 2001 From: mercury Date: Sun, 22 Dec 2024 15:04:19 +0400 Subject: [PATCH] cloak DoH --- app/bot.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/bot.php b/app/bot.php index 4bed33c..0efeb6c 100644 --- a/app/bot.php +++ b/app/bot.php @@ -6035,7 +6035,7 @@ DNS-over-HTTPS with IP: '"~warp~"' => json_encode(array_keys(array_filter($pac['warplist'] ?: []))), '"~process~"' => json_encode(array_keys(array_filter($pac['processlist'] ?: []))), '"~package~"' => json_encode(array_keys(array_filter($pac['packagelist'] ?: []))), - '~dns~' => "https://$domain/dns-query/$uid", + '~dns~' => "https://$domain/dns-query$hash/$uid", '~uid~' => $uid, '~domain~' => $domain, '~directdomain~' => $pac['domain'], @@ -6371,7 +6371,7 @@ DNS-over-HTTPS with IP: location CONF; $template = preg_replace('~(location /adguard.+?})\s*location~s', $r, $template); - $template = preg_replace('~(/webapp|/pac|/adguard|/ws)~', '${1}' . $h, $template); + $template = preg_replace('~(/webapp|/pac|/adguard|/ws|/dns-query)~', '${1}' . $h, $template); file_put_contents('/config/nginx.conf', $template); $x = $this->getXray(); if (!empty($x['inbounds'][0]['streamSettings']['wsSettings']['path'])) { @@ -6446,7 +6446,7 @@ DNS-over-HTTPS with IP: $scheme = empty($ssl = $this->nginxGetTypeCert()) ? 'http' : 'https'; $text = "$scheme://$domain/adguard$hash\nLogin: admin\nPass: {$conf['adpswd']}\n\n"; if ($ssl) { - $text .= "DNS over HTTPS:\n$ip\n$scheme://$domain/dns-query" . ($conf['adguardkey'] ? "/{$conf['adguardkey']}" : '') . "\n\n"; + $text .= "DNS over HTTPS:\n$ip\n$scheme://$domain/dns-query$hash" . ($conf['adguardkey'] ? "/{$conf['adguardkey']}" : '') . "\n\n"; $text .= "DNS over TLS:\ntls://" . ($conf['adguardkey'] ? "{$conf['adguardkey']}." : '') . "$domain"; } $status = $this->i18n(exec("JSON=1 timeout 2 dnslookup google.com ad") ? 'on' : 'off');