Android 17 blocks apps targeting API 37 from reaching directly connected
addresses without ACCESS_LOCAL_NETWORK, and a blocked TCP connect is
indistinguishable from a dead server. Resolve the configured host, check
it against the active network's link addresses, and ask for the
permission only when the server is actually on-link, so routed RFC1918
and VPN destinations do not trigger a prompt.