Add SRV Record Support
edoardottt opened this issue · 0 comments
edoardottt commented
Please describe your feature request:
Add support for querying SRV records too (as described in RFC2782).
Describe the use case of this feature:
package main
import (
"log"
"github.com/projectdiscovery/retryabledns"
"github.com/miekg/dns"
)
func main() {
// it requires a list of resolvers
resolvers := []string{"8.8.8.8:53", "8.8.4.4:53"}
retries := 2
hostname := "_xmpp-client._tcp.jabber.org"
dnsClient := retryabledns.New(resolvers, retries)
dnsResponses, err := dnsClient.Query(hostname, dns.TypeSRV)
if err != nil {
log.Fatal(err)
}
log.Println(dnsResponses)
}