Lightweight AnimePahe M3U8 Proxy https://kwik-cx-proxy.vercel.app
  • JavaScript 68.8%
  • HTML 30.4%
  • Dockerfile 0.8%
Find a file
2026-02-25 14:45:29 +00:00
.github/workflows Add docker 2026-02-08 21:49:43 +01:00
html cleaned and perfection 2026-02-04 02:08:01 +05:30
.env.example finalised GG 2026-02-04 11:32:28 +05:30
.gitignore finalised GG 2026-02-04 11:32:28 +05:30
bun.lock subs and thumbnails support 2026-02-25 14:45:29 +00:00
config.js added cloudscraper 2026-02-04 11:59:42 +05:30
docker-compose.yml Add docker 2026-02-08 21:49:43 +01:00
Dockerfile Add docker 2026-02-08 21:49:43 +01:00
index.js subs and thumbnails support 2026-02-25 14:45:29 +00:00
package-lock.json added cloudscraper 2026-02-04 11:59:42 +05:30
package.json added cloudscraper 2026-02-04 11:59:42 +05:30
README.md finalised GG 2026-02-04 11:32:28 +05:30
vercel.json finalised GG 2026-02-04 11:32:28 +05:30

AnimePahe M3U8 Proxy

A simple Express-based proxy server designed to handle M3U8 playlists and segment requests, managing necessary headers (Referer, Origin, User-Agent) to bypass restrictions.

Features

  • Proxies M3U8 playlists and rewrites internal segment/playlist URLs to route through the proxy.
  • Handles CORS and custom headers.
  • Includes a playground for testing URLs.

Installation

  1. Clone the repository.
  2. Install dependencies:
    npm install
    

Usage

Start the server:

npm start

The server listens on port 3000 by default (configurable via PORT environment variable or config.js).

Environment Variables

You can configure the server using a .env file. Copy .env.example to .env and adjust the values:

  • PORT: The port the server should listen on (default: 3000).
  • ALLOWED_ORIGINS: Comma-separated list of allowed origins for CORS (e.g., http://localhost:3000,https://your-domain.com). If not set, it defaults to allowing all origins (depending on your specific implementation in config.js, currently defaults to empty array which usually implies specific handling or open access depending on middleware logic).

Endpoints

GET /

Opens the testing playground.

GET /m3u8-proxy

Proxies a specific URL.

Query Parameters:

  • url: The absolute URL of the M3U8 file or segment to proxy.
  • headers (optional): JSON-encoded object of additional headers to send to the upstream server.

Example:

http://localhost:3000/m3u8-proxy?url=https://example.com/video.m3u8

Configuration

Configuration is handled in config.js. You can modify:

  • PORT: Server port.
  • DEFAULT_REFERER: Default referer header sent upstream.
  • FORWARD_HEADERS: Headers to forward from the client request.