v1.3.0 — Route stream URLs through CF Worker (fixes 403 from all video CDNs)
Root cause
Even with the correct Referer (v1.2.9 fix), mp4upload returned 403 because the user's IP is blocked by the CDN — the same IP blocking that affects api.allanime.day. The Referer fix was necessary but not sufficient.
The user falls through to mp4upload because ALL higher-priority sources also fail:
- Yt-mp4 (
tools.fast4speed.rsvp) → 403 (IP blocked by Cloudflare) - S-mp4 (
allanime.dayclock.json) → blocked (redirect loop / IP) - Mp4 (
a4.mp4upload.com:183) → 403 (IP blocked by mp4upload CDN)
ALL direct stream URLs fail for the user's IP.
The fix
When a CF Worker is configured (allanime_cf_worker_url), SNI now wraps the stream URL through the worker too — not just the API calls. The worker has a clean IP that video CDNs don't block.
Applied to all three extraction paths:
_extract_source(Yt-mp4): wraps the fast4speed URL through the worker_fetch_clock_json(S-mp4): wraps the clock.json stream URL_scrape_embed(mp4upload/filemoon/etc): wraps the scraped video URL
The worker URL format:
https://your-worker.deno.dev/?url=<encoded_stream_url>&h_Referer=...&h_Origin=...
mpv plays the worker URL → worker proxies the request to the real CDN with correct headers + its own clean IP → streams the video back to mpv.
What you need to do
1. Deploy a CF Worker (if you haven't already)
Follow the instructions at https://github.com/sundeepyt2/SNI/blob/main/worker/README.md — use Deno Deploy Playground (easiest, ~2 min).
2. Save the worker URL
sni config --update allanime_cf_worker_url='https://your-project.deno.dev'3. Upgrade + play
pip install --upgrade sni-cli
sni play "Tsue to Tsurugi no Wistoria"SNI will now route BOTH the API calls AND the stream URLs through your worker, bypassing all IP blocking.
Verified
ruff check sni/→ All checks passedpytest -q→ 44 passed (3.75s)python -m build→ sdist + wheel both passtwine check- Stream URL wrapping logic verified for Yt-mp4, S-mp4, and mp4upload sources
Full changelog: v1.2.9...v1.3.0