Don't try STUN for manually added PCs over VPNs

This commit is contained in:
Cameron Gutman 2020-09-02 22:56:59 -07:00
parent 4ada59ba48
commit d00c434ccc

View file

@ -767,9 +767,9 @@ private:
// Drop the lock before notifying
lock.unlock();
// If this wasn't added via mDNS but it is a RFC 1918 IPv4 address,
// 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) {
if (!m_Mdns && addressIsSiteLocalV4 && !newComputer->isReachableOverVpn()) {
quint32 addr;
int err = LiFindExternalAddressIP4("stun.moonlight-stream.org", 3478, &addr);
if (err == 0) {