Commit Graph
79 Commits
Author SHA1 Message Date
Shinei Nouzen a5fbace9c1 fix: resolve Issue #3 — API stability, error handling & new endpoints
- Added /api/sources/:id path-based endpoint for streaming sources
- Improved Cloudflare detection with proper 503 status codes
- Added timeout handling (15s) with exponential backoff for pipe requests
- Enhanced CORS with Authorization header and rate limit expose headers
- All streaming endpoints now return descriptive error messages
- Pipe health check reports skipped/unconfigured methods separately
- Updated OpenAPI spec with new /sources/{id} route
- Version bumped to 2.3.3

Fixed endpoints: /search, /info/:id, /trending, /filter, /episodes/:id,
/sources/:id (new), /stream, /watch, /download
All endpoints return consistent { success, results/message } format
Proper 400/404/503 responses for invalid inputs and failures
2026-08-25 06:45:38 +05:30
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
Shinei Nouzen 5b020e53b0 docs: update README.md for v2.3.2 — Cloudflare Worker deployment, version badges, streaming status v2.3.2 2026-08-05 20:54:33 +05:30
Shinei Nouzen a2ba1df831 feat: add Cloudflare Worker implementation for edge-to-edge streaming bypass
- Add worker.js: full API on Cloudflare's edge network (1720 lines)
- Add wrangler.toml: deployment configuration for wrangler CLI
- Streaming endpoints now bypass Cloudflare bot detection via edge-to-edge
- Zero cold starts, 100K free requests/day, no npm dependencies
- 15 endpoints: search, trending, info, episodes, watch, genres, random, etc.
- Self-healing fallback: direct → ScraperAPI → FlareSolverr
- Proper code style: box headers, JSDoc, feature markers, inline notes
- Bump version to 2.3.2 across package.json, server.js, apiRoutes.js

Fixes #2
2026-08-05 20:39:31 +05:30
Shinei Nouzen d08bb86931 Update README with API status notice
Added note about API status and hosting requirements.
2026-07-25 20:02:57 +05:30
Shinei Nouzen 4912b5d6eb docs: update CONTRIBUTING.md with bypass solutions guide
- Added Contributing Bypass Solutions section (priority)
- Added free/open source tool table
- Added step-by-step guide for contributors
- Added code style examples (headers, section markers, feature markers)
2026-07-02 10:13:33 +05:30
Shinei Nouzen 5d2534eff2 docs: add bypass solutions for community contributions
Added Contributing Bypass Solutions section to README with:
- Free/open source tools (nodriver, Camoufox, curl_cffi, FlareSolverr, etc.)
- Paid APIs (Scrape.do 1K free, ZenRows, ScrapingBee)
- Implementation guide for contributors
- .env.example updated with SCRAPE_DO_TOKEN

Encourages community to implement streaming bypass methods.
2026-07-02 10:12:28 +05:30
Shinei Nouzen 45b436d752 chore: remove Cloudflare Worker edition
Worker approach tested and confirmed non-functional:
- Both AniList and Miruro block CF Worker IPs (HTTP 403)
- Edge-to-edge assumption was wrong

Removed:
- worker.js (885 lines)
- README Worker section
- docs/architecture.md Worker section
- Cloudflare Worker script deleted from CF account

CHANGELOG.md kept as historical record.
2026-07-02 10:01:13 +05:30
Shinei Nouzen 4293683ae4 fix: update docs to reflect CF Worker blocking reality
Both AniList and Miruro block Cloudflare Worker IPs (HTTP 403).
Worker approach tested and confirmed non-functional:
- /api/genres → AniList 403: 'manually blocked'
- /api/search → AniList 403: 'manually blocked'
- /api/episodes → Miruro 403: blocked

Updated README.md and docs/architecture.md:
- Worker section marked as experimental
- Troubleshooting reordered: FlareSolverr > ScraperAPI > self-host
- Architecture doc updated with actual test results
2026-07-02 09:58:21 +05:30
Shinei Nouzen 2c97ca2dd8 docs: add Cloudflare Worker edition documentation
- README.md: Added Worker deployment section, updated troubleshooting
  - Fix 1: Cloudflare Worker (best — free, works)
  - Fix 2: ScraperAPI (paid, 9/mo)
  - Fix 3: FlareSolverr (self-hosted)
  - Fix 4: Self-host API
  - Added Worker vs Vercel comparison table
- docs/architecture.md: Added Worker architecture section
  - Why Workers work (edge-to-edge bypass)
  - Worker runtime differences table
  - 15 Worker endpoints listed
  - Deploy instructions
- CHANGELOG.md: Added v2.3.1 entry for Worker edition
2026-07-02 09:34:18 +05:30
Shinei Nouzen 3f667fe87f feat: Cloudflare Worker edition — runs on edge, bypasses Cloudflare
- 15 endpoints (search, trending, info, episodes, watch, etc.)
- Pipe requests bypass Cloudflare bot detection (edge-to-edge)
- Zero cold starts, 100K free requests/day
- No npm dependencies (native fetch + DecompressionStream)
- Full codebase comments matching repo style:
  - Box-style headers (project/author/license)
  - Section markers (// ==== SECTION ====)
  - Feature markers (// ---- FEATURE: XYZ ----)
  - Function-level JSDoc (params, returns, tricks)
  - Inline notes for non-obvious logic
  - Footer with endpoint summary
2026-07-02 09:16:00 +05:30
Shinei Nouzen 015aa67ec2 fix: ScraperAPI requires premium plan for protected domains like Miruro
- pipe.js: add premium=true to ScraperAPI URL
- README.md: update ScraperAPI cost to $49/mo (premium required)
- .env.example: note protected domain requirement
- CHANGELOG.md: update ScraperAPI cost info
2026-07-02 08:58:05 +05:30
Shinei Nouzen a918ed9d1a chore: trigger redeploy for SCRAPER_API_KEY fix 2026-07-02 08:25:31 +05:30
Shinei Nouzen 125f088570 chore: trigger Vercel redeploy for new SCRAPER_API_KEY 2026-07-02 08:14:48 +05:30
Shinei Nouzen 0628189ad8 fix: animated endpoint counter 45 → 46 in index.html v2.3.0 2026-07-02 07:53:28 +05:30
Shinei Nouzen bb68100ef0 fix: update all stale endpoint counts 35/44 → 46 2026-07-02 07:52:36 +05:30
Shinei Nouzen 2e0ef33b92 docs: add streaming status, Cloudflare fix guide, and troubleshooting
- Add Streaming Status section explaining why pipe endpoints fail (500)
- Add 'How to Fix Streaming Issues' with 3 solutions:
  - ScraperAPI (free 1K req/month, easiest)
  - FlareSolverr (self-hosted, unlimited)
  - Self-host entire API on VPS
- Update Configuration table with SCRAPER_API_KEY and FLARESOLVERR_URL
- Add FAQ entries for streaming 500 errors and /api/pipe-health
- Add troubleshooting row for streaming 500 errors
- Add verification steps with example responses
2026-07-02 07:48:51 +05:30
Shinei Nouzen a6acfc6445 docs: full sweep — update all files to v2.3.0 with self-healing system
Updated 14 files across the repo to reflect v2.3.0:
- README.md: version badge, 46 endpoints, self-healing section, changelog
- test.js: version 2.3.0
- docs/*: architecture, endpoints, index, streaming — multi-mirror + fallback
- public/*: index.html, docs.html, openapi.json, manifest.json, privacy, tos
- api/proxy.js: updated example comments
- src/routes/apiRoutes.js: endpoint count 36→46

All version refs updated from 2.1.4/2.2.0 → 2.3.0.
Endpoint count updated to 46 (added /pipe-health).
miruro.tv refs updated to multi-domain (miruro.to/ru/bz/tv).
Syntax checks pass on all JS files.
2026-07-02 07:23:27 +05:30
Shinei Nouzen eb0e166310 feat(v2.3.0): self-healing fallback system — auto-recovery from Cloudflare blocks
pipe.js now tries 3 methods in order with automatic fallback:
1. Direct — mirror rotation (.ru → .to → .bz → .tv) with browser headers
2. ScraperAPI — free proxy (1K req/mo, no CC required)
3. FlareSolverr — self-hosted browser proxy (solves Cloudflare Turnstile)

When one method fails (403/timeout), the next is tried automatically.
Zero-config: works without any env vars. Add SCRAPER_API_KEY or
FLARESOLVERR_URL for Cloudflare bypass.

New endpoint: /api/pipe-health — tests all configured methods,
reports latency and working/failed status, recommends preferred method.

Files changed:
- src/helpers/pipe.js — methodDirect(), methodScraperAPI(), methodFlareSolverr(), pipeHealthCheck()
- src/routes/apiRoutes.js — added /api/pipe-health endpoint
- .env.example — documented SCRAPER_API_KEY, FLARESOLVERR_URL

Version bumped to 2.3.0 across package.json, server.js, /api/health,
/api/openapi, public/openapi.json. CHANGELOG updated.
2026-07-02 07:12:06 +05:30
Shinei Nouzen 92154d7ea2 fix(v2.2.0): migrate to new Miruro pipe protocol — restore streaming endpoints
The streaming endpoints (/episodes, /sources, /stream, /watch, /download)
returned 500 because the upstream Miruro pipe changed and www.miruro.tv is
now hard-blocked by Cloudflare.

Reverse-engineered the current Miruro frontend contract:
- Request is plain base64url of the JSON payload (no XOR).
- Response obfuscation is now signalled by the x-obfuscated header:
  absent = plain JSON, 1 = base64+gzip, 2 = base64+XOR(PIPE_OBF_KEY)+gzip.

pipe.js now:
- rotates across mirrors (miruro.ru > .to > .bz > .tv), one per retry;
- decodes based on the x-obfuscated header instead of always XOR+gunzip;
- sends full browser sec-fetch/sec-ch-ua headers to pass Cloudflare checks;
- raises maxRetries to 4 and rotates on 403/444.

proxy.js default referer/Origin -> https://www.miruro.to (miruro.tv is dead).

AniList-backed endpoints were already healthy and are unaffected.
Version bumped to 2.2.0 across package.json, server.js, /api/health,
/api/openapi, public/openapi.json. CHANGELOG updated.
2026-07-02 06:57:58 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 5a8879f2ba fix: Add explicit routes for clean URLs (docs, tos, privacy, openapi.json) 2026-06-25 12:25:01 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 6bda1d9c95 feat: Update index.html with all 44 endpoints in explorer section
- Stats counter: 35 → 44
- Explorer: 16 endpoints → 44 endpoints
- Added: trending/daily, trending/weekly, top, random, upcoming/countdown
- Added: seasonal, studio, tags, genre, year, status, format
- Added: character, staff, characters search, staff search
- Added: anime characters, relations, recommendations
- Added: batch episodes, sources, stream, download
- Added: compare, genre stats, calendar, timeline
- Added: health, stats, providers, openapi
- All endpoints with cURL, JavaScript, Python examples
2026-06-25 12:15:22 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 10560e36c3 docs: Update openapi.json to v2.1.4 with all 44 endpoints, fix docs.html count 2026-06-25 12:11:39 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 023e36c2d4 fix: Add static file serving for public/ directory on Vercel 2026-06-25 12:08:33 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 156f9b16a5 style: Add full doc comments to proxy.js, server.js, test.js, api/index.js
- Box-style header with project/author/license
- Section headers (═══ SECTION ═══)
- Function-level JSDoc (purpose, params, returns, examples)
- Inline notes for non-obvious logic
- Feature markers (---- FEATURE: XYZ ----)
- Footer on every module
2026-06-25 10:55:48 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 16eb0236d7 docs: Update README for v2.1.4 — version, endpoints, env vars, changelog 2026-06-25 10:51:20 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 73b510589e Fix CORS — allow non-browser requests (no Origin header) v2.1.4 2026-06-25 10:42:09 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 8297d8f27d v2.1.4: Security hardening, bug fixes, code quality improvements
- Move XOR keys to env vars (PRU_PROXY_KEY, PIPE_OBF_KEY)
- Fix multi-search to combine query + filters
- Fix deepTranslate to return clone instead of mutating
- Improve getBestStream quality matching and fallback
- Add input sanitization for all route params
- CORS blocks unknown origins in production
- Security headers in vercel.json at CDN level
- stats/genre uses Promise.allSettled for parallel execution
- Delete dead server.py, fix version strings
2026-06-25 10:34:12 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 1d0ec95f19 Update CHANGELOG with full diagnostic sweep results 2026-06-25 10:03:53 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 94421af2dd Add no-cache headers to /random to prevent CDN caching 2026-06-25 10:03:22 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 7394a1c94c Improve random entropy with multi-source seed 2026-06-25 10:00:28 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ b59ca7e1ec Fix random (Date.now+hrtime seed) + character/staff 404 detection 2026-06-25 09:58:44 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 5acf8a2e1e Fix diagnostic sweep bugs — tags, random, 404s, security headers
- Tags: data.TagCollection→data.MediaTagCollection (was returning empty array)
- Random: Math.random()*50→crypto.randomInt(1,500) for true randomness
- Character/Staff: return 404 instead of 500 on not-found
- Security: added X-XSS-Protection header
- All 44 endpoints tested in full diagnostic sweep
2026-06-25 09:56:58 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 00275adb42 Fix AniList queries — trending args, studio type arg, tags field name
- Trending: removed invalid trending:7/30 args (not in AniList schema)
- Studio: removed type:ANIME from Studio.media (not supported)
- Tags: TagCollection→MediaTagCollection, removed rank field
2026-06-25 09:26:18 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 90cdd26241 Fix tags query — TagCollection→MediaTagCollection, remove rank field 2026-06-25 09:21:27 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 4509c0add3 Fix character/staff queries — remove dateOfDeath, fix MediaEdge role field
- Character: removed dateOfDeath (not in AniList schema), changed role→characterRole
- Staff: removed dateOfDeath, removed invalid role field from staffMedia edges
- Fixes 400 errors on /api/character/:id and /api/staff/:id
2026-06-25 09:18:45 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ d1dec20788 Update CHANGELOG v2.1.3 with working endpoints and bug fixes 2026-06-25 09:02:24 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ bff4c5b7c6 Fix getWatchSources to handle both raw and slugged episode IDs
- Handle raw pipe IDs (animedao:witch-hat-atelier:1) with colon separator
- Handle slugged IDs (watch/bonk/147105/sub/animedao-1) with slash separator
- Use rawPipeId for decoded ID recovery in both cases
2026-06-25 08:59:58 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 84d7e75372 Fix getWatchSources slug matching after injectSourceSlugs mutation
- Match slug against last segment of ep.id (after injectSourceSlugs)
- Use rawPipeId + translateId to recover original decoded ID
- Fixes 'Episode slug not found' error for all providers
2026-06-25 08:57:05 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ e35d934190 v2.1.3: Pipe resilience — retry logic, caching, optimized streaming
- Added pipeRequest() with retry + exponential backoff (3 attempts)
- Cached episodes (5min) and sources (10min) responses
- Confirmed kiwi/bonk CDNs serve real content, bee/ally serve decoys
- Updated version to 2.1.3 across package.json, health, OpenAPI
2026-06-25 08:53:02 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 398db2b4f0 docs: v2.1.2 changelog — pru proxy discovery and streaming architecture 2026-06-25 08:34:58 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 94b59b3bc9 fix: add Origin header to pipe requests to bypass Cloudflare 444 2026-06-25 08:29:04 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 6cd2b9a19e feat: return raw CDN URLs for streams (browser loads directly via CORS *); keep subtitle proxy for third-party CDNs 2026-06-25 08:22:34 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 76c47368a7 feat: proxy through pru.ultracloud.cc for real video content 2026-06-25 08:10:11 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ f208becd27 fix: rewrite relative M3U8 URLs (variant playlists like 313625720.m3u8) 2026-06-25 08:06:39 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 74f3dcd7c3 feat: pipe XOR decode + CDN CORS proxy for streaming
- decodePipeResponse now XOR-decodes with obfuscation key before gzip
- Updated pipe version to 0.2.0 to match miruro.tv
- Added /api/proxy endpoint for CORS-safe M3U8/VTT streaming
- Proxied stream/subtitle URLs through /api/proxy for browser playback
- M3U8 content rewritten to proxy variant playlists and segments
2026-06-25 08:04:13 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 90b0999d7d fix: store original base64 rawPipeId in deepTranslate + use decoded id in getWatchSources 2026-06-25 04:10:34 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ f7b3e32cb7 fix: pipe stream resolution - rawPipeId + creatorInfo 2026-06-25 03:55:01 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ a65138e575 fix: preserve rawPipeId for stream resolution + fix creatorInfo message overwrite + match slug against tail of episode ID 2026-06-25 03:51:13 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 399f9b1917 fix: Vercel deployment - skip app.listen() on Vercel, fix vercel.json routes 2026-06-25 02:37:27 +05:30