Files
ddns-updater/public_resolvers/ifconfigme.go
2023-05-01 10:01:43 +02:00

31 lines
447 B
Go

package public_resolvers
import (
"net/http"
"time"
)
const (
IfConfigMeTag = "ifconfig.me"
ifConfigMeUrl = "https://ifconfig.me"
)
type IfConfigMe struct {
baseResolver
}
func NewDefaultIfConfigMe() *IfConfigMe {
return NewIfConfigMe(&http.Client{
Timeout: 10 * time.Second,
})
}
func NewIfConfigMe(client Doer) *IfConfigMe {
return &IfConfigMe{
baseResolver: baseResolver{
client: client,
url: ifConfigMeUrl,
},
}
}