add dns handler

This commit is contained in:
ginuerzh
2021-12-29 23:45:58 +08:00
parent 8600ee7c5d
commit 9b3d7e1110
15 changed files with 541 additions and 39 deletions

11
pkg/resolver/resolver.go Normal file
View File

@ -0,0 +1,11 @@
package resolver
import (
"context"
"net"
)
type Resolver interface {
// Resolve returns a slice of the host's IPv4 and IPv6 addresses.
Resolve(ctx context.Context, host string) ([]net.IP, error)
}