mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-13 01:08:39 +07:00
refactor(dns): replace dnsmessage with miekg/dns (#188)
This commit is contained in:
@ -12,7 +12,6 @@ import (
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"github.com/mzz2017/softwind/netproxy"
|
||||
"net/netip"
|
||||
"net/url"
|
||||
"path/filepath"
|
||||
@ -22,9 +21,11 @@ import (
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/mzz2017/softwind/netproxy"
|
||||
|
||||
internal "github.com/daeuniverse/dae/pkg/ebpf_internal"
|
||||
dnsmessage "github.com/miekg/dns"
|
||||
"github.com/vishvananda/netlink"
|
||||
"golang.org/x/net/dns/dnsmessage"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
@ -409,7 +410,7 @@ func NewGcm(key []byte) (cipher.AEAD, error) {
|
||||
return cipher.NewGCM(block)
|
||||
}
|
||||
|
||||
func AddrToDnsType(addr netip.Addr) dnsmessage.Type {
|
||||
func AddrToDnsType(addr netip.Addr) uint16 {
|
||||
if addr.Is4() {
|
||||
return dnsmessage.TypeA
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user