He
HeliumTS
Note:

HeliumTS is under 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 2026.

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 // Trust 1 proxy level (e.g., Vercel)
5 trustProxyDepth: 1,
6
7 rpc: {
8 // Transport mode: "websocket" | "http" | "auto"
9 transport: "websocket", // default
10
11 // Auto-switch to HTTP on mobile/cellular networks
12 autoHttpOnMobile: false, // default
13
14 // Compression settings
15 compression: {
16 enabled: true,
17 threshold: 1024,
18 },
19
20 // Security settings
21 security: {
22 maxConnectionsPerIP: 10,
23 maxMessagesPerWindow: 100,
24 rateLimitWindowMs: 60000,
25 tokenValidityMs: 30000,
26 },
27
28 // Payload limits
29 maxWsPayload: 10_485_760, // 10 MB
30 maxBodySize: 10_485_760, // 10 MB
31 maxBatchSize: 50,
32 },
33};
34
35export default config;