GithubHelp home page GithubHelp logo

eltik / m3u8-proxy Goto Github PK

View Code? Open in Web Editor NEW
37.0 37.0 41.0 239 KB

Proxy m3u8 files through pure JavaScript.

Home Page: https://m3u8-proxy-six.vercel.app

TypeScript 93.17% HTML 6.83%
cors javascript m3u8 proxy streaming typescript

m3u8-proxy's Introduction

M3U8-Proxy

Proxies m3u8 files through pure JavaScript.

About

Some m3u8 files require special headers as well as CORS. This project achieves both by integrating Rob Wu's CORS proxy and adding a route to proxy m3u8 files.

Installation

  1. Clone the repository.
git clone https://github.com/Eltik/M3U8-Proxy.git
  1. Run npm i.
  2. Run npm run build.
  3. Run npm start.

You can configure how the proxy works via a .env file; it's relatively self-explanatory.

# This file is a template for .env file
# Copy this file to .env and change the values

# Web server configuration
HOST="localhost"
PORT="3030"

# Public URL to proxy ts files from
PUBLIC_URL="https://m3u8.eltik.net"

Usage

To proxy m3u8 files, use the /m3u8-proxy route. All you have to do is input the URL and headers. For example:

http://localhost:3030/m3u8-proxy?url=https%3A%2F%2Fojkx.vizcloud.co%2Fsimple%2FEqPFJvsQWADtjDlGha7rC8UurFwHuLiwTk17rqk%2BwYMnU94US2El_Po4w12gXe6GptOSQtc%2Fbr%2Flist.m3u8%23.mp4&headers=%7B%22referer%22%3A%22https%3A%2F%2F9anime.pl%22%7D

The URL in this case is https://ojkx.vizcloud.co/simple/EqPFJvsQWADtjDlGha7rC8UurFwHuLiwTk17rqk+wYMnU94US2El_Po4w12gXe6GptOSQtc/br/list.m3u8#.mp4 and the headers are {"Referer": "https://9anime.pl"}. This will then send a request to the m3u8 using the headers, modify the content to use the ts proxy, then proxy each ts file using a CORS proxy. If you need help, please join my Discord.

Credit

Inspired by this repository. I received some help from chaycee as well. This project also uses code from this CORS proxy.

m3u8-proxy's People

Contributors

eltik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.