michaljanocko / pancors

📡 Fast CORS-anywhere proxy
MIT License
36 stars 14 forks source link

Can it be used to run the m3u8 protected by nginx valid_referers #4

Closed v-7-3 closed 3 years ago

v-7-3 commented 3 years ago

Can it be used to run the m3u8 protected by nginx valid_referers pleas help

michaljanocko commented 3 years ago

It should work if we are talking about just downloading the .m3u8 file (which happens over HTTP[S]). However, if it is protected by checking the Referer header, then there is nothing you can do now. We could technically add the referer header as one of the parameters. Also, if you want to stream the video through PanCORS—that is currently not possible. PanCORS is only an HTTP proxy so streaming is possible only through HTTP. Could you elaborate more on what your intentions are?

I'm not very experienced with streaming video, so correct me if I'm wrong on any of this.

v-7-3 commented 3 years ago

Look, I just want to fake a header nginx say The ngx_http_referer_module module is used to block access to a site for requests with invalid values in the “Referer” header field. It should be kept in mind that fabricating a request with an appropriate “Referer” field value is quite easy, and so the intended purpose of this module is not to block such requests thoroughly but to block the mass flow of requests sent by regular browsers. It should also be taken into consideration that regular browsers may not send the “Referer” field even for valid requests.

v-7-3 commented 3 years ago

Because I want to embed content protected by valid_referers

michaljanocko commented 3 years ago

OK, I hoped it would be this as I don't know much about video streaming. I'm gonna add this as a feature for you.

v-7-3 commented 3 years ago

Well thank you very much Broo and Sorry for the inconvenience

v-7-3 commented 3 years ago

Where do I put Referer for example google.com

michaljanocko commented 3 years ago

Well, I still haven't written the tests for this but on this branch, you should be able to do just pancors.url/?url=your_url&referer=your_referer.

michaljanocko commented 3 years ago

Alright, done! Enjoy and good luck on whatever you're working on!