Welcome! Log In Create A New Profile

Advanced

proxy pass issue

March 30, 2017 07:35PM
hi dear,
pls help im really stuck.
heres my situation
theres a website when i copy as curl from chrome i got this:


curl 'https://cdn.livetvhd.net/proxy/http://38.99.146.36:7777/SpaceToonArabic_HD/SpaceToonArabic_High/19172.ts?user=sgls-1&session=3a39537463f8621b199d049b0a85a34ed7f4c88ee89d807565c7e1474bef956a2915608b768e296e2aa44bc17a7df0c3&hlsid=HTTP_ID_405343&group_id=-1&starttime=20170328T181346.532012&start_time=1490916595000&end_time=1490916602916' -H 'Cookie: __cfduid=dabb6eac3c61b6e397c76222aa609fc7f1490509096; _ga=GA1.2.522781785.1490509099; _gat=1' -H 'Accept-Encoding: gzip, deflate, sdch, br' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36' -H 'Accept: */*' -H 'Referer: https://livetvhd.net/video/jeunesse/space-toon-live-streaming-en-direct' -H 'X-Requested-With: ShockwaveFlash/25.0.0.127' -H 'Connection: keep-alive' --compressed

ps: the link expire after couple of sec.
so if i play it with ffplay or vlc directly like this :

ffplay "https://cdn.livetvhd.net/proxy/http://38.99.146.36:7777/SpaceToonArabic_HD/SpaceToonArabic_High/19172.ts?user=sgls-1&session=3a39537463f8621b199d049b0a85a34ed7f4c88ee89d807565c7e1474bef956a2915608b768e296e2aa44bc17a7df0c3&hlsid=HTTP_ID_405343&group_id=-1&starttime=20170328T181346.532012&start_time=1490916595000&end_time=1490916602916"

it doesnt work: Server returned 5XX Server Error reply


but if i pipe it to ffplay from curl, it works : heres an example:

curl 'https://cdn.livetvhd.net/proxy/http://38.99.146.36:7777/SpaceToonArabic_HD/SpaceToonArabic_High/19172.ts?user=sgls-1&session=3a39537463f8621b199d049b0a85a34ed7f4c88ee89d807565c7e1474bef956a2915608b768e296e2aa44bc17a7df0c3&hlsid=HTTP_ID_405343&group_id=-1&starttime=20170328T181346.532012&start_time=1490916595000&end_time=1490916602916' -H 'Cookie: __cfduid=dabb6eac3c61b6e397c76222aa609fc7f1490509096; _ga=GA1.2.522781785.1490509099; _gat=1' -H 'Accept-Encoding: gzip, deflate, sdch, br' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36' -H 'Accept: */*' -H 'Referer: https://livetvhd.net/video/jeunesse/space-toon-live-streaming-en-direct' -H 'X-Requested-With: ShockwaveFlash/25.0.0.127' -H 'Connection: keep-alive' --compressed | ffplay -

now i was trying to use proxy pass so i can achieve this:

http://localhost/cdn/SpaceToonArabic_HD/SpaceToonArabic_High/19172.ts?user=sgls-1&session=3a39537463f8621b199d049b0a85a34ed7f4c88ee89d807565c7e1474bef956a2915608b768e296e2aa44bc17a7df0c3&hlsid=HTTP_ID_405343&group_id=-1&starttime=20170328T181346.532012&start_time=1490916595000&end_time=1490916602916

but i got error : 404 Not Found

heres my config for proxy :

location /cdn {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For 163.172.151.160:443;
proxy_set_header "User-Agent" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36";
proxy_set_header X-Custom-Referrer "https://livetvhd.net/video/jeunesse/space-toon-live-streaming-en-direct";
proxy_set_header Host cdn.livetvhd.net;
add_header Pragma "no-cache";
proxy_pass_header Set-Cookie;
proxy_pass https://cdn.livetvhd.net/proxy/http://38.99.146.38:7777/;
proxy_cookie_domain 'livetvhd.net' 'cdn.livetvhd.net';
#add_header Access-Control-Allow-Headers: Authorization, Lang;
add_header Access-Control-Expose-Headers 'Server,range,Content-Length,Content-Range';
add_header Access-Control-Allow-Methods 'GET, POST, HEAD, DELETE';
add_header Access-Control-Allow-Origin '*';
proxy_ssl_session_reuse off;
proxy_redirect off;
}
Subject Author Posted

proxy pass issue

3achour March 30, 2017 07:35PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 96
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready