You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
v2ray-core/app/dns/dns.go

21 lines
309 B

package dns
import (
"net"
"v2ray.com/core/app"
)
// A Server is a DNS server for responding DNS queries.
type Server interface {
Get(domain string) []net.IP
}
func FromSpace(space app.Space) Server {
app := space.GetApplication((*Server)(nil))
if app == nil {
return nil
}
return app.(Server)
}