From 8b3cab33792311c2f942ccd412783ac9d550bc58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Mon, 24 Mar 2025 20:23:55 +0800 Subject: [PATCH] Fail when default DNS server not found --- dns/transport_manager.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dns/transport_manager.go b/dns/transport_manager.go index dff886df..f41c9f9e 100644 --- a/dns/transport_manager.go +++ b/dns/transport_manager.go @@ -59,6 +59,9 @@ func (m *TransportManager) Start(stage adapter.StartStage) error { transports := m.transports m.access.Unlock() if stage == adapter.StartStateStart { + if m.defaultTag != "" && m.defaultTransport == nil { + return E.New("default DNS server not found: ", m.defaultTag) + } return m.startTransports(m.transports) } else { for _, outbound := range transports {