ameshkov / dnslookup

Simple command line utility to make DNS lookups to the specified server
MIT License
816 stars 72 forks source link

Trailing `/` results in a failure #69

Closed sreevatsank1999 closed 3 months ago

sreevatsank1999 commented 3 months ago

Failure case:

❯ VERIFY=0 dnslookup s25.wcsng https://localhost:1053/dns-query/ dnslookup master TLS verification has been disabled 2024/05/20 16:52:43 [fatal] Cannot make the DNS request: expected status 200, got 404 from https://localhost:1053/dns-query/

Working case:

❯ VERIFY=0 dnslookup s25.wcsng https://localhost:1053/dns-query dnslookup master TLS verification has been disabled Server: https://localhost:1053/dns-query

dnslookup result (elapsed 50.270688ms): ;; opcode: QUERY, status: NOERROR, id: 23354 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION: ;s25.wcsng. IN A

;; ANSWER SECTION: s25.wcsng. 3600 IN A 67.58.54.134

;; AUTHORITY SECTION: wcsng. 3600 IN NS ns1.wcsng.

I am have coredns running at localhost:1053

I am using the latest version of the dnslookup tool

❯ dnslookup -v dnslookup master

sreevatsank1999 commented 3 months ago

I am actually using v1.10.1 not master (commit 719e730c2d354a0907eaea476a2eacd754dfc9c4)

dnslookup [-v|--version] says master, not sure if this was intended.

ameshkov commented 3 months ago

@sreevatsank1999 this has nothing to do with dnslookup itself, it's just how the DNS server handles DoH requests with/without trailing /.