hotfix(updater): use DoH for all updating operations, not just resolving server hostnames

This commit is contained in:
Quentin McGaw
2026-05-24 21:46:22 +00:00
parent f65ee3dcb1
commit 39ac8b3432
+5
View File
@@ -5,6 +5,7 @@ import (
"errors" "errors"
"flag" "flag"
"fmt" "fmt"
"net"
"net/http" "net/http"
"slices" "slices"
"strings" "strings"
@@ -104,6 +105,10 @@ func (c *CLI) Update(ctx context.Context, args []string, logger UpdaterLogger) e
if err != nil { if err != nil {
return fmt.Errorf("creating DoH dialer: %w", err) return fmt.Errorf("creating DoH dialer: %w", err)
} }
net.DefaultResolver = &net.Resolver{
PreferGo: true,
Dial: dnsDialer.Dial,
}
const clientTimeout = 10 * time.Second const clientTimeout = 10 * time.Second
httpClient := &http.Client{Timeout: clientTimeout} httpClient := &http.Client{Timeout: clientTimeout}