isResolvable()

Attempts to resolve a hostname to an IP address and returns true if successful. WARNING - This may cause a browser to temporarily hang if a domain is not resolvable.

Example:

if (isResolvable(host)) return "PROXY proxy1.example.com:8080";