1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 18:17:52 -05:00
v2fly/app/dns/dns.go
Darien Raymond c48e1f02a6
comments
2017-01-13 14:33:32 +01:00

21 lines
309 B
Go

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)
}