4 ms·
Yeah, but how does the sandboxed process “know” that it has to go through the proxy? How does it trust your certificate? Is the proxy fully transparent?
by mdavid626 6mo ago
Yeah, but how does the sandboxed process “know” that it has to go through the proxy? How does it trust your certificate? Is the proxy fully transparent?
- afshinmeh 6mo agoOh I see. It inject HTTP_PROXY/HTTPS_PROXY/etc. env vars into the process so that all sandboxed subprocesses go through the proxy.
- blanched 6mo agoWhat if the program doesn’t respect those env vars? Can Zerobox still block network calls in that case?
- afshinmeh 6mo agoGreat question! On Linux, yes, network namespaces enforce that and all net traffic goes through the proxy. Direct connections are blocked at the kernel level even if the program ignores proxy env vars, but I will test this case a bit more (unsure how to though, most network calls would respect HTTPS_PROXY and other similar env vars). That being said, the default behaviour is no network, so nothing will be routed if it's not allowed regardless of whether the sandboxed process respects env vars or not.
- simonw 6mo agoHow about on macOS?
- afshinmeh 6mo agoOn macOS, the proxy is best effort. Programs that ignore HTTPS_PROXY/HTTP_PROXY can connect directly. This is a platform limitation (macOS Seatbelt doesn't support forced proxy routing). BUT, the default behaviour (no net) is fully enforced at the kernel level. Domain filtering relies on the program respecting proxy env vars.
- simonw 6mo agoI thought seatbelt-exec had mechanisms for that? (allow network-outbound (remote tcp "127.0.0.1:8080"))
- afshinmeh 6mo agoIt does but because I'm inheriting the seatbelt settings from Codex, I'm not resetting it in Zerobox (I thought it's a safer option). Let me look into this, there should be a way to take Codex' profile and safely combine/modify it.
- solarkraft 6mo agoDoes this work inside of Podman containers?