MacOS: Google Chrome一直在尝试连接[2001:4860:4860::8888]

WARNING: This article may be obsolete
This post was published in 2021-01-22. Obviously, expired content is less useful to users if it has already pasted its expiration date.

如果你是macOS上的Chrome用户(中国大陆地区),你可能会在2020年的某些时间发现它打开国内网页的速度非常非常慢,见:为什么 Google Chrome 打开网页有时极慢?

问题出在Chrome内置的secure DNS上:

把secure DNS关掉,Chrome就会遵循macOS->network->DNS里的设置(比如说8.8.8.8, 1.1.1.1)了吗?

大概是的。

2023年更新:关掉secure DNS(或者修改了系统的DNS)以后,你可能需要手动清理Chrome的DNS缓存:访问 chrome://net-internals/#dns  ,然后点击 Clear host cache 按钮:

如果通过上面这个secure DNS案例来继续深究Chrome的DNS查询记录,你可能会发现一些看起来有些奇怪的53端口访问日志:

Vallum.app的截图

尽管你没有在macOS DNS里设置这个地址,Chrome仍然会坚持不懈地尝试连接它:[2001:4860:4860::8888]

Google Chrome背叛了你的DNS设置吗?大概是没有的。事实上,这个对53端口的访问并不用于DNS解析:https://bugs.chromium.org/p/chromium/issues/detail?id=331746

Chrome's internal DNS resolver checks whether the host currently has global IPv6 connectivity by creating a socket connected to Google Public DNS' IPv6 address. These show up in the NetLog as UDP_SOCKET objects with a source dependency of the HOST_RESOLVER_IMPL_REQUEST.

This change adds an explicit IPV6_REACHABILITY_CHECK source type that will show up instead, to clarify the purpose of the UDP sockets.

(Note that no packets are actually sent as a result of the checks; UDP doesn't need to send any packets to connect, and the HostResolverImpl doesn't send any data over the socket explicitly.)

https://bugs.chromium.org/p/chromium/issues/detail?id=331746


 Last Modified in 2023-03-30 

Leave a Comment Anonymous comment is allowed / 允许匿名评论