This commit is contained in:
Simon
2026-05-13 08:24:04 +00:00
committed by ForgeCode
parent 00f693ee9b
commit bf11d4e866
7 changed files with 666 additions and 5 deletions

View File

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