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/config.go

19 lines
407 B

package dns
9 years ago
import (
"net"
)
8 years ago
func (c *Config) GetInternalHosts() map[string]net.IP {
hosts := make(map[string]net.IP)
8 years ago
for domain, ipOrDomain := range c.GetHosts() {
8 years ago
address := ipOrDomain.AsAddress()
if address.Family().IsDomain() {
newError("ignoring domain address in static hosts: ", address.Domain()).AtWarning().WriteToLog()
continue
}
hosts[domain] = address.IP()
}
return hosts
9 years ago
}