Direct IP Connect is broken

[127211640] WinHttpReceiveResponse on http://78.129.165.20:30120/info.json failed - error code 12152

I got this error whilst connecting to my server directly through the IP, however when I join from the server list it works just fine. I’m assuming when it gets to this point it’s querying the ip of whatever server was selected in the browser before you press settings and connect to an ip directly.

Unrelated. The connection procedure does not request /info.json, the server browser does. What do you actually get from the connection overlay?

It seems like you’re having UDP port assignment issues, given the related topic linked below - not an actual client bug.

The connection overlay doesn’t error. It just kicks with the message “Failed to connect to server after 3 attempts.”

However, when I join from the server list, it connects just fine.

You probably specified a different port in the connection window, then. The server list maps to the UDP source port received by the master server, and if you’re behind a NAT device that device is to blame for mapping the port differently. Normally it doesn’t take the TCP mapping along with it, though.

If that is actually your server, it seems it sends a TCP RST packet after requesting the HTTP data - are you on the right Mono version and do you not have a somehow-weird networking setup?

$ curl -v http://78.129.165.20:30120/
* timeout on name lookup is not supported
*   Trying 78.129.165.20...
* TCP_NODELAY set
* Connected to 78.129.165.20 (78.129.165.20) port 30120 (#0)
> GET / HTTP/1.1
> Host: 78.129.165.20:30120
> User-Agent: curl/7.51.0
> Accept: */*
>
* Recv failure: Connection was reset
* Curl_http_done: called premature == 1
* stopped the pause stream!
* Closing connection 0
curl: (56) Recv failure: Connection was reset

That’s not my server. I have no idea what server that is.

Right. The server list entry - does it have a ping of 0? It could be this works as it is using local server discovery and connecting to your LAN IP, while the external port mapping that you use for connecting by IP does have TCP forwarded, but blocks incoming UDP packets.

Turns out it was actually because I have two IPs on my server and FiveReborn was just only picking one, but it would still pretend like it was going to connect if you used the wrong IP.