Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 781 Bytes

README.md

File metadata and controls

34 lines (22 loc) · 781 Bytes

middle-sock

A software for fowarding and dynamic-transforming DHCP packets in containers, using network namespace and an unix domain socket or raw socket (UDP) between a DHCP server.

Usage

Raw command

middle-sock -c "<DHCP server start command>"

Run with Docker

cat /proc/net/route > <file> && docker run --cap-add SYS_ADMIN --cap-add NET_ADMIN --security-opt apparmor=unconfined --security-opt seccomp=unconfined -v <file>:/mnt/route:ro -e SERVER_HOST=<host_ip> -p 67:67/udp --name <container_name> -itd middle-sock

(I would update this with examples.)

Build

MSRV (Minimum Supported rustc Version): 1.74.1 (only tested in this version)

cargo build --release

Docker

Build:

docker build -t middle-sock:<your_tag> .