mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-05-31 14:11:54 +05:30 
			
		
		
		
	Sample proxies to avoid overloading single proxy
This commit is contained in:
		| @@ -30,7 +30,7 @@ def make_client(url, proxies = {} of String => Array({ip: String, port: Int32}), | |||||||
|   client.connect_timeout = 10.seconds |   client.connect_timeout = 10.seconds | ||||||
|  |  | ||||||
|   if region |   if region | ||||||
|     proxies[region]?.try &.each do |proxy| |     proxies[region]?.try &.sample(40).each do |proxy| | ||||||
|       begin |       begin | ||||||
|         proxy = HTTPProxy.new(proxy_host: proxy[:ip], proxy_port: proxy[:port]) |         proxy = HTTPProxy.new(proxy_host: proxy[:ip], proxy_port: proxy[:port]) | ||||||
|         client.set_proxy(proxy) |         client.set_proxy(proxy) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user