GithubHelp home page GithubHelp logo

239144498 / proxyurl Goto Github PK

View Code? Open in Web Editor NEW
49.0 2.0 21.0 9.84 MB

ProxyURL是一个从Streaming-Media-Server-Pro项目中抽离出的流媒体代理程序。程序新增缓存功能,多人同时观看效果更流畅。 理论支持代理任意频道,代理后可解决频道卡顿问题、网页播放的跨域问题、封锁地区问题等等。更多使用方式等你去发现。

Home Page: https://proxy.naihe.me/docs

Python 100.00%

proxyurl's Introduction

  • 程序使用教程已发布在微信公众号【pqhero】回复【使用教程】,可打开微信访问:https://0a.fit/obLUQ,或者扫码查看

qrcode.png

程序介绍

🚨如需使用私有服务器运行本项目,请参考部署方式部署教程

ProxyURL是一个从 Streaming-Media-Server-Pro 项目中抽离出的流媒体代理程序。程序新增缓存功能,多人同时观看效果更流畅。 理论支持代理任意频道,代理后可解决频道卡顿问题、网页播放的跨域问题、封锁地区问题等等。更多使用方式等你去发现。

代理接口演示

Click to view
loading...

演示站点: 我很脆弱...请勿压测(·•᷄ࡇ•᷅ )

API Document: https://proxy.naihe.me/docs 为防止滥用,本接口已经加入了鉴权机制。
未来将添加代理4k频道接口

程序功能

  • 代理任意电视频道的视频流
  • 代理缓存播放
  • 代理生成m3u文件
  • 代理生成m3u8文件
  • 异步下载流
  • 流媒体转发
  • 支持短回放
  • 自定义频道列表

支持代理的链接格式

💡提示:包含但不仅限于以下例子,如果遇到链接解析失败请开启一个新 issue

程序有检测url链接格式功能,一般m3u8链接分为以下两种:

  • 含有域名链接的数据
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:1668994593
#EXTINF:10.0,5290508
http://117.169.xxx.xxx:8080/wh7f454c46tw3004853380_1728812826/live/cctv-4/HD-4000k-1080P-cctv4_20230117_205041_205051.ts
#EXTINF:10.0,5306864
http://117.169.xxx.xxx:8080/wh7f454c46tw3004853380_1728812826/live/cctv-4/HD-4000k-1080P-cctv4_20230117_205051_205101.ts
#EXTINF:10.0,5271708
http://117.169.xxx.xxx:8080/wh7f454c46tw3004853380_1728812826/live/cctv-4/HD-4000k-1080P-cctv4_20230117_205101_205111.ts
...
...
  • 无域名链接的数据
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:167395846
#EXT-X-TARGETDURATION:10
#EXTINF:10.200,
/cntv20210928/cctvwbnd/cctv1_2_md/167395846.ts?region=beijing
#EXTINF:9.800,
/cntv20210928/cctvwbnd/cctv1_2_md/167395847.ts?region=beijing
#EXTINF:10.200,
/cntv20210928/cctvwbnd/cctv1_2_md/167395848.ts?region=beijing
#EXTINF:9.800,
/cntv20210928/cctvwbnd/cctv1_2_md/167395849.ts?region=beijing

这两种格式已涵盖市面上大部分m3u8链接。

Python部署(Linux)

💡提示:最好将本项目部署至美国地区的服务器,否则可能会出现奇怪的BUG。

推荐大家使用Digitalocean的服务器,主要是因为免费

DigitalOcean Referral Badge

使用我的邀请链接注册,你可以获得$200的credit,当你在上面消费$25时,我也可以获得$25的奖励。

我的邀请链接:

https://m.do.co/c/45e25f5e4569

根据以下通用命令部署本项目

clone仓库

python版本>=3.8+

git clone https://github.com/239144498/ProxyURL.git

安装依赖

pip install -r requirements.txt

运行

python3 main.py

项目使用教程

关注公众号【pqhero】查看程序使用详情
qrcode.png

支持频道

  • 在channel.m3u文件添加代理频道

License

GNU-3.0 © naihe

proxyurl's People

Contributors

239144498 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

proxyurl's Issues

HTTP/1.1" 307 Temporary Redirect

播放器:VLC
program.m3u
http://192.168.3.33:8080/program.m3u

播放会停顿
SSH后台出现:
192.168.3.9:14773 - "GET /file.ts/?x=aHR0cDovLzM5LjEzNC4yNC4xNjIvZGJpcHR2LnNuLmNoaW5hbW9iaWxlLmNvbS9QTFRWLzg4ODg4ODkwLzIyNC8zMjIxMjI1ODA0LzE2ODg0NjE2OTItMS0xNjY1MDg4ODU2Lmhscy50cw== HTTP/1.1" 307 Temporary Redirect

测试:
config.ini
[default]
defaultdb = mysql
port = 8080
localhost =
vbuffer = 3
active_mode = True

[advanced]
host1 =
host2 =
tvglogo =
debug = False

[mysql]
host = 127.0.0.1
user = root
password = Rock666!
port = 3306
database = media

[redis]
host = 127.0.0.1
port = 6379
password = m8a

#EXTM3U

代理频道URL示例,请自行替换

#EXTINF:-1,tvg-id="CCTV1" tvg-name="CCTV1" tvg-logo="https://epg.112114.xyz/logo/CCTV1.png" group-title="央视",CCTV1
/proxy.m3u8?url=http://39.134.24.162/dbiptv.sn.chinamobile.com/PLTV/88888890/224/3221225804/1.m3u8
#EXTINF:-1,卢村远眺
/proxy.m3u8?url=https://gccncc.xxxx.com/gc/yxlcyt_1/index.m3u8?contentid=2820180516001
#EXTINF:-1,九寨沟
/proxy.m3u8?url=https://gctxyc.xxxx.com/gc/wygjt1_1/index.m3u8?contentid=2820180516001
#EXTINF:-1,熊大熊二
/proxy.m3u8?url=https://newcntv.xxxx.com:8080/asp/hls/1200/0303000a/3/default/1733da751de64e6e910abda889d87a26/1200.m3u8

运行python3 main.py出现错误

运行python3 main.py后出现以下错误

root@debian-s-1vcpu-512mb-10gb-sgp1-01:~/ProxyURL# python3 main.py
Traceback (most recent call last):
File "/root/ProxyURL/main.py", line 7, in
from app.api import *
File "/root/ProxyURL/app/api/init.py", line 15, in
from app.conf import *
File "/root/ProxyURL/app/conf/init.py", line 1, in
from .config import *
File "/root/ProxyURL/app/conf/config.py", line 13, in
class Config(BaseSettings):
NameError: name 'BaseSettings' is not defined

摄像头支持

摄像头是tp的,只有rtsp源,请问一下,咱们这个支持吗?
谢谢

请求

可以播放单播源rtsp吗

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.