Compare commits

...

1 commit

Author SHA1 Message Date
Herman Slatman
d25b8afe68
Add CNAME chasing for TXT records 2022-10-20 01:18:34 +02:00

View file

@ -72,7 +72,12 @@ func (c *client) Get(url string) (*http.Response, error) {
}
func (c *client) LookupTxt(name string) ([]string, error) {
return net.LookupTXT(name)
// chase CNAME records, if any
cname, err := net.LookupCNAME(name)
if err != nil {
return nil, err
}
return net.LookupTXT(cname)
}
func (c *client) TLSDial(network, addr string, config *tls.Config) (*tls.Conn, error) {