If a server is behind a NAT gateway, we might not get a response when
we send it a query. However, a hole punch request may make it accessible.
After two seconds with no response, try a hole punch request and if we get
a reply, retry the request.
We keep state on which servers require hole punching and only allow hole
punch requests from clients if they are flagged as such.
If a server is behind a NAT gateway or firewall its UDP port may be
accessible to the master server but not to other clients. For some types
of gateway we can work around this by having the servers explicitly send
a packet to the client that is trying to connect to them ("hole punching").
The master server can serve as a trampoline to forward this request from
clients.
This is the initial master server-side part of implementing
chocolate-doom/chocolate-doom#469.
This fixes a problem where the page does not display properly if a
server name contains a non-ASCII character (see discussion on
chocolate-doom/chocolate-doom#229).
from start messages. Include millisecond precision in the time fields of
the messages for extra accuracy. Log nonce values and demo hashes.
Subversion-branch: /master
Subversion-revision: 2519
a different socket before accepting their request. This blocks servers
that are behind NAT gateways and not globally accessible.
Subversion-branch: /master
Subversion-revision: 2188