Since my failure rate connecting to rooms using MITM is 100%, I’ve decided to troubleshoot it myself at my own room.
MITM server: New York, USA (hostname and port were obtained from http://lobby.libretro.com/list)
Test 1:
>>> addr = "us-east1.relay.retroarch.com"
>>> port = 34327
>>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>>> s.settimeout(5)
>>> s.connect((addr, port))
>>> s.getpeername()
('35.211.97.56', 34327)
>>> s.recv(24)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
socket.timeout: timed out
>>> s.send(b"RANP" + b"\x00\x04\x00\x04" + b"\x00\x00\x00\x01" + b"\x00\x00\x00\x00" + b"\x00\x00\x00\x05" + b"\x00\x00\x00\x00")
24
>>> s.recv(24)
b''
>>> s.shutdown(socket.SHUT_RDWR)
>>> s.close()
Test 2:
>>> addr = "us-east1.relay.retroarch.com"
>>> port = 34327
>>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>>> s.settimeout(5)
>>> s.connect((addr, port))
>>> s.getpeername()
('35.211.97.56', 34327)
>>> s.send(b"RANP" + b"\x00\x04\x00\x04" + b"\x00\x00\x00\x01" + b"\x00\x00\x00\x00" + b"\x00\x00\x00\x05" + b"\x00\x00\x00\x00")
24
>>> s.recv(24)
b''
>>> s.shutdown(socket.SHUT_RDWR)
>>> s.close()
Doesn’t look like MITM is working at all. It never sends us anything back and it closes connection when we send data to it, even if it’s a valid netplay header.

(For me it can’t work because they don’t use session ID and don’t negotiate with the relay server to get the mitm IP). Since all ES based distribs use pretty much the same code, I think joining a relay server is impossible no matter which retrogaming distrib is tested.