Skip to content
This repository was archived by the owner on Jul 13, 2026. It is now read-only.
This repository was archived by the owner on Jul 13, 2026. It is now read-only.

BUG: Stream extraction failing with "upstream error" on /api/watch (All servers returning working: false) #1

Description

@Shishir3k

The /api/watch and /api/anime/{id}/servers/{ep} endpoints are completely failing to return streaming links, throwing a consistent upstream error. When checking the active servers route, all video host providers (kite, meg, baku, dio) return "working": false despite successful network latency pings.

The metadata endpoints (like /api/anime/home and the main episode list arrays) are still scraping successfully, meaning the bottleneck is isolated entirely to the media stream extraction/decryption logic.

To Reproduce

  1. Hit the server endpoint for any anime episode (e.g., One Piece Episode 1):
    GET /api/anime/6989b89f29cf95f4eb03b4ed/servers/1?source_type=dub
  2. See the JSON payload response:
{
 "success": true,
 "data": [
   { "id": "kite", "working": false, "latency_ms": 976 },
   { "id": "meg", "working": false, "latency_ms": 982 },
   { "id": "baku", "working": false, "latency_ms": 997 },
   { "id": "dio", "working": false, "latency_ms": 1006 }
 ]
}
  1. Attempting to call GET /api/watch?id=6989b89f29cf95f4eb03b4ed&ep=1 immediately responds with an upstream error.

Technical Diagnosis & Logs

  • Environment: Tested on both remote PaaS deployments (Vercel) and locally via Go native runtime environment to rule out cloud IP data center blacklisting/Cloudflare walls. The issue persists on local residential IPs.

  • Root Cause: The upstream streaming hosts have likely altered their internal payload structures, URL signature generation, or token encryption keys since the last repository patch.

  • Specific Finding: Inspecting the real network headers on the source platform shows that the kite player relies on a dynamic proxy format that yields an encrypted Base64 string payload:
    https://swiftstream.top/proxy/oppai/kite/[CIPHER_TEXT_STREAM]
    The backend extractor's decryption sequence (XOR/Cipher key mismatch) appears to be outputting invalid links, causing the application to flag the providers as broken.

Expected Behavior

The extractor should parse the current script logic of the source video player, decode the underlying cipher string from the stream source domain, and return working .m3u8 playlist paths.

Desktop Configuration:

  • OS: Windows 10 / 11
  • Go Runtime Version: 1.22+
  • API Framework: Fiber Engine

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions