Methods of facilitating packet-based connections
Methods of facilitating communication between clients and servers are contemplated. Embodiments of the inventive subject matter make it possible for a client to establish a packet-based connection with a server by first authenticating with a web backend. This can enable, for example, a client to establish a packet-based connection with a server though a web browser.
1. A method of creating a network connection between a client and a server to facilitate multiplayer gaming, comprising:
requesting a connect token by sending a call to a web backend, wherein the connect token comprises public data and private data;
receiving the connect token from the web backend via a secure channel;
sending, to the server, a connection request packet comprising portions of the private data and the public data;
receiving, from the server, a connection challenge packet;
sending, to the server, a connection response packet;
establishing the network connection with the server.
2. The method of claim 1 , wherein the private data is encrypted and signed by a shared private key, and portions of the public data are signed by the shared private key.
3. The method of claim 1 , wherein the private data is encrypted and signed by a web backend private key and a server public key, and portions of the public data are signed by the web backend private key and by the server public key.
4. The method of claim 1 , wherein the public data comprises at least one of: (1) encryption keys for payload packets, and (2) a list of server addresses.
5. The method of claim 1 , wherein the connection challenge packet comprises a challenge token, wherein the challenge token: (1) comprises data relevant to the UDP network connection and (2) is encrypted with a random key rolled when the server is started.
6. The method of claim 1 , wherein the connection challenge packet is smaller than the connection request packet to eliminate a possibility of a DDoS attack.
7. The method of claim 1 , further comprising the step of receiving connection payload packets after establishing the network connection with the server.