dnsforward: imp code
This commit is contained in:
parent
5bd6805d54
commit
a6c5079779
|
@ -49,7 +49,6 @@ func (s *Server) DialContext(ctx context.Context, network, addr string) (conn ne
|
|||
var dialErrs []error
|
||||
for _, ip := range ips {
|
||||
addrPort := netip.AddrPortFrom(ip, uint16(port))
|
||||
// addr = net.JoinHostPort(a.String(), port)
|
||||
conn, err = dialer.DialContext(ctx, network, addrPort.String())
|
||||
if err != nil {
|
||||
dialErrs = append(dialErrs, err)
|
||||
|
|
|
@ -332,7 +332,7 @@ func (s *Server) AddrProcConfig() (c *client.DefaultAddrProcConfig) {
|
|||
|
||||
// Resolve gets IP addresses by host name from an upstream server. No
|
||||
// request/response filtering is performed. Query log and Stats are not
|
||||
// updated. This method may be called before Start().
|
||||
// updated. This method may be called before [Server.Start].
|
||||
func (s *Server) Resolve(ctx context.Context, net, host string) (addr []netip.Addr, err error) {
|
||||
s.serverLock.RLock()
|
||||
defer s.serverLock.RUnlock()
|
||||
|
|
Loading…
Reference in New Issue