Files
ddns-updater/internal/public_resolvers/icanhazip.go
Aaron Guise e1bb5adf36
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Refactor: Moved all under internal.
FEAT: Directadmin provider is now working
2024-03-18 09:55:01 +13:00

32 lines
475 B
Go

package public_resolvers
import (
"net/http"
"time"
)
const (
IcanhazipTag = "icanhazip"
IcanhazipUrl = "https://v4.icanhazip.com/"
)
type Icanhazip struct {
baseResolver
}
func NewIcanhazipDefault() *Icanhazip {
return NewIcanhazip(&http.Client{
Timeout: 10 * time.Second,
})
}
func NewIcanhazip(client Doer) *Icanhazip {
return &Icanhazip{
baseResolver: baseResolver{
client: client,
url: v4IdentMeUrl,
ipParser: defaultIpParser,
},
}
}