VDNS
This is a DNS client library written in V.
Features
Supported query types:
- A
- AAAA
- AXFR
- CAA
- CNAME
- DNSKEY
- PTR
- MX
- NS
- SOA
- TLSA
- TXT
- URI
Installation
You can install this package either from [VPM] or from GitHub:
v install fleximus.vdns
v install --git https://github.com/fleximus/vdns
Usage
To use
vdns
import fleximus.vdns
fn main() {
resolver := '1.1.1.1:53'
result := vdns.query(vdns.Query{
domain: 'gmail.com'
@type: .mx
resolver: resolver
}) or { panic('Failed query') }
for answer in result.answers {
println("${answer.name} ${answer.class} ${answer.ttl} ${answer.@type} ${answer.record}")
}
}
This library is under development: Do NOT use in production!
License
MIT