-
Notifications
You must be signed in to change notification settings - Fork 102
Description
I can't believe what I just accomplished, and I'm so proud to share with you guys.
I searched for a way for the yicam to push its RTSP stream to frigate instead of frigate pulling from the cam.
After days of headache and asking claudeai and chatgpt, and a bit of googling, I finally found the solution, which was simple, but hard enough for someone with limited networking knowledge.
/This will allow you to place the yicam in your parents house in one city, and publish its RTSP stream to your self-hosted frigate server elsewhere.
So, first of all, the cam needs a loopback network interface with 127.0.0.1 as IP.
ifconfig lo 127.0.0.1 && ifconfig lo up
Finally, with an ssh reverse tunnel, the RTSP stream can be forwarded to any machine.
ssh -NR 7554:0.0.0.0:554 [email protected] (or any IP that the yicam has access to)
The machine that accepts the tunnel, needs the following config in /etc/ssh/sshd_config
GatewayPorts yes
PermitTunnel yes
AllowTcpForwarding yes
While this might sound like a security desaster at first, I think it can be accomplished with some strongly restricted docker-containers that expose the SSH port publicly.
I was thinking, that maybe this could be implemented in the next version of yi-hack, where the loopback device is created automatically, while the SSH address can be configured via UI.