mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-11 23:28:31 +00:00
Remove lsquic.cr from Invidious
This commit is contained in:
parent
a12220ce80
commit
e5f9a28b8c
@ -16,10 +16,6 @@ shards:
|
||||
git: https://github.com/jeromegn/kilt.git
|
||||
version: 0.4.0
|
||||
|
||||
lsquic:
|
||||
git: https://github.com/iv-org/lsquic.cr.git
|
||||
version: 2.18.1-1
|
||||
|
||||
pg:
|
||||
git: https://github.com/will/crystal-pg.git
|
||||
version: 0.23.1
|
||||
|
@ -25,9 +25,6 @@ dependencies:
|
||||
protodec:
|
||||
github: iv-org/protodec
|
||||
version: ~> 0.1.3
|
||||
lsquic:
|
||||
github: iv-org/lsquic.cr
|
||||
version: ~> 2.18.1-1
|
||||
|
||||
crystal: 0.36.1
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
require "lsquic"
|
||||
require "pool/connection"
|
||||
|
||||
def add_yt_headers(request)
|
||||
@ -20,7 +19,7 @@ struct YoutubeConnectionPool
|
||||
property! url : URI
|
||||
property! capacity : Int32
|
||||
property! timeout : Float64
|
||||
property pool : ConnectionPool(QuicProxyWrapper | HTTP::Client | QUIC::Client)
|
||||
property pool : ConnectionPool(QuicProxyWrapper | HTTP::Client)
|
||||
|
||||
def initialize(url : URI, @capacity = 5, @timeout = 5.0, use_quic = true)
|
||||
@url = url
|
||||
@ -47,7 +46,7 @@ struct YoutubeConnectionPool
|
||||
end
|
||||
|
||||
private def build_pool(use_quic)
|
||||
ConnectionPool(QuicProxyWrapper | HTTP::Client | QUIC::Client).new(capacity: capacity, timeout: timeout) do
|
||||
ConnectionPool(QuicProxyWrapper | HTTP::Client).new(capacity: capacity, timeout: timeout) do
|
||||
if use_quic
|
||||
conn = QuicProxyWrapper.new(URI.parse("http://#{CONFIG.quic_proxy_address}:#{CONFIG.quic_proxy_port}"))
|
||||
else
|
||||
|
@ -51,7 +51,7 @@ class Invidious::Routes::Login < Invidious::Routes::BaseRoute
|
||||
|
||||
# See https://github.com/ytdl-org/youtube-dl/blob/2019.04.07/youtube_dl/extractor/youtube.py#L82
|
||||
begin
|
||||
client = QUIC::Client.new(LOGIN_URL)
|
||||
client = QuicProxyWrapper.new(LOGIN_URL)
|
||||
headers = HTTP::Headers.new
|
||||
|
||||
login_page = client.get("/ServiceLogin")
|
||||
|
Loading…
Reference in New Issue
Block a user