Skip to content

arshx86/re-hls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vanee

Fully stateless high-performance HLS relay engine for serverless environments.

Technical Core

  • Hides Origin: Original HLS URL never exposes and all chunk URLs are proxied with secure tokens by AES256.
  • Stateless: Eliminates databases. Decrypts origin URLs on-the-fly via deterministic AES-256-CBC.
  • Edge Piping: Passes M3U8 chunks directly without buffering, least possible amount of ram usage.
  • Cache Coherence: Deterministic IV generation ensures Edge Cache HITs for concurrent viewers.
  • V8 Native: Built for CF Workers/Edge environments. Minimal dependency.

Flow

Vanee is backend engine to restream HLS streams by proxying the requests between streamer and your environment.

  1. Manifest: Client requests proxied .m3u8 through your backend.
  2. Rewriting: Backend fetches manifest file, encrypts segment URLs into tokens that we've gotten from origin, and returns modified manifest, which is similar to:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:12
#EXT-X-MEDIA-SEQUENCE:1084671
#EXT-X-DISCONTINUITY-SEQUENCE:10877
#EXT-X-PROGRAM-DATE-TIME:2026-05-06T22:39:33.952Z
#EXTINF:10.0
/upstreams/startv/YStyhzpVmJEfN6HWGeTG1Bl63oWom.... (ENCRYPTED URLS POINTING BACK TO YOUR BACKEND)
  1. Piping stream directly: Upon Client requests encrypted segment, Backend decrypts token, opens upstream pipe, and streams bytes directly. As there is no buffering in this step, memory usage will be very low. (Mirroring readablestream directly)

Deploy

// build:
bun run build
// deploy to wrangler
bunx wrangler deploy

About

HLS Relayer backend. Stateless, edge environment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors