How it works
When interception is enabled, microsandbox:- Loads an interception certificate authority, or CA.
- Adds that CA to the guest’s trust store.
- Creates a certificate for each intercepted host.
- Opens a separate verified TLS connection to the upstream server.
~/.microsandbox/tls/ca.{crt,key} and reuses it across local sandboxes. Delete both files to generate a new CA. Use the intercept CA certificate and key settings when sandboxes should use a CA that you provide.
Enabling interception
Bypass patterns
Some clients trust a specific certificate or public key instead of the guest’s trust store. Interception will fail for these clients. Add their hosts to the bypass list. Exact domains such asapi.example.com and wildcards such as *.apple.com are supported. Bypassed traffic stays encrypted between the guest and upstream server, so content-based policy checks and secret injection do not apply.
Upstream CA trust
The proxy verifies upstream certificates with the host’s root store by default. You can add:- a CA trusted for every intercepted host
- a CA trusted only for matching hosts
- a host pattern that skips upstream verification
curl -k. Use it only for hosts you control and only when a trusted CA is not available.
Limits
- Clients that pin certificates or public keys must be bypassed.
- Bypassed traffic cannot use content-based policy checks or secret injection.
- microsandbox does not proxy guest client certificates. Bypass hosts that require guest mTLS.
- microsandbox does not intercept QUIC and HTTP/3 traffic.
Trusting host CAs
Corporate proxies often replace server certificates with certificates signed by a company CA. The host trusts that CA, but a sandbox normally does not. Commands such asapk update, pip install, and curl can then fail with a certificate error.
Enable host CA trust to copy trusted host roots into the guest when it starts:
Host CA trust gives the guest every root certificate trusted by the host. Enable it only when you trust the host’s CA store.
Interaction with TLS MITM
TLS MITM covers configured ports, with port443 enabled by default. TLS MITM and host CA trust solve different problems:
Use both when you need HTTPS inspection and also need raw TLS connections to trust corporate certificates. Raw TLS includes bypassed hosts, custom TLS ports, and protocols such as Postgres or Redis over TLS.
See also
- DNS explains DNS policy and DNS over TLS.
- Network defenses explains SSRF protection.
- Secret handling explains credential injection.