mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-29 22:29:42 +07:00
optimize: remove rush-answer detector because it does always work in all districts
This commit is contained in:
@ -10,6 +10,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/mzz2017/softwind/netproxy"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/net/dns/dnsmessage"
|
||||
"net/netip"
|
||||
"sync"
|
||||
@ -21,6 +22,17 @@ type Ip46 struct {
|
||||
}
|
||||
|
||||
func ResolveIp46(ctx context.Context, dialer netproxy.Dialer, dns netip.AddrPort, host string, tcp bool, race bool) (ipv46 *Ip46, err error) {
|
||||
var log *logrus.Logger
|
||||
if _log := ctx.Value("logger"); _log != nil {
|
||||
log = _log.(*logrus.Logger)
|
||||
defer func() {
|
||||
if err == nil {
|
||||
log.Tracef("ResolveIp46 %v using %v: A(%v) AAAA(%v)", host, systemDns, ipv46.Ip4, ipv46.Ip6)
|
||||
} else {
|
||||
log.Tracef("ResolveIp46 %v using %v: %v", host, systemDns, err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(2)
|
||||
var err4, err6 error
|
||||
|
Reference in New Issue
Block a user