pub struct Proxy<'a> {
pub policy: &'a CompiledPolicy<'a>,
pub resolver: &'a dyn Resolve,
pub recorder: &'a dyn Recorder,
pub limits: &'a Limits,
pub broker: &'a Broker,
pub loopback_ok: &'a [SocketAddr],
pub allow_ech: bool,
pub sessions: Option<&'a Sessions<'a>>,
pub local: Option<&'a dyn LocalService>,
}Expand description
The proxy: a policy, a resolver, an audit sink and limits.
Fields§
§policy: &'a CompiledPolicy<'a>The policy hosts are decided by.
resolver: &'a dyn ResolveName resolution.
recorder: &'a dyn RecorderWhere every decision is recorded.
limits: &'a LimitsResource limits.
broker: &'a BrokerBrokered secrets; Broker::default for none.
loopback_ok: &'a [SocketAddr]Loopback addresses the proxy may connect to despite the loopback ban.
Empty in moat proxy; integration tests list their local server.
allow_ech: boolForward a ClientHello that carries an encrypted server name (ECH,
ESNI); refused when false (sandbox.proxy_allow_ech).
sessions: Option<&'a Sessions<'a>>Session mode (ADR-027): every request must carry one of these
credentials, and is decided with that session’s taint and connection
share. None serves any local client, as the standalone moat proxy
does for the host sandboxes, which cannot send a credential.
local: Option<&'a dyn LocalService>A service of this process that shares the port (ADR-028): moat run
answers its sandboxed hooks here. None in moat proxy.