https://github.com/thekuwayama/dohc-rs
DNS over HTTPS Client implementation in Rust
https://github.com/thekuwayama/dohc-rs
cli dns-over-https rust
Last synced: about 1 year ago
JSON representation
DNS over HTTPS Client implementation in Rust
- Host: GitHub
- URL: https://github.com/thekuwayama/dohc-rs
- Owner: thekuwayama
- License: mit
- Created: 2020-03-07T13:41:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-17T18:40:56.000Z (about 5 years ago)
- Last Synced: 2025-02-03T14:34:17.948Z (over 1 year ago)
- Topics: cli, dns-over-https, rust
- Language: Rust
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# dohc-rs
[](https://github.com/thekuwayama/dohc-rs/actions?workflow=CI)
[](https://raw.githubusercontent.com/thekuwayama/dohc-rs/master/LICENSE.txt)
`dohc-rs` is DNS over HTTPS Client implementation in Rust.
## Install
You can build and run `dohc-rs` with the following:
```bash
$ cargo install --git https://github.com/thekuwayama/dohc-rs.git --branch master
```
## Usage
```bash
$ dohc --help
dohc 0.1.0
USAGE:
dohc [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-t, --type Query Type (either a numeric value or text)
ARGS:
Query Name
```
```bash
$ dohc cloudflare.com | jq '.'
{
"Status": 0,
"TC": false,
"RD": true,
"RA": true,
"AD": true,
"CD": false,
"Question": [
{
"name": "cloudflare.com",
"type": 1
}
],
"Answer": [
{
"name": "cloudflare.com",
"type": 1,
"TTL": 260,
"data": "104.16.133.229"
},
{
"name": "cloudflare.com",
"type": 1,
"TTL": 260,
"data": "104.16.132.229"
}
]
}
```
```bash
$ dohc one.one.one.one --type cname | jq '.'
{
"Status": 0,
"TC": false,
"RD": true,
"RA": true,
"AD": false,
"CD": false,
"Question": [
{
"name": "one.one.one.one",
"type": 5
}
],
"Authority": [
{
"name": "one.one.one",
"type": 6,
"TTL": 3600,
"data": "fred.ns.cloudflare.com. dns.cloudflare.com. 2036516775 10000 2400 604800 3600"
}
]
}
```
## License
The CLI is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).