站内导读
中文 dns.toys 是一个借用 DNS 协议提供实用工具的服务器,通过 dig 命令即可查询时间、天气、单位换算、汇率、IP、随机词与坐标距离等信息,无需额外客户端。亮点是把日常小工具统一到命令行入口,并附带 .NET 客户端库。适合常在终端工作、希望少切换工具的开发者与运维人员。
日本語 dns.toys は DNS プロトコルを拡張し、dig コマンドから時刻・天気・単位変換・為替・IP 確認・乱数語・座標間距離などを引けるサーバーです。専用クライアント不要で、日常の小さな調べものをターミナル内で完結できます。.NET 向けクライアントライブラリも用意されています。端末作業が多く、ツール切り替えを減らしたい開発者や運用担当者に向いています。
한국어 dns.toys는 DNS 프로토콜을 활용해 dig 명령으로 시간, 날씨, 단위 변환, 환율, IP 확인, 임의 단어, 좌표 간 거리 등을 조회하는 서버입니다. 별도 클라이언트 없이 터미널에서 바로 쓸 수 있고 .NET 클라이언트 라이브러리도 제공됩니다. 터미널 작업이 많아 도구 전환을 줄이고 싶은 개발자와 운영 담당자에게 적합합니다.
English dns.toys is a DNS server that repurposes the protocol to serve small utilities over dig: time, weather, unit and currency conversion, IP lookup, random words and coordinate distances. No client is needed, and a .NET client library exists. It suits developers and operators who work in a terminal and want fewer context switches.
README · 详细文档
来源 · 查看原文
<img width="150" src="https://user-images.githubusercontent.com/547147/171995179-b9d2faae-d659-4260-99df-04c62c171f6f.png" />
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
Docker
docker run name dnstoys --restart unless-stopped -p 5354:5354/tcp -p 5354:5354/udp
Or using docker compose:
docker compose up
From source
- Clone the repo
- Copy
config.sample.tomltoconfig.tomland edit the config - Make sure you have a copy of the
cities15000.txtfile at the root of this directory (instructions are in theconfig.sample.tomlfile) - Make sure to download the
wordnetfrom Wordnet website.(more instructions are in theconfig.sample.tomlfile) - Extract the tarball and rename extracted the directory to
wordnet - Make sure to fetch the IFSC data (instructions are in the
config.sample.tomlfile). - Run
make buildto build the binary and then run./dnstoys.bin - Query against the locally running server
dig <query> +short @127.0.0.1 -p 5354
Others
- DnsToys.NET - A .net client library for the service.