archivebate fix

This commit is contained in:
Simon
2026-04-22 10:18:15 +00:00
parent 47631b8a70
commit a47a69962f
4 changed files with 474 additions and 37 deletions

View File

@@ -1,5 +1,6 @@
use ntex::web::{self, HttpRequest};
use crate::proxies::archivebate::ArchivebateProxy;
use crate::proxies::doodstream::DoodstreamProxy;
use crate::proxies::heavyfetish::HeavyfetishProxy;
use crate::proxies::hqporner::HqpornerProxy;
@@ -16,6 +17,11 @@ use crate::util::requester::Requester;
pub fn config(cfg: &mut web::ServiceConfig) {
cfg.service(
web::resource("/archivebate/{endpoint}*")
.route(web::post().to(proxy2redirect))
.route(web::get().to(proxy2redirect)),
)
.service(
web::resource("/doodstream/{endpoint}*")
.route(web::post().to(proxy2redirect))
.route(web::get().to(proxy2redirect)),
@@ -124,6 +130,7 @@ async fn proxy2redirect(
fn get_proxy(proxy: &str) -> Option<AnyProxy> {
match proxy {
"archivebate" => Some(AnyProxy::Archivebate(ArchivebateProxy::new())),
"doodstream" => Some(AnyProxy::Doodstream(DoodstreamProxy::new())),
"sxyprn" => Some(AnyProxy::Sxyprn(SxyprnProxy::new())),
"javtiful" => Some(AnyProxy::Javtiful(JavtifulProxy::new())),