pub trait InterceptHandler: Send + Sync {
// Provided methods
fn on_request(&self, _dst: &SocketAddr, _sni: &str, data: &[u8]) -> Vec<u8> ⓘ { ... }
fn on_response(&self, _dst: &SocketAddr, _sni: &str, data: &[u8]) -> Vec<u8> ⓘ { ... }
}Expand description
Called by the TLS proxy for each intercepted request’s plaintext bytes.
This is an internal trait, not public API. The secrets layer implements it with the substitution engine.
Provided Methods§
Sourcefn on_request(&self, _dst: &SocketAddr, _sni: &str, data: &[u8]) -> Vec<u8> ⓘ
fn on_request(&self, _dst: &SocketAddr, _sni: &str, data: &[u8]) -> Vec<u8> ⓘ
Inspect/modify outbound plaintext bytes before re-encryption.
Returns the (possibly modified) bytes to send to the real server.
Sourcefn on_response(&self, _dst: &SocketAddr, _sni: &str, data: &[u8]) -> Vec<u8> ⓘ
fn on_response(&self, _dst: &SocketAddr, _sni: &str, data: &[u8]) -> Vec<u8> ⓘ
Inspect/modify inbound plaintext bytes before re-encryption toward guest.
Returns the (possibly modified) bytes to send to the guest.