mirror of
https://github.com/qdm12/gluetun.git
synced 2026-06-19 01:43:56 +02:00
hotfix(updater): use DoH for all updating operations, not just resolving server hostnames
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user