Skip to content

socat

Version 2026.144.1443
Repo superproject

Relays an eth0-bound TCP port to the same port on loopback via socat Installs the socat binary plus iproute (the ip command) and ships the relay-wrapper script at /usr/local/bin/relay-wrapper. port_relay: consumers pull this candy in automatically; the wrapper discovers the container’s non-loopback IP with ip -4 addr and execs socat TCP-LISTEN:PORT,bind=ETH_IP,fork TCP:127.0.0.1:PORT. Every claim below is checkable in a disposable build-scope container: the socat binary runs, the package is installed, and the wrapper is present, executable, and rejects a missing-port invocation.

Installed on every distro:

  • socat

This candy’s plan: — the runnable spec charly check executes against a live deployment. check: steps are idempotent probes; run: steps change state.

Intent Step
run copy=relay-wrapper
check the socat binary is installed at /usr/bin/socat
check socat reports its version and exits zero
check the relay-wrapper script is installed executable at /usr/local/bin/relay-wrapper
check invoking relay-wrapper with no port argument prints a usage error and exits non-zero
check the iproute package providing the ip command the relay uses is installed
check package=socat