1
0
Fork 0
mirror of https://github.com/SagerNet/sing-box.git synced 2025-04-06 05:17:37 +03:00

Fix unhandled DNS loop

This commit is contained in:
世界 2025-03-17 18:01:00 +08:00
parent c0fc63542a
commit 5623128c14
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -52,7 +52,7 @@ func NewWithOptions(options Options) (N.Dialer, error) {
return nil, err
}
}
if options.RemoteIsDomain && (dialOptions.Detour == "" || options.ResolverOnDetour) {
if options.RemoteIsDomain && (dialOptions.Detour == "" || options.ResolverOnDetour || dialOptions.DomainResolver != nil && dialOptions.DomainResolver.Server != "") {
networkManager := service.FromContext[adapter.NetworkManager](options.Context)
dnsTransport := service.FromContext[adapter.DNSTransportManager](options.Context)
var defaultOptions adapter.NetworkOptions