ragibkl / adblock-dns-server

Adblock DNS Server powered by Bancuh DNS and dnsdist-acme
https://bancuh.com/
MIT License
65 stars 14 forks source link

Add /dns-query suffix to DoH addresses #153

Closed Tomatoide closed 2 years ago

Tomatoide commented 2 years ago

Most apps used to change dns expects a /dns-query suffix as most DoH addresses have that and when it doesn't find it it doesn't register successfully, so eg https://sg-dns1.bancuh.com/ should become https://sg-dns1.bancuh.com/dns-query

Tomatoide commented 2 years ago

and for simplification maybe remove '-dns' from address so it becomes https://fr1.bancuh.com/dns-query

ragibkl commented 2 years ago

I'll take a look. I think not hard to do. Let me try.

ragibkl commented 2 years ago

Hi @Tomatoide ,

Most apps used to change dns expects a /dns-query suffix as most DoH addresses have that and when it doesn't find it it doesn't register successfully, so eg https://sg-dns1.bancuh.com/ should become https://sg-dns1.bancuh.com/dns-query

If you look at the following lines, it seems that we already have this support earlier. Could you test again?

    -- add a DoH resolver listening on port 443 of all interfaces
    addDOHLocal('0.0.0.0:443', certFile, keyFile, { '/', '/dns-query' }, { doTCP=true, reusePort=true, tcpFastOpenSize=0 })
    addDOHLocal('[::]:443', certFile, keyFile, { '/', '/dns-query' }, { doTCP=true, reusePort=true, tcpFastOpenSize=0 })
ragibkl commented 2 years ago

and for simplification maybe remove '-dns' from address so it becomes https://fr1.bancuh.com/dns-query

I cannot support 1 server having 2 domains. So if we add fr1.bancuh.com on the server, I have to remove the existing fr-dns1.bancuh.com. I'm worried that we already have users who depend on the existing fr-dns1.bancuh.com, and their internet will be interrupted.

Tomatoide commented 2 years ago

Hi @Tomatoide ,

Most apps used to change dns expects a /dns-query suffix as most DoH addresses have that and when it doesn't find it it doesn't register successfully, so eg https://sg-dns1.bancuh.com/ should become https://sg-dns1.bancuh.com/dns-query

If you look at the following lines, it seems that we already have this support earlier. Could you test again?

    -- add a DoH resolver listening on port 443 of all interfaces
    addDOHLocal('0.0.0.0:443', certFile, keyFile, { '/', '/dns-query' }, { doTCP=true, reusePort=true, tcpFastOpenSize=0 })
    addDOHLocal('[::]:443', certFile, keyFile, { '/', '/dns-query' }, { doTCP=true, reusePort=true, tcpFastOpenSize=0 })

It does work 👍 thank you.

and for simplification maybe remove '-dns' from address so it becomes https://fr1.bancuh.com/dns-query

I cannot support 1 server having 2 domains. So if we add fr1.bancuh.com on the server, I have to remove the existing fr-dns1.bancuh.com. I'm worried that we already have users who depend on the existing fr-dns1.bancuh.com, and their internet will be interrupted.

No worries 👍

ragibkl commented 2 years ago

I should probably update the doh list on the bancuh website. I'll do that so it's clear. Thanks for raising this!