func (cl *DoTClient) Close() error {
	if cl.conn != nil {
		return cl.conn.Close()
	}
	return nil
}
Close the client connection.
package dns
import (
	"crypto/tls"
	"fmt"
	"time"
	libbytes "github.com/shuLhan/share/lib/bytes"
	"github.com/shuLhan/share/lib/debug"
	libnet "github.com/shuLhan/share/lib/net"
)
type DoTClient struct {
	timeout time.Duration
	conn    *tls.Conn
}
func NewDoTClient(nameserver string, allowInsecure bool) (cl *DoTClient, err error) {
	_, remoteIP, port := libnet.ParseIPPort(nameserver, DefaultTLSPort)
	if remoteIP == nil {
		return nil, fmt.Errorf("dns: invalid address '%s'", nameserver)
	}
	cl = &DoTClient{
		timeout: clientTimeout,
	}
	nameserver = fmt.Sprintf("%s:%d", remoteIP, port)
	tlsConfig := tls.Config{
		InsecureSkipVerify: allowInsecure,
	}
	cl.conn, err = tls.Dial("tcp", nameserver, &tlsConfig)
	if err != nil {
		return nil, err
	}
	return cl, nil
}