DarkRift icon indicating copy to clipboard operation
DarkRift copied to clipboard

Issues connecting to localhost due to DNS resolution

Open JamJar00 opened this issue 4 years ago • 0 comments

Quick Description/Explanation

The DR UnityClient accesses the first IP address it's given for a domain name. Unfortunately on many Windows machines the first IP address for localhost is the IPv6 loopback address ::1 and the example config most people base their servers around only listens on IPv4, hence they have issues connecting.

I'm hard pressed to say this is actually a bug... But it's certainly not desirable behaviour...

It's accessing the first IP address it's told about which is fairly reasonable, it's just not the one most people will have set their server up on out the. Therefore I think

  1. DR's example configuration should have two listeners to listen on both IP versions (tbh, the .NET core versions could have IP dual mode now...)
  2. the client should probably cycle through the returned DNS entries until it finds one that works, like server clustering does

For Issues

This has been reproduced locally and is shown by this SharpLab.

JamJar00 avatar Jul 13 '21 21:07 JamJar00