2 unstable releases
0.2.0 | Jul 14, 2021 |
---|---|
0.1.0 | Jan 13, 2020 |
#2297 in Network programming
Used in knock-knock
77KB
2K
SLoC
rdap_client
Async and fast RDAP client and parser for Rust.
Usage
Add this to your Cargo.toml
:
[dependencies]
rdap_client = "0.2"
tokio = "0.2"
and then you can use it like this:
use rdap_client::Client;
#[tokio::main]
async fn main() {
let client = Client::new();
let domain_to_check = "nic.cz";
// Fetch boostrap from IANA.
let bootstrap = client.fetch_bootstrap().await.unwrap();
// Find what RDAP server to use for given domain.
if let Some(servers) = bootstrap.dns.find(&domain_to_check) {
let response = client.query_domain(&servers[0], domain_to_check).await.unwrap();
println!("{}", response.handle);
}
}
Because of usage async-await syntax, minimum required Rust version is 1.39.0.
Supported standards
- RFC 7480: HTTP Usage in the Registration Data Access Protocol (RDAP)
- RFC 7482: Registration Data Access Protocol (RDAP) Query Format
- RFC 7483: JSON Responses for the Registration Data Access Protocol (RDAP)
- RFC 8056: Extensible Provisioning Protocol (EPP) and Registration Data Access Protocol (RDAP) Status Mapping
- RFC 8521: Registration Data Access Protocol (RDAP) Object Tagging
- RDAP JSON Values
Supported extensions
fred
cidr0
arin_originas0
rdap_objectTag
(RFC 8521)
Non standard responses
Not all RDAP servers follows RFC 7483 and then parser cannot parse that responses correctly. If that happend, feel
free to open issue with URI that rdap_client
could not parse.
Useful articles
Dependencies
~5–17MB
~243K SLoC