1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-16 17:38:45 -05:00
v2fly/app/dns/dns.go
2017-02-01 21:35:40 +01:00

23 lines
333 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
Start() error
Close()
}
func FromSpace(space app.Space) Server {
app := space.GetApplication((*Server)(nil))
if app == nil {
return nil
}
return app.(Server)
}