--- title: YumeZone HLS Proxy emoji: 🎬 colorFrom: purple colorTo: blue sdk: docker pinned: false --- # YumeZone HLS Proxy A fast, deployable HLS proxy server that rewrites M3U8 playlists and proxies video streams through your Hugging Face Space. ## Features - Base64url encoded payload support - M3U8 playlist rewriting - CDN rule-based referer/origin spoofing - CORS enabled - Works with various anime/video streaming CDNs ## Deployment This Space uses Docker. The server starts automatically on port 3000. ## Endpoints - `GET /health` — Health check - `GET /proxy?url=&ref=` — Proxy request with optional referer - `GET /p/` — Base64-encoded payload proxy ## Test Visit: `/health` to verify it's running Example proxy: ``` /proxy?url=https%3A%2F%2Fexample.com%2Fvideo.m3u8&ref=https%3A%2F%2Fexample.com%2F ``` - For custom domain: - `route`: Your worker route (e.g., `example.com/api/proxy/*`) - `zone_id`: Your domain's zone ID ### 4. Update WORKER_BASE in index.js Replace `{url here}` with your worker's URL (e.g., `https://yumezone.example.com` or `https://yourname.workers.dev`) ### 5. Deploy ```bash npm run deploy # or wrangler deploy ``` ### 6. Test ```bash # Health check curl https://yourname.workers.dev/health # Proxy a URL curl "https://yourname.workers.dev/proxy?url=https://example.com/video.m3u8" ``` ## Features - **Base64URL encoding**: `/p/` - secure, obfuscated requests - **Legacy support**: `/proxy?url=...&ref=...` - backward compatible - **CDN Rules**: Pre-configured headers for popular CDN hosts - **M3U8 Rewriting**: Auto-rewrites playlist URLs to go through proxy - **Browser impersonation**: Spoofs User-Agent and other headers - **Range requests**: Supports HTTP Range header for video segments - **CORS enabled**: Works with cross-origin requests ## Environment This is a Service Worker - no external dependencies required. Uses native Cloudflare Worker APIs. ## File Structure ``` . ├── index.js # Main worker code ├── package.json # Project metadata ├── wrangler.toml # Cloudflare Worker config ├── .gitignore # Git ignore rules └── README.md # This file ```