Share via

dnsResolveEx not returns IP address values

Kley 0 Reputation points
2023-08-16T17:46:39.8333333+00:00

I am trying to use dnsResolveEx function in a script .pac but it not returns IP address values, all it can return is the value "0" zero;

Follow is my script:

function FindProxyForURLEx(url, host)
{
	var hostIP;
	hostIP = dnsResolveEx(host);
	
	if (shExpMatch(hostIP, "*:*"))
		return "DIRECT";
	else
		if (shExpMatch(hostIP, "*127.*") || 
		shExpMatch(hostIP, "*10.*") || 
		shExpMatch(hostIP, "*172.16.*") || 
		shExpMatch(hostIP, "*192.168.*"))
		return "DIRECT"
		
		else
			return "PROXY proxy.com.br:8080";
}

Could you help to understand if a failed to write or there is a bug on those function?
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. Limitless Technology 45,241 Reputation points
    2023-08-17T13:05:01.73+00:00

    Hello there,

    DNS results can be cached by your operating system or local network devices. If you're expecting an immediate change in DNS records, you might need to wait for the cached results to expire before the new records take effect.

    Library or Tool Issues: If the dnsResolveEx function is part of a library or tool, check the documentation, community forums, or support channels for any reported issues or limitations. There might be updates, workarounds, or known bugs that you should be aware of.

    Microsoft has a nice set of docs for the IPv6 Aware APIs.

    http://msdn.microsoft.com/en-us/library/windows/desktop/gg308477(v=vs.85).aspx

    The IPv4 APIs mostly operate the same way other then they do not support IPv6 addresses.

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer--

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.