@rbxts/aegis
v1.0.1
Published
Encrypted and authenticated networking library
Readme
Aegis
About
Aegis is a secure, high-level networking layer for Roblox, designed to make client–server communication reliable, structured, and safe by default.
Aegis is a spiritual successor to Tether with a stronger focus on correctness, security, and developer ergonomics.
This package uses Serio for binary serialization, so to find more info on schemas, check it out!
[!CAUTION] Depends on
rbxts-transformer-flamework!
[!WARNING] This package is a prototype. Nothing is battle-tested, nothing is benchmarked, nothing is final. Another thing to note, I don't know if this library is even practical or necessary at all.
Features
Zero-boilerplate serialization
Automatically encodes and decodes structured data into an efficient binary format.Built-in type safety
Enforces runtime validation to ensure data integrity across the network boundary.Authenticated encryption
Secures all traffic using modern AEAD primitives (ChaCha20-Poly1305), providing confidentiality and tamper protection.Replay protection
Prevents duplicate or out-of-order packet abuse using nonce/sequence tracking.Seamless handshake protocol
Handles connection setup, key exchange, and session initialization transparently.
Example
Shared
import { String, u8 } from "@rbxts/serio";
export const enum Message {
Test
}
interface TestData {
readonly message: String<u8>;
readonly status: u8;
}
export interface MessageData {
[Message.Test]: TestData;
}Server
import { AegisServer as Aegis } from "@rbxts/aegis";
import { Message, type MessageData } from "shared/messaging"
const aegis = new Aegis<MessageData>;
aegis.on(Message.Test, (player, data) => {
print("server received data", data, "from", player);
});Client
import { AegisClient as Aegis } from "@rbxts/aegis";
import { Message, type MessageData } from "shared/messaging"
const aegis = new Aegis<MessageData>;
aegis.dispatch(Message.Test, { message: "hi, server!", status: 69 });