use landlock to further lock down proxy process

This commit is contained in:
Robin Appelman 2025-12-03 02:39:32 +01:00
commit 63a800e20f
4 changed files with 82 additions and 21 deletions

View file

@ -10,6 +10,12 @@ pub struct ForwardTarget {
pub addr: SocketAddr,
}
impl ForwardTarget {
pub fn port(&self) -> u16 {
self.addr.port()
}
}
impl From<ForwardTarget> for SocketAddr {
fn from(value: ForwardTarget) -> Self {
value.addr