mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-04-03 20:07:36 +03:00
Fail when default DNS server not found
This commit is contained in:
parent
a492586308
commit
cebd6118fd
1 changed files with 3 additions and 0 deletions
|
@ -59,6 +59,9 @@ func (m *TransportManager) Start(stage adapter.StartStage) error {
|
||||||
transports := m.transports
|
transports := m.transports
|
||||||
m.access.Unlock()
|
m.access.Unlock()
|
||||||
if stage == adapter.StartStateStart {
|
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)
|
return m.startTransports(m.transports)
|
||||||
} else {
|
} else {
|
||||||
for _, outbound := range transports {
|
for _, outbound := range transports {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue