From 7b25fdfee84037429b91ea88b020da5d56fff436 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Wed, 5 Nov 2025 20:55:28 +0000 Subject: [PATCH] chore(deps): bump dns to v2.0.0-rc9 --- go.mod | 4 ++-- go.sum | 8 ++++---- internal/dns/plaintext.go | 8 +++++--- internal/dns/setup.go | 6 ++++-- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index c3f914ab..b938ed14 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/klauspost/compress v1.18.1 github.com/klauspost/pgzip v1.2.6 github.com/pelletier/go-toml/v2 v2.2.4 - github.com/qdm12/dns/v2 v2.0.0-rc8 + github.com/qdm12/dns/v2 v2.0.0-rc9 github.com/qdm12/gosettings v0.4.4 github.com/qdm12/goshutdown v0.3.0 github.com/qdm12/gosplash v0.2.0 @@ -47,7 +47,7 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.60.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect - github.com/qdm12/goservices v0.1.0 // indirect + github.com/qdm12/goservices v0.1.1-0.20251104135713-6bee97bd4978 // indirect github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect github.com/vishvananda/netns v0.0.5 // indirect golang.org/x/crypto v0.43.0 // indirect diff --git a/go.sum b/go.sum index 021ff3e5..15332899 100644 --- a/go.sum +++ b/go.sum @@ -53,10 +53,10 @@ github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPA github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/qdm12/dns/v2 v2.0.0-rc8 h1:kbgKPkbT+79nScfuZ0ZcVhksTGo8IUqQ8TTQGnQlZ18= -github.com/qdm12/dns/v2 v2.0.0-rc8/go.mod h1:VaF02KWEL7xNV4oKfG4N9nEv/kR6bqyIcBReCV5NJhw= -github.com/qdm12/goservices v0.1.0 h1:9sODefm/yuIGS7ynCkEnNlMTAYn9GzPhtcK4F69JWvc= -github.com/qdm12/goservices v0.1.0/go.mod h1:/JOFsAnHFiSjyoXxa5FlfX903h20K5u/3rLzCjYVMck= +github.com/qdm12/dns/v2 v2.0.0-rc9 h1:qDzRkHr6993jknNB/ZOCnZOyIG6bsZcl2MIfdeUd0kI= +github.com/qdm12/dns/v2 v2.0.0-rc9/go.mod h1:98foWgXJZ+g8gJIuO+fdO+oWpFei5WShMFTeN4Im2lE= +github.com/qdm12/goservices v0.1.1-0.20251104135713-6bee97bd4978 h1:TRGpCU1l0lNwtogEUSs5U+RFceYxkAJUmrGabno7J5c= +github.com/qdm12/goservices v0.1.1-0.20251104135713-6bee97bd4978/go.mod h1:D1Po4CRQLYjccnAR2JsVlN1sBMgQrcNLONbvyuzcdTg= github.com/qdm12/gosettings v0.4.4 h1:SM6tOZDf6k8qbjWU8KWyBF4mWIixfsKCfh9DGRLHlj4= github.com/qdm12/gosettings v0.4.4/go.mod h1:CPrt2YC4UsURTrslmhxocVhMCW03lIrqdH2hzIf5prg= github.com/qdm12/goshutdown v0.3.0 h1:pqBpJkdwlZlfTEx4QHtS8u8CXx6pG0fVo6S1N0MpSEM= diff --git a/internal/dns/plaintext.go b/internal/dns/plaintext.go index 62ab8ac3..728a4b99 100644 --- a/internal/dns/plaintext.go +++ b/internal/dns/plaintext.go @@ -1,6 +1,7 @@ package dns import ( + "net/netip" "time" "github.com/qdm12/dns/v2/pkg/nameserver" @@ -18,14 +19,15 @@ func (l *Loop) useUnencryptedDNS(fallback bool) { } const dialTimeout = 3 * time.Second + const defaultDNSPort = 53 settingsInternalDNS := nameserver.SettingsInternalDNS{ - IP: targetIP, - Timeout: dialTimeout, + AddrPort: netip.AddrPortFrom(targetIP, defaultDNSPort), + Timeout: dialTimeout, } nameserver.UseDNSInternally(settingsInternalDNS) settingsSystemWide := nameserver.SettingsSystemDNS{ - IP: targetIP, + IPs: []netip.Addr{targetIP}, ResolvPath: l.resolvConf, } err := nameserver.UseDNSSystemWide(settingsSystemWide) diff --git a/internal/dns/setup.go b/internal/dns/setup.go index 38c3be6e..2fc1f03f 100644 --- a/internal/dns/setup.go +++ b/internal/dns/setup.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "net/netip" "github.com/qdm12/dns/v2/pkg/check" "github.com/qdm12/dns/v2/pkg/nameserver" @@ -37,11 +38,12 @@ func (l *Loop) setupServer(ctx context.Context) (runError <-chan error, err erro l.server = server // use internal DNS server + const defaultDNSPort = 53 nameserver.UseDNSInternally(nameserver.SettingsInternalDNS{ - IP: settings.ServerAddress, + AddrPort: netip.AddrPortFrom(settings.ServerAddress, defaultDNSPort), }) err = nameserver.UseDNSSystemWide(nameserver.SettingsSystemDNS{ - IP: settings.ServerAddress, + IPs: []netip.Addr{settings.ServerAddress}, ResolvPath: l.resolvConf, }) if err != nil {