Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Youtube reverse_proxy nginx #16014

Closed
ghost opened this issue Mar 28, 2018 · 2 comments
Closed

Youtube reverse_proxy nginx #16014

ghost opened this issue Mar 28, 2018 · 2 comments

Comments

@ghost
Copy link

@ghost ghost commented Mar 28, 2018

After i get the direct link with

youtube-dl -v https://www.youtube.com/watch?v=pptgMvp9uf8

And i maked a nginx reverse proxy with this configuration:

  location /youtube/{
    proxy_pass https://r3---sn-bungvh5op5-vu2e.googlevideo.com/videoplayback?sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpcm2cms%2Cpl%2Crequiressl%2Csource%2Cexpire&fvip=1&mime=video%2Fmp4&pcm2cms=yes&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278&lmt=1521800310735142&keepalive=yes&dur=202.200&ip=178.156.230.108&key=yt6&itag=137&clen=39808074&id=o-AEFumaWRRmO49AFa8BcvlOCF0NvI8SIgaDRTrn8iQxBN&mn=sn-bungvh5op5-vu2e%2Csn-4g5ednsd&mm=31%2C29&ipbits=0&requiressl=yes&expire=1522268061&mv=u&mt=1522246173&ms=au%2Crdu&ei=PaO7WobqI42P1wLl57zIDg&pl=23&source=youtube&gir=yes&c=WEB&signature=59665F8008AEB5B6D03D2E311794FC10F674B884.C7AAC671531EC405A898E4ED9279F4485189AA85&ratebypass=yes;
    proxy_set_header Connection '';
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_buffering on;
    proxy_connect_timeout 75;
    proxy_send_timeout 180;
    proxy_read_timeout 1200;
    keepalive_timeout 120;
    proxy_buffer_size 128k;
    proxy_buffers 4 256k;
    proxy_busy_buffers_size 256k;
  }

I get

This page isn’t working If the problem continues, contact the site owner. HTTP ERROR 400

I understand, this links expire at some time, but in browser (chrome) work. What is the problem?If is about cookie, i understand, but i guess not, because the icognito was empty and still work with link. Thank u.

@dstftw dstftw closed this Mar 28, 2018
@ghost
Copy link
Author

@ghost ghost commented Mar 28, 2018

Thank u, but i used from vps, and after from my pc without any cookie, and ip from vps, and my machine, obviously is different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.