Commit Graph
62 Commits
Author SHA1 Message Date
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
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 4ec1ff69f4 feat: provider capabilities, enriched metadata, skip times (v2.1.0) v2.1.0 2026-06-25 02:02:47 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 56e3500d3e fix: extractSubtitles returns empty array when subtitles undefined (dub) 2026-06-25 01:48:10 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 9b1ac11ff0 feat: improve subtitle extraction, quality fallback, and documentation v2.0.1 2026-06-25 01:43:11 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 3ab0bae18d v2.0.0: Update index.html — 35 endpoints v2.0.0 2026-06-25 01:19:52 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 33e5e8e136 v2.0.0: Sync all docs — README, endpoints, OpenAPI, test suite 2026-06-25 01:18:28 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 3675bbba77 v2.0.0: Major upgrade — 35 endpoints, compression, streaming improvements, new features 2026-06-25 01:09:35 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 9ada6e1016 v1.4.0: Add creator attribution middleware 2026-06-25 00:54:18 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 3a28c4d182 v1.4.0: Fix Vercel deployment, security headers, rate limiter, cache cleanup 2026-06-25 00:52:26 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 68f7ea7cf4 Update README.md 2026-06-10 22:11:26 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 37e70c3bda Update README.md 2026-06-10 22:06:57 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ af08c91624 Update README.md 2026-06-10 22:05:04 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 1433afdca1 v1.3.0: Full landing page upgrade + feature parity with AniKotoAPI
- Full index.html rewrite with AniKotoAPI-style features:
  * Canvas particle effects (cyan particles)
  * Scroll-reveal animations (IntersectionObserver)
  * Animated stat counters (count up on scroll)
  * Infinite scrolling marquee (8 feature badges)
  * Live interactive API console (5 presets: Search, Trending, Episodes, Info, Health)
  * Sidebar endpoint explorer (16 endpoints, multi-language tabs: cURL/JS/Python)
  * 4 interactive playground cards (Search, Info, Episodes, Trending)
  * Custom scrollbar, JetBrains Mono font
  * 4-column grid footer with API/Resources/Legal
  * Fixed header with scroll-aware glass blur
  * Ambient orb gradient animations
  * CTA section with gradient overlay
- Added public/404.html (glitch animation error page)
- Added public/manifest.json (PWA, theme: #38bdf8)
- Added public/robots.txt (Allow /, Disallow /api)
- Added public/sitemap.xml (4 URLs)
- Added public/tos.html (13 sections)
- Added public/privacy.html (8 sections)
- Added .env.example, CONTRIBUTING.md, LICENSE, render.yaml, test.js
- Added docs/ (5 files: index, endpoints, streaming, examples, architecture)
- Updated server.js: clean URL routes (/tos, /privacy), 404.html fallback
- Updated package.json: devDependencies nodemon, repository, dev script
- All branding: AniKotoAPI → MiruroAPI, cyan color scheme (#38bdf8)
v1.3.0
2026-06-09 16:21:30 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ b73d8d09bf fix: replace SVG favicons with real Miruro icons scraped from miruro.tv HTML 2026-06-09 15:59:55 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ 99d7c15750 docs: full README rewrite matching AniKotoAPI style - emojis, blockquote endpoints, parameter tables, roadmap, troubleshooting, star history, author footer 2026-06-09 15:48:46 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ faa4888f77 docs: comprehensive README upgrade with badges, visuals, real API data, streaming flow, provider tables, TypeScript schemas 2026-06-09 15:44:19 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ a1cc22e84a feat: integrate real Miruro assets from official domains
Replaced placeholder SVGs with actual scraped assets:

- favicon.svg → icon-dark.svg (real Miruro dark mode SVG)
- share.svg → og-image.png (real maskable icon for OG/Twitter)
- Added: icon-light.svg, icon-512x512.png, favicon.ico, apple-touch-icon
- Nav logos now use real Miruro icon image instead of text div
- OG meta tags updated: SVG→PNG for proper social previews
- Both index.html and docs.html updated
- Version badge: v1.1.0 → v1.2.0
2026-06-09 15:22:27 +05:30
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ d2193670f4 feat: add scraped assets from official Miruro domains
Scraped from miruro.com, miruro.bz, miruro.ru, status.miruro.com:

- 6 favicons: dark/light SVG, 512px PNG, ICO, apple-touch, maskable
- 1 logo: status page logo (12KB)
- 4 fonts: Inter, FontAwesome brands/solid, CSS
- 18 media: testimonial avatars from homepage
- README documenting sources and structure

All streaming domains use identical assets.
SVG favicons support dark/light mode via prefers-color-scheme.
2026-06-09 15:15:00 +05:30