1 Commits
Author SHA1 Message Date
Shinei Nouzen 160f83acf7 docs: remove unverified streaming claims — mark Worker as experimental/untitled
- README.md: streaming status section restored to original
- README.md: Worker deployment marked as experimental, untested
- CHANGELOG.md: edge-to-edge bypass marked as theoretical/untested
- Honest about what's verified vs unverified
2026-08-05 21:01:42 +05:30
2 changed files with 17 additions and 22 deletions
+6 -5
View File
@@ -5,7 +5,7 @@
#### New: `worker.js` (Cloudflare Worker Edge Runtime) #### New: `worker.js` (Cloudflare Worker Edge Runtime)
- **Full Cloudflare Worker implementation** created at project root - **Full Cloudflare Worker implementation** created at project root
- Edge-to-edge requests bypass Cloudflare bot detection (Worker → miruro.to → Cloudflare trusts itself) - Edge-to-edge requests *may* bypass Cloudflare bot detection (theoretical — untested)
- Zero cold starts, 100K free requests/day on Cloudflare free tier - Zero cold starts, 100K free requests/day on Cloudflare free tier
- No npm dependencies — uses native `fetch`, `DecompressionStream`, `TextEncoder`/`TextDecoder` - No npm dependencies — uses native `fetch`, `DecompressionStream`, `TextEncoder`/`TextDecoder`
- 15 API endpoints: search, suggestions, filter, trending, trending/daily, trending/weekly, popular, top, upcoming, recent, random, info, episodes, watch, stream, genres, tags, providers, health - 15 API endpoints: search, suggestions, filter, trending, trending/daily, trending/weekly, popular, top, upcoming, recent, random, info, episodes, watch, stream, genres, tags, providers, health
@@ -16,9 +16,9 @@
- Node.js compatibility flag enabled for buffer/text encoding support - Node.js compatibility flag enabled for buffer/text encoding support
- CPU time limit: 30 seconds - CPU time limit: 30 seconds
#### Architecture #### Architecture (Theoretical)
``` ```
Browser → Cloudflare Worker (edge) → miruro.to pipe → Cloudflare trusts itself ✅ Browser → Cloudflare Worker (edge) → miruro.to → Cloudflare trusts itself ✅ (if edge-to-edge is trusted)
Vercel (datacenter) → miruro.to → Cloudflare blocks ❌ Vercel (datacenter) → miruro.to → Cloudflare blocks ❌
``` ```
@@ -35,9 +35,10 @@ wrangler deploy worker.js --name miruroapi
- `CHANGELOG.md` — This entry - `CHANGELOG.md` — This entry
#### Notes #### Notes
- This fixes Issue #2: Cloudflare Worker/Pages deployment support - This addresses Issue #2: Cloudflare Worker/Pages deployment support
- Streaming endpoints (`/episodes`, `/watch`, `/stream`) now work via edge-to-edge requests - Streaming endpoints (`/episodes`, `/watch`, `/stream`) are implemented but **untested** — edge-to-edge bypass is theoretical
- Environment variables `SCRAPER_API_KEY` and `FLARESOLVERR_URL` are optional for fallback methods - Environment variables `SCRAPER_API_KEY` and `FLARESOLVERR_URL` are optional for fallback methods
- **Not verified in production** — deploy and test at your own risk
- The worker runs on Cloudflare's edge network with zero cold starts - The worker runs on Cloudflare's edge network with zero cold starts
--- ---
+11 -17
View File
@@ -112,28 +112,25 @@ Zero-config: works out of the box. Add `SCRAPER_API_KEY` env var for automatic C
### ⚠️ Streaming Status ### ⚠️ Streaming Status
> **Streaming endpoints work on Cloudflare Workers** — deploy `worker.js` for full streaming support. > **Streaming endpoints (`/api/episodes`, `/api/watch`, `/api/sources`, `/api/stream`) return 500 errors when Cloudflare blocks pipe requests.**
> >
> On Vercel, streaming endpoints (`/api/episodes`, `/api/watch`, `/api/sources`, `/api/stream`) return 500 errors when Cloudflare blocks pipe requests. Metadata endpoints (search, info, trending, etc.) work perfectly on all platforms. > This is expected behavior on Vercel's free tier. Cloudflare's bot protection blocks requests from datacenter IPs (including Vercel's). Metadata endpoints (search, info, trending, etc.) work perfectly — only streaming is affected.
| What Works (All Platforms) | What's Blocked (Vercel Only) | | What Works | What's Blocked |
|:---|:---| |:---|:---|
| Search, suggestions, filter | Episodes, sources, stream | | Search, suggestions, filter | Episodes, sources, stream |
| Info, characters, relations | Watch, download | | Info, characters, relations | Watch, download |
| Trending, popular, schedule | All pipe-dependent endpoints | | Trending, popular, schedule | All pipe-dependent endpoints |
| Genres, tags, calendar | Streaming provider data | | Genres, tags, calendar | Streaming provider data |
| All AniList-backed endpoints | **✅ Works on Cloudflare Worker** | | All AniList-backed endpoints | |
**To fix streaming on Vercel**, set one of these environment variables: **To fix streaming**, set one of these environment variables in Vercel:
```bash ```bash
# Option 1: Deploy as Cloudflare Worker (recommended — free, bypasses Cloudflare) # Option 1: ScraperAPI (requires premium plan — $49/month)
wrangler deploy worker.js --name miruroapi
# Option 2: ScraperAPI (requires premium plan — $49/month)
SCRAPER_API_KEY=your_scraperapi_key SCRAPER_API_KEY=your_scraperapi_key
# Option 3: FlareSolverr (self-hosted, unlimited) # Option 2: FlareSolverr (self-hosted, unlimited)
FLARESOLVERR_URL=http://your-flaresolverr-host:8191 FLARESOLVERR_URL=http://your-flaresolverr-host:8191
``` ```
@@ -1420,9 +1417,10 @@ docker build -t miruroapi .
docker run -p 3000:3000 miruroapi docker run -p 3000:3000 miruroapi
``` ```
### ⚡ Cloudflare Worker (Streaming Fixed) ### ⚡ Cloudflare Worker (Experimental)
> **Streaming endpoints work on Cloudflare Workers** — edge-to-edge requests bypass Cloudflare bot detection. > **Cloudflare Worker implementation** — runs the API on Cloudflare's edge network.
> Streaming endpoints *may* work via edge-to-edge requests, but this is **untested and not guaranteed**.
```bash ```bash
# Install wrangler CLI # Install wrangler CLI
@@ -1435,11 +1433,7 @@ wrangler login
wrangler deploy worker.js --name miruroapi wrangler deploy worker.js --name miruroapi
``` ```
**Why Workers Work:** **Theory:** Cloudflare Workers run on Cloudflare's edge, so requests to `miruro.to` *should* be trusted (edge-to-edge). However, this has not been verified in production.
```
Vercel (datacenter) → miruro.to → Cloudflare blocks ❌
Worker (edge) → miruro.to → Cloudflare trusts itself ✅
```
**Features:** Zero cold starts, 100K free requests/day, no npm dependencies, 15 API endpoints. **Features:** Zero cold starts, 100K free requests/day, no npm dependencies, 15 API endpoints.