Implement detection of local IPv6 addresses

This commit is contained in:
Cameron Gutman
2022-11-02 20:35:41 -05:00
parent 371906445e
commit 411998d4e3
4 changed files with 47 additions and 23 deletions

View File

@@ -878,7 +878,7 @@ private:
// If this wasn't added via mDNS but it is a RFC 1918 IPv4 address and not a VPN,
// go ahead and do the STUN request now to populate an external address.
if (!m_Mdns && addressIsSiteLocalV4 && !newComputer->isReachableOverVpn()) {
if (!m_Mdns && addressIsSiteLocalV4 && newComputer->getActiveAddressReachability() != NvComputer::RI_VPN) {
quint32 addr;
int err = LiFindExternalAddressIP4("stun.moonlight-stream.org", 3478, &addr);
if (err == 0) {