Files
obscura/crates/obscura-net/src/interceptor.rs
T
2026-04-13 12:30:28 +02:00

16 lines
333 B
Rust

use std::collections::HashMap;
use crate::client::{RequestInfo, Response};
pub enum InterceptAction {
Continue,
Block,
Fulfill(Response),
ModifyHeaders(HashMap<String, String>),
}
#[async_trait::async_trait]
pub trait RequestInterceptor {
async fn intercept(&self, request: &RequestInfo) -> InterceptAction;
}