iv-org / invidious

Invidious is an alternative front-end to YouTube
https://invidious.io
GNU Affero General Public License v3.0
16.42k stars 1.85k forks source link

[Feature request] Limit proxy to registered users #3380

Closed Slips-PC closed 2 weeks ago

Slips-PC commented 2 years ago

Is your feature request related to a problem? Please describe. I like having proxying enabled on my instance but the data usage that comes from allowing anyone to proxy videos easily passes the bandwidth cap set on my VPS.

Describe the solution you'd like Having a setting that allows only registered users to proxy videos through the instance. Describe alternatives you've considered The obvious alternative is just to keep proxying disabled, but I'd rather not do that.

Additional context N/A

unixfox commented 2 years ago

The issue is that proxying is necessary for some videos that require to be loaded from the same IP that generated them.

Not allowing the ability to proxy means that a big amount of videos won't be able to load on your instance.

Do note that by default proxying is not enabled so you shouldn't get that much bandwidth usage because only the necessary videos will get through the proxy.

Moreover you can't use DASH without proxying (1080p and more video quality) so essentially your instance would be very limited in its primary functionalities.

In order to solve your issue you should get a server that either have unlimited bandwidth or a very high bandwidth cap.

Slips-PC commented 2 years ago

Not allowing the ability to proxy means that a big amount of videos won't be able to load on your instance.

This is just what I've seen but from my experience it almost feels like the opposite, some videos (especially YTMusic ones) just straight up wouldn't load via proxy.

Do note that by default proxying is not enabled so you shouldn't get that much bandwidth usage because only the necessary videos will get through the proxy.

"necessary" meaning what?

In order to solve your issue you should get a server that either have unlimited bandwidth or a very high bandwidth cap.

Unfortunately not a feasible option for me, would require that i entirely change providers since to my knowledge Hetzner doesn't grant bandwidth caps beyond 20TB.

fehho commented 1 year ago

Is anyone working on this? If not then I'll take a stab at it.

unixfox commented 1 year ago

Not allowing the ability to proxy means that a big amount of videos won't be able to load on your instance.

This is just what I've seen but from my experience it almost feels like the opposite, some videos (especially YTMusic ones) just straight up wouldn't load via proxy.

That's not true, protected/encrypted videos like music videos won't load without proxying.

Do note that by default proxying is not enabled so you shouldn't get that much bandwidth usage because only the necessary videos will get through the proxy.

"necessary" meaning what?

Only the videos that can't be loaded directly from Google servers and need to be proxied. Videos with DASH need to be proxied too.

In order to solve your issue you should get a server that either have unlimited bandwidth or a very high bandwidth cap.

Unfortunately not a feasible option for me, would require that i entirely change providers since to my knowledge Hetzner doesn't grant bandwidth caps beyond 20TB.

Well if you are running a big instance, you have to take into account that video streaming consumes a lot of bandwidth, and you wouldn't want to degrade the user experience of your users by removing the ability to use DASH or play protected content like music videos.


Is anyone working on this? If not then I'll take a stab at it.

Nobody is working on it, mainly because I find it odd to implement this kind of new functionality when proxying is necessary for watching some videos.

fehho commented 1 year ago

Nobody is working on it, mainly because I find it odd to implement this kind of new functionality when proxying is necessary for watching some videos.

My instance is currently running with proxy_disabled: true in the config, so it would be useful for me personally at least :)

unixfox commented 2 weeks ago

Closing as we will now move to DASH which requires proxy: https://github.com/iv-org/invidious/issues/4847