Source referencesRust module referencearsenal-broker
arsenal-broker · proxy_config
Declared module signatures, types, configuration, and source documentation.
Source: arsenal/crates/arsenal-broker/src/proxy_config.rs. SHA-256: 813dfbd8c92accfae90736fb1f9d8d189007d05ec768d594407ef86644c34de9.
This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.
proxy_config::ProxyConfig
Proxy service configuration
#[derive(Debug, Clone, Serialize, Deserialize)]
#[allow(clippy::struct_excessive_bools)]
pub struct ProxyConfig {
/// Enable the credential proxy
#[serde(default)]
pub enabled: bool,
/// Maximum request body size in bytes
#[serde(default = "default_max_request_body_bytes")]
pub max_request_body_bytes: usize,
/// Default request timeout in milliseconds
#[serde(default = "default_proxy_timeout_ms")]
pub default_timeout_ms: u64,
/// Maximum request timeout in milliseconds
#[serde(default = "default_max_proxy_timeout_ms")]
pub max_timeout_ms: u64,
/// Additional blocked IP ranges in CIDR notation for SSRF protection.
///
/// Private IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8,
/// `::1`, `169.254.0.0/16`, etc.) are **always** blocked regardless of this list.
#[serde(default)]
pub blocked_domains: Vec<String>,
/// Require fingerprint verification on proxy requests
#[serde(default = "default_require_fingerprinting")]
pub require_fingerprinting: bool,
/// Require human consent before proxy requests
#[serde(default)]
pub require_consent: bool,
/// Consent policy granularity
#[serde(default)]
pub consent_policy: ConsentPolicy,
/// Headers to strip from proxy responses (glob patterns).
///
/// Common sensitive headers (Authorization, Cookie, Set-Cookie, X-Api-Key)
/// are always stripped.
#[serde(default)]
pub additional_sanitize_headers: Vec<String>,
/// Strip cookies from proxy responses
#[serde(default = "default_strip_cookies")]
pub strip_cookies: bool,
/// `OAuth2` proactive token refresh: refresh this many seconds before expiry
#[serde(default = "default_oauth2_proactive_refresh")]
pub oauth2_proactive_refresh_seconds: u64,
/// Maximum concurrent connections per target domain
#[serde(default = "default_max_connections_per_domain")]
pub max_connections_per_domain: usize
}Source line: 13.
proxy_config::ConsentConfig
Consent service configuration
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ConsentConfig {
/// Enable the consent service endpoints
#[serde(default)]
pub enabled: bool,
/// Default consent expiration in seconds
#[serde(default = "default_consent_expiry_seconds")]
pub default_expiry_seconds: u64,
/// Maximum consent expiration in seconds
#[serde(default = "default_max_consent_expiry_seconds")]
pub max_expiry_seconds: u64,
/// Cleanup interval for expired consent records (seconds)
#[serde(default = "default_consent_cleanup_interval")]
pub cleanup_interval_seconds: u64
}Source line: 118.