Routing: fix router select wrong outbound when failed to resolve domain to ip

This commit is contained in:
patterniha
2025-09-12 22:48:17 +03:30
parent 83c5370eec
commit fc7a3c14d7
6 changed files with 36 additions and 7 deletions
+7
View File
@@ -2,6 +2,7 @@ package dispatcher
import (
"context"
go_errors "errors"
"regexp"
"strings"
"sync"
@@ -488,6 +489,12 @@ func (d *DefaultDispatcher) routedDispatch(ctx context.Context, link *transport.
return // DO NOT CHANGE: the traffic shouldn't be processed by default outbound if the specified outbound tag doesn't exist (yet), e.g., VLESS Reverse Proxy
}
} else {
if !go_errors.Is(err, common.ErrNoClue) {
errors.LogWarningInner(ctx, err, "get error during route pick ")
common.Close(link.Writer)
common.Interrupt(link.Reader)
return
}
errors.LogInfo(ctx, "default route for ", destination)
}
}