question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"dns-prefetch" and "preconnect" links are not handled by Shields

See original GitHub issue

Description

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

  1. Spin up Wireshark, with TLS session recording, via https://wiki.wireshark.org/TLS#Using_the_.28Pre.29-Master-Secret
  2. Visit https://www.macrumors.com while recording traffic, in a new profile
  3. 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:

Screen Shot 2021-05-18 at 3 21 30 PM

There’s a CNAME lookup for googletagmanager.com

Expected result:

Shouldn’t be any DNS CNAME lookup for googletagmanager.com; Windows is fine 👍

macrumors-windows-nightly

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:open
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
antonok-edmcommented, Dec 16, 2021

Another report of this issue on 1.32 / Windows 11: https://github.com/brave/brave-core/pull/8704#issuecomment-988590392

1reaction
stephendonnercommented, May 28, 2021

@ShivanKaul yes, can still reproduce using

Brave 1.27.27 Chromium: 91.0.4472.77 (Official Build) nightly (x86_64)
Revision 1cecd5c8a856bc2a5adda436e7b84d8d21b339b6-refs/branch-heads/4472@{#1246}
OS macOS Version 11.4 (Build 20F71)
Screen Shot 2021-05-28 at 2 51 20 PM
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found