lonca-net
A small network proxy for sandboxed commands, from Lonca and usable on its own.
A sandbox lets commands reach only this proxy, on loopback. Every
connection (CONNECT host:port or an absolute http:// request) is put
to a Gate, which decides whether it goes through. Loopback, private and
link-local destinations are refused unless the gate allows them, and the
proxy connects to the address it checked, so DNS cannot swap in a private
address after the check. The proxy never looks inside TLS itself; a gate
may serve a tunnel it let through (Gate::relay).
It has no dependencies and knows nothing about who uses it: the gate holds all the policy.
use Arc;
use ;
/// Lets a build fetch crates and nothing else.
;
Gate::finished, Gate::carried and Gate::relay are told how each
connection ended, see every byte relayed (and may cut it when a budget is
spent), and may serve a tunnel themselves.
Its API has no stability promise yet, and its version moves with Lonca's workspace (every Lonca crate has the same version): pin an exact one.
- Repository: https://github.com/selcukgural/lonca
- Licence: Apache-2.0 (LICENSE)