| ---
|
| 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=<url>&ref=<referer>` β Proxy request with optional referer
|
| - `GET /p/<base64url>` β 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/<base64url>` - 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
|
| ```
|
| |