Add support for internal DNS system

This commit is contained in:
风扇滑翔翼 2025-03-09 18:55:37 +00:00 committed by GitHub
parent 4999fd5b7b
commit 5f504888b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 206 additions and 0 deletions

View file

@ -23,6 +23,13 @@ type Server interface {
QueryIP(ctx context.Context, domain string, clientIP net.IP, option dns.IPOption, disableCache bool) ([]net.IP, error)
}
// Server is the interface for Enhanced Name Server.
type EnhancedServer interface {
Server
// QueryHTTPS sends HTTPS queries to its configured server.
QueryHTTPS(ctx context.Context, domain string, disableCache bool) (map[string]string, error)
}
// Client is the interface for DNS client.
type Client struct {
server Server