chore: mix the proxy adapter and interface to dns client

This commit is contained in:
MetaCubeX
2022-06-04 21:18:49 +08:00
parent c045a4f2a7
commit 43d3a0c8ea
6 changed files with 275 additions and 18 deletions

View File

@ -3,6 +3,7 @@ package dns
import (
"context"
"crypto/tls"
"errors"
"fmt"
"net"
"net/netip"
@ -19,6 +20,8 @@ import (
D "github.com/miekg/dns"
)
var errProxyNotFound = errors.New("proxy adapter not found")
func putMsgToCache(c *cache.LruCache[string, *D.Msg], key string, msg *D.Msg) {
var ttl uint32
switch {