-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add ability to add proxy domains via ENV #3658
Conversation
When using an external proxy URL, it would be better to redirect |
I'm not sure what do you exactly mean by that, but http3-ytproxy or piped-proxy have obviously no logic for |
Well once invidious will have redis support I think compiling invidious in API only will become a viable solution for running proxies. Or one can also run alternatives software of Invidious that support the same endpoints like:
Technically with this PR someone has the choice of running what they want. Like @SamantazFox said, I would also like to have as a feature the redirection to another domain for the endpoints |
Okay kinda get it, well then the discussion on matrix was useless but sure will do that. |
@11Tuvork28 What do you think of the following? Mode 1 - default, use invidious' integrated proxy (current situation) video_proxy:
redirect_mode: local
# domains: <HOST_URL> Mode 2 - redirects only the video_proxy:
redirect_mode: partial
domains:
- a.example.com
- b.example.com Mode 3 - redirects all video endpoints (implies that the proxy server supports video_proxy:
redirect_mode: full
domains:
- a.example.com
- b.example.com As an alternative: media_proxy:
# Redirect for `/videoplayback`, and possibly `/latest_version` and `/api/manifest/*`
external_video_proxy: # enabled/disabled
video_proxy_mode: # like above
video_proxy_domains:
- a.example.com
# Redirect for `/vi/*`, `/vi_webp/*`, `/sb/*`, `/ggpht/*`, `/s_p/*` and `/yts/img/*`
external_image_proxy: # enabled/disabled
image_proxy_domains:
- b.example.com |
I don't think there is a point for maintaining two kinds of redirect because you need to serve the content from the same IP address that generated the request to youtube servers. People who will use this functionality will want to serve a working experience to their users, so it doesn't make sense to redirect to the incorrect proxy resulting in a playback error. |
@SamantazFox media_proxy:
# Redirect for `/videoplayback`, and possibly `/latest_version` and `/api/manifest/*`
external_video_proxy:
enabled: true/false
proxy_mode: # like above
proxy_domains:
- a.example.com
# Redirect for `/vi/*`, `/vi_webp/*`, `/sb/*`, `/ggpht/*`, `/s_p/*` and `/yts/img/*`
external_image_proxy:
enabled: true/false
append_host_to_uri: true/false
image_proxy_domains:
- b.example.com
Reason behind this is that the file structure is clearer in my opinion and @unixfox No you don't, my instance produces requests from one of those IP's:
While the proxy server is on |
Yes you need to serve it from the same IP, it's for encrypted videos (music videos and more) like this one: https://www.youtube.com/watch?v=pRpeEdMmmQ0. Related: #2850 |
I get that(Have read the issue before) and I tried this and a few others I found in ytdl issues. They all work fine what can I say? In any case I still see the |
Imo, both redirect options make sense. I see the following use cases:
Ah, sure, of course, it was only a quick draft. I definitely prefers your solution! Edit: maybe some simple host rewrite rules, rather than
|
Why would you want to do that? HTTP3 is literally useful for high latency connections between a client and a server. That doesn't make any sense here.
In this configuration you can always have a reverse proxy that serve the requests for the endpoints Anyway, off to my real suggestion: I would very much prefer, as a first batch, to keep this functionality very simple, simple redirect for both endpoints This way we can provide a functionality that for the moment suit everyone and because it will be "simple" to code we can ship this functionality in the coming weeks. |
This pull request has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely abandoned or outdated. If you think this pull request is still relevant and applicable, you just have to post a comment and it will be unmarked. |
This pull request has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely abandoned or outdated. If you think this pull request is still relevant and applicable, you just have to post a comment and it will be unmarked. |
FYI: Not sure when if or when I will come around to actually implement it. |
This pull request has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely abandoned or outdated. If you think this pull request is still relevant and applicable, you just have to post a comment and it will be unmarked. |
This PR adds the ability to add a list of proxy domains used for proxying videos, the domain is randomly chosen. If no domains are configured the
HOST_URL
is used.The domains can be configured using in either the config.yaml or ENV
proxy_domains: ["..","...",".."]
Also this implementation assumes https to be available on the proxy domains.