Thanks to visit codestin.com
Credit goes to Github.com

Skip to content
forked from knadh/dns.toys

A DNS server that offers useful utilities and services over the DNS protocol. Weather, world time, unit conversion etc.

License

Notifications You must be signed in to change notification settings

phalgunv/dns.toys

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 for Linux

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

Using @dns-toys on Windows

Using PowerShell (Recomended)

You can use Resolve-DnsName cmdlet in Windows PowerShell to interact with @dns-toys:

  • Open PowerShell

    • Press Win + X and select Windows PowerShell.
  • Use Resolve-DnsName

    • Get the current time in a city:
      Resolve-DnsName -Name mumbai.time -Server dns.toys
    • Check the weather:
      Resolve-DnsName -Name newyork.weather -Server dns.toys
    • Convert units:
      Resolve-DnsName -Name 42km-mi.unit -Server dns.toys
    • Currency conversion:
      Resolve-DnsName -Name 100USD-INR.fx -Server dns.toys
  • Format the Output:

    • To make the output more readable, you can format it using Format-List:
      Resolve-DnsName -Name mumbai.time -Server dns.toys | Format-List

Using dig

  • Install dig Utility:

    • You can install the dig utility, which is part of the BIND tools, using a package manager like Chocolatey:
      choco install bind-toolsonly
  • Using dig with @dns-toys

    Once dig is installed, you can use it to query @dns-toys. Here are some examples:

  • Get the current time in a city:
    dig mumbai.time @dns.toys
  • Currency conversion:
    dig 100USD-INR.fx @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

About

A DNS server that offers useful utilities and services over the DNS protocol. Weather, world time, unit conversion etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.4%
  • Makefile 1.6%