gldnsmerge #1

Merged
stryan merged 3 commits from gldnsmerge into master 2024-06-26 22:56:15 -04:00
3 changed files with 8 additions and 4 deletions
Showing only changes of commit 5d94c40399 - Show all commits

View File

@ -61,19 +61,22 @@ func main() {
domain: domain,
conf: conf,
}
count := 0
for _, v := range watchconf.Users {
err := a.Add(&v)
if err != nil {
log.Fatal(err)
log.Fatal(err, "reg", count)
}
count++
}
count = 0
for _, v := range watchconf.Hosts {
err := a.Add(&v)
if err != nil {
log.Fatal(err)
log.Fatal(err, "reg", count)
}
count++
}
log.Info(a)
server := &http.Server{Addr: fmt.Sprintf("0.0.0.0:%v", port), Handler: a.server()}
var wg sync.WaitGroup
c := make(chan os.Signal, 1)

View File

@ -57,7 +57,7 @@ func (h HostRegistration) Valid() bool {
}
func (h *HostRegistration) Update(_ config.Config) (string, error) {
resp, err := http.Get("icanhazip.com")
resp, err := http.Get("https://icanhazip.com")
if err != nil {
return "", err
}

View File

@ -48,6 +48,7 @@ func (t *Tilde) UpdateReg(secret string, ip string) error {
return errors.New("error getting user reg")
}
reg.ip = ip
reg.update = true
return nil
}