Add support for IPv6-only mDNS

This commit is contained in:
Cameron Gutman 2019-07-14 14:17:39 -07:00
parent 83b66b19de
commit 27f0fd63b3
2 changed files with 6 additions and 6 deletions

View File

@ -302,16 +302,16 @@ public class ComputerManagerService extends Service {
// Populate the computer template with mDNS info
if (computer.getAddressV4() != null) {
details.localAddress = computer.getAddressV4().getHostAddress();
// Since we're on the same network, we can use STUN to find
// our WAN address, which is also very likely the WAN address
// of the PC. We can use this later to connect remotely.
details.remoteAddress = NvConnection.findExternalAddressForMdns("stun.moonlight-stream.org", 3478);
}
if (computer.getAddressV6() != null) {
details.ipv6Address = computer.getAddressV6().getHostAddress();
}
// Since we're on the same network, we can use STUN to find
// our WAN address, which is also very likely the WAN address
// of the PC. We can use this later to connect remotely.
details.remoteAddress = NvConnection.findExternalAddressForMdns("stun.moonlight-stream.org", 3478);
// Kick off a serverinfo poll on this machine
if (!addComputerBlocking(details)) {
LimeLog.warning("Auto-discovered PC failed to respond: "+details);

@ -1 +1 @@
Subproject commit 3cfdf4dae21bfe38abd32107474f2619fea82078
Subproject commit 5872c0bf3de27e8346258119abf341d5cd64d1d8