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";23const config: HeliumConfig = {4 trustProxyDepth: 1, // Trust 1 proxy level (e.g., Vercel)5 rpc: {6 // Transport mode: "websocket" | "http" | "auto"7 transport: "websocket", // default89 // Auto-switch to HTTP on mobile/cellular networks10 // Mobile carriers prioritize HTTP traffic over WebSocket11 autoHttpOnMobile: false, // default1213 // Compression settings14 compression: {15 enabled: true,16 threshold: 1024,17 },18 // Security settings19 security: {20 maxConnectionsPerIP: 10,21 maxMessagesPerWindow: 200,22 rateLimitWindowMs: 60000,23 tokenValidityMs: 30000,24 },25 },26};2728export default config;