mirror of
https://github.com/wimpysworld/stream-sprout
synced 2026-03-14 14:45:50 +01:00
feat: add support for protecting the stream sprout server with a key
- Close #8
This commit is contained in:
parent
a57ee9d0b4
commit
fc412d22d8
4 changed files with 16 additions and 1 deletions
BIN
.github/obs-settings.png
vendored
Normal file
BIN
.github/obs-settings.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
|
|
@ -100,6 +100,10 @@ Stream Sprout will look for a configuration file in the following locations, in
|
|||
### Server
|
||||
|
||||
The `server:` section is used to configure the RTMP server that Stream Sprout will listen on.
|
||||
`url:` is the URL that Stream Sprout will listen on; it must be an RTMP URL.
|
||||
If you remotely host Stream Sprout, you should set `key:` to a secure value to prevent unauthorised access.
|
||||
|
||||
```yaml
|
||||
If `archive_stream:` is `true` Stream Sprout will archive the stream to disk in the directory specified by `archive_path:`.
|
||||
|
||||
### Services
|
||||
|
|
@ -173,6 +177,9 @@ services:
|
|||
- Select `Custom` from the `Service` dropdown
|
||||
- Copy the server `url:` from your Stream Sprout configuration to the `Server` field:
|
||||
- `rtmp://127.0.0.1:1935` (*default*)
|
||||
- Copy the `key:` (if you specified one) from your Stream Sprout configuration to the `Stream Key` field
|
||||
|
||||

|
||||
|
||||
## Limitations
|
||||
|
||||
|
|
|
|||
|
|
@ -120,11 +120,18 @@ trap ctrl_c INT
|
|||
while true; do
|
||||
echo "Stream Sprout v${VERSION} using ${STREAM_SPROUT_CONFIG}"
|
||||
SERVER_URL=$(yq e ".server.url" "${STREAM_SPROUT_CONFIG}")
|
||||
SERVER_KEY=$(yq e ".server.key" "${STREAM_SPROUT_CONFIG}")
|
||||
if [[ ! "${SERVER_URL}" =~ ^rtmp://.* ]]; then
|
||||
echo " - Invalid URL: ${SERVER_URL} is not a valid RTMP URL."
|
||||
exit 1
|
||||
fi
|
||||
echo " - Server: ${SERVER_URL}"
|
||||
echo -n " - Server: ${SERVER_URL}"
|
||||
if [ "${SERVER_KEY}" != "null" ]; then
|
||||
SERVER_URL+="/${SERVER_KEY}"
|
||||
echo " (key required)"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
STREAM_TEE=""
|
||||
get_stream_tee
|
||||
ffmpeg \
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
server:
|
||||
url: "rtmp://127.0.0.1:1935"
|
||||
key: "<insert your own key here>"
|
||||
archive_stream: false
|
||||
archive_path: "${HOME}/Streams"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue