You've already forked ddns-updater
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
FEAT: Directadmin provider is now working
32 lines
475 B
Go
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,
|
|
},
|
|
}
|
|
}
|