const dns = require("dns")
exports.lookup = (url, funStr) => {
    dns.lookup(url, (err, address, family) => {
		if (funStr != undefined) {
            funStr({ "地址": address, "IPV": family, "错误": err })
		}
	});
}
exports.lookupService = (address, family, funStr) => {
    dns.lookupService(address, family, (err, address, family) => {
		if (funStr != undefined) {
            funStr({ "域名": address, "IPV": family, "错误": err })
		}
	});
}
exports.resolve4 = (url, funStr) => {
    dns.resolve4(url, (err, address) => {
        if (funStr != undefined) {
            funStr({ "地址": address, "错误": err })
		}
	});
}
exports.resolve6 = (url, funStr) => {
    dns.resolve6(url, (err, address) => {
        if (funStr != undefined) {
            funStr({ "地址": address, "错误": err })
		}
	});
}
exports.reverse = (ip, funStr) => {
    dns.reverse(ip, (err, url) => {
        if (funStr != undefined) {
            funStr({ "域名": url, "错误": err })
		}
	});
}
