https://github.com/permutationlock/thierd
A basic game server in Zig with encryption and authentication over WebSockets and raw TCP.
https://github.com/permutationlock/thierd
Last synced: 8 months ago
JSON representation
A basic game server in Zig with encryption and authentication over WebSockets and raw TCP.
- Host: GitHub
- URL: https://github.com/permutationlock/thierd
- Owner: permutationlock
- License: mit
- Created: 2023-09-14T00:59:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-23T19:16:38.000Z (over 2 years ago)
- Last Synced: 2025-01-14T15:41:53.366Z (about 1 year ago)
- Language: Zig
- Size: 64.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.MIT
Awesome Lists containing this project
README
# Thierd: a simple game server for native and browser clients
The motivation behind this project is to create a game server with a small
static memory layout that can host authenticated game sessions.
It also needs to support browser clients, and thus must use TCP for networking
and implement a basic version of the WebSocket protocol.
The current state is a server that can be compiled to serialize and transmit a
compile time decided `Message` struct to and from clients. Connections can be
authenticated with [Ed25519][1] and encrypted with [ChaCha20-Poly130][2].
The server listens on a single TCP socket and can accept WebSocket connections
or raw TCP connections. The design only requires 8 bytes of additional memory
per connection to support WebSocket connections.
In progress is an account system alongside lobbies and matchmaking.
[1]: https://en.wikipedia.org/wiki/EdDSA#Ed25519
[2]: https://en.wikipedia.org/wiki/ChaCha20-Poly1305