rsys is a remote syscall forwarding client/server for Linux. It runs a program locally under ptrace and forwards effect-creating syscalls (file and network I/O, readiness, and a few identity/environment helpers) to a remote rsysd over TCP, so the program behaves as if it were running on the remote host.
Requirements: a Linux x86_64 machine with a C toolchain.
makeThis produces two binaries in the repository root:
rsys: client (traces a local program and forwards syscalls)rsysd: server (executes forwarded syscalls)
Start the server on the remote host:
./rsysd 5555Run a program via the client (connects to rsysd and execs the program locally):
./rsys 192.0.2.10 5555 ls -laEnable verbose logging:
./rsys -v 192.0.2.10 5555 curl https://example.com/Expose a local path at a different path for the traced program (repeatable):
./rsys -m /home/me/project:/mnt/project 192.0.2.10 5555 ls /mnt/projectClient options (see rsys -h for the authoritative list):
-v, --verbose: verbose logging-m, --mount SRC:DST: expose localSRCat pathDST-p PORT|LOCAL:REMOTE: forward remote listen port to local port-R, --read-only: block remote filesystem mutations-e: use local environment for the traced program-E: use remote environment for the traced program (default)
Server options:
-v: verbose logging
rsys.c,rsysd.c: tinymain()wrappers.rsys_protocol.h: wire protocol framing + integer encoding helpers.rsys_tracee_mem.h: helpers to read/write tracee memory (process_vm_*withptracefallback).src/rsys/: client implementation modules (ptrace loop, fd mapping, rpc, env/path helpers, etc).src/rsys/intercept/: per-domain syscall interception/forwarding code + dispatcher.
src/rsysd/: server implementation modules (dispatch + grouped syscall handlers + server loop).