1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-29 18:45:23 +00:00
v2fly/app/dns/dns.go
2017-01-13 13:41:40 +01:00

21 lines
308 B
Go

package dns
import (
"net"
"v2ray.com/core/app"
)
// A DnsCache is an internal cache of DNS resolutions.
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)
}