diff --git a/rsget_cli/Cargo.toml b/rsget_cli/Cargo.toml index 57cb80a..8022b32 100644 --- a/rsget_cli/Cargo.toml +++ b/rsget_cli/Cargo.toml @@ -16,10 +16,22 @@ tracing = "0.1" tracing-subscriber = "0.3.18" clap = { version = "4.4.11", features = ["derive"] } tokio = { version = "1", features = ["fs", "rt-multi-thread", "io-util", "io-std"] } -reqwest = "0.12" +reqwest = { version = "0.12", default-features = false} indicatif = "0.17.7" futures-util = "0.3.30" +[features] +# Default to rustls so we don't pull in openssl +default = ["rustls-tls"] +rustls-tls = [ + "reqwest/rustls-tls", + "reqwest/rustls-tls-webpki-roots", +] +native-tls = [ + "reqwest/native-tls", + "reqwest/rustls-tls-native-roots", +] + [[bin]] name = "rsget" path = "src/main.rs" diff --git a/rsget_lib/Cargo.toml b/rsget_lib/Cargo.toml index 40b41d5..28829fd 100644 --- a/rsget_lib/Cargo.toml +++ b/rsget_lib/Cargo.toml @@ -19,7 +19,7 @@ regex = "1.10" http = "0.2.11" chrono = "0.4" hls_m3u8 = "0.4" -reqwest = { version = "0.12", features = ["json"] } +reqwest = { version = "0.12", default-features = false, features = ["json"] } rand = { version ="0.8", features = ["small_rng"] } async-trait = "0.1" webbrowser = "0.8" @@ -29,3 +29,15 @@ default-features = false version = "0.5.0" path = "../stream_lib" features = [] + +[features] +# Default to rustls so we don't pull in openssl +default = ["rustls-tls"] +rustls-tls = [ + "reqwest/rustls-tls", + "reqwest/rustls-tls-webpki-roots", +] +native-tls = [ + "reqwest/native-tls", + "reqwest/rustls-tls-native-roots", +] diff --git a/rsget_lib/src/plugins/mod.rs b/rsget_lib/src/plugins/mod.rs index 6a2b84e..63c762f 100644 --- a/rsget_lib/src/plugins/mod.rs +++ b/rsget_lib/src/plugins/mod.rs @@ -1,13 +1,11 @@ mod afreeca; mod bilibili; mod dlive; -mod drdk; mod twitch; mod vlive; pub use afreeca::Afreeca; pub use bilibili::Bilibili; pub use dlive::DLive; -pub use drdk::Drdk; pub use twitch::Twitch; pub use vlive::Vlive; diff --git a/rsget_lib/src/utils/sites.rs b/rsget_lib/src/utils/sites.rs index 4aacb9f..c857123 100644 --- a/rsget_lib/src/utils/sites.rs +++ b/rsget_lib/src/utils/sites.rs @@ -4,8 +4,8 @@ use crate::plugins::{ mixer::Mixer, tiktok::TikTok, twitch::Twitch, vlive::Vlive, }; */ -use crate::plugins::{Afreeca, Bilibili, DLive, Drdk, Twitch, Vlive}; -//use crate::plugins::{Afreeca, Bilibili, DLive, Twitch, Vlive}; +use crate::plugins::{Afreeca, Bilibili, DLive, Twitch, Vlive}; +//use crate::plugins::{Afreeca, Bilibili, DLive, Drdk, Twitch, Vlive}; use crate::utils::error::RsgetError; use crate::utils::error::StreamError; use crate::utils::error::StreamResult; @@ -25,7 +25,7 @@ pub async fn get_site(input: &str) -> StreamResult> { } async fn _get_site(input: &str) -> StreamResult> { - let re_drdk: Regex = Regex::new(r"^(?:https?://)?(?:www\.)?dr\.dk/drtv/kanal/[a-zA-Z0-9-_]+")?; + //let re_drdk: Regex = Regex::new(r"^(?:https?://)?(?:www\.)?dr\.dk/drtv/kanal/[a-zA-Z0-9-_]+")?; let re_afreeca: Regex = Regex::new( r"^(?:https?://)?(?:www\.)?(?:play\.)?afreecatv.com/[a-zA-Z0-9]+/?(?:/[0-9]+)?", )?; @@ -45,7 +45,7 @@ async fn _get_site(input: &str) -> StreamResult> { url if re_afreeca.is_match(url) => Ok(Afreeca::new(String::from(url)).await?), url if re_bilibili.is_match(url) => Ok(Bilibili::new(String::from(url)).await?), url if re_dlive.is_match(url) => Ok(DLive::new(String::from(url)).await?), - url if re_drdk.is_match(url) => Ok(Drdk::new(String::from(url)).await?), + //url if re_drdk.is_match(url) => Ok(Drdk::new(String::from(url)).await?), url if re_twitch.is_match(url) => Ok(Twitch::new(String::from(url)).await?), url if re_vlive.is_match(url) => Ok(Vlive::new(String::from(url)).await?), /* diff --git a/stream_lib/Cargo.toml b/stream_lib/Cargo.toml index 1428c4c..8b5e164 100644 --- a/stream_lib/Cargo.toml +++ b/stream_lib/Cargo.toml @@ -11,18 +11,27 @@ repository = "https://github.com/Erk-/rsget/tree/master/stream_lib" [dependencies] hls_m3u8 = "0.4.1" -reqwest = { version = "0.12.5", features = ["stream"] } +reqwest = { version = "0.12", default-features = false, features = ["stream"] } tracing = "0.1.40" url = "2.5.0" futures-util = "0.3.30" -tokio = { version = "1.35.1", default-features = false, features = ["rt", "sync", "time"] } +tokio = { version = "1.38.0", default-features = false, features = ["rt", "sync", "time"] } patricia_tree = "0.8.0" futures-core = "0.3.30" bytes = "1.5.0" [dev-dependencies] tracing-subscriber = "0.3.18" -tokio = { version = "1.35.1", default-features = false, features = ["fs", "rt", "sync", "time", "macros"] } +tokio = { version = "1.38", default-features = false, features = ["fs", "rt", "sync", "time", "macros"] } [features] -default = [] +# Default to rustls so we don't pull in openssl +default = ["rustls-tls"] +rustls-tls = [ + "reqwest/rustls-tls", + "reqwest/rustls-tls-webpki-roots", +] +native-tls = [ + "reqwest/native-tls", + "reqwest/rustls-tls-native-roots", +] \ No newline at end of file