tungd / elixir-dns

DNS library for Elixir
BSD 3-Clause "New" or "Revised" License
113 stars 37 forks source link

Parse EDNS (and EDNS options) #48

Open bortzmeyer opened 2 years ago

bortzmeyer commented 2 years ago

It would be nice to add support for parsing EDNS OPT record, and also to parse the options in it (cookie, NSID, etc). It does not seem there is support for that in the Erlang library. I added one in the Drink server (lib/drink/parsing.ex), you're welcome to reuse the code if you want.

bortzmeyer commented 1 year ago

An alternative could be to use this Erlang library(untested). It parses some EDNS options (NSID, ECS but not cookies).

bortzmeyer commented 1 year ago

I just refactored the EDNS code in Drink, it is now in lib/drink/edns.ex and lib/drink/ednscodes.ex. Feel free to reuse it. It now handles NSID, ECS, and cookies.