Skip to content

Invidious is an alternative front-end to YouTube

Add support for using Invidious through a HTTP Proxy (#4270)

Samantaz Foxf326bcf8db23
diff --cc src/invidious/yt_backend/connection_pool.cr
index ca612083,f34f48c5..70b15f26
--- a/src/invidious/yt_backend/connection_pool.cr
+++ b/src/invidious/yt_backend/connection_pool.cr
@@@ -24,8 -24,11 +24,11 @@@ struct YoutubeConnectionPoo
@pool = build_pool()
end
- def client(&block)
+ def client(&)
conn = pool.checkout
+ # Proxy needs to be reinstated every time we get a client from the pool
+ conn.proxy = make_configured_http_proxy_client() if CONFIG.http_proxy
+
begin
response = yield conn
rescue ex