diff --git a/app/backend/computermanager.cpp b/app/backend/computermanager.cpp index 3969bd08..7cf44dea 100644 --- a/app/backend/computermanager.cpp +++ b/app/backend/computermanager.cpp @@ -2,6 +2,9 @@ #include "nvhttp.h" #include "settings/streamingpreferences.h" +#include +#include + #include #include @@ -573,6 +576,12 @@ private: // Update addresses depending on the context if (m_Mdns) { newComputer->localAddress = m_Address; + + // Get the WAN IP address using STUN if we're on mDNS + quint32 addr; + if (LiFindExternalAddressIP4("stun.stunprotocol.org", 3478, &addr) == 0) { + newComputer->remoteAddress = QHostAddress(qFromBigEndian(addr)).toString(); + } } else { newComputer->manualAddress = m_Address;