From d00c434ccc9c1073bc84058462ab00ccede9eee7 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 2 Sep 2020 22:56:59 -0700 Subject: [PATCH] Don't try STUN for manually added PCs over VPNs --- app/backend/computermanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/backend/computermanager.cpp b/app/backend/computermanager.cpp index 6cf0bd4c..49096236 100644 --- a/app/backend/computermanager.cpp +++ b/app/backend/computermanager.cpp @@ -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) {