rename Dns to DNS

This commit is contained in:
Jason
2019-08-14 20:42:19 +08:00
parent e92c6f9e57
commit 992344adf1
7 changed files with 27 additions and 31 deletions

View File

@@ -13,7 +13,7 @@ import (
)
// DNS lookup
func lookupHost(fakeDns dns.FakeDns, target net.Addr) (targetHost string, err error) {
func lookupHost(fakeDNS dns.FakeDNS, target net.Addr) (targetHost string, err error) {
var targetIP net.IP
switch addr := target.(type) {
case *net.TCPAddr:
@@ -27,8 +27,8 @@ func lookupHost(fakeDns dns.FakeDns, target net.Addr) (targetHost string, err er
targetHost = targetIP.String()
// Replace with a domain name if target address IP is a fake IP
if fakeDns != nil {
if host, exist := fakeDns.IPToHost(targetIP); exist {
if fakeDNS != nil {
if host, exist := fakeDNS.IPToHost(targetIP); exist {
targetHost = host
}
}