An open API service indexing awesome lists of open source software.

https://github.com/javahello/doh-query


https://github.com/javahello/doh-query

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

# DNS over HTTPS Query CLI

简单的 DNS over HTTPS 查询命令行工具

## 使用

```shell
# 查看帮助
doh-query -h
Usage: doh-query [OPTIONS]

Arguments:
The domain to resolve

Options:
-s, --server Select the DNS server to use: cloudflare, google, quad9, custom [default: cloudflare]
--timeout The timeout in milliseconds [default: 10000]
--retries The number of retries [default: 3]
-c, --custom-server The custom DNS server to use
-t, --type The type of record to resolve [default: A]
-f, --fmt output format: default, ip2region [default: default]
--xdb-filepath The path to the IP2Region database file
-h, --help Print help
-V, --version Print version

# 查询域名
doh-query google.com
---------------------------------
Dns Server: Cloudflare
Status: 0
Question:
------------
Name: google.com
Type: A
Answer:
------------
Name: google.com
Type: A
TTL: 270
Data: 142.250.71.142

```

## 特性

- 内置 google, cloudflare, quad9 三个 DNS over HTTPS 服务器
- 支持自定义 DNS over HTTPS 服务器
- 支持 `ip2region` 查询 IP 所在地, 依赖 `ip2region` 数据库文件