A command-line DNS lookup tool that supports DNS queries over UDP, TCP, TLS, HTTPS, DNSCrypt, and QUIC. https://dns.froth.zone/awl/
Go to file
grumbulon 9b979667d6 Make everything more readable (#2)
1. I made JSON print indented instead of inline
2. I created a util package and moved `ReverseDNS` and `ResolveHTTPS` there
3. I created a new struct called Answers where all variables for the output live now, and adjusted the response struct to have the Answers struct in it. This lets us reuse the struct more instead of having variables floating around, lets us make the response more custom, offers more understandable code reuse, and makes things (I think) more readable.

Aside: you will notice the struct has little json defs. This is because struct values encode as JSON objects and can preserve the output name this way

Most of this just makes expanding on awl easier in the future.

Co-authored-by: grumbulon <grumbulon@dismail.de>
Reviewed-on: #2
Co-authored-by: grumbulon <grumbulon@grumbulon.xyz>
Co-committed-by: grumbulon <grumbulon@grumbulon.xyz>
2022-06-22 11:55:38 +00:00
util Make everything more readable (#2) 2022-06-22 11:55:38 +00:00
.gitignore Rewrite in Go :^) 2022-06-21 22:54:50 +02:00
README.md Rewrite in Go :^) 2022-06-21 22:54:50 +02:00
awl.go Make everything more readable (#2) 2022-06-22 11:55:38 +00:00
docs.go Rewrite in Go :^) 2022-06-21 22:54:50 +02:00
go.mod Make everything more readable (#2) 2022-06-22 11:55:38 +00:00
go.sum Make everything more readable (#2) 2022-06-22 11:55:38 +00:00

README.md

awl

awl is a command-line DNS client, much like drill, dig, dog, doggo, or q

The excellent dns library for Go does most of the heavy lifting.

What works

  • UDP
  • TCP
  • TLS
  • HTTPS (maybe)

What doesn't

  • DNS-over-QUIC (eventually)
  • Your sanity after reading my awful code
  • A motivation for making this after finding q and doggo

What should change

  • Make the CLI less abysmal (migrate to cobra? or just use stdlib's flags)
  • Optimize everything
  • Make the code less spaghetti
    • Like not just having one massive unreadable file, this is AWFUL
  • Documentation, documentation, documentation