MCPcopy
hub / github.com/knadh/dns.toys

github.com/knadh/dns.toys @v1.2.0 sqlite

repository ↗ · DeepWiki ↗ · release v1.2.0 ↗
133 symbols 264 edges 22 files 76 documented · 57%
README

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 excuse @dns.toys

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

dig 5.16.nanoid @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

Extension points exported contracts — how you extend this code

Service (Interface)
Service represents a Service that responds to a particular kind of DNS query. [18 implementers]
cmd/dnstoys/handlers.go

Core symbols most depended-on inside this repo

register
called by 18
cmd/dnstoys/handlers.go
respErr
called by 6
cmd/dnstoys/handlers.go
Query
called by 5
cmd/dnstoys/handlers.go
Load
called by 4
internal/services/fx/fx.go
Calculate
called by 2
internal/services/aerial/aerial.go
validateLoc
called by 2
internal/services/aerial/aerial.go
isValidPoint
called by 2
internal/services/aerial/aerial.go
loadSnapshot
called by 2
cmd/dnstoys/main.go

Shape

Method 62
Function 35
Struct 35
Interface 1

Languages

Go100%

Modules by API surface

internal/services/weather/weather.go12 symbols
cmd/dnstoys/handlers.go12 symbols
internal/services/units/units.go9 symbols
internal/services/sudoku/sudoku.go8 symbols
internal/services/fx/fx.go8 symbols
internal/services/dict/dict.go8 symbols
internal/services/aerial/aerial.go8 symbols
internal/geo/geo.go7 symbols
internal/services/timezones/timezones.go6 symbols
internal/services/num2words/num2words.go6 symbols
internal/services/excuse/excuse.go5 symbols
internal/services/dice/dice.go5 symbols

Dependencies from manifests, versioned

github.com/fsnotify/fsnotifyv1.4.9 · 1×
github.com/gofrs/uuidv4.4.0+incompatible · 1×
github.com/hold7door/wnramv0.0.0-2022080718360 · 1×
github.com/matoous/go-nanoid/v2v2.1.0 · 1×
github.com/miekg/dnsv1.1.49 · 1×
github.com/mitchellh/copystructurev1.2.0 · 1×
github.com/mitchellh/reflectwalkv1.0.2 · 1×
golang.org/x/modv0.4.2 · 1×

For agents

$ claude mcp add dns.toys \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact