rtmp-auth

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2020 License: MIT Imports: 22 Imported by: 0

README

rtmp-auth

Simple auth backend for nginx-rtmp module written in go.

Features

  • Expiring auth
  • Single static binary
  • Persists state to simple file (no database required)
  • Web-UI with subpath support (planned)

In the future I might also add support for removing active streams when they expire.

Usage

Add on_publish/on_publish_done callbacks to your nginx-rtmp config

application myrtmp {
  live on;
  meta copy;

  hls off;

  allow publish all;
  allow play all;

  # add this for authentication
  on_publish http://127.0.0.1:8080/publish;
  on_publish_done http://127.0.0.1:8080/unpublish;
}

Then start the daemon

./rtmp-auth -app "myrtmp" -apiAddr "localhost:8000" -frontendAddr "localhost:8082"

Note: You will need to set the -insecure flag when testing over http.

After you reload your nginx with systemctl reload nginx or similar your rtmp publish-requests will be authenticated against the daemon. You can then visit localhost:8082 to add streams.

For production usage you will want to deploy the frontend behind a Reverse-Proxy with TLS-support like the nginx you already have.

Build Dependencies

  • protoc with go-support
  • statik go get github.com/rakyll/statik

Runtime Dependencies

None apart from nginx-rtmp obviously

Build

make

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL