Closed beyondkmp closed 2 years ago
Hi @beyondkmp
The changes look fine, but I'm curious if you have found a client that doesn't use 0 as the DNS ID? In RFC-8484 it states that the clients SHOULD use ID 0 for all queries to aid caching.
In order to maximize HTTP cache friendliness, DoH clients using media
formats that include the ID field from the DNS message header, such
as "application/dns-message", SHOULD use a DNS ID of 0 in every DNS
request.
@TuxInvader Yes, you are right and we should follow the rule of RTF. But I found that the DNS id is not 0 when sending a doh request in https://github.com/ogham/dog and https://github.com/Dreamacro/clash. But 'https://cloudflare-dns.com/dns-query' can still handle the situation that the DNS id is not 0. I think that nginx-dns could be compatible with this situation.
Post body of https dns is not always start with "\u0000"