KRZN.live
Features

Tunnel (port forwarding)

KRZN Live includes an embedded frp client, which exposes the server on the Internet through a frp server (frps) running on a machine with a public IP, like a VPS. No ports need to be opened or forwarded on the router of the machine running KRZN Live, and no separate frpc executable is needed.

Each service is exposed on the frp server with the same port number it has locally. For instance, the RTSP server, listening on port 8554, becomes reachable at rtsp://frp-server-address:8554/mystream.

Configure the frp server

On the public machine, download frp from the Releases page, create a frps.toml file:

bindPort = 7000
auth.token = "a-long-random-secret"

# ports that clients are allowed to expose
allowPorts = [
  { single = 8554 },
  { single = 1935 },
  { start = 8888, end = 8893 },
  { single = 8189 },
]

And launch the server:

./frps -c frps.toml

Make sure that the firewall of the public machine allows incoming connections to port 7000 (TCP) and to the exposed ports: 8554, 1935, 8888, 8889, 8892 (TCP) and 8189, 8890, 8892, 8893 (UDP).

Enable the tunnel

In krznlive.yml, fill the tunnel settings:

tunnel: true
tunnelServerAddress: frp-server-address
tunnelServerPort: 7000
tunnelToken: a-long-random-secret
tunnelServices: [rtsp, rtmp, hls, webrtc, srt, moq]

When KRZN Live starts, the tunnel connects to the frp server and keeps reconnecting if the connection is lost. Changes to these settings are applied without restarting the server.

Available services are rtsp, rtmp, hls, webrtc, srt, moq, playback, api, metrics and pprof. Services that are disabled in the configuration are skipped.

Stability

Security

Once the tunnel is enabled, anyone who can reach the frp server can reach the exposed services. The default configuration allows anyone to publish and read streams, therefore configure authentication before enabling the tunnel.

Connections that come through the tunnel reach the server from 127.0.0.1. Therefore, permissions that are restricted by IP to localhost (ips: ["127.0.0.1", "::1"]), like the ones that the default configuration grants for the Control API, metrics and pprof, apply to anyone on the Internet. Do not expose api, metrics or pprof unless they are protected by a username and password, since the Control API allows to change the configuration and to run external commands.

The tunnel token is hidden in the output of the Control API.

Protocol notes

Message us