From 97824922e62a732c3c0e4d96b6e73d2ae8c69376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=92=80=E7=92=A8=E6=A2=A6=E6=98=9F?= <157385609+cuicanmengxing@users.noreply.github.com> Date: Sun, 12 May 2024 13:05:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=A6=E6=88=AAcollector.github.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 域名collector.github.com已根据AdGuard DNS filter规则拦截,缩短加载时间 --- packages/mitmproxy/src/lib/dns/https.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/mitmproxy/src/lib/dns/https.js b/packages/mitmproxy/src/lib/dns/https.js index b7a1f28..a63cde4 100644 --- a/packages/mitmproxy/src/lib/dns/https.js +++ b/packages/mitmproxy/src/lib/dns/https.js @@ -24,6 +24,11 @@ module.exports = class DNSOverHTTPS extends BaseDNS { // 返回预设的IP地址集 return ['20.27.177.116', '20.205.243.168', '20.200.245.245'] } + if (hostname === 'collector.github.com') { + log.info('域名collector.github.com已根据AdGuard DNS filter规则拦截') + // 返回预设的IP地址集 + return ['0.0.0.0'] + } if (hostname === 'hub.docker.com') { log.info('域名hub.docker.com使用内置IP集') // 返回预设的IP地址集