Fix DNS fallback

This commit is contained in:
世界
2025-02-26 07:13:18 +08:00
parent c51e9cbe06
commit 668923c392
2 changed files with 8 additions and 1 deletions

View File

@@ -139,6 +139,9 @@ func (t *Transport) tryOneName(ctx context.Context, config *dnsConfig, fqdn stri
}
func (t *Transport) exchangeOne(ctx context.Context, server M.Socksaddr, question mDNS.Question, timeout time.Duration, useTCP, ad bool) (*mDNS.Msg, error) {
if server.Port == 0 {
server.Port = 53
}
var networks []string
if useTCP {
networks = []string{N.NetworkTCP}