Closed Nomanali3468 closed 1 year ago
manifest URL?
I just did a fresh install and quick test (of CBS News).. and everything appears to be working perfectly. Have you used this proxy before? Are you familiar with how to use it? tldr;
url > https://video.gslb.startimestv.com/live_record_g/STAR_LIFE_1494_500_480x360_v1_FMP4/playlist.m3u8 yes sir i knows basic but not much familiar
HTTP response code from origin server: 403
Forbidden
so your manifest is (in some way) protected.. by either: a Referer header, Cookie session, etc..
you can play around with curl
.. and once you find the request necessary to get a 200
OK response.. then replicate it by the proxy.
HTTP response code from origin server:
403
Forbiddenso your manifest is (in some way) protected.. by either: a Referer header, Cookie session, etc..
yeah sir but i have added the request headers according to your docs and even i have tried the samething with streamlink and its playing without any issues
you can play around with
curl
.. and once you find the request necessary to get a200
OK response.. then replicate it by the proxy.
with curl i can get 200 response and i knows there is cookies which is necessary with the m3u8 when i need to play and i have done with cookies header but when i tried on proxy nothing works
without sharing your session cookie.. how are you configuring the proxy to use it? ..which option, what format, etc
the most basic way to do so is:
hlsd --header "Cookie: xxxx"
without sharing your session cookie.. how are you configuring the proxy to use it? ..which option, what format, etc
here is my requested method npm start --host "192.168.8.100" --port "8080" --origin "https://webtv.startimestv.com" --referer "https://webtv.startimestv.com/" --headers "_ga=GA1.1.1845618781.1670246406; CloudFront-Key-Pair-Id=APKAIPKYIDIQPHMZ2WKA; _ga_4D3XLF682K=GS1.1.1670673103.6.0.1670673103.0.0.0; CloudFront-Signature=YFfPLQddyrsuwVFBQqZ6ZsKTRbVuuVLBLntxktOMhoEq0wCPJkW5GOs82TOYuwb4A1Qaqj5bVhIe-MgsCqtpk0nLxz8ez~1fR6wHBZcbRHJcI2qAdI8uGgyMZ7vmNIzMUgB-gleuJrJ0lAbNz~RX7UeSIc1hB0y62jsMXnEecw4Y6GFmwgJqhpK-SiLl~R7GsutLtdah2ZiTzoJoYsDIxSf~jKkqpytIADTHBMZ156veW5rtXoY5IS5UpmEApquWUkn8NEGDPgalE3sfjq-0xoje~hGl~YVC42juRUw3kI3N3~1IFuPlwRVIBoRR-VNPnTvIQwEPozP0Btq0nvAqsQ__; CloudFront-Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHA6Ly8qLnN0YXJ0aW1lc3R2LmNvbS9saXZlX3JlY29yKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY3MDY4MDM3OX19fV19 "--useragent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
--headers
isn't a valid cli option.
--header
takes a single inline value (ie: "name: value").
--req-headers
takes a filepath to a JSON file.
--headers
takes a filepath to a JSON file
i think here im wrong ok sir let me try again and what we can do if the cookies will expire after 20 mintues
PS: after you've configured the proxy.. to test that your requests are sending the desired request headers.. you can proxy a request to httpbin.org/headers by requesting this link directly in your browser and directly inspect the headers
PS: after you've configured the proxy.. to test that your requests are sending the desired request headers.. you can proxy a request to httpbin.org/headers by requesting this link directly in your browser and directly inspect the headers
ok sir
PS: after you've configured the proxy.. to test that your requests are sending the desired request headers.. you can proxy a request to httpbin.org/headers by requesting this link directly in your browser and directly inspect the headers
im getting this sir { "headers": { "Accept-Encoding": "identity, gzip, deflate, br", "Host": "httpbin.org", "X-Amzn-Trace-Id": "Root=1-6394a885-6f0dafa87eae70763095e650" } }
PS: after you've configured the proxy.. to test that your requests are sending the desired request headers.. you can proxy a request to httpbin.org/headers by requesting this link directly in your browser and directly inspect the headers
thanks for ur help sir finally i have done with cookies header but now im getting another issue which i have already described in my 1st post
PS: after you've configured the proxy.. to test that your requests are sending the desired request headers.. you can proxy a request to httpbin.org/headers by requesting this link directly in your browser and directly inspect the headers
now i can see something like that and when i opened in browser but when i tried to play its played and stopped immidiatley
666654.m4s
666655.m4s
666656.m4s
666657.m4s
666658.m4s
666659.m4s
666660.m4s
666661.m4s
666662.m4s
666663.m4s
well, it seems that the server is behaving as expected.. and video host-specific configuration is the issue.. which is an exercise for the user to get right.
also, of course, to play the proxied stream in a video player that supports its format. I'm not sure if Clappr supports "m4s" video segments.. but you could just test the stream in VLC (or similar).
good luck.
oh.. I just noticed an issue that would cause a problem for you.
A manifest that uses fragmented mp4 segments (as your does) needs to use: #EXT-X-MAP:
..
and my recent rewrite (somehow) forgot to include support for this tag.
I'll quickly push an update.. in the next few minutes;
that might be the reason your video only played for a few seconds and then quit (..but not certain).
update:
v3.1.1
is pushed to npm.. you'll need to reinstall.. but this new version is needed for your manifest; sorry about that.test:
oh.. I just noticed an issue that would cause a problem for you.
A manifest that uses fragmented mp4 segments (as your does) needs to use:
#EXT-X-MAP:
.. and my recent rewrite (somehow) forgot to include support for this tag. I'll quickly push an update.. in the next few minutes; that might be the reason your video only played for a few seconds and then quit (..but not certain).update:
v3.1.1
is pushed to npm.. you'll need to reinstall.. but this new version is needed for your manifest; sorry about that.test:
fragmented mp4 hls test page
- manifest
- proxied manifest
- proxied manifest in Clappr player.. works perfectly
thanks u very much sir and god bless u for making things easier for us
did the new version have an effect on your ability to proxy the manifest that you've been testing? ..any change?
did the new version have an effect on your ability to proxy the manifest that you've been testing? ..any change?
i just reinstalled still testing
did the new version have an effect on your ability to proxy the manifest that you've been testing? ..any change?
i will update you when its work
did the new version have an effect on your ability to proxy the manifest that you've been testing? ..any change?
Yes sir finally you did it Its working Now
glad to hear it..
that was completely my mistake. thank you for reporting your issue.. so we were able to track down my error.
did the new version have an effect on your ability to proxy the manifest that you've been testing? ..any change?
glad to hear it..
that was completely my mistake. thank you for reporting your issue.. so we were able to track down my error.
yeah sir what about Cookies updating is there a way to do that with javascript
hmm.. that's another matter entirely.
if the server issues cookies that expire after a short period of time that the cookie has been inactive, then (off the top of my head) some options might include:
{"add_request_headers": (url, is_m3u8) => ({"Cookie": "xxx"})}
hmm.. that's another matter entirely.
if the server issues cookies that expire after a short period of time that the cookie has been inactive, then (off the top of my head) some options might include:
- write a script that loops.. waiting a specific period of time between iterations (ex: 10 minutes).. and within each iteration it makes an HTTP request to the keep the existing cookie alive
- if the server changes the value of its cookie during each iteration, then you'd need to run hls-proxy with a hook function that is able to get the current value of your cookie from a method of storage that can be shared by both the proxy and your script (ex: a database, or even just a text file)
ok sir thnx idea i will try do something like that hope i can do that i will update you once i done that
no need for an update.. but good luck
and thanks again for the bug report.
I gave your question (about cookies) a little more thought.
The HTTP client library that the proxy uses does support using a cookie jar object, though the proxy itself doesn't utilize that feature.
I was thinking of adding a new hook method:
module.exports = {
request_intervals: (add_request_interval) => {
add_request_interval(
0, // run timer once at startup to initialize cookies
(request) => {
request('https://example.com/login', {username: 'me', password: '12345'})
}
)
add_request_interval(
(1000 * 60 * 5), // run timer at 5 minute interval to refresh cookies
(request) => {
request('https://example.com/heart-beat')
}
)
}
}
If the proxy is started without the hook request_intervals
defined, then no change.
However, if it is defined, then:
request
function
update: v3.2.0
was just pushed to npm with the new hook that I described (above). I did a few quick tests, and it works well.
update:
v3.2.0
was just pushed to npm with the new hook that I described (above). I did a few quick tests, and it works well.
i will try thnx for adding this feature
hi sir hope u are will be fine im getting this issue i cant figure out how to solve This page isn’t working 192.168.8.100 is currently unable to handle this request. HTTP ERROR 500
and on the second site i am getting when i opened in browser
EXTM3U
EXT-X-VERSION:3
EXT-X-MEDIA-SEQUENCE:770769428
EXT-X-TARGETDURATION:4
EXTINF:4.000, no desc
dad0-1313565080_MDL_ap-singapore_634E5F8E000072F08E6D-p0_tmpl360p_360p-1670677956020.ts?utc=1670677956020&pts=371141281800&txl=1670677958764
EXTINF:4.000, no desc
dad0-1313565080_MDL_ap-singapore_634E5F8E000072F08E6D-p0_tmpl360p_360p-1670677960020.ts?utc=1670677960020&pts=371141641800&txl=1670677962813
EXTINF:4.000, no desc
dad0-1313565080_MDL_ap-singapore_634E5F8E000072F08E6D-p0_tmpl360p_360p-1670677964020.ts?utc=1670677964020&pts=371142001800&txl=1670677966848
EXTINF:4.000, no desc
dad0-1313565080_MDL_ap-singapore_634E5F8E000072F08E6D-p0_tmpl360p_360p-1670677968020.ts?utc=1670677968020&pts=371142361800&txl=1670677970844
EXTINF:4.000, no desc
dad0-1313565080_MDL_ap-singapore_634E5F8E000072F08E6D-p0_tmpl360p_360p-1670677972020.ts?utc=1670677972020&pts=371142721800&txl=1670677974847
when i tried to play its play and stopped immediately
Can you please take a look on my issue