From f37432a48c1f93cab5f7942f791daf7b27cb1565 Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Sat, 10 Aug 2024 14:12:39 +0200 Subject: [PATCH 1/3] fix: use native tls by default for CLI --- cli/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 6f68f47..c8196c1 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -11,7 +11,7 @@ categories.workspace = true description = "CLI for RustyPipe - download videos and extract data from YouTube / YouTube Music" [features] -default = ["rustls-tls-native-roots"] +default = ["native-tls"] # Reqwest TLS options native-tls = [ From da39c64f302bc2edc4214bbe25a0a9eb54063b09 Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Sat, 10 Aug 2024 16:26:43 +0200 Subject: [PATCH 2/3] fix: detect ip-ban error message --- cli/src/main.rs | 3 +-- src/client/player.rs | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index 9458e81..96e3925 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -519,8 +519,7 @@ impl std::io::Write for ProgWriter { #[tokio::main] async fn main() { if let Err(e) = run().await { - println!("{}", "Error:".red().bold()); - println!("{}", e); + println!("{} {}", "Error:".red().bold(), e); std::process::exit(1); } } diff --git a/src/client/player.rs b/src/client/player.rs index b78a15c..430d33c 100644 --- a/src/client/player.rs +++ b/src/client/player.rs @@ -221,6 +221,7 @@ impl MapResponse for response::Player { .find_map(|word| match word { "age" | "inappropriate" => Some(UnavailabilityReason::AgeRestricted), "private" => Some(UnavailabilityReason::Private), + "bot" => Some(UnavailabilityReason::IpBan), _ => None, }) .unwrap_or_default(); From eecc689ae030a895c9d5b8eba6526ff196d50781 Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Tue, 13 Aug 2024 03:42:31 +0200 Subject: [PATCH 3/3] ci: use warpproxy to circumvent ip-ban --- .forgejo/workflows/ci.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml index 11582b8..e10a348 100644 --- a/.forgejo/workflows/ci.yaml +++ b/.forgejo/workflows/ci.yaml @@ -7,6 +7,16 @@ on: jobs: Test: runs-on: cimaster-latest + services: + warpproxy: + image: thetadev256/warpproxy + env: + WARP_DEVICE_ID: ${{ secrets.WARP_DEVICE_ID }} + WARP_ACCESS_TOKEN: ${{ secrets.WARP_ACCESS_TOKEN }} + WARP_LICENSE_KEY: ${{ secrets.WARP_LICENSE_KEY }} + WARP_PRIVATE_KEY: ${{ secrets.WARP_PRIVATE_KEY }} + env: + ALL_PROXY: "http://warpproxy:8124" steps: - name: 📦 Checkout repository uses: actions/checkout@v4