pub struct ProxyConfig {
pub dns_resolver: Ipv4Addr,
pub secrets: HashMap<String, SecretConfig>,
pub network: NetworkConfig,
pub expose_host: Vec<ExposeHostMapping>,
pub config_dir: Option<PathBuf>,
}Expand description
Configuration for the proxy engine.
Fields§
§dns_resolver: Ipv4AddrIPv4 DNS server used for upstream queries.
secrets: HashMap<String, SecretConfig>Secrets to inject. Key is the env var name visible to the guest. The guest gets a random placeholder token; the proxy substitutes the real value only when the request targets an allowed host.
network: NetworkConfigNetwork access rules.
expose_host: Vec<ExposeHostMapping>Host ports exposed to the guest via host.vm.internal.
config_dir: Option<PathBuf>Working directory for secret provider commands. Normally the directory holding the resolved vm.json, so relative paths in a config behave the same wherever hanzo-vm is invoked from. None inherits the process cwd.
Implementations§
Source§impl ProxyConfig
impl ProxyConfig
Sourcepub fn is_domain_allowed(&self, domain: &str) -> bool
pub fn is_domain_allowed(&self, domain: &str) -> bool
Check if a domain is allowed by the network policy. Empty allowlist means all domains are allowed.
Trait Implementations§
Source§impl Clone for ProxyConfig
impl Clone for ProxyConfig
Source§fn clone(&self) -> ProxyConfig
fn clone(&self) -> ProxyConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProxyConfig
impl Debug for ProxyConfig
Source§impl Default for ProxyConfig
impl Default for ProxyConfig
Source§fn default() -> ProxyConfig
fn default() -> ProxyConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProxyConfig
impl RefUnwindSafe for ProxyConfig
impl Send for ProxyConfig
impl Sync for ProxyConfig
impl Unpin for ProxyConfig
impl UnsafeUnpin for ProxyConfig
impl UnwindSafe for ProxyConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more