Skip to main content

Module network_proxy

Module network_proxy 

Source
Expand description

Local HTTP CONNECT / SOCKS5 proxy used to enforce hostname allowlists.

The OS sandbox cannot inspect connect() destinations (seccomp BPF sees a pointer, not the sockaddr contents), so exact domain rules are enforced by a loopback proxy: the sandbox permits connections only to the proxy, and the proxy resolves DNS after deciding that a hostname is allowed. Deny rules take precedence over allow rules; anything unmatched is denied.

Structs§

DomainPolicy
Ordered domain rules; deny wins, then allow, then default deny.
DomainRule
One hostname rule. Domains are case-insensitive; *.example.com also matches the bare example.com, matching the existing allowlist semantics.
NetworkProxy
Running proxy. Dropping it stops both accept loops.
ProxyEndpoints
Loopback addresses the sandbox must allow outbound to.

Enums§

DomainRuleAction
Effect of a domain rule.
ProxyDecision
Decision for a proxy request. Unknown destinations are denied.

Functions§

proxy_enforcement_available
Whether this platform can restrict a child to the proxy exactly.
start_proxy
Start HTTP and SOCKS5 listeners on ephemeral loopback ports.