Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Support HTTPS DNS records #1335

Open
miguelangel-nubla opened this issue Nov 27, 2024 · 1 comment
Open

FR: Support HTTPS DNS records #1335

miguelangel-nubla opened this issue Nov 27, 2024 · 1 comment

Comments

@miguelangel-nubla
Copy link

Cloudflare uses these new HTTPS records to speed up TLS, and at least chrome based browsers are starting to use them.

In my particular use-case I override a specific subdomain for local only use local.mydomain.tld:
Overrided A and AAAA records point to a local IP on my network. This has been working fine for years.
Now the browser is asking for HTTPS record instead, which gets forwarded to Cloudflare DNS upstream, and returns the public, external IP address, breaking local connections intermittently.

@miguelangel-nubla
Copy link
Author

For anyone else in the same boat, hook workaround:

function onDNSRequestAfter(request, response) {
    for (let i = 0; i < response.Answer.length; i++) {
        const rr = response.Answer[i];
        const header = rr.Header();

        if (header && header.Rrtype === 65) {
            response.Answer[i] = null;
        }
    }

    response.Answer = response.Answer.filter(rr => rr !== null);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant