feat(dns): resolve network-local names (#2970)

This commit is contained in:
Quentin McGaw
2025-11-14 11:30:05 -05:00
committed by GitHub
parent 0bc67b73a8
commit a1ece20617
4 changed files with 38 additions and 18 deletions

View File

@@ -4,12 +4,15 @@ import (
"context"
"errors"
"github.com/qdm12/dns/v2/pkg/nameserver"
"github.com/qdm12/gluetun/internal/constants"
)
func (l *Loop) Run(ctx context.Context, done chan<- struct{}) {
defer close(done)
l.localResolvers = nameserver.GetPrivateDNSServers()
if *l.GetSettings().KeepNameserver {
l.logger.Warn("⚠️⚠️⚠️ keeping the default container nameservers, " +
"this will likely leak DNS traffic outside the VPN " +