Skip to content
faf5678 edited this page Oct 24, 2014 · 3 revisions
  1. the server determines that peers need to connect via proxy

  2. the server generates a UUID and sends UUID + 0x00 to peer A and UUID + 0x01 to peer B and additionally sends a HMAC of UUID + shared_secret. This is send as part of the ConnectToProxy message and thus the lobby associates a UUID with a player connection.

  3. the lobby of peer A sends UUID+0x00+HMAC to the proxy UDP port. Since the proxy does not yet know about the source IP:port of peer A, it inspects the message, verifies the HMAC with the shared_secret that it shares with the server and maps the UUID+0x00 to the peer IP:port. the proxy confirms reception of the triplet to peerA (reliable transmission).

  4. peer B send his triplet to the proxy. All further steps as in 2), but the proxy finds the mapping of the UUID to peer A and creates a mapping peerA(IP:port) to peerB(IP:port) and a mapping peerB(IP:port) to peerA(IP:port).

  5. when a packet arrives from peerA(IP:port) or peerB(IP:port) the proxy will find a mapping to the other peer and will send the packet to the associated port without altering it.

Clone this wiki locally