Go to file
Kailash Nadh 0206b601ee Apply basic refactor and cleanup.
- Make variables, package/file names idiomatic and consistent with
  the rest of the services.
- Simplify logic / lines of code in certain functions.
- Fix missing input validation.
- Stylistic changes.
2024-04-13 08:27:24 +05:30
cmd/dnstoys Apply basic refactor and cleanup. 2024-04-13 08:27:24 +05:30
docs Apply basic refactor and cleanup. 2024-04-13 08:27:24 +05:30
internal Apply basic refactor and cleanup. 2024-04-13 08:27:24 +05:30
.gitignore Add WordNet powered dictionary service (#25) 2022-08-09 13:24:36 +05:30
LICENSE Add license file. 2022-06-05 22:45:02 +05:30
Makefile chore: add make clean command in Makefile (#57) 2023-04-08 09:51:06 +05:30
README.md docs: added a comment in the readme explaining how to query against the locally running server (#75) 2024-04-11 10:53:25 +05:30
config.sample.toml Apply basic refactor and cleanup. 2024-04-13 08:27:24 +05:30
go.mod Bump golang.org/x/net from 0.0.0-20210726213435-c6fcb2dbf985 to 0.7.0 (#59) 2023-05-24 12:14:06 +05:30
go.sum Bump golang.org/x/net from 0.0.0-20210726213435-c6fcb2dbf985 to 0.7.0 (#59) 2023-05-24 12:14:06 +05:30

README.md

dns.toys is a DNS server that takes creative liberties with the DNS protocol to offer handy utilities and services that are easily accessible via the command line.

For docs, visit www.dns.toys

Sample commands

dig help @dns.toys

dig mumbai.time @dns.toys

dig 2023-05-28T14:00-bengaluru-berlin/de.time @dns.toys

dig newyork.weather @dns.toys

dig 42km-mi.unit @dns.toys

dig 100USD-INR.fx @dns.toys

dig ip @dns.toys

dig 987654321.words @dns.toys

dig pi @dns.toys

dig 100dec-hex.base @dns.toys

dig fun.dict @dns.toys

dig A12.9352,77.6245/12.9698,77.7500.aerial @dns.toys

Running locally

  • Clone the repo
  • Copy config.sample.toml to config.toml and edit the config
  • Make sure you have a copy of the cities15000.txt file at the root of this directory (instructions are in the config.sample.toml file)
  • Make sure to download the wordnet from Wordnet website.(more instructions are in the config.sample.toml file)
  • Extract the tarball and rename extracted the directory to wordnet
  • Run make build to build the binary and then run ./dnstoys.bin
  • Query against the locally running server
    dig <query> +short @127.0.0.1 -p 5354

Others