# udptoxy UDP toxiproxy-style CLI/TUI that forwards UDP bidirectionally between an inbound port and an outbound address while simulating latency, jitter, packet loss, and rate limits in both directions. ## Run With the project runner: ```bash just dev 9000 9001 ``` Or with full addresses: ```bash just dev 0.0.0.0:9000 127.0.0.1:9001 ``` If you pass only a port number, `--in` binds to `0.0.0.0:` and `--out` targets `127.0.0.1:`. ## CLI options - `--in ` - `--out ` - `--latency-ms ` - `--jitter-ms ` - `--loss-percent ` - `--rate-bytes-per-sec ` (0 disables, drops packets when exceeded) Notes: - IPv4 only (no IPv6 or hostname resolution). - Packet list length is based on current terminal height. - The packet table shows direction (`in->out` and `out->in`). ## TUI shortcuts - `l` toggle latency - `j` toggle jitter - `p` toggle loss - `r` toggle rate limit - `Tab` / `Shift+Tab` or `Left` / `Right` cycle selected setting - `+` / `-` or `Up` / `Down` adjust selected setting - `q` quit Rate adjustments use preset steps (10KB/s .. 100MB/s). ## Demo ![demo](assets/demo.gif) ## License MIT License - Created by [9 Mothers Corporation](https://9mothers.com)