joshdick / miniProxy

🚨⚠️ UNMAINTAINED! ⚠️🚨 A simple PHP web proxy.
http://joshdick.github.io/miniProxy
GNU General Public License v3.0
858 stars 542 forks source link

How to put a whole m3u8 link inside the miniProxy.php? #145

Closed hijuuijj closed 4 years ago

hijuuijj commented 4 years ago

I can do something like this:

$url = substr($_SERVER["REQUEST_URI"], strlen($_SERVER["SCRIPT_NAME"]) + 1); $url = 'https://website.com/stream/'.$url;

It works by adding the second line to the "miniProxy.php" and by adding "playlist.m3u8" to the url (https://website.com/miniProxy.php/playlist.m3u8)

How to put the whole m3u8 link and open it directly from "https://website.com/stream/miniProxy.php"?

Thank you in advance.

joshdick commented 4 years ago

If I understand your question correctly, just comment out or delete the $url = substr($_SERVER["REQUEST_URI"], strlen($_SERVER["SCRIPT_NAME"]) + 1); line and replace it with $url = https://website.com/path/to/your/file.m3u; then, accessing https://website.com/stream/miniProxy.php will directly serve the contents of the m3u file.

hijuuijj commented 4 years ago

Hi Joshua,

I have tried what you said but it did't work.

I'm trying to play a .m3u8 stream with MiniProxy (using Chrome and Native HLS Playback: https://chrome.google.com/webstore/detail/native-hls-playback/emnphkkblegpebimobpbekeedfgemhof)

It works using: https://website.com/MiniProxy.php/https://cbsn-us-cedexis.cbsnstream.cbsnews.com/out/v1/55a8648e8f134e82a470f83d562deeca/master.m3u8

However it doesn't work (from Chrome or VLC) using: https://website.com/MiniProxy.php

Also I have added a rule in .htaccess in order to change the extension php to m3u8: RewriteRule ^MiniProxy.m3u8$ MiniProxy.php [L,NC]

... and using: https://website.com/MiniProxy.m3u8 (from Chrome/DevTools/Network) I get the errors (master_7.m3u8... master_9.m3u8... master_10.m3u8)

Any suggestion?

Thank you so much.

joshdick commented 4 years ago

Unfortunately, miniProxy wasn't really designed for this and I'm not sure what's causing the issue.