Before modifying the code, the stunnerd's log looks like:
15:35:24.141869 listener.go:57: stunner-listener-default-listener TRACE: NewListener: "default-listener":{DTLS://127.0.0.1:3478<32768-65535>,public=-:-,cert/key=<SECRET>/<SECRET>,routes=[allow-any]}
15:35:24.141876 listener.go:121: stunner-listener-default-listener TRACE: Reconcile: "default-listener":{DTLS://127.0.0.1:3478<32768-65535>,public=-:-,cert/key=<SECRET>/<SECRET>,routes=[allow-any]}
15:35:24.141898 reconcile.go:100: listener-manager ERROR: could not create new object: invalid TLS certificate: base64-decode error: illegal base64 data at input byte 0
15:35:24.141904 reconcile.go:131: stunner ERROR: could not reconcile listener config: invalid TLS certificate: base64-decode error: illegal base64 data at input byte 0
15:35:24.141911 reconcile.go:196: stunner INFO: rolling back to previous configuration: {version="v1alpha1",admin:{},auth:{},listeners=[],clusters=[]}
15:35:24.141918 main.go:163: stunnerd TRACE: reconciliation ready
15:35:24.141945 main.go:168: stunnerd ERROR: could not reconcile new configuration: plaintext: empty username or password, rolling back to last running config
After adding the base64 encode feature to the self-signed certificate and key pem data, the stunner's log looks like:
Establish a test environment for stunnerd locally. Follow the steps below.
Prerequisite
Installation
mediatx
from the repository https://github.com/aler9/mediamtx.git as the streaming server.cd
git clone https://github.com/aler9/mediamtx.git
cd mediamtx
make binaries
modify the config option in the:3478?transport=dtls]
mediamtx.yml
webrtcICEServers: [turn:user1:passwd1:./mediatx
Note Replace the
host-ip
field with your own host's ip.Download a binary tool called as
ffmpeg
which is used to publish a video stream tomediatx
. For example, on macOS, run the command like belowDownload a video material http://vjs.zencdn.net/v/oceans.mp4.
mediatx
.Note Replace the
host-ip
with your own host's ip.Before modifying the code, the stunnerd's log looks like:
After adding the base64 encode feature to the self-signed certificate and key pem data, the stunner's log looks like:
index.html
.