Username & Password support for camera-streamer

Camera model

Shenzhen AWCL05F 1080 USB Webcam

What is the problem?

Got USB Webcam working with OctoPi and RaspberryPi 3B. No issues except, I would like to require a Username and Password for access to the webstream URL, such as
http://username:password@192.168.1.5/webcam/?action=stream

What did you already try to solve it?

I did edit the /boot/camera-streamer/usbcam.conf file and tried to add -c username: password as an option, but camera-streamer service did not recognize that command. I got this from the following link but this is based on the older mjpg-streamer.
Webcam authentication : r/octoprint (reddit.com)

Have you tried running in safe mode?

No

Did running in safe mode solve the problem?

n/a

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)
octoprint-systeminfo-20231201190009.zip (490.5 KB)

WRITE HERE

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

OctoPrint 1.9.3
Python 3.9.2
OctoPi* 1.0.0cam (build 2023.10.09.154319)
Ender 3v2, Marlin Firmware via MRiscoC 2.1.3
Raspberry Pi 3B

You would probably be better off implementing this in the reverse proxy. OctoPi uses haproxy.

I will note that browsers are moving (if they don't already) to block usernames & passwords embedded in other sites - so it may not work in OctoPrint if you were to just protect the webcam. If you put the whole server behind username & password (using haproxy), then it would still work I believe.

I will do some research on haproxy. Finding a bit of info on it with OctoPi, but mostly pre camera-streamer.