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

Support DoH over GET #19

Open
lidel opened this issue Aug 16, 2022 · 0 comments
Open

Support DoH over GET #19

lidel opened this issue Aug 16, 2022 · 0 comments

Comments

@lidel
Copy link
Member

lidel commented Aug 16, 2022

Right now, this library always uses HTTP POST:

req, err := http.NewRequest(http.MethodPost, url, bytes.NewReader(data))

RFC8484 allows both GET and POST, and if there is a server that uses only GET, this library will fail to use it

Proposed enhancement

Detect when DoH endpoint ends with ?dns and use GET instead of POST

  • POST remains the default: https://dnsserver.example.net/dns-query
  • GET is an explicit opt-in, used when ?dns is present: https://dnsserver.example.net/dns-query?dns
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