He
HeliumTS
Note:

HeliumTS is under pre-beta and active development. Expect bugs and breaking changes. If you find any issues, please report them in our GitHub

A stable release is planned for early December 2025.

Configuration

Helium's configuration file allows you to customize server settings including RPC encoding, compression, security, and proxy configuration.

helium.config.ts

1import type { HeliumConfig } from "heliumts/server";
2
3const config: HeliumConfig = {
4 trustProxyDepth: 1, // Trust 1 proxy level (e.g., Vercel)
5 rpc: {
6 // Transport mode: "websocket" | "http" | "auto"
7 transport: "websocket", // default
8
9 // Auto-switch to HTTP on mobile/cellular networks
10 // Mobile carriers prioritize HTTP traffic over WebSocket
11 autoHttpOnMobile: false, // default
12
13 // Compression settings
14 compression: {
15 enabled: true,
16 threshold: 1024,
17 },
18 // Security settings
19 security: {
20 maxConnectionsPerIP: 10,
21 maxMessagesPerWindow: 200,
22 rateLimitWindowMs: 60000,
23 tokenValidityMs: 30000,
24 },
25 },
26};
27
28export default config;