mirror of
https://github.com/Shineii86/MiruroAPI.git
synced 2026-10-22 10:15:10 +00:00
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.
29 lines
1.4 KiB
Bash
29 lines
1.4 KiB
Bash
# Origins you want to allow (comma-separated, use * for all)
|
|
ALLOWED_ORIGINS=https://miruro.tv,https://miruro.to,https://miruro.bz,https://miruro.ru
|
|
|
|
# Port (optional, defaults to 3000)
|
|
PORT=3000
|
|
|
|
# Pipe XOR obfuscation key (hex string, 32 chars)
|
|
# Required for pipe response decoding (x-obfuscated: 2)
|
|
PIPE_OBF_KEY=71951034f8fbcf53d89db52ceb3dc22c
|
|
|
|
# PRU proxy XOR key (hex string, 32 chars)
|
|
# Required for pru.ultracloud.cc URL encoding/decoding
|
|
PRU_PROXY_KEY=a54d389c18527d9fd3e7f0643e27edbe
|
|
|
|
# ══════════════════════════════════════════════════════════════
|
|
# SELF-HEALING FALLBACK METHODS (optional, enables auto-recovery)
|
|
# ══════════════════════════════════════════════════════════════
|
|
|
|
# Method 2: ScraperAPI (free 1,000 req/month, no CC needed)
|
|
# Sign up at https://www.scraperapi.com/
|
|
# Enables automatic fallback when direct requests are blocked by Cloudflare
|
|
SCRAPER_API_KEY=
|
|
|
|
# Method 3: FlareSolverr (self-hosted browser proxy)
|
|
# Run: docker run -p 8191:8191 ghcr.io/flaresolverr/flaresolverr
|
|
# Deploy on Render.com free tier, Oracle Cloud, or any VPS
|
|
# Solves Cloudflare Turnstile challenges automatically
|
|
FLARESOLVERR_URL=
|