Goryu

Goryu (合流, "confluence"): standalone SRT relay that accepts bonded or redundant SRT groups, or a plain SRT link, and forwards one deduplicated stream downstream.

20CMIT licenseUpdated 2026-10-18
bondingclibsrtsrt
On this page
  1. Features
  2. Quick start
  3. Documentation
  4. License
Goryu logo

Goryu (合流, "confluence"): many network paths, one stream.

CI License: MIT

A small SRT bonding relay for Linux. An encoder sends one stream over several network links (two uplinks, two SIMs) as a bonded SRT group. Goryu accepts the group on one port, merges the legs into a single deduplicated stream, and forwards it to a downstream SRT server. An ordinary single-link SRT caller works on the same port.

Built on libsrt 1.5.6 socket-group bonding. It is one C binary with a six-field JSON config and a loopback JSON status API, and it is the bonded-SRT ingress for Bunryu.

        encoder / publisher

   leg A: SRT caller + streamid
   leg B: SRT caller + same streamid
              |
              v
   +-----------------------------+
   | goryu listener              |
   | SRTO_GROUPCONNECT=1         |
   +-----------------------------+
              |
              | SRT group socket
              | libsrt merges and deduplicates legs
              v
   +-----------------------------+
   | session thread per streamid |
   | reads one MPEG-TS payload   |
   +-----------------------------+
              |
              +----> srt:// output, same streamid

Features

  • Bonded and plain SRT on one listener; the status API tells them apart.
  • Streamid passthrough: one listener serves many streams, each forwarded under its own streamid.
  • Passphrase applied to the input and the downstream connection.
  • Per-leg telemetry: RTT, loss, latency, bandwidth and buffer occupancy for every leg, plus the output connection.
  • Built to stay up: bounded retry with backoff to the downstream, takeover of a stale publisher, and a hard cap on log volume.

Quick start

curl -fsSL -o goryu.tar.gz https://github.com/live-miracles/goryu/releases/latest/download/goryu-linux-x86_64.tar.gz
mkdir goryu && tar -xzf goryu.tar.gz -C goryu && cd goryu

Create goryu.json (the downstream must be an SRT server that accepts the publish):

{
  "input_host": "0.0.0.0",
  "input_port": 10081,
  "output_host": "127.0.0.1",
  "output_port": 10080,
  "status_port": 8081,
  "passphrase": ""
}

Run it, then check it is up:

LD_LIBRARY_PATH=lib ./bin/goryu goryu.json
curl http://127.0.0.1:8081/status

Point the encoder at srt://<host>:10081 with a streamid. See Install for running it under systemd and the firewall port, and Configuration for every field.

Documentation

License

MIT. libsrt and OpenSSL are separate projects under their own licenses.