javtiful proxy

This commit is contained in:
Simon
2026-01-07 14:24:18 +00:00
parent 6fac9d6d45
commit cf04441a69
4 changed files with 79 additions and 39 deletions

View File

@@ -4,10 +4,12 @@ use crate::{proxies::sxyprn::SxyprnProxy, util::requester::Requester};
pub mod sxyprn;
pub mod hanimecdn;
pub mod javtiful;
#[derive(Debug, Clone)]
pub enum AnyProxy {
Sxyprn(SxyprnProxy),
Javtiful(javtiful::JavtifulProxy),
}
pub trait Proxy {
@@ -26,12 +28,8 @@ impl Proxy for AnyProxy {
requester: web::types::State<Requester>,
) -> String {
match self {
AnyProxy::Sxyprn(p) => {
p.get_video_url(
url,
requester,
).await
}
AnyProxy::Sxyprn(p) => p.get_video_url(url, requester).await,
AnyProxy::Javtiful(p) => p.get_video_url(url, requester).await,
}
}
}