"dns-prefetch" and "preconnect" links are not handled by Shields
See original GitHub issueDescription
macOS leaks DNS lookups for requests that should be blocked. This occurs for requests that do not need to be CNAME uncloaked, and even when CNAME uncloaking is disabled. Spun off from https://github.com/brave/brave-browser/issues/15302, as Windows 10 is fine
Steps to Reproduce
- Spin up Wireshark, with TLS session recording, via
https://wiki.wireshark.org/TLS#Using_the_.28Pre.29-Master-Secret
- Visit
https://www.macrumors.com
while recording traffic, in a new profile - Look through the session’s traffic and make sure none of the following occur:
- any requests to
googletagmanager.com
- any DNS requests for
googletagmanager.com
- any TLS-preconnect steps to
googletagmanager.com
Actual result:

There’s a CNAME lookup for googletagmanager.com
Expected result:
Shouldn’t be any DNS CNAME lookup for googletagmanager.com
; Windows is fine 👍
Reproduces how often:
100% on macOS nightly
Brave version (brave://version info)
Brave | 1.26.24 Chromium: 91.0.4472.57 (Official Build) nightly (x86_64) |
---|---|
Revision | e3443317fa07f1e9997e4a9c738eddfefc3c0292-refs/branch-heads/4472_54@{#6} |
OS | macOS Version 11.3.1 (Build 20E241) |
I haven’t yet tried other channels - it was suggested by @antonok-edm to try Brave <= 1.16 (which doesn’t have CNAME uncloaking).
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Establish network connections early to improve perceived ...
Using dns-prefetch and preconnect allows sites to reduce the amount of time it takes to connect to another origin. The ultimate aim is...
Read more >Prevent DNS lookups for CNAME decloaking for adblock for ...
Currently the CNAME / DNS information is fetched before making ... "dns-prefetch" and "preconnect" links are not handled by Shields #15953.
Read more >Dns-prefetch & Preconnect: 7 Tips, Tricks and Pitfalls - Medium
preconnect links can be declared followed by a dns-prefetch link so that if the first one is not supported, time can be saved...
Read more >Faster Google Fonts with Preconnect - CDN Planet
The preconnect link relation type is used to indicate an origin that will be used to fetch required resources.
Read more >What to <link rel=dns-prefetch> and when to use preconnect
The dns-prefetch resource hint is intended to look-up domain names before the browser would otherwise know that they'd be needed in the near ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Another report of this issue on 1.32 / Windows 11: https://github.com/brave/brave-core/pull/8704#issuecomment-988590392
@ShivanKaul yes, can still reproduce using