Skip to main content

Crate mockforge_proxy

Crate mockforge_proxy 

Source
Expand description

Proxy functionality for forwarding requests to upstream services

This crate provides proxy/reverse-proxy capabilities for MockForge:

  • config: Proxy configuration and rule management
  • handler: Request/response handling and processing
  • client: HTTP client functionality for upstream requests
  • middleware: Proxy middleware and request transformation
  • routing: Route matching and rule evaluation

Re-exports§

pub use body_transform::BodyTransformationMiddleware;
pub use config::BodyTransform;
pub use config::BodyTransformRule;
pub use config::MigrationMode;
pub use config::TransformOperation;
pub use client::ProxyClient;
pub use client::ProxyResponse;
pub use conditional::evaluate_proxy_condition;
pub use conditional::find_matching_rule;
pub use config::ProxyConfig;
pub use config::ProxyRule;
pub use handler::ProxyHandler;
pub use middleware::*;
pub use routing::*;

Modules§

body_transform
Body transformation middleware for proxy requests and responses
client
HTTP client for proxy operations
conditional
Conditional proxy evaluation using expressions (JSONPath, JavaScript-like, etc.)
config
Proxy configuration types and settings
handler
Proxy request handler
middleware
Proxy middleware for request/response processing
reality
Reality-slider mock/proxy switching middleware (#222). Moved from mockforge_http::reality_proxy under #555 phase 8. Only foreign dep is mockforge_core::consistency::UnifiedState, already in the proxy crate’s dep graph. mockforge_http::reality_proxy is now a thin shim re-exporting from here. Reality-slider-driven mock/proxy switching middleware (#222).
routing
Proxy routing logic
server
Browser/mobile intercepting proxy server. Moved from mockforge_http::proxy_server under #555 phase 1 — the file’s only non-test caller was a re-export through http itself, and its imports already lived in this crate (body_transform, config::ProxyConfig). mockforge_http::proxy_server is now a thin shim re-exporting from here. Browser/Mobile Proxy Server